Database
[Connection Manager]


Detailed Description

Read/Write profiles, plugins, edges...


Plugins root and wizard entry plugins (technologies) interfaces

#define ALP_CNC_AUTO   "Auto"
 Auto interface.
#define ALP_CNC_AUTO_PROFILE   "auto-all"
 Default auto profile.
#define ALP_CNC_DEFAULT   "Default"
 Default interface.
#define ALP_CNC_MACRO_REPLACE   "{REPLACE}"
 The "replace" macro for template referencing sub-templates.
#define ALP_CNC_MACRO_SPECIAL_CHAR   '{'
 special macro character
#define ALP_CNC_MACRO_USING   "{USING}"
 The "using" macro for template referencing sub-templates.
#define ALP_CNC_PROXY   "Proxy"
 Proxy interface.
#define ALP_CNC_ROOT_PLUGINS   "PluginsRoot"
 plug-ins root
#define ALP_CNC_ROOT_TECHNOLOGIES   "TechnologiesRoot"
 Technologies root.

Constants used in search functions

#define ALP_CNC_FIND_ALL   ((uint32_t) ALP_CNC_OBJECT_ALL)
 find objects of any type
#define ALP_CNC_FIND_ALL_COUNT_MAX   128
 max object returned by cnc_object_find_all()
#define ALP_CNC_FIND_AVAILABLE   ((uint32_t) 0x100)
 find available profiles
#define ALP_CNC_FIND_CHECK_AVAILABILITY   ((uint32_t) 0x800)
 check availability of objects
#define ALP_CNC_FIND_CONNECTED   ((uint32_t) 0x1000)
 Find connected objects only.
#define ALP_CNC_FIND_DEFAULT   (ALP_CNC_FIND_PROFILES)
 find profiles objects by default
#define ALP_CNC_FIND_GET_TYPE(X)   ((uint8_t) ((X) & 0x000000FF))
 get the type part of search flags
#define ALP_CNC_FIND_INTERFACES   ((uint32_t) ALP_CNC_OBJECT_INTERFACE)
 find interface objects
#define ALP_CNC_FIND_INVISIBLE   ((uint32_t) 0x400)
 find invisible objects
#define ALP_CNC_FIND_LINKS   ((uint32_t) ALP_CNC_OBJECT_LINK)
 find link objects
#define ALP_CNC_FIND_PLUGINS   ((uint32_t) ALP_CNC_OBJECT_PLUGIN)
 find plug-in object
#define ALP_CNC_FIND_PROFILES   ((uint32_t) ALP_CNC_OBJECT_PROFILE)
 find profile objects
#define ALP_CNC_FIND_PROVISIONED   ((uint32_t) 0x2000)
 Find temporary provisioned objects only.
#define ALP_CNC_FIND_TEMPLATES   ((uint32_t) ALP_CNC_OBJECT_TEMPLATE)
 find template objects
#define ALP_CNC_FIND_USABLE   ((uint32_t) 0x200)
 find usable profiles

Constants for alp_cnc_object_get_parameters

Can also be in the -63..+62 range to directly specify an count of items in one or the other direction.

#define ALP_CNC_GET_PARAMETERS_ACTIVE   ((int8_t) 128)
 Search connected profile parameters (attributed IP, DNS, etc).
#define ALP_CNC_GET_PARAMETERS_CHILDREN   ((int8_t) 62)
 Search parameters in one item and all next ones.
#define ALP_CNC_GET_PARAMETERS_INHERITED   ((int8_t) -64)
 Search parameters in one item and all previous ones.
#define ALP_CNC_GET_PARAMETERS_ITEM_ONLY   ((int8_t) 0)
 Search parameters in just one item.
#define ALP_CNC_GET_PARAMETERS_WHOLE_PROFILE   ((int8_t) 63)
 Search parameters in the whole profile.

Flags to manipulate object information

See alp_cnc_object_set_info

#define ALP_CNC_INFO_FLAG_AVAILABILITY   ((uint32_t) 4)
 set availability
#define ALP_CNC_INFO_FLAG_FNAME   ((uint32_t) 1024)
 set friendly name
#define ALP_CNC_INFO_FLAG_MANUAL_ID   ((uint32_t) 256)
 set manual id
#define ALP_CNC_INFO_FLAG_MASK   ((uint32_t) 2047)
 set friendly name
#define ALP_CNC_INFO_FLAG_OPTIONS   ((uint32_t) 8)
 set options
#define ALP_CNC_INFO_FLAG_OPTIONS_CLEAR   ((uint32_t) 32)
 clear some option flags
#define ALP_CNC_INFO_FLAG_OPTIONS_INVERT   ((uint32_t) 64)
 invert some option flags
#define ALP_CNC_INFO_FLAG_OPTIONS_SET   ((uint32_t) 16)
 set some option flags
#define ALP_CNC_INFO_FLAG_PRIORITY   ((uint32_t) 2)
 set priority
#define ALP_CNC_INFO_FLAG_TOGGLE_LINK   ((uint32_t) 512)
 change type to link
#define ALP_CNC_INFO_FLAG_TOGGLE_TEMPLATE   ((uint32_t) 128)
 change type to template
#define ALP_CNC_NAME_FLAG_INFO   ((uint32_t) 1)
 set name

Special index

The following value can be used as an index in alp_cnc_object_insert_item to insert an item at the end of the profile

#define ALP_CNC_INSERT_AT_END_INDEX   ((int16_t) 0x7FFF)
 used as an index in alp_cnc_object_insert_item to insert an item at the end of the object

Constants to use with alp_cnc_object_move_item

#define ALP_CNC_MOVE_AS_DEFAULT   -128
 move an item top
#define ALP_CNC_MOVE_DOWN   +1
 move an item down
#define ALP_CNC_MOVE_LAST   127
 move an item bottom
#define ALP_CNC_MOVE_UP   -1
 move an item up

Object types

#define ALP_CNC_OBJECT_ALL   ((uint8_t) 0xFF)
 All object types.
#define ALP_CNC_OBJECT_INTERFACE   ((uint8_t) 0x02)
 Interface object.
#define ALP_CNC_OBJECT_LINK   ((uint8_t) 0x10)
 Link object.
#define ALP_CNC_OBJECT_PLUGIN   ((uint8_t) 0x01)
 Plugin object.
#define ALP_CNC_OBJECT_PROFILE   ((uint8_t) 0x04)
 Profile object.
#define ALP_CNC_OBJECT_TEMPLATE   ((uint8_t) 0x08)
 Template object.

Options flags for AlpCncObjectInfo

#define ALP_CNC_OPTION_IS_CONNECTED   ((uint32_t) 0x1000)
 the profile is connected
#define ALP_CNC_OPTION_IS_SUSPENDED   ((uint32_t) 0x2000)
 the profile is suspended
#define ALP_CNC_OPTION_MANUAL_MODE   ((uint32_t) 0x0080)
 the plug-in is in manual mode
#define ALP_CNC_OPTION_PERSISTENT   ((uint32_t) 0x0040)
 the plug-in defines persistent profiles
#define ALP_CNC_OPTION_READ_ONLY   ((uint32_t) 0x0008)
 the object is read only
#define ALP_CNC_OPTION_REPLACE_ON_USING   ((uint32_t) 0x0010)
 the template does a replace operation even for "{using}" sub-templates
#define ALP_CNC_OPTION_TESTABLE   ((uint32_t) 0x0200)
 the plug-in defines testable profiles
#define ALP_CNC_OPTION_UNDELETABLE   ((uint32_t) 0x0020)
 the object is not deletable
#define ALP_CNC_OPTION_UNSEARCHABLE   ((uint32_t) 0x0004)
 the object is not searcheable
#define ALP_CNC_OPTION_USABLE   ((uint32_t) 0x0001)
 the profile is usable (connectable)
#define ALP_CNC_OPTION_USER_CAN_CHANGE_MODE   ((uint32_t) 0x0100)
 the user can change the mode (automatic/manual) of this plug-in
#define ALP_CNC_OPTION_VISIBLE   ((uint32_t) 0x0002)
 the profile is visible in configuration panels

Parameter checking

#define ALP_CNC_PARAMETER_CHECK_MANDATORY   0x02
 Check presence/absence when getting parameters.
#define ALP_CNC_PARAMETER_CHECK_NOTHING   0
 Does not anything when getting parameters.
#define ALP_CNC_PARAMETER_CHECK_TYPE_AND_SIZE   0x01
 Check type and size when getting parameters.
#define ALP_CNC_PARAMETER_NO_SIZE   0
 Does not check size when used with ALP_CNC_PARAMETER_CHECK_TYPE_AND_SIZE.

Reserved/predefined parameter names. Reserved range must include 0

#define ALP_CNC_PARAMETER_FIRST_RESERVED   ((uint32_t) 0x00000000)
 First reserved parameter name.
#define ALP_CNC_PARAMETER_LAST_RESERVED   ((uint32_t) 0x0000001F)
 Last reserved parameter name.
#define ALP_CNC_PARAMETER_TABLE_END   ALP_CNC_PARAMETER_FIRST_RESERVED
 Fake name meaning: "end of paremeter table".
#define ALP_CNC_PARAMETER_UNDEFINED   (ALP_CNC_PARAMETER_FIRST_RESERVED + 1)
 Fake name meaning: "paremeter undefined".

Parameter value types

#define ALP_CNC_PARAMETER_TYPE_BINARY   ((uint8_t) 3)
 Binary parameter.
#define ALP_CNC_PARAMETER_TYPE_INTEGER   ((uint8_t) 1)
 Integer parameter.
#define ALP_CNC_PARAMETER_TYPE_STRING   ((uint8_t) 2)
 String parameter.
#define ALP_CNC_PARAMETER_TYPE_UNDEFINED   ((uint8_t) 0)
 Undefined parameter.

Defined priorities

#define ALP_CNC_PRIORITY_EDGE   ((uint8_t) 0)
 default priority of edge objects
#define ALP_CNC_PRIORITY_UNKNOWN_PROFILE   ((uint8_t) 1)
 default priority of new profiles

Generic object operations

static char * alp_cnc_builtin_gettext (char *name)
alp_status_t alp_cnc_object_attach (uint32_t fromId, uint32_t toId)
alp_status_t alp_cnc_object_delete (uint32_t nodeId)
alp_status_t alp_cnc_object_delete_item (uint32_t lockedId, uint32_t itemIndex)
alp_status_t alp_cnc_object_find_all (uint32_t objectId, uint32_t options, int16_t *countP, AlpCncObjectInfo **infoArrayP)
void alp_cnc_object_find_close (uint32_t searchId)
uint32_t alp_cnc_object_find_first (char *searchStr, uint32_t options, uint32_t *searchIdP, alp_status_t *errP)
uint32_t alp_cnc_object_find_next (uint32_t searchId, alp_status_t *errP)
alp_status_t alp_cnc_object_get_dependencies (uint32_t objectId, uint32_t **objectsPP, int16_t *countP)
uint32_t alp_cnc_object_get_id (const char *nameStr)
alp_status_t alp_cnc_object_get_info (uint32_t recordId, AlpCncObjectInfo *infoP)
uint32_t alp_cnc_object_get_item_id (uint32_t lockedId, int16_t index)
alp_status_t alp_cnc_object_get_item_index (uint32_t lockedId, int16_t *index, char *nameStr)
uint32_t alp_cnc_object_get_length (uint32_t lockedId)
alp_status_t alp_cnc_object_insert_item (uint32_t lockedId, int16_t *atIndex, uint32_t itemId, AlpCncParameter parameters[])
alp_status_t alp_cnc_object_lock (uint32_t Id)
alp_status_t alp_cnc_object_move_item (uint32_t itemId, int16_t newIndexRelative)
alp_status_t alp_cnc_object_regroup_submit (uint32_t lockedId)
alp_status_t alp_cnc_object_set_info (uint32_t recordId, AlpCncObjectInfo *infoP, uint32_t flags)
alp_status_t alp_cnc_object_submit (uint32_t lockedId)
alp_status_t alp_cnc_object_unlock (uint32_t lockedId)
alp_status_t alp_cnc_sub_object_assign (uint32_t lockedId, int16_t itemIndex, uint32_t newRefId)

Specific parameter operations

alp_status_t alp_cnc_channel_proxy_get_settings (uint8_t channel_id, int8_t index, AlpOMADM_PXLogicalType *PXLogical)
alp_status_t alp_cnc_object_get_parameters (uint32_t lockedId, int16_t itemIndex, int8_t method, AlpCncParameter parameters[])
alp_status_t alp_cnc_object_set_parameters (uint32_t lockedId, int16_t itemIndex, AlpCncParameter parameters[])
void alp_cnc_parameters_free (AlpCncParameter parameters[])
void alp_cnc_parameters_init (AlpCncParameter parameters[], int32_t n)
alp_status_t alp_cnc_profile_proxy_get_settings (uint32_t profile_id, AlpOMADM_PXLogicalType *PXLogical)

Specific interface and edge operations

alp_status_t alp_cnc_edge_delete (uint32_t fromId, uint32_t toId)
alp_status_t alp_cnc_edge_new (uint32_t fromId, uint32_t toId)
alp_status_t alp_cnc_interface_new (const char *nameStr, uint32_t *Id)
alp_status_t alp_cnc_object_ungroup (uint32_t profileId, bool regroupTags)

Specific profile operations

alp_status_t alp_cnc_object_copy (uint32_t *profileId, int16_t from, int16_t to)
uint32_t alp_cnc_object_decode (const char *profileName, const char *pathStr)
char * alp_cnc_object_encode (uint32_t profileId, int16_t index)
alp_status_t alp_cnc_profile_new (const char *nameStr, uint32_t *Id)

Secret objects operations

alp_status_t alp_cnc_secret_delete (uint32_t profile_id, uint32_t parameter)
alp_status_t alp_cnc_secret_edit (const char *data, uint32_t profile_id, uint32_t parameter)
alp_status_t alp_cnc_secret_new (const char *data, uint32_t profile_id, uint32_t parameter)

Defines

#define ALP_CNC_MAX_NAME_LENGTH   63
 name max size
#define CNC_BUILTIN_DOMAINNAME   "cnc_builtin"
 Builtin profiles domain name (for gettext and friends).

Typedefs

typedef _AlpCncObjectInfo AlpCncObjectInfo
 Structure to get/set object info.
typedef _AlpCncParameter AlpCncParameter
 Structure to manipulate item parameters.


Define Documentation

#define ALP_CNC_AUTO   "Auto"
 

Auto interface.

#define ALP_CNC_AUTO_PROFILE   "auto-all"
 

Default auto profile.

#define ALP_CNC_DEFAULT   "Default"
 

Default interface.

#define ALP_CNC_FIND_ALL   ((uint32_t) ALP_CNC_OBJECT_ALL)
 

find objects of any type

#define ALP_CNC_FIND_ALL_COUNT_MAX   128
 

max object returned by cnc_object_find_all()

#define ALP_CNC_FIND_AVAILABLE   ((uint32_t) 0x100)
 

find available profiles

#define ALP_CNC_FIND_CHECK_AVAILABILITY   ((uint32_t) 0x800)
 

check availability of objects

#define ALP_CNC_FIND_CONNECTED   ((uint32_t) 0x1000)
 

Find connected objects only.

#define ALP_CNC_FIND_DEFAULT   (ALP_CNC_FIND_PROFILES)
 

find profiles objects by default

#define ALP_CNC_FIND_GET_TYPE  )     ((uint8_t) ((X) & 0x000000FF))
 

get the type part of search flags

#define ALP_CNC_FIND_INTERFACES   ((uint32_t) ALP_CNC_OBJECT_INTERFACE)
 

find interface objects

#define ALP_CNC_FIND_INVISIBLE   ((uint32_t) 0x400)
 

find invisible objects

#define ALP_CNC_FIND_LINKS   ((uint32_t) ALP_CNC_OBJECT_LINK)
 

find link objects

#define ALP_CNC_FIND_PLUGINS   ((uint32_t) ALP_CNC_OBJECT_PLUGIN)
 

find plug-in object

#define ALP_CNC_FIND_PROFILES   ((uint32_t) ALP_CNC_OBJECT_PROFILE)
 

find profile objects

#define ALP_CNC_FIND_PROVISIONED   ((uint32_t) 0x2000)
 

Find temporary provisioned objects only.

#define ALP_CNC_FIND_TEMPLATES   ((uint32_t) ALP_CNC_OBJECT_TEMPLATE)
 

find template objects

#define ALP_CNC_FIND_USABLE   ((uint32_t) 0x200)
 

find usable profiles

#define ALP_CNC_GET_PARAMETERS_ACTIVE   ((int8_t) 128)
 

Search connected profile parameters (attributed IP, DNS, etc).

#define ALP_CNC_GET_PARAMETERS_CHILDREN   ((int8_t) 62)
 

Search parameters in one item and all next ones.

#define ALP_CNC_GET_PARAMETERS_INHERITED   ((int8_t) -64)
 

Search parameters in one item and all previous ones.

#define ALP_CNC_GET_PARAMETERS_ITEM_ONLY   ((int8_t) 0)
 

Search parameters in just one item.

#define ALP_CNC_GET_PARAMETERS_WHOLE_PROFILE   ((int8_t) 63)
 

Search parameters in the whole profile.

#define ALP_CNC_INFO_FLAG_AVAILABILITY   ((uint32_t) 4)
 

set availability

#define ALP_CNC_INFO_FLAG_FNAME   ((uint32_t) 1024)
 

set friendly name

#define ALP_CNC_INFO_FLAG_MANUAL_ID   ((uint32_t) 256)
 

set manual id

#define ALP_CNC_INFO_FLAG_MASK   ((uint32_t) 2047)
 

set friendly name

#define ALP_CNC_INFO_FLAG_OPTIONS   ((uint32_t) 8)
 

set options

#define ALP_CNC_INFO_FLAG_OPTIONS_CLEAR   ((uint32_t) 32)
 

clear some option flags

#define ALP_CNC_INFO_FLAG_OPTIONS_INVERT   ((uint32_t) 64)
 

invert some option flags

#define ALP_CNC_INFO_FLAG_OPTIONS_SET   ((uint32_t) 16)
 

set some option flags

#define ALP_CNC_INFO_FLAG_PRIORITY   ((uint32_t) 2)
 

set priority

#define ALP_CNC_INFO_FLAG_TOGGLE_LINK   ((uint32_t) 512)
 

change type to link

#define ALP_CNC_INFO_FLAG_TOGGLE_TEMPLATE   ((uint32_t) 128)
 

change type to template

#define ALP_CNC_INSERT_AT_END_INDEX   ((int16_t) 0x7FFF)
 

used as an index in alp_cnc_object_insert_item to insert an item at the end of the object

#define ALP_CNC_MACRO_REPLACE   "{REPLACE}"
 

The "replace" macro for template referencing sub-templates.

#define ALP_CNC_MACRO_SPECIAL_CHAR   '{'
 

special macro character

#define ALP_CNC_MACRO_USING   "{USING}"
 

The "using" macro for template referencing sub-templates.

#define ALP_CNC_MAX_NAME_LENGTH   63
 

name max size

#define ALP_CNC_MOVE_AS_DEFAULT   -128
 

move an item top

#define ALP_CNC_MOVE_DOWN   +1
 

move an item down

#define ALP_CNC_MOVE_LAST   127
 

move an item bottom

#define ALP_CNC_MOVE_UP   -1
 

move an item up

#define ALP_CNC_NAME_FLAG_INFO   ((uint32_t) 1)
 

set name

#define ALP_CNC_OBJECT_ALL   ((uint8_t) 0xFF)
 

All object types.

#define ALP_CNC_OBJECT_INTERFACE   ((uint8_t) 0x02)
 

Interface object.

#define ALP_CNC_OBJECT_LINK   ((uint8_t) 0x10)
 

Link object.

#define ALP_CNC_OBJECT_PLUGIN   ((uint8_t) 0x01)
 

Plugin object.

#define ALP_CNC_OBJECT_PROFILE   ((uint8_t) 0x04)
 

Profile object.

#define ALP_CNC_OBJECT_TEMPLATE   ((uint8_t) 0x08)
 

Template object.

#define ALP_CNC_OPTION_IS_CONNECTED   ((uint32_t) 0x1000)
 

the profile is connected

#define ALP_CNC_OPTION_IS_SUSPENDED   ((uint32_t) 0x2000)
 

the profile is suspended

#define ALP_CNC_OPTION_MANUAL_MODE   ((uint32_t) 0x0080)
 

the plug-in is in manual mode

#define ALP_CNC_OPTION_PERSISTENT   ((uint32_t) 0x0040)
 

the plug-in defines persistent profiles

#define ALP_CNC_OPTION_READ_ONLY   ((uint32_t) 0x0008)
 

the object is read only

#define ALP_CNC_OPTION_REPLACE_ON_USING   ((uint32_t) 0x0010)
 

the template does a replace operation even for "{using}" sub-templates

#define ALP_CNC_OPTION_TESTABLE   ((uint32_t) 0x0200)
 

the plug-in defines testable profiles

#define ALP_CNC_OPTION_UNDELETABLE   ((uint32_t) 0x0020)
 

the object is not deletable

#define ALP_CNC_OPTION_UNSEARCHABLE   ((uint32_t) 0x0004)
 

the object is not searcheable

#define ALP_CNC_OPTION_USABLE   ((uint32_t) 0x0001)
 

the profile is usable (connectable)

#define ALP_CNC_OPTION_USER_CAN_CHANGE_MODE   ((uint32_t) 0x0100)
 

the user can change the mode (automatic/manual) of this plug-in

#define ALP_CNC_OPTION_VISIBLE   ((uint32_t) 0x0002)
 

the profile is visible in configuration panels

#define ALP_CNC_PARAMETER_CHECK_MANDATORY   0x02
 

Check presence/absence when getting parameters.

#define ALP_CNC_PARAMETER_CHECK_NOTHING   0
 

Does not anything when getting parameters.

#define ALP_CNC_PARAMETER_CHECK_TYPE_AND_SIZE   0x01
 

Check type and size when getting parameters.

#define ALP_CNC_PARAMETER_FIRST_RESERVED   ((uint32_t) 0x00000000)
 

First reserved parameter name.

#define ALP_CNC_PARAMETER_LAST_RESERVED   ((uint32_t) 0x0000001F)
 

Last reserved parameter name.

#define ALP_CNC_PARAMETER_NO_SIZE   0
 

Does not check size when used with ALP_CNC_PARAMETER_CHECK_TYPE_AND_SIZE.

#define ALP_CNC_PARAMETER_TABLE_END   ALP_CNC_PARAMETER_FIRST_RESERVED
 

Fake name meaning: "end of paremeter table".

#define ALP_CNC_PARAMETER_TYPE_BINARY   ((uint8_t) 3)
 

Binary parameter.

#define ALP_CNC_PARAMETER_TYPE_INTEGER   ((uint8_t) 1)
 

Integer parameter.

#define ALP_CNC_PARAMETER_TYPE_STRING   ((uint8_t) 2)
 

String parameter.

#define ALP_CNC_PARAMETER_TYPE_UNDEFINED   ((uint8_t) 0)
 

Undefined parameter.

#define ALP_CNC_PARAMETER_UNDEFINED   (ALP_CNC_PARAMETER_FIRST_RESERVED + 1)
 

Fake name meaning: "paremeter undefined".

#define ALP_CNC_PRIORITY_EDGE   ((uint8_t) 0)
 

default priority of edge objects

#define ALP_CNC_PRIORITY_UNKNOWN_PROFILE   ((uint8_t) 1)
 

default priority of new profiles

#define ALP_CNC_PROXY   "Proxy"
 

Proxy interface.

#define ALP_CNC_ROOT_PLUGINS   "PluginsRoot"
 

plug-ins root

#define ALP_CNC_ROOT_TECHNOLOGIES   "TechnologiesRoot"
 

Technologies root.

#define CNC_BUILTIN_DOMAINNAME   "cnc_builtin"
 

Builtin profiles domain name (for gettext and friends).


Typedef Documentation

typedef struct _AlpCncObjectInfo AlpCncObjectInfo
 

Structure to get/set object info.

typedef struct _AlpCncParameter AlpCncParameter
 

Structure to manipulate item parameters.


Function Documentation

static char* alp_cnc_builtin_gettext char *  name  )  [inline, static]
 

Gets friendly (localized) name of a builtin cnc object (profile, template)

Parameters:
[in] name The name as returned in infoP->name by alp_cnc_object_get_info()
Returns:
If name is localized, returns the localized name. Else returns name

alp_status_t alp_cnc_channel_proxy_get_settings uint8_t  channel_id,
int8_t  index,
AlpOMADM_PXLogicalType PXLogical
 

Get proxy settings from a connected channel

Parameters:
[in] channel_id The channel
[in] index 0 returns the first proxy, 1 the second, etc.
[out] PXLogical The locical proxy information
Returns:
ALP_STATUS_OK if a proxy is available. ALP_STATUS_CNC_OBJECT_NOT_FOUND if the channel does not exist or is not selected ALP_STATUS_CNC_INVALID_PARAM if PXLogical is null or the channel has not been connected ALP_STATUS_CNC_INDEX_OUT_OF_RANGE if index is too high. Note that if a connection does not define any proxy, using an index of 0 will return ALP_STATUS_CNC_INDEX_OUT_OF_RANGE
Note:
The returned PXLogical parameter must be freed with alp_omadm_pxlogical_free_settings()

alp_status_t alp_cnc_edge_delete uint32_t  fromId,
uint32_t  toId
 

Deletes an edge in the database

Parameters:
[in] fromId The id of the left node of the edge
[in] toId The id of the right node of the edge
Returns:

alp_status_t alp_cnc_edge_new uint32_t  fromId,
uint32_t  toId
 

Adds an edge in the database

Parameters:
[in] fromId The id of the left node of the edge
[in] toId The id of the right node of the edge
Returns:

alp_status_t alp_cnc_interface_new const char *  nameStr,
uint32_t *  Id
 

Adds an interface in the database

Parameters:
[in] nameStr the name of the interface
[out] Id The unique Id of the object
Returns:

alp_status_t alp_cnc_object_attach uint32_t  fromId,
uint32_t  toId
 

Insert an object as a reference (item) in another object item list. The item is inserted at the right place, according to the priority of each item. Use this function to add an edge or a profile in the item list of a plugin or interface.

Parameters:
[in] fromId The id of the object in which to insert the reference
[in] toId The id of the object to insert as reference
Remarks:
Attachments are done in the ALP_CNC_SERVER_SESSION session to preserve locked objects

alp_status_t alp_cnc_object_copy uint32_t *  profileId,
int16_t  from,
int16_t  to
 

Copies a profile or a subprofile of a profile into a new profile. The newly created copy is locked.

Parameters:
[in,out] profileId The id of the profile to copy. In output, the Id of the copied profile.
[in] from Index of the first item to copy
[in] to Index of the last item to copy
Returns:

uint32_t alp_cnc_object_decode const char *  profileName,
const char *  pathStr
 

Create a new profile from its string representation. Also automatically set a 1 priority to the profile, attach it to its first plugin and submit it. On return, if no error, the profile remains locked in the session.

Parameters:
[in] profileName The name of the profile to create
[in] pathStr The string representation of the profile
Returns:
The newly created profile Id or 0 if an error occured.
Remarks:

alp_status_t alp_cnc_object_delete uint32_t  nodeId  ) 
 

Deletes an item and its parameters from a locked object.

Parameters:
[in] nodeId The Id of the object to delete.
Returns:
Remarks:

alp_status_t alp_cnc_object_delete_item uint32_t  lockedId,
uint32_t  itemIndex
 

Deletes an item and its parameters from a locked object.

Parameters:
[in] lockedId The Id of a locked object.
[in] itemIndex The index of a plugin in the object. 0 based.
Returns:
Remarks:

char* alp_cnc_object_encode uint32_t  profileId,
int16_t  index
 

Create a string representation from a profile.

Parameters:
[in] profileId The profile to encode
[in] index The index of the item in the profile to encode
Returns:
The encoded string
Remarks:
if index == -1, the whole profile is encoded. if index != -1, the parameters of the designated item only are encoded

alp_status_t alp_cnc_object_find_all uint32_t  objectId,
uint32_t  options,
int16_t *  countP,
AlpCncObjectInfo **  infoArrayP
 

Make a search of all items attached to an object. Returns an array of AlpCncObjectInfo (and the size of the array)

Parameters:
[in] objectId The object we want to find items attached to
[in] options Search options (see alp_cnc_object_find_first)
[out] countP Count of items found
[out] infoArrayP The returned array of object info
Returns:
Remarks:

void alp_cnc_object_find_close uint32_t  searchId  ) 
 

Ends a profile search in the database.

Parameters:
[in] searchId The search Id returned by alp_cnc_srv_object_find_first
Returns:

uint32_t alp_cnc_object_find_first char *  searchStr,
uint32_t  options,
uint32_t *  searchIdP,
alp_status_t errP
 

Begins a profile search in the database.

(1) if the searched profile is a profile name, the function returns this profile Id and the search Id is equal to 0 (2) if the search string is a complete profile then the function returns the Id of the new created profile. The search Id is equal to 0. (3) else, the function initializes search data structures and call alp_cnc_srv_object_find_next() to find the first profile. The search Id is non-0 and references the search. This Id must be used w/ alp_cnc_srv_object_find_next() and alp_cnc_srv_object_find_close().

If searchIdP is a NULL pointer, the function considers that the caller just needs the first matching profile: without the search Id the caller will not be able to call alp_cnc_srv_object_find_next() or alp_cnc_srv_object_find_close(). In this case the function automatically calls alp_cnc_srv_object_find_close() before returning.

Parameters:
[in] searchStr The search string (profile name, whole profile or uncomplete profile)
[in] options Search options (for now unused)
[out] searchIdP The new search id (used by other search functions)
[out] errP The error
Returns:
The first profile matching the search string and the search options.

uint32_t alp_cnc_object_find_next uint32_t  searchId,
alp_status_t errP
 

Continues a profile search in the database.

Parameters:
[in] searchId The search Id returned by alp_cnc_srv_object_find_first
[out] errP The returned error
Returns:
The next profile matching the search arguments of alp_cnc_srv_object_find_first

alp_status_t alp_cnc_object_get_dependencies uint32_t  objectId,
uint32_t **  objectsPP,
int16_t *  countP
 

Find non plug-in/interfaces objects that reference an object

Parameters:
[in] objectId The object to search
[out] objectsPP The objects that reference the searched object
[out] countP Count of objects in objectsPP
Returns:

uint32_t alp_cnc_object_get_id const char *  nameStr  ) 
 

Finds an object in the database

Parameters:
[in] nameStr The name of the object to find
Returns:
The unique Id of the object or zero if the object does not exist.

alp_status_t alp_cnc_object_get_info uint32_t  recordId,
AlpCncObjectInfo infoP
 

Gets info about an object in the database

Parameters:
[in] recordId The id of the object
[out] infoP The returned information about the object
Returns:
ALP_STATUS_CNC_IN VALID_PARAM if infoP is NULL ALP_STATUS_CNC_OBJECT_NOT_FOUND if recordId does not exist

uint32_t alp_cnc_object_get_item_id uint32_t  lockedId,
int16_t  index
 

Get the recordId an item refers to.

Parameters:
[in] lockedId The Id of an object.
[in] index the index of the item in the object
Returns:
The Id of the object the item refers to. 0 if an error occured.

alp_status_t alp_cnc_object_get_item_index uint32_t  lockedId,
int16_t *  index,
char *  nameStr
 

Searches for an item by its name in a locked object and returns its index in the object.

Parameters:
[in] lockedId The Id of a locked object.
[in,out] index Input: the index of the first item the function will begin the search. Use 0 if you want to search the whole object. Output: if no error, the index of the found item.
[in] nameStr The name of the searched item.
Returns:
ALP_STATUS_CNC_OBJECT_NOT_FOUND if no item in the object has the searched name.
Remarks:

uint32_t alp_cnc_object_get_length uint32_t  lockedId  ) 
 

Gets the current length of a object.

Parameters:
[in] lockedId The Id of a locked object.
Returns:
The number of items in the object

alp_status_t alp_cnc_object_get_parameters uint32_t  lockedId,
int16_t  itemIndex,
int8_t  method,
AlpCncParameter  parameters[]
 

Get parameters of an item in a locked object.

Parameters:
[in] lockedId The Id of a locked object.
[in] itemIndex The index of a plugin in the object or 0 to get the object parameters.
[in,out] parameters The parameters to get and in return, their values
[in] method Where to find the parameter
Returns:
If ALP_STATUS_OK, the parameters table has been updated with the parameter values of the item. Use alp_cnc_parameters_free() to free memory allocated by this function
Remarks:
To unlock the object and to eventually submit changes in the CM Database, use the alp_cnc_object_unlock() and alp_cnc_object_submit() functions.

alp_status_t alp_cnc_object_insert_item uint32_t  lockedId,
int16_t *  atIndex,
uint32_t  itemId,
AlpCncParameter  parameters[]
 

Use this function to insert an item into a locked object. Items can be plugins, interfaces, or existing objects.

Parameters:
[in] lockedId The Id of a locked object.
[in] atIndex The index in the locked object at which we want to insert the new item. kCncItemIndexMax to add the item at the end of the object.
[in] itemId The Id of the item we want to insert in the object.
[in] parameters The parameters associated with the item we want to insert in the object. Can be NULL.
Returns:
Remarks:
To unlock the object and to eventually submit changes in the CM Database, use the alp_cnc_object_unlock() and alp_cnc_object_submit() functions.

alp_status_t alp_cnc_object_lock uint32_t  Id  ) 
 

Locks a stored object.

Parameters:
[in] Id The Id of the object to lock.
Returns:
if ALP_STATUS_OK, the object Id is locked.
Remarks:
Use this function when you want to edit a object. To unlock the object and to eventually submit changes in the CM Database, use the alp_cnc_object_unlock() and alp_cnc_object_submit() functions.

alp_status_t alp_cnc_object_move_item uint32_t  itemId,
int16_t  newIndexRelative
 

Move an item from a position to another in the object list it is attached to It's assumed that the item is attached to its first plugin/interface (like every profile created w/ the alp_cnc_object_decode). If not, no change is made.

Parameters:
[in] itemId The Id of the item to move (the index is determinated by finding the ItemId reference into the object list of the first item of itemId
[in] newIndexRelative An offset to move the item by (-1, +1, kCncMakeDefault)
Returns:
Remarks:
Use this function to change the order of a profile in the list it belongs. For example, this function can be used to make a profile the default one by moving the profile reference (the item) to the index 0 in the profile list of the plugin it's attached to.

alp_status_t alp_cnc_object_regroup_submit uint32_t  lockedId  ) 
 

Submit all sub-profiles of an ungrouped profile. Sub-profiles are replaced profile references.

Parameters:
[in] lockedId The id of the profile to regroup/submit
Returns:
Remarks:
If the profile does not consist of any sub-profile (no BEGIN/END items), CncSrvProfileGroupSubmit is equivalent to alp_cnc_srv_object_submit. Use alp_cnc_srv_object_unlock to drop changes on the ungrouped profile.

alp_status_t alp_cnc_object_set_info uint32_t  recordId,
AlpCncObjectInfo infoP,
uint32_t  flags
 

Set info of an object in the database

Parameters:
[in] recordId The id of the object
[in,out] infoP The information about the object
[in] flags Which fields to set
Returns:
ALP_STATUS_CNC_IN_VALID_PARAM if infoP is NULL ALP_STATUS_CNC_OBJECT_NOT_FOUND if recordId does not exist

alp_status_t alp_cnc_object_set_parameters uint32_t  lockedId,
int16_t  itemIndex,
AlpCncParameter  parameters[]
 

Set item parameters of a locked object.

Parameters:
[in] lockedId The Id of a locked object.
[in] itemIndex The index of an item in the object. 0 is the index of the object head item.
[in] parameters Input: The parameters names and values to set. The last item in the parameter table must have the special ALP_CNC_PARAMETER_TABLE_END name.
Returns:
Remarks:
To unlock the object and to eventually submit changes in the CM Database, use the alp_cnc_object_unlock() and alp_cnc_object_submit() functions.
Example of use: AlpCncParameter myParams[4];

myParams[0].name = 'uart'; myParams[0].value.asInteger = 0;

myParams[1].name = 'baud'; myParams[1].value.asInteger = 9600;

myParams[2].name = ALP_CNC_PARAMETER_TABLE_END;

alp_cnc_object_set_parameters(Id, 1, myParams);

This is just an example, real parameter names will be defined by plugins developers. Note that names are uint32_t and plugins developers may define parameter names that have no semantic in the 'abcd' notation.

alp_status_t alp_cnc_object_submit uint32_t  lockedId  ) 
 

Submit changes on the given object to the CM Database and unlocks the locked object.

Parameters:
[in] lockedId The Id of a locked object.
Returns:
Remarks:
If the object is not a locked object, the function returns an error.

alp_status_t alp_cnc_object_ungroup uint32_t  profileId,
bool  regroupTags
 

Dereferences profile references in a profile. All sub-profiles are marked with BEGIN and END items

Parameters:
[in,out] profileId The id of the profile to ungroup
[in] regroupTags true <=> begin/end tags are inserted to be able to use regroup features
Returns:
Remarks:
Ungrouped profiles may not have to be submited ungrouped to the database. Use alp_cnc_srv_object_ungroup to submit all sub-profiles and regroup the profile.

alp_status_t alp_cnc_object_unlock uint32_t  lockedId  ) 
 

Unlocks a locked object without submitting changes to the CM Database.

Parameters:
[in] lockedId The Id of a normally locked object.
Returns:
Remarks:
If the object is not a locked object, the function returns an error.

void alp_cnc_parameters_free AlpCncParameter  parameters[]  ) 
 

Free all strings and binary parameters from a parameter table

Parameters:
[in,out] parameters the parametres array to free

void alp_cnc_parameters_init AlpCncParameter  parameters[],
int32_t  n
 

Init a parameter table.

Parameters:
[in,out] parameters an array of parameter to initialize
[in] n the number of parameters in the array

alp_status_t alp_cnc_profile_new const char *  nameStr,
uint32_t *  Id
 

Adds an empty profile in the database

Parameters:
[in] nameStr the name of the profile
[out] Id The unique Id of the object
Returns:

alp_status_t alp_cnc_profile_proxy_get_settings uint32_t  profile_id,
AlpOMADM_PXLogicalType PXLogical
 

Get proxy settings from a profile

Parameters:
[in] profile_id The profile
[out] PXLogical The locical proxy information
Returns:
If ALP_STATUS_OK, the parameters table has been updated with the parameter values of the item. Use alp_cnc_parameters_free() to free memory allocated by this function
Note:
The returned PXLogical parameter must be freed with alp_omadm_pxlogical_free_settings()

alp_status_t alp_cnc_secret_delete uint32_t  profile_id,
uint32_t  parameter
 

Delete a secret data

Parameters:
[in] profile_id the ID of the profile linked to this secret (0 for linked to no profile)
[in] parameter the hidden parameter
Returns:
an error if any

alp_status_t alp_cnc_secret_edit const char *  data,
uint32_t  profile_id,
uint32_t  parameter
 

Replace a secret data

Parameters:
[in] data the new data
[in] profile_id the ID of the profile linked to this secret (0 for linked to no profile)
parameter[in] the hidden parameter
Returns:
an error if any

alp_status_t alp_cnc_secret_new const char *  data,
uint32_t  profile_id,
uint32_t  parameter
 

Store in a hidden way a secret data (like a password)

Parameters:
[in] data the data to hide
[in] profile_id the ID of the profile linked to this secret (0 for linked to no profile)
parameter[in] the parameter to hide
Returns:
an error if any

alp_status_t alp_cnc_sub_object_assign uint32_t  lockedId,
int16_t  itemIndex,
uint32_t  newRefId
 

Change a subprofile by another in a ungrouped locked profile

Parameters:
[in] lockedId The Id of the ungrouped locked profile
[in] itemIndex The index of the subprofile to change
[in] newRefId The reference of the new subprofile
Returns:
Remarks:
itemIndex must reference a BEGIN tag


Generated on Wed Jul 30 07:06:42 2008 by Doxygen 1.4.6 for ALP SDK + Hiker Documentation

Copyright © 1999-2008 ACCESS CO., LTD. All rights reserved.