| The liboaf Library |
|---|
#include <liboaf/liboaf.h> struct OAF_Property; struct OAF_PropertyValue; enum OAF_PropertyType; OAF_Property* oaf_server_info_prop_find (OAF_ServerInfo *server, const char *prop_name); struct OAFActivationInfo; char* oaf_actinfo_stringify (const OAFActivationInfo *actinfo); OAFActivationInfo* oaf_servinfo_to_actinfo (const OAF_ServerInfo *servinfo); OAFActivationInfo* oaf_actid_parse (const OAF_ActivationID actid); void oaf_actinfo_free (OAFActivationInfo *actinfo); OAF_ServerInfo* OAF_ServerInfo_duplicate (const OAF_ServerInfo *original);
struct OAF_PropertyValue {
OAF_PropertyType _d;
union
{
CORBA_char *value_string;
CORBA_double value_number;
CORBA_boolean value_boolean;
GNOME_stringlist value_stringv;
}
_u;
}
OAF_PropertyValue; typedef enum
{
OAF_P_STRING,
OAF_P_NUMBER,
OAF_P_BOOLEAN,
OAF_P_STRINGV
}
OAF_PropertyType;OAF_Property* oaf_server_info_prop_find (OAF_ServerInfo *server, const char *prop_name);
Tries to find a server with the given property. Returns NULL if not found.
| server : | the server where to seek the data. |
| prop_name : | the data to seek in the server. |
| Returns : | a pointer to the OAF_Property structure. |
struct OAFActivationInfo {
char *iid; /* Implementation ID */
char *user; /* You owe this field to boc */
char *host; /* DNS name or IP address */
char *domain; /* This is not a DNS domain, but an activation domain */
} OAFActivationInfo;char* oaf_actinfo_stringify (const OAFActivationInfo *actinfo);
Serializes actinfo into a char *. Should be freed with
| actinfo : | the OAFActivationInfo to flatten. |
| Returns : | the serialized version of actinfo. |
OAFActivationInfo* oaf_servinfo_to_actinfo (const OAF_ServerInfo *servinfo);
This function converts a OAF_ServerInfo structure to a OAFActivationInfo structure. The returned structure should be freed with oaf_actinfo_free.
| servinfo : | An array of OAF_ServerInfo structures. |
| Returns : | a newly allocated initialized OAFActivationInfo structure. |
OAFActivationInfo* oaf_actid_parse (const OAF_ActivationID actid);
Returns a pointer to a newly allocated OAFActivationInfo structure (to be freed with oaf_actinfo_free) initialized with the data of actid.
| actid : | the activation id structure. |
| Returns : | the OAFActivationInfo corresponding to actid. |
void oaf_actinfo_free (OAFActivationInfo *actinfo);
Frees actinfo.
| actinfo : | the OAFActivationInfo structure to free. |
OAF_ServerInfo* OAF_ServerInfo_duplicate (const OAF_ServerInfo *original);
The return value should befreed with
| original : | ServerInfo to copy. |
| Returns : | a newly allocated copy of original. |
| <<< Query and Activation | Registration >>> |