⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cmpift.h

📁 Pegasus is an open-source implementationof the DMTF CIM and WBEM standards. It is designed to be por
💻 H
📖 第 1 页 / 共 5 页
字号:
        /** Executes the specified function procedure only once during the lifetime of the thread.     @param once The pointer to the counter.     @param The function to be called	@return Completion code as defined by POSIX threading semantics (pthread_once)    */    int (*threadOnce) (int *once, void (*init) (void));    /* Create a POSIX threading conformant thread key. This key can be used as a key to access the thread local store.       @param key The address for the key to be returned.       @param cleanup Function to be invoked during thread local store cleanup.       @return Completion code as defined by POSIX threading semantics.      */    int (*createThreadKey)      (CMPI_THREAD_KEY_TYPE * key, void (*cleanup) (void *));        /** Destroy a POSIX threading conformant thread key.    @param key The key to be destroyed.	@return Completion code as defined by POSIX threading semantics. 	*/    int (*destroyThreadKey) (CMPI_THREAD_KEY_TYPE key);        /** Return data from the thread local store using a thread key.    @param key The key to be used to retrieve the data.	@return Completion code as defined by POSIX threading semantics. 	*/    void *(*getThreadSpecific) (CMPI_THREAD_KEY_TYPE key);        /** Set a pointer to data in the therad local store using a thread key.    @param key The key to be used. 	@param value The pointer to the data.	@return Completion code as defined by POSIX threading semantics. 	*/    int (*setThreadSpecific) (CMPI_THREAD_KEY_TYPE key, void *value);        /** Create a POSIX threading conformant mutex.    @param opt The POSIX options. If not options are to be defined the 0 values must be used.	@return Handle of newly created mutex.	*/      CMPI_MUTEX_TYPE (*newMutex) (int opt);        /** Destroy a POSIX threading conformant mutex.    @param mutex The mutex to be destroyed.	*/    void (*destroyMutex) (CMPI_MUTEX_TYPE mutex);        /** Attempt to get control of the mutex  and must wait until released when not available. 	@param mutex The mutex to be locked.	*/    void (*lockMutex) (CMPI_MUTEX_TYPE mutex);        /** Release control of the mutex.    @param mutex The mutex to be unlocked.    */    void (*unlockMutex) (CMPI_MUTEX_TYPE mutex);        /** Create a new POSIX threading-conformant condition variable.    @param opt The POSIX options. If not options are to be defined the 0 values must be used.	@return Handle of newly created condition variable.	*/      CMPI_COND_TYPE (*newCondition) (int opt);        /** Destroy a condition variable.    @param cond The condition variable to be destroyed.	*/    void (*destroyCondition) (CMPI_COND_TYPE cond);        /** Wait until condition is signalled.  This function returns when condition has been    signalled already and otherwise must wait for the signal and then return.	@param cond  The handle of the condition variable to be used. 	@param mutex  The handle of a locked mutex guarding this condition variable.	@return Return value As defined by POSIX threading specifications.	*/    int (*condWait) (CMPI_COND_TYPE cond, CMPI_MUTEX_TYPE mutex);        /** Wait until the condition is signalled using a timeout value. This 	function shall return when condition has been signalled already and otherwise 	must wait for the signal and then return. The function shall return when the 	timeout specification elapses before the condition is signalled.	@param cond Specifies the handle of the condition variable to be used.	@param mutex Specifies the handle of a locked mutex guarding this condition variable.	@param wait Specifies the timeout value.	@return As defined by POSIX threading specifications.	*/    int (*timedCondWait)      (CMPI_COND_TYPE cond, CMPI_MUTEX_TYPE mutex, struct timespec * wait);        /** Sends a signal to a condition variable. 	@param cond Specifies the handle of the condition variable to send the signal.	@return As defined by POSIX threading specifications.	*/    int (*signalCondition) (CMPI_COND_TYPE cond);  };#   endif /* CMPI_VER_90 */#   ifdef CMPI_VER_200  //---------------------------------------------------  //--  //   _CMPIBroker Memory Function Table  //--  //---------------------------------------------------      /** This structure is a table of pointers to memory specific CIMOM    services. This table is made available by the Management Broker,    whenever a provider is loaded and initialized.    This is an extension used by CIMOMs to support memory management 	enhancements.	*/  struct _CMPIBrokerMemFT  {    int ftVersion;    /** Returns a marker. Invoking this function marks subsequent newly	created CMPI objects to be released when release() function is invoked.	Note: mark() functions can be stacked.	@param mb The broker.	@param rc Output: Service return status (suppressed when NULL).	@return Handle to be provided to releae() function.    */    CMPIGcStat *(*mark) (const CMPIBroker * mb, CMPIStatus * rc);        /** Release all CMPI objects created since last mark() operation 	represented by the parameter. release() functions can be stacked. 	@param mb The broker.	@param gc The handle returned from the mark() operation. 	@return Service return status. 	*/      CMPIStatus (*release) (const CMPIBroker * mb, const CMPIGcStat * gc);    /** Allocates uninitalized memory of the specified size.         	@param mb Specifies the broker.	@param size Specifies the amount of memory to allocate.	@return Returns a pointer to the allocated memory, or NULL if the memory 	could not be allocated	*/    void *(*cmpiMalloc) (const CMPIBroker * mb, size_t size);        /** This function shall return a pointer to the allocated memory, the 	memory will be initialized to zero.    @param mb The broker.    @param nElems The number of elements to allocate.    @param sizeElem The number of elements to allocate.	@return Returns a pointer to the allocated memory, or NULL if the memory 	could not be allocated	*/    void *(*cmpiCalloc) (const CMPIBroker * mb, size_t, size_t);        /** This function changes the size of the memory block pointed to by 	ptr which must have been returned by a previous call to cmpiMalloc or 	cmpiCalloc. See the ANSI-C function realloc for more information			@param mb the broker.	@param ptr Pointer to previosuly allocated memory.  Passing a pointer to 	this function which was not allocated explicitly by cmpiMalloc or cmpiCalloc is undefined.	@param size The new size of the memory block.	@return Returns a pointer to the newly allocated memory block, or NULL if 	the new memory is not allcoated. If the function fals nothing is done 	with the original ptr argument.	*/    void *(*cmpiRealloc) (const CMPIBroker * mb, void *, size_t);        /** This function returns a pointer to a new string which is a			duplicate of the string src.			@param mb The broker			@param src The string to duplicate			@return a pointer to the duplicated string, or NULL if insufficient memory was available.		*/    char *(*cmpiStrDup) (const CMPIBroker * mb, const char *);        /** This function frees memory allocated via the cmpiMalloc, cmpiCalloc 	or cmpiRealloc functions.	@param mb The broker.	@param ptr The memory to free. This memory MUST have been allocated via the 	cmpiMalloc, cmpiCalloc or cmpiRealloc functions.	@return None	*/    void (*cmpiFree) (const CMPIBroker * mb, void *);        /**  Allows a MI to free memory associated to a CMPIinstance which was 	allocated via CMPIBrokerEncFT.newInstance. this function should be 	called when an instance is no longer being used by the MI. This function 	will free all contained objects (e.g. properties).	@param mb the broker.	@parma inst The instance to free.	@return None	*/    void (*freeInstance) (const CMPIBroker * mb, CMPIInstance * inst);        /** Allows a MI to free memory associated to a CMPIArgs which was  	allocated via CMPIBrokerEncFT.newArgs. this function should be called 	when an instance is no longer being used by the MI. This function will 	free all contained objects.	@param mb the broker.	@param obj The object path to free.	@return None	*/    void (*freeObjectPath) (const CMPIBroker * mb, CMPIObjectPath * obj);     /** Allows a MI to free memory associated to a CMPIArgs which was 	allocated via CMPIBrokerEncFT.newArgs. this function should be called 	when an instance is no longer being used by the MI. This function will 	free all contained objects.		@param mb the broker.	@param args The argument to free.	@return None.	*/    void (*freeArgs) (const CMPIBroker * mb, CMPIArgs * args);        /**  Allows a MI to free memory associated to a CMPIString which was  	allocated via CMPIBrokerEncFT.newString. this function should be called  	when an instance is no longer being used by the MI. This function will  	free all contained objects.	@param mb the broker.	@param args The string to free.	@return None.	*/    void (*freeString) (const CMPIBroker * mb, CMPIString * str);        /** Allows a MI to free memory associated to a CMPIArray which was 	allocated via CMPIBrokerEncFT.newArray. this function should be called 	when an instance is no longer being used by the MI. This function will 	free all contained objects (e.g. the array elements).	@param mb the broker.	@param args The string to free.	@return None.	*/    void (*freeArray) (const CMPIBroker * mb, CMPIArray * array);        /** Allows a MI to free memory associated to a CMPIDateTime which was 	allocated via CMPIBrokerEncFT.newDateTime functions. this function 	should be called when an instance is no longer being used by the MI. 	This function will free all contained objects.	@param mb the broker.	@param args The string to free.	@return None.	*/    void (*freeDateTime) (const CMPIBroker * mb, CMPIDateTime * date);        /** Allows a MI to free memory associated to a CMPISelectExp which was 	allocated via CMPIBrokerEncFT.newSelectExp functions. this function 	should be called when an instance is no longer being used by the MI. 	This function will free all contained objects.	@param mb the broker.	@param args The string to free.	@return None.	*/    void (*freeSelectExp) (const CMPIBroker * mb, CMPISelectExp * se);  };#   endif /* CMPI_VER_200 */  //---------------------------------------------------  //--  //   _CMPIBroker Encapsulated object  //--  //---------------------------------------------------   /** This structure represents the Management Broker (CIM Object Manager).   */  struct _CMPIBroker  {       /** Opaque pointer to MB specific implementation data.       */    void *hdl;       /** Pointer to MB service routines function table.       */    CMPIBrokerFT *bft;       /** Pointer to MB factory service routines function table.       */    CMPIBrokerEncFT *eft;       /** Pointer to MB extended services function table.       */#   ifdef CMPI_VER_90    CMPIBrokerExtFT *xft;#   endif#   ifdef CMPI_VER_200       /** Pointer to MB memory enhancements function table.       */    CMPIBrokerMemFT *mft;#   endif  };  //---------------------------------------------------  //--  //   _CMPIContext Function Table  //--  //---------------------------------------------------   /** This structure is a table of pointers providing access to Context       support sevices.   */  struct _CMPIContextFT  {       /** Function table version       */    int ftVersion;       /** The Context object will not be used any further and may be freed by           CMPI run time system.	 @param ctx Context this pointer.	 @return Service return status.      */      CMPIStatus (*release) (CMPIContext * ctx);       /** Create an independent copy of the Context object.	 @param ctx Context this pointer.	 @param rc Output: Service return status (suppressed when NULL).	 @return Pointer to copied Context object.      */    CMPIContext *(*clone) (const CMPIContext * ctx, CMPIStatus * rc);       /** Gets a named Context entry value.	 @param ctx Context this pointer.	 @param name Context entry name.	 @param rc Output: Service return status (suppressed when NULL).	 @return Entry value.      */      CMPIData (*getEntry)      (const CMPIContext * ctx, const char *name, CMPIStatus * rc);       /** Gets a Context entry value defined by its index.	 @param ctx Context this pointer.	 @param index Position in the internal Data array.	 @param name Output: Returned Context entry name (suppressed when NULL).	 @param rc Output: Service return status (suppressed when NULL).	 @return Entry value.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -