SBDataRemoteUtils.jsm File Reference

Javascript source for the Songbird data remote utility services. More...

Go to the source code of this file.

Functions

 if (typeof(Cc)=="undefined") var Cc
 
function SB_NewDataRemote (aKey, aRoot)
 Create a new data remote object. More...
 
function SBNewDataRemote (aKey, aRoot)
 Create a new data remote object. More...
 
function SBDataGetStringValue (aKey)
 Get the value of the data in string format. More...
 
function SBDataGetIntValue (aKey)
 Get the value of the data in integer format. More...
 
function SBDataGetBoolValue (aKey)
 Get the value of the data in boolean format. More...
 
function SBDataSetStringValue (aKey, aStringValue)
 Set a string value. Changes the value of the data remote to the boolean passed in, regardless of its value before. More...
 
function SBDataSetBoolValue (aKey, aBoolValue)
 Set a boolean value. Changes the value of the data remote to the boolean passed in, regardless of its value before. More...
 
function SBDataSetIntValue (aKey, aIntValue)
 Set an integer value. Changes the value of the data remote to the integer passed in, regardless of its value before. More...
 
function SBDataIncrementValue (aKey, aCeiling)
 Increment the integer value. Increment the integer value associated with the key passed in. If a ceiling value is passed in the new value will be no greater than the ceiling. More...
 
function SBDataDecrementValue (aKey, aFloor)
 Decrement the integer value. Decrement the integer value associated with the key passed in. If a floor value is passed in the new value will be no less than the floor. More...
 
function SBDataToggleBoolValue (aKey)
 Change the boolean value. The true/false value of the data associated with the key will be reversed. More...
 
function SBDataFireEvent (aKey)
 Cause a notification to be fired. The data associated with the key will be modified so that observers will be called about the change. The actual value of the data should not be counted on. More...
 
function SBDataDeleteBranch (aKey)
 Called to remove the data remote specified by aKey and all its children. More...
 

Variables

 EXPORTED_SYMBOLS
 

Detailed Description

Javascript source for the Songbird data remote utility services.

Definition in file SBDataRemoteUtils.jsm.

Function Documentation

if ( typeof(Cc = ="undefined")

Debug Wrapper. Subclasses and replaces DateRemote to keep track of how many dataremotes are alive, and for which keys.

Enable DEBUG_DATAREMOTES to track down leaks.

Definition at line 524 of file sbDataRemote.js.

function SB_NewDataRemote (   aKey,
  aRoot 
)

Create a new data remote object.

Parameters
aKey- The string identifier for the data to watch
aRoot- OPTIONAL - If present this defines a prefix to the key
Returns
- A data remote object.

Definition at line 116 of file SBDataRemoteUtils.jsm.

Here is the call graph for this function:

Here is the caller graph for this function:

function SBDataDecrementValue (   aKey,
  aFloor 
)

Decrement the integer value. Decrement the integer value associated with the key passed in. If a floor value is passed in the new value will be no less than the floor.

Parameters
aKey- The string identifier for the data to be changed.
aFloor- Optional, if specified the data will be no less than this value
Returns
- The new value of the data.
See Also
DatatRemote

Definition at line 264 of file SBDataRemoteUtils.jsm.

Here is the call graph for this function:

function SBDataDeleteBranch (   aKey)

Called to remove the data remote specified by aKey and all its children.

Parameters
aKey- The data remove to remove.

Definition at line 318 of file SBDataRemoteUtils.jsm.

Here is the call graph for this function:

function SBDataFireEvent (   aKey)

Cause a notification to be fired. The data associated with the key will be modified so that observers will be called about the change. The actual value of the data should not be counted on.

Parameters
aKey- The data about which the event is being fired
aKey- The string identifier for the data about which the event is being fired.
Returns
- The new value of the data.
See Also
DatatRemote

Definition at line 306 of file SBDataRemoteUtils.jsm.

Here is the call graph for this function:

function SBDataGetBoolValue (   aKey)

Get the value of the data in boolean format.

Parameters
aKey- The string identifier for the data to be retrieved.
Returns
- The boolean value of the data.
See Also
DatatRemote

Definition at line 172 of file SBDataRemoteUtils.jsm.

Here is the call graph for this function:

function SBDataGetIntValue (   aKey)

Get the value of the data in integer format.

Parameters
aKey- The string identifier for the data to be changed.
Returns
- The integer value of the data. If the data has not been set or the data is not convertible to an integer the return value will be NaN.
See Also
DatatRemote

Definition at line 159 of file SBDataRemoteUtils.jsm.

Here is the call graph for this function:

Here is the caller graph for this function:

function SBDataGetStringValue (   aKey)

Get the value of the data in string format.

Parameters
aKey- The string identifier for the data to be changed.
Returns
- The string value of the data. If the data has not been set the return value will be the empty string ("");
See Also
DatatRemote

Definition at line 144 of file SBDataRemoteUtils.jsm.

Here is the call graph for this function:

function SBDataIncrementValue (   aKey,
  aCeiling 
)

Increment the integer value. Increment the integer value associated with the key passed in. If a ceiling value is passed in the new value will be no greater than the ceiling.

Parameters
aKey- The string identifier for the data to be changed.
aCeiling- Optional, if specified the data will be at most, this value
Returns
- The new value of the data.
See Also
DatatRemote

Definition at line 239 of file SBDataRemoteUtils.jsm.

Here is the call graph for this function:

function SBDataSetBoolValue (   aKey,
  aBoolValue 
)

Set a boolean value. Changes the value of the data remote to the boolean passed in, regardless of its value before.

Parameters
aKey- The string identifier for the data to be changed.
aBoolValue- A boolean value.
Returns
- The new value of the data.
See Also
DatatRemote

Definition at line 205 of file SBDataRemoteUtils.jsm.

Here is the call graph for this function:

Here is the caller graph for this function:

function SBDataSetIntValue (   aKey,
  aIntValue 
)

Set an integer value. Changes the value of the data remote to the integer passed in, regardless of its value before.

Parameters
aKey- The string identifier for the data to be changed.
aIntValue- An integer (or string convertable to an integer) value.
Returns
- The new value of the data.
See Also
DatatRemote

Definition at line 222 of file SBDataRemoteUtils.jsm.

Here is the call graph for this function:

function SBDataSetStringValue (   aKey,
  aStringValue 
)

Set a string value. Changes the value of the data remote to the boolean passed in, regardless of its value before.

Parameters
aKey- The string identifier for the data to be changed.
aBoolValue- A boolean value.
Returns
- The new value of the data.
See Also
DatatRemote

Definition at line 188 of file SBDataRemoteUtils.jsm.

Here is the call graph for this function:

function SBDataToggleBoolValue (   aKey)

Change the boolean value. The true/false value of the data associated with the key will be reversed.

Parameters
aKey- The string identifier for the data to be changed.
Returns
- The new value of the data.
See Also
DatatRemote

Definition at line 286 of file SBDataRemoteUtils.jsm.

Here is the call graph for this function:

function SBNewDataRemote (   aKey,
  aRoot 
)

Create a new data remote object.

Parameters
aKey- The string identifier for the data to watch
aRoot- OPTIONAL - If present this defines a prefix to the key
Returns
- A data remote object.

Definition at line 131 of file SBDataRemoteUtils.jsm.

Here is the call graph for this function:

Variable Documentation

EXPORTED_SYMBOLS
Initial value:
=
[
"SBNewDataRemote",
"SBDataGetStringValue",
"SBDataGetIntValue",
"SBDataGetBoolValue",
"SBDataSetStringValue",
"SBDataSetBoolValue",
"SBDataSetIntValue",
"SBDataIncrementValue",
"SBDataDecrementValue",
"SBDataToggleBoolValue",
"SBDataFireEvent",
"SBDataDeleteBranch"
]

Definition at line 38 of file SBDataRemoteUtils.jsm.