Index: Makefile =================================================================== RCS file: /home/cvs/cimple/Makefile,v retrieving revision 1.150 retrieving revision 1.154 diff -r1.150 -r1.154 87c87 < REVISION=0 --- > REVISION=4 140a141 > Index: config.help =================================================================== RCS file: /home/cvs/cimple/config.help,v retrieving revision 1.13 retrieving revision 1.14 diff -r1.13 -r1.14 28c28 < ./configure --pegasus-env --- > ./configure --with-pegasus-env Index: configure-ws =================================================================== RCS file: configure-ws diff -N configure-ws 0a1,3 > #!/bin/sh > PEGASUS=/usr/ws/sdk/openpegasus > ./configure --prefix=/usr/ws/server/cimple --with-pegasus=$PEGASUS --with-pegasus-libdir=$PEGASUS/lib64 --with-pegasus-includes=$PEGASUS/include --with-cmpi=$PEGASUS/include Index: mak/config.mak =================================================================== RCS file: /home/cvs/cimple/mak/config.mak,v retrieving revision 1.113 retrieving revision 1.114 diff -r1.113 -r1.114 66c66 < ifneq ($(call grep,void...enableIndications,$(WITH_CMPI_OPT)/cmpift.h),) --- > ifneq ($(call grep,void.*enableIndications,$(WITH_CMPI_OPT)/cmpift.h),) 70,77d69 < ifneq ($(call grep,enumInstances,$(WITH_CMPI_OPT)/cmpift.h),) < CMPI_ENUM_INSTANCES_BUG_OPT=1 < endif < < ifneq ($(call grep,modifyInstance,$(WITH_CMPI_OPT)/cmpift.h),) < CMPI_MODIFY_INSTANCE_BUG_OPT=1 < endif < Index: mak/platform_DARWIN.mak =================================================================== RCS file: /home/cvs/cimple/mak/platform_DARWIN.mak,v retrieving revision 1.6 retrieving revision 1.8 diff -r1.6 -r1.8 15c15 < ECHO = echo --- > ECHO = @echo 19c19 < ## CP --- > ## cp(source,dest) 23c23 < CP = cp --- > cp = cp $(1) $(2) 27c27 < ## RM --- > ## rm(files) 31c31 < RM = rm -f --- > rm = rm -f $(1) 35c35 < ## TOUCH --- > ## mkdirhier(directory) 39c39,55 < TOUCH = touch --- > mkdirhier = mkdir -p $(1) > > ##============================================================================== > ## > ## rmdirhier(directory) > ## > ##============================================================================== > > rmdirhier = rm -rf $(1) > > ##============================================================================== > ## > ## cpdirhier(source_dir, destination_dir) > ## > ##============================================================================== > > cpdirhier = cp -r $(1) $(2) 63,70d78 < ## GCC_VERSION < ## < ##============================================================================== < < GCC_VERSION = $(shell $(CXX) -dumpversion) < < ##============================================================================== < ## 91c99 < ifdef DEBUG --- > ifdef ENABLE_DEBUG_OPT 97c105,111 < #FLAGS += -Wswitch-enum -Wno-unused-label --- > ##============================================================================== > ## > ## OBJ > ## > ##============================================================================== > > OBJ = .o 109c123,131 < ## Visibility --- > ## GCC_VERSION > ## > ##============================================================================== > > GCC_VERSION = $(shell $(CXX) -dumpversion) > > ##============================================================================== > ## > ## -fvisibility 127c149 < ## OBJ --- > ## LINK_FLAGS 131c153 < OBJ = .o --- > LINK_FLAGS += 135c157 < ## MKDIRHIER -- mkdir recursive --- > ## LDPATH 139c161,165 < MKDIRHIER = mkdir -p --- > ifeq ($(WITH_PEGASUS_LIBDIR_OPT),) > LDPATH = $(addprefix -L,$(LIBDIR)) > else > LDPATH = $(addprefix -L,$(LIBDIR) $(WITH_PEGASUS_LIBDIR_OPT)) > endif 143c169 < ## LINK_FLAGS --- > ## LD_LIBRARY_PATH 147c173,177 < LINK_FLAGS += -L$(LIBDIR) --- > ifeq ($(WITH_PEGASUS_LIBDIR_OPT),) > export LD_LIBRARY_PATH=$(LIBDIR) > else > export LD_LIBRARY_PATH=$(LIBDIR):$(WITH_PEGASUS_LIBDIR_OPT) > endif 151c181 < ## SIZE -- determines size of a shared object --- > ## RPATH 155c185,196 < SIZE = size --- > RPATH_OPTION = -Wl,-rpath= > RPATH_ARGS = $(LIBDIR_OPT) > > ifdef RPATH1 > RPATH_ARGS += $(RPATH1) > endif > > ifdef RPATH2 > RPATH_ARGS += $(RPATH2) > endif > > #RPATH = $(addprefix $(RPATH_OPTION),$(RPATH_ARGS)) 159c200 < ## STATIC_LIBSTDCXX --- > ## shlib_target(SHARED_LIBRARY) 163c204 < STATIC_LIBSTDCXX=$(shell $(CXX) --print-file-name=libstdc++.a) --- > shlib_target = $(LIBDIR)/lib$(1).dylib 167c208 < ## shared_library_target(shlib) --- > ## lib_target(STATIC_LIRARY) 171c212 < shared_library_target = $(LIBDIR)/lib$(1).dylib --- > lib_target = $(LIBDIR)/lib$(1).a 175c216 < ## static_library_target(shlib) --- > ## binary_target(BINARY) 179c220 < static_library_target = $(LIBDIR)/lib$(1).a --- > binary_target = $(BINDIR)/$(1) 183c224 < ## bin_target(bin) --- > ## _SYS_LIBS 187c228 < bin_target = $(BINDIR)/$(1) --- > _SYS_LIBS = -ldl -lpthread 195d235 < _SYS_LIBS = -ldl -lpthread 199,200c239,240 < $(CXX) $(LINK_FLAGS) -dynamiclib \ < -o $(call shared_library_target,$(1)) \ --- > $(CXX) $(RPATH) $(LINK_FLAGS) -dynamiclib \ > -o $(call shlib_target,$(1)) \ 201a242 > $(LDPATH) \ 207c248 < ## clean_shlib_list(library) --- > ## clean_shlib(library) 211c252 < shlib_clean_targets = $(call shared_library_target,$(1)) --- > clean_shlib = $(call rm,$(call shlib_target,$(1)) $(call lib_target,$(1))) 215c256 < ## make_lib(lib, objects) --- > ## clean_lib(library) 219c260,268 < make_lib = $(AR) r $(1) $(2) --- > clean_lib = $(call rm,$(call shlib_target,$(1)) $(call lib_target,$(1))) > > ##============================================================================== > ## > ## make_lib(library, objects) > ## > ##============================================================================== > > make_lib = $(AR) r $(call lib_target,$(1)) $(2) 228,229c277,278 < $(CXX) $(FLAGS) $(RPATH_OPT) -o \ < $(call bin_target,$(1)) \ --- > $(CXX) $(FLAGS) $(RPATH) -o \ > $(call binary_target,$(1)) \ 231c280 < -L$(LIBDIR) \ --- > $(LDPATH) \ 237c286 < ## make_obj -- create an object file. --- > ## make_obj 261c310,371 < ## VALGRIND --- > ## install_shlib > ## > ##============================================================================== > > install_shlib = \ > $(call cp,$(call shlib_target,$1) $(DESTDIR)$(LIBDIR_OPT)/lib$(1).dylib) > > ##============================================================================== > ## > ## uninstall_shlib > ## > ##============================================================================== > > uninstall_shlib = $(call rm,$(DESTDIR)$(LIBDIR_OPT)/lib$(1).dylib \ > $(DESTDIR)$(LIBDIR_OPT)/lib$(1).a) > > ##============================================================================== > ## > ## install_lib > ## > ##============================================================================== > > install_lib = \ > $(call cp,$(call lib_target,$1) $(DESTDIR)$(LIBDIR_OPT)/lib$(1).a) > > ##============================================================================== > ## > ## uninstall_lib > ## > ##============================================================================== > > uninstall_lib = $(call rm,$(DESTDIR)$(LIBDIR_OPT)/lib$(1).dylib \ > $(DESTDIR)$(LIBDIR_OPT)/lib$(1).a) > > ##============================================================================== > ## > ## install_bin(BINARY) > ## > ##============================================================================== > > install_bin = $(call cp,$(call binary_target,$(1)) \ > $(DESTDIR)$(BINDIR_OPT)/$(1)) > > ##============================================================================== > ## > ## uninstall_bin(BINARY) > ## > ##============================================================================== > > uninstall_bin = $(call rm,$(DESTDIR)$(BINDIR_OPT)/$(1)) > > ##============================================================================== > ## > ## grep(pattern,path) > ## > ##============================================================================== > > grep = $(shell grep -l $(1) $(2)) > > ##============================================================================== > ## > ## ECHONL 265c375 < VALGRIND = valgrind --tool=memcheck --alignment=8 --leak-check=yes --- > ECHONL=@echo "" Index: src/cimple/Array_Impl.cpp =================================================================== RCS file: /home/cvs/cimple/src/cimple/Array_Impl.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -r1.15 -r1.16 168,169c168,172 < _release(rep); < rep = _clone(x->traits, x->data, x->size); --- > if (rep != x) > { > _release(rep); > rep = _clone(x->traits, x->data, x->size); > } Index: src/cimple/Cond.h =================================================================== RCS file: /home/cvs/cimple/src/cimple/Cond.h,v retrieving revision 1.15 retrieving revision 1.16 diff -r1.15 -r1.16 62c62,66 < char _rep[64]; --- > union > { > double alignemnt; > char _rep[128]; > }; Index: src/cimple/Cond_Queue.cpp =================================================================== RCS file: src/cimple/Cond_Queue.cpp diff -N src/cimple/Cond_Queue.cpp 0a1,83 > /* > **============================================================================== > ** > ** Copyright (c) 2003, 2004, 2005, 2006, Michael Brasher, Karl Schopmeyer > ** > ** Permission is hereby granted, free of charge, to any person obtaining a > ** copy of this software and associated documentation files (the "Software"), > ** to deal in the Software without restriction, including without limitation > ** the rights to use, copy, modify, merge, publish, distribute, sublicense, > ** and/or sell copies of the Software, and to permit persons to whom the > ** Software is furnished to do so, subject to the following conditions: > ** > ** The above copyright notice and this permission notice shall be included in > ** all copies or substantial portions of the Software. > ** > ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > ** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE > ** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER > ** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, > ** OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE > ** SOFTWARE. > ** > **============================================================================== > */ > > #include "Cond_Queue.h" > #include "Auto_Mutex.h" > > CIMPLE_NAMESPACE_BEGIN > > Cond_Queue::Cond_Queue(size_t max_size) : > _size(0), _head(0), _tail(0), _max_size(max_size) > { > if (max_size <= MAX_AUTO_ELEMENTS) > _data = _auto_data; > else > _data = new void*[max_size]; > } > > Cond_Queue::~Cond_Queue() > { > if (_data != _auto_data) > delete [] _data; > } > > void Cond_Queue::enqueue(void* entry) > { > Auto_Mutex auto_mutex(_lock); > > while (_size == _max_size) > _not_full.wait(_lock); > > _data[_tail++] = entry; > > if (_tail == _max_size) > _tail = 0; > > _size++; > > _not_empty.signal(); > } > > void* Cond_Queue::dequeue() > { > Auto_Mutex auto_mutex(_lock); > > while (_size == 0) > _not_empty.wait(_lock); > > void* entry = _data[_head++]; > > if (_head == _max_size) > _head = 0; > > _size--; > > _not_full.signal(); > > return entry; > } > > CIMPLE_NAMESPACE_END Index: src/cimple/Cond_Queue.h =================================================================== RCS file: src/cimple/Cond_Queue.h diff -N src/cimple/Cond_Queue.h 0a1,75 > /* > **============================================================================== > ** > ** Copyright (c) 2003, 2004, 2005, 2006, Michael Brasher, Karl Schopmeyer > ** > ** Permission is hereby granted, free of charge, to any person obtaining a > ** copy of this software and associated documentation files (the "Software"), > ** to deal in the Software without restriction, including without limitation > ** the rights to use, copy, modify, merge, publish, distribute, sublicense, > ** and/or sell copies of the Software, and to permit persons to whom the > ** Software is furnished to do so, subject to the following conditions: > ** > ** The above copyright notice and this permission notice shall be included in > ** all copies or substantial portions of the Software. > ** > ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > ** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE > ** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER > ** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, > ** OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE > ** SOFTWARE. > ** > **============================================================================== > */ > > #ifndef _cimple_Cond_Queue_h > #define _cimple_Cond_Queue_h > > #include "config.h" > #include "Cond.h" > > CIMPLE_NAMESPACE_BEGIN > > /** This class provides a thread-safe queue implementation so that threads > may exchange data. The dequeue() function blocks until an entry is > available. The enqueue() method blocks until there are less than > max_size elements. > */ > class CIMPLE_CIMPLE_LINKAGE Cond_Queue > { > public: > > Cond_Queue(size_t max_size); > > ~Cond_Queue(); > > void enqueue(void* entry); > > void* dequeue(); > > private: > > Cond_Queue(const Cond_Queue&); > Cond_Queue& operator=(const Cond_Queue&); > > enum { MAX_AUTO_ELEMENTS = 8 }; > > // Used instead of heap memory when max_size <= MAX_AUTO_ELEMENTS. > void* _auto_data[MAX_AUTO_ELEMENTS]; > > void** _data; > size_t _size; > size_t _head; > size_t _tail; > size_t _max_size; > > Mutex _lock; > Cond _not_empty; > Cond _not_full; > }; > > CIMPLE_NAMESPACE_END > > #endif /* _cimple_Cond_Queue_h */ Index: src/cimple/Makefile =================================================================== RCS file: /home/cvs/cimple/src/cimple/Makefile,v retrieving revision 1.209 retrieving revision 1.210 diff -r1.209 -r1.210 8a9 > Cond_Queue.cpp \ Index: src/cimple/Mutex.cpp =================================================================== RCS file: /home/cvs/cimple/src/cimple/Mutex.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -r1.14 -r1.15 29a30 > #include 39d39 < Magic<0x482A8C83> magic; 46a47 > Magic<0x482A8C83> magic; 51c52 < CIMPLE_ASSERT(sizeof(MutexRep) <= sizeof(_rep)); --- > assert(sizeof(MutexRep) <= sizeof(_rep)); 53a55 > memset(rep, 0, sizeof(MutexRep)); 58d59 < memset(rep, 0, sizeof(MutexRep)); Index: src/cimple/Registration.h =================================================================== RCS file: /home/cvs/cimple/src/cimple/Registration.h,v retrieving revision 1.43 retrieving revision 1.44 diff -r1.43 -r1.44 165a166,193 > // These entry points are for brokers that use the classname > // as the provider name. > > #define __CIMPLE_CMPI_PROVIDER2(TYPE,TYPE_NAME,PROVIDER,CLASS) \ > extern "C" CIMPLE_EXPORT void* CLASS##_Create_##TYPE_NAME##MI( \ > void* cmpi_broker, \ > void* cmpi_context, \ > void* cmpi_status) \ > { \ > return PROVIDER##_Create_##TYPE_NAME##MI( \ > cmpi_broker, \ > cmpi_context, \ > cmpi_status); \ > } > > #define CIMPLE_CMPI_INSTANCE_PROVIDER2(PROVIDER,CLASS) \ > __CIMPLE_CMPI_PROVIDER2('I', Instance, PROVIDER, CLASS) \ > __CIMPLE_CMPI_PROVIDER2('M', Method, PROVIDER, CLASS) > > #define CIMPLE_CMPI_ASSOCIATION_PROVIDER2(PROVIDER, CLASS) \ > __CIMPLE_CMPI_PROVIDER2('I', Instance, PROVIDER, CLASS) \ > __CIMPLE_CMPI_PROVIDER2('M', Method, PROVIDER, CLASS) \ > __CIMPLE_CMPI_PROVIDER2('A', Association, PROVIDER, CLASS) > > #define CIMPLE_CMPI_INDICATION_PROVIDER2(PROVIDER, CLASS) \ > __CIMPLE_CMPI_PROVIDER2('M', Method, PROVIDER, CLASS) \ > __CIMPLE_CMPI_PROVIDER2('N', Indication, PROVIDER, CLASS) > Index: src/cimple/config.h =================================================================== RCS file: /home/cvs/cimple/src/cimple/config.h,v retrieving revision 1.103 retrieving revision 1.106 diff -r1.103 -r1.106 360c360 < #define CIMPLE_REVISION 0 --- > #define CIMPLE_REVISION 4 Index: src/cimple/tests/Makefile =================================================================== RCS file: /home/cvs/cimple/src/cimple/tests/Makefile,v retrieving revision 1.50 retrieving revision 1.51 diff -r1.50 -r1.51 16c16,17 < datetime --- > datetime \ > cond_queue Index: src/cimple/tests/array/main.cpp =================================================================== RCS file: /home/cvs/cimple/src/cimple/tests/array/main.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -r1.9 -r1.10 164a165,174 > > Array_String x; > x = w; > > Array_String y; > y.append("junk"); > y = w; > > Array_String xx(y); > 191a202,209 > > Array y; > y = x; > x = y; > > Array z; > z.append(true); > z = y; Index: src/cmpi/adapter/CMPI_Adapter.cpp =================================================================== RCS file: /home/cvs/cimple/src/cmpi/adapter/CMPI_Adapter.cpp,v retrieving revision 1.75 retrieving revision 1.76 diff -r1.75 -r1.76 149,153d148 < < #if defined(CIMPLE_HAVE_CMPI_ENUM_INSTANCES_BUG) < sd->instance_ft.enumInstanceNames = CMPI_Adapter::enumInstanceNames; < sd->instance_ft.enumInstances = CMPI_Adapter::enumInstances; < #else 156,157d150 < #endif < 160,161d152 < < #if defined(CIMPLE_HAVE_CMPI_MODIFY_INSTANCE_BUG) 163,166d153 < #else < sd->instance_ft.setInstance = CMPI_Adapter::modifyInstance; < #endif < Index: src/cmpi/adapter/CMPI_Thread_Context.cpp =================================================================== RCS file: /home/cvs/cimple/src/cmpi/adapter/CMPI_Thread_Context.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -r1.21 -r1.22 48,52c48 < #if defined(CIMPLE_HAVE_CMPI_ENUM_INSTANCES_BUG) < return (mb->bft->enumInstances (mb, ctx, op, properties, rc)); < #else < return (mb->bft->enumerateInstances (mb, ctx, op, properties, rc)); < #endif --- > return (mb->bft->enumerateInstances(mb, ctx, op, properties, rc)); 61d56 < #if defined(CIMPLE_HAVE_CMPI_MODIFY_INSTANCE_BUG) 63,65d57 < #else < return (mb->bft->setInstance(mb, ctx, op, inst, NULL)); < #endif Index: src/cmpi/adapter/Makefile =================================================================== RCS file: /home/cvs/cimple/src/cmpi/adapter/Makefile,v retrieving revision 1.49 retrieving revision 1.50 diff -r1.49 -r1.50 20,27d19 < ifeq ($(CMPI_ENUM_INSTANCES_BUG_OPT),1) < DEFINES += -DCIMPLE_HAVE_CMPI_ENUM_INSTANCES_BUG < endif < < ifeq ($(CMPI_MODIFY_INSTANCE_BUG_OPT),1) < DEFINES += -DCIMPLE_HAVE_CMPI_MODIFY_INSTANCE_BUG < endif < Index: src/cmpi/adapter/cmpi.h =================================================================== RCS file: /home/cvs/cimple/src/cmpi/adapter/cmpi.h,v retrieving revision 1.1 retrieving revision 1.3 diff -r1.1 -r1.3 39a40,41 > #elif defined(CIMPLE_PLATFORM_SOLARIS_SPARC_GNU) > # define CMPI_PLATFORM_SOLARIS_SPARC_GNU 1 41a44,45 > #define enumInstances enumerateInstances > #define enumInstanceNames enumerateInstanceNames Index: src/providers/Makefile =================================================================== RCS file: /home/cvs/cimple/src/providers/Makefile,v retrieving revision 1.64 retrieving revision 1.65 diff -r1.64 -r1.65 31a32 > Employee/ci \ Index: src/providers/Employee/ci/Makefile =================================================================== RCS file: src/providers/Employee/ci/Makefile diff -N src/providers/Employee/ci/Makefile 0a1,14 > TOP = ../../../.. > include $(TOP)/mak/config.mak > > BINARY = call_ci_employee > > SOURCES = main.cpp > > LIBRARIES = cimple pegclient pegcommon > > include $(TOP)/mak/pegasus.mak > include $(TOP)/mak/rules.mak > > live: > $(TARGET) Index: src/providers/Employee/ci/main.cpp =================================================================== RCS file: src/providers/Employee/ci/main.cpp diff -N src/providers/Employee/ci/main.cpp 0a1,72 > /* > **============================================================================== > ** > ** Copyright (c) 2003, 2004, 2005, 2006, Michael Brasher, Karl Schopmeyer > ** > ** Permission is hereby granted, free of charge, to any person obtaining a > ** copy of this software and associated documentation files (the "Software"), > ** to deal in the Software without restriction, including without limitation > ** the rights to use, copy, modify, merge, publish, distribute, sublicense, > ** and/or sell copies of the Software, and to permit persons to whom the > ** Software is furnished to do so, subject to the following conditions: > ** > ** The above copyright notice and this permission notice shall be included in > ** all copies or substantial portions of the Software. > ** > ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > ** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE > ** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER > ** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, > ** OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE > ** SOFTWARE. > ** > **============================================================================== > */ > > #include > #include > #include > > PEGASUS_USING_PEGASUS; > PEGASUS_USING_STD; > > #define CIMPLE_TRACE printf("%d\n", __LINE__) > > int main(int argc, char** argv) > { > try > { > CIMClient client; > client.connectLocal(); > > // Define object path: > > CIMObjectPath cop("Employee.Id=4004"); > CIMInstance ci("Employee"); > ci.setPath(cop); > > ci.addProperty(CIMProperty("Id", Uint32(4004))); > ci.addProperty(CIMProperty("First", String("Michael"))); > ci.addProperty(CIMProperty("Last", String("Jackson"))); > ci.addProperty(CIMProperty("Gender", Uint32(1))); > ci.addProperty(CIMProperty("Active", Boolean(true))); > > // Invoke the method: > > const String NAMESPACE = "root/cimv2"; > > CIMObjectPath cop2 = client.createInstance(NAMESPACE, ci); > > assert(cop.toString() == cop2.toString()); > } > catch(Exception& e) > { > PEGASUS_STD(cerr) << "Error: " << e.getMessage() << PEGASUS_STD(endl); > exit(1); > } > > PEGASUS_STD(cout) << "+++++ passed all tests" << PEGASUS_STD(endl); > > return 0; > } Index: src/providers/Lamp/module.cpp =================================================================== RCS file: /home/cvs/cimple/src/providers/Lamp/module.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -r1.13 -r1.14 3c3 < // PLEASE DO NOT EDIT; THIS FILE WAS AUTOMATICALLY GENERATED BY GENMOD 1.0.22 --- > // PLEASE DO NOT EDIT; THIS FILE WAS AUTOMATICALLY GENERATED BY GENMOD 1.2.1 122a123 > CIMPLE_CMPI_INSTANCE_PROVIDER2(Lamp_Provider, Lamp); 123a125 > CIMPLE_CMPI_INDICATION_PROVIDER2(LampIndic_Provider, LampIndic); 124a127 > CIMPLE_CMPI_ASSOCIATION_PROVIDER2(LampLink_Provider, LampLink); Index: src/providers/Person/Makefile =================================================================== RCS file: /home/cvs/cimple/src/providers/Person/Makefile,v retrieving revision 1.75 retrieving revision 1.78 diff -r1.75 -r1.78 20c20,21 < CIMPLE_PEGASUS_MODULE=1 --- > #CIMPLE_PEGASUS_MODULE=1 > CIMPLE_CMPI_MODULE=1 Index: src/providers/Person/module.cpp =================================================================== RCS file: /home/cvs/cimple/src/providers/Person/module.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -r1.22 -r1.23 3c3 < // PLEASE DO NOT EDIT; THIS FILE WAS AUTOMATICALLY GENERATED BY GENMOD 1.0.22 --- > // PLEASE DO NOT EDIT; THIS FILE WAS AUTOMATICALLY GENERATED BY GENMOD 1.2.1 131a132 > CIMPLE_CMPI_INSTANCE_PROVIDER2(Person_Provider, Person); 132a134 > CIMPLE_CMPI_ASSOCIATION_PROVIDER2(PersonLink_Provider, PersonLink); 133a136 > CIMPLE_CMPI_INSTANCE_PROVIDER2(Salesman_Provider, Salesman); 134a138 > CIMPLE_CMPI_ASSOCIATION_PROVIDER2(SalesmanLink_Provider, SalesmanLink); Index: src/tools/catmod/Makefile =================================================================== RCS file: /home/cvs/cimple/src/tools/catmod/Makefile,v retrieving revision 1.7 retrieving revision 1.8 diff -r1.7 -r1.8 3a4,5 > INSTALL=1 > 4a7 > 6c9,12 < LIBRARIES = cimple --- > > LIBRARIES = cimpleutil cimple > > INCLUDES += -I$(SRC_DIR)/mof 8a15,17 > > usage: > $(BINDIR)/file2c usage.txt -n USAGE > usage.h Index: src/tools/catmod/main.cpp =================================================================== RCS file: /home/cvs/cimple/src/tools/catmod/main.cpp,v retrieving revision 1.20 retrieving revision 1.22 diff -r1.20 -r1.22 1,4d0 < #include < #include < #include < #include 5a2,5 > #include > #include > #include > #include 6a7 > using namespace std; 9,11c10,20 < const char* arg0; < < void process(const char* path) --- > //------------------------------------------------------------------------------ > // > // load_module() > // > //------------------------------------------------------------------------------ > > cimple::Registration* load_module( > const string& path, > const cimple::Meta_Class* const*& meta_classes, > size_t& num_meta_classes, > void*& handle) 13,14d21 < printf("%s:\n", path); < 17c24 < void* handle = dlopen(path, RTLD_NOW | RTLD_GLOBAL); --- > handle = dlopen(path.c_str(), RTLD_NOW | RTLD_GLOBAL); 20,23c27 < { < fprintf(stderr, "%s: %s\n", arg0, dlerror()); < return; < } --- > err("cannot load library: %s: %s", path.c_str(), dlerror()); 28c32,33 < Module_Proc module_proc = (Module_Proc)dlsym(handle, SYMBOL); --- > cimple::Module_Proc module_proc = > (cimple::Module_Proc)dlsym(handle, SYMBOL); 32,34c37,38 < fprintf(stderr, "%s: %s\n", arg0, dlerror()); < dlclose(handle); < return; --- > err("cannot find symbol \"%s\" in library %s: %s", > SYMBOL, path.c_str(), dlerror()); 37c41,45 < // Dump information about the module. --- > // Call proc: > > cimple::Registration* reg = module_proc(); > > // Get the meta-repository 39,40c47 < for (const Registration* p = (*module_proc)(); p; p = p->next) < printf(" provider(%s, %s)\n", p->provider_name, p->meta_class->name); --- > cimple::Provider_Handle prov_handle(reg); 42c49,63 < return; --- > const cimple::Meta_Repository* mr = 0; > cimple::Get_Repository_Status status = prov_handle.get_repository(mr); > > if (mr == 0) > { > err("Provider is missing meta class repository. This probably means " > "the -r option was not used when the provider class was generated " > "with genclass. Try \"genclass -r \" and remember to " > "link in the repository.cpp that it generates."); > } > > meta_classes = mr->meta_classes; > num_meta_classes = mr->num_meta_classes; > > return reg; 47c68 < arg0 = argv[0]; --- > set_arg0(argv[0]); 49c70,72 < if (argc < 2) --- > // Check arguments. > > if (argc != 2) 51c74 < fprintf(stderr, "Usage: %s module-library ...\n", argv[0]); --- > fprintf(stderr, "\nUsage: %s PROVIDER-MODULE-LIBRARY\n\n", argv[0]); 55,56c78,178 < for (int i = 1; i < argc; i++) < process(argv[i]); --- > // Get information from provider. > > const cimple::Meta_Class* const* meta_classes; > size_t num_meta_classes; > void* handle; > > cimple::Registration* module = load_module( > argv[1], meta_classes, num_meta_classes, handle); > > // If no modules in this library. > > if (!module) > err("module contains no providers: %s", argv[1]); > > // Print out registration information: > > printf("\n=== Providers:\n"); > > for (cimple::Registration* p = module; p; p = p->next) > { > const char* pt = "instance"; > > if (p->meta_class->flags & CIMPLE_FLAG_ASSOCIATION) > { > pt = "association"; > } > else if (p->meta_class->flags & CIMPLE_FLAG_INDICATION) > { > pt = "indication"; > } > > printf(" [%s:%s:%s:%s]\n", > p->module_name, p->provider_name, pt, p->meta_class->name); > } > > printf("\n=== Entry points:\n"); > > if (dlsym(handle, "PegasusCreateProvider")) > { > printf(" PegasusCreateProvider()\n"); > } > > for (cimple::Registration* p = module; p; p = p->next) > { > const char* pt = "Instance"; > const char* cn = p->meta_class->name; > const char* pn = p->provider_name; > > if (p->meta_class->flags & CIMPLE_FLAG_ASSOCIATION) > { > pt = "Association"; > } > else if (p->meta_class->flags & CIMPLE_FLAG_INDICATION) > { > pt = "Indication"; > } > > { > char buffer[1024]; > sprintf(buffer, "%s_Create_%sMI", pn, pt); > > if (dlsym(handle, buffer)) > printf(" %s()\n", buffer); > > sprintf(buffer, "%s_Create_MethodMI", pn); > > if (dlsym(handle, buffer)) > printf(" %s()\n", buffer); > } > } > > for (cimple::Registration* p = module; p; p = p->next) > { > const char* pt = "Instance"; > const char* cn = p->meta_class->name; > const char* pn = p->provider_name; > > if (p->meta_class->flags & CIMPLE_FLAG_ASSOCIATION) > { > pt = "Association"; > } > else if (p->meta_class->flags & CIMPLE_FLAG_INDICATION) > { > pt = "Indication"; > } > > { > char buffer[1024]; > sprintf(buffer, "%s_Create_%sMI", cn, pt); > > if (dlsym(handle, buffer)) > printf(" %s()\n", buffer); > > sprintf(buffer, "%s_Create_MethodMI", cn); > > if (dlsym(handle, buffer)) > printf(" %s()\n", buffer); > } > } > > printf("\n"); 60d181 < Index: src/tools/genclass/main.cpp =================================================================== RCS file: /home/cvs/cimple/src/tools/genclass/main.cpp,v retrieving revision 1.154 retrieving revision 1.155 diff -r1.154 -r1.155 32a33 > #include Index: src/tools/genmod/main.cpp =================================================================== RCS file: /home/cvs/cimple/src/tools/genmod/main.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -r1.11 -r1.12 233,234c233,237 < fprintf(os, " CIMPLE_CMPI_INDICATION_PROVIDER(%s_Provider);\n", < cn); --- > fprintf(os, > " CIMPLE_CMPI_INDICATION_PROVIDER(%s_Provider);\n", cn); > fprintf(os, > " CIMPLE_CMPI_INDICATION_PROVIDER2(%s_Provider, %s);\n", > cn, cn); 238c241,242 < fprintf(os, " CIMPLE_CMPI_ASSOCIATION_PROVIDER(%s_Provider);\n", --- > fprintf(os, > " CIMPLE_CMPI_ASSOCIATION_PROVIDER(%s_Provider);\n", 239a244,246 > fprintf(os, > " CIMPLE_CMPI_ASSOCIATION_PROVIDER2(%s_Provider, %s);\n", > cn, cn); 243c250,253 < fprintf(os, " CIMPLE_CMPI_INSTANCE_PROVIDER(%s_Provider);\n", cn); --- > fprintf(os, > " CIMPLE_CMPI_INSTANCE_PROVIDER(%s_Provider);\n", cn); > fprintf(os, > " CIMPLE_CMPI_INSTANCE_PROVIDER2(%s_Provider, %s);\n", cn, cn); Index: src/tools/genproj/main.cpp =================================================================== RCS file: /home/cvs/cimple/src/tools/genproj/main.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -r1.6 -r1.7 18a19 > static bool enum_opt = false; 98a100,102 > if (enum_opt) > cmd += " -e"; > 210c214 < while ((opt = getopt(argc, argv, "hVmf")) != -1) --- > while ((opt = getopt(argc, argv, "hVmfe")) != -1) 237a242,247 > case 'e': > { > enum_opt = true; > break; > } > Index: src/tools/genproj/usage.txt =================================================================== RCS file: /home/cvs/cimple/src/tools/genproj/usage.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -r1.2 -r1.3 12a13,14 > -e -- Generate enum tags for Values/ValueMap qualifiers (passed to > genclass).