FireSync API
 All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kSvNode.h
Go to the documentation of this file.
1 
8 #ifndef K_FIRESYC_SERVER_NODE_H
9 #define K_FIRESYC_SERVER_NODE_H
10 
12 #include <kFireSync/Server/kSvNode.x.h>
13 
20 //typedef kObject kSvNode; --forward-declared in kFsDef.x.h
21 
31 kFsFx(k32u) kSvNode_Id(kSvNode node);
32 
42 kFsFx(kBool) kSvNode_HasStorage(kSvNode node);
43 
55 kFsFx(const kChar*) kSvNode_StoragePath(kSvNode node);
56 
65 
80 kFsFx(kStatus) kSvNode_DynamicIpConfig(kSvNode node, kSize index, kIpConfig* ipConfig);
81 
93 kFsFx(kStatus) kSvNode_SetAddressAndReset(kSvNode node, kSize index, const kIpConfig* ipConfig);
94 
106 kFsFx(kStatus) kSvNode_SetAppInfo(kSvNode node, const kChar* name, kVersion version);
107 
119 kFsFx(kStatus) kSvNode_SetApp(kSvNode node, kPointer app);
120 
128 kFsFx(kPointer) kSvNode_App(kSvNode node);
129 
152 kFsFx(kStatus) kSvNode_SetActionHandler(kSvNode node, kCallbackFx function, kPointer receiver);
153 
163 kFsFx(kStatus) kSvNode_PerformAction(kSvNode node, kPointer args);
164 
175 
190 kFsFx(kStatus) kSvNode_SetWebHandler(kSvNode node, kCallbackFx function, kPointer receiver);
191 
206 kFsFx(kStatus) kSvNode_StartServices(kSvNode node, kSvNodeService services);
207 
219 kFsFx(kStatus) kSvNode_StopServices(kSvNode node, kSvNodeService services);
220 
228 kFsFx(kBool) kSvNode_HasWatchdog(kSvNode node);
229 
254 kFsFx(kStatus) kSvNode_EnableWatchdog(kSvNode node, kBool enable, k64u timeoutPeriod, k64u checkPeriod, kSvWatchdogFx callback, kPointer receiver);
255 
263 kFsFx(kSystem) kSvNode_System(kSvNode node);
264 
283 kFsFx(kAlloc) kSvNode_MessageAlloc(kSvNode node);
284 
296 kFsFx(kStatus) kSvNode_WaitForSync(kSvNode node);
297 
316 kFsFx(kStatus) kSvNode_NotifyShutdown(kSvNode node, kBool restartApp);
317 
336 kFsFx(kStatus) kSvNode_WaitForShutdown(kSvNode node, k64u timeout);
337 
348 kFsFx(kStatus) kSvNode_Log(kSvNode node, const kChar* message);
349 
362 kInlineFx(kStatus) kSvNode_Log(kSvNode node, kLogOption options, const kChar* source, const kChar* message)
363 {
364  return xkSvNode_Log(node, options, source, message);
365 }
366 
378 kFsFx(kStatus) kSvNode_Logvf(kSvNode node, const kChar* format, kVarArgList argList);
379 
393 kInlineFx(kStatus) kSvNode_Logvf(kSvNode node, kLogOption options, const kChar* source, const kChar* format, kVarArgList argList)
394 {
395  return xkSvNode_Logvf(node, options, source, format, argList);
396 }
397 
408 kFsFx(kStatus) kSvNode_Logf(kSvNode node, const kChar* format, ...);
409 
422 kInlineFx(kStatus) kSvNode_Logf(kSvNode node, kLogOption options, const kChar* source, const kChar* format, ...)
423 {
424  return xkSvNode_Logf(node, options, source, format);
425 }
426 
435 
436 #endif
437 
kBool kSvNode_HasStorage(kSvNode node)
Reports whether the node supports local file storage.
kStatus kSvNode_SetActionHandler(kSvNode node, kCallbackFx function, kPointer receiver)
Registers a custom callback handler for incoming action requests.
kAlloc kSvNode_MessageAlloc(kSvNode node)
Gets a memory allocator that is suitable for quickly allocating numerous, short-lived objects...
kStatus kSvNode_SetApp(kSvNode node, kPointer app)
Sets reference to application object.
kStatus kSvNode_NotifyShutdown(kSvNode node, kBool restartApp)
This function can be called to initiate application restart/shutdown, causing a pending call to the k...
kStatus(kCall * kSvWatchdogFx)(kPointer receiver, kObject serverNode, kSvWatchdogArgs *args)
Signature for a kSvNode watchdog callback function.
Definition: kSvDef.h:61
kStatus kSvNode_SetAppInfo(kSvNode node, const kChar *name, kVersion version)
Sets application information that will be made available via the kNode_Info function.
kStatus kSvNode_UseEphemeralPorts(kSvNode node)
Specifies that auto-assigned, ephemeral ports should be used for control, health, data...
Represents address configuration for an Internet Protocol adapter.
Definition: kFsDef.h:157
kStatus kSvNode_EnableWatchdog(kSvNode node, kBool enable, k64u timeoutPeriod, k64u checkPeriod, kSvWatchdogFx callback, kPointer receiver)
Enables or disables the watchdog timer.
kStatus kSvNode_SetWebHandler(kSvNode node, kCallbackFx function, kPointer receiver)
Registers a custom callback handler for incoming HTTP requests.
kStatus kSvNode_SetAddressAndReset(kSvNode node, kSize index, const kIpConfig *ipConfig)
Sets network interface configuration and resets.
kBool kSvNode_HasWatchdog(kSvNode node)
Reports whether a watchdog timer is available on this platform.
k32u kSvNode_Id(kSvNode node)
Reports the device id of this node.
kStatus kSvNode_StopServices(kSvNode node, kSvNodeService services)
Stops node services (e.g., discovery/control servers).
kStatus kSvNode_PerformAction(kSvNode node, kPointer args)
Performs an action within an action handler callback.
kStatus kSvNode_DynamicIpConfig(kSvNode node, kSize index, kIpConfig *ipConfig)
Reports the current IP address configuration for this device, which can be dynamically updated due to...
Represents a collection of FireSync nodes (sensors).
kStatus kSvNode_Logf(kSvNode node, const kChar *format,...)
Writes to the server node log.
kStatus kSvNode_StartServices(kSvNode node, kSvNodeService services)
Starts node services (e.g., discovery/control servers).
Service type enumeration.
kStatus kSvNode_Logvf(kSvNode node, const kChar *format, kVarArgList argList)
Variable-argument version of kSvNode_Logf.
const kChar * kSvNode_StoragePath(kSvNode node)
Reports the root storage path, if the node supports local storage.
kStatus kSvNode_WaitForShutdown(kSvNode node, k64u timeout)
Blocks until this node is ready for shutdown.
kPointer kSvNode_App(kSvNode node)
Gets a reference to the application object.
kStatus kSvNode_Log(kSvNode node, const kChar *message)
Writes to the server node log.
Provides FireSync node network services and mediates access to node hardware.
k32u kSvNode_NextDiscoveryPort(kSvNode node)
Reports the discovery port that will be used to broadcast information about this node.
kSize kSvNode_NetInterfaceCount(kSvNode node)
Reports the number of network interfaces.
kStatus kSvNode_WaitForSync(kSvNode node)
Blocks until configured method of synchronization is established.
kSystem kSvNode_System(kSvNode node)
Gets the kSystem object that hosts this server.