Example
siteKiosk.siteRemote.registration.register(
//the connection info
{
server: 'siteremote.server',
port: 1234,
guid: 'your-machine-guid',
token: 'your-token'
},
//the registration info
{
displayName: 'myDevice',
street1: 'foobar blvd.',
street2: '42',
postalCode: 48161,
city: 'MS',
state: 'NRW',
country: 'GER',
notes: 'Nope, no notes'
},
//replace an existing registration
true,
function(error, token, guid) {
//your error handling goes here
//the error is a registrationError (see below)
}
)
Members
-
<static> errorType :number
-
Error types.
Type:
- number
Properties:
Name Type Default Description parseErrornumber -32700 invalidRequestnumber -32600 methodNotFoundnumber -32601 invalidParamsnumber -32602 internalErrornumber -32603 machineNotAuthenticatednumber 0 exceededFileSizenumber 1 userNotAuthenticatednumber 2 notAuthorizednumber 3 serviceNotAvailablenumber 4 itemNotFoundnumber 5 itemAlreadyExistsnumber 6 -
<static> invalidParamsErrorType :number
-
Invalid param error types.
Type:
- number
Properties:
Name Type Default Description countrynumber 0 statenumber 1 -
<static> itemAlreadyExistsErrorType :number
-
Not authorized error types.
Type:
- number
Properties:
Name Type Default Description requiresReplaceMachineBehaviournumber 0 inRecycleBinnumber 1 multipleDevicesnumber 2 mobileDevicenumber 3 -
<static> notAuthorizedErrorType :number
-
Not authorized error types.
Type:
- number
Properties:
Name Type Default Description addMachinesRightMissingnumber 0 invalidLicensenumber 1 unlicensedClientTypenumber 2 clientCountHasExceededLicensenumber 3
Methods
-
<static> deleteRegistrationInfo()
-
Deletes the registration information.
-
<static> getConnectionInfo() → {siteKiosk.siteRemote.registration~connectionInfo}
-
Gets the connection information.
Returns:
The connection information -
<static> isRegistered() → {boolean}
-
Returns whether this machine is registered with SiteRemote.
Returns:
Whether this machine is registered with SiteRemote- Type
- boolean
-
<static> register(connectionInfo, registrationInfo, replace, completed)
-
Registers this machine with SiteRemote.
Parameters:
Name Type Description connectionInfositeKiosk.siteRemote.registration~connectionInfo The information needed to connect to and authenticate with a SiteRemote server registrationInfositeKiosk.siteRemote.registration~registrationInfo The information to register with a SiteRemote server replaceboolean Whether to force the replacement of an existing machine with the same display name completedsiteKiosk.siteRemote.registration~registerCallback The callback, which is invoked, when the machine registration operation has been completed -
<static> unregister(connectionInfo, completed)
-
Unregisters this machine with SiteRemote.
Parameters:
Name Type Description connectionInfositeKiosk.siteRemote.registration~connectionInfo The information needed to connect to and authenticate with a SiteRemote server completedsiteKiosk.siteRemote.registration~unregisterCallback The callback, which is invoked, when the machine unregistration operation has been completed
Type Definitions
-
connectionInfo
-
Represents the information needed to connect to and authenticate with a SiteRemote server
Properties:
Name Type Description serverstring The servers hostname portnumber The servers port for machine communication guidstring The machine GUID, which is the username for the machine tokenstring The machine token, which is the password for the machine -
registerCallback(error, token, guid)
-
A callback, which is invoked, when the machine registration operation has been completed.
Parameters:
Name Type Description errorsiteKiosk.siteRemote.registration~registrationError Represents information about the error, which might occur when registering with a SiteRemote server tokenstring The machine token, which is the password for the machine guidstring The machine GUID, which is the username for the machine -
registrationError
-
Represents information about the error, which might occur when registering with a SiteRemote server.
Properties:
Name Type Description codenumber An general error type detailnumber A specific error type, which actual type dependent on the general error type messagestring An textual error message -
registrationInfo
-
Represents the information to register with a SiteRemote server.
Properties:
Name Type Description displayNamestring The machines display name street1string The first street field of the machines address street2string The second street field of the machines address postalCodenumber The postal code of the area, where the machine is located citystring The city, where the machine is located statestring The state, where the machine is located countrystring The country, where the machine is located notesstring Additional notes -
unregisterCallback(error)
-
A callback, which is invoked, when the machine unregistration operation has been completed.
Parameters:
Name Type Description errorsiteKiosk.siteRemote.registration~registrationError Represents information about the error, which might occur when unregistering with a SiteRemote server