Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Compound Members  

GaiaCR Class Reference

GaiaCR - Gaia Component Repository. More...

List of all members.

Public Methods

int init ()
 Initializes the wrapper.

int storeComponent (unsigned char *theComponent, int size, char *xmlDescription, bool overWrite)
 Store a component in the CR.

int deleteComponent (char *xmlDescription)
 Remove a component from the CR.

int getComponent (char *xmlDescription, unsigned char **theComponent)
 Retrieve a component from the CR by XML description.

int getComponent (ComponentDescriptor description, unsigned char **theComponent)
 Retrieve a component from the CR by component descriptor.

int queryComponents (ComponentDescriptor query, ComponentDescriptor **results, int &numResults)
 Search CR for components matching certain criteria.


Detailed Description

GaiaCR - Gaia Component Repository.

This class provides access to the component repository.


Member Function Documentation

int GaiaCR::deleteComponent char *    xmlDescription
 

Remove a component from the CR.

If the XML description does not uniquely identify a component, error return with CR_E_DESCRIPTION_NOT_UNIQUE. Component uniquely identified by name, os, and processor.

Parameters:
xmlDescription  the xml description of component to delete
Returns:
CR_OK on success

int GaiaCR::getComponent ComponentDescriptor    description,
unsigned char **    theComponent
 

Retrieve a component from the CR by component descriptor.

Component descriptor must uniquely identify a component (name, os, and processor). Caller is responsible for freeing the theComponent when done with OS::free(), any other free() results in undefined behavior (i.e. YMMV), usually a memory exception under WinNT.

Parameters:
description  xml description of component in question
theComponent  return point to point of component
Returns:
CR_OK on success

int GaiaCR::getComponent char *    xmlDescription,
unsigned char **    theComponent
 

Retrieve a component from the CR by XML description.

XML description must uniquely identify a component (name, os, and processor). Caller is responsible for freeing the theComponent when done with OS::free(), any other free() results in undefined behavior (i.e. YMMV), usually a memory exception under WinNT.

Parameters:
xmlDescription  xml description of component in question
theComponent  return point to point of component
Returns:
CR_OK on success

int GaiaCR::init  
 

Initializes the wrapper.

If the initialization should fail, it will return UIC_ERROR. Failure can be due to CR or name service not running, unable to resolve CR or name service, or Active Space is down.

Returns:
UIC_ERROR on failure, CR_OK on success

int GaiaCR::queryComponents ComponentDescriptor    query,
ComponentDescriptor **    results,
int &    numResults
 

Search CR for components matching certain criteria.

A descriptor matching no components will return an exception.

Parameters:
query  a ComponentDescriptor with fields to search
results  pointer to an array of ComponentDescriptors of each match component
numResults  number of results in returned results array
Returns:
CR_OK on success

int GaiaCR::storeComponent unsigned char *    theComponent,
int    size,
char *    xmlDescription,
bool    overWrite
 

Store a component in the CR.

The XML description must be unique to the component. Unique is defined as no other component description with the same name, processor, and os. These three properties uniquely identify a component.

Parameters:
theComponent  the binary component
size  size of the component in bytes
xmlDescription  the unique xml description describing the component
overWrite  whether to overwrite component if it's already in CR
Returns:
result code: CR_E_DOS_ERROR, CR_E_DB_ERROR, CR_COMPONENT_EXISTS, CR_UNKNOWN_EXCEPTION, or CR_OK


The documentation for this class was generated from the following file:
Generated on Wed Sep 18 18:10:51 2002 for Gaia by doxygen1.2.16