9 #ifndef _GXPL_SERVICE_HEADER_ 10 #define _GXPL_SERVICE_HEADER_ 12 #include <gxPL/defs.h> 111 char * schema_class,
char * schema_type,
586 const char *
name,
const char * value);
598 const char *
name,
const char * value);
612 int index,
const char * value);
677 int gxPLDeviceConfigFilenameSet (gxPLDevice * device,
const char * filename);
int gxPLDeviceInstanceIdSet(gxPLDevice *device, const char *instance_id)
Sets the instance identifier.
gxPLConfigurableType
xPL Configurable Type
const char * gxPLDeviceConfigValueGet(gxPLDevice *device, const char *name)
Return the value of the first/only index for an item.
struct _gxPLDeviceConfigItem gxPLDeviceConfigItem
Describe a element of configuration.
int gxPLDeviceConfigItemAdd(gxPLDevice *device, const char *name, gxPLConfigurableType type, int max_values)
Add a new configurable.
gxPLApplication * gxPLDeviceParent(gxPLDevice *device)
Gets the parent gxPLApplication object.
int gxPLDeviceVendorIdSet(gxPLDevice *device, const char *vendor_id)
Sets the vendor identifier.
int gxPLDeviceGroupHave(const gxPLDevice *device)
Indicates whether the device has groups.
int gxPLDeviceGroupAdd(gxPLDevice *device, const char *group_name)
Adds a group to the device.
int gxPLDeviceConfigItemClearAll(gxPLDevice *device)
Clear all configurable values out.
int gxPLDeviceHeartbeatInterval(const gxPLDevice *device)
Gets the heartbeat interval.
int gxPLDeviceIsRespondToBroadcast(const gxPLDevice *device)
Indicates whether the device will respond to broadcast messages.
int gxPLDeviceConfigValueSet(gxPLDevice *device, const char *name, const char *value)
Simple form to set first/only value in an item.
int gxPLDeviceEnable(gxPLDevice *device, bool enabled)
Enabled or not a device.
int gxPLDeviceConfigValueClearAll(gxPLDevice *device, const char *name)
Clear values for a given configurable.
gxPLMessageType
Possible xPL message types.
Describe a element of configuration.
int gxPLDeviceReportOwnMessagesSet(gxPLDevice *device, bool isreportownmsg)
Process own messages.
Describe a source or destination xPL identifier.
const char * gxPLDeviceVendorId(const gxPLDevice *device)
Gets the vendor identifier.
long gxPLDeviceHeartbeatLast(const gxPLDevice *device)
Gets the time of the last heartbeat sent.
int gxPLDeviceIsHubConfirmed(const gxPLDevice *device)
Indicates whether the device has detected a hub.
int gxPLDeviceIsEnabled(const gxPLDevice *device)
Indicates whether the device is enabled.
int gxPLDeviceConfigItemRemoveAll(gxPLDevice *device)
Remove all configurables.
int gxPLDeviceFilterHave(const gxPLDevice *device)
Indicates whether the device has filters.
int gxPLDeviceFilterAddFromStr(gxPLDevice *device, char *filter)
Adds a filter to the device from a string.
int gxPLDeviceConfigItemRemove(gxPLDevice *device, const char *name)
Remove a configurable.
const char * gxPLDeviceDeviceId(const gxPLDevice *device)
Gets the device identifier.
int gxPLDeviceConfigSave(const gxPLDevice *device)
Save out the current configuration.
Describe a gxPLApplication configuration.
int gxPLDeviceConfigValueSetAt(gxPLDevice *device, const char *name, int index, const char *value)
Set a item value at a given index.
int gxPLDeviceGroupAddFromString(gxPLDevice *device, const char *str)
Adds a group to the device form a string.
int gxPLDeviceIdSet(gxPLDevice *device, const gxPLId *id)
Sets the identifier.
const char * gxPLDeviceFilterToString(const gxPLFilter *filter)
Convert a filter to a string For display purposes.
const gxPLId * gxPLDeviceId(const gxPLDevice *device)
Gets the identifier.
int gxPLDeviceVersionSet(gxPLDevice *device, const char *version)
Sets the version.
int gxPLDeviceConfigListenerAdd(gxPLDevice *device, gxPLDeviceConfigListener listener, void *udata)
Add a device config changed listener.
int gxPLDeviceMessageSend(gxPLDevice *device, gxPLMessage *message)
Send a message out from this device.
int gxPLDeviceIsConfigured(const gxPLDevice *device)
Indicates whether the device is configured.
int gxPLDeviceFilterCount(const gxPLDevice *device)
Number of filters.
const char * gxPLDeviceVersion(const gxPLDevice *device)
Gets the version string.
const char * gxPLDeviceFilterGet(const gxPLDevice *device, int index)
Gets a filter.
int gxPLDeviceListenerAdd(gxPLDevice *device, gxPLDeviceListener listener, gxPLMessageType type, char *schema_class, char *schema_type, void *udata)
Add a listener for the device.
int gxPLDeviceListenerRemove(gxPLDevice *device, gxPLDeviceListener listener)
Remove a device listener.
int gxPLDeviceIsReportOwnMessages(const gxPLDevice *device)
Indicates whether the device will transmit its own messages to the listeners.
gxPLConfigurableType type
gxPLMessage * gxPLDeviceMessageNew(gxPLDevice *device, gxPLMessageType type)
Create a message for the device.
int gxPLDeviceRespondToBroadcastSet(gxPLDevice *device, bool respond)
Enable the response to broadcast messages.
int gxPLDeviceFilterClearAll(gxPLDevice *device)
Erases all filters.
gxPLDeviceConfigItem * gxPLDeviceConfigItemFind(const gxPLDevice *device, const char *name)
Search for a configurable.
int gxPLDeviceDeviceIdSet(gxPLDevice *device, const char *device_id)
Sets the device identifier.
const char * gxPLDeviceGroupGet(const gxPLDevice *device, int index)
Gets a group.
int gxPLDeviceGroupClearAll(gxPLDevice *device)
Erases all groups.
void(* gxPLDeviceListener)(gxPLDevice *, gxPLMessage *, void *)
Listener for a device The end-user can add listener functions that will be called each time the devic...
int gxPLDeviceFilterAdd(gxPLDevice *device, gxPLMessageType type, const gxPLId *source, const gxPLSchema *schema)
Adds a filter to the device.
const char * gxPLDeviceConfigFilenameGet(const gxPLDevice *device)
Return the installed config file, if any.
int gxPLDeviceHeartbeatIntervalSet(gxPLDevice *device, int interval)
Sets the heartbeat interval.
int gxPLDeviceIsConfigurale(const gxPLDevice *device)
Indicates whether the device is configurable.
const char * gxPLDeviceConfigValueGetAt(gxPLDevice *device, const char *name, int index)
Return the value at the given index.
int gxPLDeviceConfigValueCount(const gxPLDevice *device, const char *name)
Return the number of values for a given configurable.
gxPLSetting * gxPLDeviceSetting(gxPLDevice *device)
Returns device setting.
const char * gxPLDeviceInstanceId(const gxPLDevice *device)
Gets the instance identifier.
int gxPLDeviceConfigValueAdd(gxPLDevice *device, const char *name, const char *value)
Add a device item value.
int gxPLDeviceConfigListenerRemove(gxPLDevice *device, gxPLDeviceConfigListener listener)
Remove a config changed listener.
void(* gxPLDeviceConfigListener)(gxPLDevice *, void *)
Device configuration changed listener The end-user can add listener functions that will be called eac...
int gxPLDeviceGroupCount(const gxPLDevice *device)
Number of groups.