Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide setState and setNode notifications to the drivers #323

Open
wants to merge 3 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 28 additions & 4 deletions support/client/lib/vwf/api/kernel.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,23 @@ define( function() {

var exports = {

// TODO: setState
// TODO: getState
// TODO: hashState
/// xxx
///
/// @function

setState: [ /* applicationState, callback() */ ],

/// xxx
///
/// @function

getState: [ /* full, normalize */ ],

/// xxx
///
/// @function

hashState: [],

/// Create a node from a component specification. Construction may require loading data from
/// multiple remote documents. This function returns before construction is complete. A callback
Expand Down Expand Up @@ -94,7 +108,11 @@ define( function() {

getNode: [ /* nodeID, full, normalize */ ],

// TODO: hashNode
/// xxx
///
/// @function

hashNode: [ /* nodeID */ ],

/// @function
///
Expand Down Expand Up @@ -673,6 +691,12 @@ define( function() {

descendants: [ /* nodeID, initializedOnly */ ],

/// xxx
///
/// @function

sequence: [ /* nodeID */ ],

/// Locate nodes matching a search pattern. matchPattern supports an XPath subset consisting of
/// the following:
///
Expand Down
24 changes: 24 additions & 0 deletions support/client/lib/vwf/api/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@ define( function() {

var exports = {

/// xxx
///
/// @function

settingState: [ /* applicationState */ ],

/// xxx
///
/// @function

gettingState: [],

/// Description.
///
/// @function
Expand Down Expand Up @@ -92,6 +104,18 @@ define( function() {

deletingNode: [ /* nodeID */ ],

/// xxx
///
/// @function

settingNode: [ /* nodeID, nodeComponent */ ],

/// xxx
///
/// @function

gettingNode: [ /* nodeID */ ],

/// Description.
///
/// @function
Expand Down
24 changes: 24 additions & 0 deletions support/client/lib/vwf/api/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@ define( function() {

var exports = {

/// xxx
///
/// @function

satState: [ /* applicationState */ ],

/// xxx
///
/// @function

gotState: [],

/// Description.
///
/// @function
Expand Down Expand Up @@ -80,6 +92,18 @@ define( function() {

deletedNode: [ /* nodeID */ ],

/// xxx
///
/// @function

satNode: [ /* nodeID, nodeComponent */ ],

/// xxx
///
/// @function

gotNode: [ /* nodeID */ ],

/// Description.
///
/// @function
Expand Down
46 changes: 41 additions & 5 deletions support/client/lib/vwf/kernel/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,23 @@ define( [ "module", "vwf/model" ], function( module, model ) {

// -- Read-write functions -------------------------------------------------------------

// TODO: setState
// TODO: getState
// TODO: hashState
case "setState":

return function( applicationState, when, callback /* */ ) {
...
};

case "getState":

return function( full, normalize, when, callback ) {
...
};

case "hashState":

return function( when, callback ) {
...
};

case "createNode":

Expand Down Expand Up @@ -216,8 +230,23 @@ define( [ "module", "vwf/model" ], function( module, model ) {

};

// TODO: setNode
// TODO: getNode
case "setNode":

return function( nodeID, nodeComponent, when, callback /* nodeID */ ) {
...
};

case "getNode":

return function( nodeID, full, normalize, when, callback ) {
...
};

case "hashNode":

return function( nodeID, when, callback ) {
...
};

case "createChild":

Expand Down Expand Up @@ -633,11 +662,18 @@ define( [ "module", "vwf/model" ], function( module, model ) {
case "prototypes":
case "behaviors":

case "globals":
case "global":
case "root":

case "ancestors":
case "parent":
case "children":
case "child":
case "descendants":

case "sequence":

case "find":
case "test":
case "findClients":
Expand Down
46 changes: 41 additions & 5 deletions support/client/lib/vwf/kernel/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,23 @@ define( [ "module", "vwf/view" ], function( module, view ) {

// -- Read-write functions -------------------------------------------------------------

// TODO: setState
// TODO: getState
// TODO: hashState
case "setState":

return function( applicationState, when, callback /* */ ) {
...
};

case "getState":

return function( full, normalize, when, callback ) {
...
};

case "hashState":

return function( when, callback ) {
...
};

case "createNode":

Expand Down Expand Up @@ -70,8 +84,23 @@ define( [ "module", "vwf/view" ], function( module, view ) {
undefined, when || 0, callback /* result */ );
};

// TODO: setNode
// TODO: getNode
case "setNode":

return function( nodeID, nodeComponent, when, callback /* nodeID */ ) {

};

case "getNode":

return function( nodeID, full, normalize, when, callback ) {
...
};

case "hashNode":

return function( nodeID, when, callback ) {
...
};

case "createChild":

Expand Down Expand Up @@ -235,11 +264,18 @@ define( [ "module", "vwf/view" ], function( module, view ) {
case "prototypes":
case "behaviors":

case "globals":
case "global":
case "root":

case "ancestors":
case "parent":
case "children":
case "child":
case "descendants":

case "sequence":

case "find":
case "test":
case "findClients":
Expand Down