Create Item
[Category Manager API's]


Functions

alp_status_t alp_catmgr_dml_item_create (AlpCatMgrDmlItemType itemType, AlpDmlItemH *itemH)
alp_status_t alp_catmgr_dml_item_destroy (AlpDmlItemH itemH)
alp_status_t alp_catmgr_dml_item_set_int32 (AlpDmlItemH itemH, AlpCatMgrDmlColumnType column, const int32_t *value)
alp_status_t alp_catmgr_dml_item_set_string (AlpDmlItemH itemH, AlpCatMgrDmlColumnType column, const char *value)


Function Documentation

alp_status_t alp_catmgr_dml_item_create AlpCatMgrDmlItemType  itemType,
AlpDmlItemH itemH
 

Creates an item

Parameters:
[out] itemH address of AlpDmlItemH to be created
[in] itemType AlpCatMgrDmlItemType to be created
Returns:
ALP_STATUS_OK or ALP_STATUS_CATMGR_DML_BAD_PARAM if a parameter is NULL or the identifier does not represent a valid item type

alp_status_t alp_catmgr_dml_item_destroy AlpDmlItemH  itemH  ) 
 

Destroys an item

Note that the item must be created with alp_catmgr_dml_item_create with a valid AlpCatMgrDmlItemType so that this routine will know how to destroy it.

Parameters:
[in] itemH Item structure to be freed
Returns:
ALP_STATUS_OK or ALP_STATUS_CATMGR_DML_BAD_PARAM if a parameter is NULL or the identifier does not represent a string value in the item structure.

alp_status_t alp_catmgr_dml_item_set_int32 AlpDmlItemH  itemH,
AlpCatMgrDmlColumnType  column,
const int32_t *  value
 

Sets an int32_t value in an item.

Passing NULL for value will flag that value as being unset, so that the database will store a NULL value for the integer (instead of say, 0).

Note that the columns accepted by the item depends on the AlpCatMgrDmlItemType used when you called alp_contacts_dml_item_create

Parameters:
[in] itemH Item structure to written to
[in] identifier Describes string value field to set in the item
[in] value Pointer to integer value to set, or NULL to unset the value
Returns:
ALP_STATUS_OK or ALP_STATUS_CATMGR_DML_BAD_PARAM if a parameter is NULL or the identifier does not represent a string value in the item structure.

alp_status_t alp_catmgr_dml_item_set_string AlpDmlItemH  itemH,
AlpCatMgrDmlColumnType  column,
const char *  value
 

Sets a string value in an item.

The value parameter is copied into the item's structure, so the application does not need to maintain the memory after the function call. The copy is freed by alp_catmgr_dml_item_destroy()

Passing NULL for value is different than passing an empty string. If you pass a NULL value, any existing string set is freed. NULL strings generally takes less storage in the database.

If you try to set a string value for a field that has already been set, the previous field value will be freed.

Note that the columns accepted by the item depends on the AlpCatMgrDmlItemType used when you called alp_contacts_dml_item_create

Parameters:
[in] itemH Item structure to written to
[in] identifier Describes string value field to set in the item
[in] value string to copy into item
Returns:
ALP_STATUS_OK or ALP_STATUS_CATMGR_DML_BAD_PARAM if a parameter is NULL or the identifier does not represent a string value in the item structure.


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

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