# HG changeset patch
# User Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
# Date 1195471122 -3600
# Node ID 4a0c7a2052a8da4062177a29d5bd02c6b5a551d1
# Parent 18403e085eaab25596f65d3273ad56befeb46463
Add STD_InstanceMIStub to avoid warnings during compile time
Signed-off-by: Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
diff -r 18403e085eaa -r 4a0c7a2052a8 libcmpiutil.h
--- a/libcmpiutil.h Fri Nov 16 08:49:15 2007 -0800
+++ b/libcmpiutil.h Mon Nov 19 12:18:42 2007 +0100
@@ -464,6 +464,52 @@ const char *cu_compare_ref(const CMPIObj
const CMPIContext *ctx) \
{ return; }
+/**
+ * Generates the function table and initialization stub for an
+ * instance provider.
+ * @param pfx The prefix for all mandatory association provider
+ * functions.
+ * @param pn The provider name under which this provider is
+ * registered.
+ * @param broker The CMPIBroker pointer.
+ * @param hook Perform additional initialization functions.
+ * @return The function table of this instance provider.
+ */
+#define STD_InstanceMIStub(pfx, pn, broker, hook) \
+ static CMPIInstanceMIFT instMIFT__={ \
+ CMPICurrentVersion, \
+ CMPICurrentVersion, \
+ "instance" #pn, \
+ pfx##Cleanup, \
+ pfx##EnumInstanceNames, \
+ pfx##EnumInstances, \
+ pfx##GetInstance, \
+ pfx##CreateInstance, \
+ pfx##ModifyInstance, \
+ pfx##DeleteInstance, \
+ pfx##ExecQuery, \
+ }; \
+ \
+ CMPIInstanceMI * \
+ pn##_Create_InstanceMI(const CMPIBroker *, \
+ const CMPIContext *, \
+ CMPIStatus *rc); \
+ \
+ \
+ CMPI_EXTERN_C \
+ CMPIInstanceMI* pn##_Create_InstanceMI(const CMPIBroker* brkr, \
+ const CMPIContext *ctx, \
+ CMPIStatus *rc) \
+ { \
+ static CMPIInstanceMI mi={ \
+ NULL, \
+ &instMIFT__, \
+ }; \
+ broker=brkr; \
+ hook; \
+ return &mi; \
+ }
+
#endif
/*