- Fixed a couple of Hipadaba Issues

- Added properties to Hipadaba Nodes
- Made Morpheus Hipadaba aware and implemented scans
  for Morpheus and Hipadaba


SKIPPED:
	psi/tecs/make_crv
This commit is contained in:
koennecke
2007-01-18 04:58:50 +00:00
parent b79958a864
commit 60c2b58c95
12 changed files with 307 additions and 37 deletions

View File

@ -22,9 +22,12 @@
* Mark Koennecke, June 2006
*
* Added treeChange callback, Mark Koennecke, November 2006
*
* Added support for properties, Mark Koennecke, January 2007
*/
#ifndef HIPADABA
#define HIPADABA
#include <stringdict.h>
/*------- datatypes */
#define HIPNONE -1
@ -70,6 +73,7 @@ typedef struct __hipadaba {
char *name;
hdbValue value;
int protected;
pStringDict properties;
}Hdb, *pHdb;
/*-------------------------------------------------------------------------------*/
typedef int (*hdbCallbackFunction)(void *userData, void *callData,
@ -330,5 +334,34 @@ int UpdateHdbPar(pHdb node, int dataType, void *data, int length,
*/
int GetHdbPar(pHdb node, int dataType, void *data, int length,
void *callData);
/*================================ Property Interface ==============================================*/
/**
* set a property
* @param node The node to set the property for
* @param key The key for the property
* @param value The value of the property
*/
void SetHdbProperty(pHdb node, char *key, char *value);
/**
* get the value of a property
* @param node The node to get the property from
* @param key The properties key
* @param value The area to which to copy the property
* @param len The length of value
* @return 0 on failure, 1 on success
*/
int GetHdbProperty(pHdb node, char *key, char *value, int len);
/**
* initialize a property scan on this node
* @param node The node for which to scan properties
*/
void InitHdbPropertySearch(pHdb node);
/**
* get the next property in a search
* @param node The node for which to search properties
* @param value An area where to copy the value of the property
* @param len The length of value
* @return The key of the property or NULL when the property list is exhausted
*/
const char *GetNextHdbProperty(pHdb node, char *value ,int len);
#endif