npi_import.h

Go to the documentation of this file.
00001 /*
00002  * npi_import.h
00003  *
00004  * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE 
00005  * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE 
00006  * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT.
00007  *
00008  * You can obtain a current copy of the Common Public License from
00009  * http://oss.software.ibm.com/developerworks/opensource/license-cpl.html
00010  *
00011  * Author: Frank Scheffler <frank.scheffler@de.ibm.com>
00012  * Contributors: Heidi Neumann <heidineu@de.ibm.com>
00013  *               Viktor Mihajlovski <mihajlov@de.ibm.com>
00014  *               Adrian Schuur <schuur@de.ibm.com>
00015  *               Marcin Gozdalik <gozdal@gozdal.eu.org>
00016  *
00017  * Description: All the tool functions available for the C provider programmer.
00018  */
00019 #ifndef _NPI_IMPORT_H_
00020 #define _NPI_IMPORT_H_
00021 
00022 #ifdef __cplusplus
00023 extern "C" {
00024 #endif
00025 
00026   /* Vector functions */  
00027   Vector VectorNew ( NPIHandle * );
00028 #define VectorAddTo(h,v,o) _VectorAddTo ( h, v, o.ptr )
00029   void _VectorAddTo ( NPIHandle *, Vector, void * );
00030 #define VectorGet(h,v,i,o) o.ptr=_VectorGet( h, v, i)
00031   void *  _VectorGet( NPIHandle *, Vector, int );
00032   int VectorSize( NPIHandle *, Vector );  
00033 
00034   /* CIMValue functions */
00035   CIMValue CIMValueNewString ( NPIHandle *,
00036                const char * );
00037   CIMValue CIMValueNewInteger ( NPIHandle *, int );
00038   CIMValue CIMValueNewRef ( NPIHandle *, CIMObjectPath );
00039 
00040   /* CIMParameter functions */
00041   CIMType CIMParameterGetType( NPIHandle *, CIMParameter );
00042   char * CIMParameterGetName( NPIHandle *, CIMParameter );
00043   CIMParameter CIMParameterNewString ( NPIHandle *, const char *, 
00044                    const char * );
00045   CIMParameter CIMParameterNewInteger ( NPIHandle *, const char *, int );
00046   CIMParameter CIMParameterNewRef ( NPIHandle *, const char *, CIMObjectPath );
00047   char * CIMParameterGetString ( NPIHandle *, CIMParameter );
00048   CIMObjectPath CIMParameterGetRefValue( NPIHandle *, CIMParameter );
00049 
00050   /* Instance functions */ 
00051   CIMInstance CIMClassNewInstance ( NPIHandle *, CIMClass );
00052   void CIMInstanceSetStringProperty ( NPIHandle *, CIMInstance, const char *, 
00053                   const char * );
00054   void CIMInstanceSetIntegerProperty ( NPIHandle *, CIMInstance, const char *,
00055                    const int );
00056   void CIMInstanceSetLongProperty ( NPIHandle *, CIMInstance, const char *,
00057                    const long long );
00058   void CIMInstanceSetBooleanProperty ( NPIHandle *, CIMInstance, const char *,
00059                    const unsigned char );
00060   void CIMInstanceSetRefProperty ( NPIHandle *, CIMInstance, const char *, 
00061                CIMObjectPath );
00062   char * CIMInstanceGetStringValue( NPIHandle *, CIMInstance, 
00063                 const char *);
00064   int CIMInstanceGetIntegerValue ( NPIHandle * , CIMInstance, 
00065                const char * ); 
00066   CIMObjectPath CIMInstanceGetRefValue ( NPIHandle * , CIMInstance, 
00067                 const char * ); 
00068 
00069   /* Array functions */
00070   char * CIMInstanceAddStringArrayPropertyValue( NPIHandle *, CIMInstance,
00071                                                  const char *, const char *);
00072 
00073   char * CIMInstanceGetStringArrayPropertyValue(  NPIHandle *, CIMInstance,
00074                                                   const char *, int);
00075   
00076   /* Object Path functions */
00077   CIMObjectPath CIMObjectPathFromCIMInstance ( NPIHandle *, CIMInstance );
00078   CIMObjectPath CIMObjectPathNew ( NPIHandle *, const char * );
00079   char * CIMObjectPathGetClassName ( NPIHandle *, CIMObjectPath );
00080   char * CIMObjectPathGetNameSpace ( NPIHandle *, CIMObjectPath );
00081   void CIMObjectPathSetNameSpace ( NPIHandle *, CIMObjectPath, const char * );
00082   void CIMObjectPathSetNameSpaceFromCIMObjectPath ( NPIHandle *, CIMObjectPath,
00083                       CIMObjectPath );
00084   char * CIMObjectPathGetStringKeyValue ( NPIHandle *, CIMObjectPath, 
00085                  const char * );
00086   int CIMObjectPathGetIntegerKeyValue ( NPIHandle *, CIMObjectPath, 
00087                const char * );
00088   CIMObjectPath CIMObjectPathGetRefKeyValue ( NPIHandle *, CIMObjectPath, 
00089                      const char * );
00090   void CIMObjectPathAddStringKeyValue ( NPIHandle *, CIMObjectPath, 
00091                const char *, const char * );
00092   void CIMObjectPathAddIntegerKeyValue ( NPIHandle *, CIMObjectPath, 
00093                 const char *, int);
00094   void CIMObjectPathAddRefKeyValue ( NPIHandle *, CIMObjectPath, 
00095                  const char *, CIMObjectPath);
00096 
00097   /* SelectExp functions */
00098   char * SelectExpGetSelectString ( NPIHandle *, SelectExp );
00099   
00100   /* CIMOM functions */
00101   CIMClass CIMOMGetClass ( NPIHandle *, CIMObjectPath, int );
00102   Vector CIMOMEnumInstanceNames ( NPIHandle * , CIMObjectPath , int );
00103   Vector CIMOMEnumInstances ( NPIHandle * , CIMObjectPath , int, int );
00104   CIMInstance CIMOMGetInstance( NPIHandle *, CIMObjectPath, int );
00105 
00106   void CIMOMDeliverProcessEvent(NPIHandle*,char*,CIMInstance);
00107   void CIMOMDeliverInstanceEvent(NPIHandle*,char*,CIMInstance,CIMInstance,CIMInstance);
00108   NPIHandle* CIMOMPrepareAttach(NPIHandle*);
00109   void CIMOMCancelAttach(NPIHandle*);
00110   void CIMOMAttachThread(NPIHandle*);
00111   void CIMOMDetachThread(NPIHandle*);
00112 
00113   /* Error handling functions */
00114   int errorCheck ( NPIHandle * );
00115   int errorReset ( NPIHandle * );
00116   void raiseError ( NPIHandle *, const char * );
00117   
00118   /* General functions */
00119   char * _ObjectToString( NPIHandle *, void * );
00120 #define ObjectToString(nh,o) _ObjectToString(nh,o.ptr)
00121 #define ObjectIsNull(o) (o.ptr==(void*)0)
00122   
00123 #ifdef __cplusplus
00124 }
00125 #endif
00126 
00127 #endif
00128 

Generated on Thu Feb 9 08:47:49 2006 for openwbem by  doxygen 1.4.6