From: Adrian S. <a3s...@us...> - 2005-06-06 12:20:18
|
Update of /cvsroot/sblim/sfcc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1594 Modified Files: client.c cmci.h Log Message: added getClass enumClassNames and enumClasses to cmci.h and client.c with dummy support rearanged enumInstanceNames Index: cmci.h =================================================================== RCS file: /cvsroot/sblim/sfcc/cmci.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- cmci.h 5 Jun 2005 21:06:56 -0000 1.3 +++ cmci.h 6 Jun 2005 12:20:08 -0000 1.4 @@ -56,21 +56,61 @@ struct _ClientEnc; typedef struct _ClientEnc ClientEnc; + +struct _CMPIConstClass; +typedef struct _CMPIConstClass CMPIConstClass; typedef struct _CMCIClientFT { - /** Enumerate Instance Names of the class (and subclasses) defined by <op>. + /** Get Class using <op> as reference. Class structure can be + controled using the flags parameter. @param cl Client this pointer. @param op ObjectPath containing namespace and classname components. + @param flags Any combination of the following flags are supported: + CMPI_FLAG_LocalOnly, CMPI_FLAG_IncludeQualifiers and CMPI_FLAG_IncludeClassOrigin. + @param properties If not NULL, the members of the array define one or more Property + names. Each returned Object MUST NOT include elements for any Properties + missing from this list + @param rc Output: Service return status (suppressed when NULL). + @return The Class. + */ + CMPIConstClass* (*getClass) + (CMCIClient* cl, + CMPIObjectPath* op, CMPIFlags flags, char** properties, CMPIStatus* rc); + + + /** Enumerate Class Names (and subclass names) in the namespace defined by <op>. Inheritance scope can be controled using the + flags parameter. + @param cl Client this pointer. + @param op ObjectPath containing namespace component. + @param flags The following flag is supported: CMPI_FLAG_DeepInheritance. @param rc Output: Service return status (suppressed when NULL). @return Enumeration of ObjectPathes. */ - CMPIEnumeration* (*enumInstanceNames) + + CMPIEnumeration* (*enumClassNames) (CMCIClient* cl, - CMPIObjectPath* op, CMPIStatus* rc); + CMPIObjectPath* op, CMPIFlags flags, CMPIStatus* rc); + + /** Enumerate Classes (and subclasses) in the namespace defined by <op>. + Class structure and inheritance scope can be controled using the <flags> parameter. + @param cl Client this pointer. + @param op ObjectPath containing namespace and classname components. + @param flags Any combination of the following flags are supported: CMPI_FLAG_LocalOnly, + CMPI_FLAG_DeepInheritance, CMPI_FLAG_IncludeQualifiers and CMPI_FLAG_IncludeClassOrigin. + @param properties If not NULL, the members of the array define one or more Property + names. Each returned Object MUST NOT include elements for any Properties + missing from this list + @param rc Output: Service return status (suppressed when NULL). + @return Enumeration of Instances. + */ + + CMPIEnumeration* (*enumClasses) + (CMCIClient* cl, + CMPIObjectPath* op, CMPIFlags flags, char** properties, CMPIStatus* rc); /** Get Instance using <op> as reference. Instance structure can be - controled using the CMPIInvocationFlags entry in <ctx>. + controled using the <flags> parameter. @param cl Client this pointer. @param op ObjectPath containing namespace, classname and key components. @param flags Any combination of the following flags are supported: @@ -85,8 +125,6 @@ (CMCIClient* cl, CMPIObjectPath* op, CMPIFlags flags, char** properties, CMPIStatus* rc); - // class 2 services - /** Create Instance from <inst> using <op> as reference. @param cl Client this pointer. @param op ObjectPath containing namespace, classname and key components. @@ -133,9 +171,19 @@ (CMCIClient* cl, CMPIObjectPath* op, const char *query, const char *lang, CMPIStatus* rc); - /** Enumerate Instances of the class (and subclasses) defined by <op>. + /** Enumerate Instance Names of the class (and subclasses) defined by <op>. + @param cl Client this pointer. + @param op ObjectPath containing namespace and classname components. + @param rc Output: Service return status (suppressed when NULL). + @return Enumeration of ObjectPathes. + */ + CMPIEnumeration* (*enumInstanceNames) + (CMCIClient* cl, + CMPIObjectPath* op, CMPIStatus* rc); + + /** Enumerate Instances of the class (and subclasses) defined by <op>. Instance structure and inheritance scope can be controled using the - CMPIInvocationFlags entry in <ctx>. + <flags> parameter. @param cl Client this pointer. @param op ObjectPath containing namespace and classname components. @param flags Any combination of the following flags are supported: CMPI_FLAG_LocalOnly, Index: client.c =================================================================== RCS file: /cvsroot/sblim/sfcc/client.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- client.c 5 Jun 2005 21:06:55 -0000 1.4 +++ client.c 6 Jun 2005 12:20:08 -0000 1.5 @@ -965,13 +965,39 @@ return retval; } + +static CMPIConstClass* getClass (CMCIClient* cl, + CMPIObjectPath* op, CMPIFlags flags, char** properties, CMPIStatus* rc) +{ + CMSetStatusWithChars(rc, CMPI_RC_ERROR_SYSTEM, "method not supported"); + return NULL; +} + +static CMPIEnumeration* enumClassNames (CMCIClient* cl, + CMPIObjectPath* op, CMPIFlags flags, CMPIStatus* rc) +{ + CMSetStatusWithChars(rc, CMPI_RC_ERROR_SYSTEM, "method not supported"); + return NULL; +} + +static CMPIEnumeration* enumClasses (CMCIClient* cl, + CMPIObjectPath* op, CMPIFlags flags, char** properties, CMPIStatus* rc) +{ + CMSetStatusWithChars(rc, CMPI_RC_ERROR_SYSTEM, "method not supported"); + return NULL; +} + + static CMCIClientFT clientFt = { - enumInstanceNames, + getClass, + enumClassNames, + enumClasses, getInstance, createInstance, setInstance, deleteInstance, execQuery, + enumInstanceNames, enumInstances, associators, associatorNames, |