BUG#: 5840 RELEASE_2_6_0-FC
authorkumpf <kumpf>
Fri, 10 Nov 2006 18:14:57 +0000 (18:14 +0000)
committerkumpf <kumpf>
Fri, 10 Nov 2006 18:14:57 +0000 (18:14 +0000)
TITLE: Common modules do not meet chksrc requirements
DESCRIPTION: Remove tab characters and author names and shorten lines that are wider than 80 characters.

218 files changed:
src/Pegasus/Common/AcceptLanguageList.cpp
src/Pegasus/Common/AcceptLanguageList.h
src/Pegasus/Common/AnonymousPipe.h
src/Pegasus/Common/AnonymousPipePOSIX.cpp
src/Pegasus/Common/AnonymousPipeWindows.cpp
src/Pegasus/Common/Array.cpp
src/Pegasus/Common/ArrayInternal.h
src/Pegasus/Common/ArrayRep.h
src/Pegasus/Common/AsyncQueue.cpp
src/Pegasus/Common/AtomicInt.cpp
src/Pegasus/Common/Attribute.cpp
src/Pegasus/Common/Attribute.h
src/Pegasus/Common/AuditLogger.cpp
src/Pegasus/Common/AuditLogger.h
src/Pegasus/Common/AuthenticationInfo.h
src/Pegasus/Common/AuthenticationInfoRep.h
src/Pegasus/Common/AutoPtr.h
src/Pegasus/Common/AutoStreamer.h
src/Pegasus/Common/Base64.h
src/Pegasus/Common/BinaryStreamer.cpp
src/Pegasus/Common/Boolean.h
src/Pegasus/Common/CIMClass.h
src/Pegasus/Common/CIMClassRep.cpp
src/Pegasus/Common/CIMDateTime.cpp
src/Pegasus/Common/CIMDateTime.h
src/Pegasus/Common/CIMExceptionRep.h
src/Pegasus/Common/CIMFlavor.cpp
src/Pegasus/Common/CIMInstance.cpp
src/Pegasus/Common/CIMInstanceRep.cpp
src/Pegasus/Common/CIMMessageDeserializer.cpp
src/Pegasus/Common/CIMMessageDeserializer.h
src/Pegasus/Common/CIMMessageSerializer.cpp
src/Pegasus/Common/CIMMessageSerializer.h
src/Pegasus/Common/CIMMethod.cpp
src/Pegasus/Common/CIMMethod.h
src/Pegasus/Common/CIMMethodRep.cpp
src/Pegasus/Common/CIMNameInline.cpp
src/Pegasus/Common/CIMNameInline.h
src/Pegasus/Common/CIMObject.cpp
src/Pegasus/Common/CIMObjectPath.cpp
src/Pegasus/Common/CIMObjectRep.cpp
src/Pegasus/Common/CIMParamValue.cpp
src/Pegasus/Common/CIMParamValueRep.cpp
src/Pegasus/Common/CIMParameter.cpp
src/Pegasus/Common/CIMParameterRep.cpp
src/Pegasus/Common/CIMProperty.cpp
src/Pegasus/Common/CIMPropertyList.cpp
src/Pegasus/Common/CIMPropertyRep.cpp
src/Pegasus/Common/CIMQualifier.cpp
src/Pegasus/Common/CIMQualifierDecl.cpp
src/Pegasus/Common/CIMQualifierDecl.h
src/Pegasus/Common/CIMQualifierDeclRep.cpp
src/Pegasus/Common/CIMQualifierList.cpp
src/Pegasus/Common/CIMQualifierList.h
src/Pegasus/Common/CIMQualifierNames.cpp
src/Pegasus/Common/CIMQualifierNames.h
src/Pegasus/Common/CIMQualifierRep.cpp
src/Pegasus/Common/CIMServerDescription.cpp
src/Pegasus/Common/CIMServerDescription.h
src/Pegasus/Common/CIMStatusCode.cpp
src/Pegasus/Common/CIMType.cpp
src/Pegasus/Common/CIMType.h
src/Pegasus/Common/CIMValueInline.cpp
src/Pegasus/Common/Char16.cpp
src/Pegasus/Common/CharSet.cpp
src/Pegasus/Common/Cimom.cpp
src/Pegasus/Common/CommonUTF.cpp
src/Pegasus/Common/Condition.cpp
src/Pegasus/Common/Condition.h
src/Pegasus/Common/Config.cpp
src/Pegasus/Common/Config.h
src/Pegasus/Common/ContentLanguageList.cpp
src/Pegasus/Common/DeclContext.cpp
src/Pegasus/Common/Dir.cpp
src/Pegasus/Common/Dir.h
src/Pegasus/Common/DynamicLibraryHPUX.cpp
src/Pegasus/Common/DynamicLibraryPOSIX.cpp
src/Pegasus/Common/DynamicLibraryWindows.cpp
src/Pegasus/Common/Exception.cpp
src/Pegasus/Common/Exception.h
src/Pegasus/Common/ExceptionRep.h
src/Pegasus/Common/FileSystem.cpp
src/Pegasus/Common/FileSystem.h
src/Pegasus/Common/Formatter.cpp
src/Pegasus/Common/Formatter.h
src/Pegasus/Common/HTTPAcceptor.cpp
src/Pegasus/Common/HTTPAcceptor.h
src/Pegasus/Common/HTTPConnection.cpp
src/Pegasus/Common/HTTPConnection.h
src/Pegasus/Common/HTTPConnector.cpp
src/Pegasus/Common/HTTPMessage.h
src/Pegasus/Common/IPCExceptions.h
src/Pegasus/Common/IndicationFormatter.cpp
src/Pegasus/Common/InternalException.cpp
src/Pegasus/Common/InternalException.h
src/Pegasus/Common/LanguageParser.cpp
src/Pegasus/Common/LanguageParser.h
src/Pegasus/Common/LanguageTag.cpp
src/Pegasus/Common/Linkable.h
src/Pegasus/Common/List.cpp
src/Pegasus/Common/List.h
src/Pegasus/Common/LoadAndClearWord_HPUX_PARISC_ACC.s
src/Pegasus/Common/Logger.cpp
src/Pegasus/Common/Logger.h
src/Pegasus/Common/Magic.h
src/Pegasus/Common/Makefile
src/Pegasus/Common/Memory.cpp
src/Pegasus/Common/Memory.h
src/Pegasus/Common/Message.cpp
src/Pegasus/Common/Message.h
src/Pegasus/Common/MessageLoader.cpp
src/Pegasus/Common/MessageLoader.h
src/Pegasus/Common/MessageQueue.cpp
src/Pegasus/Common/MessageQueueService.cpp
src/Pegasus/Common/MessageQueueService.h
src/Pegasus/Common/ModuleController.cpp
src/Pegasus/Common/ModuleController.h
src/Pegasus/Common/MofWriter.cpp
src/Pegasus/Common/MofWriter.h
src/Pegasus/Common/Monitor.cpp
src/Pegasus/Common/Monitor.h
src/Pegasus/Common/Network.h
src/Pegasus/Common/ObjectNormalizer.cpp
src/Pegasus/Common/ObjectNormalizer.h
src/Pegasus/Common/ObjectStreamer.h
src/Pegasus/Common/Once.cpp
src/Pegasus/Common/Once.h
src/Pegasus/Common/OperationContext.cpp
src/Pegasus/Common/OperationContext.h
src/Pegasus/Common/OperationContextInternal.cpp
src/Pegasus/Common/OperationContextInternal.h
src/Pegasus/Common/OptionManager.cpp
src/Pegasus/Common/OptionManager.h
src/Pegasus/Common/Packer.cpp
src/Pegasus/Common/Packer.h
src/Pegasus/Common/Pair.cpp
src/Pegasus/Common/Pair.h
src/Pegasus/Common/PegasusAssert.h
src/Pegasus/Common/PegasusVersion.h
src/Pegasus/Common/Platform_OS400_ISERIES_IBM.h
src/Pegasus/Common/Platform_VMS.h
src/Pegasus/Common/Platform_VMS_ALPHA_DECCXX.h
src/Pegasus/Common/Platform_VMS_IA64_DECCXX.h
src/Pegasus/Common/Platform_WIN32_IX86_MSVC.h
src/Pegasus/Common/Platform_ZOS_ZSERIES_IBM.h
src/Pegasus/Common/PropertyAccessor.cpp
src/Pegasus/Common/PropertyAccessor.h
src/Pegasus/Common/QueryExpressionRep.cpp
src/Pegasus/Common/QueryExpressionRep.h
src/Pegasus/Common/ReadWriteSem.cpp
src/Pegasus/Common/ReadWriteSem.h
src/Pegasus/Common/Resolver.cpp
src/Pegasus/Common/Resolver.h
src/Pegasus/Common/ResponseHandler.cpp
src/Pegasus/Common/ResponseHandlerRep.cpp
src/Pegasus/Common/ResponseHandlerRep.h
src/Pegasus/Common/SSLContext.cpp
src/Pegasus/Common/SSLContext.h
src/Pegasus/Common/SSLContextManager.cpp
src/Pegasus/Common/SSLContextManager.h
src/Pegasus/Common/SSLContextRep.h
src/Pegasus/Common/Semaphore.cpp
src/Pegasus/Common/Semaphore.h
src/Pegasus/Common/Sharable.cpp
src/Pegasus/Common/Sharable.h
src/Pegasus/Common/Signal.cpp
src/Pegasus/Common/Signal.h
src/Pegasus/Common/Socket.cpp
src/Pegasus/Common/Socket.h
src/Pegasus/Common/SocketzOS_inline.h
src/Pegasus/Common/SpinLock.cpp
src/Pegasus/Common/SpinLock.h
src/Pegasus/Common/Stack.cpp
src/Pegasus/Common/Stack.h
src/Pegasus/Common/StatisticalData.cpp
src/Pegasus/Common/StatisticalData.h
src/Pegasus/Common/Stopwatch.cpp
src/Pegasus/Common/Stopwatch.h
src/Pegasus/Common/StrLit.h
src/Pegasus/Common/String.cpp
src/Pegasus/Common/String.h
src/Pegasus/Common/StringInline.h
src/Pegasus/Common/StringRep.h
src/Pegasus/Common/System.cpp
src/Pegasus/Common/System.h
src/Pegasus/Common/SystemPOSIX.cpp
src/Pegasus/Common/SystemWindows.cpp
src/Pegasus/Common/TLS.cpp
src/Pegasus/Common/TLS.h
src/Pegasus/Common/TSDKey.cpp
src/Pegasus/Common/TSDKey.h
src/Pegasus/Common/Thread.cpp
src/Pegasus/Common/Thread.h
src/Pegasus/Common/ThreadPool.cpp
src/Pegasus/Common/ThreadPool.h
src/Pegasus/Common/Threads.cpp
src/Pegasus/Common/Threads.h
src/Pegasus/Common/Time.cpp
src/Pegasus/Common/TimeValue.cpp
src/Pegasus/Common/TimeValue.h
src/Pegasus/Common/TraceComponents.h
src/Pegasus/Common/TraceFileHandler.cpp
src/Pegasus/Common/TraceFileHandler.h
src/Pegasus/Common/TraceFileHandlerPOSIX.cpp
src/Pegasus/Common/TraceFileHandlerWindows.cpp
src/Pegasus/Common/Tracer.cpp
src/Pegasus/Common/Tracer.h
src/Pegasus/Common/Union.cpp
src/Pegasus/Common/Union.h
src/Pegasus/Common/XmlConstants.h
src/Pegasus/Common/XmlParser.cpp
src/Pegasus/Common/XmlParser.h
src/Pegasus/Common/XmlReader.cpp
src/Pegasus/Common/XmlReader.h
src/Pegasus/Common/XmlStreamer.cpp
src/Pegasus/Common/XmlStreamer.h
src/Pegasus/Common/XmlWriter.cpp
src/Pegasus/Common/XmlWriter.h

index 304ed0ba96d74ef56a9c0c6a27317f0b4199acbf..220bb7edfd295456eb0cc4fb1df6f4970ce876c5 100755 (executable)
 //
 //==============================================================================
 //
-// Author: Humberto Rivero (hurivero@us.ibm.com)
-//
-// Modified By: Aruran, IBM (ashanmug@in.ibm.com) for Bug# 3514
-//              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include <Pegasus/Common/AcceptLanguageList.h>
index fabe34889f4d23efc73c6f26f103fcd174e41440..76e2306094d9ca13f472fad2431f2b23e6cbaf30 100755 (executable)
@@ -117,7 +117,7 @@ public:
         Real32 qualityValue);
 
     /**
-        Removes the specified LanguageTag and quality value from the 
+        Removes the specified LanguageTag and quality value from the
         AcceptLanguageList object.
         @param index Integer index of the element to remove.
         @exception IndexOutOfBoundsException If the specified index is out of
index ff5580130b8e8949b1ea1c799e06d2df87765e4d..143635b84d5c9411fd5edb807b4f008d73063fa9 100644 (file)
 //
 //==============================================================================
 //
-// Author: Carol Ann Krug Graves, Hewlett-Packard Company
-//             (carolann_graves@hp.com)
-//
-// Modified By: David Dillard, VERITAS Software Corp.
-//                  (david.dillard@veritas.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_AnonymousPipe_h
@@ -48,7 +42,7 @@
 
 PEGASUS_NAMESPACE_BEGIN
 
-/** 
+/**
     The AnonymousPipe class implements an anonymous pipe.
 
     @author  Hewlett-Packard Company
@@ -68,14 +62,14 @@ public:
         Constructs an AnonymousPipe instance, given the read and/or write handle
         in char form.
 
-        NOTE: before using this form of the constructor, the pipe must already 
-        exist (a previous invocation of the AnonymousPipe () form of the 
-        constructor), and the specified handle(s) should be open for the 
-        specified operation (read or write).  The read or write handle 
-        should be obtained via a call to exportReadHandle () or 
+        NOTE: before using this form of the constructor, the pipe must already
+        exist (a previous invocation of the AnonymousPipe () form of the
+        constructor), and the specified handle(s) should be open for the
+        specified operation (read or write).  The read or write handle
+        should be obtained via a call to exportReadHandle () or
         exportWriteHandle (), respectively.
 
-        @param   readHandle       char [] representation of the read handle to 
+        @param   readHandle       char [] representation of the read handle to
                                     the pipe
         @param   writeHandle      char [] representation of the write handle to
                                     the pipe
@@ -97,19 +91,19 @@ public:
         Defines symbolic constants for return values from read and write
         methods.
     */
-    enum Status {STATUS_INTERRUPT = -2, 
-                 STATUS_ERROR     = -1, 
-                 STATUS_CLOSED    =  0, 
+    enum Status {STATUS_INTERRUPT = -2,
+                 STATUS_ERROR     = -1,
+                 STATUS_CLOSED    =  0,
                  STATUS_SUCCESS   =  1};
 
     /**
-        Writes data from a buffer to the AnonymousPipe.  
+        Writes data from a buffer to the AnonymousPipe.
 
         @param   buffer           pointer to the input data buffer
         @param   bytesToWrite     Number of bytes to write
 
-        @return  STATUS_SUCCESS   on success; 
-                 STATUS_CLOSED    on closed connection; 
+        @return  STATUS_SUCCESS   on success;
+                 STATUS_CLOSED    on closed connection;
                  STATUS_ERROR     on error;
     */
     Status writeBuffer (
@@ -117,27 +111,27 @@ public:
         Uint32 bytesToWrite);
 
     /**
-        Writes a CIM message to the AnonymousPipe.  
+        Writes a CIM message to the AnonymousPipe.
 
         The message is serialized, then written to the pipe.
 
         @param   message          pointer to the message
 
-        @return  STATUS_SUCCESS   on success; 
-                 STATUS_CLOSED    on closed connection; 
+        @return  STATUS_SUCCESS   on success;
+                 STATUS_CLOSED    on closed connection;
                  STATUS_ERROR     on error;
     */
     Status writeMessage (
         CIMMessage * message);
 
     /**
-        Reads data into a buffer from the AnonymousPipe.  
+        Reads data into a buffer from the AnonymousPipe.
 
         @param   buffer           pointer to the output data buffer
         @param   bytesToRead      Number of bytes to read
 
-        @return  STATUS_SUCCESS   on success; 
-                 STATUS_CLOSED    on closed connection; 
+        @return  STATUS_SUCCESS   on success;
+                 STATUS_CLOSED    on closed connection;
                  STATUS_ERROR     on error;
                  STATUS_INTERRUPT on interrupt
     */
@@ -146,14 +140,14 @@ public:
         Uint32 bytesToRead);
 
     /**
-        Reads a CIM message from the AnonymousPipe.  
+        Reads a CIM message from the AnonymousPipe.
 
         A message is read from the pipe, then de-serialized.
 
         @param   message          pointer to the message (output parameter)
 
-        @return  STATUS_SUCCESS   on success; 
-                 STATUS_CLOSED    on closed connection; 
+        @return  STATUS_SUCCESS   on success;
+                 STATUS_CLOSED    on closed connection;
                  STATUS_ERROR     on error;
                  STATUS_INTERRUPT on interrupt
     */
@@ -161,32 +155,32 @@ public:
     CIMMessage * & message);
 
     /**
-        Gets a char [] form of the pipe handle for reading from the 
-        AnonymousPipe instance.  
+        Gets a char [] form of the pipe handle for reading from the
+        AnonymousPipe instance.
 
-        NOTE: the caller must supply the buffer.  The buffer size must be at 
+        NOTE: the caller must supply the buffer.  The buffer size must be at
               least 32.
     */
     void exportReadHandle (
         char * buffer) const;
 
     /**
-        Gets a char [] form of the pipe handle for writing to the 
-        AnonymousPipe instance.  
+        Gets a char [] form of the pipe handle for writing to the
+        AnonymousPipe instance.
 
-        NOTE: the caller must supply the buffer.  The buffer size must be at 
+        NOTE: the caller must supply the buffer.  The buffer size must be at
               least 32.
     */
     void exportWriteHandle (
         char * buffer) const;
 
     /**
-        Closes the pipe handle for reading from the AnonymousPipe instance.  
+        Closes the pipe handle for reading from the AnonymousPipe instance.
     */
     void closeReadHandle ();
 
     /**
-        Closes the pipe handle for writing to the AnonymousPipe instance.  
+        Closes the pipe handle for writing to the AnonymousPipe instance.
     */
     void closeWriteHandle ();
 
@@ -199,7 +193,7 @@ private:
     AnonymousPipe (const AnonymousPipe & anonymousPipe);
 
     /**
-        Private, unimplemented assignment operator to avoid implicit use of 
+        Private, unimplemented assignment operator to avoid implicit use of
         the default assignment operator
     */
     AnonymousPipe & operator= (const AnonymousPipe & anonymousPipe);
index 38de65fd3ca0278c33b9cdb2a6d8ba8c9deca1ce..7b264eec92a4a061b2204347e92b86558de8b33e 100644 (file)
 //
 //==============================================================================
 //
-// Author: Carol Ann Krug Graves, Hewlett-Packard Company
-//             (carolann_graves@hp.com)
-//
-// Modified By: David Dillard, VERITAS Software Corp.
-//                  (david.dillard@veritas.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 
@@ -68,7 +62,7 @@ AnonymousPipe::AnonymousPipe ()
         Tracer::trace (TRC_OS_ABSTRACTION, Tracer::LEVEL2,
             "Failed to create pipe: %s", strerror (errno));
         PEG_METHOD_EXIT ();
-        
+
         MessageLoaderParms mlp ("Common.AnonymousPipe.CREATE_PIPE_FAILED",
             "Failed to create pipe.");
         throw Exception (mlp);
@@ -86,7 +80,7 @@ AnonymousPipe::AnonymousPipe (
     const char * readHandle,
     const char * writeHandle)
 {
-    PEG_METHOD_ENTER (TRC_OS_ABSTRACTION, 
+    PEG_METHOD_ENTER (TRC_OS_ABSTRACTION,
         "AnonymousPipe::AnonymousPipe (const char *, const char *)");
 
     _readHandle = 0;
index 3fc763a04505c28e9ede37759cea1d58ff956f7f..b65cd648d54537439f3aa1f532ecedd9964f6d67 100644 (file)
 //
 //==============================================================================
 //
-// Author: Carol Ann Krug Graves, Hewlett-Packard Company
-//             (carolann_graves@hp.com)
-//
-// Modified By: David Dillard, VERITAS Software Corp.
-//                  (david.dillard@veritas.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 
 
 PEGASUS_NAMESPACE_BEGIN
 
-AnonymousPipe::AnonymousPipe ()
+AnonymousPipe::AnonymousPipe()
 {
-    PEG_METHOD_ENTER (TRC_OS_ABSTRACTION, "AnonymousPipe::AnonymousPipe ()");
+    PEG_METHOD_ENTER(TRC_OS_ABSTRACTION, "AnonymousPipe::AnonymousPipe()");
 
-    AnonymousPipeHandle thePipe [2];
+    AnonymousPipeHandle thePipe[2];
 
     SECURITY_ATTRIBUTES saAttr;
-    saAttr.nLength = sizeof (SECURITY_ATTRIBUTES);
+    saAttr.nLength = sizeof(SECURITY_ATTRIBUTES);
     saAttr.bInheritHandle = TRUE;
     saAttr.lpSecurityDescriptor = NULL;
 
-    if (!CreatePipe (&thePipe [0], &thePipe [1], &saAttr, 0))
+    if (!CreatePipe(&thePipe[0], &thePipe[1], &saAttr, 0))
     {
-        Tracer::trace (TRC_OS_ABSTRACTION, Tracer::LEVEL2,
-            "Failed to create pipe.  Error code: %d", GetLastError ());
-        PEG_METHOD_EXIT ();
+        Tracer::trace(TRC_OS_ABSTRACTION, Tracer::LEVEL2,
+            "Failed to create pipe.  Error code: %d", GetLastError());
+        PEG_METHOD_EXIT();
 
-        MessageLoaderParms mlp ("Common.AnonymousPipe.CREATE_PIPE_FAILED",
+        MessageLoaderParms mlp("Common.AnonymousPipe.CREATE_PIPE_FAILED",
             "Failed to create pipe.");
-        throw Exception (mlp);
+        throw Exception(mlp);
     }
 
-    _readHandle = thePipe [0];
-    _writeHandle = thePipe [1];
+    _readHandle = thePipe[0];
+    _writeHandle = thePipe[1];
     _readOpen = true;
     _writeOpen = true;
 
-    PEG_METHOD_EXIT ();
+    PEG_METHOD_EXIT();
 }
 
-AnonymousPipe::AnonymousPipe (
+AnonymousPipe::AnonymousPipe(
     const char * readHandle,
     const char * writeHandle)
 {
-    PEG_METHOD_ENTER (TRC_OS_ABSTRACTION, 
-        "AnonymousPipe::AnonymousPipe (const char *, const char *)");
+    PEG_METHOD_ENTER(TRC_OS_ABSTRACTION,
+        "AnonymousPipe::AnonymousPipe(const char *, const char *)");
 
     _readHandle = 0;
     _writeHandle = 0;
@@ -91,55 +85,55 @@ AnonymousPipe::AnonymousPipe (
 
     if (readHandle != NULL)
     {
-        if (sscanf (readHandle, "%p", &_readHandle) != 1)
+        if (sscanf(readHandle, "%p", &_readHandle) != 1)
         {
-            Tracer::trace (TRC_OS_ABSTRACTION, Tracer::LEVEL2,
+            Tracer::trace(TRC_OS_ABSTRACTION, Tracer::LEVEL2,
                 "Failed to create pipe: invalid read handle %s", readHandle);
-            PEG_METHOD_EXIT ();
+            PEG_METHOD_EXIT();
 
-            MessageLoaderParms mlp ("Common.AnonymousPipe.CREATE_PIPE_FAILED",
+            MessageLoaderParms mlp("Common.AnonymousPipe.CREATE_PIPE_FAILED",
                 "Failed to create pipe.");
-            throw Exception (mlp);
+            throw Exception(mlp);
         }
         _readOpen = true;
     }
 
     if (writeHandle != NULL)
     {
-        if (sscanf (writeHandle, "%p", &_writeHandle) != 1)
+        if (sscanf(writeHandle, "%p", &_writeHandle) != 1)
         {
-            Tracer::trace (TRC_OS_ABSTRACTION, Tracer::LEVEL2,
+            Tracer::trace(TRC_OS_ABSTRACTION, Tracer::LEVEL2,
                 "Failed to create pipe: invalid write handle %s", writeHandle);
-            PEG_METHOD_EXIT ();
+            PEG_METHOD_EXIT();
 
-            MessageLoaderParms mlp ("Common.AnonymousPipe.CREATE_PIPE_FAILED",
+            MessageLoaderParms mlp("Common.AnonymousPipe.CREATE_PIPE_FAILED",
                 "Failed to create pipe.");
-            throw Exception (mlp);
+            throw Exception(mlp);
         }
         _writeOpen = true;
     }
 
-    PEG_METHOD_EXIT ();
+    PEG_METHOD_EXIT();
 }
 
-AnonymousPipe::~AnonymousPipe ()
+AnonymousPipe::~AnonymousPipe()
 {
-    PEG_METHOD_ENTER (TRC_OS_ABSTRACTION, "AnonymousPipe::~AnonymousPipe");
+    PEG_METHOD_ENTER(TRC_OS_ABSTRACTION, "AnonymousPipe::~AnonymousPipe");
 
     if (_readOpen)
     {
-        closeReadHandle ();
+        closeReadHandle();
     }
 
     if (_writeOpen)
     {
-        closeWriteHandle ();
+        closeWriteHandle();
     }
 
-    PEG_METHOD_EXIT ();
+    PEG_METHOD_EXIT();
 }
 
-AnonymousPipe::Status AnonymousPipe::writeBuffer (
+AnonymousPipe::Status AnonymousPipe::writeBuffer(
     const void * buffer,
     Uint32 bytesToWrite)
 {
@@ -148,7 +142,7 @@ AnonymousPipe::Status AnonymousPipe::writeBuffer (
     //
     if (!_writeOpen)
     {
-        Tracer::trace (TRC_OS_ABSTRACTION, Tracer::LEVEL2,
+        Tracer::trace(TRC_OS_ABSTRACTION, Tracer::LEVEL2,
             "Attempted to write to pipe whose write handle is not open");
         return STATUS_CLOSED;
     }
@@ -156,7 +150,7 @@ AnonymousPipe::Status AnonymousPipe::writeBuffer (
     //
     //  Ignore SIGPIPE signals
     //
-    SignalHandler::ignore (PEGASUS_SIGPIPE);
+    SignalHandler::ignore(PEGASUS_SIGPIPE);
 
     const char * writeBuffer = reinterpret_cast<const char *>(buffer);
     DWORD expectedBytes = bytesToWrite;
@@ -164,25 +158,25 @@ AnonymousPipe::Status AnonymousPipe::writeBuffer (
     {
         BOOL returnValue;
         DWORD bytesWritten = 0;
-        returnValue = WriteFile (_writeHandle, writeBuffer, expectedBytes,
+        returnValue = WriteFile(_writeHandle, writeBuffer, expectedBytes,
             &bytesWritten, NULL);
 
         if (!returnValue)
         {
-            Tracer::trace (TRC_OS_ABSTRACTION, Tracer::LEVEL2,
-                "Failed to write buffer to pipe.  Error code: %d", 
-                GetLastError ());
+            Tracer::trace(TRC_OS_ABSTRACTION, Tracer::LEVEL2,
+                "Failed to write buffer to pipe.  Error code: %d",
+                GetLastError());
             return STATUS_ERROR;
         }
 
         if (bytesWritten < 0)
         {
-            Tracer::trace (TRC_OS_ABSTRACTION, Tracer::LEVEL2,
-                "Failed to write buffer to pipe.  Error code: %d", 
-                GetLastError ());
+            Tracer::trace(TRC_OS_ABSTRACTION, Tracer::LEVEL2,
+                "Failed to write buffer to pipe.  Error code: %d",
+                GetLastError());
 
-            if ((GetLastError () == ERROR_PIPE_NOT_CONNECTED) ||
-                (GetLastError () == ERROR_BROKEN_PIPE))
+            if ((GetLastError() == ERROR_PIPE_NOT_CONNECTED) ||
+                (GetLastError() == ERROR_BROKEN_PIPE))
             {
                 return STATUS_CLOSED;
             }
@@ -199,7 +193,7 @@ AnonymousPipe::Status AnonymousPipe::writeBuffer (
     return STATUS_SUCCESS;
 }
 
-AnonymousPipe::Status AnonymousPipe::readBuffer (
+AnonymousPipe::Status AnonymousPipe::readBuffer(
     void * buffer,
     Uint32 bytesToRead)
 {
@@ -208,7 +202,7 @@ AnonymousPipe::Status AnonymousPipe::readBuffer (
     //
     if (!_readOpen)
     {
-        Tracer::trace (TRC_OS_ABSTRACTION, Tracer::LEVEL2,
+        Tracer::trace(TRC_OS_ABSTRACTION, Tracer::LEVEL2,
             "Attempted to read from pipe whose read handle is not open");
         return STATUS_CLOSED;
     }
@@ -219,16 +213,16 @@ AnonymousPipe::Status AnonymousPipe::readBuffer (
     {
         BOOL returnValue;
         DWORD bytesRead;
-        returnValue = ReadFile (_readHandle, buffer, bytesToRead, &bytesRead,
-            NULL);
+        returnValue = ReadFile(
+            _readHandle, buffer, bytesToRead, &bytesRead, NULL);
 
         if (!returnValue)
         {
-            Tracer::trace (TRC_OS_ABSTRACTION, Tracer::LEVEL2,
-                "Failed to read buffer from pipe.  Error code: %d", 
-                GetLastError ());
-            if ((GetLastError () == ERROR_PIPE_NOT_CONNECTED) ||
-                (GetLastError () == ERROR_BROKEN_PIPE))
+            Tracer::trace(TRC_OS_ABSTRACTION, Tracer::LEVEL2,
+                "Failed to read buffer from pipe.  Error code: %d",
+                GetLastError());
+            if ((GetLastError() == ERROR_PIPE_NOT_CONNECTED) ||
+                (GetLastError() == ERROR_BROKEN_PIPE))
             {
                 return STATUS_CLOSED;
             }
@@ -241,16 +235,16 @@ AnonymousPipe::Status AnonymousPipe::readBuffer (
             //
             //  Connection closed
             //
-            Tracer::trace (TRC_OS_ABSTRACTION, Tracer::LEVEL2,
+            Tracer::trace(TRC_OS_ABSTRACTION, Tracer::LEVEL2,
                 "Failed to read buffer from pipe: connection closed");
             return STATUS_CLOSED;
         }
 
         if (bytesRead < 0)
         {
-            Tracer::trace (TRC_OS_ABSTRACTION, Tracer::LEVEL2,
-                "Failed to read buffer from pipe.  Error code: %d", 
-                GetLastError ());
+            Tracer::trace(TRC_OS_ABSTRACTION, Tracer::LEVEL2,
+                "Failed to read buffer from pipe.  Error code: %d",
+                GetLastError());
 
             //
             //  Error reading from pipe
@@ -265,35 +259,35 @@ AnonymousPipe::Status AnonymousPipe::readBuffer (
     return STATUS_SUCCESS;
 }
 
-void AnonymousPipe::exportReadHandle (char * buffer) const
+void AnonymousPipe::exportReadHandle(char * buffer) const
 {
-    PEG_METHOD_ENTER (TRC_OS_ABSTRACTION, "AnonymousPipe::exportReadHandle");
+    PEG_METHOD_ENTER(TRC_OS_ABSTRACTION, "AnonymousPipe::exportReadHandle");
 
-    sprintf (buffer, "%p", _readHandle);
+    sprintf(buffer, "%p", _readHandle);
 
-    PEG_METHOD_EXIT ();
+    PEG_METHOD_EXIT();
 }
 
-void AnonymousPipe::exportWriteHandle (char * buffer) const
+void AnonymousPipe::exportWriteHandle(char * buffer) const
 {
-    PEG_METHOD_ENTER (TRC_OS_ABSTRACTION, "AnonymousPipe::exportWriteHandle");
+    PEG_METHOD_ENTER(TRC_OS_ABSTRACTION, "AnonymousPipe::exportWriteHandle");
 
-    sprintf (buffer, "%p", _writeHandle);
+    sprintf(buffer, "%p", _writeHandle);
 
-    PEG_METHOD_EXIT ();
+    PEG_METHOD_EXIT();
 }
 
-void AnonymousPipe::closeReadHandle ()
+void AnonymousPipe::closeReadHandle()
 {
-    PEG_METHOD_ENTER (TRC_OS_ABSTRACTION, "AnonymousPipe::closeReadHandle");
+    PEG_METHOD_ENTER(TRC_OS_ABSTRACTION, "AnonymousPipe::closeReadHandle");
 
     if (_readOpen)
     {
-        if (!CloseHandle (_readHandle))
+        if (!CloseHandle(_readHandle))
         {
-            Tracer::trace (TRC_OS_ABSTRACTION, Tracer::LEVEL2,
-                "Failed to close read handle.  Error code: %d", 
-                GetLastError ());
+            Tracer::trace(TRC_OS_ABSTRACTION, Tracer::LEVEL2,
+                "Failed to close read handle.  Error code: %d",
+                GetLastError());
         }
         else
         {
@@ -302,24 +296,24 @@ void AnonymousPipe::closeReadHandle ()
     }
     else
     {
-        Tracer::trace (TRC_OS_ABSTRACTION, Tracer::LEVEL2,
+        Tracer::trace(TRC_OS_ABSTRACTION, Tracer::LEVEL2,
             "Attempted to close read handle that was not open");
     }
 
-    PEG_METHOD_EXIT ();
+    PEG_METHOD_EXIT();
 }
 
-void AnonymousPipe::closeWriteHandle ()
+void AnonymousPipe::closeWriteHandle()
 {
-    PEG_METHOD_ENTER (TRC_OS_ABSTRACTION, "AnonymousPipe::closeWriteHandle");
+    PEG_METHOD_ENTER(TRC_OS_ABSTRACTION, "AnonymousPipe::closeWriteHandle");
 
     if (_writeOpen)
     {
-        if (!CloseHandle (_writeHandle))
+        if (!CloseHandle(_writeHandle))
         {
-            Tracer::trace (TRC_OS_ABSTRACTION, Tracer::LEVEL2,
-                "Failed to close write handle.  Error code: %d", 
-                GetLastError ());
+            Tracer::trace(TRC_OS_ABSTRACTION, Tracer::LEVEL2,
+                "Failed to close write handle.  Error code: %d",
+                GetLastError());
         }
         else
         {
@@ -328,11 +322,11 @@ void AnonymousPipe::closeWriteHandle ()
     }
     else
     {
-        Tracer::trace (TRC_OS_ABSTRACTION, Tracer::LEVEL2,
+        Tracer::trace(TRC_OS_ABSTRACTION, Tracer::LEVEL2,
             "Attempted to close write handle that was not open");
     }
 
-    PEG_METHOD_EXIT ();
+    PEG_METHOD_EXIT();
 }
 
 PEGASUS_NAMESPACE_END
index 358275eece92a485179e44682ade13033c73c8a8..69d4be6892e057f6352ea99efa651dbae572a99f 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By: David Dillard, VERITAS Software Corp.
-//                  (david.dillard@veritas.com)
-//              Mike Brasher, Inova Europe (mike-brasher@austin.rr.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include "Array.h"
index 83913ab28725fe42bb7dc6e2598a7a88b271223a..5bf2ae8719f75e33807236a0cfdd14b09c81e652 100644 (file)
 //
 //==============================================================================
 //
-// Author: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//
-// Modified By: Carol Ann Krug Graves, Hewlett-Packard Company
-//                (carolann_graves@hp.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_ArrayInternal_h
@@ -79,7 +74,7 @@ Boolean Contains(const Array<PEGASUS_ARRAY_T>& a, const PEGASUS_ARRAY_T& x)
 }
 
 template<class PEGASUS_ARRAY_T>
-void BubbleSort(Array<PEGASUS_ARRAY_T>& x) 
+void BubbleSort(Array<PEGASUS_ARRAY_T>& x)
 {
     Uint32 n = x.size();
 
@@ -100,7 +95,7 @@ void BubbleSort(Array<PEGASUS_ARRAY_T>& x)
     }
 }
 
-inline void BubbleSort(Array<CIMName>& x) 
+inline void BubbleSort(Array<CIMName>& x)
 {
     Uint32 n = x.size();
 
@@ -121,7 +116,7 @@ inline void BubbleSort(Array<CIMName>& x)
     }
 }
 
-inline void BubbleSort(Array<CIMNamespaceName>& x) 
+inline void BubbleSort(Array<CIMNamespaceName>& x)
 {
     Uint32 n = x.size();
 
@@ -145,7 +140,7 @@ inline void BubbleSort(Array<CIMNamespaceName>& x)
 #if 0
 // Determine need for these functions
 template<class PEGASUS_ARRAY_T>
-void Unique(Array<PEGASUS_ARRAY_T>& x) 
+void Unique(Array<PEGASUS_ARRAY_T>& x)
 {
     Array<PEGASUS_ARRAY_T> result;
 
index 85cad4e6bd0b3a9be2f8ae645bb9a0e590a82d4b..9b90fe57aafeae2d8f286110b53f9ec03e0ac5c1 100644 (file)
@@ -50,7 +50,7 @@
 #define Array_capacity (Array_rep)->capacity
 #define Array_refs (Array_rep)->refs
 
-// The OS400 platform uses this aligment directive to ensure that 
+// The OS400 platform uses this aligment directive to ensure that
 // ArrayRepBase is aligned an a 16 byte boundary.
 #ifdef PEGASUS_OS_OS400
 # define PEGASUS_ALIGN16 __align(16)
@@ -60,7 +60,7 @@
 
 PEGASUS_NAMESPACE_BEGIN
 
-PEGASUS_ALIGN16 
+PEGASUS_ALIGN16
 struct PEGASUS_COMMON_LINKAGE ArrayRepBase
 {
     // We put this first to avoid gaps in this structure. Some compilers may
index 7faf2982e262555720fdedc7909e15912ccb091c..4c19d7b1998593283a606b9ee22eaf8479d60a2f 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Day (mdday@us.ibm.com)
-//
-// Modified By:
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include "AsyncQueue.h"
index e79cd4f025748040e63cac154397319efe3dd214..25ddccb4a9b61c8dadaa255b123c3913948202ed 100644 (file)
@@ -29,8 +29,6 @@
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mike-brasher@austin.rr.com) - Inova Europe
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include <Pegasus/Common/Config.h>
index 4f70235b589f45f6e227cc0de2be5b523ccd25e9..4c26ee7de1482d7b56284cde69291f2e4a7531d5 100755 (executable)
@@ -73,7 +73,7 @@ PEGASUS_STD(ostream)& operator<<(
     Array<String> vals = attr.getValues();
     for (int i = 0; i < vals.size(); i++)
     {
-        if(i == 0)
+        if (i == 0)
         {
             os << " = ";
         }
index 906598a8ae5df8261306a09ad72f0267310206d5..3c95015ddb2ee607a25b774c14bdb3f961acfd05 100755 (executable)
 //
 //==============================================================================
 //
-// Author: Tony Fiorentino (fiorentino_tony@emc.com)
-//
-// Modified By: Keith Petley (keithp@veritas.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_Attribute_h
index 0feb9bac6da048294a8484b53d78897bc830567f..8cee8f75d17c30f56b7befd40c65f49d2eb31a8c 100644 (file)
@@ -481,7 +481,7 @@ String AuditLogger::_getModuleStatusValue(
         }
     }
 
-    return (moduleStatusValue);
+    return moduleStatusValue;
 }
 
 PEGASUS_NAMESPACE_END
index fe3bb50167d3649c35bbf2c12b97bae2e7f9941e..371bbd014999d9a6492160b0071925cbbf31e5db 100644 (file)
@@ -44,9 +44,9 @@ PEGASUS_NAMESPACE_BEGIN
 
 #ifndef PEGASUS_DISABLE_AUDIT_LOGGER
 
-/** 
+/**
     This class provides the interfaces to construct a human readable audit
-    text message and write the message to log files.    
+    text message and write the message to log files.
 */
 class PEGASUS_COMMON_LINKAGE AuditLogger
 {
@@ -57,7 +57,7 @@ public:
         TYPE_AUTHENTICATION,
         TYPE_AUTHORIZATION,
         TYPE_CONFIGURATION,
-        TYPE_CIMOPERATION 
+        TYPE_CIMOPERATION
     };
 
     enum AuditSubType
@@ -92,7 +92,7 @@ public:
     };
 
     /** Constructs and logs audit message of the current configurations
-        @param propertyNames - All the current property names while the CIM 
+        @param propertyNames - All the current property names while the CIM
                                Server is running
         @param propertyValues - All the current property values while the CIM
                                 Server is running
@@ -140,7 +140,7 @@ public:
         @param cimMethodName - The name of the CIM operation performed
         @param eventType - The AuditEvent associated with the CIM operation
         @param userName - User name for this operation
-        @param ipAddr - Client IP address for this operation 
+        @param ipAddr - Client IP address for this operation
         @param nameSpace - The namespace for the operation
         @param className - The name of the class
         @param statusCode - The CIM status code for the operation
@@ -159,9 +159,9 @@ public:
         @param cimMethodName - The name of the CIM operation performed
         @param eventType - The AuditEvent associated with the CIM operation
         @param userName - User name for this operation
-        @param ipAddr - Client IP address for this operation 
+        @param ipAddr - Client IP address for this operation
         @param nameSpace - The namespace for the operation
-        @param name - The name of the qualifier 
+        @param name - The name of the qualifier
         @param statusCode - The CIM status code for the operation
     */
     static void logUpdateQualifierOperation(
@@ -178,7 +178,7 @@ public:
         @param cimMethodName - The name of the CIM operation performed
         @param eventType - The AuditEvent associated with the CIM operation
         @param userName - The user name for this operation
-        @param ipAddr - Client IP address for this operation 
+        @param ipAddr - Client IP address for this operation
         @param nameSpace - The namespace for the operation
         @param instanceName - The name of the affected instance
         @param moduleName - The provider module name that serves the request
@@ -199,11 +199,11 @@ public:
     /**
         Constructs and logs audit message of a CIM InvokeMethod operation
         @param userName - The user name for this operation
-        @param ipAddr - Client IP address for this operation 
+        @param ipAddr - Client IP address for this operation
         @param nameSpace - The namespace for the operation
         @param objectName - The name of the object on which the method is
             invoked
-        @param methodName - The name of the method to be executed 
+        @param methodName - The name of the method to be executed
         @param moduleName - The provider module name that serves the request
         @param providerName - The provider name that serves the request
         @param statusCode - The CIM status code for the operation
@@ -218,7 +218,7 @@ public:
         const String& providerName,
         CIMStatusCode statusCode);
 
-    /** Constructs and logs audit message of a provider module status change 
+    /** Constructs and logs audit message of a provider module status change
         @param moduleName - The name of the provider module
         @param currentModuleStatus - The current status of the provider module
         @param newModuleStatus - The new status of the provider module
@@ -250,24 +250,24 @@ public:
 
     typedef void (*PEGASUS_AUDITLOGINITIALIZE_CALLBACK_T)();
 
-    typedef void (*PEGASUS_AUDITLOG_CALLBACK_T) (AuditType, 
-        AuditSubType, AuditEvent, Uint32, MessageLoaderParms &); 
+    typedef void (*PEGASUS_AUDITLOG_CALLBACK_T) (AuditType,
+        AuditSubType, AuditEvent, Uint32, MessageLoaderParms &);
 
     /**
         Registers an audit log initialize callback
-        If a non-null initialize callback function is registered, 
+        If a non-null initialize callback function is registered,
         it will be called when the audit log is enabled.
-        @param auditLogInitializeCallback - The audit log initialize 
+        @param auditLogInitializeCallback - The audit log initialize
                                             callback function
     */
     static void setInitializeCallback(
         PEGASUS_AUDITLOGINITIALIZE_CALLBACK_T auditLogInitializeCallback);
 
-    /** If the enabled is true, the audit log initialize callback function 
+    /** If the enabled is true, the audit log initialize callback function
         is called to communicate that the audit log is enabled.
-        @param enabled - True on config property "enableAuditLog" is 
+        @param enabled - True on config property "enableAuditLog" is
                          enabled, false otherwise
-    */  
+    */
     static void setEnabled(Boolean enabled);
 
     static Boolean isEnabled();
@@ -279,14 +279,13 @@ public:
     */
     static void writeAuditLogToFileCallback(
         PEGASUS_AUDITLOG_CALLBACK_T writeAuditMessageCallback);
-     
 
 private:
-    
+
     static Boolean _auditLogFlag;
 
-    /** 
-        Callback function to be called when the audit log is enabled 
+    /**
+        Callback function to be called when the audit log is enabled
     */
     static PEGASUS_AUDITLOGINITIALIZE_CALLBACK_T _auditLogInitializeCallback;
 
@@ -299,16 +298,16 @@ private:
         @param AuditType - Type of audit record (Authentication etc)
         @param AuditSubType - Sub type of audit record(Local_Authentication etc)
         @param AuditEvent - Event of audit record (Start_Up etc)
-        @param logLevel - Pegasus Severity (WARNING etc)            
-        All the audit messages are passed with pegasus severity 
+        @param logLevel - Pegasus Severity (WARNING etc)
+        All the audit messages are passed with pegasus severity
         "INFORMATION", except authentication attempts failed messages or
-        authorization failed messages are passed with pegasus severity 
+        authorization failed messages are passed with pegasus severity
         "WARNING"
         @param msgParms - The message loader parameters
     */
     static void _writeAuditMessage(
         AuditType auditType,
-        AuditSubType auditSubType,  
+        AuditSubType auditSubType,
         AuditEvent auditEvent,
         Uint32 logLevel,
         MessageLoaderParms & msgParms);
@@ -323,7 +322,7 @@ private:
 
 inline Boolean AuditLogger::isEnabled()
 {
-    return (_auditLogFlag);
+    return _auditLogFlag;
 }
 
 # define PEG_AUDIT_LOG(T) \
index 3561f6327ebc6e55254d32224292cd1c04514a40..1e5cc0712791eec127531f732733431e3c9ea76b 100644 (file)
@@ -342,8 +342,9 @@ public:
         _rep->setRemotePrivilegedUserAccessChecked();
     }
 
-    /** Get flag that shows if the isRemotePrivilegedUserAccess check has been done
-        this function should only be used by OpenPegasus AuthenticationHandlers
+    /** Indicates whether the isRemotePrivilegedUserAccess check has been
+        performed.  This method should only be used by OpenPegasus
+        AuthenticationHandlers
     */
     Boolean getRemotePrivilegedUserAccessChecked()
     {
index 5f848ddfe0bfd92ecbb79df3606a627062802f71..8a837bc85d3ebe6e0efd2bd627dacf47c997c595 100644 (file)
@@ -156,7 +156,7 @@ public:
     {
         _wasRemotePrivilegedUserAccessChecked = true;
     }
-    
+
     Boolean getRemotePrivilegedUserAccessChecked()
     {
         return _wasRemotePrivilegedUserAccessChecked;
index 58c067a4933d55f15081e762bf14dcad98a30a80..67f116ab0da066792d7bdc50717cff167a2e69e4 100644 (file)
 //
 //==============================================================================
 //
-// Author: Amit Arora, IBM (amita@in.ibm.com) (based on PEP101 by David Dillard)
-//
-// Modified By: Amit Arora, IBM (amita@in.ibm.com) for Bug#2168
-//              Amit Arora, IBM (amita@in.ibm.com) for Bug#2480
-//              David Dillard, VERITAS Software Corp.
-//                  (david.dillard@veritas.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_AutoPtr_h
@@ -78,7 +71,7 @@ public:
 
     inline AutoPtr<X> get()
     {
-        return(_ref);
+        return _ref;
     }
 
 private:
@@ -97,7 +90,7 @@ public:
 
     inline AutoArrayPtr<X> get()
     {
-        return(_ref);
+        return _ref;
     }
 
 private:
@@ -147,13 +140,13 @@ public:
     {
         if ( this != &a )
             reset(a.release());
-        return(*this);
+        return *this;
     }
 
     inline AutoPtr<X> &operator=(AutoPtrRef<X> &a) throw()
     {
         reset((a.get()).release());
-        return(*this);
+        return *this;
     }
 
     // This method can be used to get the pointer to heap object encapsulated
@@ -164,13 +157,13 @@ public:
     // object of classA.
     inline X *get() const throw()
     {
-        return(_ptr);
+        return _ptr;
     }
 
     // Returns the heap object itself (not the pointer to it)
     inline X &operator*() const throw()
     {
-        return(*_ptr);
+        return *_ptr;
     }
 
     // A very important overloading, which allows you to directly use 'this'
@@ -183,7 +176,7 @@ public:
     // overloading only.
     inline X *operator->() const throw()
     {
-        return(_ptr);
+        return _ptr;
     }
 
     // Relase the ownership of the memory object without deleting it !
@@ -192,7 +185,7 @@ public:
     {
         X *t = _ptr;
         _ptr = 0;
-        return(t);
+        return t;
     }
 
     // Delete the heap object and thus release ownership
@@ -213,12 +206,12 @@ public:
 
     template<class Y> operator AutoPtrRef<Y>() throw()
     {
-        return(AutoPtrRef<Y>(*this));
+        return AutoPtrRef<Y>(*this);
     }
 
     template<class Y> operator AutoPtr<Y>() throw()
     {
-        return(AutoPtr<Y>(release()));
+        return AutoPtr<Y>(release());
     }
 
 private:
@@ -253,36 +246,36 @@ public:
     AutoArrayPtr<X> &operator=(AutoArrayPtr<X>& a) throw()
     {
         reset(a.release());
-        return(*this);
+        return *this;
     }
 
     inline AutoArrayPtr<X> &operator=(AutoArrayPtrRef<X> &a) throw()
     {
-        if ( this != a )
+        if (this != a)
             reset((a.get()).release());
-        return(*this);
+        return *this;
     }
 
     inline X *get() const throw()
     {
-        return(_ptr);
+        return _ptr;
     }
 
     inline X &operator*() const throw()
     {
-        return(*_ptr);
+        return *_ptr;
     }
 
     inline X *operator->() const throw()
     {
-        return(_ptr);
+        return _ptr;
     }
 
     inline X* release() throw()
     {
         X *t = _ptr;
         _ptr = 0;
-        return(t);
+        return t;
     }
 
     inline void reset(X *p = 0) throw()
@@ -303,12 +296,12 @@ public:
 
     template<class Y> operator AutoArrayPtrRef<Y>() throw()
     {
-        return(AutoArrayPtrRef<Y>(*this));
+        return AutoArrayPtrRef<Y>(*this);
     }
 
     template<class Y> operator AutoArrayPtr<Y>() throw()
     {
-        return(AutoArrayPtr<Y>(release()));
+        return AutoArrayPtr<Y>(release());
     }
 
 
index 58d12a7d9a9477bedd70516ab25f4ad5a4fd30cd..bf051ec9bba93f4cd8d937df3749dc358c589d2e 100644 (file)
 //
 //==============================================================================
 //
-// Author: Adrian Schuur (schuur@de.ibm.com) - PEP 164
-//
-// Modified By: David Dillard, VERITAS Software Corp.
-//                  (david.dillard@veritas.com)
-//              Aruran, IBM (ashanmug@in.ibm.com) for BUG#3348
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef AutoStreamer_h
 
 PEGASUS_NAMESPACE_BEGIN
 
-class PEGASUS_COMMON_LINKAGE AutoStreamer : public ObjectStreamer {
-
-   ObjectStreamer *_primary,*_defaultReader;
-   Uint16 _readerCount;
-   struct _reader {
-      _reader() { reader=NULL, marker=0; }
-      ObjectStreamer *reader;
-      Uint8 marker;
-   } _readers[8];
+class PEGASUS_COMMON_LINKAGE AutoStreamer : public ObjectStreamer
+{
+    ObjectStreamer *_primary,*_defaultReader;
+    Uint16 _readerCount;
+    struct _reader
+    {
+        _reader() { reader=NULL, marker=0; }
+        ObjectStreamer *reader;
+        Uint8 marker;
+    } _readers[8];
 
 public:
 
-   AutoStreamer(ObjectStreamer *primary, Uint8 marker);
+    AutoStreamer(ObjectStreamer *primary, Uint8 marker);
 
-   ~AutoStreamer();
+    ~AutoStreamer();
 
-   void addReader(ObjectStreamer *primary, Uint8 marker);
+    void addReader(ObjectStreamer *primary, Uint8 marker);
 
-   void encode(Buffer& out, const CIMClass& cls);
-   void encode(Buffer& out, const CIMInstance& inst);
-   void encode(Buffer& out, const CIMQualifierDecl& qual);
+    void encode(Buffer& out, const CIMClass& cls);
+    void encode(Buffer& out, const CIMInstance& inst);
+    void encode(Buffer& out, const CIMQualifierDecl& qual);
 
-   void decode(const Buffer& in, unsigned int pos, CIMClass& cls);
-   void decode(const Buffer& in, unsigned int pos, CIMInstance& inst);
-   void decode(const Buffer& in, unsigned int pos, CIMQualifierDecl& qual);
+    void decode(const Buffer& in, unsigned int pos, CIMClass& cls);
+    void decode(const Buffer& in, unsigned int pos, CIMInstance& inst);
+    void decode(const Buffer& in, unsigned int pos, CIMQualifierDecl& qual);
 
-   void write(PEGASUS_STD(ostream)& os, Buffer& in);
+    void write(PEGASUS_STD(ostream)& os, Buffer& in);
 };
 
-
 PEGASUS_NAMESPACE_END
 
 #endif
index 6361464636a494deac6c0a3bedac66dcac8cc36e..21f92843a804249270d58f67a5fad336c124a6f0 100644 (file)
 //
 //==============================================================================
 //
-// Author: Karl Schopmeyer (k.schopmeyer@opengroup.org)
-//
-// Modified By: David Dillard, VERITAS Software Corp.
-//                  (david.dillard@veritas.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 
@@ -94,7 +89,7 @@ public:
         @return Buffer with the encoded data
         @exception bad_alloc Thrown if there is insufficient memory.
     */
-    static Buffer encode(const Buffer& vby);  
+    static Buffer encode(const Buffer& vby);
 
     /**
         Decodes an base64 array into an Buffer
index 5c2d23cff6bfc06e512470ce3898a93bc471e6bb..80a9c217fbf1e11b0bdb4a24a76ec241110f069d 100644 (file)
@@ -775,10 +775,10 @@ void BinaryStreamer::_unpackProperty(
 
     UnpackQualifiers<CIMProperty>::func(in, pos, cimProperty);
 #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
-    if(cimProperty.getType() == CIMTYPE_STRING)
+    if (cimProperty.getType() == CIMTYPE_STRING)
     {
         CIMType realType = CIMTYPE_STRING;
-        if(cimProperty.findQualifier("EmbeddedInstance") != PEG_NOT_FOUND)
+        if (cimProperty.findQualifier("EmbeddedInstance") != PEG_NOT_FOUND)
         {
             // Note that this condition should only happen for properties in
             // class definitions, and only NULL values are recognized. We
@@ -787,7 +787,7 @@ void BinaryStreamer::_unpackProperty(
             PEGASUS_ASSERT(value.isNull());
             realType = CIMTYPE_INSTANCE;
         }
-        else if(cimProperty.findQualifier("EmbeddedObject") != PEG_NOT_FOUND)
+        else if (cimProperty.findQualifier("EmbeddedObject") != PEG_NOT_FOUND)
         {
             // Note that this condition should only happen for properties in
             // class definitions, and only NULL values are recognized. We
@@ -797,12 +797,12 @@ void BinaryStreamer::_unpackProperty(
             realType = CIMTYPE_OBJECT;
         }
 
-        if(realType != CIMTYPE_STRING)
+        if (realType != CIMTYPE_STRING)
         {
             CIMProperty tmpProperty(name, CIMValue(realType, value.isArray()),
                 arraySize, referenceClassName, classOrigin, propagated);
-            for(unsigned int i = 0, n = cimProperty.getQualifierCount();
-                i < n; ++i)
+            for (unsigned int i = 0, n = cimProperty.getQualifierCount();
+                 i < n; ++i)
             {
                 tmpProperty.addQualifier(cimProperty.getQualifier(i));
             }
index 21c51b3ad00f40d849e1af36d8d78412640286fb..aa3257bf6ed49f63ed2be9f8d0d1d9c48fe1346b 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By:
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_Boolean_h
index 70ce3c526dfcde855298a9b72aba6e475ba5d962..24c2a595dbfb22e2810435b58a03dab1e74f9e06 100644 (file)
@@ -121,8 +121,8 @@ public:
     ~CIMClass();
 
     /**
-        Indicates whether this class is an association class.  An 
-        association is a relationship between two (or more) classes or 
+        Indicates whether this class is an association class.  An
+        association is a relationship between two (or more) classes or
         instances.  The Association qualifier is used to make this
         determination.
         @return True if this class is an association class, false otherwise.
@@ -147,7 +147,7 @@ public:
             initialized.
     */
     const CIMName& getClassName() const;
-        
+
     /**
         Gets the object path for the class.
         @return A CIMObjectPath containing the object path.
@@ -412,9 +412,9 @@ public:
         in the class definition.  The method arguments determine whether
         qualifiers are included, the class origin attributes are included,
         and which properties are included in the new instance.  This method
-        is designed specifically for providers to allow them to easily build 
+        is designed specifically for providers to allow them to easily build
         instance objects using the parameters provided with the CIM instance
-        operations such as getInstance and enumerateInstances.  
+        operations such as getInstance and enumerateInstances.
 
         <p><b>Example:</b>
         <pre>
@@ -423,7 +423,7 @@ public:
             CIMInstance myInstance =
                 myClass.buildInstance(true, true, CIMPropertyList());
         </pre>
-    
+
         @param includeQualifiers A Boolean indicating whether qualifiers in
         the class definition (and its properties) are to be added to the
         instance.  If false, no qualifiers are added to the instance or its
@@ -444,8 +444,8 @@ public:
         properties are added to the instance.  If the propertyList is empty,
         no properties are added.  Note that this function does NOT generate
         an error if a property name is supplied that is NOT in the class;
-        it simply does not add that property to the instance.  
-    
+        it simply does not add that property to the instance.
+
         @return CIMInstance of this class appropriately initialized.
 
         @exception UninitializedObjectException If the object is not
@@ -569,8 +569,8 @@ public:
     ~CIMConstClass();
 
     /**
-        Indicates whether this class is an association class.  An 
-        association is a relationship between two (or more) classes or 
+        Indicates whether this class is an association class.  An
+        association is a relationship between two (or more) classes or
         instances.  The Association qualifier is used to make this
         determination.
         @return True if this class is an association class, false otherwise.
index 7a5a075b58a64220b0d69620018d1e7eebcc1b32..f6a099ae814505bd9b9138d557a9ac2360408811 100644 (file)
@@ -41,7 +41,7 @@
 #include "XmlWriter.h"
 #include "MofWriter.h"
 #include <Pegasus/Common/Tracer.h>
-#include <Pegasus/Common/MessageLoader.h> //l10n
+#include <Pegasus/Common/MessageLoader.h>
 #include "CIMNameUnchecked.h"
 #include "StrLit.h"
 #include "CIMInstanceRep.h"
@@ -224,7 +224,7 @@ void CIMClassRep::resolve(
             throw PEGASUS_CIM_EXCEPTION(
                 CIM_ERR_INVALID_SUPERCLASS, _superClassName);
         */
-        /*if(superclass.isTrueQualifier(CIMQualifierNames::TERMINAL)
+        /*if (superclass.isTrueQualifier(CIMQualifierNames::TERMINAL)
             throw PEGASUS_CIM_EXCEPTION(
                 CIM_ERR_INVALID_SUPERCLASS, _superClassName);
         */
@@ -540,7 +540,7 @@ CIMInstance CIMClassRep::buildInstance(Boolean includeQualifiers,
     // Create new CIMInstance from CIMInstanceRep
     CIMInstance newInstance(newInstanceRep);
 
-    return(newInstance);
+    return newInstance;
 }
 
 void CIMClassRep::toXml(Buffer& out) const
index a61e849186524f829884824187f4e265d500d284..0431c62b9201b797c234d8161f9c9630a3ca0b90 100644 (file)
@@ -102,16 +102,16 @@ static const Uint64 HOUR = 60 * MINUTE;
 static const Uint64 DAY = 24 * HOUR;
 
 // Number of microseconds in ten thousand years.
-static const Uint64 TEN_THOUSAND_YEARS = 
+static const Uint64 TEN_THOUSAND_YEARS =
     PEGASUS_UINT64_LITERAL(315569520000000000);
 
 // Number of microseconds in one million days.
-static const Uint64 HUNDRED_MILLION_DAYS = 
+static const Uint64 HUNDRED_MILLION_DAYS =
     PEGASUS_UINT64_LITERAL(8640000000000000000);
 
 // Adding this to the POSIX 1970 microseconds epoch produces a 1 BCE epoch
 // as used by this class.
-static const Uint64 POSIX_1970_EPOCH_OFFSET  = 
+static const Uint64 POSIX_1970_EPOCH_OFFSET  =
     PEGASUS_UINT64_LITERAL(62167201200000000);
 
 //==============================================================================
@@ -256,7 +256,7 @@ static inline bool _strToUint32(const Uint16* s, size_t n, Uint32& x)
 
 /** Parse the integer component pointed to by s. Return WILDCARD if s consists
     entirely of '*' characters. Returns the integer if it consists entirely
-    of digits. Throw exception if digits and '*' are mixed. Also throw 
+    of digits. Throw exception if digits and '*' are mixed. Also throw
     exception if digits are encountered when priorWildcards parameter is true.
 */
 static inline Uint32 _parseComponent(
@@ -311,10 +311,10 @@ static inline bool _allAsterisks(const Uint16* s, size_t n)
 }
 
 /** Parse the microseconds component of the given string (6 characters).
-    Set numSignificantMicrosecondDigits to the number of leading significant 
-    digits (non-asterisks). Note that once an asterisk is encountered, all 
-    subsequent characters must be asterisks. Returns the number of 
-    microseconds. Throws an exception if priorWildcards is true and any digits 
+    Set numSignificantMicrosecondDigits to the number of leading significant
+    digits (non-asterisks). Note that once an asterisk is encountered, all
+    subsequent characters must be asterisks. Returns the number of
+    microseconds. Throws an exception if priorWildcards is true and any digits
     are encountered or if digits occurs after asterisks.
 */
 static Uint32 _parseMicroseconds(
@@ -469,7 +469,7 @@ static void _toCStr(const CIMDateTimeRep* rep, char buffer[26])
         // Format the string.
 
         sprintf(
-            buffer, 
+            buffer,
             "%08u%02u%02u%02u.%06u:000",
             Uint32(days),
             Uint32(hours),
@@ -499,7 +499,7 @@ static void _toCStr(const CIMDateTimeRep* rep, char buffer[26])
         // Format the string.
 
         sprintf(
-            buffer, 
+            buffer,
             "%04u%02u%02u%02u%02u%02u.%06u%c%03d",
             Uint32(year),
             Uint32(month),
@@ -989,7 +989,7 @@ void CIMDateTime::set(const String& str)
         // Parse UTF offset.
 
         Uint32 utcOffset;
-        
+
         if (!_strToUint32(s, 3, utcOffset))
             throw InvalidDateTimeFormatException();
 
@@ -1371,7 +1371,7 @@ CIMDateTime CIMDateTime::operator-(const CIMDateTime& dt) const
 
     if (isInterval() == dt.isInterval())
     {
-        // TIMESTAMP - TIMESTAMP 
+        // TIMESTAMP - TIMESTAMP
         // OR
         // INTERVAL - INTERVAL
         return CIMDateTime(x - y, true);
@@ -1441,7 +1441,7 @@ CIMDateTime& CIMDateTime::operator/=(Uint64 x)
         throw TypeMismatchException(parms);
     }
 
-    if (x == 0) 
+    if (x == 0)
     {
         MessageLoaderParms parms(
             "Common.CIMDateTime.INVALID_OPERATION_DIV_ZERO",
@@ -1464,7 +1464,7 @@ Uint64 CIMDateTime::operator/(const CIMDateTime& x) const
         throw TypeMismatchException(parms);
     }
 
-    if (x._rep->usec == 0) 
+    if (x._rep->usec == 0)
     {
         MessageLoaderParms parms(
             "Common.CIMDateTime.INVALID_OPERATION_DIV_ZERO",
@@ -1543,13 +1543,13 @@ CIMDateTime CIMDateTime::getCurrentDateTime()
     int tzMinutesEast;
     {
 # if defined(PEGASUS_OS_SOLARIS)
-        tzMinutesEast = 
+        tzMinutesEast =
             -(int)((tmval->tm_isdst > 0 && daylight) ? altzone : timezone) / 60;
 # elif defined(PEGASUS_OS_HPUX)
         tzMinutesEast = - (int) timezone / 60;
         if ((tmval->tm_isdst > 0) && daylight)
         {
-            // ATTN: It is unclear how to determine the DST offset.  
+            // ATTN: It is unclear how to determine the DST offset.
             // Assume 1 hour.
             tzMinutesEast += 60;
         }
@@ -1559,7 +1559,7 @@ CIMDateTime CIMDateTime::getCurrentDateTime()
         if (tz.tz_dsttime > 0)
             tzMinutesEast = -tz.tz_minuteswest;
         else
-            // ATTN: It is unclear how to determine the DST offset.  
+            // ATTN: It is unclear how to determine the DST offset.
             // Assume 1 hour.
             tzMinutesEast = -tz.tz_minuteswest + 60;
 # endif
@@ -1568,7 +1568,7 @@ CIMDateTime CIMDateTime::getCurrentDateTime()
     // Create the representation object.
 
     CIMDateTimeRep* rep = new CIMDateTimeRep;
-    rep->usec = 
+    rep->usec =
         POSIX_1970_EPOCH_OFFSET + Uint64(sec) * Uint64(1000000) + Uint64(usec);
     rep->sign = tzMinutesEast < 0 ? '-' : '+';
     rep->utcOffset = tzMinutesEast < 0 ? -tzMinutesEast : tzMinutesEast;
@@ -1593,7 +1593,7 @@ Boolean getCurrentTimeZone(Sint16& currentTimeZone)
     TIME_ZONE_INFORMATION timezone;
     ::memset(&timezone, 0, sizeof(timezone));
 
-    switch(::GetTimeZoneInformation(&timezone)) 
+    switch(::GetTimeZoneInformation(&timezone))
     {
         case TIME_ZONE_ID_UNKNOWN:
         {
@@ -1603,14 +1603,14 @@ Boolean getCurrentTimeZone(Sint16& currentTimeZone)
 
         case TIME_ZONE_ID_STANDARD:
         {
-            currentTimeZone = 
+            currentTimeZone =
                 static_cast<Sint16>(timezone.Bias + timezone.StandardBias);
             break;
         }
 
         case TIME_ZONE_ID_DAYLIGHT:
         {
-            currentTimeZone = 
+            currentTimeZone =
                 static_cast<Sint16>(timezone.Bias + timezone.DaylightBias);
             break;
         }
@@ -1619,11 +1619,11 @@ Boolean getCurrentTimeZone(Sint16& currentTimeZone)
             break;
     }
 
-    // the bias used to calculate the time zone is a factor that is used to 
-    // determine the UTC time from the local time. to get the UTC offset from 
+    // the bias used to calculate the time zone is a factor that is used to
+    // determine the UTC time from the local time. to get the UTC offset from
     // the local time, use the inverse.
 
-    if(currentTimeZone != 0) 
+    if (currentTimeZone != 0)
     {
         currentTimeZone *= -1;
     }
@@ -1669,7 +1669,7 @@ CIMDateTime CIMDateTime::getCurrentDateTime()
 Notes:
 
     (1) The legacy implementation added the UTC offset when it was negative and
-        substracted it when it was positive. I preserved this behavior but 
+        substracted it when it was positive. I preserved this behavior but
         suspect it may be wrong.
 
     (2) Evenetually change getCurrentDateTime() to use constructor that takes
index a51a0a35a3153e3b8e6f99daf87c4ae1f66a6b6d..8fa6b4b03de04690cad79d758844d82c4eb4452c 100644 (file)
@@ -225,7 +225,7 @@ public:
             CIMDateTime d2 = "00000000000000.000000:000";
             d1 = d2;
         </PRE>
-        Therefore, d1 is assigned the same "00000000000000.000000:000" value 
+        Therefore, d1 is assigned the same "00000000000000.000000:000" value
         as d2.
     */
     CIMDateTime& operator=(const CIMDateTime& x);
index 8bd0d28440f9c4d50a320564eb1d0af42d9606ef..1bb66f127d5e5af5127851826cbee623231289f5 100644 (file)
 //
 //==============================================================================
 //
-// Author: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//
-// Modified By: Carol Ann Krug Graves, Hewlett-Packard Company
-//                (carolann_graves@hp.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_CIMExceptionRep_h
index d75215911275a02d7e30ef3e9a06ef4df349b71a..fe1cffe59685e0a953a75c7762bdaa728697a4bd 100644 (file)
@@ -94,13 +94,12 @@ void CIMFlavor::removeFlavor (const CIMFlavor & flavor)
 
 Boolean CIMFlavor::hasFlavor (const CIMFlavor & flavor) const
 {
-    return ((this->cimFlavor & flavor.cimFlavor) == flavor.cimFlavor) ?
-        true : false;
+    return (this->cimFlavor & flavor.cimFlavor) == flavor.cimFlavor;
 }
 
 Boolean CIMFlavor::equal (const CIMFlavor & flavor) const
 {
-    return (this->cimFlavor == flavor.cimFlavor) ? true : false;
+    return this->cimFlavor == flavor.cimFlavor;
 }
 
 CIMFlavor CIMFlavor::operator+ (const CIMFlavor & flavor) const
index 7113c7fd3ef9a0254ff99a774c8392d491931c71..830265ede132a8674c6c56fdb63ebb3f14af47e4 100644 (file)
@@ -189,7 +189,7 @@ Uint32 CIMInstance::getPropertyCount() const
 
 Boolean CIMInstance::isUninitialized() const
 {
-    return (_rep == 0)? true : false;
+    return _rep == 0;
 }
 
 Boolean CIMInstance::identical(const CIMConstInstance& x) const
@@ -340,7 +340,7 @@ Uint32 CIMConstInstance::getPropertyCount() const
 
 Boolean CIMConstInstance::isUninitialized() const
 {
-    return (_rep == 0)? true : false;
+    return _rep == 0;
 }
 
 Boolean CIMConstInstance::identical(const CIMConstInstance& x) const
index 4f6ea2e262e97ad3a885e90b6c63aad58cd3e666..025e347617071bbf7c98496f985f084b03b69b6d 100644 (file)
@@ -332,7 +332,7 @@ void CIMInstanceRep::filter(
     // Filter any qualifiers from this instance.
     if (!includeQualifiers && _qualifiers.getCount() > 0)
     {
-        while( _qualifiers.getCount() )
+        while (_qualifiers.getCount())
         {
             _qualifiers.removeQualifier(0);
         }
@@ -354,7 +354,7 @@ void CIMInstanceRep::filter(
             // remove qualifiers if required.
             if (!includeQualifiers && _properties[i].getQualifierCount() > 0)
             {
-                while( _properties[i].getQualifierCount() > 0 )
+                while (_properties[i].getQualifierCount() > 0)
                 {
                     _properties[i].removeQualifier(0);
                 }
index 0444480e3e359e39037b2c24fedda7c6b88fe725..c48c1b7e92dccb1cc9aed29828974e62cbc91327 100644 (file)
@@ -1020,7 +1020,7 @@ CIMMessageDeserializer::_deserializeCIMGetInstanceRequestMessage(
             propertyList,
             QueueIdStack());
 
-    return(message);
+    return message;
 }
 
 //
@@ -1041,7 +1041,7 @@ CIMMessageDeserializer::_deserializeCIMDeleteInstanceRequestMessage(
             instanceName,
             QueueIdStack());
 
-    return(message);
+    return message;
 }
 
 //
@@ -1062,7 +1062,7 @@ CIMMessageDeserializer::_deserializeCIMCreateInstanceRequestMessage(
             newInstance,
             QueueIdStack());
 
-    return(message);
+    return message;
 }
 
 //
@@ -1093,7 +1093,7 @@ CIMMessageDeserializer::_deserializeCIMModifyInstanceRequestMessage(
             propertyList,
             QueueIdStack());
 
-    return(message);
+    return message;
 }
 
 //
@@ -1137,7 +1137,7 @@ CIMMessageDeserializer::_deserializeCIMEnumerateInstancesRequestMessage(
             propertyList,
             QueueIdStack());
 
-    return(message);
+    return message;
 }
 
 //
@@ -1154,7 +1154,7 @@ CIMMessageDeserializer::_deserializeCIMEnumerateInstanceNamesRequestMessage(
             CIMName(),             // className
             QueueIdStack());
 
-    return(message);
+    return message;
 }
 
 //
@@ -1182,7 +1182,7 @@ CIMMessageDeserializer::_deserializeCIMExecQueryRequestMessage(
             query,
             QueueIdStack());
 
-    return(message);
+    return message;
 }
 
 //
@@ -1234,7 +1234,7 @@ CIMMessageDeserializer::_deserializeCIMAssociatorsRequestMessage(
             propertyList,
             QueueIdStack());
 
-    return(message);
+    return message;
 }
 
 //
@@ -1272,7 +1272,7 @@ CIMMessageDeserializer::_deserializeCIMAssociatorNamesRequestMessage(
             resultRole,
             QueueIdStack());
 
-    return(message);
+    return message;
 }
 
 //
@@ -1316,7 +1316,7 @@ CIMMessageDeserializer::_deserializeCIMReferencesRequestMessage(
             propertyList,
             QueueIdStack());
 
-    return(message);
+    return message;
 }
 
 //
@@ -1346,7 +1346,7 @@ CIMMessageDeserializer::_deserializeCIMReferenceNamesRequestMessage(
             role,
             QueueIdStack());
 
-    return(message);
+    return message;
 }
 
 //
@@ -1370,7 +1370,7 @@ CIMMessageDeserializer::_deserializeCIMGetPropertyRequestMessage(
             propertyName,
             QueueIdStack());
 
-    return(message);
+    return message;
 }
 
 //
@@ -1396,7 +1396,7 @@ CIMMessageDeserializer::_deserializeCIMSetPropertyRequestMessage(
             newValue.getValue(),
             QueueIdStack());
 
-    return(message);
+    return message;
 }
 
 //
@@ -1432,7 +1432,7 @@ CIMMessageDeserializer::_deserializeCIMInvokeMethodRequestMessage(
             inParameters,
             QueueIdStack());
 
-    return(message);
+    return message;
 }
 
 
@@ -1490,7 +1490,7 @@ CIMMessageDeserializer::_deserializeCIMCreateSubscriptionRequestMessage(
             query,
             QueueIdStack());
 
-    return(message);
+    return message;
 }
 
 //
@@ -1541,7 +1541,7 @@ CIMMessageDeserializer::_deserializeCIMModifySubscriptionRequestMessage(
             query,
             QueueIdStack());
 
-    return(message);
+    return message;
 }
 
 //
@@ -1576,7 +1576,7 @@ CIMMessageDeserializer::_deserializeCIMDeleteSubscriptionRequestMessage(
             classNames,
             QueueIdStack());
 
-    return(message);
+    return message;
 }
 
 
@@ -1615,7 +1615,7 @@ CIMMessageDeserializer::_deserializeCIMExportIndicationRequestMessage(
             authType,
             userName);
 
-    return(message);
+    return message;
 }
 
 //
@@ -1654,7 +1654,7 @@ CIMMessageDeserializer::_deserializeCIMProcessIndicationRequestMessage(
             provider,
             QueueIdStack());       // queueIds
 
-    return(message);
+    return message;
 }
 
 //
@@ -1710,7 +1710,7 @@ CIMMessageDeserializer::_deserializeCIMDisableModuleRequestMessage(
             authType,
             userName);
 
-    return(message);
+    return message;
 }
 
 //
@@ -1736,7 +1736,7 @@ CIMMessageDeserializer::_deserializeCIMEnableModuleRequestMessage(
             authType,
             userName);
 
-    return(message);
+    return message;
 }
 
 //
@@ -1751,7 +1751,7 @@ CIMMessageDeserializer::_deserializeCIMStopAllProvidersRequestMessage(
             String::EMPTY,         // messageId
             QueueIdStack());       // queueIds
 
-    return(message);
+    return message;
 }
 
 //
@@ -1766,7 +1766,7 @@ CIMMessageDeserializer::_deserializeCIMInitializeProviderRequestMessage(
             String::EMPTY,         // messageId
             QueueIdStack());       // queueIds
 
-    return(message);
+    return message;
 }
 
 //
@@ -1818,7 +1818,7 @@ CIMMessageDeserializer::_deserializeCIMInitializeProviderAgentRequestMessage(
             subscriptionInitComplete,
             QueueIdStack());       // queueIds
 
-    return(message);
+    return message;
 }
 
 //
@@ -1850,7 +1850,7 @@ CIMMessageDeserializer::_deserializeCIMNotifyConfigChangeRequestMessage(
             currentValueModified,
             QueueIdStack());        // queueIds
 
-    return(message);
+    return message;
 }
 
 //
@@ -1865,7 +1865,7 @@ CIMMessageDeserializer::_deserializeCIMSubscriptionInitCompleteRequestMessage(
             String::EMPTY,         // messageId
             QueueIdStack());       // queueIds
 
-    return(message);
+    return message;
 }
 
 //
@@ -1898,7 +1898,7 @@ CIMMessageDeserializer::_deserializeCIMGetInstanceResponseMessage(
             QueueIdStack(),        // queueIds
             cimInstance);
 
-    return(message);
+    return message;
 }
 
 //
@@ -1914,7 +1914,7 @@ CIMMessageDeserializer::_deserializeCIMDeleteInstanceResponseMessage(
             CIMException(),        // cimException
             QueueIdStack());       // queueIds
 
-    return(message);
+    return message;
 }
 
 //
@@ -1935,7 +1935,7 @@ CIMMessageDeserializer::_deserializeCIMCreateInstanceResponseMessage(
             QueueIdStack(),        // queueIds
             instanceName);
 
-    return(message);
+    return message;
 }
 
 //
@@ -1951,7 +1951,7 @@ CIMMessageDeserializer::_deserializeCIMModifyInstanceResponseMessage(
             CIMException(),        // cimException
             QueueIdStack());       // queueIds
 
-    return(message);
+    return message;
 }
 
 //
@@ -1980,7 +1980,7 @@ CIMMessageDeserializer::_deserializeCIMEnumerateInstancesResponseMessage(
             QueueIdStack(),        // queueIds
             cimNamedInstances);
 
-    return(message);
+    return message;
 }
 
 //
@@ -2009,7 +2009,7 @@ CIMMessageDeserializer::_deserializeCIMEnumerateInstanceNamesResponseMessage(
             QueueIdStack(),        // queueIds
             instanceNames);
 
-    return(message);
+    return message;
 }
 
 //
@@ -2038,7 +2038,7 @@ CIMMessageDeserializer::_deserializeCIMExecQueryResponseMessage(
             QueueIdStack(),        // queueIds
             cimObjects);
 
-    return(message);
+    return message;
 }
 
 //
@@ -2067,7 +2067,7 @@ CIMMessageDeserializer::_deserializeCIMAssociatorsResponseMessage(
             QueueIdStack(),        // queueIds
             cimObjects);
 
-    return(message);
+    return message;
 }
 
 //
@@ -2096,7 +2096,7 @@ CIMMessageDeserializer::_deserializeCIMAssociatorNamesResponseMessage(
             QueueIdStack(),        // queueIds
             objectNames);
 
-    return(message);
+    return message;
 }
 
 //
@@ -2125,7 +2125,7 @@ CIMMessageDeserializer::_deserializeCIMReferencesResponseMessage(
             QueueIdStack(),        // queueIds
             cimObjects);
 
-    return(message);
+    return message;
 }
 
 //
@@ -2154,7 +2154,7 @@ CIMMessageDeserializer::_deserializeCIMReferenceNamesResponseMessage(
             QueueIdStack(),        // queueIds
             objectNames);
 
-    return(message);
+    return message;
 }
 
 //
@@ -2175,7 +2175,7 @@ CIMMessageDeserializer::_deserializeCIMGetPropertyResponseMessage(
             QueueIdStack(),        // queueIds
             value.getValue());
 
-    return(message);
+    return message;
 }
 
 //
@@ -2191,7 +2191,7 @@ CIMMessageDeserializer::_deserializeCIMSetPropertyResponseMessage(
             CIMException(),        // cimException
             QueueIdStack());       // queueIds
 
-    return(message);
+    return message;
 }
 
 //
@@ -2228,7 +2228,7 @@ CIMMessageDeserializer::_deserializeCIMInvokeMethodResponseMessage(
             outParameters,
             methodName);
 
-    return(message);
+    return message;
 }
 
 
@@ -2251,7 +2251,7 @@ CIMMessageDeserializer::_deserializeCIMCreateSubscriptionResponseMessage(
             CIMException(),        // cimException
             QueueIdStack());       // queueIds
 
-    return(message);
+    return message;
 }
 
 //
@@ -2267,7 +2267,7 @@ CIMMessageDeserializer::_deserializeCIMModifySubscriptionResponseMessage(
             CIMException(),        // cimException
             QueueIdStack());       // queueIds
 
-    return(message);
+    return message;
 }
 
 //
@@ -2283,7 +2283,7 @@ CIMMessageDeserializer::_deserializeCIMDeleteSubscriptionResponseMessage(
             CIMException(),        // cimException
             QueueIdStack());       // queueIds
 
-    return(message);
+    return message;
 }
 
 
@@ -2306,7 +2306,7 @@ CIMMessageDeserializer::_deserializeCIMExportIndicationResponseMessage(
             CIMException(),        // cimException
             QueueIdStack());       // queueIds
 
-    return(message);
+    return message;
 }
 
 //
@@ -2322,7 +2322,7 @@ CIMMessageDeserializer::_deserializeCIMProcessIndicationResponseMessage(
             CIMException(),        // cimException
             QueueIdStack());       // queueIds
 
-    return(message);
+    return message;
 }
 
 //
@@ -2353,7 +2353,7 @@ CIMMessageDeserializer::_deserializeCIMDisableModuleResponseMessage(
             QueueIdStack(),        // queueIds
             operationalStatus);
 
-    return(message);
+    return message;
 }
 
 //
@@ -2384,7 +2384,7 @@ CIMMessageDeserializer::_deserializeCIMEnableModuleResponseMessage(
             QueueIdStack(),        // queueIds
             operationalStatus);
 
-    return(message);
+    return message;
 }
 
 //
@@ -2400,7 +2400,7 @@ CIMMessageDeserializer::_deserializeCIMStopAllProvidersResponseMessage(
             CIMException(),        // cimException
             QueueIdStack());       // queueIds
 
-    return(message);
+    return message;
 }
 
 //
@@ -2416,7 +2416,7 @@ CIMMessageDeserializer::_deserializeCIMInitializeProviderResponseMessage(
             CIMException(),        // cimException
             QueueIdStack());       // queueIds
 
-    return(message);
+    return message;
 }
 
 //
@@ -2432,7 +2432,7 @@ CIMMessageDeserializer::_deserializeCIMInitializeProviderAgentResponseMessage(
             CIMException(),        // cimException
             QueueIdStack());       // queueIds
 
-    return(message);
+    return message;
 }
 
 //
@@ -2448,7 +2448,7 @@ CIMMessageDeserializer::_deserializeCIMNotifyConfigChangeResponseMessage(
             CIMException(),        // cimException
             QueueIdStack());       // queueIds
 
-    return(message);
+    return message;
 }
 
 //
@@ -2464,7 +2464,7 @@ CIMMessageDeserializer::_deserializeCIMSubscriptionInitCompleteResponseMessage(
             CIMException(),        // cimException
             QueueIdStack());       // queueIds
 
-    return(message);
+    return message;
 }
 
 PEGASUS_NAMESPACE_END
index a100a0843ec9b3932910f99b1417e3f9101d698e..bc828407c8de8114121a08544ed97b95872d69e6 100644 (file)
 //
 //==============================================================================
 //
-// Author: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//
-// Modified By: Carol Ann Krug Graves, Hewlett-Packard Company
-//                  (carolann_graves@hp.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_CIMMessageDeserializer_h
index 37dc5bff5d030cea11665a5a46aa60ea28272bbb..51d3fa2fc742db2f2a78b26f1d67cb3fc0028093 100644 (file)
@@ -553,7 +553,7 @@ void CIMMessageSerializer::_serializeOperationContext(
 
     // Note: OperationContext class does not allow iteration through Containers
 
-    if(operationContext.contains(IdentityContainer::NAME))
+    if (operationContext.contains(IdentityContainer::NAME))
     {
         const IdentityContainer container =
             operationContext.get(IdentityContainer::NAME);
@@ -563,7 +563,7 @@ void CIMMessageSerializer::_serializeOperationContext(
         XmlWriter::append(out, "</PGOCID>\n");
     }
 
-    if(operationContext.contains(SubscriptionInstanceContainer::NAME))
+    if (operationContext.contains(SubscriptionInstanceContainer::NAME))
     {
         const SubscriptionInstanceContainer container =
             operationContext.get(SubscriptionInstanceContainer::NAME);
@@ -573,7 +573,7 @@ void CIMMessageSerializer::_serializeOperationContext(
         XmlWriter::append(out, "</PGOCSI>\n");
     }
 
-    if(operationContext.contains(SubscriptionFilterConditionContainer::NAME))
+    if (operationContext.contains(SubscriptionFilterConditionContainer::NAME))
     {
         const SubscriptionFilterConditionContainer container =
             operationContext.get(SubscriptionFilterConditionContainer::NAME);
@@ -584,7 +584,7 @@ void CIMMessageSerializer::_serializeOperationContext(
         XmlWriter::append(out, "</PGOCSFC>\n");
     }
 
-    if(operationContext.contains(SubscriptionFilterQueryContainer::NAME))
+    if (operationContext.contains(SubscriptionFilterQueryContainer::NAME))
     {
         const SubscriptionFilterQueryContainer container =
             operationContext.get(SubscriptionFilterQueryContainer::NAME);
@@ -596,7 +596,7 @@ void CIMMessageSerializer::_serializeOperationContext(
         XmlWriter::append(out, "</PGOCSFQ>\n");
     }
 
-    if(operationContext.contains(SubscriptionInstanceNamesContainer::NAME))
+    if (operationContext.contains(SubscriptionInstanceNamesContainer::NAME))
     {
         const SubscriptionInstanceNamesContainer container =
             operationContext.get(SubscriptionInstanceNamesContainer::NAME);
@@ -612,7 +612,7 @@ void CIMMessageSerializer::_serializeOperationContext(
         XmlWriter::append(out, "</PGOCSIN>\n");
     }
 
-    if(operationContext.contains(TimeoutContainer::NAME))
+    if (operationContext.contains(TimeoutContainer::NAME))
     {
         const TimeoutContainer container =
             operationContext.get(TimeoutContainer::NAME);
@@ -622,7 +622,7 @@ void CIMMessageSerializer::_serializeOperationContext(
         XmlWriter::append(out, "</PGOCTO>\n");
     }
 
-    if(operationContext.contains(AcceptLanguageListContainer::NAME))
+    if (operationContext.contains(AcceptLanguageListContainer::NAME))
     {
         const AcceptLanguageListContainer container =
             operationContext.get(AcceptLanguageListContainer::NAME);
@@ -632,7 +632,7 @@ void CIMMessageSerializer::_serializeOperationContext(
         XmlWriter::append(out, "</PGOCALL>\n");
     }
 
-    if(operationContext.contains(ContentLanguageListContainer::NAME))
+    if (operationContext.contains(ContentLanguageListContainer::NAME))
     {
         const ContentLanguageListContainer container =
             operationContext.get(ContentLanguageListContainer::NAME);
@@ -642,7 +642,7 @@ void CIMMessageSerializer::_serializeOperationContext(
         XmlWriter::append(out, "</PGOCCLL>\n");
     }
 
-    if(operationContext.contains(SnmpTrapOidContainer::NAME))
+    if (operationContext.contains(SnmpTrapOidContainer::NAME))
     {
         const SnmpTrapOidContainer container =
             operationContext.get(SnmpTrapOidContainer::NAME);
@@ -652,7 +652,7 @@ void CIMMessageSerializer::_serializeOperationContext(
         XmlWriter::append(out, "</PGOCSTO>\n");
     }
 
-    if(operationContext.contains(LocaleContainer::NAME))
+    if (operationContext.contains(LocaleContainer::NAME))
     {
         const LocaleContainer container =
             operationContext.get(LocaleContainer::NAME);
@@ -662,7 +662,7 @@ void CIMMessageSerializer::_serializeOperationContext(
         XmlWriter::append(out, "</PGOCL>\n");
     }
 
-    if(operationContext.contains(ProviderIdContainer::NAME))
+    if (operationContext.contains(ProviderIdContainer::NAME))
     {
         const ProviderIdContainer container =
             operationContext.get(ProviderIdContainer::NAME);
index 4dee635cb18f6ff157722d124e1569f298218a22..c9fa5269ae09b904b3f3927f6186710eeac84c64 100644 (file)
 //
 //==============================================================================
 //
-// Author: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//
-// Modified By: David Dillard, VERITAS Software Corp.
-//                  (david.dillard@veritas.com)
-//              Carol Ann Krug Graves, Hewlett-Packard Company
-//                  (carolann_graves@hp.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_CIMMessageSerializer_h
index b8c688c13be592634bd7ebcc8a4229d5b86fef17..01e9333dc8dae54f82fe8ada10acaa6a0a7ea844 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//              Carol Ann Krug Graves, Hewlett-Packard Company
-//                (carolann_graves@hp.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include "CIMMethod.h"
@@ -220,7 +214,7 @@ Uint32 CIMMethod::getParameterCount() const
 
 Boolean CIMMethod::isUninitialized() const
 {
-    return (_rep == 0)? true : false;
+    return _rep == 0;
 }
 
 Boolean CIMMethod::identical(const CIMConstMethod& x) const
@@ -359,7 +353,7 @@ Uint32 CIMConstMethod::getParameterCount() const
 
 Boolean CIMConstMethod::isUninitialized() const
 {
-    return (_rep == 0)? true : false;
+    return _rep == 0;
 }
 
 Boolean CIMConstMethod::identical(const CIMConstMethod& x) const
index d42547c8a995f0832a9a5c19bd46d7616ee0bff8..77726ad962ec13e61f5e4ac56873248229985f16 100644 (file)
@@ -335,7 +335,7 @@ public:
         <pre>
             // remove all qualifiers from a class
             Uint32 count = 0;
-            while((count = cimClass.getQualifierCount()) > 0)
+            while ((count = cimClass.getQualifierCount()) > 0)
                 cimClass.removeQualifier(count - 1);
         </pre>
         @param index The index of the qualifier to remove.
index 619e8841b5f319e00b35f443283e7756e1ec6e6c..3a71685bab7037e6947e3f78ecd5a80827f11413 100644 (file)
@@ -40,7 +40,7 @@
 #include "CIMScope.h"
 #include "XmlWriter.h"
 #include "MofWriter.h"
-#include <Pegasus/Common/MessageLoader.h> //l10n
+#include <Pegasus/Common/MessageLoader.h>
 #include "StrLit.h"
 
 PEGASUS_NAMESPACE_BEGIN
@@ -75,7 +75,7 @@ CIMMethodRep::CIMMethodRep(
     _classOrigin(classOrigin), _propagated(propagated)
 {
     // ensure name is not null
-    if(name.isNull())
+    if (name.isNull())
     {
         throw UninitializedObjectException();
     }
@@ -88,7 +88,7 @@ CIMMethodRep::~CIMMethodRep()
 void CIMMethodRep::setName(const CIMName& name)
 {
     // ensure name is not null
-    if(name.isNull())
+    if (name.isNull())
     {
         throw UninitializedObjectException();
     }
index 42a7d1ea8296d457ddafd308d4e7dbeb9867900d..6dffe1bc0775d567b659b2f2ebdef0885965821c 100644 (file)
@@ -29,8 +29,6 @@
 //
 //==============================================================================
 //
-// Author: Mike Brasher, Inova Europe (mike-brasher@austin.rr.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #define Pegasus_CIMNameInline_cxx
index 425e1013e306ed0823cba150a829e5e5ce791776..4cf0cc165f1acf18d01a9b4c8e8a17ad8bf6d7ab 100644 (file)
@@ -67,7 +67,7 @@ PEGASUS_CIMNAME_INLINE const String& CIMName::getString() const
 
 PEGASUS_CIMNAME_INLINE Boolean CIMName::isNull() const
 {
-    return (cimName.size() == 0);
+    return cimName.size() == 0;
 }
 
 PEGASUS_CIMNAME_INLINE void CIMName::clear()
@@ -132,7 +132,7 @@ PEGASUS_CIMNAME_INLINE const String& CIMNamespaceName::getString() const
 
 PEGASUS_CIMNAME_INLINE Boolean CIMNamespaceName::isNull() const
 {
-    return (cimNamespaceName.size() == 0);
+    return cimNamespaceName.size() == 0;
 }
 
 PEGASUS_CIMNAME_INLINE void CIMNamespaceName::clear()
index be00d5dfefeee8ea167769c2daf9e742f3d8e5ea..0024bb129b325311187700f8f1d971952615f269 100644 (file)
@@ -103,10 +103,10 @@ const CIMObjectPath& CIMObject::getPath() const
     return _rep->getPath();
 }
 
-void CIMObject::setPath (const CIMObjectPath & path)
+void CIMObject::setPath(const CIMObjectPath & path)
 {
-    _checkRep ();
-    _rep->setPath (path);
+    _checkRep();
+    _rep->setPath(path);
 }
 
 CIMObject& CIMObject::addQualifier(const CIMQualifier& qualifier)
@@ -185,13 +185,13 @@ Uint32 CIMObject::getPropertyCount() const
 
 Boolean CIMObject::isUninitialized() const
 {
-    return (_rep == 0)? true : false;
+    return _rep == 0;
 }
 
-String CIMObject::toString () const
+String CIMObject::toString() const
 {
     Buffer out;
-    
+
     _checkRep();
     _rep->toXml(out);
     out.append('\0');
@@ -199,11 +199,11 @@ String CIMObject::toString () const
     return out.getData();
 }
 
-Boolean CIMObject::isClass () const
+Boolean CIMObject::isClass() const
 {
     try
     {
-        const CIMClass c (*this);
+        const CIMClass c(*this);
         return true;
     }
     catch (DynamicCastFailedException&)
@@ -212,11 +212,11 @@ Boolean CIMObject::isClass () const
     }
 }
 
-Boolean CIMObject::isInstance () const
+Boolean CIMObject::isInstance() const
 {
     try
     {
-        const CIMInstance i (*this);
+        const CIMInstance i(*this);
         return true;
     }
     catch (DynamicCastFailedException&)
@@ -350,13 +350,13 @@ Uint32 CIMConstObject::getPropertyCount() const
 
 Boolean CIMConstObject::isUninitialized() const
 {
-    return (_rep == 0)? true : false;
+    return _rep == 0;
 }
 
-String CIMConstObject::toString () const
+String CIMConstObject::toString() const
 {
     Buffer out;
-    
+
     _checkRep();
     _rep->toXml(out);
     out.append('\0');
index e43249858e67e9cd4ad37d258e459829dd34a676..edda7df76bb100a4caafb090a3d45fcad433353a 100644 (file)
@@ -352,12 +352,12 @@ Boolean operator==(const CIMKeyBinding& x, const CIMKeyBinding& y)
         catch (Exception&)
         {
             // If CIMObjectPath parsing fails, just compare strings
-            return (String::equal(x.getValue(), y.getValue()));
+            return String::equal(x.getValue(), y.getValue());
         }
         break;
     case CIMKeyBinding::BOOLEAN:
         // Case-insensitive comparison is sufficient for booleans
-        return (String::equalNoCase(x.getValue(), y.getValue()));
+        return String::equalNoCase(x.getValue(), y.getValue());
         break;
     case CIMKeyBinding::NUMERIC:
         // Note: This comparison assumes XML syntax for integers
@@ -387,10 +387,10 @@ Boolean operator==(const CIMKeyBinding& x, const CIMKeyBinding& y)
         }
         // Note: Keys may not be real values, so don't try comparing as reals
         // We couldn't parse the numbers, so just compare the strings
-        return (String::equal(x.getValue(), y.getValue()));
+        return String::equal(x.getValue(), y.getValue());
         break;
     default:  // CIMKeyBinding::STRING
-        return (String::equal(x.getValue(), y.getValue()));
+        return String::equal(x.getValue(), y.getValue());
         break;
     }
 
@@ -552,7 +552,8 @@ public:
                     // If a non-digit is encountered, set "all-numeric"
                     // flag to false
                     if (isalpha(hostname[i]) || (hostname[i] == '-') ||
-                                                (hostname[i] == '_')) {
+                                                (hostname[i] == '_'))
+                    {
                         hostSegmentIsNumeric = false;
                     }
                     i++;
@@ -566,7 +567,8 @@ public:
             }
             // If the last Host Segment is all numeric, then return false.
             // RFC 1123 says "highest-level component label will be alphabetic".
-            if (hostSegmentIsNumeric) {
+            if (hostSegmentIsNumeric)
+            {
                 return false;
             }
         }
index fd4b1a64d9040b0b5da6c6300969552bfe51daeb..52683d4b88470dd005158fd207b3975661e06a25 100644 (file)
@@ -62,7 +62,7 @@ CIMObjectRep::CIMObjectRep(const CIMObjectPath& reference)
     : _resolved(false)
 {
     // ensure the class name is not null
-    if(reference.getClassName().isNull())
+    if (reference.getClassName().isNull())
     {
         throw UninitializedObjectException();
     }
@@ -104,11 +104,11 @@ Uint32 CIMObjectRep::findProperty(const CIMName& name) const
     {
         if (name.equal(_properties[i].getName()))
         {
-            return(i);
+            return i;
         }
     }
 
-    return(PEG_NOT_FOUND);
+    return PEG_NOT_FOUND;
 }
 
 CIMProperty CIMObjectRep::getProperty(Uint32 index)
@@ -118,7 +118,7 @@ CIMProperty CIMObjectRep::getProperty(Uint32 index)
         throw IndexOutOfBoundsException();
     }
 
-    return(_properties[index]);
+    return _properties[index];
 }
 
 void CIMObjectRep::removeProperty(Uint32 index)
@@ -134,7 +134,7 @@ void CIMObjectRep::removeProperty(Uint32 index)
 
 Uint32 CIMObjectRep::getPropertyCount() const
 {
-    return(_properties.size());
+    return _properties.size();
 }
 
 
@@ -142,12 +142,12 @@ Boolean CIMObjectRep::identical(const CIMObjectRep* x) const
 {
     if (!_reference.identical(x->_reference))
     {
-        return(false);
+        return false;
     }
 
     if (!_qualifiers.identical(x->_qualifiers))
     {
-        return(false);
+        return false;
     }
 
     // Compare properties:
@@ -158,36 +158,36 @@ Boolean CIMObjectRep::identical(const CIMObjectRep* x) const
 
         if (tmp1.size() != tmp2.size())
         {
-            return(false);
+            return false;
         }
 
         for (Uint32 i = 0, n = tmp1.size(); i < n; i++)
         {
             if (!tmp1[i].identical(tmp2[i]))
             {
-                return(false);
+                return false;
             }
         }
     }
 
     if (_resolved != x->_resolved)
     {
-        return(false);
+        return false;
     }
 
-    return(true);
+    return true;
 }
 
 void CIMObjectRep::setPath(const CIMObjectPath& path)
 {
     // ensure the class name is not null
-    if(path.getClassName().isNull())
+    if (path.getClassName().isNull())
     {
         throw UninitializedObjectException();
     }
 
     // prevent changing the class name (type) in when updating the object path
-    if(!_reference.getClassName().equal(path.getClassName()))
+    if (!_reference.getClassName().equal(path.getClassName()))
     {
         throw TypeMismatchException();
     }
index efad692525851f2a75db7fa60660aa01793db662..83a751198da83df7f7ab33a062c56b31f698c22e 100644 (file)
@@ -117,7 +117,7 @@ void CIMParamValue::setIsTyped(Boolean isTyped)
 
 Boolean CIMParamValue::isUninitialized() const
 {
-    return (_rep == 0)? true : false;
+    return _rep == 0;
 }
 
 CIMParamValue CIMParamValue::clone() const
index 60146f713e35b4ca360c57d056a0418831855dc0..d84da73a5a9c7d8370cd82b7e12f5a1459fed9b6 100644 (file)
@@ -46,7 +46,7 @@ CIMParamValueRep::CIMParamValueRep(
     : _parameterName(parameterName), _value(value), _isTyped(isTyped)
 {
     // ensure parameterName is not null
-    if(parameterName.size() == 0)
+    if (parameterName.size() == 0)
     {
         throw UninitializedObjectException();
     }
@@ -118,7 +118,7 @@ CIMParamValueRep::CIMParamValueRep(const CIMParamValueRep& x) :
 void CIMParamValueRep::setParameterName(String& parameterName)
 {
     // ensure parameterName is not null
-    if(parameterName.size() == 0)
+    if (parameterName.size() == 0)
     {
         throw UninitializedObjectException();
     }
index e010f98eb060cb25db27c0a8f25a8eeaf2afb909..e3be13c08269a36ff8b7ad0f9445abfb0c732909 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//              Carol Ann Krug Graves, Hewlett-Packard Company
-//                (carolann_graves@hp.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include "CIMParameter.h"
@@ -168,7 +162,7 @@ Uint32 CIMParameter::getQualifierCount() const
 
 Boolean CIMParameter::isUninitialized() const
 {
-    return (_rep == 0)? true : false;
+    return _rep == 0;
 }
 
 Boolean CIMParameter::identical(const CIMConstParameter& x) const
@@ -297,7 +291,7 @@ Uint32 CIMConstParameter::getQualifierCount() const
 
 Boolean CIMConstParameter::isUninitialized() const
 {
-    return (_rep == 0)? true : false;
+    return _rep == 0;
 }
 
 Boolean CIMConstParameter::identical(const CIMConstParameter& x) const
index c48dded407d430323312d132bfb8ae3edb7f3fb2..0b0c414ba27678aad2a743e3aacd02af8cb754c4 100644 (file)
@@ -69,12 +69,12 @@ CIMParameterRep::CIMParameterRep(
     _referenceClassName(referenceClassName)
 {
     // ensure name is not null
-    if(name.isNull())
+    if (name.isNull())
     {
         throw UninitializedObjectException();
     }
 
-    if((_arraySize != 0) && !_isArray)
+    if ((_arraySize != 0) && !_isArray)
     {
         throw TypeMismatchException();
     }
@@ -102,7 +102,7 @@ CIMParameterRep::~CIMParameterRep()
 void CIMParameterRep::setName(const CIMName& name)
 {
     // ensure name is not null
-    if(name.isNull())
+    if (name.isNull())
     {
         throw UninitializedObjectException();
     }
index 78c8e50891ca19485319bd4cd79b5a85a221bf41..8fadc34c78a204d8518be6a9b86d5ac122870dbf 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//              Carol Ann Krug Graves, Hewlett-Packard Company
-//                (carolann_graves@hp.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include "CIMPropertyRep.h"
@@ -197,7 +191,7 @@ void CIMProperty::removeQualifier(Uint32 index)
     _checkRep();
     _rep->removeQualifier(index);
 }
-    
+
 Uint32 CIMProperty::getQualifierCount() const
 {
     _checkRep();
@@ -206,7 +200,7 @@ Uint32 CIMProperty::getQualifierCount() const
 
 Boolean CIMProperty::isUninitialized() const
 {
-    return (_rep == 0)? true : false;
+    return _rep == 0;
 }
 
 Boolean CIMProperty::identical(const CIMConstProperty& x) const
@@ -353,7 +347,7 @@ Uint32 CIMConstProperty::getQualifierCount() const
 
 Boolean CIMConstProperty::isUninitialized() const
 {
-    return (_rep == 0)? true : false;
+    return _rep == 0;
 }
 
 Boolean CIMConstProperty::identical(const CIMConstProperty& x) const
index 7090c597058bcacd006b17a6ed0b2ccccca36371..bde42a11a4c355b02f0064bcd930bc9cdc4b7b03 100644 (file)
@@ -68,9 +68,9 @@ CIMPropertyList::CIMPropertyList(const Array<CIMName>& propertyNames)
     // which has a add() method that would validate one at a time.
 
     // ensure names are not null
-    for(Uint32 i = 0, n = propertyNames.size(); i < n; i++)
+    for (Uint32 i = 0, n = propertyNames.size(); i < n; i++)
     {
-        if(propertyNames[i].isNull())
+        if (propertyNames[i].isNull())
         {
             throw UninitializedObjectException();
         }
@@ -95,9 +95,9 @@ void CIMPropertyList::set(const Array<CIMName>& propertyNames)
     // which has a add() method that would validate one at a time.
 
     // ensure names are not null
-    for(Uint32 i = 0, n = propertyNames.size(); i < n; i++)
+    for (Uint32 i = 0, n = propertyNames.size(); i < n; i++)
     {
-        if(propertyNames[i].isNull())
+        if (propertyNames[i].isNull())
         {
             throw UninitializedObjectException();
         }
index 912a30c56eaa78739bfd4f3c85094b6fa55c9b7d..6db37230400b1192224b4a9d54b74cd2153d3bee 100644 (file)
@@ -78,7 +78,7 @@ CIMPropertyRep::CIMPropertyRep(
     _propagated(propagated)
 {
     // ensure name is not null
-    if(name.isNull())
+    if (name.isNull())
     {
         throw UninitializedObjectException();
     }
@@ -117,7 +117,7 @@ CIMPropertyRep::~CIMPropertyRep()
 void CIMPropertyRep::setName(const CIMName& name)
 {
     // ensure name is not null
-    if(name.isNull())
+    if (name.isNull())
     {
         throw UninitializedObjectException();
     }
@@ -179,21 +179,21 @@ void CIMPropertyRep::resolve(
         CIMName inheritedClassName;
         Array<CIMName> classNames;
 
-        if(isEmbeddedInst)
+        if (isEmbeddedInst)
         {
             Uint32 pos = inheritedProperty.findQualifier("EmbeddedInstance");
-            if(pos != PEG_NOT_FOUND)
+            if (pos != PEG_NOT_FOUND)
             {
                 String qualStr;
                 inheritedProperty.getQualifier(pos).getValue().get(qualStr);
                 inheritedClassName = qualStr;
             }
 
-            if(_value.isArray())
+            if (_value.isArray())
             {
                 Array<CIMInstance> embeddedInstances;
                 _value.get(embeddedInstances);
-                for(Uint32 i = 0, n = embeddedInstances.size(); i < n; ++i)
+                for (Uint32 i = 0, n = embeddedInstances.size(); i < n; ++i)
                 {
                     classNames.append(embeddedInstances[i].getClassName());
                 }
@@ -232,28 +232,28 @@ void CIMPropertyRep::resolve(
         // very closely related types.
         Array<CIMName> successTree;
         successTree.append(inheritedClassName);
-        for(Uint32 i = 0, n = classNames.size(); i < n; ++i)
+        for (Uint32 i = 0, n = classNames.size(); i < n; ++i)
         {
             Array<CIMName> traversalHistory;
             CIMName currentName = classNames[i];
             Boolean found = false;
-            while(!found && !currentName.isNull())
+            while (!found && !currentName.isNull())
             {
-                for(Uint32 j = 0, m = successTree.size(); j < m; ++j)
+                for (Uint32 j = 0, m = successTree.size(); j < m; ++j)
                 {
-                    if(currentName == successTree[j])
+                    if (currentName == successTree[j])
                     {
                         found = true;
                         break;
                     }
                 }
 
-                if(!found)
+                if (!found)
                 {
                     traversalHistory.append(currentName);
                     CIMClass currentClass = declContext->lookupClass(
                             nameSpace, currentName);
-                    if(currentClass.isUninitialized())
+                    if (currentClass.isUninitialized())
                     {
                         throw PEGASUS_CIM_EXCEPTION(
                                 CIM_ERR_NOT_FOUND, currentName.getString());
@@ -262,7 +262,7 @@ void CIMPropertyRep::resolve(
                 }
             }
 
-            if(!found)
+            if (!found)
             {
                 throw TypeMismatchException();
             }
@@ -353,7 +353,7 @@ void CIMPropertyRep::toXml(Buffer& out) const
 #endif
         }
 #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
-        else if(_value.getType() == CIMTYPE_INSTANCE)
+        else if (_value.getType() == CIMTYPE_INSTANCE)
         {
             // If the property array type is CIMInstance, then
             //   encode the property in CIM-XML as a string array with the
index cad0a76738f0714a3d650f3beca84a6018538963..128288395be9255c7e9f83b2efbf974f7cdfdf82 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//              Carol Ann Krug Graves, Hewlett-Packard Company
-//                (carolann_graves@hp.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include "CIMQualifier.h"
@@ -160,7 +154,7 @@ void CIMQualifier::setPropagated(Boolean propagated)
 
 Boolean CIMQualifier::isUninitialized() const
 {
-    return (_rep == 0)? true : false;
+    return _rep == 0;
 }
 
 Boolean CIMQualifier::identical(const CIMConstQualifier& x) const
@@ -277,7 +271,7 @@ const Uint32 CIMConstQualifier::getPropagated() const
 
 Boolean CIMConstQualifier::isUninitialized() const
 {
-    return (_rep == 0)? true : false;
+    return _rep == 0;
 }
 
 Boolean CIMConstQualifier::identical(const CIMConstQualifier& x) const
index 0b6cff98dbe50c4d78b918fe7bec1ec90891f852..1ea79cbc0e2b4cc8e472593bd602981788073513 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//              Carol Ann Krug Graves, Hewlett-Packard Company
-//                (carolann_graves@hp.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include "CIMQualifierDecl.h"
@@ -149,7 +143,7 @@ Uint32 CIMQualifierDecl::getArraySize() const
 
 Boolean CIMQualifierDecl::isUninitialized() const
 {
-    return (_rep == 0)? true : false;
+    return _rep == 0;
 }
 
 Boolean CIMQualifierDecl::identical(const CIMConstQualifierDecl& x) const
@@ -275,7 +269,7 @@ Uint32 CIMConstQualifierDecl::getArraySize() const
 
 Boolean CIMConstQualifierDecl::isUninitialized() const
 {
-    return (_rep == 0)? true : false;
+    return _rep == 0;
 }
 
 Boolean CIMConstQualifierDecl::identical(const CIMConstQualifierDecl& x) const
index 340da401312be6bdb351ea879f60f0d2e4ee3be6..360986edfad62137394512a7b1dd973d9dc15562 100644 (file)
@@ -107,8 +107,8 @@ public:
         @exception UninitializedObjectException If the qualifier name is null.
     */
     CIMQualifierDecl(
-        const CIMName& name, 
-        const CIMValue& value, 
+        const CIMName& name,
+        const CIMValue& value,
         const CIMScope & scope,
         const CIMFlavor & flavor = CIMFlavor (CIMFlavor::DEFAULTS),
         Uint32 arraySize = 0);
@@ -205,7 +205,7 @@ public:
         @return True if the object has not been initialized, false otherwise.
     */
     Boolean isUninitialized() const;
-    
+
     /**
         Compares the qualifier declaration with another qualifier declaration.
         @param x The CIMConstQualifierDecl to be compared.
@@ -299,8 +299,8 @@ public:
         @exception UninitializedObjectException If the qualifier name is null.
     */
     CIMConstQualifierDecl(
-        const CIMName& name, 
-        const CIMValue& value, 
+        const CIMName& name,
+        const CIMValue& value,
         const CIMScope & scope,
         const CIMFlavor & flavor = CIMFlavor (CIMFlavor::DEFAULTS),
         Uint32 arraySize = 0);
index 7fd5661c5466e4684d86c4e30b57d4f193377cd1..9c40a2c79bf7c88cb153791a748455647eefa3f6 100644 (file)
@@ -63,7 +63,7 @@ CIMQualifierDeclRep::CIMQualifierDeclRep(
     _arraySize(arraySize)
 {
     // ensure name is not null
-    if(name.isNull())
+    if (name.isNull())
     {
         throw UninitializedObjectException();
     }
@@ -77,12 +77,12 @@ CIMQualifierDeclRep::CIMQualifierDeclRep(
     // favors restricted and disable override
     //ATTN: This should become an exception in case conflicting entities are
     // set.
-    if(!(_flavor.hasFlavor (CIMFlavor::RESTRICTED)))
+    if (!(_flavor.hasFlavor (CIMFlavor::RESTRICTED)))
         _flavor.addFlavor (CIMFlavor::TOSUBCLASS);
     else
         _flavor.removeFlavor (CIMFlavor::TOSUBCLASS);
 
-    if(!(_flavor.hasFlavor (CIMFlavor::DISABLEOVERRIDE)))
+    if (!(_flavor.hasFlavor (CIMFlavor::DISABLEOVERRIDE)))
         _flavor.addFlavor (CIMFlavor::ENABLEOVERRIDE);
     else
         _flavor.removeFlavor (CIMFlavor::ENABLEOVERRIDE);
@@ -97,7 +97,7 @@ CIMQualifierDeclRep::~CIMQualifierDeclRep()
 void CIMQualifierDeclRep::setName(const CIMName& name)
 {
     // ensure name is not null
-    if(name.isNull())
+    if (name.isNull())
     {
         throw UninitializedObjectException();
     }
index 31fcdaa0fde841dc229bae9e0407ee0e6b51a005..5ce0ef61a2b00455f6cf8e00ad394d003440cf12 100644 (file)
@@ -40,7 +40,7 @@
 #include "XmlWriter.h"
 #include "MofWriter.h"
 #include <Pegasus/Common/Tracer.h>
-#include <Pegasus/Common/MessageLoader.h> //l10n
+#include <Pegasus/Common/MessageLoader.h>
 #include "StrLit.h"
 #include "ArrayIterator.h"
 
@@ -62,7 +62,8 @@ CIMQualifierList& CIMQualifierList::add(const CIMQualifier& qualifier)
     if (qualifier.isUninitialized())
         throw UninitializedObjectException();
 
-    if (find(qualifier.getName()) != PEG_NOT_FOUND){
+    if (find(qualifier.getName()) != PEG_NOT_FOUND)
+    {
         MessageLoaderParms parms("Common.CIMQualifierList.QUALIFIER",
             "qualifier \"$0\"",
             qualifier.getName().getString());
@@ -176,13 +177,13 @@ void CIMQualifierList::resolve(
         // 3. If the qualifier is the EmbeddedInstance qualifier, then check
         // that the class specified by the qualifier exists in the namespace.
         //----------------------------------------------------------------------
-        if(q.getName().equal(CIMName("EmbeddedInstance")))
+        if (q.getName().equal(CIMName("EmbeddedInstance")))
         {
             String className;
             q.getValue().get(className);
             CIMClass classDef = declContext->lookupClass(nameSpace,
                     CIMName(className));
-            if(classDef.isUninitialized())
+            if (classDef.isUninitialized())
             {
                 String embeddedInstType("EmbeddedInstance(\"");
                 embeddedInstType = embeddedInstType + className + "\")";
@@ -306,7 +307,7 @@ void CIMQualifierList::resolve(
         // keep current value. Note we have already eliminated any possibity
         // that a nonoverridable qualifier can be in the list.
         // Note that there is no exists() function ATTN:KS 25 Mar 2002
-        if(find(iq.getName()) != PEG_NOT_FOUND)
+        if (find(iq.getName()) != PEG_NOT_FOUND)
             continue;
 
         CIMQualifier q = iq.clone();
index 352ce99774d4ce292277d50018739f22cee5682a..49279b57cd9b3a83f0042f5d86f33bd2a413ef42 100644 (file)
@@ -130,7 +130,7 @@ public:
 
     Boolean exists(const CIMName& name) const
     {
-        return (((find(name)) == PEG_NOT_FOUND)? false : true);
+        return (find(name) != PEG_NOT_FOUND);
     }
 
     /** isTrue - Determines if the qualifier defined by
index d80e94fad7b67289f496579bfdab8b372847c942..f34c1bf9d0b9e8c8b864ba37fbaf3e6fa43500b4 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By: Carol Ann Krug Graves, Hewlett-Packard Company
-//                (carolann_graves@hp.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include "CIMQualifierNames.h"
index e762539a7102759b4dfc7bd9af11915358dcf9cd..ff38d20bbdb778e0e8ea44529d08243cf2ea8992 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By:
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_QualifierNames_h
index dffbe62f0acad908632150a6a857f247b71ea70c..8c8def0b5a31976ca373e6519a922f86fefc2df1 100644 (file)
@@ -74,7 +74,7 @@ CIMQualifierRep::CIMQualifierRep(
     _propagated(propagated)
 {
     // ensure name is not null
-    if(name.isNull())
+    if (name.isNull())
     {
         throw UninitializedObjectException();
     }
@@ -87,7 +87,7 @@ CIMQualifierRep::~CIMQualifierRep()
 void CIMQualifierRep::setName(const CIMName& name)
 {
     // ensure name is not null
-    if(name.isNull())
+    if (name.isNull())
     {
         throw UninitializedObjectException();
     }
@@ -172,7 +172,7 @@ void CIMQualifierRep::toMof(Buffer& out) const
         {
             Boolean b;
             _value.get(b);
-            if(!b)
+            if (!b)
                 out << STRLIT(" (false)");
         }
         else
index e779ab4708f12fc634256f9d6dde6d120dd231be..9bc2219b6897c27312c16a9eee28d12c102de5c3 100755 (executable)
 //
 //==============================================================================
 //
-// Author: Tony Fiorentino (fiorentino_tony@emc.com)
-//
-// Modified By: Keith Petley (keithp@veritas.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include "CIMServerDescription.h"
index 43ce4800d17149977818c13419d18547553c395a..57b699d219914737c04ccb81cfec221f6454f752 100755 (executable)
 //
 //==============================================================================
 //
-// Author: Tony Fiorentino (fiorentino_tony@emc.com)
-//
-// Modified By: Keith Petley (keithp@veritas.com)
-//              Josephine Eskaline Joyce, IBM (jojustin@in.ibm.com) for Bug 3123
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_CIMServerDescription_h
@@ -75,7 +70,7 @@ public:
         @return String that contains an attribute value.
     */
     String getValue(
-        const String& attributeName, 
+        const String& attributeName,
         const String& defaultValue) const;
 
     /** Returns an attribute value Array
index dd1accb9a7c8a6370d952d5ebf13d652fbb5cffb..6c36bf9554f027622c31278ecb1eaa25bc9f96c5 100644 (file)
@@ -163,7 +163,6 @@ String cimStatusCodeToString(
     return MessageLoader::getMessage(parms);
 }
 
-// l10n 
 ContentLanguageList cimStatusCodeToString_Thread(
     String & message,
     CIMStatusCode code)
index bcc8d1b8fbc0ab6c315327da7b496dab00b4a538..11f9d7657b09bccd000bdceeda081f8b366f31dc 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//              Carol Ann Krug Graves, Hewlett-Packard Company
-//                (carolann_graves@hp.com)
-//              Dave Sudlik, IBM (dsudlik@us.ibm.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include "CIMType.h"
@@ -54,10 +47,9 @@ static const char* _typeStrings[] =
 
 static const Uint32 _NUM_TYPES = sizeof(_typeStrings) / sizeof(_typeStrings[0]);
 
-const char * cimTypeToString (
-    const CIMType type) 
+const char* cimTypeToString(const CIMType type)
 {
-    return _typeStrings [Uint32 (type)];
+    return _typeStrings[Uint32 (type)];
 }
 
 PEGASUS_NAMESPACE_END
index 937ec5a924e094582a0ecd404d1fb355af7f4e33..43e6b01519aebce3682e54d4413087f1edd7432a 100644 (file)
@@ -92,11 +92,11 @@ enum CIMType
 #endif // PEGASUS_USE_EXPERIMENTAL_INTERFACES
 };
 
-/** 
+/**
     Gets a string representation of a CIMType.
 
-    Note: the current implementation returns a string matching the first 
-    column in the table above, but that is subject to change in later 
+    Note: the current implementation returns a string matching the first
+    column in the table above, but that is subject to change in later
     revisions.
     @param type The CIMType to convert to string form.
     @return The string form of the specified CIMType.
index 28bcf43d4218098d1ff0237b1b46672b9a175dd2..99b11322cd3075ac2be673e6706ade57821b2e6d 100644 (file)
@@ -29,8 +29,6 @@
 //
 //==============================================================================
 //
-// Author: Mike Brasher, Inova Europe (mike-brasher@austin.rr.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #define Pegasus_ValueInline_cxx
index 4b5daaa20a1fc6bc123c15e6dcbb349cb9272a1f..e3009bd7a2b37fc4241c19f9346d753ac6be1afd 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//              David Dillard, VERITAS Software Corp.
-//                  (david.dillard@veritas.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include <cstdio>
index 8cf0bbd5075766545b5577133a71c0caae0a2f19..7186131cd93769fd45c3aaf098e4a7acd0796fb9 100644 (file)
@@ -29,8 +29,6 @@
 //
 //==============================================================================
 //
-// Author: Mike Brasher, Inova Europe (mike-brasher@austin.rr.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include <cctype>
@@ -48,7 +46,7 @@ PEGASUS_NAMESPACE_BEGIN
 # error "EBCDIC unsupported"
 #endif
 
-const Uint8 CharSet::_isAlphaUnder[256] = 
+const Uint8 CharSet::_isAlphaUnder[256] =
 {
     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@@ -60,7 +58,7 @@ const Uint8 CharSet::_isAlphaUnder[256] =
     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
 };
 
-const Uint8 CharSet::_isAlNumUnder[256] = 
+const Uint8 CharSet::_isAlNumUnder[256] =
 {
     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,
@@ -72,7 +70,7 @@ const Uint8 CharSet::_isAlNumUnder[256] =
     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
 };
 
-const Uint8 CharSet::_isSpace[256] = 
+const Uint8 CharSet::_isSpace[256] =
 {
     0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
     1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@@ -84,7 +82,7 @@ const Uint8 CharSet::_isSpace[256] =
     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
 };
 
-const Uint8 CharSet::_isXmlWhiteSpace[256] = 
+const Uint8 CharSet::_isXmlWhiteSpace[256] =
 {
     0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
     1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@@ -96,7 +94,7 @@ const Uint8 CharSet::_isXmlWhiteSpace[256] =
     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
 };
 
-const Uint8 CharSet::_toUpper[256] = 
+const Uint8 CharSet::_toUpper[256] =
 {
     0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
     0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
@@ -132,7 +130,7 @@ const Uint8 CharSet::_toUpper[256] =
     0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF,
 };
 
-const Uint8 CharSet::_toLower[256] = 
+const Uint8 CharSet::_toLower[256] =
 {
     0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
     0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
index 7c30e13d2625b6fe8f5ce322134f2d338dafb257..c6bd2ed97903fdecfb49363f460c829dc82c6535 100644 (file)
@@ -239,7 +239,7 @@ ThreadReturnType PEGASUS_THREAD_CDECL cimom::_routing_proc(void *parm)
         }
     } // loop
 
-    return(0);
+    return 0;
 }
 
 
@@ -598,7 +598,7 @@ void cimom::update_module(UpdateCimService* msg)
     message_module *temp = _modules.front();
     while (temp != 0)
     {
-        if(temp->_q_id == msg->queue )
+        if (temp->_q_id == msg->queue )
         {
             temp->_capabilities = msg->capabilities;
             temp->_mask = msg->mask;
index cf0c9c34baec91931a49a5f9fa1fb933b7141ddb..e73eb66f1a94f2eda2eda2a17138183d83549645 100644 (file)
@@ -330,7 +330,7 @@ Boolean isUTF8Aux(const char *legal)
         }
     }
 
-    return (isValid_U8((const Uint8 *)legal, numBytes));
+    return isValid_U8((const Uint8 *)legal, numBytes);
 }
 
 Boolean isUTF8Str(const char *legal)
@@ -343,12 +343,15 @@ Boolean isUTF8Str(const char *legal)
     size_t count = 0;
     const size_t size = strlen(legal);
 //  printf("size = %d\n",size);
-    while(count<size)
+    while (count<size)
     {
 //      printf("count = %d\n",count);
-        if(isUTF8(&legal[count]) == true){
+        if (isUTF8(&legal[count]) == true)
+        {
             UTF8_NEXT(legal,count);
-        }else{
+        }
+        else
+        {
 //          printf("bad string\n");
             return false;
         }
@@ -359,20 +362,23 @@ Boolean isUTF8Str(const char *legal)
     printf("legal = %s\n\n", legal);
     Uint32 count = 0;
     Uint32 trailingBytes = 0;
-        Uint32 size = strlen(legal);
+    Uint32 size = strlen(legal);
     printf("size of legal is %d\n",size);
-        while(count<size-1)
-        {
+    while (count<size-1)
+    {
         printf("count = %d\n", count);
-                if(isUTF8((char*)&legal[count]) == true){
-                    UTF8_NEXT(legal,trailingBytes);
+        if (isUTF8((char*)&legal[count]) == true)
+        {
+            UTF8_NEXT(legal,trailingBytes);
             count += trailingBytes;
-        } else{
-            printf("CommonUTF8:: returning false; position[%d]",count);
-             return false;
         }
+        else
+        {
+            printf("CommonUTF8:: returning false; position[%d]",count);
+            return false;
         }
-     printf("CommonUTF8:: returning false; position[%d]",count);
+    }
+    printf("CommonUTF8:: returning false; position[%d]",count);
     return true;*/
 }
 
@@ -382,21 +388,21 @@ String escapeStringEncoder(const String& Str)
     Uint16 escChar;
     char hexencoding[6];
 
-    for(Uint32 i = 0; i < Str.size(); ++i)
+    for (Uint32 i = 0; i < Str.size(); ++i)
     {
-    escChar = Str[i];
-    if(escChar <= 0x7F)
+        escChar = Str[i];
+        if (escChar <= 0x7F)
         {
-        escapeStr.append(escChar);
+            escapeStr.append(escChar);
         }
-    else
-    {
-        memset(hexencoding,0x00,sizeof(hexencoding));
+        else
+        {
+            memset(hexencoding,0x00,sizeof(hexencoding));
             sprintf(hexencoding, "%%%03X%X", escChar/16, escChar%16);
             escapeStr.append(hexencoding);
+        }
     }
-    }
-    return(escapeStr);
+    return escapeStr;
 }
 
 String escapeStringDecoder(const String& Str)
index 3c6e23a23c8e5cd2eb19a3904229e35994997a1e..55d9411a83aacfeb0e3e6ea2224850290cb478ad 100644 (file)
@@ -29,9 +29,6 @@
 //
 //==============================================================================
 //
-//
-// Author: Mike Brasher (m.brasher@inovadevelopment.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include "Condition.h"
@@ -79,8 +76,8 @@ void Condition::wait(Mutex& lock)
 
 ConditionWaiter* _get_waiter()
 {
-    // ATTN: since Windows Thread Local Storage does not have a cleanup 
-    // routine mechanism, the ConditionWaiter object (and its event) will 
+    // ATTN: since Windows Thread Local Storage does not have a cleanup
+    // routine mechanism, the ConditionWaiter object (and its event) will
     // be leaked when the thread exists.
 
     static DWORD _waiter_tls = TlsAlloc();
index d350f19a616da0a8e69730202eec90507175a4aa..4af16405b80bfe0482d8f1e8d12373615031b52d 100644 (file)
@@ -29,8 +29,6 @@
 //
 //==============================================================================
 //
-// Author: Mike Brasher (m.brasher@inovadevelopment.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_Condition_h
index d014e80fd43a504db3be2940aea32802cf9b8b51..40a030d59e49145bf21853b720b8354342da4b76 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By:
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include "Config.h"
index f33ec4e5369968a32baef9a25de648f1805927c5..6f3e05a5173ef26d2b4ce7255596d32f9cfc4988 100644 (file)
@@ -68,7 +68,7 @@
 # include <Pegasus/Common/Platform_LINUX_ZSERIES64_GNU.h>
 #elif defined (__OS400__)
 # if !defined (PEGASUS_PLATFORM_OS400_ISERIES_IBM)
-#   define PEGASUS_PLATFORM_OS400_ISERIES_IBM 
+#   define PEGASUS_PLATFORM_OS400_ISERIES_IBM
 # endif
 # include <Pegasus/Common/Platform_OS400_ISERIES_IBM.h>
 #elif defined (PEGASUS_PLATFORM_DARWIN_PPC_GNU)
 // To test for GCC > 3.2.0:
 //     #if GCC_VERSION > 30200
 
-#endif 
+#endif
 
 
 #ifdef __cplusplus
 **         class PEGASUS_COMMON_LINKAGE MyClass
 **         {
 **         public:
-**         
+**
 **             // Is exported (due to PEGASUS_COMMON_LINKAGE macro).
 **             void f();
 **
 #endif
 
 #ifdef PEGASUS_HAVE_IOS_BINARY
-#if defined(PEGASUS_PLATFORM_OS400_ISERIES_IBM) 
+#if defined(PEGASUS_PLATFORM_OS400_ISERIES_IBM)
 #define PEGASUS_IOS_BINARY ,std::ios::binary,PEGASUS_STD(_CCSID_T(1208))
 #else
 #define PEGASUS_IOS_BINARY ,std::ios::binary
index c8d2cb65539f5629a0b2fd2a5154d85de0132d4c..5a7ef4e503858c24975f7e7238efc9146e1af535 100755 (executable)
 //
 //==============================================================================
 //
-// Author: Humberto Rivero (hurivero@us.ibm.com)
-//
-// Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include <Pegasus/Common/ContentLanguageList.h>
index c1ccc8e08155e3851721a8dec302385a35c872cd..f9c9ea2a3bb751a19e2c937e75a6b95b59e77d96 100644 (file)
@@ -33,7 +33,7 @@
 
 #include "DeclContext.h"
 #include "CIMName.h"
-#include <Pegasus/Common/MessageLoader.h> //l10n
+#include <Pegasus/Common/MessageLoader.h>
 
 PEGASUS_NAMESPACE_BEGIN
 
index 192a02544fa3bf3bf66beb3935787db80e4e68a7..59f091ee718a494e2cf35b7786b7051614f39df8 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By: Rudy chuet (rudy.schuet@compaq.com) 11/12/01
-//              added nsk platform support
-//              Sean Keenan, Hewlett-Packard Company (sean.keenan@hp.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include "Dir.h"
index 385711354c5499ca201ecb73f5c99b81340fa5a4..74698b60e05c2dc66acc052c67dde153d0eee067 100644 (file)
@@ -121,7 +121,7 @@ public:
                cout << "name: " << dir.getName() << endl;
            }
         }
-        catch(CannotOpenDirectory&)
+        catch (CannotOpenDirectory&)
         {
            // Error!
         }
index d30fe7e70f439b82f475079f0e79b92e1d31a86a..1da3d1e8204f51eb372131b1fb464572b13a50d5 100644 (file)
 
 PEGASUS_NAMESPACE_BEGIN
 
-// the HPUX dynamic library load and unload routines do not keep a reference 
-// count. this implies that if a library were loaded multiple times, a single 
+// the HPUX dynamic library load and unload routines do not keep a reference
+// count. this implies that if a library were loaded multiple times, a single
 // unload will release the library from the process thereby potentially leaving
-// dangling references behind. this is a tenative implementation that 
+// dangling references behind. this is a tenative implementation that
 // encapsulates this behavior from users of the DynamicLibrary object. the goal
-// release the library only after an equal number of loads and unloads have 
+// release the library only after an equal number of loads and unloads have
 // occured.
 
 static Array<Pair<DynamicLibrary::DynamicLibraryHandle, int> > _references;
@@ -85,7 +85,7 @@ static Uint32 _decrement_handle(DynamicLibrary::DynamicLibraryHandle handle)
         {
             Uint32 n = --_references[i].second;
 
-            if(n == 0)
+            if (n == 0)
             {
                 _references.remove(i);
             }
@@ -133,7 +133,7 @@ Boolean DynamicLibrary::_load()
     }
 
     PEG_METHOD_EXIT();
-    return(isLoaded());
+    return isLoaded();
 }
 
 void DynamicLibrary::_unload()
index ec24f05cf9f8f1d6e92d0a194172626efbe7f7ff..3a0d826b3ca482d32d4c268957de597cea68b40b 100644 (file)
@@ -77,13 +77,13 @@ Boolean DynamicLibrary::_load()
 #endif
     }
 
-    return(isLoaded());
+    return isLoaded();
 }
 
 void DynamicLibrary::_unload()
 {
 #ifdef PEGASUS_OS_OS400
-    OS400_UnloadDynamicLibrary(_handle);    
+    OS400_UnloadDynamicLibrary(_handle);
 #else
     dlclose(_handle);
 #endif
index 4996691545eb22e68aa857b18e7fe7da0864ca80..5e21a4a703b978e28ebaaecc8076b64860ddaf5b 100644 (file)
@@ -38,7 +38,7 @@ PEGASUS_NAMESPACE_BEGIN
 Boolean DynamicLibrary::_load()
 {
     _handle = LoadLibrary(_fileName.getCString());
-    return(isLoaded());
+    return isLoaded();
 }
 
 void DynamicLibrary::_unload()
index 0f65ff0d794b60258089f9754d0c67215c5962c0..35b5284a0971cfcbd8833f64991512cacef07513 100644 (file)
@@ -378,7 +378,6 @@ CIMException::CIMException(
 }
 // l10n - note use this when you have an exception with a translated
 // detail message
-// l10n
 CIMException::CIMException(
     CIMStatusCode code,
     const MessageLoaderParms& msgParms)
index b24881c7ae61964ff49e9464b7bf4989385adf00..37468e6a993254030038b046bc106f8010e79eb4 100644 (file)
@@ -360,7 +360,7 @@ public:
             try
             { .. Execute CIM Operation
             }
-            catch(CIMExcepton e)
+            catch (CIMExcepton e)
             {
                 if (e.getCode() == CIM_ERR_ACCESS_DENIED )
                     ....
@@ -390,7 +390,7 @@ public:
             try
             { .. Execute CIM Operation
             }
-            catch(CIMExcepton e)
+            catch (CIMExcepton e)
             {
                 if (e.getErrorCount() > 0 )
                 {
index fa62d1e707be9d9437bd2eb2968038e5f85beb6f..e223e836d7ee8b9621894184bc2da5f46299eb73 100644 (file)
 //
 //==============================================================================
 //
-// Author: Carol Ann Krug Graves, Hewlett-Packard Company
-//             (carolann_graves@hp.com)
-//
-// Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_ExceptionRep_h
@@ -52,7 +47,7 @@ class ExceptionRep
 public:
     String message;
     String cimMessage;  // Contains the message for the CIM error code
-    ContentLanguageList contentLanguages;  
+    ContentLanguageList contentLanguages;
 
     // Allow subclass objects to be destructed properly
     virtual ~ExceptionRep() {}
index 4549ceba861ebc5985402cd7f5ccf5b3688b447b..847c5dd4a10c62a84ddf8d19c28acb62c7ba29a8 100644 (file)
@@ -246,7 +246,7 @@ Boolean FileSystem::openNoCase(PEGASUS_STD(ifstream)& is, const String& path)
 }
 
 Boolean FileSystem::openNoCase(
-    PEGASUS_STD(fstream)& fs, 
+    PEGASUS_STD(fstream)& fs,
     const String& path,
     int mode)
 {
@@ -298,16 +298,16 @@ Boolean FileSystem::removeDirectoryHier(const String& path)
     // for files-in-directory, delete or recall removedir
 
     for (Uint32 i = 0, n = fileList.size(); i < n; i++)
-    {   
+    {
         String newPath = path;   // extend path to subdir
         newPath.append("/");
         newPath.append(fileList[i]);
-        
+
         if (FileSystem::isDirectory(newPath))
         {
             // Recall ourselves with extended path
             if (!FileSystem::removeDirectoryHier(newPath))
-                return false; 
+                return false;
         }
 
         else
@@ -317,7 +317,7 @@ Boolean FileSystem::removeDirectoryHier(const String& path)
         }
     }
 
-    return removeDirectory(path);       
+    return removeDirectory(path);
 }
 
 //
@@ -338,7 +338,7 @@ Boolean FileSystem::getDirectoryContents(
     paths.clear();
 
     try
-    { 
+    {
         for (Dir dir(path); dir.more(); dir.next())
         {
             String name = dir.getName();
@@ -352,7 +352,7 @@ Boolean FileSystem::getDirectoryContents(
     }
 
     // Catch the Dir exception
-    catch(CannotOpenDirectory&)
+    catch (CannotOpenDirectory&)
     {
         return false;
     }
@@ -386,7 +386,7 @@ String FileSystem::extractFileName(const String& path)
     AutoArrayPtr<char> p_path(new char[path.size() + 1]);
     String basename = System::extract_file_name(
         (const char*)path.getCString(), p_path.get());
-  
+
     return basename;
 }
 
@@ -396,7 +396,7 @@ String FileSystem::extractFilePath(const String& path)
     AutoArrayPtr<char> p_path(new char[path.size() + 1]);
     String newpath = System::extract_file_path(
         (const char*)path.getCString(), p_path.get());
-  
+
     return newpath;
 }
 
@@ -404,7 +404,7 @@ String FileSystem::extractFilePath(const String& path)
 Boolean FileSystem::changeFilePermissions(const String& path, mode_t mode)
 {
 #if defined(PEGASUS_OS_OS400)
-    // ATTN: If getCString() is modified to return UTF8, then handle the 
+    // ATTN: If getCString() is modified to return UTF8, then handle the
     //       EBCDIC coversion in SystemUnix.cpp
     CString tempPath = path.getCString();
 #else
@@ -531,7 +531,7 @@ Boolean FileSystem::changeFileOwner(
     struct passwd *result;
     char pwdBuffer[PWD_BUFF_SIZE];
 
-    if(getpwnam_r(userName.getCString(), &pwd, pwdBuffer, PWD_BUFF_SIZE,
+    if (getpwnam_r(userName.getCString(), &pwd, pwdBuffer, PWD_BUFF_SIZE,
                   &userPasswd) != 0)
     {
         userPasswd = (struct passwd*)NULL;
index bc55af0020ad8b6b971f2fbc1e65dd03b38a49eb..bb914ad70c7e85ad2473e2fda9c8cd0074194a4b 100644 (file)
@@ -220,8 +220,8 @@ public:
         @return true on success.
     */
     static Boolean openNoCase(
-        PEGASUS_STD(fstream)& fs, 
-        const String& path, 
+        PEGASUS_STD(fstream)& fs,
+        const String& path,
         int mode);
 
     /** Determines whether the path refers to a directory.
@@ -316,14 +316,14 @@ public:
 
     /**
        Return OS path specific delimiter.
-       
+
        @return delimiter specific to the platform
     */
     static String getPathDelimiter();
 
     /**
        Returns the absolute pathname for the specified filename.
-       
+
        @param paths directories seperated by an OS specific delimiter to search
        @param filename filename to search for in the paths
 
@@ -333,7 +333,7 @@ public:
     static String getAbsoluteFileName(
         const String& paths,
         const String& filename);
-       
+
     /**
         Convert a library name to its corresponding file name by adding the
         appropriate prefix and suffix.
@@ -462,7 +462,7 @@ inline Boolean OpenAppend(PEGASUS_STD(ofstream)& os, const String& path)
     return !!os;
 }
 
-inline String FileSystem::getPathDelimiter() 
+inline String FileSystem::getPathDelimiter()
 {
 #if defined(PEGASUS_OS_TYPE_WINDOWS)
     return String(";");
index 7e1dee0cd9244534d546c4c5d7d79d33167ae3bd..2ef1796a7014d3e7668ff1d6504f2530c5509dc0 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By: David Dillard, Symantec Corp. (david_dillard@symantec.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include <iostream>
index 53191ea9b1c519440756a5200ea72d1ac9dbdb90..33c1e8f6554552b0989ffe0a24ba0abe7573f33b 100644 (file)
@@ -46,25 +46,25 @@ PEGASUS_NAMESPACE_BEGIN
     strings that contain variable defintions.  The
     variable definitions in the strings are of the form
     $<int>
-    
+
     where <int> is a single digit integer (0 - 9).
-    
     The variable subsituted may be String, Boolean Integer, Unsigned Integer
-    or  real.
-    
+    or real.
+
     The format subsitution may be escaped by preceding the
     $ with a \
-    
+
     usage:
     Formatter::format (FormatString, variable0,.., variable9)
-    
+
     Example:
     <pre>
     int total = 4;
     int count = 2;
     String name = "Output"
     String output = Formatter::format(
-        "total $0 average $1 on $2", 
+        "total $0 average $1 on $2",
         total,
         total/count,
         name);
@@ -72,7 +72,7 @@ PEGASUS_NAMESPACE_BEGIN
     produces the string
 
       "total 4 average 2 on Output"
-    
+
     </pre>
 */
 class PEGASUS_COMMON_LINKAGE Formatter
@@ -83,7 +83,7 @@ public:
     {
     public:
 
-        enum Type { VOIDT, STRING, CSTRLIT, BOOLEAN, INTEGER, 
+        enum Type { VOIDT, STRING, CSTRLIT, BOOLEAN, INTEGER,
             UINTEGER, LINTEGER, ULINTEGER, REAL };
 
         Arg() : _type(VOIDT)
index c21fb026c90c7ccb26f42c8526622db6b92ddb03..6715c37683bcdc861f944302b349cbb55e2f6fdc 100644 (file)
@@ -41,7 +41,7 @@
 #include "HTTPAcceptor.h"
 #include "HTTPConnection.h"
 #include "Tracer.h"
-#include <Pegasus/Common/MessageLoader.h> //l10n
+#include <Pegasus/Common/MessageLoader.h>
 
 #ifdef PEGASUS_PLATFORM_OS400_ISERIES_IBM
 #include "EBCDIC_OS400.h"
index c71e88b790b3be210a37eb778036da24aa818276..558bd5b2bb8ea2e679a8c7f4c433250aa29d6c37 100644 (file)
@@ -53,7 +53,7 @@ class PEGASUS_COMMON_LINKAGE HTTPAcceptor : public MessageQueue
 {
 public:
     typedef MessageQueue Base;
-  
+
     /** Constructor.
         @param monitor pointer to monitor object which this class uses to
         solicit SocketMessages on the server port (socket).
@@ -83,10 +83,10 @@ public:
 
     /** This method is called whenever a SocketMessage is enqueued
         on the input queue of the HTTPAcceptor object.
-    */ 
+    */
 
     virtual void handleEnqueue(Message *);
-    
+
     virtual void handleEnqueue();
 
     /** Bind the specified listen socket.
index c446500f217cfdde5870500a5bfdddcdb9fe5dba..d9a07406901ea03835acf4a06301ffdc010d49a3 100644 (file)
@@ -249,7 +249,7 @@ HTTPConnection::HTTPConnection(
                 _socket->getPeerCertificateChain());
         }
 #else
-        if(_socket->isClientAuthenticated())
+        if (_socket->isClientAuthenticated())
         {
             _authInfo->setAuthStatus(AuthenticationInfoRep::AUTHENTICATED);
             _authInfo->setAuthenticatedUser(_socket->getAuthenticatedUser());
@@ -288,7 +288,7 @@ void HTTPConnection::handleEnqueue(Message *message)
 {
     PEG_METHOD_ENTER(TRC_HTTP, "HTTPConnection::handleEnqueue");
 
-    if( ! message )
+    if (! message)
     {
         PEG_METHOD_EXIT();
         return;
@@ -938,7 +938,7 @@ Boolean HTTPConnection::_handleWriteEvent(Message &message)
         if (_isClient() == false)
         {
             // Check for message to close
-            if(message.getCloseConnect()== true)
+            if (message.getCloseConnect()== true)
             {
                 Tracer::trace(
                     TRC_HTTP,
@@ -1106,12 +1106,12 @@ void HTTPConnection::_getContentLengthAndContentOffset()
                     data = (char *)_incomingBuffer.getData();
                     data[capacity-1] = 0;
                 }
-                catch(const PEGASUS_STD(bad_alloc)&)
+                catch (const PEGASUS_STD(bad_alloc)&)
                 {
                     _throwEventFailure(HTTP_STATUS_REQUEST_TOO_LARGE,
                         "Error reserving space for non-chunked message");
                 }
-                catch(...)
+                catch (...)
                 {
                     _throwEventFailure(
                         httpStatusInternal, "unexpected exception");
@@ -1137,7 +1137,7 @@ void HTTPConnection::_getContentLengthAndContentOffset()
 
             // remove whitespace after colon before value
             char *valueStart = colon + 1;
-            while(*valueStart == ' ' || *valueStart == '\t')
+            while (*valueStart == ' ' || *valueStart == '\t')
                 valueStart++;
 
             // we found some non-whitespace token
@@ -1147,7 +1147,7 @@ void HTTPConnection::_getContentLengthAndContentOffset()
 
                 // now remove whitespace from end of line back to last byte
                 // of value
-                while(*valueEnd == ' ' || *valueEnd == '\t')
+                while (*valueEnd == ' ' || *valueEnd == '\t')
                     valueEnd--;
 
                 char valueSave = *(valueEnd+1);
@@ -1231,7 +1231,7 @@ void HTTPConnection::_getContentLengthAndContentOffset()
                             gotContentLanguage = true;
                         }
                     }
-                    catch(...)
+                    catch (...)
                     {
                         Tracer::trace(TRC_HTTP, Tracer::LEVEL2,
                             "HTTPConnection: ERROR: contentLanguages had "
@@ -1258,7 +1258,7 @@ void HTTPConnection::_getContentLengthAndContentOffset()
                     while (*valuesStart)
                     {
                         // strip off whitepsace from the front
-                        while(*valuesStart == ' ' || *valuesStart == '\t')
+                        while (*valuesStart == ' ' || *valuesStart == '\t')
                             valuesStart++;
 
                         if (valuesStart == valueEnd)
@@ -1274,7 +1274,7 @@ void HTTPConnection::_getContentLengthAndContentOffset()
                             }
                             v--;
                             // strip off whitespace from the end
-                            while(*v == ' ' || *v == '\t')
+                            while (*v == ' ' || *v == '\t')
                                 v--;
                             v++;
                             *v = 0;
@@ -1689,7 +1689,7 @@ void HTTPConnection::_handleReadEventTransferEncoding()
                                 LanguageParser::parseContentLanguageHeader(
                                     contentLanguagesString);
                         }
-                        catch(...)
+                        catch (...)
                         {
                             Tracer::trace(TRC_HTTP, Tracer::LEVEL2,
                                 "HTTPConnection: ERROR: contentLanguages had "
@@ -1874,7 +1874,7 @@ void HTTPConnection::_handleReadEvent()
                         _socket->getPeerCertificateChain());
                 }
 #else
-                if(_socket->isClientAuthenticated())
+                if (_socket->isClientAuthenticated())
                 {
                     _authInfo->setAuthStatus(
                         AuthenticationInfoRep::AUTHENTICATED);
@@ -1941,7 +1941,7 @@ void HTTPConnection::_handleReadEvent()
             char *data = (char *)_incomingBuffer.getData();
             data[size] = 0;
         }
-        catch(...)
+        catch (...)
         {
             static const char detailP[] =
                 "Unable to append the request to the input buffer";
@@ -1975,7 +1975,7 @@ void HTTPConnection::_handleReadEvent()
             _getContentLengthAndContentOffset();
         _handleReadEventTransferEncoding();
     }
-    catch(Exception &e)
+    catch (Exception& e)
     {
         httpStatus = e.getMessage();
     }
@@ -2051,7 +2051,7 @@ void HTTPConnection::_handleReadEvent()
 
 Uint32 HTTPConnection::getRequestCount()
 {
-    return(_requestCount.get());
+    return _requestCount.get();
 }
 
 Boolean HTTPConnection::run(Uint32 milliseconds)
@@ -2070,7 +2070,7 @@ Boolean HTTPConnection::run(Uint32 milliseconds)
     if (events)
     {
         events = 0;
-        ifFD_ISSET(getSocket(), &fdread))
+        if (FD_ISSET(getSocket(), &fdread))
         {
             events |= SocketMessage::READ;
             Message *msg = new SocketMessage(getSocket(), events);
@@ -2078,7 +2078,7 @@ Boolean HTTPConnection::run(Uint32 milliseconds)
             {
                 handleEnqueue(msg);
             }
-            catch(...)
+            catch (...)
             {
                 Tracer::trace(TRC_DISCARDED_DATA, Tracer::LEVEL2,
                     "HTTPConnection::run handleEnqueue(msg) failure");
index 601a7c7ebb7e581c9ae9c6a8a7c08ea9b32822a9..c0da68b5d7d59f7f8c4127a6ade5eddc31755a20 100644 (file)
@@ -113,7 +113,7 @@ public:
 
     Boolean run(Uint32 milliseconds);
 
-    MessageQueue & get_owner(void)
+    MessageQueue& get_owner()
     {
         return *_ownerMessageQueue;
     }
index afd969ea9131c9cbb75ababb65dca643c13f676e..1e988e19086c92434321c76202900201767cc2ac 100644 (file)
@@ -36,7 +36,7 @@
 #include <iostream>
 #include "Constants.h"
 #include "Socket.h"
-#include <Pegasus/Common/MessageLoader.h> //l10n
+#include <Pegasus/Common/MessageLoader.h>
 #include "Socket.h"
 #include "TLS.h"
 #include "HTTPConnector.h"
index 8db70fdcd13fc6d9c8fea65fdeb0304e31202569..25c18da1edfc4079d189c5e24155131af841a67f 100644 (file)
@@ -57,9 +57,9 @@ typedef Pair<String, String> HTTPHeader;
 class PEGASUS_COMMON_LINKAGE HTTPMessage : public Message
 {
 public:
-  
+
     typedef Message Base;
-      
+
     HTTPMessage(
         const Buffer& message_,
         Uint32 queueId_ = 0,
index 334a02a5afa68e796039327becacd4e2a56eec40..6a4fa338337856db6d5bb95aab9e88c4d86f0251 100644 (file)
@@ -29,8 +29,6 @@
 //
 //==============================================================================
 //
-// Author: Mike Day (mdday@us.ibm.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_IPCExceptions_h
@@ -45,7 +43,7 @@ class PEGASUS_COMMON_LINKAGE IPCException
 {
 public:
     IPCException(ThreadType owner): _owner(owner) { }
-    inline ThreadType get_owner() { return(_owner); }
+    inline ThreadType get_owner() { return _owner; }
 private:
     ThreadType _owner;
 };
index 9c09062893b67ccef3c1558b9010c2a44118f514..adad702c1ab326b235c845d6ffed2eec96812977 100644 (file)
@@ -1745,13 +1745,13 @@ String IndicationFormatter::_localizeDateTime(
                 DateFormat::MEDIUM, DateFormat::MEDIUM, locale);
         }
     }
-    catch(Exception& e)
+    catch (Exception& e)
     {
         PEG_TRACE_STRING(TRC_IND_FORMATTER, Tracer::LEVEL4, e.getMessage());
         PEG_METHOD_EXIT();
         return dateTimeValue.toString();
     }
-    catch(...)
+    catch (...)
     {
         PEG_TRACE_STRING(TRC_IND_FORMATTER, Tracer::LEVEL4,
         "Caught General Exception During DateFormat::createDateTimeInstance");
index 9890f8433aaa9c61d80195e80c432faddd234277..a89c7444b457e92868ff53e187b29da452bf4a8b 100644 (file)
@@ -217,7 +217,6 @@ static String _makeCIMExceptionDescription(
     return tmp;
 }
 
-// l10n
 //
 // Creates a description without source file name and line number.
 //
@@ -237,7 +236,6 @@ static String _makeCIMExceptionDescription(
     return tmp;
 }
 
-// l10n
 //
 // Creates a description without source file name and line number.
 //
index f240a0615393cf780a8c5a21c74b6404eada2863..6967081bb6c18c26b118b7b53e6d1f71078a3f7b 100644 (file)
@@ -85,7 +85,7 @@ class PEGASUS_COMMON_LINKAGE NullPointer : public Exception
 public:
 
     static const char MSG[];
-    static const char KEY[];     
+    static const char KEY[];
 
     NullPointer();
 
@@ -98,7 +98,7 @@ class PEGASUS_COMMON_LINKAGE UndeclaredQualifier : public Exception
 public:
 
     static const char MSG[];
-    static const char KEY[];   
+    static const char KEY[];
 
     UndeclaredQualifier(const String& qualifierName) ;
 
@@ -110,11 +110,11 @@ class PEGASUS_COMMON_LINKAGE BadQualifierScope : public Exception
 {
 public:
 
-    static const char MSG[]; 
-    static const char KEY[];     
+    static const char MSG[];
+    static const char KEY[];
 
     BadQualifierScope(
-        const String& qualifierName, 
+        const String& qualifierName,
         const String& scopeString);
 
     virtual ~BadQualifierScope();
@@ -126,7 +126,7 @@ class PEGASUS_COMMON_LINKAGE BadQualifierOverride : public Exception
 public:
 
     static const char MSG[];
-    static const char KEY[];     
+    static const char KEY[];
 
     BadQualifierOverride(const String& qualifierName);
 
@@ -138,7 +138,7 @@ class PEGASUS_COMMON_LINKAGE BadQualifierType : public Exception
 public:
 
     static const char MSG[];
-    static const char KEY[];     
+    static const char KEY[];
 
     BadQualifierType(const String& qualifierName);
     virtual ~BadQualifierType();
@@ -150,7 +150,7 @@ class PEGASUS_COMMON_LINKAGE ClassAlreadyResolved : public Exception
 public:
 
     static const char MSG[];
-    static const char KEY[];     
+    static const char KEY[];
 
     ClassAlreadyResolved(const String& className);
 
@@ -163,7 +163,7 @@ class PEGASUS_COMMON_LINKAGE ClassNotResolved : public Exception
 public:
 
     static const char MSG[];
-    static const char KEY[];     
+    static const char KEY[];
 
     ClassNotResolved(const String& className);
     virtual ~ClassNotResolved();
@@ -175,7 +175,7 @@ class PEGASUS_COMMON_LINKAGE InstanceAlreadyResolved : public Exception
 public:
 
     static const char MSG[];
-    static const char KEY[];     
+    static const char KEY[];
 
     InstanceAlreadyResolved();
     virtual ~InstanceAlreadyResolved();
@@ -187,7 +187,7 @@ class PEGASUS_COMMON_LINKAGE InstantiatedAbstractClass : public Exception
 public:
 
     static const char MSG[];
-    static const char KEY[];     
+    static const char KEY[];
 
     InstantiatedAbstractClass(const String& className);
     virtual ~InstantiatedAbstractClass();
@@ -199,7 +199,7 @@ class PEGASUS_COMMON_LINKAGE NoSuchProperty : public Exception
 public:
 
     static const char MSG[];
-    static const char KEY[];     
+    static const char KEY[];
 
     NoSuchProperty(const String& propertyName);
     virtual ~NoSuchProperty();
@@ -211,7 +211,7 @@ class PEGASUS_COMMON_LINKAGE NoSuchFile : public Exception
 public:
 
     static const char MSG[];
-    static const char KEY[];     
+    static const char KEY[];
 
     NoSuchFile(const String& fileName);
     virtual ~NoSuchFile();
@@ -223,7 +223,7 @@ class PEGASUS_COMMON_LINKAGE FileNotReadable : public Exception
 public:
 
     static const char MSG[];
-    static const char KEY[];     
+    static const char KEY[];
 
     FileNotReadable(const String& fileName);
     virtual ~FileNotReadable();
@@ -235,7 +235,7 @@ class PEGASUS_COMMON_LINKAGE CannotRemoveDirectory : public Exception
 public:
 
     static const char MSG[];
-    static const char KEY[];     
+    static const char KEY[];
 
     CannotRemoveDirectory(const String& path);
     virtual ~CannotRemoveDirectory();
@@ -247,7 +247,7 @@ class PEGASUS_COMMON_LINKAGE CannotRemoveFile : public Exception
 public:
 
     static const char MSG[];
-    static const char KEY[];     
+    static const char KEY[];
 
     CannotRemoveFile(const String& path);
     virtual ~CannotRemoveFile();
@@ -259,7 +259,7 @@ class PEGASUS_COMMON_LINKAGE CannotRenameFile : public Exception
 public:
 
     static const char MSG[];
-    static const char KEY[];     
+    static const char KEY[];
 
     CannotRenameFile(const String& path);
     virtual ~CannotRenameFile();
@@ -271,7 +271,7 @@ class PEGASUS_COMMON_LINKAGE NoSuchDirectory : public Exception
 public:
 
     static const char MSG[];
-    static const char KEY[];     
+    static const char KEY[];
 
     NoSuchDirectory(const String& directoryName);
     virtual ~NoSuchDirectory();
@@ -283,7 +283,7 @@ class PEGASUS_COMMON_LINKAGE CannotCreateDirectory : public Exception
 public:
 
     static const char MSG[];
-    static const char KEY[];     
+    static const char KEY[];
 
     CannotCreateDirectory(const String& path);
     virtual ~CannotCreateDirectory();
@@ -295,7 +295,7 @@ class PEGASUS_COMMON_LINKAGE CannotOpenFile : public Exception
 public:
 
     static const char MSG[];
-    static const char KEY[];     
+    static const char KEY[];
 
     CannotOpenFile(const String& path);
     virtual ~CannotOpenFile();
@@ -307,7 +307,7 @@ class PEGASUS_COMMON_LINKAGE NotImplemented : public Exception
 public:
 
     static const char MSG[];
-    static const char KEY[];     
+    static const char KEY[];
 
     NotImplemented(const String& method);
     virtual ~NotImplemented();
@@ -318,7 +318,7 @@ class PEGASUS_COMMON_LINKAGE StackUnderflow : public Exception
 public:
 
     static const char MSG[];
-    static const char KEY[];     
+    static const char KEY[];
 
     StackUnderflow();
     virtual ~StackUnderflow();
@@ -329,7 +329,7 @@ class PEGASUS_COMMON_LINKAGE StackOverflow : public Exception
 public:
 
     static const char MSG[];
-    static const char KEY[];     
+    static const char KEY[];
 
     StackOverflow();
     virtual ~StackOverflow();
@@ -340,7 +340,7 @@ class PEGASUS_COMMON_LINKAGE BadFormat : public Exception
 public:
 
     static const char MSG[];
-    static const char KEY[];     
+    static const char KEY[];
 
     BadFormat();
     virtual ~BadFormat();
@@ -351,7 +351,7 @@ class PEGASUS_COMMON_LINKAGE BadlyFormedCGIQueryString : public Exception
 public:
 
     static const char MSG[];
-    static const char KEY[];     
+    static const char KEY[];
 
     BadlyFormedCGIQueryString();
     virtual ~BadlyFormedCGIQueryString();
@@ -362,7 +362,7 @@ class PEGASUS_COMMON_LINKAGE DynamicLoadFailed : public Exception
 public:
 
     static const char MSG[];
-    static const char KEY[];     
+    static const char KEY[];
 
     DynamicLoadFailed(const String& libraryName);
     virtual ~DynamicLoadFailed();
@@ -373,7 +373,7 @@ class PEGASUS_COMMON_LINKAGE DynamicLookupFailed : public Exception
 public:
 
     static const char MSG[];
-    static const char KEY[];     
+    static const char KEY[];
 
     DynamicLookupFailed(const String& symbolName);
     virtual ~DynamicLookupFailed();
@@ -384,7 +384,7 @@ class PEGASUS_COMMON_LINKAGE CannotOpenDirectory : public Exception
 public:
 
     static const char MSG[];
-    static const char KEY[];     
+    static const char KEY[];
 
     CannotOpenDirectory(const String& path);
     virtual ~CannotOpenDirectory();
@@ -395,7 +395,7 @@ class PEGASUS_COMMON_LINKAGE ParseError : public Exception
 public:
 
     static const char MSG[];
-    static const char KEY[];     
+    static const char KEY[];
 
     ParseError(const String& message);
     virtual ~ParseError();
@@ -406,20 +406,18 @@ class PEGASUS_COMMON_LINKAGE MissingNullTerminator : public Exception
 public:
 
     static const char MSG[];
-    static const char KEY[];     
+    static const char KEY[];
 
     MissingNullTerminator();
     virtual ~MissingNullTerminator();
 };
 
-//l10n start
-
 class PEGASUS_COMMON_LINKAGE MalformedLanguageHeader: public Exception
 {
 public:
 
     static const char MSG[];
-    static const char KEY[];     
+    static const char KEY[];
 
     MalformedLanguageHeader(const String& error);
     virtual ~MalformedLanguageHeader();
@@ -430,7 +428,7 @@ class PEGASUS_COMMON_LINKAGE InvalidAcceptLanguageHeader: public Exception
 public:
 
     static const char MSG[];
-    static const char KEY[];     
+    static const char KEY[];
 
     InvalidAcceptLanguageHeader(const String& error);
     virtual ~InvalidAcceptLanguageHeader();
@@ -441,20 +439,18 @@ class PEGASUS_COMMON_LINKAGE InvalidContentLanguageHeader: public Exception
 public:
 
     static const char MSG[];
-    static const char KEY[];     
+    static const char KEY[];
 
     InvalidContentLanguageHeader(const String& error);
     virtual ~InvalidContentLanguageHeader();
 };
 
-//l10n end
-
 class PEGASUS_COMMON_LINKAGE InvalidAuthHeader: public Exception
 {
 public:
 
     static const char MSG[];
-    static const char KEY[];     
+    static const char KEY[];
 
     InvalidAuthHeader();
     virtual ~InvalidAuthHeader();
@@ -465,7 +461,7 @@ class PEGASUS_COMMON_LINKAGE UnauthorizedAccess: public Exception
 public:
 
     static const char MSG[];
-    static const char KEY[];     
+    static const char KEY[];
 
     UnauthorizedAccess();
     virtual ~UnauthorizedAccess();
@@ -474,8 +470,8 @@ public:
 class PEGASUS_COMMON_LINKAGE IncompatibleTypesException : public Exception
 {
 public:
-    IncompatibleTypesException();    
-    virtual ~IncompatibleTypesException();    
+    IncompatibleTypesException();
+    virtual ~IncompatibleTypesException();
 };
 
 class PEGASUS_COMMON_LINKAGE InternalSystemError : public Exception
@@ -533,16 +529,14 @@ public:
 #define PEGASUS_CIM_EXCEPTION(CODE, EXTRA_MESSAGE) \
     TraceableCIMException(CODE, EXTRA_MESSAGE, String(__FILE__), __LINE__)
 
-// l10n    
 #define PEGASUS_CIM_EXCEPTION_LANG(LANGS, CODE, EXTRA_MESSAGE) \
     TraceableCIMException( \
-        LANGS, CODE, EXTRA_MESSAGE, String(__FILE__), __LINE__)  
-      
-//l10n
+        LANGS, CODE, EXTRA_MESSAGE, String(__FILE__), __LINE__)
+
 #define PEGASUS_CIM_EXCEPTION_L(CODE, MSG_PARMS) \
     TraceableCIMException(CODE, MSG_PARMS, String(__FILE__), __LINE__)
 
-/** Macro to prevent overflow of a signed int value when said value is 
+/** Macro to prevent overflow of a signed int value when said value is
  *  doubled. If String/Array/Buffer size is greater than 0x3FFFFFFF, then
  *  something is suspect, throw bad_alloc exception.
  */
index 5dd8402364748ba531fb0cea141489c140581c5a..b2d2311fae07176c26334011bb4656a9ea6ce55f 100755 (executable)
@@ -34,7 +34,7 @@
 #include <Pegasus/Common/LanguageParser.h>
 #include <Pegasus/Common/InternalException.h>
 #include <Pegasus/Common/Tracer.h>
-#include <Pegasus/Common/MessageLoader.h> //l10n
+#include <Pegasus/Common/MessageLoader.h>
 #include <cstring>
 
 #ifdef PEGASUS_HAS_ICU
@@ -69,7 +69,8 @@ AcceptLanguageList LanguageParser::parseAcceptLanguageHeader(
             Real32 qualityValue;
             LanguageParser::_parseAcceptLanguageElement(
                 languageElements[i], languageTagString, qualityValue);
-            acceptLanguages.insert(LanguageTag(languageTagString), qualityValue);
+            acceptLanguages.insert(
+                LanguageTag(languageTagString), qualityValue);
         }
     }
     catch (Exception& e)
index fa99a7afe9c58693c84913a9f15b674d477b7a97..0b6d2837dc49067577cc0e2323c498738dea626a 100755 (executable)
 //
 //==============================================================================
 //
-// Author: Humberto Rivero (hurivero@us.ibm.com)
-//
-// Modified By: Aruran, IBM (ashanmug@in.ibm.com) for Bug# 3697, 3698, 3699, 3700
-//              Aruran, IBM (ashanmug@in.ibm.com) for Bug# 3701, 3702, 3703
-//              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_LanguageParser_h
index 7ee8f7838d19706790e9835cee1162de23fb2727..f752548148772cf9ef101dba8af1f5ca67938b25 100755 (executable)
 //
 //==============================================================================
 //
-// Author: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//
-// Modified By:
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include <Pegasus/Common/LanguageTag.h>
index 6e2145334c2bd5aaa9afe68d880a6e5d0ec14112..fd49663cf996fd2ef39bbae277418187bd37de0f 100644 (file)
@@ -29,8 +29,6 @@
 //
 //==============================================================================
 //
-// Author: Mike Brasher (m.brasher@inovadevelopment.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef _Pegasus_Common_Linkable_h
@@ -51,10 +49,10 @@ struct Linkable
     {
     }
 
-    ~Linkable() 
+    ~Linkable()
     {
-       PEGASUS_DEBUG_ASSERT(magic);
-       memset(this, 0xDD, sizeof(Linkable)); 
+        PEGASUS_DEBUG_ASSERT(magic);
+        memset(this, 0xDD, sizeof(Linkable));
     }
 
     // ATTN: consider making private and fixing all places that have
index 42a1408e248c7c07d8cd0a5a76804fa84f134d18..3468b8020c2e1adab6523e2f49dccb99bec02815 100644 (file)
@@ -29,8 +29,6 @@
 //
 //==============================================================================
 //
-// Author: Mike Brasher (m.brasher@inovadevelopment.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include "List.h"
 
 PEGASUS_NAMESPACE_BEGIN
 
-ListRep::ListRep(void (*destructor)(Linkable*)) : 
-    _front(0), _back(0), _size(0)
+ListRep::ListRep(void (*destructor)(Linkable*))
+    _front(0), _back(0), _size(0)
 {
     if (destructor)
-       _destructor = destructor;
+        _destructor = destructor;
     else
-       _destructor = 0;
+        _destructor = 0;
 }
 
 ListRep::~ListRep()
@@ -63,25 +61,25 @@ void ListRep::clear()
 
     if (_destructor)
     {
-       // Reset _front, _back, and _size in case the destructor calls
-       // a method of List.
-
-       Linkable* front = _front;
-       Linkable* back = _back;
-       size_t size= _size;
-
-       _front = 0;
-       _back = 0;
-       _size = 0;
-
-       for (Linkable* p = front; p; )
-       {
-           PEGASUS_DEBUG_ASSERT(p->magic);
-           Linkable* next = p->next;
-           p->list = 0;
-           _destructor(p);
-           p = next;
-       }
+        // Reset _front, _back, and _size in case the destructor calls
+        // a method of List.
+
+        Linkable* front = _front;
+        Linkable* back = _back;
+        size_t size= _size;
+
+        _front = 0;
+        _back = 0;
+        _size = 0;
+
+        for (Linkable* p = front; p; )
+        {
+            PEGASUS_DEBUG_ASSERT(p->magic);
+            Linkable* next = p->next;
+            p->list = 0;
+            _destructor(p);
+            p = next;
+        }
     }
 }
 
@@ -97,9 +95,9 @@ void ListRep::insert_front(Linkable* elem)
     elem->prev = 0;
 
     if (_front)
-       _front->prev = elem;
+        _front->prev = elem;
     else
-       _back = elem;
+        _back = elem;
 
     _front = elem;
     _size++;
@@ -117,16 +115,16 @@ void ListRep::insert_back(Linkable* elem)
     elem->next = 0;
 
     if (_back)
-       _back->next = elem;
+        _back->next = elem;
     else
-       _front = elem;
+        _front = elem;
 
     _back = elem;
     _size++;
 }
 
 void ListRep::insert_after(
-    Linkable* pos, 
+    Linkable* pos,
     Linkable* elem)
 {
     PEGASUS_DEBUG_ASSERT(_magic);
@@ -141,18 +139,18 @@ void ListRep::insert_after(
     elem->next = pos->next;
 
     if (pos->next)
-       pos->next->prev = elem;
+        pos->next->prev = elem;
 
     pos->next = elem;
 
     if (pos == _back)
-       _back = elem;
+        _back = elem;
 
     _size++;
 }
 
 void ListRep::insert_before(
-    Linkable* pos, 
+    Linkable* pos,
     Linkable* elem)
 {
     PEGASUS_DEBUG_ASSERT(_magic);
@@ -167,12 +165,12 @@ void ListRep::insert_before(
     elem->prev = pos->prev;
 
     if (pos->prev)
-       pos->prev->next = elem;
+        pos->prev->next = elem;
 
     pos->prev = elem;
 
     if (pos == _front)
-       _front = elem;
+        _front = elem;
 
     _size++;
 }
@@ -186,19 +184,19 @@ void ListRep::remove(Linkable* pos)
     PEGASUS_DEBUG_ASSERT(_size != 0);
 
     if (_size == 0)
-       return;
+        return;
 
     if (pos->prev)
-       pos->prev->next = pos->next;
+        pos->prev->next = pos->next;
 
     if (pos->next)
-       pos->next->prev = pos->prev;
+        pos->next->prev = pos->prev;
 
     if (pos == _front)
-       _front = pos->next;
+        _front = pos->next;
 
     if (pos == _back)
-       _back = pos->prev;
+        _back = pos->prev;
 
     pos->list = 0;
 
@@ -213,8 +211,8 @@ bool ListRep::contains(const Linkable* elem)
 
     for (const Linkable* p = _front; p; p = p->next)
     {
-       if (p == elem)
-           return true;
+        if (p == elem)
+            return true;
     }
 
     // Not found!
@@ -226,7 +224,7 @@ Linkable* ListRep::remove_front()
     PEGASUS_DEBUG_ASSERT(_magic);
 
     if (_size == 0)
-       return 0;
+        return 0;
 
     Linkable* elem = _front;
     remove(elem);
@@ -252,11 +250,11 @@ Linkable* ListRep::find(ListRep::Equal equal, const void* client_data)
 
     for (Linkable* p = _front; p; p = p->next)
     {
-       if ((*equal)(p, client_data))
-       {
-           PEGASUS_DEBUG_ASSERT(p->magic);
-           return p;
-       }
+        if ((*equal)(p, client_data))
+        {
+            PEGASUS_DEBUG_ASSERT(p->magic);
+            return p;
+        }
     }
 
     // Not found!
@@ -272,8 +270,8 @@ Linkable* ListRep::remove(ListRep::Equal equal, const void* client_data)
 
     if (p)
     {
-       PEGASUS_DEBUG_ASSERT(p->magic);
-       remove(p);
+        PEGASUS_DEBUG_ASSERT(p->magic);
+        remove(p);
     }
 
     return p;
@@ -285,7 +283,7 @@ void ListRep::apply(ListRep::Apply apply, const void* client_data)
     PEGASUS_DEBUG_ASSERT(apply != 0);
 
     for (Linkable* p = _front; p; p = p->next)
-       (*apply)(p, client_data);
+        (*apply)(p, client_data);
 }
 
 PEGASUS_NAMESPACE_END
index 017d91d7af01372a366f1589ff58a9325604b419..5b459dc653c758c7a8ea11f043a02c1cc091a292 100644 (file)
@@ -29,8 +29,6 @@
 //
 //==============================================================================
 //
-// Author: Mike Brasher (m.brasher@inovadevelopment.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef _Pegasus_Common_List_h
@@ -44,7 +42,7 @@
 PEGASUS_NAMESPACE_BEGIN
 
 /** The NullLock class can be passed as the LockType template parameter to the
-    List template class. The NullLock implements no-ops for the lock(), 
+    List template class. The NullLock implements no-ops for the lock(),
     try_lock() and unlock() operations.
 */
 class NullLock
@@ -130,8 +128,8 @@ private:
 };
 
 /** The List class implements an intrusive linked list. We say it is intrusive
-    because the element class must derive from Linkable, which provides the 
-    link fields used by this implementation. An intrusive implementation has 
+    because the element class must derive from Linkable, which provides the
+    link fields used by this implementation. An intrusive implementation has
     two main benefits: it is more efficient and uses less memory. Recall that
     a non-intrusive linked list must allocate an additional "node" object that
     contains the links fields as well as a pointer to the element. This implies
@@ -140,7 +138,7 @@ private:
 
     The List template takes two arguments: the element type and the lock type.
     Again, the element type must derive from Linkable. The lock type is used
-    to synchronize access to the list operations and can be any class that 
+    to synchronize access to the list operations and can be any class that
     implements these methods: lock(), try_lock(), unlock(). Here are three
     classes that can be used as the lock type.
 
@@ -148,137 +146,137 @@ private:
         - Mutex - non-recursive mutex.
         - Mutex - recursive mutex.
 
-    Now we consider an example. So you want to create a list of Person 
+    Now we consider an example. So you want to create a list of Person
     elements. First you must derive from the Linkable class as shown below.
 
-       \code
-       class Person : public Linkable
-       {
-           Person(const String& name);
-           .
-           .
-           .
-       }
-       \endcode
+        \code
+        class Person : public Linkable
+        {
+            Person(const String& name);
+            .
+            .
+            .
+        }
+        \endcode
 
     Linkable is a non-virtual base class and contains the link fields this
     implementation will use to place Person elements onto the list. Second,
     you must instantiate the List template. Here are three possibilities.
 
-       \code
-       List<Person, NullLink>; // Do no synchronization.
-       List<Person, Mutex>; // Use Mutex class to synchronize.
-       List<Person, Mutex>; // Use Mutex class to synchronize.
-       \endcode
+        \code
+        List<Person, NullLink>; // Do no synchronization.
+        List<Person, Mutex>; // Use Mutex class to synchronize.
+        List<Person, Mutex>; // Use Mutex class to synchronize.
+        \endcode
 
     Finally, use the list. The following example adds three Person objects
     to the back of the list and removes one from the front.
 
-       \code
-       typedef List<Person, Mutex> PersonList;
-       PersonList list;
+        \code
+        typedef List<Person, Mutex> PersonList;
+        PersonList list;
 
-       list.insert_back(new Person("John"));
-       list.insert_back(new Person("Mary"));
-       list.insert_back(new Person("Jane"));
+        list.insert_back(new Person("John"));
+        list.insert_back(new Person("Mary"));
+        list.insert_back(new Person("Jane"));
 
-       Person* person = list.remove_front();
-       \endcode
+        Person* person = list.remove_front();
+        \endcode
 
-    One recurring usage pattern is exhausting the elements of a list. For 
+    One recurring usage pattern is exhausting the elements of a list. For
     example (this is thread-safe).
 
-       \code
-       Person* person;
+        \code
+        Person* person;
 
-       while ((person = list.remove_front())
-       {
-           // Do something with person here.
-       }
-       \endcode
+        while ((person = list.remove_front())
+        {
+            // Do something with person here.
+        }
+        \endcode
 
     Another pattern is to iterate the elements of the list, which requires a
     lock for the duration of the iteration. For example:
 
-       \code
-       list.lock();
+        \code
+        list.lock();
 
-       for (Person* p = list.front(); p; p = list.next_of(p))
-       {
-           // Use p here!
-       }
+        for (Person* p = list.front(); p; p = list.next_of(p))
+        {
+            // Use p here!
+        }
 
-       list.unlock();
-       \endcode
+        list.unlock();
+        \endcode
 
     Beware that this pattern fails for non-recursive mutexes since the mutex
     is locked once by our example and again by front(). You may have noticed
     that if an exception is thrown before unlock(), that the mutex will
     remain locked. For this reason, the List class contains an AutoLock class
-    that will automatically release the mutex. We now rework the previous 
+    that will automatically release the mutex. We now rework the previous
     example to use an AutoLock object.
 
-       \code
-       {
-           PersonList::AutoLock autoLock(list);
+        \code
+        {
+            PersonList::AutoLock autoLock(list);
 
-           for (Person* p = list.front(); p; p = list.next_of(p))
-           {
-               // Use p here!
-           }
-       }
-       \endcode
+            for (Person* p = list.front(); p; p = list.next_of(p))
+            {
+                // Use p here!
+            }
+        }
+        \endcode
 
-    The List class provides a special find function to simplify recurring 
+    The List class provides a special find function to simplify recurring
     lookups of an element by some specific criteria. For example, lets add an
     equal function to our Person class as follows:
 
-       \code
-       class Person : public Linkable
-       {
-           Person(const String& name);
-           const String& name();
+        \code
+        class Person : public Linkable
+        {
+            Person(const String& name);
+            const String& name();
 
-           static bool equal(const Person* person, const char* client_data)
-           {
-               const String& name = *((const String*)client_data);
-               return person->name() == name;
-           }
-       }
-       \endcode
+            static bool equal(const Person* person, const char* client_data)
+            {
+                const String& name = *((const String*)client_data);
+                return person->name() == name;
+            }
+        }
+        \endcode
 
     This equal function may now be passed to the find() function to lookup
     a specific person in a thread-safe way. For example:
 
-       \code
-       const String name = "John";
-       Person* person = list.find(Person::equal, &name);
+        \code
+        const String name = "John";
+        Person* person = list.find(Person::equal, &name);
 
-       if (person)
-       {
-           // Found John!
-       }
-       \endcode
+        if (person)
+        {
+            // Found John!
+        }
+        \endcode
 
     Similary, we can delete "John" by using the equal-form of remove().
 
-       \code
-       const String name = "John";
-       Person* person = list.remove(Person::equal, &name);
-       \endcode
+        \code
+        const String name = "John";
+        Person* person = list.remove(Person::equal, &name);
+        \endcode
 
     Finally, we can "apply" a function to every element of the list using
     the apply method. For example:
 
-       \code
-       static void _print(Person* person, const void* client_data)
-       {
-           printf("%s\n", (const char*)client_data);
-           person->print();
-       }
+        \code
+        static void _print(Person* person, const void* client_data)
+        {
+            printf("%s\n", (const char*)client_data);
+            person->print();
+        }
 
-       list.apply(_print, "My List");
-       \endcode
+        list.apply(_print, "My List");
+        \endcode
 */
 template<class ElemType, class LockType>
 class List
@@ -293,7 +291,7 @@ public:
 
     /** Default constructor.
     */
-    List() : _rep(_destructor) 
+    List() : _rep(_destructor)
     {
     }
 
@@ -301,143 +299,143 @@ public:
     */
     ~List()
     {
-       AutoLock al(*this);
-       _rep.clear();
+        AutoLock al(*this);
+        _rep.clear();
     }
 
     /** Remove and delete all elements in this list. size() returns zero
-       after this is called.
+        after this is called.
     */
     void clear()
     {
-       AutoLock al(*this);
-       _rep.clear();
+        AutoLock al(*this);
+        _rep.clear();
     }
 
     /** Returns the number of elements in the list.
     */
-    size_t size() const 
+    size_t size() const
     {
-       AutoLock al(*this);
-       return _rep.size(); 
+        AutoLock al(*this);
+        return _rep.size();
     }
 
     /** Returns true if the list is empty (i.e., has zero elements).
     */
-    size_t is_empty() const 
-    { 
-       AutoLock al(*this);
-       return _rep.empty(); 
+    size_t is_empty() const
+    {
+        AutoLock al(*this);
+        return _rep.empty();
     }
 
     /** Obtains a pointer to the element at the front of the list.
     */
-    ElemType* front() 
-    { 
-       AutoLock al(*this);
-       return static_cast<ElemType*>(_rep.front()); 
+    ElemType* front()
+    {
+        AutoLock al(*this);
+        return static_cast<ElemType*>(_rep.front());
     }
 
     /** Obtains a const-pointer to the element at the front of the list.
     */
     const ElemType* front() const
-    { 
-       AutoLock al(*this);
-       return static_cast<const ElemType*>(_rep.front()); 
+    {
+        AutoLock al(*this);
+        return static_cast<const ElemType*>(_rep.front());
     }
 
     /** Obtains a pointer to the element at the back of the list.
     */
-    ElemType* back() 
-    { 
-       AutoLock al(*this);
-       return static_cast<ElemType*>(_rep.back()); 
+    ElemType* back()
+    {
+        AutoLock al(*this);
+        return static_cast<ElemType*>(_rep.back());
     }
 
     /** Obtains a const-pointer to the element at the back of the list.
     */
     const ElemType* back() const
-    { 
-       AutoLock al(*this);
-       return static_cast<const ElemType*>(_rep.back()); 
+    {
+        AutoLock al(*this);
+        return static_cast<const ElemType*>(_rep.back());
     }
 
     /** Returns the element after elem (used to iterate list).
     */
-    ElemType* next_of(ElemType* elem) 
+    ElemType* next_of(ElemType* elem)
     {
-       return static_cast<ElemType*>(elem->next);
+        return static_cast<ElemType*>(elem->next);
     }
 
     /** Returns the element before elem (used to iterate list).
     */
-    ElemType* prev_of(ElemType* elem) 
+    ElemType* prev_of(ElemType* elem)
     {
-       return static_cast<ElemType*>(elem->prev);
+        return static_cast<ElemType*>(elem->prev);
     }
 
     /** Insert elem at the front of the list.
     */
     void insert_front(ElemType* elem)
     {
-       AutoLock al(*this);
-       _rep.insert_front(elem);
+        AutoLock al(*this);
+        _rep.insert_front(elem);
     }
 
     /** Insert elem at the back of the list.
     */
     void insert_back(ElemType* elem)
     {
-       AutoLock al(*this);
-       _rep.insert_back(elem);
+        AutoLock al(*this);
+        _rep.insert_back(elem);
     }
 
     /** Insert elem after pos.
     */
     void insert_after(ElemType* pos, ElemType* elem)
     {
-       AutoLock al(*this);
-       _rep.insert_after(pos, elem);
+        AutoLock al(*this);
+        _rep.insert_after(pos, elem);
     }
 
     /** Insert elem before pos.
     */
     void insert_before(ElemType* pos, ElemType* elem)
     {
-       AutoLock al(*this);
-       _rep.insert_before(pos, elem);
+        AutoLock al(*this);
+        _rep.insert_before(pos, elem);
     }
 
     /** Remove the given element.
     */
     void remove(ElemType* pos)
     {
-       AutoLock al(*this);
-       _rep.remove(pos);
+        AutoLock al(*this);
+        _rep.remove(pos);
     }
 
     /** Returns true if the list contains the given element.
     */
     bool contains(const ElemType* elem)
     {
-       AutoLock al(*this);
-       return _rep.contains(elem);
+        AutoLock al(*this);
+        return _rep.contains(elem);
     }
 
     /** Removes and returns the element at the front of the list.
     */
     ElemType* remove_front()
     {
-       AutoLock al(*this);
-       return static_cast<ElemType*>(_rep.remove_front());
+        AutoLock al(*this);
+        return static_cast<ElemType*>(_rep.remove_front());
     }
 
     /** Removes and returns the element at the back of the list.
     */
     ElemType* remove_back()
     {
-       AutoLock al(*this);
-       return static_cast<ElemType*>(_rep.remove_back());
+        AutoLock al(*this);
+        return static_cast<ElemType*>(_rep.remove_back());
     }
 
     /** Attempts to find an element in the list that satisfies the equal()
@@ -445,28 +443,28 @@ public:
     */
     ElemType* find(Equal equal, const void* client_data)
     {
-       AutoLock al(*this);
-       return static_cast<ElemType*>(
-           _rep.find(ListRep::Equal(equal), client_data));
+        AutoLock al(*this);
+        return static_cast<ElemType*>(
+            _rep.find(ListRep::Equal(equal), client_data));
     }
 
     /** Attempts to remove the element in the list that satisfies the equal()
         predicate. Removes and returns the first element satisfying equal() or
-       null if none.
+        null if none.
     */
     ElemType* remove(Equal equal, const void* client_data)
     {
-       AutoLock al(*this);
-       return static_cast<ElemType*>(
-           _rep.remove(ListRep::Equal(equal), client_data));
+        AutoLock al(*this);
+        return static_cast<ElemType*>(
+            _rep.remove(ListRep::Equal(equal), client_data));
     }
 
     /** Apply the given function to every element of the list.
     */
     void apply(Apply apply, const void* client_data)
     {
-       AutoLock al(*this);
-       _rep.apply(ListRep::Apply(apply), client_data);
+        AutoLock al(*this);
+        _rep.apply(ListRep::Apply(apply), client_data);
     }
 
     /** Lock the list.
@@ -486,35 +484,35 @@ public:
     LockType& getLock() const { return ((This*)this)->_lock; }
 
     /** An instance of this class is used to lock this list on construction
-       and later unlock it on destruction.
+        and later unlock it on destruction.
     */
     class AutoLock
     {
     public:
 
-       /**
-       */
-       AutoLock(const This& list) : _lock(list.getLock())
-       {
-           _lock.lock();
-       }
+        /**
+        */
+        AutoLock(const This& list) : _lock(list.getLock())
+        {
+            _lock.lock();
+        }
 
-       /**
-       */
-       ~AutoLock() 
-       {
-           _lock.unlock();
-       }
+        /**
+        */
+        ~AutoLock()
+        {
+            _lock.unlock();
+        }
 
     private:
-       LockType& _lock;
+        LockType& _lock;
     };
 
 private:
 
     static void _destructor(Linkable* ptr)
     {
-       delete static_cast<ElemType*>(ptr);
+        delete static_cast<ElemType*>(ptr);
     }
 
     ListRep _rep;
index 5cf4dfecbb76283a39dfb8afbad0714c400549f8..c4c4bf6b10264f57eb0c29415513c1fe2d63447b 100644 (file)
@@ -29,8 +29,6 @@
 ;
 ;==============================================================================
 ;
-; Author: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-;
 ;%/////////////////////////////////////////////////////////////////////////////
 
 ;
index f6fc88645e530dc58dbbd63383b2c751c59b2f05..a72e19b642682002573a1dd0157b16783c1e56bb 100644 (file)
@@ -36,7 +36,7 @@
 #include <cstring>
 #include "Logger.h"
 #include "System.h"
-#include <Pegasus/Common/MessageLoader.h> //l10n
+#include <Pegasus/Common/MessageLoader.h>
 
 #if defined(PEGASUS_USE_SYSLOGS)
 # include <syslog.h>
@@ -130,13 +130,12 @@ public:
 
         // KS: I put the second test in just in case some trys to create
         // a completly erronous directory.  At least we will get a message
-        if (!System::isDirectory(lgDir)){
-           //l10n
-           //cerr << "Logging Disabled";
-           MessageLoaderParms parms("Common.Logger.LOGGING_DISABLED",
-               "Logging Disabled");
+        if (!System::isDirectory(lgDir))
+        {
+            MessageLoaderParms parms("Common.Logger.LOGGING_DISABLED",
+                "Logging Disabled");
 
-           cerr << MessageLoader::getMessage(parms);
+            cerr << MessageLoader::getMessage(parms);
         }
 
         CString fileName = _allocLogFileName(homeDirectory, Logger::TRACE_LOG);
@@ -158,9 +157,9 @@ public:
 #else
 
 #ifdef PEGASUS_OS_ZOS
-       logIdendity = System::CIMSERVER.getCString();
+       logIdentity = System::CIMSERVER.getCString();
         // If System Log is used open it
-        System::openlog(logIdendity, LOG_PID, LOG_DAEMON);
+        System::openlog(logIdentity, LOG_PID, LOG_DAEMON);
 #endif
 
 #endif
@@ -204,7 +203,7 @@ public:
 private:
 
 #ifdef PEGASUS_OS_ZOS
-    CString logIdendity;
+    CString logIdentity;
 #endif
     ofstream _logs[int(Logger::NUM_LOGS)];
 };
@@ -212,10 +211,10 @@ private:
 void Logger::_putInternal(
     LogFileType logFileType,
     const String& systemId,
-    const Uint32 logComponent, // TODO: Support logComponent mask in future release
+    const Uint32 logComponent, // FUTURE: Support logComponent mask
     Uint32 logLevel,
     const String& formatString,
-    const String& messageId,  // l10n
+    const String& messageId,
     const Formatter::Arg& arg0,
     const Formatter::Arg& arg1,
     const Formatter::Arg& arg2,
@@ -331,7 +330,7 @@ void Logger::put(
     if (wouldLog(logLevel))
     {
         Logger::_putInternal(logFileType, systemId, 0, logLevel,
-            formatString, String::EMPTY, arg0, arg1, arg2, arg3, 
+            formatString, String::EMPTY, arg0, arg1, arg2, arg3,
             arg4, arg5, arg6, arg7, arg8, arg9);
     }
 }
index c9106ae6bff2a499221a6a5d36fff77375020c5d..abb1b0db0cb9940e100d09e8e46544af82f4345d 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By: Dave Rosckes (rosckes@us.ibm.com)
-//              David Dillard, Symantec Corp. (david_dillard@symantec.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_Logger_h
index 915799a53d003b10a8ff7ed7308eb02ba6ea29dd..d1a5bdb5444c1a1e78bc2bd3ce75f3edfaf89717 100644 (file)
 PEGASUS_NAMESPACE_BEGIN
 
 /** The Magic class implements a convenient way to use magic numbers in
-    user-defined classes. Magic numbers help detect use of uninitialized, 
+    user-defined classes. Magic numbers help detect use of uninitialized,
     destructed, or corrupted objects.
 
-    To instrument a class to use magic numbers simply add a class member 
+    To instrument a class to use magic numbers simply add a class member
     of type Magic<> as shown in thsi example:
 
-       \code
-       class MyClass
-       {
-       public:
+        \code
+        class MyClass
+        {
+        public:
 
-           MyClass();
+            MyClass();
 
-           ~MyClass();
+            ~MyClass();
 
-           void foo();
+            void foo();
 
-       private:
-           Magic<0xC531B144> _magic;
-       };
-       \endcode
+        private:
+            Magic<0xC531B144> _magic;
+        };
+        \endcode
 
     Choose whatever number you like for a magic number. The number above was
-    generated by the Linux uuidgen utility (Windows has a utility with the 
+    generated by the Linux uuidgen utility (Windows has a utility with the
     same name).
 
     To test magic number, add the following expression wherever necessary
     (usually as the first line of every member function).
 
-       \code
-       PEGASUS_ASSERT_DEBUG(_magic);
-       \endcode
+        \code
+        PEGASUS_ASSERT_DEBUG(_magic);
+        \endcode
 
     Here's a typical example:
 
-       \code
-       MyClass::~MyClass()
-       {
-           PEGASUS_ASSERT_DEBUG(_magic);
-       }
-       \endcode
+        \code
+        MyClass::~MyClass()
+        {
+            PEGASUS_ASSERT_DEBUG(_magic);
+        }
+        \endcode
 
     This tests whether the magic number is 0xC531B144 and asserts if it is
     not.
@@ -102,31 +102,31 @@ public:
 
     /** Default constructor. Sets the magic number.
     */
-    Magic() 
+    Magic()
     {
 #ifdef PEGASUS_DEBUG
-       _magic = MAGIC_NUMBER;
+        _magic = MAGIC_NUMBER;
 #endif
     }
 
     /** Destructor. Clears the magic number (with the pattern 0xDDDDDDDD).
     */
-    ~Magic() 
+    ~Magic()
     {
 #ifdef PEGASUS_DEBUG
-       _magic = 0xDDDDDDDD; 
+        _magic = 0xDDDDDDDD;
 #endif
     }
 
     /** Allows magic number to be used as a boolean expression. This function
-       tests the magic number and return true if valid.
+        tests the magic number and return true if valid.
     */
-    operator bool() const 
-    { 
+    operator bool() const
+    {
 #ifdef PEGASUS_DEBUG
-       return _magic == MAGIC_NUMBER; 
+        return _magic == MAGIC_NUMBER;
 #else
-       return true;
+        return true;
 #endif
     }
 
index 19d51fb8ba950d631487e2e880cbd7247d234a24..b6a31d7882cb4c0cd40a283d3d3141abe3321730 100644 (file)
@@ -47,7 +47,7 @@ LIBRARY = pegcommon
 ##
 ## CAUTION: the source files are divided evenly (more or less) between SOURCES1
 ## and SOURCES2. This avoids a command line buffer overflow on Windows 2000
-## (see bug #2754 for details). As a precaution, limit SOURCES1 and SOURCES2 
+## (see bug #2754 for details). As a precaution, limit SOURCES1 and SOURCES2
 ## to 75 source files each.
 ##
 
@@ -248,7 +248,7 @@ ifeq ($(PEGASUS_PLATFORM),WIN32_IX86_MSVC)
   else
      ifneq ($(CL_MAJOR_VERSION), 12)
     SYS_LIBS += secur32.lib
-     endif  
+     endif
   endif
 endif
 
index 971a5bb93a421434c6c68ffe35fe7cf20f541d05..c950c0f2a26548e750932ed80a1a5b3e9e7e2c00 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By:
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include "Memory.h"
index c56d1a6b85bc73f392f09f926c587ded2af28d5e..bc7dc1dc6aa370b68858f80523e775bb2670912c 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By: David Dillard, VERITAS Software Corp.
-//                  (david.dillard@veritas.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 ////////////////////////////////////////////////////////////////////////////////
index cea2e8e686372e2271c3fbc00ad097f5db1ab082..d075dfd566486aee887b4d2fc87286bbb9fbbe13 100644 (file)
@@ -47,8 +47,8 @@ Uint32 MessageMask::ha_request =             0x00100000;
 Uint32 MessageMask::ha_reply =               0x00200000;
 Uint32 MessageMask::ha_async =               0x00400000;
 
-Message::~Message() 
-{ 
+Message::~Message()
+{
 }
 
 #ifdef PEGASUS_DEBUG
@@ -56,15 +56,15 @@ void Message::print(ostream& os, Boolean printHeader) const
 {
     if (printHeader)
     {
-       os << "Message\n";
-       os << "{";
+        os << "Message\n";
+        os << "{";
     }
 
     os << "    messageType: " << MessageTypeToString(_type) << endl;
 
     if (printHeader)
     {
-       os << "}";
+        os << "}";
     }
 }
 #endif
@@ -146,7 +146,7 @@ static const char* _MESSAGE_TYPE_STRINGS[] =
     "HTTP_MESSAGE",
     "HTTP_ERROR_MESSAGE",
     "CLIENT_EXCEPTION_MESSAGE",
-        
+
     "ASYNC::REGISTER_CIM_SERVICE", //            async_message::0x00000001;
     "ASYNC::DEREGISTER_CIM_SERVICE", //          async_message::0x00000002;
     "ASYNC::UPDATE_CIM_SERVICE", //              async_message::0x00000003;
@@ -160,20 +160,20 @@ static const char* _MESSAGE_TYPE_STRINGS[] =
     "ASYNC::ASYNC_OP_RESULT", //                 async_message::0x0000000a;
     "ASYNC::ASYNC_LEGACY_OP_START", //           async_message::0x0000000b;
     "ASYNC::ASYNC_LEGACY_OP_RESULT", //          async_message::0x0000000c;
-    
+
     "ASYNC::FIND_SERVICE_Q", //                  async_message::0x0000000d;
     "ASYNC::FIND_SERVICE_Q_RESULT", //           async_message::0x0000000e;
     "ASYNC::ENUMERATE_SERVICE", //  90           async_message::0x0000000f;
     "ASYNC::ENUMERATE_SERVICE_RESULT", //        async_message::0x00000010;
-    
+
     "ASYNC::REGISTERED_MODULE", //               async_message::0x00000011;
     "ASYNC::DEREGISTERED_MODULE", //             async_message::0x00000012;
     "ASYNC::FIND_MODULE_IN_SERVICE", //          async_message::0x00000013;
     "ASYNC::FIND_MODULE_IN_SERVICE_RESPONSE", // async_message::0x00000014;
-    
+
     "ASYNC::ASYNC_MODULE_OP_START", //           async_message::0x00000015;
     "ASYNC::ASYNC_MODULE_OP_RESULT", //          async_message::0x00000016;
-    
+
     "CIM_NOTIFY_PROVIDER_ENABLE_REQUEST_MESSAGE",
     "CIM_NOTIFY_PROVIDER_ENABLE_RESPONSE_MESSAGE",
 
@@ -198,145 +198,145 @@ char s[128];
 const char* MessageTypeToString(Uint32 messageType)
 {
     if (messageType > DUMMY_MESSAGE && messageType < NUMBER_OF_MESSAGES )
-       return _MESSAGE_TYPE_STRINGS[messageType - 1];
-    if(messageType == 0 )
-       return "HEARTBEAT/REPLY" ;
-    sprintf (s, "Unknown message type ( %d ) ( 0x%04X )", messageType, messageType);
+        return _MESSAGE_TYPE_STRINGS[messageType - 1];
+    if (messageType == 0)
+        return "HEARTBEAT/REPLY";
+    sprintf(s, "Unknown message type ( %d ) ( 0x%04X )",
+        messageType, messageType);
     return s;
 }
 
 
 CIMOperationType Message::convertMessageTypetoCIMOpType(Uint32 type)
 {
-
     CIMOperationType enum_type = CIMOPTYPE_GET_CLASS;
     switch (type)
     {
         case CIM_GET_CLASS_REQUEST_MESSAGE:
         case CIM_GET_CLASS_RESPONSE_MESSAGE:
              enum_type = CIMOPTYPE_GET_CLASS;
-            break;    
-
-      case CIM_GET_INSTANCE_REQUEST_MESSAGE:
-      case CIM_GET_INSTANCE_RESPONSE_MESSAGE:     
-           enum_type = CIMOPTYPE_GET_INSTANCE;
-           break;
-      
-      case CIM_DELETE_CLASS_REQUEST_MESSAGE:
-      case CIM_DELETE_CLASS_RESPONSE_MESSAGE:     
-           enum_type = CIMOPTYPE_DELETE_CLASS;
-           break;
-      
-      case CIM_DELETE_INSTANCE_REQUEST_MESSAGE:
-      case CIM_DELETE_INSTANCE_RESPONSE_MESSAGE:
-           enum_type = CIMOPTYPE_DELETE_INSTANCE;              
-           break;
-
-      case CIM_CREATE_CLASS_REQUEST_MESSAGE:
-      case CIM_CREATE_CLASS_RESPONSE_MESSAGE:     
-           enum_type = CIMOPTYPE_CREATE_CLASS;              
-           break;
-
-      case CIM_CREATE_INSTANCE_REQUEST_MESSAGE:
-      case CIM_CREATE_INSTANCE_RESPONSE_MESSAGE:     
-           enum_type = CIMOPTYPE_CREATE_INSTANCE;              
-           break;
-          
-      case CIM_MODIFY_CLASS_REQUEST_MESSAGE:
-      case CIM_MODIFY_CLASS_RESPONSE_MESSAGE:     
-           enum_type = CIMOPTYPE_MODIFY_CLASS;              
-           break;
-           
-      case CIM_MODIFY_INSTANCE_REQUEST_MESSAGE:
-      case CIM_MODIFY_INSTANCE_RESPONSE_MESSAGE:     
-           enum_type = CIMOPTYPE_MODIFY_INSTANCE;              
-           break;
-      
-      case CIM_ENUMERATE_CLASSES_REQUEST_MESSAGE:
-      case CIM_ENUMERATE_CLASSES_RESPONSE_MESSAGE:     
-           enum_type = CIMOPTYPE_ENUMERATE_CLASSES;              
-           break;
-
-      case CIM_ENUMERATE_CLASS_NAMES_REQUEST_MESSAGE:
-      case CIM_ENUMERATE_CLASS_NAMES_RESPONSE_MESSAGE:     
-           enum_type = CIMOPTYPE_ENUMERATE_CLASS_NAMES;              
-           break;
-
-      case CIM_ENUMERATE_INSTANCES_REQUEST_MESSAGE:
-      case CIM_ENUMERATE_INSTANCES_RESPONSE_MESSAGE:     
-           enum_type = CIMOPTYPE_ENUMERATE_INSTANCES;              
-           break;
-
-      case CIM_ENUMERATE_INSTANCE_NAMES_REQUEST_MESSAGE:
-      case CIM_ENUMERATE_INSTANCE_NAMES_RESPONSE_MESSAGE:     
-           enum_type = CIMOPTYPE_ENUMERATE_INSTANCE_NAMES;              
-           break;
-
-      case CIM_EXEC_QUERY_REQUEST_MESSAGE:
-      case CIM_EXEC_QUERY_RESPONSE_MESSAGE:     
-           enum_type = CIMOPTYPE_EXEC_QUERY;              
-           break;
-
-      case CIM_ASSOCIATORS_REQUEST_MESSAGE:
-      case CIM_ASSOCIATORS_RESPONSE_MESSAGE:     
-           enum_type = CIMOPTYPE_ASSOCIATORS;              
-           break;
-
-      case CIM_ASSOCIATOR_NAMES_REQUEST_MESSAGE:
-      case CIM_ASSOCIATOR_NAMES_RESPONSE_MESSAGE:     
-           enum_type = CIMOPTYPE_ASSOCIATORS;              
-           break;
-
-      case CIM_REFERENCES_REQUEST_MESSAGE:
-      case CIM_REFERENCES_RESPONSE_MESSAGE:     
-           enum_type = CIMOPTYPE_REFERENCES;              
-           break;
-
-      case CIM_REFERENCE_NAMES_REQUEST_MESSAGE:
-      case CIM_REFERENCE_NAMES_RESPONSE_MESSAGE:     
-           enum_type = CIMOPTYPE_REFERENCE_NAMES;              
-           break;
-
-      case CIM_GET_PROPERTY_REQUEST_MESSAGE:
-      case CIM_GET_PROPERTY_RESPONSE_MESSAGE:     
-           enum_type = CIMOPTYPE_GET_PROPERTY;              
-           break;
-
-      case CIM_SET_PROPERTY_REQUEST_MESSAGE:
-      case CIM_SET_PROPERTY_RESPONSE_MESSAGE:     
-           enum_type = CIMOPTYPE_SET_PROPERTY;              
-           break;
-
-      case CIM_GET_QUALIFIER_REQUEST_MESSAGE:
-      case CIM_GET_QUALIFIER_RESPONSE_MESSAGE:     
-           enum_type = CIMOPTYPE_GET_QUALIFIER;              
-           break;
-
-      case CIM_SET_QUALIFIER_REQUEST_MESSAGE:
-      case CIM_SET_QUALIFIER_RESPONSE_MESSAGE:     
-           enum_type = CIMOPTYPE_SET_QUALIFIER;              
-           break;
-
-      case CIM_DELETE_QUALIFIER_REQUEST_MESSAGE:
-      case CIM_DELETE_QUALIFIER_RESPONSE_MESSAGE:     
-           enum_type = CIMOPTYPE_DELETE_QUALIFIER;              
-           break;
-
-      case CIM_ENUMERATE_QUALIFIERS_REQUEST_MESSAGE:
-      case CIM_ENUMERATE_QUALIFIERS_RESPONSE_MESSAGE:     
-           enum_type = CIMOPTYPE_ENUMERATE_QUALIFIERS;              
-           break;
-
-      case CIM_INVOKE_METHOD_REQUEST_MESSAGE:
-      case CIM_INVOKE_METHOD_RESPONSE_MESSAGE:     
-           enum_type = CIMOPTYPE_INVOKE_METHOD;              
-           break;
-    default:
-           // exicution should never get to this point
-           PEGASUS_ASSERT(false);
-  }
-  return enum_type;
+            break;
+
+        case CIM_GET_INSTANCE_REQUEST_MESSAGE:
+        case CIM_GET_INSTANCE_RESPONSE_MESSAGE:
+             enum_type = CIMOPTYPE_GET_INSTANCE;
+             break;
+
+        case CIM_DELETE_CLASS_REQUEST_MESSAGE:
+        case CIM_DELETE_CLASS_RESPONSE_MESSAGE:
+             enum_type = CIMOPTYPE_DELETE_CLASS;
+             break;
+
+        case CIM_DELETE_INSTANCE_REQUEST_MESSAGE:
+        case CIM_DELETE_INSTANCE_RESPONSE_MESSAGE:
+             enum_type = CIMOPTYPE_DELETE_INSTANCE;
+             break;
+
+        case CIM_CREATE_CLASS_REQUEST_MESSAGE:
+        case CIM_CREATE_CLASS_RESPONSE_MESSAGE:
+             enum_type = CIMOPTYPE_CREATE_CLASS;
+             break;
+
+        case CIM_CREATE_INSTANCE_REQUEST_MESSAGE:
+        case CIM_CREATE_INSTANCE_RESPONSE_MESSAGE:
+             enum_type = CIMOPTYPE_CREATE_INSTANCE;
+             break;
+
+        case CIM_MODIFY_CLASS_REQUEST_MESSAGE:
+        case CIM_MODIFY_CLASS_RESPONSE_MESSAGE:
+             enum_type = CIMOPTYPE_MODIFY_CLASS;
+             break;
+
+        case CIM_MODIFY_INSTANCE_REQUEST_MESSAGE:
+        case CIM_MODIFY_INSTANCE_RESPONSE_MESSAGE:
+             enum_type = CIMOPTYPE_MODIFY_INSTANCE;
+             break;
+
+        case CIM_ENUMERATE_CLASSES_REQUEST_MESSAGE:
+        case CIM_ENUMERATE_CLASSES_RESPONSE_MESSAGE:
+             enum_type = CIMOPTYPE_ENUMERATE_CLASSES;
+             break;
+
+        case CIM_ENUMERATE_CLASS_NAMES_REQUEST_MESSAGE:
+        case CIM_ENUMERATE_CLASS_NAMES_RESPONSE_MESSAGE:
+             enum_type = CIMOPTYPE_ENUMERATE_CLASS_NAMES;
+             break;
+
+        case CIM_ENUMERATE_INSTANCES_REQUEST_MESSAGE:
+        case CIM_ENUMERATE_INSTANCES_RESPONSE_MESSAGE:
+             enum_type = CIMOPTYPE_ENUMERATE_INSTANCES;
+             break;
+
+        case CIM_ENUMERATE_INSTANCE_NAMES_REQUEST_MESSAGE:
+        case CIM_ENUMERATE_INSTANCE_NAMES_RESPONSE_MESSAGE:
+             enum_type = CIMOPTYPE_ENUMERATE_INSTANCE_NAMES;
+             break;
+
+        case CIM_EXEC_QUERY_REQUEST_MESSAGE:
+        case CIM_EXEC_QUERY_RESPONSE_MESSAGE:
+             enum_type = CIMOPTYPE_EXEC_QUERY;
+             break;
+
+        case CIM_ASSOCIATORS_REQUEST_MESSAGE:
+        case CIM_ASSOCIATORS_RESPONSE_MESSAGE:
+             enum_type = CIMOPTYPE_ASSOCIATORS;
+             break;
+
+        case CIM_ASSOCIATOR_NAMES_REQUEST_MESSAGE:
+        case CIM_ASSOCIATOR_NAMES_RESPONSE_MESSAGE:
+             enum_type = CIMOPTYPE_ASSOCIATORS;
+             break;
+
+        case CIM_REFERENCES_REQUEST_MESSAGE:
+        case CIM_REFERENCES_RESPONSE_MESSAGE:
+             enum_type = CIMOPTYPE_REFERENCES;
+             break;
+
+        case CIM_REFERENCE_NAMES_REQUEST_MESSAGE:
+        case CIM_REFERENCE_NAMES_RESPONSE_MESSAGE:
+             enum_type = CIMOPTYPE_REFERENCE_NAMES;
+             break;
+
+        case CIM_GET_PROPERTY_REQUEST_MESSAGE:
+        case CIM_GET_PROPERTY_RESPONSE_MESSAGE:
+             enum_type = CIMOPTYPE_GET_PROPERTY;
+             break;
+
+        case CIM_SET_PROPERTY_REQUEST_MESSAGE:
+        case CIM_SET_PROPERTY_RESPONSE_MESSAGE:
+             enum_type = CIMOPTYPE_SET_PROPERTY;
+             break;
+
+        case CIM_GET_QUALIFIER_REQUEST_MESSAGE:
+        case CIM_GET_QUALIFIER_RESPONSE_MESSAGE:
+             enum_type = CIMOPTYPE_GET_QUALIFIER;
+             break;
+
+        case CIM_SET_QUALIFIER_REQUEST_MESSAGE:
+        case CIM_SET_QUALIFIER_RESPONSE_MESSAGE:
+             enum_type = CIMOPTYPE_SET_QUALIFIER;
+             break;
+
+        case CIM_DELETE_QUALIFIER_REQUEST_MESSAGE:
+        case CIM_DELETE_QUALIFIER_RESPONSE_MESSAGE:
+             enum_type = CIMOPTYPE_DELETE_QUALIFIER;
+             break;
+
+        case CIM_ENUMERATE_QUALIFIERS_REQUEST_MESSAGE:
+        case CIM_ENUMERATE_QUALIFIERS_RESPONSE_MESSAGE:
+             enum_type = CIMOPTYPE_ENUMERATE_QUALIFIERS;
+             break;
+
+        case CIM_INVOKE_METHOD_REQUEST_MESSAGE:
+        case CIM_INVOKE_METHOD_RESPONSE_MESSAGE:
+             enum_type = CIMOPTYPE_INVOKE_METHOD;
+             break;
+
+        default:
+             // exicution should never get to this point
+             PEGASUS_ASSERT(false);
+    }
+    return enum_type;
 }
 
 
@@ -357,18 +357,20 @@ void Message::endServer()
 
     StatisticalData::current()->addToValue(serverTimeMicroseconds, statType,
         StatisticalData::PEGASUS_STATDATA_SERVER);
-   
+
     StatisticalData::current()->addToValue(_providerTimeMicroseconds, statType,
         StatisticalData::PEGASUS_STATDATA_PROVIDER);
 
-  /*This adds the number of bytes read to the total.the request size 
-    value must be stored (requSize) and passed to the StatisticalData 
-    object at the end of processing other wise it will be the ONLY vlaue 
-    that is passed to the client which reports the current state of the 
-    object, not the pevious (one command ago) state */
-  StatisticalData::current()->addToValue(StatisticalData::current()->requSize,
-                                        statType, StatisticalData::PEGASUS_STATDATA_BYTES_READ);
+    /* This adds the number of bytes read to the total.the request size
+       value must be stored (requSize) and passed to the StatisticalData
+       object at the end of processingm otherwise it will be the ONLY value
+       that is passed to the client which reports the current state of the
+       object, not the previous (one command ago) state */
+
+    StatisticalData::current()->addToValue(
+        StatisticalData::current()->requSize,
+        statType,
+        StatisticalData::PEGASUS_STATDATA_BYTES_READ);
 }
 #endif
 
@@ -398,8 +400,8 @@ QueueIdStack& QueueIdStack::operator=(const QueueIdStack& x)
 {
     if (this != &x)
     {
-       memcpy(_items, x._items, sizeof(_items));
-       _size = x._size;
+        memcpy(_items, x._items, sizeof(_items));
+        _size = x._size;
     }
     return *this;
 }
index 5f908f4e2603a03d24090ba947816d04d998df50..1c7e1bc3ee9653aa0d8159ea318cf3912ae96e64 100644 (file)
@@ -76,168 +76,169 @@ enum HttpMethod
 */
 class PEGASUS_COMMON_LINKAGE Message : public Linkable
 {
-   public:
+public:
 
-      Message(
-        Uint32 type,
-        Uint32 destination = 0,
-        Uint32 mask = MessageMask::type_legacy)
-        :
-        _type(type),
-        _mask(mask),
-         _httpMethod (HTTP_METHOD__POST),
-         _serverStartTimeMicroseconds(0),
-         _providerTimeMicroseconds(0),
-         _totalServerTimeMicroseconds(0),
-         _close_connect(false),
-        _last_thread_id(Threads::self()),
-        _async(0),
-        dest(destination),
-        _isComplete(true), 
-        _index(0)
-      {
-      }
+    Message(
+        Uint32 type,
+        Uint32 destination = 0,
+        Uint32 mask = MessageMask::type_legacy)
+        :
+        _type(type),
+        _mask(mask),
+        _httpMethod (HTTP_METHOD__POST),
+        _serverStartTimeMicroseconds(0),
+        _providerTimeMicroseconds(0),
+        _totalServerTimeMicroseconds(0),
+        _close_connect(false),
+        _last_thread_id(Threads::self()),
+        _async(0),
+        dest(destination),
+        _isComplete(true),
+        _index(0)
+    {
+    }
 
-      virtual ~Message();
+    virtual ~Message();
 
-      // NOTE: The compiler default implementation of the copy constructor
-      // is used for this class.
+    // NOTE: The compiler default implementation of the copy constructor
+    // is used for this class.
 
-      Boolean getCloseConnect() const { return _close_connect; }
-      void setCloseConnect(Boolean close_connect)
-      {
-          _close_connect = close_connect;
-      }
+    Boolean getCloseConnect() const { return _close_connect; }
+    void setCloseConnect(Boolean close_connect)
+    {
+        _close_connect = close_connect;
+    }
 
-      Uint32 getType() const { return _type; }
+    Uint32 getType() const { return _type; }
 
-      void setType(Uint32 type) { _type = type; }
+    void setType(Uint32 type) { _type = type; }
 
-      Uint32 getMask() const { return _mask; }
+    Uint32 getMask() const { return _mask; }
 
-      void setMask(Uint32 mask) { _mask = mask; }
+    void setMask(Uint32 mask) { _mask = mask; }
 
-      HttpMethod getHttpMethod() const { return _httpMethod; }
+    HttpMethod getHttpMethod() const { return _httpMethod; }
 
-      void setHttpMethod(HttpMethod httpMethod) {_httpMethod = httpMethod;}
+    void setHttpMethod(HttpMethod httpMethod) {_httpMethod = httpMethod;}
 
-      
 #ifndef PEGASUS_DISABLE_PERFINST
-//
-// Needed for performance measurement
-//
+    //
+    // Needed for performance measurement
+    //
 
-      Uint64 getServerStartTime() const
-      {
-          return _serverStartTimeMicroseconds;
-      }
+    Uint64 getServerStartTime() const
+    {
+        return _serverStartTimeMicroseconds;
+    }
 
-      void setServerStartTime(Uint64 serverStartTimeMicroseconds)
-      {
-           _serverStartTimeMicroseconds = serverStartTimeMicroseconds;
-      }
+    void setServerStartTime(Uint64 serverStartTimeMicroseconds)
+    {
+         _serverStartTimeMicroseconds = serverStartTimeMicroseconds;
+    }
 
-      void endServer();
+    void endServer();
 
-      Uint64 getProviderTime() const
-      {
-          return _providerTimeMicroseconds;
-      }
+    Uint64 getProviderTime() const
+    {
+        return _providerTimeMicroseconds;
+    }
 
-      void setProviderTime(Uint64 providerTimeMicroseconds)
-      {
-          _providerTimeMicroseconds = providerTimeMicroseconds;
-      }
+    void setProviderTime(Uint64 providerTimeMicroseconds)
+    {
+        _providerTimeMicroseconds = providerTimeMicroseconds;
+    }
 
-      Uint64 getTotalServerTime() const
-      {
-          return _totalServerTimeMicroseconds;
-      }
+    Uint64 getTotalServerTime() const
+    {
+        return _totalServerTimeMicroseconds;
+    }
 
-      void setTotalServerTime(Uint64 totalServerTimeMicroseconds)
-      {
-          _totalServerTimeMicroseconds = totalServerTimeMicroseconds;
-      }
+    void setTotalServerTime(Uint64 totalServerTimeMicroseconds)
+    {
+        _totalServerTimeMicroseconds = totalServerTimeMicroseconds;
+    }
 
 #endif
 
-      static CIMOperationType convertMessageTypetoCIMOpType(Uint32 type);
+    static CIMOperationType convertMessageTypetoCIMOpType(Uint32 type);
 
 #ifdef PEGASUS_DEBUG
-      virtual void print(
-         PEGASUS_STD(ostream)& os, 
-         Boolean printHeader = true) const;
+    virtual void print(
+        PEGASUS_STD(ostream)& os,
+        Boolean printHeader = true) const;
 #endif
 
-      Message *get_async(void)
-      {
-        Message *ret = _async;
-        _async = 0;
-        return ret;
-      }
-
-      void put_async(Message * msg)
-      {
-        _async = msg;
-      }
-
-      // << Tue Jul  1 11:02:49 2003 mdd >> pep_88 and helper for i18n and l10n
-      Boolean thread_changed(void)
-      {
-        if (!Threads::equal(_last_thread_id, Threads::self()))
-        {
-           _last_thread_id = Threads::self();
-           return true;
-        }
-
-        return false;
-      }
-      
-                       // set the message index indicating what piece (or sequence) this is
-                       // message indexes start at zero
-                       void setIndex(Uint32 index) { _index = index; }
-
-                       // increment the message index
-                       void incrementIndex() { _index++; }
-
-                       // set the complete flag indicating if this message piece is the 
-                       // last or not
-                       void setComplete(Boolean isComplete) 
-                               { _isComplete = isComplete ? true:false; }
-
-                       // get the message index (or sequence number)
-                       Uint32 getIndex() const { return _index; }
-
-                       // is this the first piece of the message ?
-                       Boolean isFirst() const { return _index == 0 ? true : false; }
-
-                       // is this message complete? (i.e the last in a one or more sequence)
-                       Boolean isComplete() const { return _isComplete; }
-
-   private:
-      Uint32 _type;
-      Uint32 _mask;
-      HttpMethod _httpMethod;
-
-      // Needed for performance measurement
-      Uint64 _serverStartTimeMicroseconds;
-      Uint64 _providerTimeMicroseconds;
-      Uint64 _totalServerTimeMicroseconds;
-
-      Boolean   _close_connect;  
-
-      // << Tue Jul  1 11:02:35 2003 mdd >> pep_88 and helper for i18n and l10n
-      ThreadType _last_thread_id;
-
-   public:
-      Message *_async;
-      Uint32 dest;
-
-   private:
-      Message& operator=(const Message& msg);
-
-      Boolean _isComplete;
-      Uint32 _index;
+    Message* get_async()
+    {
+        Message *ret = _async;
+        _async = 0;
+        return ret;
+    }
+
+    void put_async(Message* msg)
+    {
+        _async = msg;
+    }
+
+    // << Tue Jul  1 11:02:49 2003 mdd >> pep_88 and helper for i18n and l10n
+    Boolean thread_changed()
+    {
+        if (!Threads::equal(_last_thread_id, Threads::self()))
+        {
+            _last_thread_id = Threads::self();
+            return true;
+        }
+
+        return false;
+    }
+
+    // set the message index indicating what piece (or sequence) this is
+    // message indexes start at zero
+    void setIndex(Uint32 index) { _index = index; }
+
+    // increment the message index
+    void incrementIndex() { _index++; }
+
+    // set the complete flag indicating if this message piece is the
+    // last or not
+    void setComplete(Boolean isComplete)
+    {
+        _isComplete = isComplete ? true:false;
+    }
+
+    // get the message index (or sequence number)
+    Uint32 getIndex() const { return _index; }
+
+    // is this the first piece of the message ?
+    Boolean isFirst() const { return _index == 0 ? true : false; }
+
+    // is this message complete? (i.e the last in a one or more sequence)
+    Boolean isComplete() const { return _isComplete; }
+
+private:
+    Uint32 _type;
+    Uint32 _mask;
+    HttpMethod _httpMethod;
+
+    // Needed for performance measurement
+    Uint64 _serverStartTimeMicroseconds;
+    Uint64 _providerTimeMicroseconds;
+    Uint64 _totalServerTimeMicroseconds;
+
+    Boolean _close_connect;
+
+    // << Tue Jul  1 11:02:35 2003 mdd >> pep_88 and helper for i18n and l10n
+    ThreadType _last_thread_id;
+
+public:
+    Message *_async;
+    Uint32 dest;
+
+private:
+    Message& operator=(const Message& msg);
+
+    Boolean _isComplete;
+    Uint32 _index;
 };
 
 
@@ -412,44 +413,44 @@ public:
 
     Uint32 size() const
     {
-       return _size;
+        return _size;
     }
 
     Boolean isEmpty() const
     {
-       return _size == 0;
+        return _size == 0;
     }
 
     void push(Uint32 x)
     {
 #ifdef PEGASUS_DEBUG
-       if (_size == MAX_SIZE)
-           throw StackOverflow();
+        if (_size == MAX_SIZE)
+            throw StackOverflow();
 #endif
-       _items[_size++] = x;
+        _items[_size++] = x;
     }
 
     Uint32& top()
     {
 #ifdef PEGASUS_DEBUG
-       if (_size == 0)
-           throw StackUnderflow();
+        if (_size == 0)
+            throw StackUnderflow();
 #endif
-       return _items[_size-1];
+        return _items[_size-1];
     }
 
     Uint32 top() const
     {
-       return ((QueueIdStack*)this)->top();
+        return ((QueueIdStack*)this)->top();
     }
 
     void pop()
     {
 #ifdef PEGASUS_DEBUG
-       if (_size == 0)
-           throw StackUnderflow();
+        if (_size == 0)
+            throw StackUnderflow();
 #endif
-       _size--;
+        _size--;
     }
 
     /** Make a copy of this stack and then pop the top element. */
index d54b5cd1dd9c87cc689fb1846c3ce980e6a90dae..24a7391b1c6c55c2fff4a8292b978d519c14d8a2 100755 (executable)
@@ -52,7 +52,7 @@ Boolean MessageLoader::_useProcessLocale = false;
 Boolean MessageLoader::_useDefaultMsg = false;
 AcceptLanguageList MessageLoader::_acceptlanguages;
 
-String MessageLoader::getMessage(MessageLoaderParms &parms)
+String MessageLoader::getMessage(MessageLoaderParmsparms)
 {
     PEG_METHOD_ENTER(TRC_L10N, "MessageLoader::getMessage");
     String msg;
@@ -63,16 +63,16 @@ String MessageLoader::getMessage(MessageLoaderParms &parms)
         msg = getMessage2(parms);
         closeMessageFile(parms);
     }
-    catch(Exception&)
+    catch (Exception&)
     {
-        msg =  String("AN INTERNAL ERROR OCCURED IN MESSAGELOADER: ")
-            .append(parms.default_msg);
+        msg = String("AN INTERNAL ERROR OCCURED IN MESSAGELOADER: ").append(
+            parms.default_msg);
     }
     PEG_METHOD_EXIT();
     return msg;
 }
 
-String MessageLoader::getMessage2(MessageLoaderParms &parms)
+String MessageLoader::getMessage2(MessageLoaderParmsparms)
 {
     PEG_METHOD_ENTER(TRC_L10N, "MessageLoader::getMessage2");
     String msg;
@@ -86,7 +86,7 @@ String MessageLoader::getMessage2(MessageLoaderParms &parms)
             if (msg.size() > 0)
             {
                 PEG_METHOD_EXIT();
-                return (msg);
+                return msg;
             }
         }
 #endif
@@ -99,18 +99,18 @@ String MessageLoader::getMessage2(MessageLoaderParms &parms)
         // 4) Did not get a message from ICU
 
         msg = formatDefaultMessage(parms);
-    } 
-    catch(Exception&)
+    }
+    catch (Exception&)
     {
-        msg = String("AN INTERNAL ERROR OCCURED IN MESSAGELOADER: ")
-            .append(parms.default_msg);
+        msg = String("AN INTERNAL ERROR OCCURED IN MESSAGELOADER: ").append(
+            parms.default_msg);
     }
 
     PEG_METHOD_EXIT();
     return msg;
 }
 
-void MessageLoader::openMessageFile(MessageLoaderParms &parms) 
+void MessageLoader::openMessageFile(MessageLoaderParms& parms)
 {
     PEG_METHOD_ENTER(TRC_L10N, "MessageLoader::openMessageFile");
 
@@ -128,24 +128,24 @@ void MessageLoader::openMessageFile(MessageLoaderParms &parms)
         // subsequent calls to getMessage2 will call
         // formatDefaultMessage() instead of using ICU.
 #else
-        // Set _resbundl to the "magic number" indicating there is no ICU 
+        // Set _resbundl to the "magic number" indicating there is no ICU
         // resource bundle to use
-        parms._resbundl = NO_ICU_MAGIC; 
+        parms._resbundl = NO_ICU_MAGIC;
 #endif
     }
-    catch(Exception&)
+    catch (Exception&)
     {
         // Set _resbundl to the "magic number" indicating there was trouble
         // during openICUMessageFile(), so there is no ICU resource bundle
         // to use.
-        parms._resbundl = NO_ICU_MAGIC; 
+        parms._resbundl = NO_ICU_MAGIC;
     }
 
     PEG_METHOD_EXIT();
     return;
 }
 
-void MessageLoader::closeMessageFile(MessageLoaderParms &parms) 
+void MessageLoader::closeMessageFile(MessageLoaderParms& parms)
 {
     PEG_METHOD_ENTER(TRC_L10N, "MessageLoader::closeMessageFile");
 
@@ -162,462 +162,549 @@ void MessageLoader::closeMessageFile(MessageLoaderParms &parms)
 
 #ifdef PEGASUS_HAS_ICU
 
-       void MessageLoader::openICUMessageFile(MessageLoaderParms &parms) {
+void MessageLoader::openICUMessageFile(MessageLoaderParms &parms)
+{
+    PEG_METHOD_ENTER(TRC_L10N, "MessageLoader::openICUMessageFile");
+    UErrorCode status = U_ZERO_ERROR;
+    CString resbundl_path_ICU;
+
+    const int size_locale_ICU = 50;
 
-               PEG_METHOD_ENTER(TRC_L10N, "MessageLoader::openICUMessageFile");
-               UErrorCode status = U_ZERO_ERROR;
-               //String resbundl_path_ICU;
-               CString resbundl_path_ICU;
+    // the static AcceptLangauges takes precedence over what
+    // parms.acceptlangauges has
+    AcceptLanguageList acceptlanguages;
+    acceptlanguages = (_acceptlanguages.size() > 0) ?
+        _acceptlanguages : parms.acceptlanguages;
 
-               const int size_locale_ICU = 50;
+    // get the correct path to the resource bundles
+    resbundl_path_ICU = getQualifiedMsgPath(parms.msg_src_path).getCString();
+
+    //cout << "USING PACKAGE PATH: " << endl;
+    //cout << resbundl_path_ICU << endl;
+    PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4, "Using resource bundle path:");
+    PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4, resbundl_path_ICU);
+#ifdef PEGASUS_OS_OS400
+    const char *atoe = resbundl_path_ICU;
+    AtoE((char*)atoe);
+#endif
 
-               // the static AcceptLangauges takes precedence over what parms.acceptlangauges has
-               AcceptLanguageList acceptlanguages;
-               acceptlanguages = (_acceptlanguages.size() > 0) ? _acceptlanguages : parms.acceptlanguages;
+    if (_useProcessLocale ||
+        (acceptlanguages.size() == 0 && parms.useProcessLocale))
+    {
+        // use the system default resource bundle
 
-               // get the correct path to the resource bundles
-               resbundl_path_ICU = getQualifiedMsgPath(parms.msg_src_path).getCString();
+        parms._resbundl = ures_open(
+            (const char*)resbundl_path_ICU, uloc_getDefault(), &status);
 
-               //cout << "USING PACKAGE PATH: " << endl;
-               //cout << resbundl_path_ICU << endl;
-               PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4, "Using resource bundle path:");
-               PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4, resbundl_path_ICU);
+        if (U_SUCCESS(status))
+        {
+            UErrorCode _status = U_ZERO_ERROR;
+            PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4, "Using process locale:");
+            PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4,
+                ures_getLocale(parms._resbundl, &_status));
+            if (status == U_USING_FALLBACK_WARNING ||
+                status == U_USING_DEFAULT_WARNING)
+            {
+                PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4,
+                    "Using process locale fallback or default");
+            }
+            const char * _locale = ures_getLocale(parms._resbundl,&status);
 #ifdef PEGASUS_OS_OS400
-               const char *atoe = resbundl_path_ICU;
-               AtoE((char*)atoe);
+            char tmplcl[size_locale_ICU];
+            strcpy(tmplcl, _locale);
+            EtoA(tmplcl);
+            String localeStr(tmplcl);
+#else
+            String localeStr(_locale);
 #endif
+            parms.contentlanguages.append(LanguageTag(
+                LanguageParser::convertLocaleIdToLanguageTag(localeStr)));
+        }
+        else
+        {
+            PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4,
+                "Using process locale.  Could not open resource, "
+                    "formatting default message.");
+            // magic number to indicate no ICU resource bundle to use
+            parms._resbundl = NO_ICU_MAGIC;
+        }
+        PEG_METHOD_EXIT();
+        return;
+    }
+    else if (acceptlanguages.size() == 0 && parms.useThreadLocale)
+    {
+        // get AcceptLanguageList from the current Thread
+        AcceptLanguageList *al = Thread::getLanguages();
+        if (al != NULL)
+        {
+            acceptlanguages = *al;
+            PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4,
+                "Using thread locale: got AcceptLanguageList from thread.");
+        }
+        else
+        {
+            PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4,
+                "Using thread locale: thread returned NULL for "
+                    "AcceptLanguageList.");
+        }
+    }
 
-               if(_useProcessLocale || (acceptlanguages.size() == 0 && parms.useProcessLocale)){ // use the system default resource bundle
-
-                       parms._resbundl = ures_open((const char*)resbundl_path_ICU, uloc_getDefault() , &status);
-
-                       if(U_SUCCESS(status)) {
-                               //cout << "PROCESS_LOCALE: opened resource bundle" << endl;
-                               UErrorCode _status = U_ZERO_ERROR;
-                               //cout << "PROCESS_LOCALE = " << ures_getLocale(resbundl, &_status) << endl;
-                               PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4, "Using process locale:");
-                               PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4, ures_getLocale(parms._resbundl, &_status));
-                               if(status == U_USING_FALLBACK_WARNING || status == U_USING_DEFAULT_WARNING){
-                                       //cout << "PROCESS_LOCALE: using fallback or default" << endl;
-                                       PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4, "Using process locale fallback or default");
-                               }
-                                const char * _locale = ures_getLocale(parms._resbundl,&status);
-        #ifdef PEGASUS_OS_OS400
-                                char tmplcl[size_locale_ICU];  
-                                strcpy(tmplcl, _locale);               
-                                EtoA(tmplcl);                  
-                                String localeStr(tmplcl);      
-        #else
-                                String localeStr(_locale);     
-        #endif
-                                parms.contentlanguages.append(LanguageTag(
-                                    LanguageParser::convertLocaleIdToLanguageTag(localeStr)));
-                       } else {
-                               //cout << "PROCESS_LOCALE: could not open resouce, formatting default message" << endl;
-                               PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4, "Using process locale.  Could not open resource, formatting default message.");
-                                parms._resbundl = NO_ICU_MAGIC; // magic number to indicate no ICU resource bundle to use
-                       }
-                        PEG_METHOD_EXIT();
-                       return;
-               } else if (acceptlanguages.size() == 0 && parms.useThreadLocale){ // get AcceptLanguageList from the current Thread
-                       AcceptLanguageList *al = Thread::getLanguages();
-                       if(al != NULL){
-                               acceptlanguages = *al;
-                               //cout << "THREAD_LOCALE: got acceptlanguages from thread" << endl;
-                               PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4, "Using thread locale: got AcceptLanguageList from thread.");
-                       }else {
-                               //cout << "THREAD_LOCALE: thread returned NULL for acceptlanguages" << endl;
-                               PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4, "Using thread locale: thread returned NULL for AcceptLanguageList.");
-                        }
-               }
-
-               char locale_ICU[size_locale_ICU];
-               LanguageTag languageTag;
-
-               // iterate through AcceptLanguageList, use the first resource bundle match
-               //cout << "LOOPING THROUGH ACCEPTLANGUAGES..." << endl;
-               PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4, "Looping through AcceptLanguageList...");
-               for (Uint32 index = 0; index < acceptlanguages.size(); index++)
-               {
-                       languageTag = acceptlanguages.getLanguageTag(index);
+    char locale_ICU[size_locale_ICU];
+    LanguageTag languageTag;
+
+    // iterate through AcceptLanguageList, use the first resource bundle match
+    PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4,
+        "Looping through AcceptLanguageList...");
+    for (Uint32 index = 0; index < acceptlanguages.size(); index++)
+    {
+        languageTag = acceptlanguages.getLanguageTag(index);
 #ifdef PEGASUS_OS_OS400
-                       CString cstr = languageTag.toString().getCString();
-                       const char *atoe = cstr;
-                       AtoE((char*)atoe);
-               
-                        uloc_getName(atoe, locale_ICU, size_locale_ICU, &status);
+        CString cstr = languageTag.toString().getCString();
+        const char *atoe = cstr;
+        AtoE((char*)atoe);
+
+        uloc_getName(atoe, locale_ICU, size_locale_ICU, &status);
 #else
-                       uloc_getName((const char*)(languageTag.toString()).getCString(), locale_ICU, size_locale_ICU, &status);
+        uloc_getName(
+            (const char*)(languageTag.toString()).getCString(),
+            locale_ICU, size_locale_ICU, &status);
 #endif
-                       //cout << "locale_ICU = " << locale_ICU << endl;
-                       // TODO: check to see if we have previously cached the resource bundle
-
-                       parms._resbundl = ures_open((const char*)resbundl_path_ICU, locale_ICU, &status);
-
-                       if(U_SUCCESS(status)) {
-                               //cout << "ACCEPTLANGUAGES LOOP: opened resource bundle with " << languageTag.toString() << endl;
-                               PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4, "ACCEPTLANGUAGES LOOP: opened resource bundle with:");
-                               PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4, languageTag.toString());
-                               if(status == U_USING_FALLBACK_WARNING || status == U_USING_DEFAULT_WARNING){
-                                       //we want to use the ICU fallback behaviour in the following cases ONLY
-                                       //cout << "ACCEPTLANGUAGES LOOP: ICU warns using FALLBACK or DEFAULT" << endl;
-                                       PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4,"ACCEPTLANGUAGES LOOP: ICU warns using FALLBACK or DEFAULT");
-                                       if((acceptlanguages.size() == 1) && (!parms.useICUfallback) && (status == U_USING_DEFAULT_WARNING)){
-                                               // in this case we want to return messages from the root bundle
-                                               status = U_ZERO_ERROR;
-                                               //cout << "ML::acceptlang.size =1 && !parms.useICUfallback && U_USING_DEFAULT_WARNING" << endl;
-                                               PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4,"acceptlang.size =1 && !parms.useICUfallback && U_USING_DEFAULT_WARNING, using root bundle.");
-
-                  // Reopen the bundle in the root locale
-                  ures_close(parms._resbundl);
-                  parms._resbundl = ures_open((const char*)resbundl_path_ICU, "", &status);
-                  if(U_SUCCESS(status)) {
-                    PEG_METHOD_EXIT();
-                    return;
-                  }
-                                       }
-                                       else if(acceptlanguages.size() == 1 || parms.useICUfallback){
-                                               //cout << "ACCEPTLANGUAGES LOOP: acceptlanguages.size == 1 or useICUfallback true, using ICU fallback behaviour..." << endl;
-                                               PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4,"ACCEPTLANGUAGES LOOP: acceptlanguages.size == 1 or useICUfallback true, using ICU fallback behaviour...");
-                                               const char * _locale = ures_getLocale(parms._resbundl,&status);
-                                       
+        // TODO: check to see if we have previously cached the resource bundle
+
+        parms._resbundl =
+            ures_open((const char*)resbundl_path_ICU, locale_ICU, &status);
+
+        if (U_SUCCESS(status))
+        {
+            PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4,
+                "ACCEPTLANGUAGES LOOP: opened resource bundle with:");
+            PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4, languageTag.toString());
+            if (status == U_USING_FALLBACK_WARNING ||
+                status == U_USING_DEFAULT_WARNING)
+            {
+                // we want to use the ICU fallback behaviour in the following
+                // cases ONLY
+                PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4,
+                    "ACCEPTLANGUAGES LOOP: ICU warns using FALLBACK or "
+                        "DEFAULT");
+                if ((acceptlanguages.size() == 1) && (!parms.useICUfallback) &&
+                    (status == U_USING_DEFAULT_WARNING))
+                {
+                    // in this case we want to return messages from the root
+                    // bundle
+                    status = U_ZERO_ERROR;
+                    PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4,
+                        "acceptlang.size =1 && !parms.useICUfallback && "
+                            "U_USING_DEFAULT_WARNING, using root bundle.");
+
+                    // Reopen the bundle in the root locale
+                    ures_close(parms._resbundl);
+                    parms._resbundl = ures_open(
+                        (const char*)resbundl_path_ICU, "", &status);
+                    if (U_SUCCESS(status))
+                    {
+                        PEG_METHOD_EXIT();
+                        return;
+                    }
+                }
+                else if (acceptlanguages.size() == 1 || parms.useICUfallback)
+                {
+                    PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4,
+                        "ACCEPTLANGUAGES LOOP: acceptlanguages.size == 1 or "
+                            "useICUfallback true, using ICU fallback "
+                            "behaviour...");
+                    const char* _locale =
+                        ures_getLocale(parms._resbundl, &status);
+
 #ifdef PEGASUS_OS_OS400
-                                               char tmplcl[size_locale_ICU];   
-                                               strcpy(tmplcl, _locale);                
-                                               EtoA(tmplcl);                   
-                                               String localeStr(tmplcl);
+                    char tmplcl[size_locale_ICU];
+                    strcpy(tmplcl, _locale);
+                    EtoA(tmplcl);
+                    String localeStr(tmplcl);
 #else
-                                               String localeStr(_locale);
+                    String localeStr(_locale);
 #endif
 
-                        parms.contentlanguages.append(LanguageTag(
-                            LanguageParser::convertLocaleIdToLanguageTag(
-                                localeStr)));
-                                                PEG_METHOD_EXIT();
-                                               return;
-                                       }
-                               }
-                               else{  // we found an exact resource bundle match, extract, and set ContentLanguage
-                                       //cout << "ACCEPTLANGUAGES LOOP: found an EXACT resource bundle MATCH" << endl;
-                                       PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4,"ACCEPTLANGUAGES LOOP: found an EXACT resource bundle MATCH:");
-                                       PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4,languageTag.toString());
-                                       parms.contentlanguages.append(LanguageTag(languageTag.toString()));
-                                        PEG_METHOD_EXIT();
-                                       return;
-                               }
-                       } else { // possible errors, ex: message path incorrect
-                       // for now do nothing, let the while loop continue
-                       //cout << "ACCEPTLANGUAGES LOOP: could NOT open a resource for: " << languageTag.toString() << endl;
-                       }
-                       status = U_ZERO_ERROR;  // reset status
-               }
-
-               // now if we DIDNT open a resource bundle, we want to enable ICU fallback for the highest priority language
-               if(acceptlanguages.size() > 0){
-                       //cout << "USING ICU FALLBACK" << endl;
-                       PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4,"No message was loaded, using ICU fallback behaviour.");
-                       languageTag = acceptlanguages.getLanguageTag(0);
+                    parms.contentlanguages.append(LanguageTag(
+                        LanguageParser::convertLocaleIdToLanguageTag(
+                            localeStr)));
+                    PEG_METHOD_EXIT();
+                    return;
+                }
+            }
+            else
+            {
+                // we found an exact resource bundle match, extract, and set
+                // ContentLanguage
+
+                PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4,
+                    "ACCEPTLANGUAGES LOOP: found an EXACT resource bundle "
+                        "MATCH:");
+                PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4,
+                    languageTag.toString());
+                parms.contentlanguages.append(
+                    LanguageTag(languageTag.toString()));
+                PEG_METHOD_EXIT();
+                return;
+            }
+        }
+        else
+        {
+            // possible errors, ex: message path incorrect
+            // for now do nothing, let the while loop continue
+        }
+        status = U_ZERO_ERROR;  // reset status
+    }
+
+    // now if we DIDN'T open a resource bundle, we want to enable ICU
+    // fallback for the highest priority language
+    if (acceptlanguages.size() > 0)
+    {
+        PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4,
+            "No message was loaded, using ICU fallback behaviour.");
+        languageTag = acceptlanguages.getLanguageTag(0);
 
 #ifdef PEGASUS_OS_OS400
-                       CString cstr = languageTag.toString().getCString();
-                       const char *atoe = cstr;
-                       AtoE((char*)atoe);
-                       
-                       uloc_getName(atoe, locale_ICU, size_locale_ICU, &status);
+        CString cstr = languageTag.toString().getCString();
+        const char *atoe = cstr;
+        AtoE((char*)atoe);
+
+        uloc_getName(atoe, locale_ICU, size_locale_ICU, &status);
 #else
-                       uloc_getName((const char*)(languageTag.toString()).getCString(), locale_ICU, size_locale_ICU, &status);
+        uloc_getName(
+            (const char*)(languageTag.toString()).getCString(),
+            locale_ICU, size_locale_ICU, &status);
 #endif
-                       //cout << "locale_ICU in fallback = " << locale_ICU << endl;
-                       status = U_ZERO_ERROR;
-                       parms._resbundl = ures_open((const char*)resbundl_path_ICU, locale_ICU, &status);
-                       const char * _locale = NULL;
-                       if(U_SUCCESS(status)) {
-                               if(status == U_USING_DEFAULT_WARNING){
-                                       //cout << "PRIORITY ICU FALLBACK: using default resource bundle with " << languageTag.toString() << endl;
-                                       PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4,"PRIORITY ICU FALLBACK: using default resource bundle with ");
-                                       PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4, languageTag.toString());
-                                       status = U_ZERO_ERROR;
-
-               // Reopen the bundle in the root locale
-               ures_close(parms._resbundl);
-                                       parms._resbundl = ures_open((const char*)resbundl_path_ICU, "", &status);
-                                       if(U_SUCCESS(status)) {
-                                       _locale = ures_getLocale(parms._resbundl,&status);
-                                       }
-                               }else{
-                               _locale = ures_getLocale(parms._resbundl,&status);
-                           }
-                               String localeStr;       
-
-                               if (_locale != NULL)    
-                               {
+        status = U_ZERO_ERROR;
+        parms._resbundl =
+            ures_open((const char*)resbundl_path_ICU, locale_ICU, &status);
+        const char* _locale = NULL;
+        if (U_SUCCESS(status))
+        {
+            if (status == U_USING_DEFAULT_WARNING)
+            {
+                PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4,
+                    "PRIORITY ICU FALLBACK: using default resource bundle "
+                    "with ");
+                PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4,
+                     languageTag.toString());
+                status = U_ZERO_ERROR;
+
+                // Reopen the bundle in the root locale
+                ures_close(parms._resbundl);
+                parms._resbundl =
+                    ures_open((const char*)resbundl_path_ICU, "", &status);
+                if (U_SUCCESS(status))
+                {
+                    _locale = ures_getLocale(parms._resbundl,&status);
+                }
+            }
+            else
+            {
+                _locale = ures_getLocale(parms._resbundl,&status);
+            }
+
+            String localeStr;
+
+            if (_locale != NULL)
+            {
 #ifdef PEGASUS_OS_OS400
-                                   char tmplcl[size_locale_ICU];       
-                                   strcpy(tmplcl, _locale);                    
-                                   EtoA(tmplcl);                       
-                                   localeStr.assign(tmplcl);           
+                char tmplcl[size_locale_ICU];
+                strcpy(tmplcl, _locale);
+                EtoA(tmplcl);
+                localeStr.assign(tmplcl);
 #else
-                                   localeStr.assign(_locale);
+                localeStr.assign(_locale);
 #endif
-                               }
-                                   if(localeStr != "root")                                        
-                    {
-                        parms.contentlanguages.append(LanguageTag(
-                            LanguageParser::convertLocaleIdToLanguageTag(
-                                localeStr)));
-                    }
-                     if (_locale != NULL)
-                     {
-                         PEG_METHOD_EXIT();
-                         return;
-                     }
-                       }
-               }
-
-               {                       // else if no message, load message from root bundle explicitly
-                       //cout << "EXHAUSTED ACCEPTLANGUAGES: using root bundle to extract message" << endl;
-                       PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4,"EXHAUSTED ACCEPTLANGUAGES: using root bundle to extract message");
-                       status = U_ZERO_ERROR;
-                       parms._resbundl = ures_open((const char*)resbundl_path_ICU, "", &status);
-                       if(U_SUCCESS(status)){
-                               //cout << "EXHAUSTED ACCEPTLANGUAGES: opened root resource bundle" << endl;
-                               PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4,"EXHAUSTED ACCEPTLANGUAGES: opened root resource bundle");
-                       }else {
-                               //cout << "EXHAUSTED ACCEPTLANGUAGES: could NOT open root resource bundle" << endl;
-                               PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4,"EXHAUSTED ACCEPTLANGUAGES: could NOT open root resource bundle");
-                                parms._resbundl = NO_ICU_MAGIC;
-                       }
-
-               }
-               PEG_METHOD_EXIT();
-               return;
-       }
-
-       String MessageLoader::extractICUMessage(UResourceBundle * resbundl, MessageLoaderParms &parms){
-               UErrorCode status = U_ZERO_ERROR;
-               int32_t msgLen = 0;
+            }
+
+            if (localeStr != "root")
+            {
+                parms.contentlanguages.append(LanguageTag(
+                    LanguageParser::convertLocaleIdToLanguageTag(
+                        localeStr)));
+            }
+
+            if (_locale != NULL)
+            {
+                PEG_METHOD_EXIT();
+                return;
+            }
+        }
+    }
+
+    {
+        // else if no message, load message from root bundle explicitly
+        PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4,
+            "EXHAUSTED ACCEPTLANGUAGES: using root bundle to extract message");
+        status = U_ZERO_ERROR;
+        parms._resbundl =
+            ures_open((const char*)resbundl_path_ICU, "", &status);
+        if (U_SUCCESS(status))
+        {
+            PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4,
+                "EXHAUSTED ACCEPTLANGUAGES: opened root resource bundle");
+        }
+        else
+        {
+            PEG_TRACE_STRING(TRC_L10N, Tracer::LEVEL4,
+                "EXHAUSTED ACCEPTLANGUAGES: could NOT open root resource "
+                    "bundle");
+            parms._resbundl = NO_ICU_MAGIC;
+        }
+    }
+
+    PEG_METHOD_EXIT();
+    return;
+}
+
+String MessageLoader::extractICUMessage(
+    UResourceBundle* resbundl,
+    MessageLoaderParms& parms)
+{
+    UErrorCode status = U_ZERO_ERROR;
+    int32_t msgLen = 0;
 
 #ifdef PEGASUS_OS_OS400
-               CString cstr = parms.msg_id.getCString();
-               const char *atoe = cstr;
-               AtoE((char*)atoe);
-               const UChar *msg = ures_getStringByKey(resbundl, (const char*)atoe, &msgLen, &status);
+    CString cstr = parms.msg_id.getCString();
+    const char* atoe = cstr;
+    AtoE((char*)atoe);
+    const UChar* msg =
+        ures_getStringByKey(resbundl, (const char*)atoe, &msgLen, &status);
 #else
-               const UChar *msg = ures_getStringByKey(resbundl, (const char*)parms.msg_id.getCString(), &msgLen, &status);
+    const UChar* msg = ures_getStringByKey(
+        resbundl, (const char*)parms.msg_id.getCString(), &msgLen, &status);
 #endif
-               if(U_FAILURE(status)) {
-                       //cout << "could not extract ICU Message" << endl;
-                       return String::EMPTY;
-               }
-
-               return formatICUMessage(resbundl, msg, msgLen, parms);
-       }
-
-       String MessageLoader::uChar2String(UChar * uchar_str){
-               return String((const Char16 *)uchar_str);
-       }
-
-       String MessageLoader::uChar2String(UChar * uchar_str, int len){
-               return String((const Char16 *)uchar_str, len);
-       }
-
-       String MessageLoader::formatICUMessage(UResourceBundle * resbundl, const UChar * msg, int msg_len, MessageLoaderParms &parms){
-
-               // format the message
-               UnicodeString msg_pattern(msg, msg_len);
-               UnicodeString msg_formatted;
-               UErrorCode status = U_ZERO_ERROR;
-               const int arg_count = 10;
-               const char *locale;
-               if(resbundl == NULL)
-                        locale = ULOC_US;
-               else
-                        locale = ures_getLocale(resbundl, &status);
-
-               //cout << "FORMAT ICU MESSAGE: using locale = " << locale << endl;
-
-               char lang[4];
-               char cc[4];
-               char var[arg_count];
-               uloc_getLanguage(locale, lang, 4, &status);
-               uloc_getCountry(locale, cc, 4, &status);
-               uloc_getVariant(locale, var, 10, &status);
-               Locale localeID(lang,cc,var);
-
-               status = U_ZERO_ERROR;
-               MessageFormat formatter(msg_pattern, localeID, status);
-
-               Formattable args[arg_count];
-
-      if (parms.arg0._type != Formatter::Arg::VOIDT)
+
+    if (U_FAILURE(status))
+    {
+        return String::EMPTY;
+    }
+
+    return formatICUMessage(resbundl, msg, msgLen, parms);
+}
+
+String MessageLoader::uChar2String(UChar* uchar_str)
+{
+    return String((const Char16 *)uchar_str);
+}
+
+String MessageLoader::uChar2String(UChar* uchar_str, int len)
+{
+    return String((const Char16 *)uchar_str, len);
+}
+
+String MessageLoader::formatICUMessage(
+    UResourceBundle* resbundl,
+    const UChar* msg,
+    int msg_len,
+    MessageLoaderParms& parms)
+{
+    // format the message
+    UnicodeString msg_pattern(msg, msg_len);
+    UnicodeString msg_formatted;
+    UErrorCode status = U_ZERO_ERROR;
+    const int arg_count = 10;
+    const char *locale;
+    if (resbundl == NULL)
+         locale = ULOC_US;
+    else
+         locale = ures_getLocale(resbundl, &status);
+
+    char lang[4];
+    char cc[4];
+    char var[arg_count];
+    uloc_getLanguage(locale, lang, 4, &status);
+    uloc_getCountry(locale, cc, 4, &status);
+    uloc_getVariant(locale, var, 10, &status);
+    Locale localeID(lang,cc,var);
+
+    status = U_ZERO_ERROR;
+    MessageFormat formatter(msg_pattern, localeID, status);
+
+    Formattable args[arg_count];
+
+    if (parms.arg0._type != Formatter::Arg::VOIDT)
         xferFormattable(parms.arg0, args[0]);
-      if (parms.arg1._type != Formatter::Arg::VOIDT)
+    if (parms.arg1._type != Formatter::Arg::VOIDT)
         xferFormattable(parms.arg1, args[1]);
-      if (parms.arg2._type != Formatter::Arg::VOIDT)
+    if (parms.arg2._type != Formatter::Arg::VOIDT)
         xferFormattable(parms.arg2, args[2]);
-      if (parms.arg3._type != Formatter::Arg::VOIDT)
+    if (parms.arg3._type != Formatter::Arg::VOIDT)
         xferFormattable(parms.arg3, args[3]);
-      if (parms.arg4._type != Formatter::Arg::VOIDT)
+    if (parms.arg4._type != Formatter::Arg::VOIDT)
         xferFormattable(parms.arg4, args[4]);
-      if (parms.arg5._type != Formatter::Arg::VOIDT)
+    if (parms.arg5._type != Formatter::Arg::VOIDT)
         xferFormattable(parms.arg5, args[5]);
-      if (parms.arg6._type != Formatter::Arg::VOIDT)
+    if (parms.arg6._type != Formatter::Arg::VOIDT)
         xferFormattable(parms.arg6, args[6]);
-      if (parms.arg7._type != Formatter::Arg::VOIDT)
+    if (parms.arg7._type != Formatter::Arg::VOIDT)
         xferFormattable(parms.arg7, args[7]);
-      if (parms.arg8._type != Formatter::Arg::VOIDT)
+    if (parms.arg8._type != Formatter::Arg::VOIDT)
         xferFormattable(parms.arg8, args[8]);
-      if (parms.arg9._type != Formatter::Arg::VOIDT)
+    if (parms.arg9._type != Formatter::Arg::VOIDT)
         xferFormattable(parms.arg9, args[9]);
 
-               Formattable args_obj(args,arg_count);
-               status = U_ZERO_ERROR;
-               msg_formatted = formatter.format(args_obj, msg_formatted, status);
-
-               return uChar2String(const_cast<UChar *>(msg_formatted.getBuffer()), msg_formatted.length());
-       }
-
-       void MessageLoader::xferFormattable(Formatter::Arg& arg, Formattable &formattable)
-   {
-                       //cout << "arg" << " = " << arg.toString() << endl;
-                       switch (arg._type)
-               {
-                               case Formatter::Arg::INTEGER:
-                    formattable = (int32_t)arg._integer;
-                    break;
-                               case Formatter::Arg::UINTEGER:
-                    // Note: the ICU Formattable class doesn't support
-                    // unsigned 32.  Cast to signed 64.
-                    formattable = (int64_t)arg._uinteger;
-                    break;
-                               case Formatter::Arg::BOOLEAN:
-                    // Note: the ICU formattable class doesn't support
-                    // boolean.  Turn it into a string.
-                    if (!arg._boolean)
-                        formattable = Formattable("false");
-                    else
-                        formattable = Formattable("true");
-                    break;
-                               case Formatter::Arg::REAL:
-                    formattable = (double)arg._real;
-                    break;
-                               case Formatter::Arg::LINTEGER:
-                    // Note: this uses a Formattable constructor that is
-                    // labelled ICU 2.8 draft.  Assumes that Pegasus uses
-                    // at least ICU 2.8.
-                    formattable = (int64_t)arg._lInteger;
-                    break;
-                               case Formatter::Arg::ULINTEGER:
-                    // Note: the ICU Formattable class doesn't support
-                    // unsigned 64.  If the number is too big for signed 64
-                    // then turn it into a string.  This string will  
-                    // not be formatted for the locale, but at least the number
-                    // will appear in the message.
-                    if (arg._lUInteger >  PEGASUS_UINT64_LITERAL(0x7FFFFFFFFFFFFFFF))
-                    {
-                        char buffer[32];  // Should need 21 chars max
-                        sprintf(buffer, "%" PEGASUS_64BIT_CONVERSION_WIDTH "u", arg._lUInteger);
-                        formattable = Formattable(buffer);
-                    }
-                    else
-                    {
-                        formattable = (int64_t)arg._lUInteger;
-                    }
-                    break;
-                               case Formatter::Arg::STRING:
-                    formattable = Formattable((UChar*)arg._string.getChar16Data());
-                    break;
-                       case Formatter::Arg::VOIDT:
-            default:
-              formattable = "";
-              break;
-                       }
-   }
+    Formattable args_obj(args,arg_count);
+    status = U_ZERO_ERROR;
+    msg_formatted = formatter.format(args_obj, msg_formatted, status);
+
+    return uChar2String(
+        const_cast<UChar*>(msg_formatted.getBuffer()), msg_formatted.length());
+}
+
+void MessageLoader::xferFormattable(
+    Formatter::Arg &arg,
+    Formattable& formattable)
+{
+    //cout << "arg" << " = " << arg.toString() << endl;
+    switch (arg._type)
+    {
+        case Formatter::Arg::INTEGER:
+            formattable = (int32_t)arg._integer;
+            break;
+        case Formatter::Arg::UINTEGER:
+            // Note: the ICU Formattable class doesn't support
+            // unsigned 32.  Cast to signed 64.
+            formattable = (int64_t)arg._uinteger;
+            break;
+        case Formatter::Arg::BOOLEAN:
+            // Note: the ICU formattable class doesn't support
+            // boolean.  Turn it into a string.
+            if (!arg._boolean)
+                formattable = Formattable("false");
+            else
+                formattable = Formattable("true");
+            break;
+        case Formatter::Arg::REAL:
+            formattable = (double)arg._real;
+            break;
+        case Formatter::Arg::LINTEGER:
+            // Note: this uses a Formattable constructor that is
+            // labelled ICU 2.8 draft.  Assumes that Pegasus uses
+            // at least ICU 2.8.
+            formattable = (int64_t)arg._lInteger;
+            break;
+        case Formatter::Arg::ULINTEGER:
+            // Note: the ICU Formattable class doesn't support
+            // unsigned 64.  If the number is too big for signed 64
+            // then turn it into a string.  This string will
+            // not be formatted for the locale, but at least the number
+            // will appear in the message.
+            if (arg._lUInteger >  PEGASUS_UINT64_LITERAL(0x7FFFFFFFFFFFFFFF))
+            {
+                char buffer[32];  // Should need 21 chars max
+                sprintf(buffer, "%" PEGASUS_64BIT_CONVERSION_WIDTH "u",
+                    arg._lUInteger);
+                formattable = Formattable(buffer);
+            }
+            else
+            {
+                formattable = (int64_t)arg._lUInteger;
+            }
+            break;
+        case Formatter::Arg::STRING:
+            formattable = Formattable((UChar*)arg._string.getChar16Data());
+            break;
+        case Formatter::Arg::VOIDT:
+        default:
+            formattable = "";
+            break;
+    }
+}
 
 #endif
 
-       String MessageLoader::formatDefaultMessage(MessageLoaderParms &parms){
-
-               PEG_METHOD_ENTER(TRC_L10N, "MessageLoader::formatDefaultMessage");
-               // NOTE TO PROGRAMMERS: using native substitution functions
-               // ie. calling Formatter::format()
-               // can result in incorrect locale handling of substitutions
-
-               // locale INSENSITIVE formatting code
-               //cout << "using locale INSENSITIVE formatting" << endl;
-               parms.contentlanguages.clear(); // this could have previously been set by ICU
-               //cout << parms.toString() << endl;
-               //cout << "ml:" << parms.default_msg << endl;
-               PEG_METHOD_EXIT();
-               return Formatter::format(parms.default_msg,
-                                                                       parms.arg0,
-                                                                       parms.arg1,
-                                                                       parms.arg2,
-                                                                       parms.arg3,
-                                                                       parms.arg4,
-                                                                       parms.arg5,
-                                                                       parms.arg6,
-                                                                       parms.arg7,
-                                                                       parms.arg8,
-                                                                       parms.arg9);
-
-
-       }
-
-       String MessageLoader::getQualifiedMsgPath(String path){
-               PEG_METHOD_ENTER(TRC_L10N, "MessageLoader::getQualifiedMsgPath");
-
-               if(pegasus_MSG_HOME.size() == 0)
-                       initPegasusMsgHome(String::EMPTY);
-
-               if(path.size() == 0)
-               {
-                       PEG_METHOD_EXIT();
-                       return pegasus_MSG_HOME + server_resbundl_name;
-               }
-
-               Char16 delim = '/'; // NOTE TO PROGRAMMERS: WINDOWS and non-UNIX platforms should redefine delim here
-               Uint32 i;
-               if(( i = path.find(delim)) != PEG_NOT_FOUND && i == 0){ //  fully qualified package name
-                       PEG_METHOD_EXIT();
-                       return path;
-               }
-
-               PEG_METHOD_EXIT();
-               return pegasus_MSG_HOME + path;  // relative path and package name
-
-       }
-
-       void MessageLoader::setPegasusMsgHome(String home){
-               PEG_METHOD_ENTER(TRC_L10N, "MessageLoader::setPegasusMsgHome");
-                       //cout << "MessageLoader::setPegasusMsgHome()" << endl;
-                       pegasus_MSG_HOME = home + "/";
-                       // TODO: remove the next call once test cases are compatible with ICU messages
-                       checkDefaultMsgLoading();
-               PEG_METHOD_EXIT();
-       }
-    void MessageLoader::setPegasusMsgHomeRelative(const String& argv0)
+String MessageLoader::formatDefaultMessage(MessageLoaderParms& parms)
+{
+    PEG_METHOD_ENTER(TRC_L10N, "MessageLoader::formatDefaultMessage");
+
+    // NOTE TO PROGRAMMERS: using native substitution functions
+    // ie. calling Formatter::format()
+    // can result in incorrect locale handling of substitutions
+
+    // locale INSENSITIVE formatting code
+
+    // this could have previously been set by ICU
+    parms.contentlanguages.clear();
+
+    PEG_METHOD_EXIT();
+    return Formatter::format(
+        parms.default_msg,
+        parms.arg0,
+        parms.arg1,
+        parms.arg2,
+        parms.arg3,
+        parms.arg4,
+        parms.arg5,
+        parms.arg6,
+        parms.arg7,
+        parms.arg8,
+        parms.arg9);
+}
+
+String MessageLoader::getQualifiedMsgPath(String path)
+{
+    PEG_METHOD_ENTER(TRC_L10N, "MessageLoader::getQualifiedMsgPath");
+
+    if (pegasus_MSG_HOME.size() == 0)
+        initPegasusMsgHome(String::EMPTY);
+
+    if (path.size() == 0)
+    {
+        PEG_METHOD_EXIT();
+        return pegasus_MSG_HOME + server_resbundl_name;
+    }
+
+    // NOTE TO PROGRAMMERS: WINDOWS and non-UNIX platforms should
+    // redefine delim here
+    Char16 delim = '/';
+    Uint32 i;
+    if ((i = path.find(delim)) != PEG_NOT_FOUND && i == 0)
     {
+        // fully qualified package name
+        PEG_METHOD_EXIT();
+        return path;
+    }
+
+    PEG_METHOD_EXIT();
+    return pegasus_MSG_HOME + path;  // relative path and package name
+}
+
+void MessageLoader::setPegasusMsgHome(String home)
+{
+    PEG_METHOD_ENTER(TRC_L10N, "MessageLoader::setPegasusMsgHome");
+    pegasus_MSG_HOME = home + "/";
+
+    // TODO: remove the next call once test cases are compatible with ICU
+    // messages
+    checkDefaultMsgLoading();
+    PEG_METHOD_EXIT();
+}
+
+void MessageLoader::setPegasusMsgHomeRelative(const String& argv0)
+{
 #ifdef PEGASUS_HAS_MESSAGES
-      try
-      {
+    try
+    {
         String startingDir, pathDir;
 
 #ifdef PEGASUS_OS_TYPE_WINDOWS
-        if(PEG_NOT_FOUND == argv0.find('\\'))
+        if (PEG_NOT_FOUND == argv0.find('\\'))
         {
-          char exeDir[_MAX_PATH];
-          HMODULE module = GetModuleHandle(NULL);
-          if(NULL != module )
-          {
-              DWORD filename = GetModuleFileName(module,exeDir ,sizeof(exeDir));
-               if(0 != filename)
-               {
-                   String path(exeDir);
-                   Uint32 command = path.reverseFind('\\');
-                   startingDir = path.subString(0, command+1);
-               }
-          }
+            char exeDir[_MAX_PATH];
+            HMODULE module = GetModuleHandle(NULL);
+            if (NULL != module )
+            {
+                DWORD filename =
+                    GetModuleFileName(module,exeDir ,sizeof(exeDir));
+                if (0 != filename)
+                {
+                    String path(exeDir);
+                    Uint32 command = path.reverseFind('\\');
+                    startingDir = path.subString(0, command+1);
+                }
+            }
         }
         else
         {
@@ -627,89 +714,93 @@ void MessageLoader::closeMessageFile(MessageLoaderParms &parms)
 #endif
 
 #ifdef PEGASUS_OS_TYPE_UNIX
-        if(PEG_NOT_FOUND  != argv0.find('/'))
+        if (PEG_NOT_FOUND  != argv0.find('/'))
         {
             Uint32 command = argv0.reverseFind('/');
             startingDir = argv0.subString(0, command+1);
         }
         else
         {
-          if(FileSystem::existsNoCase(argv0))
-          {
-             FileSystem::getCurrentDirectory(startingDir);
-             startingDir.append("/");
-          }
-          else
-          {
-           String path;
-           #ifdef PEGASUS_PLATFORM_OS400_ISERIES_IBM
-             #pragma convert(37)
+            if (FileSystem::existsNoCase(argv0))
+            {
+                FileSystem::getCurrentDirectory(startingDir);
+                startingDir.append("/");
+            }
+            else
+            {
+                String path;
+ifdef PEGASUS_PLATFORM_OS400_ISERIES_IBM
+#  pragma convert(37)
                 const char* env = getenv("PATH");
-                if(env != NULL)
-                  EtoA((char*)env);
-             #pragma convert(0)
-           #else
+                if (env != NULL)
+                    EtoA((char*)env);
+#  pragma convert(0)
+else
                 const char* env = getenv("PATH");
-           #endif
-           if (env != NULL)
-              path.assign(env);
-           String pathDelim = FileSystem::getPathDelimiter();
-           Uint32 size = path.size();
-           while(path.size() > 0)
-           {
-             try
-             {
-              Uint32 delim = path.find(pathDelim);
-              if(delim != PEG_NOT_FOUND)
-              {
-                 pathDir = path.subString(0,delim);
-                 path.remove(0,(delim+1));
-               }
-               else
-               {
-                     pathDir = path;
-                     path = "";
-               }
-               String commandPath = pathDir.append('/');
-               commandPath = commandPath.append(argv0) ;
-               Boolean dirContent = FileSystem::existsNoCase(commandPath);
-               if(dirContent)
-               {
-                    startingDir = pathDir;
-                    break;
-               }
-             }
-             catch(Exception &e)
-             {
-                //Have to do nothing. 
-                //Catching the exception if there is any exception while searching in the path variable
-             }
-           }
-          }
+# endif
+                if (env != NULL)
+                    path.assign(env);
+                String pathDelim = FileSystem::getPathDelimiter();
+                Uint32 size = path.size();
+                while (path.size() > 0)
+                {
+                    try
+                    {
+                        Uint32 delim = path.find(pathDelim);
+                        if (delim != PEG_NOT_FOUND)
+                        {
+                            pathDir = path.subString(0,delim);
+                            path.remove(0,(delim+1));
+                        }
+                        else
+                        {
+                            pathDir = path;
+                            path = "";
+                        }
+
+                        String commandPath = pathDir.append('/');
+                        commandPath = commandPath.append(argv0) ;
+                        Boolean dirContent =
+                            FileSystem::existsNoCase(commandPath);
+                        if (dirContent)
+                        {
+                            startingDir = pathDir;
+                            break;
+                        }
+                    }
+                    catch (Exception& e)
+                    {
+                        // Have to do nothing.
+                        // Catching the exception if there is any exception
+                        // while searching in the path variable
+                    }
+                }
+            }
         }
 #endif
-         initPegasusMsgHome(startingDir);
-      }
-      catch(Exception &e)
-      {
-                //Have to do nothing.
-                //Catching the exception if there is any exception while searching in the path variable
-      }
+        initPegasusMsgHome(startingDir);
+    }
+    catch (Exception& e)
+    {
+        // Have to do nothing.
+        // Catching the exception if there is any exception while searching
+        // in the path variable
+    }
 #endif
 }
 
 
-void MessageLoader::initPegasusMsgHome(const String & startDir)
+void MessageLoader::initPegasusMsgHome(const String& startDir)
 {
-    String startingDir = startDir; 
+    String startingDir = startDir;
     if (startingDir.size() == 0)
     {
 #ifdef PEGASUS_PLATFORM_OS400_ISERIES_IBM
-#pragma convert(37)
-         const char* env = getenv("PEGASUS_MSG_HOME");
-            if(env != NULL)
-               EtoA((char*)env);
-#pragma convert(0)
+# pragma convert(37)
+        const char* env = getenv("PEGASUS_MSG_HOME");
+        if (env != NULL)
+            EtoA((char*)env);
+# pragma convert(0)
 #else
         const char* env = getenv("PEGASUS_MSG_HOME");
 #endif
@@ -719,66 +810,69 @@ void MessageLoader::initPegasusMsgHome(const String & startDir)
     }
 
 #ifdef PEGASUS_DEFAULT_MESSAGE_SOURCE
-        if(System::is_absolute_path(
-                (const char *)PEGASUS_DEFAULT_MESSAGE_SOURCE))
-        {
-            pegasus_MSG_HOME = PEGASUS_DEFAULT_MESSAGE_SOURCE;
-            pegasus_MSG_HOME.append('/');
-        }
-        else
-        {
-            if (startingDir.size() != 0)
-            {
-               pegasus_MSG_HOME = startingDir;
-                pegasus_MSG_HOME.append('/');
-            }
-            pegasus_MSG_HOME.append(PEGASUS_DEFAULT_MESSAGE_SOURCE);
-            pegasus_MSG_HOME.append('/');
-        }
-#else
+    if (System::is_absolute_path(
+            (const char *)PEGASUS_DEFAULT_MESSAGE_SOURCE))
+    {
+        pegasus_MSG_HOME = PEGASUS_DEFAULT_MESSAGE_SOURCE;
+        pegasus_MSG_HOME.append('/');
+    }
+    else
+    {
         if (startingDir.size() != 0)
         {
             pegasus_MSG_HOME = startingDir;
-            pegasus_MSG_HOME.append("/");
-        }
-        else
-        {
-             // Will use current working directory
+            pegasus_MSG_HOME.append('/');
         }
+        pegasus_MSG_HOME.append(PEGASUS_DEFAULT_MESSAGE_SOURCE);
+        pegasus_MSG_HOME.append('/');
+    }
+#else
+    if (startingDir.size() != 0)
+    {
+        pegasus_MSG_HOME = startingDir;
+        pegasus_MSG_HOME.append("/");
+    }
+    else
+    {
+         // Will use current working directory
+    }
 #endif
-        checkDefaultMsgLoading();
-     }
-
-       void MessageLoader::checkDefaultMsgLoading(){
-         // Note: this function is a special hook for the automated tests (poststarttests)
-         // Since the automated tests expect the old hardcoded default messages, an env var
-         // will be used to tell this code to ignore ICU and return the default message.
-         // This will allow poststarttests to run with ICU installed.
-         // TODO: remove this function once test cases are compatible with ICU messages
+    checkDefaultMsgLoading();
+}
+
+void MessageLoader::checkDefaultMsgLoading()
+{
+    // Note: this function is a special hook for the automated tests
+    // (poststarttests).  Since the automated tests expect the old hardcoded
+    // default messages, an env var will be used to tell this code to ignore
+    // ICU and return the default message.
+    // This will allow poststarttests to run with ICU installed.
+    // TODO: remove this function once test cases are compatible with ICU
+    // messages
 #ifdef PEGASUS_OS_OS400
-#pragma convert(37)
+# pragma convert(37)
 #endif
-         const char* env = getenv("PEGASUS_USE_DEFAULT_MESSAGES");
+    const char* env = getenv("PEGASUS_USE_DEFAULT_MESSAGES");
 #ifdef PEGASUS_OS_OS400
-#pragma convert(0)
+# pragma convert(0)
 #endif
-         if (env != NULL)
-           _useDefaultMsg = true;
-       }
+    if (env != NULL)
+        _useDefaultMsg = true;
+}
 
 MessageLoaderParms::MessageLoaderParms()
 {
-       useProcessLocale = false;
-       useThreadLocale = true;
+    useProcessLocale = false;
+    useThreadLocale = true;
 
 #ifdef PEGASUS_HAS_ICU
-       useICUfallback = false;
+    useICUfallback = false;
 #endif
 
-       acceptlanguages = AcceptLanguageList();
-       contentlanguages = ContentLanguageList();
+    acceptlanguages = AcceptLanguageList();
+    contentlanguages = ContentLanguageList();
 
-        _resbundl = NO_ICU_MAGIC;
+    _resbundl = NO_ICU_MAGIC;
 }
 
 MessageLoaderParms::MessageLoaderParms(
@@ -957,9 +1051,17 @@ String MessageLoaderParms::toString()
 #ifdef PEGASUS_HAS_ICU
     s.append("useICUfallback = " + ICUfallback + "\n");
 #endif
-    s.append("arg0 = " + arg0.toString() + "\n" + "arg1 = " + arg1.toString() + "\n" + "arg2 = " + arg2.toString() + "\n" + "arg3 = " + arg3.toString() + "\n" +
-             "arg4 = " + arg4.toString() + "\n" + "arg5 = " + arg5.toString() + "\n" + "arg6 = " + arg6.toString() + "\n" + "arg7 = " + arg7.toString() + "\n" +
-             "arg8 = " + arg8.toString() + "\n" + "arg9 = " + arg9.toString() + "\n\n");
+    s.append(
+        "arg0 = " + arg0.toString() + "\n" +
+        "arg1 = " + arg1.toString() + "\n" +
+        "arg2 = " + arg2.toString() + "\n" +
+        "arg3 = " + arg3.toString() + "\n" +
+        "arg4 = " + arg4.toString() + "\n" +
+        "arg5 = " + arg5.toString() + "\n" +
+        "arg6 = " + arg6.toString() + "\n" +
+        "arg7 = " + arg7.toString() + "\n" +
+        "arg8 = " + arg8.toString() + "\n" +
+        "arg9 = " + arg9.toString() + "\n\n");
 
     return s;
 }
index 53548ca19c4a6cb3b3d12888b672064bbb374e51..246489a956aa2b3acf29568f4f4f3ad734673e74 100755 (executable)
 #include <Pegasus/Common/AcceptLanguageList.h>
 #include <Pegasus/Common/ContentLanguageList.h>
 
-//ICU specific 
+//ICU specific
 #ifdef PEGASUS_HAS_ICU
-#include <unicode/uloc.h> 
-#include <unicode/ures.h>
-#include <unicode/umsg.h>
-#include <unicode/ucnv.h>
-#include <unicode/fmtable.h>
-#include <unicode/msgfmt.h>
+# include <unicode/uloc.h>
+# include <unicode/ures.h>
+# include <unicode/umsg.h>
+# include <unicode/ucnv.h>
+# include <unicode/fmtable.h>
+# include <unicode/msgfmt.h>
 #endif
 
 #ifdef PEGASUS_HAS_ICU
-#define NO_ICU_MAGIC (UResourceBundle*)0xDEADBEEF
+# define NO_ICU_MAGIC (UResourceBundle*)0xDEADBEEF
 #else
-#define NO_ICU_MAGIC (void*)0xDEADBEEF
+# define NO_ICU_MAGIC (void*)0xDEADBEEF
 #endif
 
 PEGASUS_NAMESPACE_BEGIN
 
 /**
- * MessageLoaderParms class is basically a stuct class containing public variables that control
- * the way MessageLoader behaves. MessageLoader uses the fields in this class to decide where and
- * how to load messages from the message resources.
+    MessageLoaderParms class is basically a stuct class containing public
+    variables that control the way MessageLoader behaves. MessageLoader uses
+    the fields in this class to decide where and how to load messages from
+    the message resources.
  */
+class PEGASUS_COMMON_LINKAGE MessageLoaderParms
+{
+public:
 
-class PEGASUS_COMMON_LINKAGE MessageLoaderParms{
+    /**
+        String msg_id: unique message identifier for a particular
+        message in a message resource
+     */
+    String msg_id;
 
-    friend class MessageLoader;
+    /**
+        String default_msg: the default message to use if a message
+        cannot be loaded from a message resource
+     */
+    String default_msg;
+
+    /**
+        String msg_src_path: this path tells MessageLoader where to
+        find message resources.
+        It can be empty, fully qualified or relative to $PEGASUS_HOME
+     */
+    String msg_src_path;
+
+    /**
+        AcceptLanguageList acceptlanguages: This contains the languages
+        that are acceptable by the caller of MessageLoader::getMessage()
+        or openMessageFile(). That is, MessageLoader will do its best to
+        return a message in a language that was specified in this container.
+        This container is naturally ordered using the quality values
+        attached to the languages and MessageLoader iterates through this
+        container in its natural ordering.  This container is used by
+        MessageLoader to load messages if it is not empty.
+     */
+    AcceptLanguageList acceptlanguages;
+
+    /**
+        ContentLanguageList contentlanguages: This is set by
+        MessageLoader::getMessage() and after a message has been loaded
+        from either a message resource or the default message, or by
+        MessageLoader::openMessageFile() after it has identified and
+        opened a message resource. After the call to
+        MessageLoader::getMessage() or MessageLoader::openMessageFile(),
+        the caller can check the MessageLoaderParms.contentlanguages
+        object to see what MessageLoader set it to. In all cases where a
+        message is returned from MessageLoader::getMessage() or will be
+        returned from MessageLoader::getMessage2(), this field will be
+        set to match the language that the message was (or will be)
+        found in.
+     */
+    ContentLanguageList contentlanguages;
+
+    /**
+        Boolean useProcessLocale: Default is false, if true, MessageLoader
+        uses the system default language to loads messages from.
+     */
+    Boolean useProcessLocale;
+
+    /**
+        Boolean useThreadLocale: Default is true, this tells
+        MessageLoader to use the AcceptLanguageList container
+        from the current Pegasus thread.
+     */
+    Boolean useThreadLocale;
+
+    /**
+        Boolean useICUfallback: Default is false.  Only relevant if
+        PEGASUS_HAS_ICU is defined.  MessageLoader::getMessage() default
+        behaviour is to extract messages for the langauge exactly
+        matching an available message resource.  If this is set to true,
+        the MessageLoader is free to extract a message from a less
+        specific message resource according to its search algorithm.
+     */
+#ifdef PEGASUS_HAS_ICU
+    Boolean useICUfallback;
+#endif
+
+    /**
+        const Formatter::Arg&0-9: These are assigned the various
+        substitutions necessary to properly format the message being
+        extracted.  MessageLoader substitutes these in the correct
+        places in the message being returned from
+        MessageLoader::getMessage()
+     */
+    Formatter::Arg arg0;
+    Formatter::Arg arg1;
+    Formatter::Arg arg2;
+    Formatter::Arg arg3;
+    Formatter::Arg arg4;
+    Formatter::Arg arg5;
+    Formatter::Arg arg6;
+    Formatter::Arg arg7;
+    Formatter::Arg arg8;
+    Formatter::Arg arg9;
 
-public:
-       
-       /*
-        * String msg_id: unique message identifier for a particular message in a message resource
-        */
-       String msg_id;  
-       
-       /*
-        * String default_msg: the default message to use if a message cannot be loaded from a message resource
-        */             
-       String default_msg;     
-       
-       /*
-        * String msg_src_path: this path tells MessageLoader where to find message resources
-        * it can be empty, fully qualified or relative to $PEGASUS_HOME
-        */
-       String msg_src_path;
-       
-       /*
-        * AcceptLanguageList acceptlanguages: This contains the languages that are acceptable by the caller
-        * of MessageLoader::getMessage() or openMessageFile(). That is, MessageLoader will do its best to return 
-         * a message in a language that was specified in this container.  This container is naturally ordered 
-         * using the quality values attached to the languages and MessageLoader iterates through this container 
-         * in its natural ordering.  This container is used by MessageLoader to load messages if it is not empty.
-        */
-       AcceptLanguageList acceptlanguages;
-       
-       /*
-        * ContentLanguageList contentlanguages: This is set by MessageLoader::getMessage() and after a message has
-        * been loaded from either a message resource or the default message, or by MessageLoader::openMessageFile()
-         * after it has identified and opened a message resource. After the call to MessageLoader::getMessage() or
-         * MessageLoader::openMessageFile(), the caller can check the MessageLoaderParms.contentlanguages object to 
-         * see what MessageLoader set it to. In all cases where a message is returned from MessageLoader::getMessage()
-         * or will be returned from MessageLoader::getMessage2(), this field will be set to match the language that 
-         * the message was (or will be) found in.
-        */
-       ContentLanguageList contentlanguages;
-       
-       /*
-        * Boolean useProcessLocale: Default is false, if true, MessageLoader uses the system default language
-        * to loads messages from.
-        */
-       Boolean useProcessLocale;
-       
-       /*
-        * Boolean useThreadLocale: Default is true, this tells MessageLoader to use the AcceptLanguageList container
-        * from the current Pegasus thread.
-        */
-       Boolean useThreadLocale;
-       
-       /*
-        * Boolean useICUfallback: Default is false.  Only relevant if PEGASUS_HAS_ICU is defined.
-        * MessageLoader::getMessage() default behaviour is to extract messages for the langauge exactly
-        * matching an available message resource.  If this is set to true, the MessageLoader is free to extract
-        * a message from a less specific message resource according to its search algorithm.
-        */
-       #ifdef PEGASUS_HAS_ICU
-       Boolean useICUfallback;
-       #endif
-       
-       /*
-        * const Formatter::Arg&0-9: These are assigned the various substitutions necessary to properly format
-        * the message being extracted.  MessageLoader substitutes these in the correct places in the message
-        * being returned from MessageLoader::getMessage()
-        */
-       Formatter::Arg arg0; 
-       Formatter::Arg arg1;
-       Formatter::Arg arg2;
-       Formatter::Arg arg3;
-       Formatter::Arg arg4;
-       Formatter::Arg arg5;
-       Formatter::Arg arg6;
-       Formatter::Arg arg7;
-       Formatter::Arg arg8;
-       Formatter::Arg arg9;
-       
     /** Constructor */
     MessageLoaderParms();
 
     /** Constructor */
     MessageLoaderParms(
-       const String& id, 
-       const String& msg, 
-       const Formatter::Arg& arg0,
-       const Formatter::Arg& arg1,
-       const Formatter::Arg& arg2,
-       const Formatter::Arg& arg3,
-       const Formatter::Arg& arg4,
-       const Formatter::Arg& arg5 = Formatter::DEFAULT_ARG,
-       const Formatter::Arg& arg6 = Formatter::DEFAULT_ARG,
-       const Formatter::Arg& arg7 = Formatter::DEFAULT_ARG,
-       const Formatter::Arg& arg8 = Formatter::DEFAULT_ARG,
-       const Formatter::Arg& arg9 = Formatter::DEFAULT_ARG);
+        const String& id,
+        const String& msg,
+        const Formatter::Arg& arg0,
+        const Formatter::Arg& arg1,
+        const Formatter::Arg& arg2,
+        const Formatter::Arg& arg3,
+        const Formatter::Arg& arg4,
+        const Formatter::Arg& arg5 = Formatter::DEFAULT_ARG,
+        const Formatter::Arg& arg6 = Formatter::DEFAULT_ARG,
+        const Formatter::Arg& arg7 = Formatter::DEFAULT_ARG,
+        const Formatter::Arg& arg8 = Formatter::DEFAULT_ARG,
+        const Formatter::Arg& arg9 = Formatter::DEFAULT_ARG);
 
     /** Constructor */
     MessageLoaderParms(
-       const String& id, 
-       const String& msg);
-    
+        const String& id,
+        const String& msg);
+
     /** Constructor */
     MessageLoaderParms(
-       const String& id, 
-       const String& msg, 
-       const Formatter::Arg& arg0);
+        const String& id,
+        const String& msg,
+        const Formatter::Arg& arg0);
 
     /** Constructor */
     MessageLoaderParms(
-       const String& id, 
-       const String& msg, 
-       const Formatter::Arg& arg0,
-       const Formatter::Arg& arg1);
+        const String& id,
+        const String& msg,
+        const Formatter::Arg& arg0,
+        const Formatter::Arg& arg1);
 
     /** Constructor */
     MessageLoaderParms(
-       const String& id, 
-       const String& msg, 
-       const Formatter::Arg& arg0,
-       const Formatter::Arg& arg1,
-       const Formatter::Arg& arg2);
+        const String& id,
+        const String& msg,
+        const Formatter::Arg& arg0,
+        const Formatter::Arg& arg1,
+        const Formatter::Arg& arg2);
 
     /** Constructor */
     MessageLoaderParms(
-       const String& id, 
-       const String& msg, 
-       const Formatter::Arg& arg0,
-       const Formatter::Arg& arg1,
-       const Formatter::Arg& arg2,
-       const Formatter::Arg& arg3);
+        const String& id,
+        const String& msg,
+        const Formatter::Arg& arg0,
+        const Formatter::Arg& arg1,
+        const Formatter::Arg& arg2,
+        const Formatter::Arg& arg3);
 
     MessageLoaderParms(
-       const char* id, 
-       const char* msg);
+        const char* id,
+        const char* msg);
 
     MessageLoaderParms(
-       const char* id, 
-       const char* msg, 
-       const String& arg0);
+        const char* id,
+        const char* msg,
+        const String& arg0);
 
     MessageLoaderParms(
-       const char* id, 
-       const char* msg, 
-       const String& arg0,
-       const String& arg1);
-    
+        const char* id,
+        const char* msg,
+        const String& arg0,
+        const String& arg1);
+
     /** Converts to string. */
     String toString();
 
@@ -222,93 +236,106 @@ public:
 
 private:
 #ifdef PEGASUS_HAS_ICU
-        UResourceBundle* _resbundl;
+    UResourceBundle* _resbundl;
 #else
-        void* _resbundl;
+    void* _resbundl;
 #endif
 
     void _init();
-}; // end MessageLoaderParms
+
+    friend class MessageLoader;
+};
 
 
-/*
- * MessageLoader is a static class resposible for looking up messages in message resources. 
- * For specific behaviour details of this class see the Globalization HOWTO.
+/**
+    MessageLoader is a static class resposible for looking up messages in
+    message resources.
+    For specific behaviour details of this class see the Globalization HOWTO.
  */
-
-class PEGASUS_COMMON_LINKAGE MessageLoader{
-       
+class PEGASUS_COMMON_LINKAGE MessageLoader
+{
 public:
-       
-       /*
-        * Retrieves a message from a message resource
-        * @param parms MessageLoaderParms - controls the behaviour of how a message is retrieved
-        * @return String - the formatted message
-        */
-       static String getMessage(MessageLoaderParms &parms);
-
-       /*
-        * Opens a message resource bundle.
-        * @param parms MessageLoaderParms - controls the behaviour of how a message is retrieved, this
-         * parameter should be used *ONLY* on subsequent calls to getMessage2() and closeMessageFile()
-         * If this method fails for some reason, it will set parms.resbundl to NO_ICU_MAGIC, and a
-         * subsequent call to getMessage2() will result in the default message being formatted.
-         * ATTN: Do we want *real* error codes for this?
-        */
-        static void openMessageFile(MessageLoaderParms &parms);
-       
-       /*
-        * Closes a message resource bundle.
-        * @param parms MessageLoaderParms - identifies a previously opened resource bundle returned
-         * from openMessageFile().
-        */
-        static void closeMessageFile(MessageLoaderParms &parms);
-       
-       /*
-        * Retrieves a message from a message resource previously opened by openMessageFile()
-        * @param parms MessageLoaderParms - controls the behaviour of how a message is retrieved, and
-         * is the same MessageLoaderParms parameter that was passed to openMessageFile().
-        * @return String - the formatted message
-        */
-       static String getMessage2(MessageLoaderParms &parms);
-
-       static void setPegasusMsgHome(String home);
+
+    /**
+        Retrieves a message from a message resource
+        @param parms MessageLoaderParms - controls the behaviour of how a
+        message is retrieved
+        @return String - the formatted message
+     */
+    static String getMessage(MessageLoaderParms& parms);
+
+    /**
+        Opens a message resource bundle.
+        If this method fails for some reason, it will set parms.resbundl
+        to NO_ICU_MAGIC, and a subsequent call to getMessage2() will
+        result in the default message being formatted.
+        ATTN: Do we want *real* error codes for this?
+        @param parms MessageLoaderParms - controls the behaviour of how a
+            message is retrieved, this parameter should be used *ONLY* on
+            subsequent calls to getMessage2() and closeMessageFile().
+     */
+    static void openMessageFile(MessageLoaderParms& parms);
+
+    /**
+        Closes a message resource bundle.
+        @param parms MessageLoaderParms - identifies a previously opened
+            resource bundle returned from openMessageFile().
+     */
+    static void closeMessageFile(MessageLoaderParms& parms);
+
+    /**
+        Retrieves a message from a message resource previously opened by
+        openMessageFile()
+        @param parms MessageLoaderParms - controls the behaviour of how a
+            message is retrieved, and is the same MessageLoaderParms
+            parameter that was passed to openMessageFile().
+        @return String - the formatted message
+     */
+    static String getMessage2(MessageLoaderParms& parms);
+
+    static void setPegasusMsgHome(String home);
 
     static void setPegasusMsgHomeRelative(const String& argv0);
-       
-       static Boolean _useProcessLocale;
-       
-       static Boolean _useDefaultMsg;
-       
-       static AcceptLanguageList _acceptlanguages;
-       
+
+    static Boolean _useProcessLocale;
+
+    static Boolean _useDefaultMsg;
+
+    static AcceptLanguageList _acceptlanguages;
+
 private:
 
-       static String formatDefaultMessage(MessageLoaderParms &parms);
-       
-       static String getQualifiedMsgPath(String path);
-
-       static void initPegasusMsgHome(const String & startDir);
-       
-       static void checkDefaultMsgLoading();
-       
-       static String pegasus_MSG_HOME;
-       
-       #ifdef PEGASUS_HAS_ICU
-        static void openICUMessageFile(MessageLoaderParms &parms);
-               
-       static String extractICUMessage(UResourceBundle * resbundl, MessageLoaderParms &parms);
-               
-       static String formatICUMessage(UResourceBundle * resbundl, const UChar *msg, int msg_len, MessageLoaderParms &parms);
-               
-       static String uChar2String(UChar * uchar_str);
-               
-       static String uChar2String(UChar * uchar_str, int len);
-               
-        static void xferFormattable(Formatter::Arg& arg, Formattable &formattable);
-       #endif
-       
-}; // end MessageLoader
+    static String formatDefaultMessage(MessageLoaderParms& parms);
+
+    static String getQualifiedMsgPath(String path);
+
+    static void initPegasusMsgHome(const String& startDir);
+
+    static void checkDefaultMsgLoading();
+
+    static String pegasus_MSG_HOME;
+
+#ifdef PEGASUS_HAS_ICU
+    static void openICUMessageFile(MessageLoaderParms& parms);
+
+    static String extractICUMessage(
+        UResourceBundle* resbundl,
+        MessageLoaderParms& parms);
+
+    static String formatICUMessage(
+        UResourceBundle* resbundl,
+        const UChar* msg,
+        int msg_len,
+        MessageLoaderParms& parms);
+
+    static String uChar2String(UChar* uchar_str);
+
+    static String uChar2String(UChar* uchar_str, int len);
+
+    static void xferFormattable(Formatter::Arg& arg, Formattable& formattable);
+#endif
+
+};
 
 PEGASUS_NAMESPACE_END
 
index 3ef890e0ca770bda90f5ec1236e01e428534084a..599d80a6ce29807b6ade7df5a160f8d277d1f8b3 100644 (file)
@@ -57,7 +57,7 @@ Uint32 MessageQueue::getNextQueueId()
 void MessageQueue::putQueueId(Uint32 queueId)
 {
     if (queueId != CIMOM_Q_ID)
-       _qidFactory.putID(queueId);
+        _qidFactory.putID(queueId);
 }
 
 MessageQueue::MessageQueue(
@@ -120,12 +120,11 @@ void MessageQueue::enqueue(Message* message)
 
     PEGASUS_ASSERT(message != 0);
 
-    PEG_TRACE_STRING( TRC_MESSAGEQUEUESERVICE, Tracer::LEVEL3,
-                      String("Queue name: ") + getQueueName() ) ;
-    Tracer::trace   ( TRC_MESSAGEQUEUESERVICE,
-                      Tracer::LEVEL3,
-                      "Message: [%s]",
-                      MessageTypeToString(message->getType()));
+    PEG_TRACE_STRING(TRC_MESSAGEQUEUESERVICE, Tracer::LEVEL3,
+        String("Queue name: ") + getQueueName());
+    Tracer::trace(TRC_MESSAGEQUEUESERVICE, Tracer::LEVEL3,
+        "Message: [%s]",
+        MessageTypeToString(message->getType()));
 
     _messageList.insert_back(message);
 
@@ -171,21 +170,21 @@ MessageQueue* MessageQueue::lookup(Uint32 queueId)
 MessageQueue* MessageQueue::lookup(const char *name)
 {
 
-    if(name == NULL)
+    if (name == NULL)
         throw NullPointer();
 
     AutoMutex autoMut(q_table_mut);
-   for(QueueTable::Iterator i = _queueTable.start(); i; i++)
-   {
+    for (QueueTable::Iterator i = _queueTable.start(); i; i++)
+    {
         // ATTN: Need to decide how many characters to compare in queue names
-        if(! strcmp( ((MessageQueue *)i.value())->getQueueName(), name) )
+        if (!strcmp(((MessageQueue *)i.value())->getQueueName(), name))
         {
-            return( (MessageQueue *)i.value());
+            return (MessageQueue *)i.value();
         }
     }
 
     Tracer::trace(TRC_MESSAGEQUEUESERVICE, Tracer::LEVEL3,
-                    "MessageQueue::lookup failure - name = %s", name);
+        "MessageQueue::lookup failure - name = %s", name);
 
     return 0;
 }
index b771164f7a2164f8b44a54e77163909fa57ded7b..baa1ae1a56d1e96eb93348147b772ac26ae7aa6b 100644 (file)
@@ -61,7 +61,7 @@ ThreadPool *MessageQueueService::get_thread_pool()
 // JR Wunderlich Jun 6, 2005
 //
 
-#define MAX_THREADS_PER_SVC_QUEUE_LIMIT 5000 
+#define MAX_THREADS_PER_SVC_QUEUE_LIMIT 5000
 #define MAX_THREADS_PER_SVC_QUEUE_DEFAULT 5
 
 #ifndef MAX_THREADS_PER_SVC_QUEUE
@@ -70,88 +70,91 @@ ThreadPool *MessageQueueService::get_thread_pool()
 
 Uint32 max_threads_per_svc_queue;
 
-ThreadReturnType PEGASUS_THREAD_CDECL MessageQueueService::polling_routine(void *parm)
+ThreadReturnType PEGASUS_THREAD_CDECL MessageQueueService::polling_routine(
+    void* parm)
 {
-   Thread *myself = reinterpret_cast<Thread *>(parm);
-   List<MessageQueueService, Mutex> *list = 
-       reinterpret_cast<List<MessageQueueService, Mutex>*>(myself->get_parm());
-
-   while (_stop_polling.get()  == 0)
-   {
-      _polling_sem.wait();
-
-      if (_stop_polling.get() != 0)
-      {
-         break;
-      }
-
-      // The polling_routine thread must hold the lock on the
-      // _polling_list while processing incoming messages.
-      // This lock is used to give this thread ownership of
-      // services on the _polling_routine list.
-
-      // This is necessary to avoid confict with other threads
-      // processing the _polling_list
-      // (e.g., MessageQueueServer::~MessageQueueService).
-
-      list->lock();
-      MessageQueueService *service = list->front();
-      ThreadStatus rtn = PEGASUS_THREAD_OK;
-      while (service != NULL)
-      {
-          if ((service->_incoming.count() > 0) &&
-              (service->_die.get() == 0) &&
-              (service->_threads.get() < max_threads_per_svc_queue))
-          {
-             // The _threads count is used to track the 
-             // number of active threads that have been allocated
-             // to process messages for this service.
-
-             // The _threads count MUST be incremented while
-             // the polling_routine owns the _polling_thread
-             // lock and has ownership of the service object.
-
-             service->_threads++;
-             try
-             {
-                 rtn = _thread_pool->allocate_and_awaken(
-                      service, _req_proc, &_polling_sem);
-             }
-             catch (...)
-             {
-                 service->_threads--;
-
-                 // allocate_and_awaken should never generate an exception.
-                 PEGASUS_ASSERT(0);
-             }
-             // if no more threads available, break from processing loop
-             if (rtn != PEGASUS_THREAD_OK )
-             {
-                 service->_threads--;
-                 Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE,
-                    "Not enough threads to process this request. Skipping.");
-
-                 Tracer::trace(TRC_MESSAGEQUEUESERVICE, Tracer::LEVEL2,
-                    "Could not allocate thread for %s. " \
-                    "Queue has %d messages waiting and %d threads servicing." \
-                    "Skipping the service for right now. ",
-                    service->getQueueName(),
-                    service->_incoming.count(),
-                    service->_threads.get());
-
-                 Threads::yield();
-                 service = NULL;
-              } 
-          }
-          if (service != NULL) 
-          {
-             service = list->next_of(service);
-          }
-      }
-      list->unlock();
-   }
-   myself->exit_self( (ThreadReturnType) 1 );
-   return(0);
+    Thread *myself = reinterpret_cast<Thread *>(parm);
+    List<MessageQueueService, Mutex> *list =
+        reinterpret_cast<List<MessageQueueService, Mutex>*>(myself->get_parm());
+
+    while (_stop_polling.get()  == 0)
+    {
+        _polling_sem.wait();
+
+        if (_stop_polling.get() != 0)
+        {
+            break;
+        }
+
+        // The polling_routine thread must hold the lock on the
+        // _polling_list while processing incoming messages.
+        // This lock is used to give this thread ownership of
+        // services on the _polling_routine list.
+
+        // This is necessary to avoid confict with other threads
+        // processing the _polling_list
+        // (e.g., MessageQueueServer::~MessageQueueService).
+
+        list->lock();
+        MessageQueueService *service = list->front();
+        ThreadStatus rtn = PEGASUS_THREAD_OK;
+        while (service != NULL)
+        {
+            if ((service->_incoming.count() > 0) &&
+                (service->_die.get() == 0) &&
+                (service->_threads.get() < max_threads_per_svc_queue))
+            {
+                // The _threads count is used to track the
+                // number of active threads that have been allocated
+                // to process messages for this service.
+
+                // The _threads count MUST be incremented while
+                // the polling_routine owns the _polling_thread
+                // lock and has ownership of the service object.
+
+                service->_threads++;
+                try
+                {
+                    rtn = _thread_pool->allocate_and_awaken(
+                        service, _req_proc, &_polling_sem);
+                }
+                catch (...)
+                {
+                    service->_threads--;
+
+                    // allocate_and_awaken should never generate an exception.
+                    PEGASUS_ASSERT(0);
+                }
+                // if no more threads available, break from processing loop
+                if (rtn != PEGASUS_THREAD_OK )
+                {
+                    service->_threads--;
+                    Logger::put(
+                        Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE,
+                        "Not enough threads to process this request. "
+                            "Skipping.");
+
+                    Tracer::trace(TRC_MESSAGEQUEUESERVICE, Tracer::LEVEL2,
+                        "Could not allocate thread for %s.  Queue has %d "
+                            "messages waiting and %d threads servicing."
+                            "Skipping the service for right now. ",
+                        service->getQueueName(),
+                        service->_incoming.count(),
+                        service->_threads.get());
+
+                    Threads::yield();
+                    service = NULL;
+                }
+            }
+            if (service != NULL)
+            {
+                service = list->next_of(service);
+            }
+        }
+        list->unlock();
+    }
+    myself->exit_self( (ThreadReturnType) 1 );
+    return 0;
 }
 
 
@@ -160,196 +163,200 @@ AtomicInt MessageQueueService::_stop_polling(0);
 
 
 MessageQueueService::MessageQueueService(
-   const char *name,
-   Uint32 queueID,
-   Uint32 capabilities,
-   Uint32 mask)
-   : Base(name, true,  queueID),
-     _mask(mask),
-     _die(0),
-     _threads(0),
-     _incoming(),
-     _incoming_queue_shutdown(0)
+    const char* name,
+    Uint32 queueID,
+    Uint32 capabilities,
+    Uint32 mask)
+    : Base(name, true,  queueID),
+      _mask(mask),
+      _die(0),
+      _threads(0),
+      _incoming(),
+      _incoming_queue_shutdown(0)
 {
+    _capabilities = (capabilities | module_capabilities::async);
 
-   _capabilities = (capabilities | module_capabilities::async);
-
-   _default_op_timeout.tv_sec = 30;
-   _default_op_timeout.tv_usec = 100;
+    _default_op_timeout.tv_sec = 30;
+    _default_op_timeout.tv_usec = 100;
 
-   max_threads_per_svc_queue = MAX_THREADS_PER_SVC_QUEUE;
+    max_threads_per_svc_queue = MAX_THREADS_PER_SVC_QUEUE;
 
-   // if requested thread max is out of range, then set to
-   // MAX_THREADS_PER_SVC_QUEUE_LIMIT
+    // if requested thread max is out of range, then set to
+    // MAX_THREADS_PER_SVC_QUEUE_LIMIT
 
-   if ((max_threads_per_svc_queue < 1) ||
-       (max_threads_per_svc_queue > MAX_THREADS_PER_SVC_QUEUE_LIMIT))
-   {
-       max_threads_per_svc_queue = MAX_THREADS_PER_SVC_QUEUE_LIMIT;
-   }
-
-   Tracer::trace(TRC_MESSAGEQUEUESERVICE, Tracer::LEVEL2,
-      "max_threads_per_svc_queue set to %u.", max_threads_per_svc_queue);
+    if ((max_threads_per_svc_queue < 1) ||
+        (max_threads_per_svc_queue > MAX_THREADS_PER_SVC_QUEUE_LIMIT))
+    {
+        max_threads_per_svc_queue = MAX_THREADS_PER_SVC_QUEUE_LIMIT;
+    }
 
-   AutoMutex autoMut(_meta_dispatcher_mutex);
+    Tracer::trace(TRC_MESSAGEQUEUESERVICE, Tracer::LEVEL2,
+       "max_threads_per_svc_queue set to %u.", max_threads_per_svc_queue);
 
-   if (_meta_dispatcher == 0)
-   {
-      _stop_polling = 0;
-      PEGASUS_ASSERT(_service_count.get() == 0);
-      _meta_dispatcher = new cimom();
+    AutoMutex autoMut(_meta_dispatcher_mutex);
 
-      //  _thread_pool = new ThreadPool(initial_cnt, "MessageQueueService",
-      //   minimum_cnt, maximum_cnt, deallocateWait); 
-      //
-      _thread_pool =
-          new ThreadPool(0, "MessageQueueService", 0, 0, deallocateWait);
-   }
-   _service_count++;
+    if (_meta_dispatcher == 0)
+    {
+        _stop_polling = 0;
+        PEGASUS_ASSERT(_service_count.get() == 0);
+        _meta_dispatcher = new cimom();
+
+        //  _thread_pool = new ThreadPool(initial_cnt, "MessageQueueService",
+        //   minimum_cnt, maximum_cnt, deallocateWait);
+        //
+        _thread_pool =
+            new ThreadPool(0, "MessageQueueService", 0, 0, deallocateWait);
+    }
+    _service_count++;
 
-   if (false == register_service(name, _capabilities, _mask))
-   {
-      MessageLoaderParms parms("Common.MessageQueueService.UNABLE_TO_REGISTER",
-         "CIM base message queue service is unable to register with the CIMOM "
-             "dispatcher.");
-      throw BindFailedException(parms);
-   }
+    if (false == register_service(name, _capabilities, _mask))
+    {
+        MessageLoaderParms parms(
+            "Common.MessageQueueService.UNABLE_TO_REGISTER",
+            "CIM base message queue service is unable to register with the "
+                "CIMOM dispatcher.");
+        throw BindFailedException(parms);
+    }
 
-   _get_polling_list()->insert_back(this);
+    _get_polling_list()->insert_back(this);
 }
 
 
 MessageQueueService::~MessageQueueService()
 {
-   _die = 1;
-
-   // The polling_routine locks the _polling_list while
-   // processing the incoming messages for services on the 
-   // list.  Deleting the service from the _polling_list
-   // prior to processing, avoids synchronization issues
-   // with the _polling_routine.
-
-   // ATTN: added to prevent assertion in List in which the list does not
-   // contain this element.
-
-   if (_get_polling_list()->contains(this))
-       _get_polling_list()->remove(this);
-
-   // ATTN: The code for closing the _incoming queue
-   // is not working correctly. In OpenPegasus 2.5,
-   // execution of the following code is very timing
-   // dependent. This needs to be fix.
-   // See Bug 4079 for details. 
-   if (_incoming_queue_shutdown.get() == 0)
-   {
-       _shutdown_incoming_queue();
-   }
-
-   // Wait until all threads processing the messages
-   // for this service have completed.
-
-   while (_threads.get() > 0)
-   {
-      Threads::yield();
-   }
-
-   {
-     AutoMutex autoMut(_meta_dispatcher_mutex);
-     _service_count--;
-     if (_service_count.get() == 0)
-     {
-
-      _stop_polling++;
-      _polling_sem.signal();
-      if (_polling_thread) {
-          _polling_thread->join();
-          delete _polling_thread;
-          _polling_thread = 0;
-      }
-      _meta_dispatcher->_shutdown_routed_queue();
-      delete _meta_dispatcher;
-      _meta_dispatcher = 0;
-
-      delete _thread_pool;
-      _thread_pool = 0;
-     }
-   } // mutex unlocks here
-   // Clean up in case there are extra stuff on the queue.
-  while (_incoming.count())
-  {
-    try { 
-      delete _incoming.dequeue();
-    } catch (const ListClosed&)
+    _die = 1;
+
+    // The polling_routine locks the _polling_list while
+    // processing the incoming messages for services on the
+    // list.  Deleting the service from the _polling_list
+    // prior to processing, avoids synchronization issues
+    // with the _polling_routine.
+
+    // ATTN: added to prevent assertion in List in which the list does not
+    // contain this element.
+
+    if (_get_polling_list()->contains(this))
+        _get_polling_list()->remove(this);
+
+    // ATTN: The code for closing the _incoming queue
+    // is not working correctly. In OpenPegasus 2.5,
+    // execution of the following code is very timing
+    // dependent. This needs to be fix.
+    // See Bug 4079 for details.
+    if (_incoming_queue_shutdown.get() == 0)
+    {
+        _shutdown_incoming_queue();
+    }
+
+    // Wait until all threads processing the messages
+    // for this service have completed.
+
+    while (_threads.get() > 0)
+    {
+        Threads::yield();
+    }
+
+    {
+        AutoMutex autoMut(_meta_dispatcher_mutex);
+        _service_count--;
+        if (_service_count.get() == 0)
+        {
+
+            _stop_polling++;
+            _polling_sem.signal();
+            if (_polling_thread)
+            {
+                _polling_thread->join();
+                delete _polling_thread;
+                _polling_thread = 0;
+            }
+            _meta_dispatcher->_shutdown_routed_queue();
+            delete _meta_dispatcher;
+            _meta_dispatcher = 0;
+
+            delete _thread_pool;
+            _thread_pool = 0;
+        }
+    } // mutex unlocks here
+    // Clean up in case there are extra stuff on the queue.
+    while (_incoming.count())
     {
-      // If the list is closed, there is nothing we can do. 
-      break;
+        try
+        {
+            delete _incoming.dequeue();
+        }
+        catch (const ListClosed&)
+        {
+            // If the list is closed, there is nothing we can do.
+            break;
+        }
     }
-  }
 }
 
 void MessageQueueService::_shutdown_incoming_queue()
 {
-   if (_incoming_queue_shutdown.get() > 0)
-      return;
-
-   AsyncIoctl *msg = new AsyncIoctl(
-      0,
-      _queueId,
-      _queueId,
-      true,
-      AsyncIoctl::IO_CLOSE,
-      0,
-      0);
-
-   msg->op = get_op();
-   msg->op->_flags |= ASYNC_OPFLAGS_FIRE_AND_FORGET;
-   msg->op->_flags &= ~(ASYNC_OPFLAGS_CALLBACK | ASYNC_OPFLAGS_SAFE_CALLBACK
-       | ASYNC_OPFLAGS_SIMPLE_STATUS);
-   msg->op->_state &= ~ASYNC_OPSTATE_COMPLETE;
-
-   msg->op->_op_dest = this;
-   msg->op->_request.reset(msg);
-   try {
-     _incoming.enqueue_wait(msg->op);
-     _polling_sem.signal();
-   } catch (const ListClosed &) 
-   { 
+    if (_incoming_queue_shutdown.get() > 0)
+        return;
+
+    AsyncIoctl *msg = new AsyncIoctl(
+        0,
+        _queueId,
+        _queueId,
+        true,
+        AsyncIoctl::IO_CLOSE,
+        0,
+        0);
+
+    msg->op = get_op();
+    msg->op->_flags |= ASYNC_OPFLAGS_FIRE_AND_FORGET;
+    msg->op->_flags &= ~(ASYNC_OPFLAGS_CALLBACK | ASYNC_OPFLAGS_SAFE_CALLBACK
+        | ASYNC_OPFLAGS_SIMPLE_STATUS);
+    msg->op->_state &= ~ASYNC_OPSTATE_COMPLETE;
+
+    msg->op->_op_dest = this;
+    msg->op->_request.reset(msg);
+    try
+    {
+        _incoming.enqueue_wait(msg->op);
+        _polling_sem.signal();
+    }
+    catch (const ListClosed&)
+    {
         // This means the queue has already been shut-down (happens  when there
-    // are two AsyncIoctrl::IO_CLOSE messages generated and one got first
-    // processed.
-     delete msg; 
-   }
-   catch (const Permission &)
-   {
-     delete msg;
-   }
+        // are two AsyncIoctrl::IO_CLOSE messages generated and one got first
+        // processed.
+        delete msg;
+    }
+    catch (const Permission&)
+    {
+        delete msg;
+    }
 }
 
 
 
-void MessageQueueService::enqueue(Message *msg)
+void MessageQueueService::enqueue(Messagemsg)
 {
-   PEG_METHOD_ENTER(TRC_MESSAGEQUEUESERVICE, "MessageQueueService::enqueue()");
+    PEG_METHOD_ENTER(TRC_MESSAGEQUEUESERVICE, "MessageQueueService::enqueue()");
 
-   Base::enqueue(msg);
+    Base::enqueue(msg);
 
-   PEG_METHOD_EXIT();
+    PEG_METHOD_EXIT();
 }
 
 
 ThreadReturnType PEGASUS_THREAD_CDECL MessageQueueService::_req_proc(
-    void * parm)
+    void* parm)
 {
     MessageQueueService* service =
-            reinterpret_cast<MessageQueueService*>(parm);
+        reinterpret_cast<MessageQueueService*>(parm);
     PEGASUS_ASSERT(service != 0);
     try
     {
-
         if (service->_die.get() != 0)
         {
             service->_threads--;
-            return (0);
+            return 0;
         }
         // pull messages off the incoming queue and dispatch them. then
         // check pending messages that are non-blocking
@@ -362,7 +369,7 @@ ThreadReturnType PEGASUS_THREAD_CDECL MessageQueueService::_req_proc(
             {
                 operation = service->_incoming.dequeue();
             }
-            catch (ListClosed &)
+            catch (ListClosed&)
             {
                 // ATTN: This appears to be a common loop exit path.
                 //PEG_TRACE_STRING(TRC_DISCARDED_DATA, Tracer::LEVEL2,
@@ -389,453 +396,460 @@ ThreadReturnType PEGASUS_THREAD_CDECL MessageQueueService::_req_proc(
             "Caught unrecognized exception.  Exiting _req_proc.");
     }
     service->_threads--;
-    return(0);
+    return 0;
 }
 
 
 void MessageQueueService::_sendwait_callback(
-    AsyncOpNode *op,
-    MessageQueue *q,
+    AsyncOpNodeop,
+    MessageQueueq,
     void *parm)
 {
-   op->_client_sem.signal();
+    op->_client_sem.signal();
 }
 
 
 // callback function is responsible for cleaning up all resources
 // including op, op->_callback_node, and op->_callback_ptr
-void MessageQueueService::_handle_async_callback(AsyncOpNode *op)
+void MessageQueueService::_handle_async_callback(AsyncOpNodeop)
 {
-   if (op->_flags & ASYNC_OPFLAGS_SAFE_CALLBACK)
-   {
-
-      Message *msg = op->removeRequest();
-      if (msg && (msg->getMask() & MessageMask::ha_async))
-      {
-         if (msg->getType() == async_messages::ASYNC_LEGACY_OP_START)
-         {
-            AsyncLegacyOperationStart *wrapper =
-               static_cast<AsyncLegacyOperationStart *>(msg);
-            msg = wrapper->get_action();
-            delete wrapper;
-         }
-         else if (msg->getType() == async_messages::ASYNC_MODULE_OP_START)
-         {
-            AsyncModuleOperationStart *wrapper =
-               static_cast<AsyncModuleOperationStart *>(msg);
-            msg = wrapper->get_action();
-            delete wrapper;
-         }
-         else if (msg->getType() == async_messages::ASYNC_OP_START)
-         {
-            AsyncOperationStart *wrapper =
-               static_cast<AsyncOperationStart *>(msg);
-            msg = wrapper->get_action();
-            delete wrapper;
-         }
-         delete msg;
-      }
-
-      msg = op->removeResponse();
-      if (msg && (msg->getMask() & MessageMask::ha_async))
-      {
-         if (msg->getType() == async_messages::ASYNC_LEGACY_OP_RESULT)
-         {
-            AsyncLegacyOperationResult *wrapper =
-               static_cast<AsyncLegacyOperationResult *>(msg);
-            msg = wrapper->get_result();
-            delete wrapper;
-         }
-         else if (msg->getType() == async_messages::ASYNC_MODULE_OP_RESULT)
-         {
-            AsyncModuleOperationResult *wrapper =
-               static_cast<AsyncModuleOperationResult *>(msg);
-            msg = wrapper->get_result();
-            delete wrapper;
-         }
-      }
-      void (*callback)(Message *, void *, void *) = op->__async_callback;
-      void *handle = op->_callback_handle;
-      void *parm = op->_callback_parameter;
-      op->release();
-      return_op(op);
-      callback(msg, handle, parm);
-   }
-   else if (op->_flags & ASYNC_OPFLAGS_CALLBACK)
-   {
-      // note that _callback_node may be different from op
-      // op->_callback_response_q is a "this" pointer we can use for
-      // static callback methods
-      op->_async_callback(op->_callback_node, op->_callback_response_q, op->_callback_ptr);
-   }
+    if (op->_flags & ASYNC_OPFLAGS_SAFE_CALLBACK)
+    {
+        Message *msg = op->removeRequest();
+        if (msg && (msg->getMask() & MessageMask::ha_async))
+        {
+            if (msg->getType() == async_messages::ASYNC_LEGACY_OP_START)
+            {
+                AsyncLegacyOperationStart *wrapper =
+                    static_cast<AsyncLegacyOperationStart *>(msg);
+                msg = wrapper->get_action();
+                delete wrapper;
+            }
+            else if (msg->getType() == async_messages::ASYNC_MODULE_OP_START)
+            {
+                AsyncModuleOperationStart *wrapper =
+                    static_cast<AsyncModuleOperationStart *>(msg);
+                msg = wrapper->get_action();
+                delete wrapper;
+            }
+            else if (msg->getType() == async_messages::ASYNC_OP_START)
+            {
+                AsyncOperationStart *wrapper =
+                    static_cast<AsyncOperationStart *>(msg);
+                msg = wrapper->get_action();
+                delete wrapper;
+            }
+            delete msg;
+        }
+
+        msg = op->removeResponse();
+        if (msg && (msg->getMask() & MessageMask::ha_async))
+        {
+            if (msg->getType() == async_messages::ASYNC_LEGACY_OP_RESULT)
+            {
+                AsyncLegacyOperationResult *wrapper =
+                    static_cast<AsyncLegacyOperationResult *>(msg);
+                msg = wrapper->get_result();
+                delete wrapper;
+            }
+            else if (msg->getType() == async_messages::ASYNC_MODULE_OP_RESULT)
+            {
+                AsyncModuleOperationResult *wrapper =
+                    static_cast<AsyncModuleOperationResult *>(msg);
+                msg = wrapper->get_result();
+                delete wrapper;
+            }
+        }
+        void (*callback)(Message *, void *, void *) = op->__async_callback;
+        void *handle = op->_callback_handle;
+        void *parm = op->_callback_parameter;
+        op->release();
+        return_op(op);
+        callback(msg, handle, parm);
+    }
+    else if (op->_flags & ASYNC_OPFLAGS_CALLBACK)
+    {
+        // note that _callback_node may be different from op
+        // op->_callback_response_q is a "this" pointer we can use for
+        // static callback methods
+        op->_async_callback(
+            op->_callback_node, op->_callback_response_q, op->_callback_ptr);
+    }
 }
 
 
-void MessageQueueService::_handle_incoming_operation(AsyncOpNode *operation)
+void MessageQueueService::_handle_incoming_operation(AsyncOpNodeoperation)
 {
-   if (operation != 0)
-   {
+    if (operation != 0)
+    {
 
 // ATTN: optimization
 // << Tue Feb 19 14:10:38 2002 mdd >>
-      operation->lock();
+        operation->lock();
 
-      Message *rq = operation->_request.get();
+        Message *rq = operation->_request.get();
 
 // optimization <<< Thu Mar  7 21:04:05 2002 mdd >>>
 // move this to the bottom of the loop when the majority of
 // messages become async messages.
 
-      // divert legacy messages to handleEnqueue
-      if ((rq != 0) && (!(rq->getMask() & MessageMask::ha_async)))
-      {
-         operation->_request.release();
-         operation->unlock();
-         // delete the op node
-         operation->release();
-         return_op(operation);
-
-         handleEnqueue(rq);
-         return;
-      }
-
-      if ((operation->_flags & ASYNC_OPFLAGS_CALLBACK ||
-           operation->_flags & ASYNC_OPFLAGS_SAFE_CALLBACK) &&
-          (operation->_state & ASYNC_OPSTATE_COMPLETE))
-      {
-         operation->unlock();
-         _handle_async_callback(operation);
-      }
-      else
-      {
-         PEGASUS_ASSERT(rq != 0);
-         operation->unlock();
-         _handle_async_request(static_cast<AsyncRequest *>(rq));
-      }
-   }
-   return;
+        // divert legacy messages to handleEnqueue
+        if ((rq != 0) && (!(rq->getMask() & MessageMask::ha_async)))
+        {
+            operation->_request.release();
+            operation->unlock();
+            // delete the op node
+            operation->release();
+            return_op(operation);
+
+            handleEnqueue(rq);
+            return;
+        }
+
+        if ((operation->_flags & ASYNC_OPFLAGS_CALLBACK ||
+             operation->_flags & ASYNC_OPFLAGS_SAFE_CALLBACK) &&
+            (operation->_state & ASYNC_OPSTATE_COMPLETE))
+        {
+            operation->unlock();
+            _handle_async_callback(operation);
+        }
+        else
+        {
+            PEGASUS_ASSERT(rq != 0);
+            operation->unlock();
+            _handle_async_request(static_cast<AsyncRequest *>(rq));
+        }
+    }
+    return;
 }
 
 void MessageQueueService::_handle_async_request(AsyncRequest *req)
 {
-   if (req != 0)
-   {
-      req->op->processing();
-
-      Uint32 type = req->getType();
-      if (type == async_messages::HEARTBEAT)
-         handle_heartbeat_request(req);
-      else if (type == async_messages::IOCTL)
-         handle_AsyncIoctl(static_cast<AsyncIoctl *>(req));
-      else if (type == async_messages::CIMSERVICE_START)
-         handle_CimServiceStart(static_cast<CimServiceStart *>(req));
-      else if (type == async_messages::CIMSERVICE_STOP)
-         handle_CimServiceStop(static_cast<CimServiceStop *>(req));
-      else if (type == async_messages::CIMSERVICE_PAUSE)
-         handle_CimServicePause(static_cast<CimServicePause *>(req));
-      else if (type == async_messages::CIMSERVICE_RESUME)
-         handle_CimServiceResume(static_cast<CimServiceResume *>(req));
-      else if (type == async_messages::ASYNC_OP_START)
-         handle_AsyncOperationStart(static_cast<AsyncOperationStart *>(req));
-      else
-      {
-         // we don't handle this request message
-         _make_response(req, async_results::CIM_NAK);
-      }
-   }
+    if (req != 0)
+    {
+        req->op->processing();
+
+        Uint32 type = req->getType();
+        if (type == async_messages::HEARTBEAT)
+            handle_heartbeat_request(req);
+        else if (type == async_messages::IOCTL)
+            handle_AsyncIoctl(static_cast<AsyncIoctl *>(req));
+        else if (type == async_messages::CIMSERVICE_START)
+            handle_CimServiceStart(static_cast<CimServiceStart *>(req));
+        else if (type == async_messages::CIMSERVICE_STOP)
+            handle_CimServiceStop(static_cast<CimServiceStop *>(req));
+        else if (type == async_messages::CIMSERVICE_PAUSE)
+            handle_CimServicePause(static_cast<CimServicePause *>(req));
+        else if (type == async_messages::CIMSERVICE_RESUME)
+            handle_CimServiceResume(static_cast<CimServiceResume *>(req));
+        else if (type == async_messages::ASYNC_OP_START)
+            handle_AsyncOperationStart(static_cast<AsyncOperationStart *>(req));
+        else
+        {
+            // we don't handle this request message
+            _make_response(req, async_results::CIM_NAK);
+        }
+    }
 }
 
 
 Boolean MessageQueueService::_enqueueResponse(
-   Message* request,
-   Message* response)
+    Message* request,
+    Message* response)
 {
-   PEG_METHOD_ENTER(TRC_MESSAGEQUEUESERVICE,
-                    "MessageQueueService::_enqueueResponse");
-
-   if (request->getMask() & MessageMask::ha_async)
-   {
-      if (response->getMask() & MessageMask::ha_async)
-      {
-         _completeAsyncResponse(static_cast<AsyncRequest *>(request),
-                                static_cast<AsyncReply *>(response),
-                                ASYNC_OPSTATE_COMPLETE, 0);
-         PEG_METHOD_EXIT();
-         return true;
-      }
-   }
-
-   if (request->_async != 0)
-   {
-      Uint32 mask = request->_async->getMask();
-      PEGASUS_ASSERT(mask & (MessageMask::ha_async | MessageMask::ha_request));
-
-      AsyncRequest *async = static_cast<AsyncRequest *>(request->_async);
-      AsyncOpNode *op = async->op;
-      request->_async = 0;
-      // the legacy request is going to be deleted by its handler
-      // remove it from the op node
-
-      static_cast<AsyncLegacyOperationStart *>(async)->get_action();
-
-      AsyncLegacyOperationResult *async_result =
-         new AsyncLegacyOperationResult(
-            op,
-            response);
-      _completeAsyncResponse(
-         async,
-         async_result,
-         ASYNC_OPSTATE_COMPLETE,
-         0);
-      PEG_METHOD_EXIT();
-      return true;
-   }
-
-   // ensure that the destination queue is in response->dest
-   PEG_METHOD_EXIT();
-   return SendForget(response);
+    PEG_METHOD_ENTER(TRC_MESSAGEQUEUESERVICE,
+        "MessageQueueService::_enqueueResponse");
+
+    if (request->getMask() & MessageMask::ha_async)
+    {
+        if (response->getMask() & MessageMask::ha_async)
+        {
+            _completeAsyncResponse(
+                static_cast<AsyncRequest *>(request),
+                static_cast<AsyncReply *>(response),
+                ASYNC_OPSTATE_COMPLETE, 0);
+            PEG_METHOD_EXIT();
+            return true;
+        }
+    }
+
+    if (request->_async != 0)
+    {
+        Uint32 mask = request->_async->getMask();
+        PEGASUS_ASSERT(mask &
+            (MessageMask::ha_async | MessageMask::ha_request));
+
+        AsyncRequest *async = static_cast<AsyncRequest *>(request->_async);
+        AsyncOpNode *op = async->op;
+        request->_async = 0;
+        // the legacy request is going to be deleted by its handler
+        // remove it from the op node
+
+        static_cast<AsyncLegacyOperationStart *>(async)->get_action();
+
+        AsyncLegacyOperationResult *async_result =
+            new AsyncLegacyOperationResult(
+                op,
+                response);
+        _completeAsyncResponse(
+            async,
+            async_result,
+            ASYNC_OPSTATE_COMPLETE,
+            0);
+        PEG_METHOD_EXIT();
+        return true;
+    }
 
+    // ensure that the destination queue is in response->dest
+    PEG_METHOD_EXIT();
+    return SendForget(response);
 }
 
-void MessageQueueService::_make_response(Message *req, Uint32 code)
+void MessageQueueService::_make_response(Messagereq, Uint32 code)
 {
-   cimom::_make_response(req, code);
+    cimom::_make_response(req, code);
 }
 
 
 void MessageQueueService::_completeAsyncResponse(
-    AsyncRequest *request,
-    AsyncReply *reply,
+    AsyncRequestrequest,
+    AsyncReplyreply,
     Uint32 state,
     Uint32 flag)
 {
-   PEG_METHOD_ENTER(TRC_MESSAGEQUEUESERVICE,
-                    "MessageQueueService::_completeAsyncResponse");
+    PEG_METHOD_ENTER(TRC_MESSAGEQUEUESERVICE,
+        "MessageQueueService::_completeAsyncResponse");
 
-   cimom::_completeAsyncResponse(request, reply, state, flag);
+    cimom::_completeAsyncResponse(request, reply, state, flag);
 
-   PEG_METHOD_EXIT();
+    PEG_METHOD_EXIT();
 }
 
 
 void MessageQueueService::_complete_op_node(
-    AsyncOpNode *op,
+    AsyncOpNodeop,
     Uint32 state,
     Uint32 flag,
     Uint32 code)
 {
-   cimom::_complete_op_node(op, state, flag, code);
+    cimom::_complete_op_node(op, state, flag, code);
 }
 
 
-Boolean MessageQueueService::accept_async(AsyncOpNode *op)
+Boolean MessageQueueService::accept_async(AsyncOpNodeop)
 {
-   if (_incoming_queue_shutdown.get() > 0)
-      return false;
-   if (_polling_thread == NULL)
-   {
-      _polling_thread = new Thread(
-          polling_routine,
-          reinterpret_cast<void *>(_get_polling_list()),
-          false);
-      ThreadStatus tr = PEGASUS_THREAD_OK;
-      while ( (tr =_polling_thread->run()) != PEGASUS_THREAD_OK)
-      {
-        if (tr == PEGASUS_THREAD_INSUFFICIENT_RESOURCES)
-           Threads::yield();
-        else
-           throw Exception(MessageLoaderParms("Common.MessageQueueService.NOT_ENOUGH_THREAD",
-                        "Could not allocate thread for the polling thread."));
-      }
-   }
+    if (_incoming_queue_shutdown.get() > 0)
+        return false;
+    if (_polling_thread == NULL)
+    {
+        _polling_thread = new Thread(
+            polling_routine,
+            reinterpret_cast<void *>(_get_polling_list()),
+            false);
+        ThreadStatus tr = PEGASUS_THREAD_OK;
+        while ( (tr =_polling_thread->run()) != PEGASUS_THREAD_OK)
+        {
+            if (tr == PEGASUS_THREAD_INSUFFICIENT_RESOURCES)
+                Threads::yield();
+            else
+                throw Exception(MessageLoaderParms(
+                    "Common.MessageQueueService.NOT_ENOUGH_THREAD",
+                    "Could not allocate thread for the polling thread."));
+        }
+    }
 // ATTN optimization remove the message checking altogether in the base
 // << Mon Feb 18 14:02:20 2002 mdd >>
-   op->lock();
-   Message *rq = op->_request.get();
-   Message *rp = op->_response.get();
-   op->unlock();
-
-   if ((rq != 0 && (true == messageOK(rq))) ||
-       (rp != 0 && (true == messageOK(rp))) && _die.get() == 0)
-   {
-      _incoming.enqueue_wait(op);
-      _polling_sem.signal();
-      return true;
-   }
-   return false;
+    op->lock();
+    Message *rq = op->_request.get();
+    Message *rp = op->_response.get();
+    op->unlock();
+
+    if ((rq != 0 && (true == messageOK(rq))) ||
+        (rp != 0 && (true == messageOK(rp))) && _die.get() == 0)
+    {
+        _incoming.enqueue_wait(op);
+        _polling_sem.signal();
+        return true;
+    }
+    return false;
 }
 
-Boolean MessageQueueService::messageOK(const Message *msg)
+Boolean MessageQueueService::messageOK(const Messagemsg)
 {
-   if (_incoming_queue_shutdown.get() > 0)
-      return false;
-   return true;
+    if (_incoming_queue_shutdown.get() > 0)
+        return false;
+    return true;
 }
 
-void MessageQueueService::handle_heartbeat_request(AsyncRequest *req)
+void MessageQueueService::handle_heartbeat_request(AsyncRequestreq)
 {
-   // default action is to echo a heartbeat response
-
-   AsyncReply *reply = new AsyncReply(
-      async_messages::HEARTBEAT,
-      0,
-      req->op,
-      async_results::OK,
-      req->resp,
-      false);
-   _completeAsyncResponse(req, reply, ASYNC_OPSTATE_COMPLETE, 0);
+    // default action is to echo a heartbeat response
+
+    AsyncReply *reply = new AsyncReply(
+        async_messages::HEARTBEAT,
+        0,
+        req->op,
+        async_results::OK,
+        req->resp,
+        false);
+    _completeAsyncResponse(req, reply, ASYNC_OPSTATE_COMPLETE, 0);
 }
 
 
-void MessageQueueService::handle_heartbeat_reply(AsyncReply *rep)
+void MessageQueueService::handle_heartbeat_reply(AsyncReplyrep)
 {
 }
 
-void MessageQueueService::handle_AsyncIoctl(AsyncIoctl *req)
+void MessageQueueService::handle_AsyncIoctl(AsyncIoctlreq)
 {
-   switch (req->ctl)
-   {
-      case AsyncIoctl::IO_CLOSE:
-      {
-         MessageQueueService *service = static_cast<MessageQueueService *>(req->op->_service_ptr);
+    switch (req->ctl)
+    {
+        case AsyncIoctl::IO_CLOSE:
+        {
+            MessageQueueService *service =
+                static_cast<MessageQueueService *>(req->op->_service_ptr);
 
 #ifdef MESSAGEQUEUESERVICE_DEBUG
-         PEGASUS_STD(cout) << service->getQueueName() << " Received AsyncIoctl::IO_CLOSE " << PEGASUS_STD(endl);
+            PEGASUS_STD(cout) << service->getQueueName() <<
+                " Received AsyncIoctl::IO_CLOSE " << PEGASUS_STD(endl);
 #endif
 
-         // respond to this message. this is fire and forget, so we don't need to delete anything.
-         // this takes care of two problems that were being found
-         // << Thu Oct  9 10:52:48 2003 mdd >>
-          _make_response(req, async_results::OK);
-         // ensure we do not accept any further messages
+            // respond to this message. this is fire and forget, so we
+            // don't need to delete anything.
+            // this takes care of two problems that were being found
+            // << Thu Oct  9 10:52:48 2003 mdd >>
+            _make_response(req, async_results::OK);
+            // ensure we do not accept any further messages
 
-         // ensure we don't recurse on IO_CLOSE
-         if (_incoming_queue_shutdown.get() > 0)
-            break;
+            // ensure we don't recurse on IO_CLOSE
+            if (_incoming_queue_shutdown.get() > 0)
+                break;
 
-         // set the closing flag
-         service->_incoming_queue_shutdown = 1;
-         // empty out the queue
-         while (1)
-         {
-            AsyncOpNode *operation;
-            try
+            // set the closing flag
+            service->_incoming_queue_shutdown = 1;
+            // empty out the queue
+            while (1)
             {
-               operation = service->_incoming.dequeue();
-            }
-            catch(IPCException &)
-            {
-               break;
-            }
-            if (operation)
-            {
-               operation->_service_ptr = service;
-               service->_handle_incoming_operation(operation);
-            }
-            else
-               break;
-         } // message processing loop
-
-         // shutdown the AsyncQueue
-         service->_incoming.close();
-         return;
-      }
+                AsyncOpNode *operation;
+                try
+                {
+                    operation = service->_incoming.dequeue();
+                }
+                catch (IPCException&)
+                {
+                    break;
+                }
+                if (operation)
+                {
+                    operation->_service_ptr = service;
+                    service->_handle_incoming_operation(operation);
+                }
+                else
+                    break;
+            } // message processing loop
+
+            // shutdown the AsyncQueue
+            service->_incoming.close();
+            return;
+        }
 
-      default:
-         _make_response(req, async_results::CIM_NAK);
-   }
+        default:
+            _make_response(req, async_results::CIM_NAK);
+    }
 }
 
-void MessageQueueService::handle_CimServiceStart(CimServiceStart *req)
+void MessageQueueService::handle_CimServiceStart(CimServiceStartreq)
 {
-
 #ifdef MESSAGEQUEUESERVICE_DEBUG
-   PEGASUS_STD(cout) << getQueueName() << "received START" << PEGASUS_STD(endl);
+    PEGASUS_STD(cout) << getQueueName() << "received START" <<
+        PEGASUS_STD(endl);
 #endif
 
-   // clear the stoped bit and update
-   _capabilities &= (~(module_capabilities::stopped));
-   _make_response(req, async_results::OK);
-   // now tell the meta dispatcher we are stopped
-   update_service(_capabilities, _mask);
-
+    // clear the stoped bit and update
+    _capabilities &= (~(module_capabilities::stopped));
+    _make_response(req, async_results::OK);
+    // now tell the meta dispatcher we are stopped
+    update_service(_capabilities, _mask);
 }
-void MessageQueueService::handle_CimServiceStop(CimServiceStop *req)
+
+void MessageQueueService::handle_CimServiceStop(CimServiceStop* req)
 {
 #ifdef MESSAGEQUEUESERVICE_DEBUG
-   PEGASUS_STD(cout) << getQueueName() << "received STOP" << PEGASUS_STD(endl);
+    PEGASUS_STD(cout) << getQueueName() << "received STOP" << PEGASUS_STD(endl);
 #endif
-   // set the stopeed bit and update
-   _capabilities |= module_capabilities::stopped;
-   _make_response(req, async_results::CIM_STOPPED);
-   // now tell the meta dispatcher we are stopped
-   update_service(_capabilities, _mask);
+    // set the stopeed bit and update
+    _capabilities |= module_capabilities::stopped;
+    _make_response(req, async_results::CIM_STOPPED);
+    // now tell the meta dispatcher we are stopped
+    update_service(_capabilities, _mask);
 }
 
-void MessageQueueService::handle_CimServicePause(CimServicePause *req)
+void MessageQueueService::handle_CimServicePause(CimServicePausereq)
 {
-   // set the paused bit and update
-   _capabilities |= module_capabilities::paused;
-   update_service(_capabilities, _mask);
-   _make_response(req, async_results::CIM_PAUSED);
-   // now tell the meta dispatcher we are stopped
+    // set the paused bit and update
+    _capabilities |= module_capabilities::paused;
+    update_service(_capabilities, _mask);
+    _make_response(req, async_results::CIM_PAUSED);
+    // now tell the meta dispatcher we are stopped
 }
 
-void MessageQueueService::handle_CimServiceResume(CimServiceResume *req)
+void MessageQueueService::handle_CimServiceResume(CimServiceResumereq)
 {
-   // clear the paused  bit and update
-   _capabilities &= (~(module_capabilities::paused));
-   update_service(_capabilities, _mask);
-   _make_response(req, async_results::OK);
-   // now tell the meta dispatcher we are stopped
+    // clear the paused  bit and update
+    _capabilities &= (~(module_capabilities::paused));
+    update_service(_capabilities, _mask);
+    _make_response(req, async_results::OK);
+    // now tell the meta dispatcher we are stopped
 }
 
-void MessageQueueService::handle_AsyncOperationStart(AsyncOperationStart *req)
+void MessageQueueService::handle_AsyncOperationStart(AsyncOperationStartreq)
 {
-   _make_response(req, async_results::CIM_NAK);
+    _make_response(req, async_results::CIM_NAK);
 }
 
-void MessageQueueService::handle_AsyncOperationResult(AsyncOperationResult *req)
+void MessageQueueService::handle_AsyncOperationResult(AsyncOperationResultreq)
 {
-   ;
 }
 
 
-void MessageQueueService::handle_AsyncLegacyOperationStart(AsyncLegacyOperationStart *req)
+void MessageQueueService::handle_AsyncLegacyOperationStart(
+    AsyncLegacyOperationStart* req)
 {
-   // remove the legacy message from the request and enqueue it to its destination
-   Uint32 result = async_results::CIM_NAK;
-
-   Message *legacy = req->_act;
-   if (legacy != 0)
-   {
-      MessageQueue* queue = MessageQueue::lookup(req->_legacy_destination);
-      if (queue != 0)
-      {
-         if (queue->isAsync() == true)
-         {
-            (static_cast<MessageQueueService *>(queue))->handleEnqueue(legacy);
-         }
-         else
-         {
-            // Enqueue the response:
-            queue->enqueue(req->get_action());
-         }
-
-         result = async_results::OK;
-      }
-   }
-   _make_response(req, result);
+    // remove the legacy message from the request and enqueue it to its
+    // destination
+    Uint32 result = async_results::CIM_NAK;
+
+    Message* legacy = req->_act;
+    if (legacy != 0)
+    {
+        MessageQueue* queue = MessageQueue::lookup(req->_legacy_destination);
+        if (queue != 0)
+        {
+            if (queue->isAsync() == true)
+            {
+                (static_cast<MessageQueueService *>(queue))->handleEnqueue(
+                    legacy);
+            }
+            else
+            {
+                // Enqueue the response:
+                queue->enqueue(req->get_action());
+            }
+
+            result = async_results::OK;
+        }
+    }
+    _make_response(req, result);
 }
 
-void MessageQueueService::handle_AsyncLegacyOperationResult(AsyncLegacyOperationResult *rep)
+void MessageQueueService::handle_AsyncLegacyOperationResult(
+    AsyncLegacyOperationResult* rep)
 {
-   ;
 }
 
-AsyncOpNode *MessageQueueService::get_op()
+AsyncOpNodeMessageQueueService::get_op()
 {
-   AsyncOpNode *op = new AsyncOpNode();
+   AsyncOpNodeop = new AsyncOpNode();
 
    op->_state = ASYNC_OPSTATE_UNKNOWN;
    op->_flags = ASYNC_OPFLAGS_SINGLE | ASYNC_OPFLAGS_NORMAL;
@@ -843,162 +857,168 @@ AsyncOpNode *MessageQueueService::get_op()
    return op;
 }
 
-void MessageQueueService::return_op(AsyncOpNode *op)
+void MessageQueueService::return_op(AsyncOpNodeop)
 {
-   PEGASUS_ASSERT(op->_state & ASYNC_OPSTATE_RELEASED);
-   delete op;
+    PEGASUS_ASSERT(op->_state & ASYNC_OPSTATE_RELEASED);
+    delete op;
 }
 
 
 Boolean MessageQueueService::SendAsync(
-    AsyncOpNode *op,
+    AsyncOpNodeop,
     Uint32 destination,
-    void (*callback)(AsyncOpNode *, MessageQueue *, void *),
-    MessageQueue *callback_response_q,
-    void *callback_ptr)
+    void (*callback)(AsyncOpNode*, MessageQueue*, void*),
+    MessageQueuecallback_response_q,
+    voidcallback_ptr)
 {
-   PEGASUS_ASSERT(op != 0 && callback != 0);
-
-   // get the queue handle for the destination
-
-   op->lock();
-   op->_op_dest = MessageQueue::lookup(destination); // destination of this message
-   op->_flags |= ASYNC_OPFLAGS_CALLBACK;
-   op->_flags &= ~(ASYNC_OPFLAGS_FIRE_AND_FORGET);
-   // initialize the callback data
-   op->_async_callback = callback;   // callback function to be executed by recpt. of response
-   op->_callback_node = op;          // the op node
-   op->_callback_response_q = callback_response_q;  // the queue that will receive the response
-   op->_callback_ptr = callback_ptr;   // user data for callback
-   op->_callback_request_q = this;     // I am the originator of this request
-
-   op->unlock();
-   if (op->_op_dest == 0)
-      return false;
-
-   return  _meta_dispatcher->route_async(op);
+    PEGASUS_ASSERT(op != 0 && callback != 0);
+
+    // get the queue handle for the destination
+
+    op->lock();
+    // destination of this message
+    op->_op_dest = MessageQueue::lookup(destination);
+    op->_flags |= ASYNC_OPFLAGS_CALLBACK;
+    op->_flags &= ~(ASYNC_OPFLAGS_FIRE_AND_FORGET);
+    // initialize the callback data
+    // callback function to be executed by recpt. of response
+    op->_async_callback = callback;
+    // the op node
+    op->_callback_node = op;
+    // the queue that will receive the response
+    op->_callback_response_q = callback_response_q;
+    // user data for callback
+    op->_callback_ptr = callback_ptr;
+    // I am the originator of this request
+    op->_callback_request_q = this;
+
+    op->unlock();
+    if (op->_op_dest == 0)
+        return false;
+
+    return  _meta_dispatcher->route_async(op);
 }
 
 
 Boolean MessageQueueService::SendAsync(
-    Message *msg,
+    Messagemsg,
     Uint32 destination,
-    void (*callback)(Message *response, void *handle, void *parameter),
-    void *handle,
-    void *parameter)
+    void (*callback)(Message* response, void* handle, void* parameter),
+    voidhandle,
+    voidparameter)
 {
-   if (msg == NULL)
-      return false;
-   if (callback == NULL)
-      return SendForget(msg);
-   AsyncOpNode *op = get_op();
-   msg->dest = destination;
-   if (NULL == (op->_op_dest = MessageQueue::lookup(msg->dest)))
-   {
-      op->release();
-      return_op(op);
-      return false;
-   }
-   op->_flags |= ASYNC_OPFLAGS_SAFE_CALLBACK;
-   op->_flags &= ~(ASYNC_OPFLAGS_FIRE_AND_FORGET);
-   op->_state &= ~ASYNC_OPSTATE_COMPLETE;
-   op->__async_callback = callback;
-   op->_callback_node = op;
-   op->_callback_handle = handle;
-   op->_callback_parameter = parameter;
-   op->_callback_response_q = this;
-
-   if (!(msg->getMask() & MessageMask::ha_async))
-   {
-      AsyncLegacyOperationStart *wrapper = new AsyncLegacyOperationStart(
-         op,
-         destination,
-         msg,
-         destination);
-   }
-   else
-   {
-      op->_request.reset(msg);
-      (static_cast<AsyncMessage *>(msg))->op = op;
-   }
-   return _meta_dispatcher->route_async(op);
+    if (msg == NULL)
+        return false;
+    if (callback == NULL)
+        return SendForget(msg);
+    AsyncOpNode *op = get_op();
+    msg->dest = destination;
+    if (NULL == (op->_op_dest = MessageQueue::lookup(msg->dest)))
+    {
+        op->release();
+        return_op(op);
+        return false;
+    }
+    op->_flags |= ASYNC_OPFLAGS_SAFE_CALLBACK;
+    op->_flags &= ~(ASYNC_OPFLAGS_FIRE_AND_FORGET);
+    op->_state &= ~ASYNC_OPSTATE_COMPLETE;
+    op->__async_callback = callback;
+    op->_callback_node = op;
+    op->_callback_handle = handle;
+    op->_callback_parameter = parameter;
+    op->_callback_response_q = this;
+
+    if (!(msg->getMask() & MessageMask::ha_async))
+    {
+        AsyncLegacyOperationStart *wrapper = new AsyncLegacyOperationStart(
+            op,
+            destination,
+            msg,
+            destination);
+    }
+    else
+    {
+        op->_request.reset(msg);
+        (static_cast<AsyncMessage *>(msg))->op = op;
+    }
+    return _meta_dispatcher->route_async(op);
 }
 
 
-Boolean MessageQueueService::SendForget(Message *msg)
+Boolean MessageQueueService::SendForget(Messagemsg)
 {
-   AsyncOpNode *op = 0;
-   Uint32 mask = msg->getMask();
-
-   if (mask & MessageMask::ha_async)
-   {
-      op = (static_cast<AsyncMessage *>(msg))->op ;
-   }
-
-   if (op == 0)
-   {
-      op = get_op();
-      op->_request.reset(msg);
-      if (mask & MessageMask::ha_async)
-      {
-         (static_cast<AsyncMessage *>(msg))->op = op;
-      }
-   }
-   op->_op_dest = MessageQueue::lookup(msg->dest);
-   op->_flags |= ASYNC_OPFLAGS_FIRE_AND_FORGET;
-   op->_flags &= ~(ASYNC_OPFLAGS_CALLBACK | ASYNC_OPFLAGS_SAFE_CALLBACK
-       | ASYNC_OPFLAGS_SIMPLE_STATUS);
-   op->_state &= ~ASYNC_OPSTATE_COMPLETE;
-   if (op->_op_dest == 0)
-   {
-      op->release();
-      return_op(op);
-      return false;
-   }
-
-   // now see if the meta dispatcher will take it
-   return  _meta_dispatcher->route_async(op);
+    AsyncOpNode* op = 0;
+    Uint32 mask = msg->getMask();
+
+    if (mask & MessageMask::ha_async)
+    {
+        op = (static_cast<AsyncMessage *>(msg))->op;
+    }
+
+    if (op == 0)
+    {
+        op = get_op();
+        op->_request.reset(msg);
+        if (mask & MessageMask::ha_async)
+        {
+            (static_cast<AsyncMessage *>(msg))->op = op;
+        }
+    }
+    op->_op_dest = MessageQueue::lookup(msg->dest);
+    op->_flags |= ASYNC_OPFLAGS_FIRE_AND_FORGET;
+    op->_flags &= ~(ASYNC_OPFLAGS_CALLBACK | ASYNC_OPFLAGS_SAFE_CALLBACK
+        | ASYNC_OPFLAGS_SIMPLE_STATUS);
+    op->_state &= ~ASYNC_OPSTATE_COMPLETE;
+    if (op->_op_dest == 0)
+    {
+        op->release();
+        return_op(op);
+        return false;
+    }
+
+    // now see if the meta dispatcher will take it
+    return  _meta_dispatcher->route_async(op);
 }
 
 
-AsyncReply *MessageQueueService::SendWait(AsyncRequest *request)
+AsyncReply *MessageQueueService::SendWait(AsyncRequestrequest)
 {
-   if (request == 0)
-      return 0 ;
-
-   Boolean destroy_op = false;
-
-   if (request->op == 0)
-   {
-      request->op = get_op();
-      request->op->_request.reset(request);
-      destroy_op = true;
-   }
-
-   request->block = false;
-   request->op->_flags |= ASYNC_OPFLAGS_PSEUDO_CALLBACK;
-   SendAsync(
-      request->op,
-      request->dest,
-      _sendwait_callback,
-      this,
-      (void *)0);
-
-   request->op->_client_sem.wait();
-
-   AsyncReply* rpl = static_cast<AsyncReply *>(request->op->removeResponse());
-   rpl->op = 0;
-
-   if (destroy_op == true)
-   {
-      request->op->lock();
-      request->op->_request.release();
-      request->op->_state |= ASYNC_OPSTATE_RELEASED;
-      request->op->unlock();
-      return_op(request->op);
-      request->op = 0;
-   }
-   return rpl;
+    if (request == 0)
+        return 0;
+
+    Boolean destroy_op = false;
+
+    if (request->op == 0)
+    {
+        request->op = get_op();
+        request->op->_request.reset(request);
+        destroy_op = true;
+    }
+
+    request->block = false;
+    request->op->_flags |= ASYNC_OPFLAGS_PSEUDO_CALLBACK;
+    SendAsync(
+        request->op,
+        request->dest,
+        _sendwait_callback,
+        this,
+        (void *)0);
+
+    request->op->_client_sem.wait();
+
+    AsyncReply* rpl = static_cast<AsyncReply *>(request->op->removeResponse());
+    rpl->op = 0;
+
+    if (destroy_op == true)
+    {
+        request->op->lock();
+        request->op->_request.release();
+        request->op->_state |= ASYNC_OPSTATE_RELEASED;
+        request->op->unlock();
+        return_op(request->op);
+        request->op = 0;
+    }
+    return rpl;
 }
 
 
@@ -1007,73 +1027,73 @@ Boolean MessageQueueService::register_service(
     Uint32 capabilities,
     Uint32 mask)
 {
-   RegisterCimService *msg = new RegisterCimService(
-      0,
-      true,
-      name,
-      capabilities,
-      mask,
-      _queueId);
-   msg->dest = CIMOM_Q_ID;
-
-   Boolean registered = false;
-   AsyncReply *reply = static_cast<AsyncReply *>(SendWait(msg));
-
-   if (reply != 0)
-   {
-      if (reply->getMask() & MessageMask::ha_async)
-      {
-         if (reply->getMask() & MessageMask::ha_reply)
-         {
-            if (reply->result == async_results::OK ||
-                reply->result == async_results::MODULE_ALREADY_REGISTERED)
+    RegisterCimService *msg = new RegisterCimService(
+        0,
+        true,
+        name,
+        capabilities,
+        mask,
+        _queueId);
+    msg->dest = CIMOM_Q_ID;
+
+    Boolean registered = false;
+    AsyncReply *reply = static_cast<AsyncReply *>(SendWait(msg));
+
+    if (reply != 0)
+    {
+        if (reply->getMask() & MessageMask::ha_async)
+        {
+            if (reply->getMask() & MessageMask::ha_reply)
             {
-                registered = true;
+                if (reply->result == async_results::OK ||
+                    reply->result == async_results::MODULE_ALREADY_REGISTERED)
+                {
+                    registered = true;
+                }
             }
-         }
-      }
+        }
 
-      delete reply;
-   }
-   delete msg;
-   return registered;
+        delete reply;
+    }
+    delete msg;
+    return registered;
 }
 
 Boolean MessageQueueService::update_service(Uint32 capabilities, Uint32 mask)
 {
-   UpdateCimService *msg = new UpdateCimService(
-      0,
-      true,
-      _queueId,
-      _capabilities,
-      _mask);
-   Boolean registered = false;
-
-   AsyncMessage *reply = SendWait(msg);
-   if (reply)
-   {
-      if (reply->getMask() & MessageMask::ha_async)
-      {
-         if (reply->getMask() & MessageMask::ha_reply)
-         {
-            if (static_cast<AsyncReply *>(reply)->result == async_results::OK)
+    UpdateCimService *msg = new UpdateCimService(
+        0,
+        true,
+        _queueId,
+        _capabilities,
+        _mask);
+    Boolean registered = false;
+
+    AsyncMessage* reply = SendWait(msg);
+    if (reply)
+    {
+        if (reply->getMask() & MessageMask::ha_async)
+        {
+            if (reply->getMask() & MessageMask::ha_reply)
             {
-               registered = true;
+                if (static_cast<AsyncReply *>(reply)->result ==
+                        async_results::OK)
+                {
+                    registered = true;
+                }
             }
-         }
-      }
-      delete reply;
-   }
-   delete msg;
-   return registered;
+        }
+        delete reply;
+    }
+    delete msg;
+    return registered;
 }
 
 
 Boolean MessageQueueService::deregister_service()
 {
-
-   _meta_dispatcher->deregister_module(_queueId);
-   return true;
+    _meta_dispatcher->deregister_module(_queueId);
+    return true;
 }
 
 
@@ -1081,90 +1101,98 @@ void MessageQueueService::find_services(
     String name,
     Uint32 capabilities,
     Uint32 mask,
-    Array<Uint32> *results)
+    Array<Uint32>results)
 {
-   if (results == 0)
-   {
-      throw NullPointer();
-   }
-
-   results->clear();
-
-   FindServiceQueue *req = new FindServiceQueue(
-      0,
-      _queueId,
-      true,
-      name,
-      capabilities,
-      mask);
-
-   req->dest = CIMOM_Q_ID;
-
-   AsyncMessage *reply = SendWait(req);
-   if (reply)
-   {
-      if (reply->getMask() & MessageMask::ha_async)
-      {
-         if (reply->getMask() & MessageMask::ha_reply)
-         {
-            if (reply->getType() == async_messages::FIND_SERVICE_Q_RESULT)
+    if (results == 0)
+    {
+        throw NullPointer();
+    }
+
+    results->clear();
+
+    FindServiceQueue *req = new FindServiceQueue(
+        0,
+        _queueId,
+        true,
+        name,
+        capabilities,
+        mask);
+
+    req->dest = CIMOM_Q_ID;
+
+    AsyncMessage *reply = SendWait(req);
+    if (reply)
+    {
+        if (reply->getMask() & MessageMask::ha_async)
+        {
+            if (reply->getMask() & MessageMask::ha_reply)
             {
-               if ((static_cast<FindServiceQueueResult *>(reply))->result == async_results::OK)
-                  *results = (static_cast<FindServiceQueueResult *>(reply))->qids;
+                if (reply->getType() == async_messages::FIND_SERVICE_Q_RESULT)
+                {
+                    if ((static_cast<FindServiceQueueResult*>(reply))->result ==
+                            async_results::OK)
+                        *results =
+                            (static_cast<FindServiceQueueResult*>(reply))->qids;
+                }
             }
-         }
-      }
-      delete reply;
-   }
-   delete req;
-   return ;
+        }
+        delete reply;
+    }
+    delete req;
 }
 
-void MessageQueueService::enumerate_service(Uint32 queue, message_module *result)
+void MessageQueueService::enumerate_service(
+    Uint32 queue,
+    message_module* result)
 {
-   if (result == 0)
-   {
-      throw NullPointer();
-   }
-
-   EnumerateService *req = new EnumerateService(
-      0,
-      _queueId,
-      true,
-      queue);
-
-   AsyncMessage *reply = SendWait(req);
-
-   if (reply)
-   {
-      Boolean found = false;
-
-      if (reply->getMask() & MessageMask::ha_async)
-      {
-         if (reply->getMask() & MessageMask::ha_reply)
-         {
-            if (reply->getType() == async_messages::ENUMERATE_SERVICE_RESULT)
+    if (result == 0)
+    {
+        throw NullPointer();
+    }
+
+    EnumerateService *req = new EnumerateService(
+        0,
+        _queueId,
+        true,
+        queue);
+
+    AsyncMessage* reply = SendWait(req);
+
+    if (reply)
+    {
+        Boolean found = false;
+
+        if (reply->getMask() & MessageMask::ha_async)
+        {
+            if (reply->getMask() & MessageMask::ha_reply)
             {
-               if ((static_cast<EnumerateServiceResponse *>(reply))->result == async_results::OK)
-               {
-                  if (found == false)
-                  {
-                     found = true;
-
-                     result->put_name((static_cast<EnumerateServiceResponse *>(reply))->name);
-                     result->put_capabilities((static_cast<EnumerateServiceResponse *>(reply))->capabilities);
-                     result->put_mask((static_cast<EnumerateServiceResponse *>(reply))->mask);
-                     result->put_queue((static_cast<EnumerateServiceResponse *>(reply))->qid);
-                  }
-               }
+                if (reply->getType() ==
+                        async_messages::ENUMERATE_SERVICE_RESULT)
+                {
+                    if ((static_cast<EnumerateServiceResponse*>(reply))->
+                            result == async_results::OK)
+                    {
+                        if (found == false)
+                        {
+                            found = true;
+
+                            result->put_name((static_cast<
+                                EnumerateServiceResponse*>(reply))->name);
+                            result->put_capabilities((static_cast<
+                                EnumerateServiceResponse*>(reply))->
+                                    capabilities);
+                            result->put_mask((static_cast<
+                                EnumerateServiceResponse*>(reply))->mask);
+                            result->put_queue((static_cast<
+                                EnumerateServiceResponse*>(reply))->qid);
+                        }
+                    }
+                }
             }
-         }
-      }
-      delete reply;
-   }
-   delete req;
-
-   return;
+        }
+        delete reply;
+    }
+    delete req;
 }
 
 MessageQueueService::PollingList* MessageQueueService::_get_polling_list()
@@ -1172,7 +1200,7 @@ MessageQueueService::PollingList* MessageQueueService::_get_polling_list()
     _polling_list_mutex.lock();
 
     if (!_polling_list)
-       _polling_list = new PollingList;
+        _polling_list = new PollingList;
 
     _polling_list_mutex.unlock();
 
index 416324ad33105d45955c21258c5ea13c72ad266d..1fcbbe753c332d37abce8b7a34d591c4eaa78740 100644 (file)
@@ -54,7 +54,7 @@ class message_module;
 class cimom;
 
 
-class PEGASUS_COMMON_LINKAGE MessageQueueService : 
+class PEGASUS_COMMON_LINKAGE MessageQueueService :
     public Linkable, public MessageQueue
 {
 public:
@@ -62,7 +62,7 @@ public:
     typedef MessageQueue Base;
 
     MessageQueueService(
-        const char *name,
+        const charname,
         Uint32 queueID = MessageQueue::getNextQueueId(),
         Uint32 capabilities = 0,
         Uint32 mask = MessageMask::type_cimom |
@@ -78,20 +78,20 @@ public:
     // enqueue may throw an IPCException
     virtual void enqueue(Message *);
 
-    AsyncReply *SendWait(AsyncRequest *request);
-    Boolean SendAsync(AsyncOpNode *op,
-            Uint32 destination,
-            void (*callback)(AsyncOpNode *, MessageQueue *, void *),
-            MessageQueue *callback_q,
-            void *callback_ptr);
+    AsyncReply* SendWait(AsyncRequest* request);
+    Boolean SendAsync(AsyncOpNodeop,
+        Uint32 destination,
+        void (*callback)(AsyncOpNode*, MessageQueue*, void*),
+        MessageQueue* callback_q,
+        void* callback_ptr);
 
     Boolean SendAsync(Message *msg,
-            Uint32 destination,
-            void (*callback)(Message *response, void *handle, void *parameter),
-            void *handle,
-            void *parameter);
+        Uint32 destination,
+        void (*callback)(Message* response, void* handle, void* parameter),
+        void* handle,
+        void* parameter);
 
-    Boolean SendForget(Message *msg);
+    Boolean SendForget(Messagemsg);
 
 
     Boolean register_service(String name, Uint32 capabilities, Uint32 mask);
@@ -99,58 +99,65 @@ public:
     Boolean deregister_service();
     virtual void _shutdown_incoming_queue();
 
-    void find_services(String name,
-            Uint32 capabilities,
-            Uint32 mask,
-            Array<Uint32> *results);
-    void enumerate_service(Uint32 queue, message_module *result);
-    static AsyncOpNode *get_op();
-    void return_op(AsyncOpNode *op);
+    void find_services(
+        String name,
+        Uint32 capabilities,
+        Uint32 mask,
+        Array<Uint32>* results);
+    void enumerate_service(Uint32 queue, message_module* result);
+    static AsyncOpNode* get_op();
+    void return_op(AsyncOpNode* op);
 
-    static ThreadPool *get_thread_pool();
+    static ThreadPoolget_thread_pool();
 
     Uint32 _mask;
     AtomicInt _die;
-       AtomicInt _threads;
-        Uint32 getIncomingCount() {return _incoming.count(); }
+    AtomicInt _threads;
+    Uint32 getIncomingCount() {return _incoming.count(); }
 
 protected:
-    virtual Boolean accept_async(AsyncOpNode *op);
-    virtual Boolean messageOK(const Message *msg);
+    virtual Boolean accept_async(AsyncOpNodeop);
+    virtual Boolean messageOK(const Messagemsg);
     virtual void handleEnqueue() = 0;
     virtual void handleEnqueue(Message *) = 0;
     Boolean _enqueueResponse(Message *, Message *);
-//      virtual void _handle_incoming_operation(AsyncOpNode *operation, Thread *thread, MessageQueue *queue);
+//  virtual void _handle_incoming_operation(
+//      AsyncOpNode* operation,
+//      Thread* thread,
+//      MessageQueue* queue);
     virtual void _handle_incoming_operation(AsyncOpNode *);
 
-    virtual void _handle_async_request(AsyncRequest *req);
-    virtual void _handle_async_callback(AsyncOpNode *operation);
-    virtual void _make_response(Message *req, Uint32 code);
-
-    virtual void handle_heartbeat_request(AsyncRequest *req);
-    virtual void handle_heartbeat_reply(AsyncReply *rep);
-
-    virtual void handle_AsyncIoctl(AsyncIoctl *req);
-    virtual void handle_CimServiceStart(CimServiceStart *req);
-    virtual void handle_CimServiceStop(CimServiceStop *req);
-    virtual void handle_CimServicePause(CimServicePause *req);
-    virtual void handle_CimServiceResume(CimServiceResume *req);
-
-    virtual void handle_AsyncOperationStart(AsyncOperationStart *req);
-    virtual void handle_AsyncOperationResult(AsyncOperationResult *rep);
-    virtual void handle_AsyncLegacyOperationStart(AsyncLegacyOperationStart *req);
-    virtual void handle_AsyncLegacyOperationResult(AsyncLegacyOperationResult *rep);
-
-    void _completeAsyncResponse(AsyncRequest *request,
-                AsyncReply *reply,
-                Uint32 state,
-                Uint32 flag);
+    virtual void _handle_async_request(AsyncRequest* req);
+    virtual void _handle_async_callback(AsyncOpNode* operation);
+    virtual void _make_response(Message* req, Uint32 code);
+
+    virtual void handle_heartbeat_request(AsyncRequest* req);
+    virtual void handle_heartbeat_reply(AsyncReply* rep);
+
+    virtual void handle_AsyncIoctl(AsyncIoctl* req);
+    virtual void handle_CimServiceStart(CimServiceStart* req);
+    virtual void handle_CimServiceStop(CimServiceStop* req);
+    virtual void handle_CimServicePause(CimServicePause* req);
+    virtual void handle_CimServiceResume(CimServiceResume* req);
+
+    virtual void handle_AsyncOperationStart(AsyncOperationStart* req);
+    virtual void handle_AsyncOperationResult(AsyncOperationResult* rep);
+    virtual void handle_AsyncLegacyOperationStart(
+        AsyncLegacyOperationStart* req);
+    virtual void handle_AsyncLegacyOperationResult(
+        AsyncLegacyOperationResult* rep);
+
+    void _completeAsyncResponse(
+        AsyncRequest* request,
+        AsyncReply* reply,
+        Uint32 state,
+        Uint32 flag);
     void _complete_op_node(AsyncOpNode *, Uint32, Uint32, Uint32);
 
-    static cimom *_meta_dispatcher;
+    static cimom_meta_dispatcher;
     static AtomicInt _service_count;
     static Mutex _meta_dispatcher_mutex;
-    static ThreadPool *_thread_pool;
+    static ThreadPool_thread_pool;
 
 private:
     static ThreadReturnType PEGASUS_THREAD_CDECL polling_routine(void *);
index b4a866a62d978048053ad7f020901418a42513b6..86fc43637d9dbf670646ebe5039ecd87c784b489 100644 (file)
@@ -61,7 +61,7 @@ const String & RegisteredModuleHandle::get_name() const
     return _name;
 }
 
-Message* RegisteredModuleHandle::_receive_message(Message *msg)
+Message* RegisteredModuleHandle::_receive_message(Messagemsg)
 {
     return _module_receive_message(msg, _module_address);
 }
@@ -81,185 +81,186 @@ void RegisteredModuleHandle::_send_async_callback(
 }
 
 
-ModuleController::ModuleController(const char *name )
-   :Base(name, MessageQueue::getNextQueueId(),
-        module_capabilities::module_controller |
-        module_capabilities::async),
-    _modules()
+ModuleController::ModuleController(const char* name)
+    : Base(name, MessageQueue::getNextQueueId(),
+           module_capabilities::module_controller |
+           module_capabilities::async),
+      _modules()
 {
 }
 
 ModuleController::~ModuleController()
 {
+    RegisteredModuleHandle* module;
 
-   RegisteredModuleHandle *module;
-
-   try
-   {
-      module = _modules.remove_front();
-      while(module)
-      {
-        delete module;
-        module = _modules.remove_front();
-      }
-
-   }
-   catch(...)
-   {
-   }
+    try
+    {
+        module = _modules.remove_front();
+        while (module)
+        {
+            delete module;
+            module = _modules.remove_front();
+        }
+    }
+    catch (...)
+    {
+    }
 }
 
 // called by a module to register itself, returns a handle to the controller
-ModuleController & ModuleController::register_module(
-    const String & controller_name,
-    const String & module_name,
-    void *module_address,
-    Message * (*receive_message)(Message *, void *),
+ModuleController& ModuleController::register_module(
+    const String& controller_name,
+    const String& module_name,
+    voidmodule_address,
+    Message* (*receive_message)(Message *, void *),
     void (*async_callback)(Uint32, Message *, void *),
     RegisteredModuleHandle** instance)
 {
-   RegisteredModuleHandle *module;
-   ModuleController *controller;
-
-   Array<Uint32> services;
-
-   MessageQueue *message_queue = MessageQueue::lookup(controller_name.getCString());
+    RegisteredModuleHandle *module;
+    ModuleController *controller;
 
-   if ((message_queue == NULL) || ( false == message_queue->isAsync() ))
-   {
-      throw IncompatibleTypesException();
-   }
+    Array<Uint32> services;
 
-   MessageQueueService *service = static_cast<MessageQueueService *>(message_queue);
-   if( (service == NULL) ||  ! ( service->get_capabilities() & module_capabilities::module_controller ))
-   {
-      throw IncompatibleTypesException();
-   }
+    MessageQueue *message_queue =
+        MessageQueue::lookup(controller_name.getCString());
 
-   controller = static_cast<ModuleController *>(service);
+    if ((message_queue == NULL) || (!message_queue->isAsync()))
+    {
+        throw IncompatibleTypesException();
+    }
 
-   {
+    MessageQueueService *service =
+        static_cast<MessageQueueService *>(message_queue);
+    if ((service == NULL) ||
+        !(service->get_capabilities() & module_capabilities::module_controller))
+    {
+        throw IncompatibleTypesException();
+    }
 
-   // see if the module already exists in this controller.
-   _module_lock lock(&(controller->_modules));
+    controller = static_cast<ModuleController *>(service);
 
-   module = controller->_modules.front();
-   while(module != NULL )
-   {
-      if(module->get_name() == module_name )
-      {
-        MessageLoaderParms parms("Common.ModuleController.MODULE",
-                                                         "module \"$0\"",
-                                                         module_name);
-        throw AlreadyExistsException(parms);
-      }
-      module = controller->_modules.next_of(module);
-   }
+    {
 
-   }
+        // see if the module already exists in this controller.
+        _module_lock lock(&(controller->_modules));
+
+        module = controller->_modules.front();
+        while (module != NULL)
+        {
+            if (module->get_name() == module_name)
+            {
+                MessageLoaderParms parms(
+                    "Common.ModuleController.MODULE",
+                    "module \"$0\"",
+                    module_name);
+                throw AlreadyExistsException(parms);
+            }
+            module = controller->_modules.next_of(module);
+        }
+    }
 
-   // now reserve this module name with the meta dispatcher
+    // now reserve this module name with the meta dispatcher
 
-   Uint32 result = 0 ;
-   AutoPtr<RegisteredModule> request(new RegisteredModule(
-                          0,
-                          true,
-                          controller->getQueueId(),
-                          module_name));
+    Uint32 result = 0;
+    AutoPtr<RegisteredModule> request(new RegisteredModule(
+        0,
+        true,
+        controller->getQueueId(),
+        module_name));
 
-   request->dest = CIMOM_Q_ID;
+    request->dest = CIMOM_Q_ID;
 
-   AutoPtr<AsyncReply> response(controller->SendWait(request.get()));
-   if( response.get() != NULL)
-      result  = response->result;
+    AutoPtr<AsyncReply> response(controller->SendWait(request.get()));
+    if (response.get() != NULL)
+        result = response->result;
 
-   request.reset();
-   response.reset();
-   if ( result == async_results::MODULE_ALREADY_REGISTERED)
-   {
-      MessageLoaderParms parms("Common.ModuleController.MODULE",
-         "module \"$0\"", module_name);
-      throw AlreadyExistsException(parms);
-   }
+    request.reset();
+    response.reset();
+    if (result == async_results::MODULE_ALREADY_REGISTERED)
+    {
+        MessageLoaderParms parms(
+            "Common.ModuleController.MODULE",
+            "module \"$0\"", module_name);
+        throw AlreadyExistsException(parms);
+    }
 
-   // the module does not exist, go ahead and create it.
-   module = new RegisteredModuleHandle(
-                              module_name,
-                              module_address,
-                              receive_message,
-                              async_callback);
+    // the module does not exist, go ahead and create it.
+    module = new RegisteredModuleHandle(
+        module_name,
+        module_address,
+        receive_message,
+        async_callback);
 
-   controller->_modules.insert_back(module);
+    controller->_modules.insert_back(module);
 
-   if(instance != NULL)
-      *instance = module;
+    if (instance != NULL)
+        *instance = module;
 
-   return *controller;
+    return *controller;
 }
 
 
-Boolean ModuleController::deregister_module(const String & module_name)
+Boolean ModuleController::deregister_module(const String& module_name)
 {
-   AutoPtr<DeRegisteredModule> request(new DeRegisteredModule(
-                            0,
-                            true,
-                            getQueueId(),
-                            module_name));
-   request->dest = _meta_dispatcher->getQueueId();
+    AutoPtr<DeRegisteredModule> request(new DeRegisteredModule(
+        0,
+        true,
+        getQueueId(),
+        module_name));
+    request->dest = _meta_dispatcher->getQueueId();
 
-   AutoPtr<AsyncReply> response(SendWait(request.get()));
+    AutoPtr<AsyncReply> response(SendWait(request.get()));
 
-   request.reset();
-   response.reset();
+    request.reset();
+    response.reset();
 
-   RegisteredModuleHandle *module;
+    RegisteredModuleHandle* module;
 
-   _module_lock lock(&_modules);
-   module = _modules.front();
-   while(module != NULL )
-   {
-      if( module->get_name() == module_name)
-      {
-        _modules.remove(module);
-        return true;
-      }
-      module = _modules.next_of(module);
-   }
-   return false;
+    _module_lock lock(&_modules);
+    module = _modules.front();
+    while (module != NULL)
+    {
+        if (module->get_name() == module_name)
+        {
+            _modules.remove(module);
+            return true;
+        }
+        module = _modules.next_of(module);
+    }
+    return false;
 }
 
-Boolean ModuleController::verify_handle(RegisteredModuleHandle *handle)
+Boolean ModuleController::verify_handle(RegisteredModuleHandlehandle)
 {
-   RegisteredModuleHandle *module;
+    RegisteredModuleHandle *module;
 
-   if (handle->_module_address == (void *)this)
-      return true;
+    if (handle->_module_address == (void *)this)
+        return true;
 
-   _module_lock lock(&_modules);
+    _module_lock lock(&_modules);
 
-   module = _modules.front();
-   while(module != NULL)
-   {
-      if ( module == handle)
-      {
-        return true;
-      }
-      module = _modules.next_of(module);
-   }
-   return false;
+    module = _modules.front();
+    while (module != NULL)
+    {
+        if ( module == handle)
+        {
+            return true;
+        }
+        module = _modules.next_of(module);
+    }
+    return false;
 }
 
 // given a name, find a service's queue id
 Uint32 ModuleController::find_service(
-    const RegisteredModuleHandle & handle,
-    const String & name)
+    const RegisteredModuleHandle& handle,
+    const String& name)
 {
-
-   if (false == verify_handle(const_cast<RegisteredModuleHandle *>(&handle)))
-      throw Permission(Threads::self());
-   Array<Uint32> services;
-   Base::find_services(name, 0, 0, &services);
-   return( services[0]);
+    if (false == verify_handle(const_cast<RegisteredModuleHandle *>(&handle)))
+        throw Permission(Threads::self());
+    Array<Uint32> services;
+    Base::find_services(name, 0, 0, &services);
+    return services[0];
 }
 
 
@@ -267,413 +268,417 @@ Uint32 ModuleController::find_service(
 // zero otherwise
 
 Uint32 ModuleController::find_module_in_service(
-    const RegisteredModuleHandle & handle,
-    const String & name)
+    const RegisteredModuleHandle& handle,
+    const String& name)
 {
-   if (false == verify_handle(const_cast<RegisteredModuleHandle *>(&handle)))
-      throw(Permission(Threads::self()));
+    if (false == verify_handle(const_cast<RegisteredModuleHandle *>(&handle)))
+        throw(Permission(Threads::self()));
 
-   Uint32 result = 0 ;
+    Uint32 result = 0;
 
-   AutoPtr<FindModuleInService> request(new FindModuleInService(
-                             0,
-                             true,
-                             _meta_dispatcher->getQueueId(),
-                             name));
-   request->dest = _meta_dispatcher->getQueueId();
-   AutoPtr<FindModuleInServiceResponse>
-       response(static_cast<FindModuleInServiceResponse *>(SendWait(request.get())));
-   if( response.get() != NULL)
-      result = response->_module_service_queue;
+    AutoPtr<FindModuleInService> request(new FindModuleInService(
+        0,
+        true,
+        _meta_dispatcher->getQueueId(),
+        name));
+    request->dest = _meta_dispatcher->getQueueId();
+    AutoPtr<FindModuleInServiceResponse> response(
+        static_cast<FindModuleInServiceResponse *>(SendWait(request.get())));
+    if (response.get() != NULL)
+        result = response->_module_service_queue;
 
-   return result;
+    return result;
 }
 
 
-AsyncReply *ModuleController::_send_wait(Uint32 destination_q,
-                                        AsyncRequest *request)
+AsyncReply* ModuleController::_send_wait(
+    Uint32 destination_q,
+    AsyncRequest* request)
 {
-   request->dest = destination_q;
-   AsyncReply *reply = Base::SendWait(request);
-   return reply;
+    request->dest = destination_q;
+    AsyncReply* reply = Base::SendWait(request);
+    return reply;
 }
 
 
 // sendwait to another service
-AsyncReply * ModuleController::ModuleSendWait(
-    const RegisteredModuleHandle & handle,
+AsyncReply* ModuleController::ModuleSendWait(
+    const RegisteredModuleHandle& handle,
     Uint32 destination_q,
-    AsyncRequest *request)
+    AsyncRequestrequest)
 {
-   if (false == verify_handle(const_cast<RegisteredModuleHandle *>(&handle)))
-      throw(Permission(Threads::self()));
+    if (false == verify_handle(const_cast<RegisteredModuleHandle *>(&handle)))
+        throw(Permission(Threads::self()));
 
-   return _send_wait(destination_q, request);
+    return _send_wait(destination_q, request);
 }
 
-AsyncReply *ModuleController::_send_wait(Uint32 destination_q,
-                                        const String & destination_module,
-                                        AsyncRequest *message)
+AsyncReply* ModuleController::_send_wait(
+    Uint32 destination_q,
+    const String& destination_module,
+    AsyncRequest* message)
 {
-   AutoPtr<AsyncModuleOperationStart> request(new AsyncModuleOperationStart(
-                                   0,
-                                   destination_q,
-                                   getQueueId(),
-                                   true,
-                                   destination_module,
-                                   message));
+    AutoPtr<AsyncModuleOperationStart> request(new AsyncModuleOperationStart(
+        0,
+        destination_q,
+        getQueueId(),
+        true,
+        destination_module,
+        message));
 
-   request->dest = destination_q;
-   AutoPtr<AsyncModuleOperationResult>
-      response(static_cast<AsyncModuleOperationResult *>(SendWait(request.get())));
+    request->dest = destination_q;
+    AutoPtr<AsyncModuleOperationResult> response(
+        static_cast<AsyncModuleOperationResult *>(SendWait(request.get())));
 
-   AsyncReply *ret = 0;
+    AsyncReply *ret = 0;
 
-   if (response.get() != NULL && response->getType() == async_messages::ASYNC_MODULE_OP_RESULT )
-   {
-      ret = static_cast<AsyncReply *>(response->get_result());
-      //clear the request out of the envelope so it can be deleted by the module
-   }
-   request->get_action();
-   return ret;
+    if (response.get() != NULL &&
+        response->getType() == async_messages::ASYNC_MODULE_OP_RESULT)
+    {
+        // clear the request out of the envelope so it can be deleted by the
+        // module
+        ret = static_cast<AsyncReply *>(response->get_result());
+    }
+    request->get_action();
+    return ret;
 }
 
 
 // sendwait to another module controlled by another service.
 // throws Deadlock() if destination_q is this->queue_id
-AsyncReply * ModuleController::ModuleSendWait(
-    const RegisteredModuleHandle & handle,
+AsyncReply* ModuleController::ModuleSendWait(
+    const RegisteredModuleHandle& handle,
     Uint32 destination_q,
-    const String & destination_module,
-    AsyncRequest *message)
+    const String& destination_module,
+    AsyncRequestmessage)
 {
-   if (false == verify_handle(const_cast<RegisteredModuleHandle *>(&handle)))
-      throw(Permission(Threads::self()));
+    if (false == verify_handle(const_cast<RegisteredModuleHandle *>(&handle)))
+        throw(Permission(Threads::self()));
 
-   return _send_wait(destination_q, destination_module, message);
+    return _send_wait(destination_q, destination_module, message);
 }
 
-void ModuleController::_async_handleEnqueue(AsyncOpNode *op,
-                                           MessageQueue *q,
-                                           void *parm)
+void ModuleController::_async_handleEnqueue(
+    AsyncOpNode* op,
+    MessageQueue* q,
+    void* parm)
 {
+    ModuleController* myself = static_cast<ModuleController *>(q);
+    Message* request = op->removeRequest();
+    Message* response = op->removeResponse();
 
-   ModuleController *myself = static_cast<ModuleController *>(q);
-   Message *request = op->removeRequest();
-   Message *response = op->removeResponse();
-
-   if( request && (! (request->getMask() & MessageMask::ha_async)))
-      throw TypeMismatchException();
-
-   if( response && (! (response->getMask() & MessageMask::ha_async) ))
-      throw TypeMismatchException();
+    if (request && (!(request->getMask() & MessageMask::ha_async)))
+        throw TypeMismatchException();
 
-   op->release();
-   myself->return_op(op);
+    if (response && (!(response->getMask() & MessageMask::ha_async)))
+        throw TypeMismatchException();
 
-   // get rid of the module wrapper
-   if( request && request->getType() == async_messages::ASYNC_MODULE_OP_START )
-   {
-      (static_cast<AsyncMessage *>(request))->op = NULL;
-      AsyncModuleOperationStart *rq = static_cast<AsyncModuleOperationStart *>(request);
-      request = rq->get_action();
-      delete rq;
-   }
+    op->release();
+    myself->return_op(op);
 
-   // get rid of the module wrapper
-   if(response && response->getType() == async_messages::ASYNC_MODULE_OP_RESULT )
-   {
-      (static_cast<AsyncMessage *>(response))->op = NULL;
-      AsyncModuleOperationResult *rp = static_cast<AsyncModuleOperationResult *>(response);
-      response = rp->get_result();
-      delete rp;
-   }
+    // get rid of the module wrapper
+    if (request && request->getType() == async_messages::ASYNC_MODULE_OP_START)
+    {
+        (static_cast<AsyncMessage *>(request))->op = NULL;
+        AsyncModuleOperationStart *rq =
+            static_cast<AsyncModuleOperationStart *>(request);
+        request = rq->get_action();
+        delete rq;
+    }
 
-   callback_handle *cb = reinterpret_cast<callback_handle *>(parm);
+    // get rid of the module wrapper
+    if (response &&
+        response->getType() == async_messages::ASYNC_MODULE_OP_RESULT)
+    {
+        (static_cast<AsyncMessage *>(response))->op = NULL;
+        AsyncModuleOperationResult *rp =
+            static_cast<AsyncModuleOperationResult *>(response);
+        response = rp->get_result();
+        delete rp;
+    }
 
-   cb->_module->_send_async_callback(0, response, cb->_parm);
-   delete cb;
+    callback_handle *cb = reinterpret_cast<callback_handle *>(parm);
 
-   return;
+    cb->_module->_send_async_callback(0, response, cb->_parm);
+    delete cb;
 }
 
 
 // send an async message to a service asynchronously
 Boolean ModuleController::ModuleSendAsync(
-    const RegisteredModuleHandle & handle,
+    const RegisteredModuleHandle& handle,
     Uint32 msg_handle,
     Uint32 destination_q,
-    AsyncRequest *message,
-    void *callback_parm)
+    AsyncRequestmessage,
+    voidcallback_parm)
 {
-   //printf("verifying handle %p, controller at %p \n", &handle, this);
+    if (false == verify_handle(const_cast<RegisteredModuleHandle *>(&handle)))
+        throw(Permission(Threads::self()));
 
-   if (false == verify_handle(const_cast<RegisteredModuleHandle *>(&handle)))
-      throw(Permission(Threads::self()));
-
-   if (message->op == NULL)
-   {
-      message->op = get_op();
-      message->op->setRequest(message);
-   }
+    if (message->op == NULL)
+    {
+        message->op = get_op();
+        message->op->setRequest(message);
+    }
 
 
-   callback_handle *cb = new callback_handle(
-       const_cast<RegisteredModuleHandle *>(&handle),
-       callback_parm);
+    callback_handle *cb = new callback_handle(
+        const_cast<RegisteredModuleHandle *>(&handle),
+        callback_parm);
 
-   message->resp = getQueueId();
-   message->block = false;
-   message->dest = destination_q;
-   return SendAsync(message->op,
-                   destination_q,
-                   _async_handleEnqueue,
-                   this,
-                   cb);
+    message->resp = getQueueId();
+    message->block = false;
+    message->dest = destination_q;
+    return SendAsync(
+        message->op,
+        destination_q,
+        _async_handleEnqueue,
+        this,
+        cb);
 }
 
 // send a message to a module within another service asynchronously
-Boolean ModuleController::ModuleSendAsync(const RegisteredModuleHandle& handle,
-                                         Uint32 msg_handle,
-                                         Uint32 destination_q,
-                                         const String & destination_module,
-                                         AsyncRequest *message,
-                                         void *callback_parm)
-{
-
-   if (false == verify_handle(const_cast<RegisteredModuleHandle *>(&handle)))
-      throw(Permission(Threads::self()));
-
-   AsyncOpNode *op = get_op();
-   AsyncModuleOperationStart *request =
-      new AsyncModuleOperationStart(
-                                   op,
-                                   destination_q,
-                                   getQueueId(),
-                                   true,
-                                   destination_module,
-                                   message);
-   request->dest = destination_q;
-   callback_handle *cb = new callback_handle(
-       const_cast<RegisteredModuleHandle *>(&handle),
-       callback_parm);
-   return SendAsync(op,
-                   destination_q,
-                   _async_handleEnqueue,
-                   this,
-                   cb);
-}
-
-
-Boolean ModuleController::_send_forget(Uint32 destination_q, AsyncRequest *message)
+Boolean ModuleController::ModuleSendAsync(
+    const RegisteredModuleHandle& handle,
+    Uint32 msg_handle,
+    Uint32 destination_q,
+    const String& destination_module,
+    AsyncRequest* message,
+    void* callback_parm)
+{
+    if (false == verify_handle(const_cast<RegisteredModuleHandle *>(&handle)))
+        throw(Permission(Threads::self()));
+
+    AsyncOpNode *op = get_op();
+    AsyncModuleOperationStart *request = new AsyncModuleOperationStart(
+        op,
+        destination_q,
+        getQueueId(),
+        true,
+        destination_module,
+        message);
+    request->dest = destination_q;
+    callback_handle* cb = new callback_handle(
+        const_cast<RegisteredModuleHandle *>(&handle),
+        callback_parm);
+    return SendAsync(
+        op,
+        destination_q,
+        _async_handleEnqueue,
+        this,
+        cb);
+}
+
+
+Boolean ModuleController::_send_forget(
+    Uint32 destination_q,
+    AsyncRequest *message)
 {
-   message->dest = destination_q;
-   return SendForget(message);
+    message->dest = destination_q;
+    return SendForget(message);
 }
 
-Boolean ModuleController::_send_forget(Uint32 destination_q,
-                                      const String & destination_module,
-                                      AsyncRequest *message)
+Boolean ModuleController::_send_forget(
+    Uint32 destination_q,
+    const String& destination_module,
+    AsyncRequest* message)
 {
-   AsyncOpNode *op = get_op();
-   message->dest = destination_q;
-   AsyncModuleOperationStart *request =
-      new AsyncModuleOperationStart(
-                                   op,
-                                   destination_q,
-                                   getQueueId(),
-                                   true,
-                                   destination_module,
-                                   message);
-   return SendForget(request);
+    AsyncOpNode* op = get_op();
+    message->dest = destination_q;
+    AsyncModuleOperationStart* request = new AsyncModuleOperationStart(
+        op,
+        destination_q,
+        getQueueId(),
+        true,
+        destination_module,
+        message);
+    return SendForget(request);
 }
 
 
-
 Boolean ModuleController::ModuleSendForget(
-    const RegisteredModuleHandle & handle,
+    const RegisteredModuleHandle& handle,
     Uint32 destination_q,
-    AsyncRequest *message)
+    AsyncRequestmessage)
 {
-   if (false == verify_handle(const_cast<RegisteredModuleHandle *>(&handle)))
-      throw(Permission(Threads::self()));
+    if (false == verify_handle(const_cast<RegisteredModuleHandle *>(&handle)))
+        throw(Permission(Threads::self()));
 
-   return _send_forget(destination_q, message);
+    return _send_forget(destination_q, message);
 }
 
 Boolean ModuleController::ModuleSendForget(
-    const RegisteredModuleHandle & handle,
+    const RegisteredModuleHandle& handle,
     Uint32 destination_q,
-    const String & destination_module,
-    AsyncRequest *message)
+    const String& destination_module,
+    AsyncRequest* message)
+{
+    if (false == verify_handle(const_cast<RegisteredModuleHandle *>(&handle)))
+        throw(Permission(Threads::self()));
+    return _send_forget(destination_q, destination_module, message);
+}
+
+
+void ModuleController::_handle_async_request(AsyncRequest* rq)
 {
-   if (false == verify_handle(const_cast<RegisteredModuleHandle *>(&handle)))
-      throw(Permission(Threads::self()));
-   return _send_forget(destination_q,
-                      destination_module,
-                      message);
-}
-
-
-void ModuleController::_handle_async_request(AsyncRequest *rq)
-{
-
-   if( rq->getType() == async_messages::ASYNC_MODULE_OP_START)
-   {
-      // find the target module
-      RegisteredModuleHandle *target;
-      Message *module_result = NULL;
-
-      {
-        _module_lock lock(&_modules);
-        target = _modules.front();
-        while(target != NULL)
-        {
-           if(target->get_name() == static_cast<AsyncModuleOperationStart *>(rq)->_target_module)
-           {
-              break;
-           }
-
-           target = _modules.next_of(target);
-        }
-      }
-
-      if (target)
-      {
-          // ATTN: This statement was taken out of the _module_lock block
-          // above because that caused all requests to control providers to
-          // be serialized.  There is now a risk that the control provider
-          // module may be deleted after the lookup and before this call.
-          // See Bugzilla 3120.
-          module_result = target->_receive_message(
-              static_cast<AsyncModuleOperationStart *>(rq)->_act);
-      }
-
-      if(module_result == NULL)
-      {
-        module_result = new AsyncReply(async_messages::REPLY,
-                                       MessageMask::ha_async | MessageMask::ha_reply,
-                                       rq->op,
-                                       async_results::CIM_NAK,
-                                       rq->resp,
-                                       false);
-      }
-
-      AsyncModuleOperationResult *result =
-        new AsyncModuleOperationResult(
-                                       rq->op,
-                                       async_results::OK,
-                                       static_cast<AsyncModuleOperationStart *>(rq)->resp,
-                                       false,
-                                       static_cast<AsyncModuleOperationStart *>(rq)->_target_module,
-                                       module_result);
-      _complete_op_node(rq->op, 0, 0, 0);
-   }
-   else
-      Base::_handle_async_request(rq);
-}
-
-void ModuleController::_handle_async_callback(AsyncOpNode *op)
-{
-   Base::_handle_async_callback(op);
+    if (rq->getType() == async_messages::ASYNC_MODULE_OP_START)
+    {
+        // find the target module
+        RegisteredModuleHandle* target;
+        Message* module_result = NULL;
+
+        {
+            _module_lock lock(&_modules);
+            target = _modules.front();
+            while (target != NULL)
+            {
+                if (target->get_name() ==
+                        static_cast<AsyncModuleOperationStart *>(rq)->
+                            _target_module)
+                {
+                    break;
+                }
+
+                target = _modules.next_of(target);
+            }
+        }
+
+        if (target)
+        {
+            // ATTN: This statement was taken out of the _module_lock block
+            // above because that caused all requests to control providers to
+            // be serialized.  There is now a risk that the control provider
+            // module may be deleted after the lookup and before this call.
+            // See Bugzilla 3120.
+            module_result = target->_receive_message(
+                static_cast<AsyncModuleOperationStart *>(rq)->_act);
+        }
+
+        if (module_result == NULL)
+        {
+            module_result = new AsyncReply(
+                async_messages::REPLY,
+                MessageMask::ha_async | MessageMask::ha_reply,
+                rq->op,
+                async_results::CIM_NAK,
+                rq->resp,
+                false);
+        }
+
+        AsyncModuleOperationResult *result = new AsyncModuleOperationResult(
+            rq->op,
+            async_results::OK,
+            static_cast<AsyncModuleOperationStart *>(rq)->resp,
+            false,
+            static_cast<AsyncModuleOperationStart *>(rq)->_target_module,
+            module_result);
+        _complete_op_node(rq->op, 0, 0, 0);
+    }
+    else
+        Base::_handle_async_request(rq);
+}
 
+void ModuleController::_handle_async_callback(AsyncOpNode* op)
+{
+    Base::_handle_async_callback(op);
 }
 
 ModuleController* ModuleController::getModuleController()
 {
-   MessageQueue *messageQueue =
-      MessageQueue::lookup(PEGASUS_QUEUENAME_CONTROLSERVICE);
-   PEGASUS_ASSERT(messageQueue != 0);
-   PEGASUS_ASSERT(messageQueue->isAsync());
+    MessageQueue* messageQueue =
+        MessageQueue::lookup(PEGASUS_QUEUENAME_CONTROLSERVICE);
+    PEGASUS_ASSERT(messageQueue != 0);
+    PEGASUS_ASSERT(messageQueue->isAsync());
 
-   MessageQueueService* service =
-      dynamic_cast<MessageQueueService*>(messageQueue);
-   PEGASUS_ASSERT(service != 0);
-   PEGASUS_ASSERT(
-      service->get_capabilities() & module_capabilities::module_controller);
+    MessageQueueService* service =
+        dynamic_cast<MessageQueueService*>(messageQueue);
+    PEGASUS_ASSERT(service != 0);
+    PEGASUS_ASSERT(
+        service->get_capabilities() & module_capabilities::module_controller);
 
-   return static_cast<ModuleController*>(service);
+    return static_cast<ModuleController*>(service);
 }
 
 
 // send a message to another service
-AsyncReply *ModuleController::ClientSendWait(
-                                            Uint32 destination_q,
-                                            AsyncRequest *request)
+AsyncReplyModuleController::ClientSendWait(
+    Uint32 destination_q,
+    AsyncRequest* request)
 {
-   return _send_wait(destination_q, request);
+    return _send_wait(destination_q, request);
 }
 
 
 // send a message to another module via another service
 AsyncReply *ModuleController::ClientSendWait(
-                                            Uint32 destination_q,
-                                            String & destination_module,
-                                            AsyncRequest *request)
+    Uint32 destination_q,
+    String& destination_module,
+    AsyncRequest* request)
 {
-   return _send_wait(destination_q, destination_module, request);
+    return _send_wait(destination_q, destination_module, request);
 }
 
 
 // send an async message to another service
 Boolean ModuleController::ClientSendAsync(
-                                         Uint32 msg_handle,
-                                         Uint32 destination_q,
-                                         AsyncRequest *message,
-                                         void (*async_callback)(Uint32, Message *, void *) ,
-                                         void *callback_parm)
+    Uint32 msg_handle,
+    Uint32 destination_q,
+    AsyncRequest* message,
+    void (*async_callback)(Uint32, Message *, void *),
+    void* callback_parm)
 {
-   RegisteredModuleHandle *temp = new RegisteredModuleHandle(
-                                            String(PEGASUS_MODULENAME_TEMP),
-                                            this,
-                                            0,
-                                            async_callback);
-   return ModuleSendAsync( *temp,
-                          msg_handle,
-                          destination_q,
-                          message,
-                          callback_parm);
+    RegisteredModuleHandle* temp = new RegisteredModuleHandle(
+        String(PEGASUS_MODULENAME_TEMP),
+        this,
+        0,
+        async_callback);
+   return ModuleSendAsync(
+        *temp,
+        msg_handle,
+        destination_q,
+        message,
+        callback_parm);
 }
 
 
 // send an async message to another module via another service
 Boolean ModuleController::ClientSendAsync(
-                                         Uint32 msg_handle,
-                                         Uint32 destination_q,
-                                         const String & destination_module,
-                                         AsyncRequest *message,
-                                         void (*async_callback)(Uint32, Message *, void *),
-                                         void *callback_parm)
+    Uint32 msg_handle,
+    Uint32 destination_q,
+    const String& destination_module,
+    AsyncRequest* message,
+    void (*async_callback)(Uint32, Message *, void *),
+    void* callback_parm)
 {
-   RegisteredModuleHandle *temp = new RegisteredModuleHandle(
-                                            String(PEGASUS_MODULENAME_TEMP),
-                                            this,
-                                            0,
-                                            async_callback);
-   return ModuleSendAsync(*temp,
-                         msg_handle,
-                         destination_q,
-                         destination_module,
-                         message,
-                         callback_parm);
+    RegisteredModuleHandle* temp = new RegisteredModuleHandle(
+        String(PEGASUS_MODULENAME_TEMP),
+        this,
+        0,
+        async_callback);
+   return ModuleSendAsync(
+        *temp,
+        msg_handle,
+        destination_q,
+        destination_module,
+        message,
+        callback_parm);
 }
 
 
-
 Boolean ModuleController::ClientSendForget(
-                                          Uint32 destination_q,
-                                          AsyncRequest *message)
+    Uint32 destination_q,
+    AsyncRequest* message)
 {
-   return _send_forget(destination_q, message);
+    return _send_forget(destination_q, message);
 }
 
 
 Boolean ModuleController::ClientSendForget(
-                                          Uint32 destination_q,
-                                          const String & destination_module,
-                                          AsyncRequest *message)
+    Uint32 destination_q,
+    const String& destination_module,
+    AsyncRequest* message)
 {
-   return _send_forget(destination_q, destination_module, message);
+    return _send_forget(destination_q, destination_module, message);
 }
 
 PEGASUS_NAMESPACE_END
index f38b40caed058b294eeb22eef029515d3b1c2f8d..b131e957f8bb669488fde70e3348657e349d0d40 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Day (mdday@us.ibm.com) <<< Wed Mar 13 20:49:40 2002 mdd >>>
-//
-// Modified By: Amit K Arora, IBM (amita@in.ibm.com)
-//              David Dillard, VERITAS Software Corp.
-//                  (david.dillard@veritas.com)
-//              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_ModuleController_h
@@ -63,7 +56,7 @@ public:
 
     virtual ~RegisteredModuleHandle();
 
-    const String & get_name() const;
+    const String& get_name() const;
 
 private:
 
@@ -98,12 +91,12 @@ public:
 
         ~callback_handle()
         {
-            if( _module->get_name() == String(PEGASUS_MODULENAME_TEMP) )
+            if (_module->get_name() == String(PEGASUS_MODULENAME_TEMP))
                 _module.reset();
         }
 
         AutoPtr<RegisteredModuleHandle> _module;
-        void *_parm;
+        void_parm;
     };
 
 public:
@@ -273,8 +266,11 @@ private:
     };
 
 
+    static void _async_handleEnqueue(
+        AsyncOpNode* h,
+        MessageQueue* q,
+        void* parm);
 
-    static void _async_handleEnqueue(AsyncOpNode *h, MessageQueue *q, void *parm);
     List<RegisteredModuleHandle, Mutex> _modules;
     AsyncReply *_send_wait(Uint32, AsyncRequest *);
     AsyncReply *_send_wait(Uint32, const String &, AsyncRequest *);
index 41fcd091efe80643c85e1c54134d7ff4444b8d1b..ee93f3d826980f6ecc230f31ac5bbf93c3cbe7bc 100644 (file)
 //
 //==============================================================================
 //
-// Author: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//
-// Modified By: Carol Ann Krug Graves, Hewlett-Packard Company
-//                  (carolann_graves@hp.com)
-//              Dave Sudlik, IBM (dsudlik@us.ibm.com)
-//              David Dillard, VERITAS Software Corp.
-//                  (david.dillard@veritas.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include <Pegasus/Common/Config.h>
@@ -696,7 +688,7 @@ void MofWriter::appendQualifierDeclElement(
 //     TRANSLATABLE      = "translatable"
 //    </pre>
 //
-//    The keyword toinstance is not in the CIM specification. For the moment 
+//    The keyword toinstance is not in the CIM specification. For the moment
 //    we are assuming that it is the same as the toSubclass. We had a choice
 //    of using one entity for both or separating them and letting the
 //    compiler set both.
index 996065b01d0c5d802957319c1b6de2faf7f15378..d155b60928999ef37f2f95a2772af2b270f3ce39 100644 (file)
 //
 //==============================================================================
 //
-// Author: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//
-// Modified By: Carol Ann Krug Graves, Hewlett-Packard Company
-//                (carolann_graves@hp.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_MofWriter_h
index d357cfba6da4495139155fb240052b4d237a851f..08de5643dca36b7f471666ad1fb56a552ea724a5 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By: Mike Day (monitor_2) mdday@us.ibm.com
-//              Amit K Arora (Bug#1153) amita@in.ibm.com
-//              Alagaraja Ramasubramanian (alags_raj@in.ibm.com) for Bug#1090
-//              Sushma Fernandes (sushma@hp.com) for Bug#2057
-//              Josephine Eskaline Joyce (jojustin@in.ibm.com) for PEP#101
-//              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include "Network.h"
@@ -84,7 +75,7 @@ Monitor::Monitor()
     // Start the count at 1 because initilizeTickler()
     // has added an entry in the first position of the
     // _entries array
-    for( int i = 1; i < numberOfMonitorEntriesToAllocate; i++ )
+    for (int i = 1; i < numberOfMonitorEntriesToAllocate; i++)
     {
        _MonitorEntry entry(0, 0, 0);
        _entries.append(entry);
@@ -98,25 +89,26 @@ Monitor::~Monitor()
     Tracer::trace(TRC_HTTP, Tracer::LEVEL4,
                   "returning from monitor destructor");
 }
-void Monitor::uninitializeTickler(){
-
+void Monitor::uninitializeTickler()
+{
     Tracer::trace(TRC_HTTP, Tracer::LEVEL4, "uninitializing interface");
 
-    try{
-        if(_tickle_peer_socket >= 0)
+    try
+    {
+        if (_tickle_peer_socket >= 0)
         {
             Socket::close(_tickle_peer_socket);
         }
-        if(_tickle_client_socket >= 0)
+        if (_tickle_client_socket >= 0)
         {
             Socket::close(_tickle_client_socket);
         }
-        if(_tickle_server_socket >= 0)
+        if (_tickle_server_socket >= 0)
         {
             Socket::close(_tickle_server_socket);
         }
     }
-    catch(...)
+    catch (...)
     {
         Tracer::trace(TRC_HTTP, Tracer::LEVEL4,
                   "Failed to close tickle sockets");
@@ -124,7 +116,8 @@ void Monitor::uninitializeTickler(){
 
 }
 
-void Monitor::initializeTickler(){
+void Monitor::initializeTickler()
+{
     /*
        NOTE: On any errors trying to
              setup out tickle connection,
@@ -132,17 +125,18 @@ void Monitor::initializeTickler(){
     */
 
     /* setup the tickle server/listener */
-    // try until the tcpip is restarted 
+    // try until the tcpip is restarted
     do
     {
-
         // get a socket for the server side
-        if((_tickle_server_socket = Socket::createSocket(PF_INET, SOCK_STREAM, 0)) == PEGASUS_INVALID_SOCKET)
+        if ((_tickle_server_socket =
+                 Socket::createSocket(PF_INET, SOCK_STREAM, 0)) ==
+             PEGASUS_INVALID_SOCKET)
         {
-            //handle error
-            MessageLoaderParms parms("Common.Monitor.TICKLE_CREATE",
-                                     "Received error number $0 while creating the internal socket.",
-                                     getSocketError());
+            MessageLoaderParms parms(
+                "Common.Monitor.TICKLE_CREATE",
+                "Received error number $0 while creating the internal socket.",
+                getSocketError());
             throw Exception(parms);
         }
 
@@ -161,92 +155,100 @@ void Monitor::initializeTickler(){
         SocketLength _addr_size = sizeof(_tickle_server_addr);
 
         // bind server side to socket
-        if((::bind(_tickle_server_socket,
-                   reinterpret_cast<struct sockaddr*>(&_tickle_server_addr),
-                   sizeof(_tickle_server_addr))) < 0)
+        if ((::bind(_tickle_server_socket,
+                 reinterpret_cast<struct sockaddr*>(&_tickle_server_addr),
+                 sizeof(_tickle_server_addr))) < 0)
         {
-            // handle error
 #ifdef PEGASUS_OS_ZOS
-            MessageLoaderParms parms("Common.Monitor.TICKLE_BIND_LONG",
-                                "Received error:$0 while binding the internal socket."
-                                ,strerror(errno));
+            MessageLoaderParms parms(
+                "Common.Monitor.TICKLE_BIND_LONG",
+                "Received error:$0 while binding the internal socket.",
+                strerror(errno));
 #else
-            MessageLoaderParms parms("Common.Monitor.TICKLE_BIND",
-                                "Received error number $0 while binding the internal socket.",
-                                getSocketError());
+            MessageLoaderParms parms(
+                "Common.Monitor.TICKLE_BIND",
+                "Received error number $0 while binding the internal socket.",
+                getSocketError());
 #endif
             throw Exception(parms);
         }
 
         // tell the kernel we are a server
-        if((::listen(_tickle_server_socket,3)) < 0)
+        if ((::listen(_tickle_server_socket, 3)) < 0)
         {
-            // handle error
-            MessageLoaderParms parms("Common.Monitor.TICKLE_LISTEN",
-                                "Received error number $0 while listening to the internal socket.",
-                                getSocketError());
+            MessageLoaderParms parms(
+                "Common.Monitor.TICKLE_LISTEN",
+                "Received error number $0 while listening to the internal "
+                    "socket.",
+                getSocketError());
             throw Exception(parms);
         }
 
         // make sure we have the correct socket for our server
-        int sock = ::getsockname(_tickle_server_socket,
-                            reinterpret_cast<struct sockaddr*>(&_tickle_server_addr),
-                            &_addr_size);
-        if(sock < 0)
+        int sock = ::getsockname(
+            _tickle_server_socket,
+            reinterpret_cast<struct sockaddr*>(&_tickle_server_addr),
+            &_addr_size);
+        if (sock < 0)
         {
-            // handle error
-            MessageLoaderParms parms("Common.Monitor.TICKLE_SOCKNAME",
-                                "Received error number $0 while getting the internal socket name.",
-                                getSocketError());
+            MessageLoaderParms parms(
+                "Common.Monitor.TICKLE_SOCKNAME",
+                "Received error number $0 while getting the internal socket "
+                    "name.",
+                getSocketError());
             throw Exception(parms);
         }
 
         /* set up the tickle client/connector */
 
         // get a socket for our tickle client
-        if((_tickle_client_socket = Socket::createSocket(PF_INET, SOCK_STREAM, 0))
-           == PEGASUS_INVALID_SOCKET)
+        if ((_tickle_client_socket =
+                 Socket::createSocket(PF_INET, SOCK_STREAM, 0)) ==
+            PEGASUS_INVALID_SOCKET)
         {
-            // handle error
-            MessageLoaderParms parms("Common.Monitor.TICKLE_CLIENT_CREATE",
-                                "Received error number $0 while creating the internal client socket.",
-                                getSocketError());
+            MessageLoaderParms parms(
+                "Common.Monitor.TICKLE_CLIENT_CREATE",
+                "Received error number $0 while creating the internal client "
+                    "socket.",
+                getSocketError());
             throw Exception(parms);
         }
 
         // setup the address of the client
         memset(&_tickle_client_addr, 0, sizeof(_tickle_client_addr));
 #ifdef PEGASUS_PLATFORM_OS400_ISERIES_IBM
-#pragma convert(37)
+# pragma convert(37)
 #endif
         _tickle_client_addr.sin_addr.s_addr = inet_addr("127.0.0.1");
 #ifdef PEGASUS_PLATFORM_OS400_ISERIES_IBM
-#pragma convert(0)
+# pragma convert(0)
 #endif
         _tickle_client_addr.sin_family = PF_INET;
         _tickle_client_addr.sin_port = 0;
 
         // bind socket to client side
-        if((::bind(_tickle_client_socket,
-                   reinterpret_cast<struct sockaddr*>(&_tickle_client_addr),
-                   sizeof(_tickle_client_addr))) < 0)
+        if ((::bind(_tickle_client_socket,
+                 reinterpret_cast<struct sockaddr*>(&_tickle_client_addr),
+                 sizeof(_tickle_client_addr))) < 0)
         {
-            // handle error
-            MessageLoaderParms parms("Common.Monitor.TICKLE_CLIENT_BIND",
-                                     "Received error number $0 while binding the internal client socket.",
-                                     getSocketError());
+            MessageLoaderParms parms(
+                "Common.Monitor.TICKLE_CLIENT_BIND",
+                "Received error number $0 while binding the internal client "
+                    "socket.",
+                getSocketError());
             throw Exception(parms);
         }
 
         // connect to server side
-        if((::connect(_tickle_client_socket,
-                      reinterpret_cast<struct sockaddr*>(&_tickle_server_addr),
-                      sizeof(_tickle_server_addr))) < 0)
+        if ((::connect(_tickle_client_socket,
+                 reinterpret_cast<struct sockaddr*>(&_tickle_server_addr),
+                 sizeof(_tickle_server_addr))) < 0)
         {
-            // handle error
-            MessageLoaderParms parms("Common.Monitor.TICKLE_CLIENT_CONNECT",
-                                     "Received error number $0 while connecting the internal client socket.",
-                                     getSocketError());
+            MessageLoaderParms parms(
+                "Common.Monitor.TICKLE_CLIENT_CONNECT",
+                "Received error number $0 while connecting the internal "
+                    "client socket.",
+                getSocketError());
             throw Exception(parms);
         }
 
@@ -255,29 +257,31 @@ void Monitor::initializeTickler(){
         SocketLength peer_size = sizeof(_tickle_peer_addr);
         Threads::sleep(1);
 
-        // this call may fail, we will try a max of 20 times to establish this peer connection
-        if((_tickle_peer_socket = ::accept(_tickle_server_socket,
-                                           reinterpret_cast<struct sockaddr*>(&_tickle_peer_addr),
-                                           &peer_size)) < 0)
+        // this call may fail, we will try a max of 20 times to establish
+        // this peer connection
+        if ((_tickle_peer_socket = ::accept(_tickle_server_socket,
+                 reinterpret_cast<struct sockaddr*>(&_tickle_peer_addr),
+                 &peer_size)) < 0)
         {
-            if(_tickle_peer_socket == PEGASUS_SOCKET_ERROR 
-               && getSocketError() == PEGASUS_NETWORK_TRYAGAIN)
+            if (_tickle_peer_socket == PEGASUS_SOCKET_ERROR &&
+                getSocketError() == PEGASUS_NETWORK_TRYAGAIN)
             {
                 int retries = 0;
                 do
                 {
                     Threads::sleep(1);
-                    _tickle_peer_socket = ::accept(_tickle_server_socket,
-                                                   reinterpret_cast<struct sockaddr*>(&_tickle_peer_addr),
-                                                   &peer_size);
+                    _tickle_peer_socket = ::accept(
+                        _tickle_server_socket,
+                        reinterpret_cast<struct sockaddr*>(&_tickle_peer_addr),
+                        &peer_size);
                     retries++;
-                } while(_tickle_peer_socket == PEGASUS_SOCKET_ERROR 
-                        && getSocketError() == PEGASUS_NETWORK_TRYAGAIN 
-                        && retries < 20);
+                } while (_tickle_peer_socket == PEGASUS_SOCKET_ERROR &&
+                         getSocketError() == PEGASUS_NETWORK_TRYAGAIN &&
+                         retries < 20);
             }
             // TCP/IP is down, destroy sockets and retry again.
-            if(_tickle_peer_socket == PEGASUS_SOCKET_ERROR && 
-               getSocketError() == PEGASUS_NETWORK_TCPIP_STOPPED )
+            if (_tickle_peer_socket == PEGASUS_SOCKET_ERROR &&
+                getSocketError() == PEGASUS_NETWORK_TCPIP_STOPPED)
             {
                 // destroy everything
                 uninitializeTickler();
@@ -285,24 +289,27 @@ void Monitor::initializeTickler(){
                 continue;
             }
         }
-        if(_tickle_peer_socket == PEGASUS_SOCKET_ERROR)
+        if (_tickle_peer_socket == PEGASUS_SOCKET_ERROR)
         {
-            // handle error
-            MessageLoaderParms parms("Common.Monitor.TICKLE_ACCEPT",
-                                     "Received error number $0 while accepting the internal socket connection.",
-                                     getSocketError());
+            MessageLoaderParms parms(
+                "Common.Monitor.TICKLE_ACCEPT",
+                "Received error number $0 while accepting the internal "
+                    "socket connection.",
+                getSocketError());
             throw Exception(parms);
-        } else
+        }
+        else
         {
             // socket is ok
             break;
         }
-    } while(1); // try until TCP/IP is restarted 
+    } while (1); // try until TCP/IP is restarted
 
     Socket::disableBlocking(_tickle_peer_socket);
     Socket::disableBlocking(_tickle_client_socket);
 
-    // add the tickler to the list of entries to be monitored and set to IDLE because Monitor only
+    // add the tickler to the list of entries to be monitored and set to
+    // IDLE because Monitor only
     // checks entries with IDLE state for events
     _MonitorEntry entry(_tickle_peer_socket, 1, INTERNAL);
     entry._status = _MonitorEntry::IDLE;
@@ -318,10 +325,9 @@ void Monitor::initializeTickler(){
        // if not, overwrite the tickler entry with new socket
        _entries[0]=entry;
     }
-        
 }
 
-void Monitor::tickle(void)
+void Monitor::tickle()
 {
     static char _buffer[] =
     {
@@ -352,7 +358,8 @@ void Monitor::run(Uint32 milliseconds)
 
     ArrayIterator<_MonitorEntry> entries(_entries);
 
-    // Check the stopConnections flag.  If set, clear the Acceptor monitor entries
+    // Check the stopConnections flag.  If set, clear the Acceptor monitor
+    // entries
     if (_stopConnections.get() == 1)
     {
         for ( int indx = 0; indx < (int)entries.size(); indx++)
@@ -365,7 +372,7 @@ void Monitor::run(Uint32 milliseconds)
                         entries[indx]._status.get() == _MonitorEntry::DYING )
                    {
                        // remove the entry
-                      entries[indx]._status = _MonitorEntry::EMPTY;
+                       entries[indx]._status = _MonitorEntry::EMPTY;
                    }
                    else
                    {
@@ -376,61 +383,64 @@ void Monitor::run(Uint32 milliseconds)
            }
         }
         _stopConnections = 0;
-       _stopConnectionsSem.signal();
+        _stopConnectionsSem.signal();
     }
 
-    forint indx = 0; indx < (int)entries.size(); indx++)
+    for (int indx = 0; indx < (int)entries.size(); indx++)
     {
-                        const _MonitorEntry &entry = entries[indx];
-       if ((entry._status.get() == _MonitorEntry::DYING) &&
-                                        (entry._type == Monitor::CONNECTION))
-       {
-          MessageQueue *q = MessageQueue::lookup(entry.queueId);
-          PEGASUS_ASSERT(q != 0);
-          HTTPConnection &h = *static_cast<HTTPConnection *>(q);
-
-                                       if (h._connectionClosePending == false)
-                                               continue;
-
-                                       // NOTE: do not attempt to delete while there are pending responses
-                                       // coming thru. The last response to come thru after a
-                                       // _connectionClosePending will reset _responsePending to false
-                                       // and then cause the monitor to rerun this code and clean up.
-                                       // (see HTTPConnection.cpp)
-
-                                       if (h._responsePending == true)
-                                       {
-                                               Tracer::trace(TRC_HTTP, Tracer::LEVEL4, "Monitor::run - "
-                                                                                                       "Ignoring connection delete request because "
-                                                                                                       "responses are still pending. "
-                                                                                                       "connection=0x%p, socket=%d\n",
-                                                                                                       (void *)&h, h.getSocket());
-                                               continue;
-                                       }
-                                       h._connectionClosePending = false;
-          MessageQueue &o = h.get_owner();
-          Message* message= new CloseConnectionMessage(entry.socket);
-          message->dest = o.getQueueId();
-
-          // HTTPAcceptor is responsible for closing the connection.
-          // The lock is released to allow HTTPAcceptor to call
-          // unsolicitSocketMessages to free the entry.
-          // Once HTTPAcceptor completes processing of the close
-          // connection, the lock is re-requested and processing of
-          // the for loop continues.  This is safe with the current
-          // implementation of the entries object.  Note that the
-          // loop condition accesses the entries.size() on each
-          // iteration, so that a change in size while the mutex is
-          // unlocked will not result in an ArrayIndexOutOfBounds
-          // exception.
-
-          _entry_mut.unlock();
-          o.enqueue(message);
-          _entry_mut.lock();
-          // After enqueue a message and the autoEntryMutex has been released and locked again,
-          // the array of _entries can be changed. The ArrayIterator has be reset with the original _entries.
-          entries.reset(_entries);
-       }
+        const _MonitorEntry &entry = entries[indx];
+        if ((entry._status.get() == _MonitorEntry::DYING) &&
+            (entry._type == Monitor::CONNECTION))
+        {
+            MessageQueue *q = MessageQueue::lookup(entry.queueId);
+            PEGASUS_ASSERT(q != 0);
+            HTTPConnection &h = *static_cast<HTTPConnection *>(q);
+
+            if (h._connectionClosePending == false)
+                continue;
+
+            // NOTE: do not attempt to delete while there are pending responses
+            // coming thru. The last response to come thru after a
+            // _connectionClosePending will reset _responsePending to false
+            // and then cause the monitor to rerun this code and clean up.
+            // (see HTTPConnection.cpp)
+
+            if (h._responsePending == true)
+            {
+                Tracer::trace(TRC_HTTP, Tracer::LEVEL4,
+                    "Monitor::run - Ignoring connection delete request "
+                        "because responses are still pending. "
+                        "connection=0x%p, socket=%d\n",
+                    (void *)&h, h.getSocket());
+                continue;
+            }
+            h._connectionClosePending = false;
+            MessageQueue &o = h.get_owner();
+            Message* message= new CloseConnectionMessage(entry.socket);
+            message->dest = o.getQueueId();
+
+            // HTTPAcceptor is responsible for closing the connection.
+            // The lock is released to allow HTTPAcceptor to call
+            // unsolicitSocketMessages to free the entry.
+            // Once HTTPAcceptor completes processing of the close
+            // connection, the lock is re-requested and processing of
+            // the for loop continues.  This is safe with the current
+            // implementation of the entries object.  Note that the
+            // loop condition accesses the entries.size() on each
+            // iteration, so that a change in size while the mutex is
+            // unlocked will not result in an ArrayIndexOutOfBounds
+            // exception.
+
+            _entry_mut.unlock();
+            o.enqueue(message);
+            _entry_mut.lock();
+
+            // After enqueue a message and the autoEntryMutex has been
+            // released and locked again, the array of _entries can be
+            // changed. The ArrayIterator has be reset with the original
+            // _entries.
+            entries.reset(_entries);
+        }
     }
 
     Uint32 _idleEntries = 0;
@@ -442,12 +452,12 @@ void Monitor::run(Uint32 milliseconds)
         because we have to traverse the entire array.
     */
     SocketHandle maxSocketCurrentPass = 0;
-    forint indx = 0; indx < (int)entries.size(); indx++)
+    for (int indx = 0; indx < (int)entries.size(); indx++)
     {
-       if(maxSocketCurrentPass < entries[indx].socket)
-            maxSocketCurrentPass = entries[indx].socket;
+       if (maxSocketCurrentPass < entries[indx].socket)
+           maxSocketCurrentPass = entries[indx].socket;
 
-       if(entries[indx]._status.get() == _MonitorEntry::IDLE)
+       if (entries[indx]._status.get() == _MonitorEntry::IDLE)
        {
            _idleEntries++;
            FD_SET(entries[indx].socket, &fdread);
@@ -473,145 +483,172 @@ void Monitor::run(Uint32 milliseconds)
     int events = select(maxSocketCurrentPass, &fdread, NULL, NULL, &tv);
 #endif
     _entry_mut.lock();
-    // After enqueue a message and the autoEntryMutex has been released and locked again,
-    // the array of _entries can be changed. The ArrayIterator has be reset with the original _entries
+
+    // After enqueue a message and the autoEntryMutex has been released and
+    // locked again, the array of _entries can be changed. The ArrayIterator
+    // has be reset with the original _entries
     entries.reset(_entries);
 
     if (events == PEGASUS_SOCKET_ERROR)
     {
-       Tracer::trace(TRC_HTTP, Tracer::LEVEL4,
-          "Monitor::run - errorno = %d has occurred on select.", errno);
-       // The EBADF error indicates that one or more or the file
-       // descriptions was not valid. This could indicate that
-       // the entries structure has been corrupted or that
-       // we have a synchronization error.
-
-       PEGASUS_ASSERT(errno != EBADF);
+        Tracer::trace(TRC_HTTP, Tracer::LEVEL4,
+            "Monitor::run - errorno = %d has occurred on select.", errno);
+        // The EBADF error indicates that one or more or the file
+        // descriptions was not valid. This could indicate that
+        // the entries structure has been corrupted or that
+        // we have a synchronization error.
+
+        PEGASUS_ASSERT(errno != EBADF);
     }
     else if (events)
     {
-       Tracer::trace(TRC_HTTP, Tracer::LEVEL4,
-          "Monitor::run select event received events = %d, monitoring %d idle entries",
-           events, _idleEntries);
-       for( int indx = 0; indx < (int)entries.size(); indx++)
-       {
-          // The Monitor should only look at entries in the table that are IDLE (i.e.,
-          // owned by the Monitor).
-          if((entries[indx]._status.get() == _MonitorEntry::IDLE) &&
-             (FD_ISSET(entries[indx].socket, &fdread)))
-          {
-             MessageQueue *q = MessageQueue::lookup(entries[indx].queueId);
-             Tracer::trace(TRC_HTTP, Tracer::LEVEL4,
-                  "Monitor::run indx = %d, queueId =  %d, q = %p",
-                  indx, entries[indx].queueId, q);
-             PEGASUS_ASSERT(q !=0);
-
-             try
-             {
-                if(entries[indx]._type == Monitor::CONNECTION)
-                {
-                   Tracer::trace(TRC_HTTP, Tracer::LEVEL4,
-                     "entries[indx].type for indx = %d is Monitor::CONNECTION", indx);
-                   static_cast<HTTPConnection *>(q)->_entry_index = indx;
-
-                   // Do not update the entry just yet. The entry gets updated once
-                   // the request has been read.
-                   //entries[indx]._status = _MonitorEntry::BUSY;
+        Tracer::trace(TRC_HTTP, Tracer::LEVEL4,
+            "Monitor::run select event received events = %d, monitoring %d "
+                "idle entries",
+            events, _idleEntries);
+        for (int indx = 0; indx < (int)entries.size(); indx++)
+        {
+            // The Monitor should only look at entries in the table that are
+            // IDLE (i.e., owned by the Monitor).
+            if ((entries[indx]._status.get() == _MonitorEntry::IDLE) &&
+                (FD_ISSET(entries[indx].socket, &fdread)))
+            {
+                MessageQueue *q = MessageQueue::lookup(entries[indx].queueId);
+                Tracer::trace(TRC_HTTP, Tracer::LEVEL4,
+                    "Monitor::run indx = %d, queueId =  %d, q = %p",
+                    indx, entries[indx].queueId, q);
+                PEGASUS_ASSERT(q !=0);
 
-                   // If allocate_and_awaken failure, retry on next iteration
+                try
+                {
+                    if (entries[indx]._type == Monitor::CONNECTION)
+                    {
+                        Tracer::trace(TRC_HTTP, Tracer::LEVEL4,
+                            "entries[indx].type for indx = %d is "
+                                "Monitor::CONNECTION",
+                            indx);
+                        static_cast<HTTPConnection *>(q)->_entry_index = indx;
+
+                        // Do not update the entry just yet. The entry gets
+                        // updated once the request has been read.
+                        //entries[indx]._status = _MonitorEntry::BUSY;
+
+                        // If allocate_and_awaken failure, retry on next
+                        // iteration
 /* Removed for PEP 183.
-                   if (!MessageQueueService::get_thread_pool()->allocate_and_awaken(
-                           (void *)q, _dispatch))
-                   {
-                      Tracer::trace(TRC_DISCARDED_DATA, Tracer::LEVEL2,
-                          "Monitor::run: Insufficient resources to process request.");
-                      entries[indx]._status = _MonitorEntry::IDLE;
-                      return true;
-                   }
+                        if (!MessageQueueService::get_thread_pool()->
+                                allocate_and_awaken((void *)q, _dispatch))
+                        {
+                            Tracer::trace(TRC_DISCARDED_DATA, Tracer::LEVEL2,
+                                "Monitor::run: Insufficient resources to "
+                                    "process request.");
+                            entries[indx]._status = _MonitorEntry::IDLE;
+                            return true;
+                        }
 */
 // Added for PEP 183
-                   HTTPConnection *dst = reinterpret_cast<HTTPConnection *>(q);
-                   Tracer::trace(TRC_HTTP, Tracer::LEVEL4,
-                         "Monitor::_dispatch: entering run() for indx  = %d, queueId = %d, q = %p",
-                   dst->_entry_index, dst->_monitor->_entries[dst->_entry_index].queueId, dst);
-                   try
-                   {
-                       dst->run(1);
-                   }
-                   catch (...)
-                   {
-                       Tracer::trace(TRC_HTTP, Tracer::LEVEL4,
-                       "Monitor::_dispatch: exception received");
-                   }
-                   Tracer::trace(TRC_HTTP, Tracer::LEVEL4,
-                   "Monitor::_dispatch: exited run() for index %d", dst->_entry_index);
-
-                   // It is possible the entry status may not be set to busy.
-                   // The following will fail in that case.
-                  // PEGASUS_ASSERT(dst->_monitor->_entries[dst->_entry_index]._status.get() == _MonitorEntry::BUSY);
-                  // Once the HTTPConnection thread has set the status value to either
-                  // Monitor::DYING or Monitor::IDLE, it has returned control of the connection
-                  // to the Monitor.  It is no longer permissible to access the connection
-                  // or the entry in the _entries table.
-
-                   // The following is not relevant as the worker thread or the
-                   // reader thread will update the status of the entry.
-                  //if (dst->_connectionClosePending)
-                  //{
-                  //  dst->_monitor->_entries[dst->_entry_index]._status = _MonitorEntry::DYING;
-                  //}
-                  //else
-                  //{
-                  //  dst->_monitor->_entries[dst->_entry_index]._status = _MonitorEntry::IDLE;
-                  //}
+                        HTTPConnection *dst =
+                            reinterpret_cast<HTTPConnection *>(q);
+                        Tracer::trace(TRC_HTTP, Tracer::LEVEL4,
+                            "Monitor::_dispatch: entering run() for "
+                                "indx = %d, queueId = %d, q = %p",
+                            dst->_entry_index,
+                            dst->_monitor->_entries[dst->_entry_index].queueId,
+                            dst);
+
+                        try
+                        {
+                            dst->run(1);
+                        }
+                        catch (...)
+                        {
+                            Tracer::trace(TRC_HTTP, Tracer::LEVEL4,
+                                "Monitor::_dispatch: exception received");
+                        }
+                        Tracer::trace(TRC_HTTP, Tracer::LEVEL4,
+                            "Monitor::_dispatch: exited run() for index %d",
+                            dst->_entry_index);
+
+                        // It is possible the entry status may not be set to
+                        // busy.  The following will fail in that case.
+                        // PEGASUS_ASSERT(dst->_monitor->_entries[
+                        //     dst->_entry_index]._status.get() ==
+                        //    _MonitorEntry::BUSY);
+                        // Once the HTTPConnection thread has set the status
+                        // value to either Monitor::DYING or Monitor::IDLE,
+                        // it has returned control of the connection to the
+                        // Monitor.  It is no longer permissible to access
+                        // the connection or the entry in the _entries table.
+
+                        // The following is not relevant as the worker thread
+                        // or the reader thread will update the status of the
+                        // entry.
+                        //if (dst->_connectionClosePending)
+                        //{
+                        //  dst->_monitor->_entries[dst->_entry_index]._status =
+                        //    _MonitorEntry::DYING;
+                        //}
+                        //else
+                        //{
+                        //  dst->_monitor->_entries[dst->_entry_index]._status =
+                        //    _MonitorEntry::IDLE;
+                        //}
 // end Added for PEP 183
-               }
-               else if( entries[indx]._type == Monitor::INTERNAL){
-                       // set ourself to BUSY,
+                    }
+                    else if (entries[indx]._type == Monitor::INTERNAL)
+                    {
+                        // set ourself to BUSY,
                         // read the data
                         // and set ourself back to IDLE
 
-                       entries[indx]._status = _MonitorEntry::BUSY;
-                       static char buffer[2];
-            Sint32 amt = Socket::read(entries[indx].socket,&buffer, 2);
-
-            if(amt == PEGASUS_SOCKET_ERROR && 
-               getSocketError() == PEGASUS_NETWORK_TCPIP_STOPPED )
-            {
-                Tracer::trace(TRC_HTTP, Tracer::LEVEL4,
-                      "Monitor::run: Tickler socket got an IO error. "
-                      "Going to re-create Socket and wait for TCP/IP restart.");
-                uninitializeTickler();
-                initializeTickler();
-                
-            } else
-            {
-                entries[indx]._status = _MonitorEntry::IDLE;
+                        entries[indx]._status = _MonitorEntry::BUSY;
+                        static char buffer[2];
+                        Sint32 amt =
+                            Socket::read(entries[indx].socket,&buffer, 2);
+
+                        if (amt == PEGASUS_SOCKET_ERROR &&
+                            getSocketError() == PEGASUS_NETWORK_TCPIP_STOPPED)
+                        {
+                            Tracer::trace(TRC_HTTP, Tracer::LEVEL4,
+                                "Monitor::run: Tickler socket got an IO error. "
+                                    "Going to re-create Socket and wait for "
+                                    "TCP/IP restart.");
+                            uninitializeTickler();
+                            initializeTickler();
+                        }
+                        else
+                        {
+                            entries[indx]._status = _MonitorEntry::IDLE;
+                        }
+                    }
+                    else
+                    {
+                        Tracer::trace(TRC_HTTP, Tracer::LEVEL4,
+                            "Non-connection entry, indx = %d, has been "
+                                "received.",
+                            indx);
+                        int events = 0;
+                        events |= SocketMessage::READ;
+                        Message* msg = new SocketMessage(
+                            entries[indx].socket, events);
+                        entries[indx]._status = _MonitorEntry::BUSY;
+                        _entry_mut.unlock();
+                        q->enqueue(msg);
+                        _entry_mut.lock();
+
+                        // After enqueue a message and the autoEntryMutex has
+                        // been released and locked again, the array of
+                        // entries can be changed. The ArrayIterator has be
+                        // reset with the original _entries
+                        entries.reset(_entries);
+                        entries[indx]._status = _MonitorEntry::IDLE;
+                    }
+                }
+                catch (...)
+                {
+                }
             }
-                       
-               }
-               else
-               {
-                   Tracer::trace(TRC_HTTP, Tracer::LEVEL4,
-                     "Non-connection entry, indx = %d, has been received.", indx);
-                  int events = 0;
-                  events |= SocketMessage::READ;
-                  Message *msg = new SocketMessage(entries[indx].socket, events);
-                  entries[indx]._status = _MonitorEntry::BUSY;
-                   _entry_mut.unlock();
-                  q->enqueue(msg);
-                   _entry_mut.lock();
-           // After enqueue a message and the autoEntryMutex has been released and locked again,
-           // the array of entries can be changed. The ArrayIterator has be reset with the original _entries
-           entries.reset(_entries);
-                  entries[indx]._status = _MonitorEntry::IDLE;
-               }
-            }
-            catch(...)
-            {
-            }
-         }
-       }
+        }
     }
 }
 
@@ -634,122 +671,132 @@ void Monitor::stopListeningForConnections(Boolean wait)
 }
 
 
-int  Monitor::solicitSocketMessages(
+int Monitor::solicitSocketMessages(
     SocketHandle socket,
     Uint32 events,
     Uint32 queueId,
     int type)
 {
-   PEG_METHOD_ENTER(TRC_HTTP, "Monitor::solicitSocketMessages");
-   AutoMutex autoMut(_entry_mut);
-   // Check to see if we need to dynamically grow the _entries array
-   // We always want the _entries array to 2 bigger than the
-   // current connections requested
-   _solicitSocketCount++;  // bump the count
-   int size = (int)_entries.size();
-   if((int)_solicitSocketCount >= (size-1)){
-        for(int i = 0; i < ((int)_solicitSocketCount - (size-1)); i++){
-                _MonitorEntry entry(0, 0, 0);
-                _entries.append(entry);
+    PEG_METHOD_ENTER(TRC_HTTP, "Monitor::solicitSocketMessages");
+    AutoMutex autoMut(_entry_mut);
+    // Check to see if we need to dynamically grow the _entries array
+    // We always want the _entries array to 2 bigger than the
+    // current connections requested
+    _solicitSocketCount++;  // bump the count
+    int size = (int)_entries.size();
+    if ((int)_solicitSocketCount >= (size-1))
+    {
+        for (int i = 0; i < ((int)_solicitSocketCount - (size-1)); i++)
+        {
+            _MonitorEntry entry(0, 0, 0);
+            _entries.append(entry);
         }
-   }
-
-   int index;
-   for(index = 1; index < (int)_entries.size(); index++)
-   {
-      try
-      {
-         if(_entries[index]._status.get() == _MonitorEntry::EMPTY)
-         {
-            _entries[index].socket = socket;
-            _entries[index].queueId  = queueId;
-            _entries[index]._type = type;
-            _entries[index]._status = _MonitorEntry::IDLE;
-
-            return index;
-         }
-      }
-      catch(...)
-      {
-      }
-   }
-   _solicitSocketCount--;  // decrease the count, if we are here we didnt do anything meaningful
-   PEG_METHOD_EXIT();
-   return -1;
+    }
 
+    int index;
+    for (index = 1; index < (int)_entries.size(); index++)
+    {
+        try
+        {
+            if (_entries[index]._status.get() == _MonitorEntry::EMPTY)
+            {
+                _entries[index].socket = socket;
+                _entries[index].queueId  = queueId;
+                _entries[index]._type = type;
+                _entries[index]._status = _MonitorEntry::IDLE;
+
+                return index;
+            }
+        }
+        catch (...)
+        {
+        }
+    }
+    // decrease the count, if we are here we didn't do anything meaningful
+    _solicitSocketCount--;
+    PEG_METHOD_EXIT();
+    return -1;
 }
 
 void Monitor::unsolicitSocketMessages(SocketHandle socket)
 {
-
     PEG_METHOD_ENTER(TRC_HTTP, "Monitor::unsolicitSocketMessages");
     AutoMutex autoMut(_entry_mut);
 
     /*
-        Start at index = 1 because _entries[0] is the tickle entry which never needs
-        to be EMPTY;
+        Start at index = 1 because _entries[0] is the tickle entry which
+        never needs to be EMPTY;
     */
     unsigned int index;
-    for(index = 1; index < _entries.size(); index++)
+    for (index = 1; index < _entries.size(); index++)
     {
-       if(_entries[index].socket == socket)
-       {
-          _entries[index]._status = _MonitorEntry::EMPTY;
-          _entries[index].socket = PEGASUS_INVALID_SOCKET;
-          _solicitSocketCount--;
-          break;
-       }
+        if (_entries[index].socket == socket)
+        {
+            _entries[index]._status = _MonitorEntry::EMPTY;
+            _entries[index].socket = PEGASUS_INVALID_SOCKET;
+            _solicitSocketCount--;
+            break;
+        }
     }
 
     /*
-       Dynamic Contraction:
-       To remove excess entries we will start from the end of the _entries array
-       and remove all entries with EMPTY status until we find the first NON EMPTY.
-       This prevents the positions, of the NON EMPTY entries, from being changed.
+        Dynamic Contraction:
+        To remove excess entries we will start from the end of the _entries
+        array and remove all entries with EMPTY status until we find the
+        first NON EMPTY.  This prevents the positions, of the NON EMPTY
+        entries, from being changed.
     */
     index = _entries.size() - 1;
-    while(_entries[index]._status.get() == _MonitorEntry::EMPTY){
-       if(_entries.size() > MAX_NUMBER_OF_MONITOR_ENTRIES)
+    while (_entries[index]._status.get() == _MonitorEntry::EMPTY)
+    {
+        if (_entries.size() > MAX_NUMBER_OF_MONITOR_ENTRIES)
                 _entries.remove(index);
-       index--;
+        index--;
     }
     PEG_METHOD_EXIT();
 }
 
 // Note: this is no longer called with PEP 183.
-ThreadReturnType PEGASUS_THREAD_CDECL Monitor::_dispatch(void *parm)
+ThreadReturnType PEGASUS_THREAD_CDECL Monitor::_dispatch(voidparm)
 {
-   HTTPConnection *dst = reinterpret_cast<HTTPConnection *>(parm);
-   Tracer::trace(TRC_HTTP, Tracer::LEVEL4,
-        "Monitor::_dispatch: entering run() for indx  = %d, queueId = %d, q = %p",
-        dst->_entry_index, dst->_monitor->_entries[dst->_entry_index].queueId, dst);
-   try
-   {
-      dst->run(1);
-   }
-   catch (...)
-   {
-      Tracer::trace(TRC_HTTP, Tracer::LEVEL4,
-          "Monitor::_dispatch: exception received");
-   }
-   Tracer::trace(TRC_HTTP, Tracer::LEVEL4,
-          "Monitor::_dispatch: exited run() for index %d", dst->_entry_index);
-
-   PEGASUS_ASSERT(dst->_monitor->_entries[dst->_entry_index]._status.get() == _MonitorEntry::BUSY);
-
-   // Once the HTTPConnection thread has set the status value to either
-   // Monitor::DYING or Monitor::IDLE, it has returned control of the connection
-   // to the Monitor.  It is no longer permissible to access the connection
-   // or the entry in the _entries table.
-   if (dst->_connectionClosePending)
-   {
-      dst->_monitor->_entries[dst->_entry_index]._status = _MonitorEntry::DYING;
-   }
-   else
-   {
-      dst->_monitor->_entries[dst->_entry_index]._status = _MonitorEntry::IDLE;
-   }
-   return 0;
+    HTTPConnection *dst = reinterpret_cast<HTTPConnection *>(parm);
+    Tracer::trace(TRC_HTTP, Tracer::LEVEL4,
+        "Monitor::_dispatch: entering run() for indx  = %d, queueId = %d, "
+            "q = %p",
+        dst->_entry_index,
+        dst->_monitor->_entries[dst->_entry_index].queueId,
+        dst);
+
+    try
+    {
+        dst->run(1);
+    }
+    catch (...)
+    {
+        Tracer::trace(TRC_HTTP, Tracer::LEVEL4,
+            "Monitor::_dispatch: exception received");
+    }
+    Tracer::trace(TRC_HTTP, Tracer::LEVEL4,
+        "Monitor::_dispatch: exited run() for index %d", dst->_entry_index);
+
+    PEGASUS_ASSERT(dst->_monitor->_entries[dst->_entry_index]._status.get() ==
+        _MonitorEntry::BUSY);
+
+    // Once the HTTPConnection thread has set the status value to either
+    // Monitor::DYING or Monitor::IDLE, it has returned control of the
+    // connection to the Monitor.  It is no longer permissible to access the
+    // connection or the entry in the _entries table.
+    if (dst->_connectionClosePending)
+    {
+        dst->_monitor->_entries[dst->_entry_index]._status =
+            _MonitorEntry::DYING;
+    }
+    else
+    {
+        dst->_monitor->_entries[dst->_entry_index]._status =
+            _MonitorEntry::IDLE;
+    }
+    return 0;
 }
 
 PEGASUS_NAMESPACE_END
index 5d9705f6f41ca4a05ddb9c108dba906bb149f2f9..2b243a28ec99ca4091c57a707938e26ebf9efe60 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By: Amit Arora (amita@in.ibm.com) for Bug#1170
-//              Sushma Fernandes (sushma@hp.com) for Bug#2057
-//              Josephine Eskaline Joyce (jojustin@in.ibm.com) for PEP#101
-//              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//              David Dillard, Symantec Corp. (david_dillard@symantec.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_Monitor_h
@@ -57,49 +49,49 @@ PEGASUS_NAMESPACE_BEGIN
 class PEGASUS_COMMON_LINKAGE _MonitorEntry
 {
 public:
-  SocketHandle socket;
-  Uint32 queueId;
-  AtomicInt _status;
-
-  // This copy constructor is inecessary since AtomicInt does not support
-  // copy construction.
-  _MonitorEntry(const _MonitorEntry& x) :
-      socket(x.socket), 
-      queueId(x.queueId), 
-      _status(x._status.get()),
-      _type(x._type) 
-  {
-  }
-  int _type;
-
-  _MonitorEntry(SocketHandle sock, Uint32 q, int Type)
-    : socket(sock), queueId(q), _status(EMPTY), _type(Type)
-  {
-  }
-
-  _MonitorEntry() : socket(0), queueId(0), _status(EMPTY), _type(0)
-  {
-  }
-
-  _MonitorEntry & operator =(const _MonitorEntry & entry)
-  {
-    if( this != &entry )
-      {
-       this->socket = entry.socket;
-       this->queueId = entry.queueId;
-       this->_status = entry._status.get();
-       this->_type = entry._type;
-      }
-
-    return *this;
-  }
-
-  enum entry_status
+    SocketHandle socket;
+    Uint32 queueId;
+    AtomicInt _status;
+
+    // This copy constructor is inecessary since AtomicInt does not support
+    // copy construction.
+    _MonitorEntry(const _MonitorEntry& x) :
+        socket(x.socket),
+        queueId(x.queueId),
+        _status(x._status.get()),
+        _type(x._type)
+    {
+    }
+    int _type;
+
+    _MonitorEntry(SocketHandle sock, Uint32 q, int Type)
+        : socket(sock), queueId(q), _status(EMPTY), _type(Type)
+    {
+    }
+
+    _MonitorEntry() : socket(0), queueId(0), _status(EMPTY), _type(0)
     {
-      IDLE,
-      BUSY,
-      DYING,
-      EMPTY
+    }
+
+    _MonitorEntry& operator=(const _MonitorEntry& entry)
+    {
+        if (this != &entry)
+        {
+            this->socket = entry.socket;
+            this->queueId = entry.queueId;
+            this->_status = entry._status.get();
+            this->_type = entry._type;
+        }
+
+        return *this;
+    }
+
+    enum entry_status
+    {
+        IDLE,
+        BUSY,
+        DYING,
+        EMPTY
     };
 };
 
@@ -108,16 +100,15 @@ class SocketMessage : public Message
 {
 public:
 
-  enum Events { READ = 1, WRITE = 2, EXCEPTION = 4 };
+    enum Events { READ = 1, WRITE = 2, EXCEPTION = 4 };
 
+    SocketMessage(SocketHandle socket_, Uint32 events_)
+        : Message(SOCKET_MESSAGE), socket(socket_), events(events_)
+    {
+    }
 
-  SocketMessage(SocketHandle socket_, Uint32 events_) :
-    Message(SOCKET_MESSAGE), socket(socket_), events(events_)
-  {
-  }
-
-  SocketHandle socket;
-  Uint32 events;
+    SocketHandle socket;
+    Uint32 events;
 };
 
 /** This class monitors system-level events and notifies its clients of these
@@ -173,87 +164,87 @@ public:
 class PEGASUS_COMMON_LINKAGE Monitor
 {
 public:
-  enum Type
+    enum Type
     {
-      UNTYPED, ACCEPTOR, CONNECTOR, CONNECTION, INTERNAL
+        UNTYPED, ACCEPTOR, CONNECTOR, CONNECTION, INTERNAL
     };
 
-
-  /** Default constructor. */
-  Monitor();
-
-  /** This destruct deletes all handlers which were installed. */
-  ~Monitor();
-
-  /** Sets the state of the monitor entry to the specified state.
-      This is used to synchronize the monitor and the worker
-      thread. Bug# 2057 */
-  void setState( Uint32 index, _MonitorEntry::entry_status status );
-
-  void initializeTickler();
-  void uninitializeTickler();
-
-  void tickle();
-  /** Monitor system-level for the given number of milliseconds. Post a
-      message to the corresponding queue when such an event occurs.
-      Return after the time has elapsed or a single event has occurred,
-      whichever occurs first.
-
-      @param timeoutMsec the number of milliseconds to wait for an event.
-      @return true if an event occured.
-  */
-  void run(Uint32 timeoutMsec);
-
-  /** Solicit interest in SocketMessages. Note that there may only
-      be one solicitor per socket.
-
-      @param socket the socket to monitor for activity.
-      @param events socket events to monitor (see the SocketMessage::Events
-      enumeration for details).
-      @param queueId of queue on which to post socket messages.
-      @return false if messages have already been solicited on this socket.
-  */
-  int solicitSocketMessages(
-                SocketHandle socket,
-                Uint32 events,
-                Uint32 queueId,
-                int type);
-
-  /** Unsolicit messages on the given socket.
-
-  @param socket on which to unsolicit messages.
-  @return false if no such solicitation has been made on the given socket.
-  */
-  void unsolicitSocketMessages(SocketHandle);
-
-  /** dispatch a message to the cimom on an independent thread
-      Note: The Monitor class uses the MessageQueueService ThreadPool.
-      This ThreadPool is only available if it has been initialized by
-      the MessageQueueService.  Therefore, the Monitor class should
-      only be used when the MessageQueueService is active in the
-      system.
-   */
-  static ThreadReturnType PEGASUS_THREAD_CDECL _dispatch(void *);
-
-  /** stop listening for client connections
-   */
-  void stopListeningForConnections(Boolean wait);
+    /** Default constructor. */
+    Monitor();
+
+    /** This destruct deletes all handlers which were installed. */
+    ~Monitor();
+
+    /** Sets the state of the monitor entry to the specified state.
+        This is used to synchronize the monitor and the worker
+        thread. Bug# 2057 */
+    void setState( Uint32 index, _MonitorEntry::entry_status status );
+
+    void initializeTickler();
+    void uninitializeTickler();
+
+    void tickle();
+    /** Monitor system-level for the given number of milliseconds. Post a
+        message to the corresponding queue when such an event occurs.
+        Return after the time has elapsed or a single event has occurred,
+        whichever occurs first.
+
+        @param timeoutMsec the number of milliseconds to wait for an event.
+        @return true if an event occured.
+    */
+    void run(Uint32 timeoutMsec);
+
+    /** Solicit interest in SocketMessages. Note that there may only
+        be one solicitor per socket.
+
+        @param socket the socket to monitor for activity.
+        @param events socket events to monitor (see the SocketMessage::Events
+        enumeration for details).
+        @param queueId of queue on which to post socket messages.
+        @return false if messages have already been solicited on this socket.
+    */
+    int solicitSocketMessages(
+        SocketHandle socket,
+        Uint32 events,
+        Uint32 queueId,
+        int type);
+
+    /** Unsolicit messages on the given socket.
+
+        @param socket on which to unsolicit messages.
+        @return false if no such solicitation has been made on the given socket.
+    */
+    void unsolicitSocketMessages(SocketHandle);
+
+    /** dispatch a message to the cimom on an independent thread
+        Note: The Monitor class uses the MessageQueueService ThreadPool.
+        This ThreadPool is only available if it has been initialized by
+        the MessageQueueService.  Therefore, the Monitor class should
+        only be used when the MessageQueueService is active in the
+        system.
+     */
+    static ThreadReturnType PEGASUS_THREAD_CDECL _dispatch(void *);
+
+    /** stop listening for client connections
+     */
+    void stopListeningForConnections(Boolean wait);
 
 private:
 
-  Array<_MonitorEntry> _entries;
-  Mutex _entry_mut;
-  AtomicInt _stopConnections;
-  Semaphore _stopConnectionsSem;
-  Uint32 _solicitSocketCount;  // tracks how many times solicitSocketCount() has been called
-  friend class HTTPConnection;
-  struct sockaddr_in _tickle_server_addr;
-  struct sockaddr_in _tickle_client_addr;
-  struct sockaddr_in _tickle_peer_addr;
-  SocketHandle _tickle_client_socket;
-  SocketHandle _tickle_server_socket;
-  SocketHandle _tickle_peer_socket;
-  Mutex _tickle_mutex;
+    Array<_MonitorEntry> _entries;
+    Mutex _entry_mut;
+    AtomicInt _stopConnections;
+    Semaphore _stopConnectionsSem;
+    /** tracks how many times solicitSocketCount() has been called */
+    Uint32 _solicitSocketCount;
+    friend class HTTPConnection;
+    struct sockaddr_in _tickle_server_addr;
+    struct sockaddr_in _tickle_client_addr;
+    struct sockaddr_in _tickle_peer_addr;
+    SocketHandle _tickle_client_socket;
+    SocketHandle _tickle_server_socket;
+    SocketHandle _tickle_peer_socket;
+    Mutex _tickle_mutex;
 };
 
 PEGASUS_NAMESPACE_END
index be75434200bd48e94b8cc22b76553dc94753e400..faab0db4f6eb128de63bcf97bee1de7558f547a6 100755 (executable)
 //     This file includes network-related system-header files. Please include
 //     this file directly rather than including system headers directly. If
 //     special inclusions are necessary for any platform, please add them to
-//     this file rather than other files. The reason for this file is to limit 
-//     platform-specific conditional compilation expressions to only a few 
+//     this file rather than other files. The reason for this file is to limit
+//     platform-specific conditional compilation expressions to only a few
 //     well-known header files.
-// 
+//
 //==============================================================================
 
 //------------------------------------------------------------------------------
 
 #ifdef PEGASUS_OS_TYPE_WINDOWS
 #   ifdef FD_SETSIZE
-#       error 
-           "<Pegasus/Common/Network.h>: FD_SETSIZE is already defined. This "
-           "file must be included prior to any header file that defines "
-           "FD_SETSIZE, such as <windows.h>, <winsock.h>, or winsock2.h>."
+#       error "<Pegasus/Common/Network.h>: FD_SETSIZE is already defined. \
+ This file must be included prior to any header file that defines \
+ FD_SETSIZE, such as <windows.h>, <winsock.h>, or <winsock2.h>."
 #   endif
 #   define FD_SETSIZE 1024
 #   include <windows.h>
 //------------------------------------------------------------------------------
 //
 // PEGASUS_NETWORK_TCPIP_STOPPED
-// 
-// This return code indicates that the transpor layer is 
+//
+// This return code indicates that the transpor layer is
 // stopped and the socket is invalid. The socket must created again.
 //
 //------------------------------------------------------------------------------
 //------------------------------------------------------------------------------
 //
 // PEGASUS_NETWORK_TCPIP_TRYAGAIN
-//  
+//
 // This return code indicates that the transport layer is
 // temporary unavailable and the program can try again.
 //
 //------------------------------------------------------------------------------
 //
 // PEGASUS_NETWORK_TRYAGAIN
-//  
-// This return code indicates that the network function 
+//
+// This return code indicates that the network function
 // should be tried again by the program.
 //
 //------------------------------------------------------------------------------
index 020d431529bf35e4e85c15ca8970dd66fa7c88ba..57a4cbb714bf903d534fa46d82d6d88e4b420a88 100644 (file)
 //
 //==============================================================================
 //
-// Author: Chip Vincent (cvincent@us.ibm.com)
-//
-// Modified By:
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include <Pegasus/Common/ObjectNormalizer.h>
 PEGASUS_NAMESPACE_BEGIN
 
 CIMQualifier _processQualifier(
-    CIMConstQualifier & referenceQualifier,
-    CIMConstQualifier & cimQualifier)
+    CIMConstQualifier& referenceQualifier,
+    CIMConstQualifier& cimQualifier)
 {
     // check name
-    if(!referenceQualifier.getName().equal(cimQualifier.getName()))
+    if (!referenceQualifier.getName().equal(cimQualifier.getName()))
     {
         MessageLoaderParms message(
             "Common.ObjectNormalizer.INVALID_QUALIFIER_NAME",
@@ -56,7 +52,7 @@ CIMQualifier _processQualifier(
     }
 
     // check type
-    if(referenceQualifier.getType() != cimQualifier.getType())
+    if (referenceQualifier.getType() != cimQualifier.getType())
     {
         MessageLoaderParms message(
             "Common.ObjectNormalizer.INVALID_QUALIFIER_TYPE",
@@ -75,24 +71,24 @@ CIMQualifier _processQualifier(
     // TODO: check override
 
     // update value
-    if(!cimQualifier.getValue().isNull())
+    if (!cimQualifier.getValue().isNull())
     {
         normalizedQualifier.setValue(cimQualifier.getValue());
     }
 
-    return(normalizedQualifier);
+    return normalizedQualifier;
 }
 
 CIMProperty ObjectNormalizer::_processProperty(
-    CIMConstProperty & referenceProperty,
-    CIMConstProperty & instProperty,
+    CIMConstProperty& referenceProperty,
+    CIMConstProperty& instProperty,
     Boolean includeQualifiers,
     Boolean includeClassOrigin,
-    NormalizerContext * context,
-    const CIMNamespaceName & nameSpace)
+    NormalizerContext* context,
+    const CIMNamespaceName& nameSpace)
 {
     // check name
-    if(!referenceProperty.getName().equal(instProperty.getName()))
+    if (!referenceProperty.getName().equal(instProperty.getName()))
     {
         MessageLoaderParms message(
             "Common.ObjectNormalizer.INVALID_PROPERTY_NAME",
@@ -105,14 +101,14 @@ CIMProperty ObjectNormalizer::_processProperty(
     // check type
     CIMType referencePropType = referenceProperty.getType();
     CIMType instPropType = instProperty.getType();
-    if(referencePropType != instPropType)
+    if (referencePropType != instPropType)
     {
 #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
         // CMPI Providers cannot return a CIMTYPE_INSTANCE, so if the
         // referenceProperty type is CIMTYPE_INSTANCE and the instProperty
         // type is CIMTYPE_OBJECT, ignore the mismatch. The Normalizer
         // will correct it.
-        if(referencePropType != CIMTYPE_INSTANCE ||
+        if (referencePropType != CIMTYPE_INSTANCE ||
             instPropType != CIMTYPE_OBJECT)
 #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
         {
@@ -138,13 +134,13 @@ CIMProperty ObjectNormalizer::_processProperty(
     // TODO: check override (especially for references)?
 
     // update value
-    if(!instProperty.getValue().isNull())
+    if (!instProperty.getValue().isNull())
     {
 #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
         // This happens ONLY when the referencePropType is CIMTYPE_INSTANCE
         // and the cimPropType is CIMTYPE_OBJECT, otherwise an exception
         // would have been thrown. Correct the mismatch here.
-        if(referencePropType != instPropType)
+        if (referencePropType != instPropType)
         {
             CIMObject tmpObject;
             instProperty.getValue().get(tmpObject);
@@ -158,23 +154,25 @@ CIMProperty ObjectNormalizer::_processProperty(
     }
 
     // update class origin
-    if(includeClassOrigin)
+    if (includeClassOrigin)
     {
         normalizedProperty.setClassOrigin(referenceProperty.getClassOrigin());
     }
 
     // add qualifiers
-    if(includeQualifiers)
+    if (includeQualifiers)
     {
         // propagate class property qualifiers
-        for(Uint32 i = 0, n = referenceProperty.getQualifierCount(); i < n; i++)
+        for (Uint32 i=0, n = referenceProperty.getQualifierCount(); i < n; i++)
         {
-            CIMConstQualifier referenceQualifier = referenceProperty.getQualifier(i);
+            CIMConstQualifier referenceQualifier =
+                referenceProperty.getQualifier(i);
 
-            Uint32 pos = instProperty.findQualifier(referenceQualifier.getName());
+            Uint32 pos =
+                instProperty.findQualifier(referenceQualifier.getName());
 
             // update value if qualifier is present in the specified property
-            if(pos != PEG_NOT_FOUND)
+            if (pos != PEG_NOT_FOUND)
             {
                 CIMConstQualifier cimQualifier = instProperty.getQualifier(pos);
 
@@ -193,11 +191,11 @@ CIMProperty ObjectNormalizer::_processProperty(
     }
 #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
 #ifdef PEGASUS_SNIA_INTEROP_COMPATIBILITY
-    else if(referenceProperty.getType() == CIMTYPE_INSTANCE)
+    else if (referenceProperty.getType() == CIMTYPE_INSTANCE)
     {
         Uin32 refPos = referenceProperty.findQualifier("EmbeddedInstance");
         Uin32 cimPos = instProperty.findQualifier("EmbeddedInstance");
-        if(refPos != PEG_NOT_FOUND && cimPos == PEG_NOT_FOUND)
+        if (refPos != PEG_NOT_FOUND && cimPos == PEG_NOT_FOUND)
         {
             instProperty.addQualifier(refProperty.getQualifier(pos));
         }
@@ -207,9 +205,9 @@ CIMProperty ObjectNormalizer::_processProperty(
     // Check the type of the embedded instance against the class specified by
     // the EmbeddedInstance qualifier. We can only do this if the context
     // is non-zero.
-    if(context != 0)
+    if (context != 0)
     {
-        if(referenceProperty.getType() == CIMTYPE_INSTANCE)
+        if (referenceProperty.getType() == CIMTYPE_INSTANCE)
         {
             Uint32 pos = referenceProperty.findQualifier("EmbeddedInstance");
 
@@ -225,7 +223,7 @@ CIMProperty ObjectNormalizer::_processProperty(
             embeddedInstSubclasses.append(embedInstClassName);
 
             Array<CIMInstance> embeddedInstances;
-            if(referenceProperty.isArray())
+            if (referenceProperty.isArray())
             {
                 instProperty.getValue().get(embeddedInstances);
             }
@@ -237,48 +235,52 @@ CIMProperty ObjectNormalizer::_processProperty(
             }
 
             Array<CIMClass> embeddedClassDefs;
-            for(Uint32 i = 0, n = embeddedInstances.size(); i < n; ++i)
+            for (Uint32 i = 0, n = embeddedInstances.size(); i < n; ++i)
             {
-                CIMInstance & currentInstance = embeddedInstances[i];
+                CIMInstance& currentInstance = embeddedInstances[i];
                 CIMName currentClassName = currentInstance.getClassName();
-                if(Contains(embeddedInstSubclasses, currentClassName))
+                if (Contains(embeddedInstSubclasses, currentClassName))
                 {
                     CIMClass embeddedClassDef;
                     bool found = false;
-                    for(Uint32 j = 0, m = embeddedClassDefs.size(); j < m;
+                    for (Uint32 j = 0, m = embeddedClassDefs.size(); j < m;
                         ++j)
                     {
-                        CIMClass & tmpClassDef = embeddedClassDefs[j];
-                        if(tmpClassDef.getClassName() == currentClassName)
+                        CIMClass& tmpClassDef = embeddedClassDefs[j];
+                        if (tmpClassDef.getClassName() == currentClassName)
                         {
                             embeddedClassDef = tmpClassDef;
                             found = true;
                         }
                     }
 
-                    if(!found)
+                    if (!found)
                     {
                         embeddedClassDef = context->getClass(nameSpace,
                             currentClassName);
                         embeddedClassDefs.append(embeddedClassDef);
                     }
 
-                    AutoPtr<NormalizerContext> tmpContext(context->clone().release());
+                    AutoPtr<NormalizerContext> tmpContext(
+                        context->clone().release());
                     ObjectNormalizer tmpNormalizer(embeddedClassDef,
                         includeQualifiers, includeClassOrigin, nameSpace,
                         tmpContext);
-                    if(currentInstance.getPath().getKeyBindings().size()==0)
+                    if (currentInstance.getPath().getKeyBindings().size()==0)
                     {
                         currentInstance.setPath(
                             currentInstance.buildPath(embeddedClassDef));
                     }
-                    embeddedInstances[i] = tmpNormalizer.processInstance(currentInstance);
+                    embeddedInstances[i] =
+                        tmpNormalizer.processInstance(currentInstance);
                 }
                 else
                 {
                     MessageLoaderParms message(
-                        "Common.ObjectNormalizer.INVALID_EMBEDDED_INSTANCE_TYPE",
-                        "Found embedded instance of type $0: was expecting $1 for property $2",
+                        "Common.ObjectNormalizer."
+                            "INVALID_EMBEDDED_INSTANCE_TYPE",
+                        "Found embedded instance of type $0: was expecting "
+                            "$1 for property $2",
                         currentClassName.getString(),
                         qualClassStr,
                         instProperty.getName().getString());
@@ -287,7 +289,7 @@ CIMProperty ObjectNormalizer::_processProperty(
                 }
             }
 
-            if(referenceProperty.isArray())
+            if (referenceProperty.isArray())
             {
               normalizedProperty.setValue(CIMValue(embeddedInstances));
             }
@@ -299,10 +301,10 @@ CIMProperty ObjectNormalizer::_processProperty(
     }
 #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
 
-    return(normalizedProperty);
+    return normalizedProperty;
 }
 
-ObjectNormalizer::ObjectNormalizer(void)
+ObjectNormalizer::ObjectNormalizer()
     : _includeQualifiers(false),
     _includeClassOrigin(false),
     _context(0)
@@ -310,45 +312,52 @@ ObjectNormalizer::ObjectNormalizer(void)
 }
 
 ObjectNormalizer::ObjectNormalizer(
-    const CIMClass & cimClass,
+    const CIMClass& cimClass,
     Boolean includeQualifiers,
     Boolean includeClassOrigin,
-    const CIMNamespaceName & nameSpace,
-    AutoPtr<NormalizerContext> & context)
+    const CIMNamespaceName& nameSpace,
+    AutoPtr<NormalizerContext>& context)
   : _cimClass(cimClass),
     _includeQualifiers(includeQualifiers),
     _includeClassOrigin(includeClassOrigin),
     _context(context),
     _nameSpace(nameSpace)
 {
-    if(!_cimClass.isUninitialized())
+    if (!_cimClass.isUninitialized())
     {
-        // ATTN: the following code is intended to expedite normalizing instances and instance object
-        // paths by establishing the keys once now rather than multiple times later. it is biased
+        // ATTN: the following code is intended to expedite normalizing
+        // instances and instance object paths by establishing the keys
+        // once now rather than multiple times later. it is biased
         // toward providers that return many instances with many properties.
 
         // build a reference object path within the class
         Array<CIMKeyBinding> keys;
 
-        for(Uint32 i = 0, n = _cimClass.getPropertyCount(); i < n; i++)
+        for (Uint32 i = 0, n = _cimClass.getPropertyCount(); i < n; i++)
         {
             CIMConstProperty referenceProperty = _cimClass.getProperty(i);
 
             Uint32 pos = referenceProperty.findQualifier("key");
 
-            if((pos != PEG_NOT_FOUND) && (referenceProperty.getQualifier(pos).getValue().equal(CIMValue(true))))
+            if ((pos != PEG_NOT_FOUND) &&
+                (referenceProperty.getQualifier(pos).getValue().equal(
+                     CIMValue(true))))
             {
-                if(referenceProperty.getType() == CIMTYPE_REFERENCE)
+                if (referenceProperty.getType() == CIMTYPE_REFERENCE)
                 {
-                    // ATTN: a fake reference is inserted in the key so that the _BubbleSort() method
-                    // in CIMObjectPath does not throw and exception. It implicitly validates keys of
-                    // type REFERENCE so just place a dummy value for now. The value will be replaced
-                    // by the normalized object later.
-                    keys.append(CIMKeyBinding(referenceProperty.getName(), "class.key=\"value\"", CIMKeyBinding::REFERENCE));
+                    // ATTN: a fake reference is inserted in the key so that
+                    // the _BubbleSort() method in CIMObjectPath does not
+                    // throw and exception. It implicitly validates keys of
+                    // type REFERENCE so just place a dummy value for now.
+                    // The value will be replaced by the normalized object
+                    // later.
+                    keys.append(CIMKeyBinding(referenceProperty.getName(),
+                        "class.key=\"value\"", CIMKeyBinding::REFERENCE));
                 }
                 else
                 {
-                    keys.append(CIMKeyBinding(referenceProperty.getName(), referenceProperty.getValue()));
+                    keys.append(CIMKeyBinding(referenceProperty.getName(),
+                        referenceProperty.getValue()));
                 }
             }
         }
@@ -362,29 +371,32 @@ ObjectNormalizer::ObjectNormalizer(
     }
 }
 
-CIMObjectPath ObjectNormalizer::processClassObjectPath(const CIMObjectPath & cimObjectPath) const
+CIMObjectPath ObjectNormalizer::processClassObjectPath(
+    const CIMObjectPath& cimObjectPath) const
 {
     // pre-check
-    if(_cimClass.isUninitialized())
+    if (_cimClass.isUninitialized())
     {
         // do nothing
-        return(cimObjectPath);
+        return cimObjectPath;
     }
 
     /*
-    // ATTN: moving similar logic to the response handlers because this type of error should
-    // be checked regardless with or without normalization enabled.
-    if(cimObjectPath.getClassName().isNull())
+    // ATTN: moving similar logic to the response handlers because this
+    // type of error should be checked regardless with or without
+    // normalization enabled.
+    if (cimObjectPath.getClassName().isNull())
     {
         throw CIMException(CIM_ERR_FAILED, "uninitialized object path");
     }
     */
 
     /*
-    // ATTN: The following code is currently redundant because the CIMName object validates
-    // legal names when it is constructed. It is included here for completeness.
+    // ATTN: The following code is currently redundant because the CIMName
+    // object validates legal names when it is constructed. It is included
+    // here for completeness.
     // check class name
-    if(!CIMName(cimObjectPath.getClassName()).legal())
+    if (!CIMName(cimObjectPath.getClassName()).legal())
     {
         MessageLoaderParms message(
             "Common.ObjectNormalizer.INVALID_CLASS_NAME",
@@ -396,7 +408,7 @@ CIMObjectPath ObjectNormalizer::processClassObjectPath(const CIMObjectPath & cim
     */
 
     // check class type
-    if(!_cimClass.getClassName().equal(cimObjectPath.getClassName()))
+    if (!_cimClass.getClassName().equal(cimObjectPath.getClassName()))
     {
         MessageLoaderParms message(
             "Common.ObjectNormalizer.INVALID_CLASS_TYPE",
@@ -413,32 +425,35 @@ CIMObjectPath ObjectNormalizer::processClassObjectPath(const CIMObjectPath & cim
 
     // ignore any keys, they are not part of a class object path
 
-    return(normalizedObjectPath);
+    return normalizedObjectPath;
 }
 
-CIMObjectPath ObjectNormalizer::processInstanceObjectPath(const CIMObjectPath & cimObjectPath) const
+CIMObjectPath ObjectNormalizer::processInstanceObjectPath(
+    const CIMObjectPath& cimObjectPath) const
 {
     // pre-check
-    if(_cimClass.isUninitialized())
+    if (_cimClass.isUninitialized())
     {
         // do nothing
-        return(cimObjectPath);
+        return cimObjectPath;
     }
 
     /*
-    // ATTN: moving similar logic to the response handlers because this type of error should
-    // be checked regardless with or without normalization enabled.
-    if(cimObjectPath.getClassName().isNull())
+    // ATTN: moving similar logic to the response handlers because this
+    // type of error should be checked regardless with or without
+    // normalization enabled.
+    if (cimObjectPath.getClassName().isNull())
     {
         throw CIMException(CIM_ERR_FAILED, "uninitialized object path");
     }
     */
 
     /*
-    // ATTN: The following code is currently redundant because the CIMName object validates
-    // legal names when it is constructed. It is included here for completeness.
+    // ATTN: The following code is currently redundant because the CIMName
+    // object validates legal names when it is constructed. It is included
+    // here for completeness.
     // check class name
-    if(!CIMName(cimObjectPath.getClassName()).legal())
+    if (!CIMName(cimObjectPath.getClassName()).legal())
     {
         MessageLoaderParms message(
             "Common.ObjectNormalizer.INVALID_CLASS_NAME",
@@ -450,7 +465,7 @@ CIMObjectPath ObjectNormalizer::processInstanceObjectPath(const CIMObjectPath &
     */
 
     // check class type
-    if(!_cimClass.getClassName().equal(cimObjectPath.getClassName()))
+    if (!_cimClass.getClassName().equal(cimObjectPath.getClassName()))
     {
         MessageLoaderParms message(
             "Common.ObjectNormalizer.INVALID_CLASS_TYPE",
@@ -470,17 +485,17 @@ CIMObjectPath ObjectNormalizer::processInstanceObjectPath(const CIMObjectPath &
     Array<CIMKeyBinding> referenceKeys = _cimClass.getPath().getKeyBindings();
     Array<CIMKeyBinding> cimKeys = cimObjectPath.getKeyBindings();
 
-    for(Uint32 i = 0, n = referenceKeys.size(); i < n; i++)
+    for (Uint32 i = 0, n = referenceKeys.size(); i < n; i++)
     {
         CIMKeyBinding key;
 
         // override the value from the specified object
-        for(Uint32 j = 0, m = cimKeys.size(); j < m; j++)
+        for (Uint32 j = 0, m = cimKeys.size(); j < m; j++)
         {
-            if(referenceKeys[i].getName().equal(cimKeys[j].getName()))
+            if (referenceKeys[i].getName().equal(cimKeys[j].getName()))
             {
                 // check type
-                if(referenceKeys[i].getType() != cimKeys[j].getType())
+                if (referenceKeys[i].getType() != cimKeys[j].getType())
                 {
                     MessageLoaderParms message(
                         "Common.ObjectNormalizer.INVALID_KEY_TYPE",
@@ -490,14 +505,15 @@ CIMObjectPath ObjectNormalizer::processInstanceObjectPath(const CIMObjectPath &
                     throw CIMException(CIM_ERR_FAILED, message);
                 }
 
-                key = CIMKeyBinding(referenceKeys[i].getName(), cimKeys[j].getValue(), referenceKeys[i].getType());
+                key = CIMKeyBinding(referenceKeys[i].getName(),
+                    cimKeys[j].getValue(), referenceKeys[i].getType());
 
                 break;
             }
         }
 
         // key not found
-        if(key.getName().isNull())
+        if (key.getName().isNull())
         {
             MessageLoaderParms message(
                 "Common.ObjectNormalizer.MISSING_KEY",
@@ -512,22 +528,24 @@ CIMObjectPath ObjectNormalizer::processInstanceObjectPath(const CIMObjectPath &
 
     normalizedObjectPath.setKeyBindings(normalizedKeys);
 
-    return(normalizedObjectPath);
+    return normalizedObjectPath;
 }
 
-CIMInstance ObjectNormalizer::processInstance(const CIMInstance & cimInstance) const
+CIMInstance ObjectNormalizer::processInstance(
+    const CIMInstance& cimInstance) const
 {
     // pre-checks
-    if(_cimClass.isUninitialized())
+    if (_cimClass.isUninitialized())
     {
         // do nothing
-        return(cimInstance);
+        return cimInstance;
     }
 
     /*
-    // ATTN: moving similar logic to the response handlers because this type of error should
-    // be checked regardless with or without normalization enabled.
-    if(cimInstance.isUninitialized())
+    // ATTN: moving similar logic to the response handlers because this
+    // type of error should be checked regardless with or without
+    // normalization enabled.
+    if (cimInstance.isUninitialized())
     {
         throw CIMException(CIM_ERR_FAILED, "unintialized instance object.");
     }
@@ -536,20 +554,22 @@ CIMInstance ObjectNormalizer::processInstance(const CIMInstance & cimInstance) c
     CIMInstance normalizedInstance(_cimClass.getClassName());
 
     // proces object path
-    normalizedInstance.setPath(processInstanceObjectPath(cimInstance.getPath()));
+    normalizedInstance.setPath(
+        processInstanceObjectPath(cimInstance.getPath()));
 
     // process instance qualifiers
-    if(_includeQualifiers)
+    if (_includeQualifiers)
     {
         // propagate class qualifiers
-        for(Uint32 i = 0, n = _cimClass.getQualifierCount(); i < n; i++)
+        for (Uint32 i = 0, n = _cimClass.getQualifierCount(); i < n; i++)
         {
             CIMConstQualifier referenceQualifier = _cimClass.getQualifier(i);
 
-            Uint32 pos = cimInstance.findQualifier(referenceQualifier.getName());
+            Uint32 pos =
+                cimInstance.findQualifier(referenceQualifier.getName());
 
             // update value if qualifier is present in the specified property
-            if(pos != PEG_NOT_FOUND)
+            if (pos != PEG_NOT_FOUND)
             {
                 CIMConstQualifier cimQualifier = cimInstance.getQualifier(pos);
 
@@ -567,15 +587,15 @@ CIMInstance ObjectNormalizer::processInstance(const CIMInstance & cimInstance) c
         }
     }
 
-    // check property names and types. any properties in the class but not in the instance
-    // are implicitly dropped.
-    for(Uint32 i = 0, n = _cimClass.getPropertyCount(); i < n; i++)
+    // check property names and types. any properties in the class but not
+    // in the instance are implicitly dropped.
+    for (Uint32 i = 0, n = _cimClass.getPropertyCount(); i < n; i++)
     {
         CIMConstProperty referenceProperty = _cimClass.getProperty(i);
 
         Uint32 pos = cimInstance.findProperty(referenceProperty.getName());
 
-        if(pos != PEG_NOT_FOUND)
+        if (pos != PEG_NOT_FOUND)
         {
             CIMConstProperty cimProperty = cimInstance.getProperty(pos);
 
@@ -592,7 +612,7 @@ CIMInstance ObjectNormalizer::processInstance(const CIMInstance & cimInstance) c
         }
     }
 
-    return(normalizedInstance);
+    return normalizedInstance;
 }
 
 PEGASUS_NAMESPACE_END
index 9859ef792e567eb22461212f77f8eea09b425b54..e80294b27006435be4036737504a3df5a43625a4 100644 (file)
 //
 //==============================================================================
 //
-// Author: Chip Vincent (cvincent@us.ibm.com)
-//
-// Modified By:
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_ObjectNormalizer_h
@@ -66,28 +62,30 @@ public:
 class PEGASUS_COMMON_LINKAGE ObjectNormalizer
 {
 public:
-    ObjectNormalizer(void);
+    ObjectNormalizer();
     ObjectNormalizer(
-        const CIMClass & cimClass,
+        const CIMClass& cimClass,
         Boolean includeQualifiers,
         Boolean includeClassOrigin,
         const CIMNamespaceName& nameSpace,
-        AutoPtr<NormalizerContext> & context);
+        AutoPtr<NormalizerContext>& context);
 
-    CIMObjectPath processClassObjectPath(const CIMObjectPath & cimObjectPath) const;
-    CIMObjectPath processInstanceObjectPath(const CIMObjectPath & cimObjectPath) const;
+    CIMObjectPath processClassObjectPath(
+        const CIMObjectPath& cimObjectPath) const;
+    CIMObjectPath processInstanceObjectPath(
+        const CIMObjectPath& cimObjectPath) const;
 
-    //CIMClass processClass(const CIMClass & cimClass) const;
-    CIMInstance processInstance(const CIMInstance & cimInstance) const;
-    //CIMIndication processIndication(const CIMIndication & cimIndication);
+    //CIMClass processClass(const CIMClass& cimClass) const;
+    CIMInstance processInstance(const CIMInstance& cimInstance) const;
+    //CIMIndication processIndication(const CIMIndication& cimIndication);
 
     static CIMProperty _processProperty(
-        CIMConstProperty & referenceProperty,
-        CIMConstProperty & cimProperty,
+        CIMConstProperty& referenceProperty,
+        CIMConstProperty& cimProperty,
         Boolean includeQualifiers,
         Boolean includeClassOrigin,
         NormalizerContext * context,
-        const CIMNamespaceName & nameSpace);
+        const CIMNamespaceName& nameSpace);
 
 private:
     CIMClass _cimClass;
index 31e39587e4a350c13adeea0727cbcd458d114a50..d0e84ae6b21a8a846d450099bf836e5c972ec92e 100644 (file)
 //
 //==============================================================================
 //
-// Author: Adrian Schuur (schuur@de.ibm.com) - PEP 164
-//
-// Modified By: David Dillard, VERITAS Software Corp.
-//                  (david.dillard@veritas.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef ObjectStreamer_h
 
 PEGASUS_NAMESPACE_BEGIN
 
-class PEGASUS_COMMON_LINKAGE ObjectStreamer {
-
+class PEGASUS_COMMON_LINKAGE ObjectStreamer
+{
 public:
 
-   ObjectStreamer() {}
+    ObjectStreamer() {}
 
-   virtual ~ObjectStreamer() {}
+    virtual ~ObjectStreamer() {}
 
-   virtual void encode(Buffer& out, const CIMClass& cls) = 0;
-   virtual void encode(Buffer& out, const CIMInstance& inst) = 0;
-   virtual void encode(Buffer& out, const CIMQualifierDecl& qual) = 0;
+    virtual void encode(Buffer& out, const CIMClass& cls) = 0;
+    virtual void encode(Buffer& out, const CIMInstance& inst) = 0;
+    virtual void encode(Buffer& out, const CIMQualifierDecl& qual) = 0;
 
-   virtual void decode(const Buffer& in, unsigned int pos, CIMClass& cls) = 0;
-   virtual void decode(const Buffer& in, unsigned int pos, CIMInstance& inst) = 0;
-   virtual void decode(const Buffer& in, unsigned int pos, CIMQualifierDecl& qual) = 0;
+    virtual void decode(const Buffer& in, unsigned int pos, CIMClass& cls) = 0;
+    virtual void decode(
+        const Buffer& in,
+        unsigned int pos,
+        CIMInstance& inst) = 0;
+    virtual void decode(
+        const Buffer& in,
+        unsigned int pos,
+        CIMQualifierDecl& qual) = 0;
 
-   virtual void write(PEGASUS_STD(ostream)& os, Buffer& in)
-   {
-      os.write(in.getData(), static_cast<PEGASUS_STD(streamsize)>(in.size()));
-   }
+    virtual void write(PEGASUS_STD(ostream)& os, Buffer& in)
+    {
+        os.write(in.getData(), static_cast<PEGASUS_STD(streamsize)>(in.size()));
+    }
 };
 
 PEGASUS_NAMESPACE_END
index 2ff7c389c2806e887f47a7fd2f15067a4e092d86..b2517570f864f3e84a7e13f1f71d26f4a3ae878b 100644 (file)
@@ -29,8 +29,6 @@
 //
 //==============================================================================
 //
-// Author: Mike Brasher (m.brasher@inovadevelopment.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include "Once.h"
index 97efdd5f954b4c7f05961d32b35bb1b119a0acfa..290912d556799ac75022c927e83f03cf2543e340 100644 (file)
@@ -29,8 +29,6 @@
 //
 //==============================================================================
 //
-// Author: Mike Brasher (m.brasher@inovadevelopment.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_Once_h
index 6ac572848f5f7e1102e4b967e0e572e431a3bd97..e5c87021622a4832cd1e383767f1ba9d4808e28a 100644 (file)
 //
 //==============================================================================
 //
-// Author: Chip Vincent (cvincent@us.ibm.com)
-//
-// Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//              Carol Ann Krug Graves, Hewlett-Packard Company
-//                (carolann_graves@hp.com)
-//             Yi Zhou, Hewlett-Packard Company (yi_zhou@hp.com)
-//              Terry Martin, Hewlett-Packard Company (terry.martin@hp.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include "OperationContext.h"
 #include "ArrayInternal.h"
-#include <Pegasus/Common/MessageLoader.h> //l10n
+#include <Pegasus/Common/MessageLoader.h>
 
 PEGASUS_NAMESPACE_BEGIN
 
@@ -52,46 +44,46 @@ PEGASUS_NAMESPACE_BEGIN
 class OperationContextRep
 {
 public:
-    Array<OperationContext::Container *> containers;
+    Array<OperationContext::Container*> containers;
 };
 
-OperationContext::OperationContext(void)
+OperationContext::OperationContext()
 {
     _rep = new OperationContextRep;
 }
 
-OperationContext::OperationContext(const OperationContext & context)
+OperationContext::OperationContext(const OperationContext& context)
 {
     _rep = new OperationContextRep;
     *this = context;
 }
 
-OperationContext::~OperationContext(void)
+OperationContext::~OperationContext()
 {
     clear();
     delete _rep;
 }
 
-OperationContext & OperationContext::operator=(const OperationContext & context)
+OperationContext& OperationContext::operator=(const OperationContext& context)
 {
-    if(this == &context)
+    if (this == &context)
     {
-        return(*this);
+        return *this;
     }
 
     clear();
 
-    for(Uint32 i = 0, n = context._rep->containers.size(); i < n; i++)
+    for (Uint32 i = 0, n = context._rep->containers.size(); i < n; i++)
     {
         _rep->containers.append(context._rep->containers[i]->clone());
     }
 
-    return(*this);
+    return *this;
 }
 
-void OperationContext::clear(void)
+void OperationContext::clear()
 {
-    for(Uint32 i = 0, n = _rep->containers.size(); i < n; i++)
+    for (Uint32 i = 0, n = _rep->containers.size(); i < n; i++)
     {
         _rep->containers[i]->destroy();
     }
@@ -99,18 +91,18 @@ void OperationContext::clear(void)
     _rep->containers.clear();
 }
 
-const OperationContext::Container & OperationContext::get(
+const OperationContext::Container& OperationContext::get(
     const String& containerName) const
 {
     Uint32 size = _rep->containers.size();
     Container** data = (Container**)_rep->containers.getData();
 
     for (; size--; data++)
-       if (data[0]->getName() == containerName)
-           return *(data[0]);
+        if (data[0]->getName() == containerName)
+            return *(data[0]);
 
     static Exception _exception(MessageLoaderParms(
-       "Common.OperationContext.OBJECT_NOT_FOUND", "object not found"));
+        "Common.OperationContext.OBJECT_NOT_FOUND", "object not found"));
 
     throw Exception(_exception);
 }
@@ -130,11 +122,11 @@ Boolean OperationContext::contains(
     return false;
 }
 
-void OperationContext::set(const OperationContext::Container & container)
+void OperationContext::set(const OperationContext::Container& container)
 {
-    for(Uint32 i = 0, n = _rep->containers.size(); i < n; i++)
+    for (Uint32 i = 0, n = _rep->containers.size(); i < n; i++)
     {
-        if(container.getName() == _rep->containers[i]->getName())
+        if (container.getName() == _rep->containers[i]->getName())
         {
             // delete previous container
             _rep->containers[i]->destroy();
@@ -147,24 +139,22 @@ void OperationContext::set(const OperationContext::Container & container)
         }
     }
 
-       //l10n
-       MessageLoaderParms parms("Common.OperationContext.OBJECT_NOT_FOUND",
-                                                        "object not found");
+    MessageLoaderParms parms(
+        "Common.OperationContext.OBJECT_NOT_FOUND",
+        "object not found");
     throw Exception(parms);
-    //throw Exception("object not found");
 }
 
-void OperationContext::insert(const OperationContext::Container & container)
+void OperationContext::insert(const OperationContext::Container& container)
 {
-    for(Uint32 i = 0, n = _rep->containers.size(); i < n; i++)
+    for (Uint32 i = 0, n = _rep->containers.size(); i < n; i++)
     {
-        if(container.getName() == _rep->containers[i]->getName())
+        if (container.getName() == _rep->containers[i]->getName())
         {
-               //l10n
-                       MessageLoaderParms parms("Common.OperationContext.OBJECT_ALREADY_EXISTS",
-                                                        "object already exists.");
-               throw Exception(parms);
-            //throw Exception("object already exists.");
+            MessageLoaderParms parms(
+                "Common.OperationContext.OBJECT_ALREADY_EXISTS",
+                "object already exists.");
+            throw Exception(parms);
         }
     }
 
@@ -173,9 +163,9 @@ void OperationContext::insert(const OperationContext::Container & container)
 
 void OperationContext::remove(const String& containerName)
 {
-    for(Uint32 i = 0, n = _rep->containers.size(); i < n; i++)
+    for (Uint32 i = 0, n = _rep->containers.size(); i < n; i++)
     {
-        if(containerName == _rep->containers[i]->getName())
+        if (containerName == _rep->containers[i]->getName())
         {
             _rep->containers[i]->destroy();
             _rep->containers.remove(i);
@@ -184,19 +174,18 @@ void OperationContext::remove(const String& containerName)
         }
     }
 
-       //l10n
-       MessageLoaderParms parms("Common.OperationContext.OBJECT_NOT_FOUND",
-                                                        "object not found");
+    MessageLoaderParms parms(
+        "Common.OperationContext.OBJECT_NOT_FOUND",
+        "object not found");
     throw Exception(parms);
-    //throw Exception("object not found");
 }
+
 
 //
 // OperationContext::Container
 //
 
-OperationContext::Container::~Container(void)
+OperationContext::Container::~Container()
 {
 }
 
@@ -213,11 +202,13 @@ public:
 
 const String IdentityContainer::NAME = "IdentityContainer";
 
-IdentityContainer::IdentityContainer(const OperationContext::Container & container)
+IdentityContainer::IdentityContainer(
+    const OperationContext::Container& container)
 {
-    const IdentityContainer * p = dynamic_cast<const IdentityContainer *>(&container);
+    const IdentityContainer* p =
+        dynamic_cast<const IdentityContainer*>(&container);
 
-    if(p == 0)
+    if (p == 0)
     {
         throw DynamicCastFailedException();
     }
@@ -226,57 +217,58 @@ IdentityContainer::IdentityContainer(const OperationContext::Container & contain
     _rep->userName = p->_rep->userName;
 }
 
-IdentityContainer::IdentityContainer(const IdentityContainer & container)
-#if defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU) || defined (PEGASUS_PLATFORM_DARWIN_PPC_GNU)
-     : OperationContext::Container()
+IdentityContainer::IdentityContainer(const IdentityContainer& container)
+#if defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU) || \
+    defined (PEGASUS_PLATFORM_DARWIN_PPC_GNU)
+    : OperationContext::Container()
 #endif
 {
     _rep = new IdentityContainerRep();
     _rep->userName = container._rep->userName;
 }
 
-IdentityContainer::IdentityContainer(const String & userName)
+IdentityContainer::IdentityContainer(const String& userName)
 {
     _rep = new IdentityContainerRep();
     _rep->userName = userName;
 }
 
-IdentityContainer::~IdentityContainer(void)
+IdentityContainer::~IdentityContainer()
 {
     delete _rep;
 }
 
-IdentityContainer & IdentityContainer::operator=(
-    const IdentityContainer & container)
+IdentityContainer& IdentityContainer::operator=(
+    const IdentityContainer& container)
 {
     if (this == &container)
     {
-        return (*this);
+        return *this;
     }
 
     _rep->userName = container._rep->userName;
 
-    return (*this);
+    return *this;
 }
 
-String IdentityContainer::getName(void) const
+String IdentityContainer::getName() const
 {
-    return(NAME);
+    return NAME;
 }
 
-OperationContext::Container * IdentityContainer::clone(void) const
+OperationContext::Container* IdentityContainer::clone() const
 {
-    return(new IdentityContainer(_rep->userName));
+    return new IdentityContainer(_rep->userName);
 }
 
-void IdentityContainer::destroy(void)
+void IdentityContainer::destroy()
 {
     delete this;
 }
 
-String IdentityContainer::getUserName(void) const
+String IdentityContainer::getUserName() const
 {
-    return(_rep->userName);
+    return _rep->userName;
 }
 
 
@@ -293,13 +285,13 @@ public:
 const String SubscriptionInstanceContainer::NAME =
     "SubscriptionInstanceContainer";
 
-SubscriptionInstanceContainer::SubscriptionInstanceContainer
-    (const OperationContext::Container & container)
+SubscriptionInstanceContainer::SubscriptionInstanceContainer(
+    const OperationContext::Container& container)
 {
-    const SubscriptionInstanceContainer * p =
-        dynamic_cast<const SubscriptionInstanceContainer *>(&container);
+    const SubscriptionInstanceContainer* p =
+        dynamic_cast<const SubscriptionInstanceContainer*>(&container);
 
-    if(p == 0)
+    if (p == 0)
     {
         throw DynamicCastFailedException();
     }
@@ -308,59 +300,60 @@ SubscriptionInstanceContainer::SubscriptionInstanceContainer
     _rep->subscriptionInstance = p->_rep->subscriptionInstance;
 }
 
-SubscriptionInstanceContainer::SubscriptionInstanceContainer
-    (const SubscriptionInstanceContainer & container)
-#if defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU) || defined(PEGASUS_PLATFORM_DARWIN_PPC_GNU)
-     : OperationContext::Container()
+SubscriptionInstanceContainer::SubscriptionInstanceContainer(
+    const SubscriptionInstanceContainer& container)
+#if defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU) || \
+    defined(PEGASUS_PLATFORM_DARWIN_PPC_GNU)
+    : OperationContext::Container()
 #endif
 {
     _rep = new SubscriptionInstanceContainerRep();
     _rep->subscriptionInstance = container._rep->subscriptionInstance;
 }
 
-SubscriptionInstanceContainer::SubscriptionInstanceContainer
-    (const CIMInstance & subscriptionInstance)
+SubscriptionInstanceContainer::SubscriptionInstanceContainer(
+    const CIMInstance& subscriptionInstance)
 {
     _rep = new SubscriptionInstanceContainerRep();
     _rep->subscriptionInstance = subscriptionInstance;
 }
 
-SubscriptionInstanceContainer::~SubscriptionInstanceContainer(void)
+SubscriptionInstanceContainer::~SubscriptionInstanceContainer()
 {
     delete _rep;
 }
 
-SubscriptionInstanceContainer & SubscriptionInstanceContainer::operator=(
-    const SubscriptionInstanceContainer & container)
+SubscriptionInstanceContainer& SubscriptionInstanceContainer::operator=(
+    const SubscriptionInstanceContainer& container)
 {
     if (this == &container)
     {
-        return (*this);
+        return *this;
     }
 
     _rep->subscriptionInstance = container._rep->subscriptionInstance;
 
-    return (*this);
+    return *this;
 }
 
-String SubscriptionInstanceContainer::getName(void) const
+String SubscriptionInstanceContainer::getName() const
 {
-    return(NAME);
+    return NAME;
 }
 
-OperationContext::Container * SubscriptionInstanceContainer::clone(void) const
+OperationContext::Container* SubscriptionInstanceContainer::clone() const
 {
-    return(new SubscriptionInstanceContainer(_rep->subscriptionInstance));
+    return new SubscriptionInstanceContainer(_rep->subscriptionInstance);
 }
 
-void SubscriptionInstanceContainer::destroy(void)
+void SubscriptionInstanceContainer::destroy()
 {
     delete this;
 }
 
-CIMInstance SubscriptionInstanceContainer::getInstance(void) const
+CIMInstance SubscriptionInstanceContainer::getInstance() const
 {
-    return(_rep->subscriptionInstance);
+    return _rep->subscriptionInstance;
 }
 
 
@@ -374,16 +367,16 @@ public:
     Array<CIMObjectPath> subscriptionInstanceNames;
 };
 
-const String SubscriptionInstanceNamesContainer::NAME = 
+const String SubscriptionInstanceNamesContainer::NAME =
     "SubscriptionInstanceNamesContainer";
 
-SubscriptionInstanceNamesContainer::SubscriptionInstanceNamesContainer
-    (const OperationContext::Container & container)
+SubscriptionInstanceNamesContainer::SubscriptionInstanceNamesContainer(
+    const OperationContext::Container& container)
 {
-    const SubscriptionInstanceNamesContainer * p = 
-        dynamic_cast<const SubscriptionInstanceNamesContainer *>(&container);
+    const SubscriptionInstanceNamesContainer* p =
+        dynamic_cast<const SubscriptionInstanceNamesContainer*>(&container);
 
-    if(p == 0)
+    if (p == 0)
     {
         throw DynamicCastFailedException();
     }
@@ -392,63 +385,64 @@ SubscriptionInstanceNamesContainer::SubscriptionInstanceNamesContainer
     _rep->subscriptionInstanceNames = p->_rep->subscriptionInstanceNames;
 }
 
-SubscriptionInstanceNamesContainer::SubscriptionInstanceNamesContainer
-    (const SubscriptionInstanceNamesContainer & container)
-#if defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU) || defined(PEGASUS_PLATFORM_DARWIN_PPC_GNU)
-     : OperationContext::Container()
+SubscriptionInstanceNamesContainer::SubscriptionInstanceNamesContainer(
+    const SubscriptionInstanceNamesContainer& container)
+#if defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU) || \
+    defined(PEGASUS_PLATFORM_DARWIN_PPC_GNU)
+    : OperationContext::Container()
 #endif
 {
     _rep = new SubscriptionInstanceNamesContainerRep();
     _rep->subscriptionInstanceNames = container._rep->subscriptionInstanceNames;
 }
 
-SubscriptionInstanceNamesContainer::SubscriptionInstanceNamesContainer
-    (const Array<CIMObjectPath> & subscriptionInstanceNames)
+SubscriptionInstanceNamesContainer::SubscriptionInstanceNamesContainer(
+    const Array<CIMObjectPath>& subscriptionInstanceNames)
 {
     _rep = new SubscriptionInstanceNamesContainerRep();
     _rep->subscriptionInstanceNames = subscriptionInstanceNames;
 }
 
-SubscriptionInstanceNamesContainer::~SubscriptionInstanceNamesContainer(void)
+SubscriptionInstanceNamesContainer::~SubscriptionInstanceNamesContainer()
 {
     delete _rep;
 }
 
-SubscriptionInstanceNamesContainer & 
+SubscriptionInstanceNamesContainer&
     SubscriptionInstanceNamesContainer::operator=(
-    const SubscriptionInstanceNamesContainer & container)
+        const SubscriptionInstanceNamesContainer& container)
 {
     if (this == &container)
     {
-        return (*this);
+        return *this;
     }
 
     _rep->subscriptionInstanceNames = container._rep->subscriptionInstanceNames;
 
-    return (*this);
+    return *this;
 }
 
-String SubscriptionInstanceNamesContainer::getName(void) const
+String SubscriptionInstanceNamesContainer::getName() const
 {
-    return(NAME);
+    return NAME;
 }
 
-OperationContext::Container * 
-    SubscriptionInstanceNamesContainer::clone(void) const
+OperationContext::Container*
+    SubscriptionInstanceNamesContainer::clone() const
 {
-    return(new SubscriptionInstanceNamesContainer
-        (_rep->subscriptionInstanceNames));
+    return new SubscriptionInstanceNamesContainer(
+        _rep->subscriptionInstanceNames);
 }
 
-void SubscriptionInstanceNamesContainer::destroy(void)
+void SubscriptionInstanceNamesContainer::destroy()
 {
     delete this;
 }
 
-Array<CIMObjectPath> 
-    SubscriptionInstanceNamesContainer::getInstanceNames(void) const
+Array<CIMObjectPath>
+    SubscriptionInstanceNamesContainer::getInstanceNames() const
 {
-    return(_rep->subscriptionInstanceNames);
+    return _rep->subscriptionInstanceNames;
 }
 
 
@@ -463,16 +457,16 @@ public:
     String queryLanguage;
 };
 
-const String SubscriptionFilterConditionContainer::NAME = 
+const String SubscriptionFilterConditionContainer::NAME =
     "SubscriptionFilterConditionContainer";
 
-SubscriptionFilterConditionContainer::SubscriptionFilterConditionContainer
-    (const OperationContext::Container & container)
+SubscriptionFilterConditionContainer::SubscriptionFilterConditionContainer(
+    const OperationContext::Container& container)
 {
-    const SubscriptionFilterConditionContainer * p = 
-        dynamic_cast<const SubscriptionFilterConditionContainer *>(&container);
+    const SubscriptionFilterConditionContainer* p =
+        dynamic_cast<const SubscriptionFilterConditionContainer*>(&container);
 
-    if(p == 0)
+    if (p == 0)
     {
         throw DynamicCastFailedException();
     }
@@ -482,10 +476,11 @@ SubscriptionFilterConditionContainer::SubscriptionFilterConditionContainer
     _rep->queryLanguage = p->_rep->queryLanguage;
 }
 
-SubscriptionFilterConditionContainer::SubscriptionFilterConditionContainer
-    (const SubscriptionFilterConditionContainer & container)
-#if defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU) || defined(PEGASUS_PLATFORM_DARWIN_PPC_GNU)
-     : OperationContext::Container()
+SubscriptionFilterConditionContainer::SubscriptionFilterConditionContainer(
+    const SubscriptionFilterConditionContainer& container)
+#if defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU) || \
+    defined(PEGASUS_PLATFORM_DARWIN_PPC_GNU)
+    : OperationContext::Container()
 #endif
 {
     _rep = new SubscriptionFilterConditionContainerRep();
@@ -494,59 +489,58 @@ SubscriptionFilterConditionContainer::SubscriptionFilterConditionContainer
 }
 
 SubscriptionFilterConditionContainer::SubscriptionFilterConditionContainer(
-    const String & filterCondition,
-    const String & queryLanguage)
+    const String& filterCondition,
+    const String& queryLanguage)
 {
     _rep = new SubscriptionFilterConditionContainerRep();
     _rep->filterCondition = filterCondition;
     _rep->queryLanguage = queryLanguage;
 }
 
-SubscriptionFilterConditionContainer::~SubscriptionFilterConditionContainer
-    (void)
+SubscriptionFilterConditionContainer::~SubscriptionFilterConditionContainer()
 {
     delete _rep;
 }
 
-SubscriptionFilterConditionContainer & 
+SubscriptionFilterConditionContainer&
     SubscriptionFilterConditionContainer::operator=(
-    const SubscriptionFilterConditionContainer & container)
+        const SubscriptionFilterConditionContainer& container)
 {
     if (this == &container)
     {
-        return (*this);
+        return *this;
     }
 
     _rep->filterCondition = container._rep->filterCondition;
     _rep->queryLanguage = container._rep->queryLanguage;
 
-    return (*this);
+    return *this;
 }
 
-String SubscriptionFilterConditionContainer::getName(void) const
+String SubscriptionFilterConditionContainer::getName() const
 {
-    return(NAME);
+    return NAME;
 }
 
-OperationContext::Container * SubscriptionFilterConditionContainer::clone(void) const
+OperationContext::Container* SubscriptionFilterConditionContainer::clone() const
 {
-    return(new SubscriptionFilterConditionContainer(_rep->filterCondition, 
-        _rep->queryLanguage));
+    return new SubscriptionFilterConditionContainer(
+        _rep->filterCondition, _rep->queryLanguage);
 }
 
-void SubscriptionFilterConditionContainer::destroy(void)
+void SubscriptionFilterConditionContainer::destroy()
 {
     delete this;
 }
 
-String SubscriptionFilterConditionContainer::getFilterCondition(void) const
+String SubscriptionFilterConditionContainer::getFilterCondition() const
 {
-    return(_rep->filterCondition);
+    return _rep->filterCondition;
 }
 
-String SubscriptionFilterConditionContainer::getQueryLanguage(void) const
+String SubscriptionFilterConditionContainer::getQueryLanguage() const
 {
-    return(_rep->queryLanguage);
+    return _rep->queryLanguage;
 }
 
 
@@ -564,28 +558,29 @@ public:
 
 const String SubscriptionFilterQueryContainer::NAME =
     "SubscriptionFilterQueryContainer";
-    
-SubscriptionFilterQueryContainer::SubscriptionFilterQueryContainer
-    (const OperationContext::Container & container)
-{
-    const SubscriptionFilterQueryContainer * p =
-        dynamic_cast<const SubscriptionFilterQueryContainer *>(&container);
-    
-    if(p == 0)
+
+SubscriptionFilterQueryContainer::SubscriptionFilterQueryContainer(
+    const OperationContext::Container& container)
+{
+    const SubscriptionFilterQueryContainer* p =
+        dynamic_cast<const SubscriptionFilterQueryContainer*>(&container);
+
+    if (p == 0)
     {
         throw DynamicCastFailedException();
     }
-    
+
     _rep = new SubscriptionFilterQueryContainerRep();
     _rep->filterQuery = p->_rep->filterQuery;
     _rep->queryLanguage = p->_rep->queryLanguage;
     _rep->sourceNameSpace = p->_rep->sourceNameSpace;
-}   
+}
 
-SubscriptionFilterQueryContainer::SubscriptionFilterQueryContainer
-    (const SubscriptionFilterQueryContainer & container)
-#if defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU) || defined(PEGASUS_PLATFORM_DARWIN_PPC_GNU)
-     : OperationContext::Container()
+SubscriptionFilterQueryContainer::SubscriptionFilterQueryContainer(
+    const SubscriptionFilterQueryContainer& container)
+#if defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU) || \
+    defined(PEGASUS_PLATFORM_DARWIN_PPC_GNU)
+    : OperationContext::Container()
 #endif
 {
     _rep = new SubscriptionFilterQueryContainerRep();
@@ -595,67 +590,68 @@ SubscriptionFilterQueryContainer::SubscriptionFilterQueryContainer
 }
 
 SubscriptionFilterQueryContainer::SubscriptionFilterQueryContainer(
-    const String & filterQuery,
-    const String & queryLanguage,
-    const CIMNamespaceName & sourceNameSpace)
-{   
+    const String& filterQuery,
+    const String& queryLanguage,
+    const CIMNamespaceName& sourceNameSpace)
+{
     _rep = new SubscriptionFilterQueryContainerRep();
     _rep->filterQuery = filterQuery;
     _rep->queryLanguage = queryLanguage;
     _rep->sourceNameSpace = sourceNameSpace;
 }
 
-SubscriptionFilterQueryContainer::~SubscriptionFilterQueryContainer
-    (void)
+SubscriptionFilterQueryContainer::~SubscriptionFilterQueryContainer()
 {
     delete _rep;
 }
-SubscriptionFilterQueryContainer &
+
+SubscriptionFilterQueryContainer&
     SubscriptionFilterQueryContainer::operator=(
-    const SubscriptionFilterQueryContainer & container)
+        const SubscriptionFilterQueryContainer& container)
 {
     if (this == &container)
     {
-        return (*this);
+        return *this;
     }
 
     _rep->filterQuery = container._rep->filterQuery;
     _rep->queryLanguage = container._rep->queryLanguage;
     _rep->sourceNameSpace = container._rep->sourceNameSpace;
 
-    return (*this);
+    return *this;
 }
 
-String SubscriptionFilterQueryContainer::getName(void) const
-{   
-    return(NAME);
+String SubscriptionFilterQueryContainer::getName() const
+{
+    return NAME;
 }
 
-OperationContext::Container * SubscriptionFilterQueryContainer::clone(void) const
-{  
-    return(new SubscriptionFilterQueryContainer(_rep->filterQuery,
-                                                _rep->queryLanguage,
-                                                _rep->sourceNameSpace));
+OperationContext::Container* SubscriptionFilterQueryContainer::clone() const
+{
+    return new SubscriptionFilterQueryContainer(
+        _rep->filterQuery,
+        _rep->queryLanguage,
+        _rep->sourceNameSpace);
 }
 
-void SubscriptionFilterQueryContainer::destroy(void)
-{   
+void SubscriptionFilterQueryContainer::destroy()
+{
     delete this;
 }
 
-String SubscriptionFilterQueryContainer::getFilterQuery(void) const
+String SubscriptionFilterQueryContainer::getFilterQuery() const
 {
-    return(_rep->filterQuery);
+    return _rep->filterQuery;
 }
 
-String SubscriptionFilterQueryContainer::getQueryLanguage(void) const
+String SubscriptionFilterQueryContainer::getQueryLanguage() const
 {
-    return(_rep->queryLanguage);
+    return _rep->queryLanguage;
 }
 
-CIMNamespaceName SubscriptionFilterQueryContainer::getSourceNameSpace(void) const
+CIMNamespaceName SubscriptionFilterQueryContainer::getSourceNameSpace() const
 {
-    return(_rep->sourceNameSpace);
+    return _rep->sourceNameSpace;
 }
 
 
@@ -665,39 +661,40 @@ CIMNamespaceName SubscriptionFilterQueryContainer::getSourceNameSpace(void) cons
 
 const String TimeoutContainer::NAME = "TimeoutContainer";
 
-TimeoutContainer::TimeoutContainer(const OperationContext::Container & container)
+TimeoutContainer::TimeoutContainer(const OperationContext::Container& container)
 {
-   const TimeoutContainer * p = dynamic_cast<const TimeoutContainer *>(&container);
-   if(p == 0)
-   {
-      throw DynamicCastFailedException();
-   }
-   _value = p->_value;
+    const TimeoutContainer* p =
+        dynamic_cast<const TimeoutContainer*>(&container);
+    if (p == 0)
+    {
+        throw DynamicCastFailedException();
+    }
+    _value = p->_value;
 }
 
 TimeoutContainer::TimeoutContainer(Uint32 timeout)
 {
-   _value = timeout;
+    _value = timeout;
 }
 
-String TimeoutContainer::getName(void) const 
+String TimeoutContainer::getName() const
 {
-   return (NAME);
+    return NAME;
 }
 
-OperationContext::Container * TimeoutContainer::clone(void) const
+OperationContext::Container* TimeoutContainer::clone() const
 {
-   return (new TimeoutContainer(_value));
+    return new TimeoutContainer(_value);
 }
 
-void TimeoutContainer::destroy(void)
+void TimeoutContainer::destroy()
 {
-   delete this;
+    delete this;
 }
 
-Uint32 TimeoutContainer::getTimeOut(void) const
+Uint32 TimeoutContainer::getTimeOut() const
 {
-   return _value;
+    return _value;
 }
 
 
@@ -714,13 +711,13 @@ public:
 const String AcceptLanguageListContainer::NAME =
     "AcceptLanguageListContainer";
 
-AcceptLanguageListContainer::AcceptLanguageListContainer
-    (const OperationContext::Container & container)
+AcceptLanguageListContainer::AcceptLanguageListContainer(
+    const OperationContext::Container& container)
 {
-    const AcceptLanguageListContainer * p = 
-       dynamic_cast<const AcceptLanguageListContainer *>(&container);
+    const AcceptLanguageListContainer* p =
+        dynamic_cast<const AcceptLanguageListContainer*>(&container);
 
-    if(p == 0)
+    if (p == 0)
     {
         throw DynamicCastFailedException();
     }
@@ -729,59 +726,60 @@ AcceptLanguageListContainer::AcceptLanguageListContainer
     _rep->languages = p->_rep->languages;
 }
 
-AcceptLanguageListContainer::AcceptLanguageListContainer
-    (const AcceptLanguageListContainer & container)
-#if defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU) || defined(PEGASUS_PLATFORM_DARWIN_PPC_GNU)
-     : OperationContext::Container()
+AcceptLanguageListContainer::AcceptLanguageListContainer(
+    const AcceptLanguageListContainer& container)
+#if defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU) || \
+    defined(PEGASUS_PLATFORM_DARWIN_PPC_GNU)
+    : OperationContext::Container()
 #endif
 {
     _rep = new AcceptLanguageListContainerRep();
     _rep->languages = container._rep->languages;
 }
 
-AcceptLanguageListContainer::AcceptLanguageListContainer
-    (const AcceptLanguageList & languages)
+AcceptLanguageListContainer::AcceptLanguageListContainer(
+    const AcceptLanguageList& languages)
 {
     _rep = new AcceptLanguageListContainerRep();
     _rep->languages = languages;
 }
 
-AcceptLanguageListContainer::~AcceptLanguageListContainer(void)
+AcceptLanguageListContainer::~AcceptLanguageListContainer()
 {
     delete _rep;
 }
 
-AcceptLanguageListContainer & AcceptLanguageListContainer::operator=(
-    const AcceptLanguageListContainer & container)
+AcceptLanguageListContainer& AcceptLanguageListContainer::operator=(
+    const AcceptLanguageListContainer& container)
 {
     if (this == &container)
     {
-        return (*this);
+        return *this;
     }
 
     _rep->languages = container._rep->languages;
 
-    return (*this);
+    return *this;
 }
 
-String AcceptLanguageListContainer::getName(void) const
+String AcceptLanguageListContainer::getName() const
 {
-    return(NAME);
+    return NAME;
 }
 
-OperationContext::Container * AcceptLanguageListContainer::clone(void) const
+OperationContext::Container* AcceptLanguageListContainer::clone() const
 {
-    return(new AcceptLanguageListContainer(_rep->languages));
+    return new AcceptLanguageListContainer(_rep->languages);
 }
 
-void AcceptLanguageListContainer::destroy(void)
+void AcceptLanguageListContainer::destroy()
 {
     delete this;
 }
 
-AcceptLanguageList AcceptLanguageListContainer::getLanguages(void) const
+AcceptLanguageList AcceptLanguageListContainer::getLanguages() const
 {
-    return(_rep->languages);
+    return _rep->languages;
 }
 
 
@@ -798,13 +796,13 @@ public:
 const String ContentLanguageListContainer::NAME =
     "ContentLanguageListContainer";
 
-ContentLanguageListContainer::ContentLanguageListContainer
-    (const OperationContext::Container & container)
+ContentLanguageListContainer::ContentLanguageListContainer(
+    const OperationContext::Container& container)
 {
-    const ContentLanguageListContainer * p = 
-       dynamic_cast<const ContentLanguageListContainer *>(&container);
+    const ContentLanguageListContainer* p =
+        dynamic_cast<const ContentLanguageListContainer*>(&container);
 
-    if(p == 0)
+    if (p == 0)
     {
         throw DynamicCastFailedException();
     }
@@ -813,63 +811,63 @@ ContentLanguageListContainer::ContentLanguageListContainer
     _rep->languages = p->_rep->languages;
 }
 
-ContentLanguageListContainer::ContentLanguageListContainer
-    (const ContentLanguageListContainer & container)
-#if defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU) || defined(PEGASUS_PLATFORM_DARWIN_PPC_GNU)
-     : OperationContext::Container()
+ContentLanguageListContainer::ContentLanguageListContainer(
+    const ContentLanguageListContainer& container)
+#if defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU) || \
+    defined(PEGASUS_PLATFORM_DARWIN_PPC_GNU)
+    : OperationContext::Container()
 #endif
 {
     _rep = new ContentLanguageListContainerRep();
     _rep->languages = container._rep->languages;
 }
 
-ContentLanguageListContainer::ContentLanguageListContainer
-    (const ContentLanguageList & languages)
+ContentLanguageListContainer::ContentLanguageListContainer(
+    const ContentLanguageList& languages)
 {
     _rep = new ContentLanguageListContainerRep();
     _rep->languages = languages;
 }
 
-ContentLanguageListContainer::~ContentLanguageListContainer(void)
+ContentLanguageListContainer::~ContentLanguageListContainer()
 {
     delete _rep;
 }
 
-ContentLanguageListContainer & ContentLanguageListContainer::operator=(
-    const ContentLanguageListContainer & container)
+ContentLanguageListContainer& ContentLanguageListContainer::operator=(
+    const ContentLanguageListContainer& container)
 {
     if (this == &container)
     {
-        return (*this);
+        return *this;
     }
 
     _rep->languages = container._rep->languages;
 
-    return (*this);
+    return *this;
 }
 
-String ContentLanguageListContainer::getName(void) const
+String ContentLanguageListContainer::getName() const
 {
-    return(NAME);
+    return NAME;
 }
 
-OperationContext::Container * ContentLanguageListContainer::clone(void) const
+OperationContext::Container* ContentLanguageListContainer::clone() const
 {
-    return(new ContentLanguageListContainer(_rep->languages));
+    return new ContentLanguageListContainer(_rep->languages);
 }
 
-void ContentLanguageListContainer::destroy(void)
+void ContentLanguageListContainer::destroy()
 {
     delete this;
 }
 
-ContentLanguageList ContentLanguageListContainer::getLanguages(void) const
+ContentLanguageList ContentLanguageListContainer::getLanguages() const
 {
-    return(_rep->languages);
+    return _rep->languages;
 }
 
 
-
 //
 // SnmpTrapOidContainer
 //
@@ -883,13 +881,13 @@ public:
 const String SnmpTrapOidContainer::NAME =
     "SnmpTrapOidContainer";
 
-SnmpTrapOidContainer::SnmpTrapOidContainer
-    (const OperationContext::Container & container)
+SnmpTrapOidContainer::SnmpTrapOidContainer(
+    const OperationContext::Container& container)
 {
-    const SnmpTrapOidContainer * p =
-        dynamic_cast<const SnmpTrapOidContainer *>(&container);
+    const SnmpTrapOidContainer* p =
+        dynamic_cast<const SnmpTrapOidContainer*>(&container);
 
-    if(p == 0)
+    if (p == 0)
     {
         throw DynamicCastFailedException();
     }
@@ -898,59 +896,59 @@ SnmpTrapOidContainer::SnmpTrapOidContainer
     _rep->snmpTrapOid = p->_rep->snmpTrapOid;
 }
 
-SnmpTrapOidContainer::SnmpTrapOidContainer
-    (const SnmpTrapOidContainer & container)
-#if defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU) || defined(PEGASUS_PLATFORM_DARWIN_PPC_GNU)
-     : OperationContext::Container()
+SnmpTrapOidContainer::SnmpTrapOidContainer(
+    const SnmpTrapOidContainer& container)
+#if defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU) || \
+    defined(PEGASUS_PLATFORM_DARWIN_PPC_GNU)
+    : OperationContext::Container()
 #endif
 {
     _rep = new SnmpTrapOidContainerRep();
     _rep->snmpTrapOid = container._rep->snmpTrapOid;
 }
 
-SnmpTrapOidContainer::SnmpTrapOidContainer
-    (const String & snmpTrapOid)
+SnmpTrapOidContainer::SnmpTrapOidContainer(const String& snmpTrapOid)
 {
     _rep = new SnmpTrapOidContainerRep();
     _rep->snmpTrapOid = snmpTrapOid;
 }
 
-SnmpTrapOidContainer::~SnmpTrapOidContainer(void)
+SnmpTrapOidContainer::~SnmpTrapOidContainer()
 {
     delete _rep;
 }
 
-SnmpTrapOidContainer & SnmpTrapOidContainer::operator=(
-    const SnmpTrapOidContainer & container)
+SnmpTrapOidContainer& SnmpTrapOidContainer::operator=(
+    const SnmpTrapOidContainer& container)
 {
     if (this == &container)
     {
-        return (*this);
+        return *this;
     }
 
     _rep->snmpTrapOid = container._rep->snmpTrapOid;
 
-    return (*this);
+    return *this;
 }
 
-String SnmpTrapOidContainer::getName(void) const
+String SnmpTrapOidContainer::getName() const
 {
-    return(NAME);
+    return NAME;
 }
 
-OperationContext::Container * SnmpTrapOidContainer::clone(void) const
+OperationContext::Container* SnmpTrapOidContainer::clone() const
 {
-    return(new SnmpTrapOidContainer(_rep->snmpTrapOid));
+    return new SnmpTrapOidContainer(_rep->snmpTrapOid);
 }
 
-void SnmpTrapOidContainer::destroy(void)
+void SnmpTrapOidContainer::destroy()
 {
     delete this;
 }
 
-String SnmpTrapOidContainer::getSnmpTrapOid(void) const
+String SnmpTrapOidContainer::getSnmpTrapOid() const
 {
-    return(_rep->snmpTrapOid);
+    return _rep->snmpTrapOid;
 }
 
 PEGASUS_NAMESPACE_END
index fcc0e4b529681bed31bbbd96ba9c9b14365c05df..8558ab84729bc597a50d06c2b11c2466a61c40f3 100644 (file)
@@ -75,7 +75,7 @@ public:
         virtual String getName() const = 0;
 
         /**
-            Makes a copy of the Container object.  The caller is responsible 
+            Makes a copy of the Container object.  The caller is responsible
             for cleaning up the copy by calling destroy() method.
             @return A pointer to the new Container object.
         */
@@ -381,7 +381,7 @@ public:
         indication subscription filter.
     */
     SubscriptionFilterConditionContainer(
-        const String& filterCondition, 
+        const String& filterCondition,
         const String& queryLanguage);
 
     /**
@@ -664,7 +664,7 @@ public:
         The unique name for this container type.
     */
     static const String NAME;
-      
+
     /**
         Constructs a TimeoutContainer object from the specified Container.
         @param container The Container object to copy.
@@ -697,7 +697,7 @@ public:
         method.
     */
     virtual void destroy();
-      
+
     /**
         Gets the timeout value from the TimeoutContainer.
         @return An integer timeout value (in milliseconds).
@@ -751,7 +751,7 @@ public:
         that are acceptable in this context.
     */
     AcceptLanguageListContainer(const AcceptLanguageList& languages);
-    
+
     /**
         Destructs the AcceptLanguageListContainer.
     */
@@ -912,7 +912,7 @@ public:
         object is not an SnmpTrapOidContainer object.
     */
     SnmpTrapOidContainer(const OperationContext::Container& container);
-    
+
     /**
         Constructs a copy of the specified SnmpTrapOidContainer.
         @param container The SnmpTrapOidContainer object to copy.
index 85feed8afb14597ee050589e60c834546e49b266..9de16f7ff47f614ced15492a9dc702a2422412e5 100644 (file)
 //
 //==============================================================================
 //
-// Author: Chip Vincent (cvincent@us.ibm.com)
-//
-// Modified By:
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include "OperationContextInternal.h"
@@ -45,11 +41,11 @@ PEGASUS_NAMESPACE_BEGIN
 
 const String LocaleContainer::NAME = "LocaleContainer";
 
-LocaleContainer::LocaleContainer(const OperationContext::Container & container)
+LocaleContainer::LocaleContainer(const OperationContext::Container& container)
 {
-    const LocaleContainer * p = dynamic_cast<const LocaleContainer *>(&container);
+    const LocaleContainer* p = dynamic_cast<const LocaleContainer*>(&container);
 
-    if(p == 0)
+    if (p == 0)
     {
         throw DynamicCastFailedException();
     }
@@ -57,45 +53,45 @@ LocaleContainer::LocaleContainer(const OperationContext::Container & container)
     *this = *p;
 }
 
-LocaleContainer::LocaleContainer(const String & languageId)
+LocaleContainer::LocaleContainer(const String& languageId)
 {
     _languageId = languageId;
 }
 
-LocaleContainer::~LocaleContainer(void)
+LocaleContainer::~LocaleContainer()
 {
 }
 
-LocaleContainer & LocaleContainer::operator=(const LocaleContainer &container)
+LocaleContainer& LocaleContainer::operator=(const LocaleContainer&container)
 {
-    if(this == &container)
+    if (this == &container)
     {
-        return(*this);
+        return *this;
     }
 
     _languageId = container._languageId;
 
-    return(*this);
+    return *this;
 }
 
-String LocaleContainer::getName(void) const
+String LocaleContainer::getName() const
 {
-    return(NAME);
+    return NAME;
 }
 
-OperationContext::Container * LocaleContainer::clone(void) const
+OperationContext::Container* LocaleContainer::clone() const
 {
-    return(new LocaleContainer(*this));
+    return new LocaleContainer(*this);
 }
 
-void LocaleContainer::destroy(void)
+void LocaleContainer::destroy()
 {
     delete this;
 }
 
-String LocaleContainer::getLanguageId(void) const
+String LocaleContainer::getLanguageId() const
 {
-    return(_languageId);
+    return _languageId;
 }
 
 //
@@ -104,11 +100,13 @@ String LocaleContainer::getLanguageId(void) const
 
 const String ProviderIdContainer::NAME = "ProviderIdContainer";
 
-ProviderIdContainer::ProviderIdContainer(const OperationContext::Container & container)
+ProviderIdContainer::ProviderIdContainer(
+    const OperationContext::Container& container)
 {
-    const ProviderIdContainer * p = dynamic_cast<const ProviderIdContainer *>(&container);
+    const ProviderIdContainer* p =
+        dynamic_cast<const ProviderIdContainer*>(&container);
 
-    if(p == 0)
+    if (p == 0)
     {
         throw DynamicCastFailedException();
     }
@@ -117,10 +115,10 @@ ProviderIdContainer::ProviderIdContainer(const OperationContext::Container & con
 }
 
 ProviderIdContainer::ProviderIdContainer(
-    const CIMInstance & module,
-    const CIMInstance & provider,
+    const CIMInstance& module,
+    const CIMInstance& provider,
     Boolean isRemoteNameSpace,
-    const String & remoteInfo)
+    const String& remoteInfo)
     : _module(module),
     _provider(provider),
     _isRemoteNameSpace(isRemoteNameSpace),
@@ -128,15 +126,16 @@ ProviderIdContainer::ProviderIdContainer(
 {
 }
 
-ProviderIdContainer::~ProviderIdContainer(void)
+ProviderIdContainer::~ProviderIdContainer()
 {
 }
 
-ProviderIdContainer & ProviderIdContainer::operator=(const ProviderIdContainer & container)
+ProviderIdContainer& ProviderIdContainer::operator=(
+    const ProviderIdContainer& container)
 {
-    if(this == &container)
+    if (this == &container)
     {
-        return(*this);
+        return *this;
     }
 
     _module = container._module;
@@ -144,55 +143,58 @@ ProviderIdContainer & ProviderIdContainer::operator=(const ProviderIdContainer &
     _isRemoteNameSpace = container._isRemoteNameSpace;
     _remoteInfo = container._remoteInfo;
 
-    return(*this);
+    return *this;
 }
 
-String ProviderIdContainer::getName(void) const
+String ProviderIdContainer::getName() const
 {
-    return(NAME);
+    return NAME;
 }
 
-OperationContext::Container * ProviderIdContainer::clone(void) const
+OperationContext::Container* ProviderIdContainer::clone() const
 {
-    return(new ProviderIdContainer(*this));
+    return new ProviderIdContainer(*this);
 }
 
-void ProviderIdContainer::destroy(void)
+void ProviderIdContainer::destroy()
 {
     delete this;
 }
 
-CIMInstance ProviderIdContainer::getModule(void) const
+CIMInstance ProviderIdContainer::getModule() const
 {
-    return(_module);
+    return _module;
 }
 
-CIMInstance ProviderIdContainer::getProvider(void) const
+CIMInstance ProviderIdContainer::getProvider() const
 {
-    return(_provider);
+    return _provider;
 }
 
-Boolean ProviderIdContainer::isRemoteNameSpace(void) const
+Boolean ProviderIdContainer::isRemoteNameSpace() const
 {
-    return(_isRemoteNameSpace);
+    return _isRemoteNameSpace;
 }
 
-String ProviderIdContainer::getRemoteInfo(void) const
+String ProviderIdContainer::getRemoteInfo() const
 {
-    return(_remoteInfo);
+    return _remoteInfo;
 }
 
 //
 // CachedClassDefinitionContainer
 //
 
-const String CachedClassDefinitionContainer::NAME = "CachedClassDefinitionContainer";
+const String CachedClassDefinitionContainer::NAME =
+    "CachedClassDefinitionContainer";
 
-CachedClassDefinitionContainer::CachedClassDefinitionContainer(const OperationContext::Container & container)
+CachedClassDefinitionContainer::CachedClassDefinitionContainer(
+    const OperationContext::Container& container)
 {
-    const CachedClassDefinitionContainer * p = dynamic_cast<const CachedClassDefinitionContainer *>(&container);
+    const CachedClassDefinitionContainer* p =
+        dynamic_cast<const CachedClassDefinitionContainer*>(&container);
 
-    if(p == 0)
+    if (p == 0)
     {
         throw DynamicCastFailedException();
     }
@@ -201,45 +203,47 @@ CachedClassDefinitionContainer::CachedClassDefinitionContainer(const OperationCo
 }
 
 
-CachedClassDefinitionContainer::CachedClassDefinitionContainer(const CIMClass & cimClass)
+CachedClassDefinitionContainer::CachedClassDefinitionContainer(
+    const CIMClass& cimClass)
     : _cimClass(cimClass)
 {
 }
 
-CachedClassDefinitionContainer::~CachedClassDefinitionContainer(void)
+CachedClassDefinitionContainer::~CachedClassDefinitionContainer()
 {
 }
 
-CachedClassDefinitionContainer & CachedClassDefinitionContainer::operator=(const CachedClassDefinitionContainer & container)
+CachedClassDefinitionContainer& CachedClassDefinitionContainer::operator=(
+    const CachedClassDefinitionContainer& container)
 {
-    if(this == &container)
+    if (this == &container)
     {
-        return(*this);
+        return *this;
     }
 
     _cimClass = container._cimClass;
 
-    return(*this);
+    return *this;
 }
 
-String CachedClassDefinitionContainer::getName(void) const
+String CachedClassDefinitionContainer::getName() const
 {
-    return(NAME);
+    return NAME;
 }
 
-OperationContext::Container * CachedClassDefinitionContainer::clone(void) const
+OperationContext::Container* CachedClassDefinitionContainer::clone() const
 {
-    return(new CachedClassDefinitionContainer(*this));
+    return new CachedClassDefinitionContainer(*this);
 }
 
-void CachedClassDefinitionContainer::destroy(void)
+void CachedClassDefinitionContainer::destroy()
 {
     delete this;
 }
 
-CIMClass CachedClassDefinitionContainer::getClass(void) const
+CIMClass CachedClassDefinitionContainer::getClass() const
 {
-    return(_cimClass);
+    return _cimClass;
 }
 
 //
@@ -249,12 +253,12 @@ CIMClass CachedClassDefinitionContainer::getClass(void) const
 const String NormalizerContextContainer::NAME = "NormalizerContextContainer";
 
 NormalizerContextContainer::NormalizerContextContainer(
-    const OperationContext::Container & container)
+    const OperationContext::Container& container)
 {
-    const NormalizerContextContainer * p =
-        dynamic_cast<const NormalizerContextContainer *>(&container);
+    const NormalizerContextContainer* p =
+        dynamic_cast<const NormalizerContextContainer*>(&container);
 
-    if(p == 0)
+    if (p == 0)
     {
         throw DynamicCastFailedException();
     }
@@ -264,19 +268,19 @@ NormalizerContextContainer::NormalizerContextContainer(
 
 
 NormalizerContextContainer::NormalizerContextContainer(
-    AutoPtr<NormalizerContext> & context) : normalizerContext(context.get())
+    AutoPtr<NormalizerContext>& context) : normalizerContext(context.get())
 {
   context.release();
 }
 
 NormalizerContextContainer::NormalizerContextContainer(
-    const NormalizerContextContainer & container)
+    const NormalizerContextContainer& container)
 #if defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU) || \
     defined (PEGASUS_PLATFORM_DARWIN_PPC_GNU)
     : OperationContext::Container()
 #endif
 {
-    if(this != &container)
+    if (this != &container)
     {
         normalizerContext.reset(container.normalizerContext->clone().release());
     }
@@ -286,27 +290,27 @@ NormalizerContextContainer::~NormalizerContextContainer()
 {
 }
 
-NormalizerContextContainer & NormalizerContextContainer::operator=(
-  const NormalizerContextContainer & container)
+NormalizerContextContainer& NormalizerContextContainer::operator=(
+    const NormalizerContextContainer& container)
 {
-    if(this == &container)
+    if (this == &container)
     {
-        return(*this);
+        return *this;
     }
 
     normalizerContext.reset(container.normalizerContext->clone().release());
 
-    return(*this);
+    return *this;
 }
 
 String NormalizerContextContainer::getName() const
 {
-    return(NAME);
+    return NAME;
 }
 
-OperationContext::Container * NormalizerContextContainer::clone() const
+OperationContext::Container* NormalizerContextContainer::clone() const
 {
-    return(new NormalizerContextContainer(*this));
+    return new NormalizerContextContainer(*this);
 }
 
 void NormalizerContextContainer::destroy()
@@ -314,7 +318,7 @@ void NormalizerContextContainer::destroy()
     delete this;
 }
 
-NormalizerContext * NormalizerContextContainer::getContext() const
+NormalizerContext* NormalizerContextContainer::getContext() const
 {
     return normalizerContext.get();
 }
index 4455e723b770b22c0119b037eacc7ca3700d9b39..e754ad51202bd4bba446e3f4994868107238fa65 100644 (file)
 //
 //==============================================================================
 //
-// Author: Chip Vincent (cvincent@us.ibm.com)
-//
-// Modified By: Mike Day (mdday@us.ibm.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_OperationContextInternal_h
@@ -56,20 +52,20 @@ class PEGASUS_COMMON_LINKAGE LocaleContainer
 public:
     static const String NAME;
 
-    LocaleContainer(const OperationContext::Container & container);
-    LocaleContainer(const String & languageId);
-    virtual ~LocaleContainer(void);
+    LocaleContainer(const OperationContext::Container& container);
+    LocaleContainer(const String& languageId);
+    virtual ~LocaleContainer();
 
     // NOTE: The compiler default implementation of the copy constructor
     // is used for this class.
 
-    LocaleContainer & operator=(const LocaleContainer & container);
+    LocaleContainer& operator=(const LocaleContainer& container);
 
-    virtual String getName(void) const;
-    virtual OperationContext::Container * clone(void) const;
-    virtual void destroy(void);
+    virtual String getName() const;
+    virtual OperationContext::Container* clone() const;
+    virtual void destroy();
 
-    String getLanguageId(void) const;
+    String getLanguageId() const;
 
 protected:
     String _languageId;
@@ -82,24 +78,27 @@ class PEGASUS_COMMON_LINKAGE ProviderIdContainer
 public:
     static const String NAME;
 
-    ProviderIdContainer(const OperationContext::Container & container);
-    ProviderIdContainer(const CIMInstance & module, const CIMInstance & provider,
-        Boolean isRemoteNameSpace = false, const String & remoteInfo = String::EMPTY);
-    virtual ~ProviderIdContainer(void);
+    ProviderIdContainer(const OperationContext::Container& container);
+    ProviderIdContainer(
+        const CIMInstance& module,
+        const CIMInstance& provider,
+        Boolean isRemoteNameSpace = false,
+        const String& remoteInfo = String::EMPTY);
+    virtual ~ProviderIdContainer();
 
     // NOTE: The compiler default implementation of the copy constructor
     // is used for this class.
 
-    ProviderIdContainer & operator=(const ProviderIdContainer & container);
+    ProviderIdContainer& operator=(const ProviderIdContainer& container);
 
-    virtual String getName(void) const;
-    virtual OperationContext::Container * clone(void) const;
-    virtual void destroy(void);
+    virtual String getName() const;
+    virtual OperationContext::Container* clone() const;
+    virtual void destroy();
 
-    CIMInstance getModule(void) const;
-    CIMInstance getProvider(void) const;
-    Boolean isRemoteNameSpace(void) const;
-    String getRemoteInfo(void) const;
+    CIMInstance getModule() const;
+    CIMInstance getProvider() const;
+    Boolean isRemoteNameSpace() const;
+    String getRemoteInfo() const;
 
 protected:
     CIMInstance _module;
@@ -115,20 +114,22 @@ class PEGASUS_COMMON_LINKAGE CachedClassDefinitionContainer
 public:
     static const String NAME;
 
-    CachedClassDefinitionContainer(const OperationContext::Container & container);
-    CachedClassDefinitionContainer(const CIMClass & cimClass);
-    virtual ~CachedClassDefinitionContainer(void);
+    CachedClassDefinitionContainer(
+        const OperationContext::Container& container);
+    CachedClassDefinitionContainer(const CIMClass& cimClass);
+    virtual ~CachedClassDefinitionContainer();
 
     // NOTE: The compiler default implementation of the copy constructor
     // is used for this class.
 
-    CachedClassDefinitionContainer & operator=(const CachedClassDefinitionContainer & container);
+    CachedClassDefinitionContainer& operator=(
+        const CachedClassDefinitionContainer& container);
 
-    virtual String getName(void) const;
-    virtual OperationContext::Container * clone(void) const;
-    virtual void destroy(void);
+    virtual String getName() const;
+    virtual OperationContext::Container* clone() const;
+    virtual void destroy();
 
-    CIMClass getClass(void) const;
+    CIMClass getClass() const;
 
 protected:
     CIMClass _cimClass;
@@ -141,22 +142,23 @@ class PEGASUS_COMMON_LINKAGE NormalizerContextContainer
 public:
     static const String NAME;
 
-    NormalizerContextContainer(const OperationContext::Container & container);
-    NormalizerContextContainer(AutoPtr<NormalizerContext> & context);
-    NormalizerContextContainer(const NormalizerContextContainer & container);
-    virtual ~NormalizerContextContainer(void);
+    NormalizerContextContainer(const OperationContext::Container& container);
+    NormalizerContextContainer(AutoPtr<NormalizerContext>& context);
+    NormalizerContextContainer(const NormalizerContextContainer& container);
+    virtual ~NormalizerContextContainer();
 
-    NormalizerContextContainer & operator=(const NormalizerContextContainer & container);
+    NormalizerContextContainer& operator=(
+        const NormalizerContextContainer& container);
 
-    virtual String getName(void) const;
-    virtual OperationContext::Container * clone(void) const;
-    virtual void destroy(void);
+    virtual String getName() const;
+    virtual OperationContext::Container* clone() const;
+    virtual void destroy();
 
-    NormalizerContext * getContext(void) const;
+    NormalizerContext* getContext() const;
 
 protected:
     AutoPtr<NormalizerContext> normalizerContext;
-    
+
 private:
     NormalizerContextContainer();
 };
index 49c074e4936ace49774c81579758defcb7b9d136..16c25db1ba9f91b2ea5cc9f38e689a89d6df2407 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By: Karl Schopmeyer(k.schopmeyer@opengroup.org)
-//                 June 2001 - Extend help and print to include help description
-//                 Feb 2002 - ad IsTrue
-//              Amit K Arora, IBM (amita@in.ibm.com) for PEP#101
-//              David Dillard, VERITAS Software Corp.
-//                  (david.dillard@veritas.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include <cstdlib>
@@ -91,16 +82,16 @@ OptionManager::~OptionManager()
     // Delete all options in the list:
 
     for (Uint32 i = 0; i < _options.size(); i++)
-       delete _options[i];
+        delete _options[i];
 }
 
 void OptionManager::registerOption(Option* option)
 {
     if (!option)
-       throw NullPointer();
+        throw NullPointer();
 
     if (lookupOption(option->getOptionName()))
-       throw OMDuplicateOption(option->getOptionName());
+        throw OMDuplicateOption(option->getOptionName());
 
     _options.append(option);
 }
@@ -110,132 +101,135 @@ void OptionManager::registerOptions(OptionRow* optionRow, Uint32 numOptions)
 {
     for (Uint32 i = 0; i < numOptions; i++)
     {
-       // Get option name:
+        // Get option name:
 
-       if (!optionRow[i].optionName)
-           throw NullPointer();
+        if (!optionRow[i].optionName)
+            throw NullPointer();
 
-       String optionName = optionRow[i].optionName;
+        String optionName = optionRow[i].optionName;
 
-       // Get default value:
+        // Get default value:
 
-       String defaultValue;
+        String defaultValue;
 
-       if (optionRow[i].defaultValue)
-           defaultValue = optionRow[i].defaultValue;
+        if (optionRow[i].defaultValue)
+            defaultValue = optionRow[i].defaultValue;
 
-       // Get the required flag:
+        // Get the required flag:
 
-       Boolean required = optionRow[i].required != 0;
+        Boolean required = optionRow[i].required != 0;
 
-       // Get the type:
+        // Get the type:
 
-       Option::Type type = optionRow[i].type;
+        Option::Type type = optionRow[i].type;
 
-       // Get the domain:
+        // Get the domain:
 
-       Array<String> domain;
+        Array<String> domain;
 
-       if (optionRow[i].domain)
-       {
-           Uint32 domainSize = optionRow[i].domainSize;
+        if (optionRow[i].domain)
+        {
+            Uint32 domainSize = optionRow[i].domainSize;
 
-           for (Uint32 j = 0; j < domainSize; j++)
-               domain.append(optionRow[i].domain[j]);
-       }
+            for (Uint32 j = 0; j < domainSize; j++)
+                domain.append(optionRow[i].domain[j]);
+        }
 
-       // Get commandLineOptionName:
+        // Get commandLineOptionName:
 
-       String commandLineOptionName;
+        String commandLineOptionName;
 
-       if (optionRow[i].commandLineOptionName)
-           commandLineOptionName = optionRow[i].commandLineOptionName;
+        if (optionRow[i].commandLineOptionName)
+            commandLineOptionName = optionRow[i].commandLineOptionName;
 
-       // get optionHelp Message String
+        // get optionHelp Message String
 
-       String optionHelpMessage;
+        String optionHelpMessage;
 
-       if (optionRow[i].optionHelpMessage)
-           optionHelpMessage = optionRow[i].optionHelpMessage;
+        if (optionRow[i].optionHelpMessage)
+            optionHelpMessage = optionRow[i].optionHelpMessage;
 
-       // Add the option:
+        // Add the option:
 
-       Option* option = new Option(
-           optionName,
-           defaultValue,
-           required,
-           type,
-           domain,
-           commandLineOptionName,
-           optionHelpMessage);
+        Option* option = new Option(
+            optionName,
+            defaultValue,
+            required,
+            type,
+            domain,
+            commandLineOptionName,
+            optionHelpMessage);
 
-       registerOption(option);
+        registerOption(option);
     }
 }
 
-void OptionManager::mergeCommandLine(int& argc, char**& argv, Boolean abortOnErr)
+void OptionManager::mergeCommandLine(
+    int& argc,
+    char**& argv,
+    Boolean abortOnErr)
 {
     for (int i = 0; i < argc; )
     {
-       // Check for -option:
+        // Check for -option:
 
-       const char* arg = argv[i];
+        const char* arg = argv[i];
 
-       if (*arg == '-')
-       {
-           // Look for the option:
+        if (*arg == '-')
+        {
+            // Look for the option:
 
-           Option* option = _lookupOptionByCommandLineOptionName(arg + 1);
+            Option* option = _lookupOptionByCommandLineOptionName(arg + 1);
 
-           if (!option)
-           {
-               if (abortOnErr)
+            if (!option)
+            {
+                if (abortOnErr)
                 {
                     throw OMMBadCmdLineOption(arg);
                 }
                 else
                 {
                     i++;
-                   continue;
+                    continue;
                 }
-           }
+            }
 
-           // Get the option argument if any:
+            // Get the option argument if any:
 
-           const char* optionArgument = "true";
+            const char* optionArgument = "true";
 
-           if (option->getType() != Option::BOOLEAN)
-           {
-               if (i + 1 == argc)
-                   throw OMMissingCommandLineOptionArgument(arg);
+            if (option->getType() != Option::BOOLEAN)
+            {
+                if (i + 1 == argc)
+                    throw OMMissingCommandLineOptionArgument(arg);
 
-               optionArgument = argv[i + 1];
-           }
+                optionArgument = argv[i + 1];
+            }
 
-           // Validate the value:
+            // Validate the value:
 
-           if (!option->isValid(optionArgument))
-               throw OMInvalidOptionValue(arg, optionArgument);
+            if (!option->isValid(optionArgument))
+                throw OMInvalidOptionValue(arg, optionArgument);
 
-           // Set the value:
+            // Set the value:
 
-           option->setValue(optionArgument);
+            option->setValue(optionArgument);
 
-           // Remove the option and its argument from the command line:
+            // Remove the option and its argument from the command line:
 
-           if (option->getType() == Option::BOOLEAN)
-           {
-               memmove(&argv[i], &argv[i + 1], (argc-i) * sizeof(char*));
-               argc--;
-           }
-           else
-           {
-               memmove(&argv[i], &argv[i + 2], (argc-i-1) * sizeof(char*));
-               argc -= 2;
-           }
-       }
-       else
-           i++;
+            if (option->getType() == Option::BOOLEAN)
+            {
+                memmove(&argv[i], &argv[i + 1], (argc-i) * sizeof(char*));
+                argc--;
+            }
+            else
+            {
+                memmove(&argv[i], &argv[i + 2], (argc-i-1) * sizeof(char*));
+                argc -= 2;
+            }
+        }
+        else
+            i++;
     }
 }
 
@@ -249,7 +243,7 @@ void OptionManager::mergeFile(const String& fileName)
 #endif
 
     if (!is)
-       throw NoSuchFile(fileName);
+        throw NoSuchFile(fileName);
 
     // For each line of the file:
 
@@ -257,128 +251,128 @@ void OptionManager::mergeFile(const String& fileName)
 
     for (Uint32 lineNumber = 1; GetLine(is, line); lineNumber++)
     {
-       // -- Get the identifier and value:
+        // -- Get the identifier and value:
 
-       if (line[0] == '#')
-           continue;
+        if (line[0] == '#')
+            continue;
 
-       // Skip leading whitespace:
+        // Skip leading whitespace:
 
-       const Char16* p = line.getChar16Data();
+        const Char16* p = line.getChar16Data();
 
-       while (*p && isspace(*p))
-           p++;
+        while (*p && isspace(*p))
+            p++;
 
-       if (!*p)
-           continue;
+        if (!*p)
+            continue;
 
-       if (*p == '#')
-           continue;
+        if (*p == '#')
+            continue;
 
-       // Get the identifier:
+        // Get the identifier:
 
-       String ident;
+        String ident;
 
-       if (!(isalpha(*p) || *p == '_'))
-           throw OMConfigFileSyntaxError(fileName, lineNumber);
+        if (!(isalpha(*p) || *p == '_'))
+            throw OMConfigFileSyntaxError(fileName, lineNumber);
 
-       ident.append(*p++);
+        ident.append(*p++);
 
-       while (isalnum(*p) || *p == '_')
-           ident.append(*p++);
+        while (isalnum(*p) || *p == '_')
+            ident.append(*p++);
 
-       // Skip whitespace after identifier:
+        // Skip whitespace after identifier:
 
-       while (*p && isspace(*p))
-           p++;
+        while (*p && isspace(*p))
+            p++;
 
-       // Expect an equal sign:
+        // Expect an equal sign:
 
-       if (*p != '=')
-           throw OMConfigFileSyntaxError(fileName, lineNumber);
-       p++;
+        if (*p != '=')
+            throw OMConfigFileSyntaxError(fileName, lineNumber);
+        p++;
 
-       // Skip whitespace after equal sign:
+        // Skip whitespace after equal sign:
 
-       while (*p && isspace(*p))
-           p++;
+        while (*p && isspace(*p))
+            p++;
 
-       // Expect open quote:
+        // Expect open quote:
 
-       if (*p != '"')
-           throw OMConfigFileSyntaxError(fileName, lineNumber);
-       p++;
+        if (*p != '"')
+            throw OMConfigFileSyntaxError(fileName, lineNumber);
+        p++;
 
-       // Get the value:
+        // Get the value:
 
-       String value;
+        String value;
 
-       while (*p && *p != '"')
-       {
-           if (*p == '\\')
-           {
-               p++;
+        while (*p && *p != '"')
+        {
+            if (*p == '\\')
+            {
+                p++;
 
-               switch (*p)
-               {
-                   case 'n':
-                       value.append('\n');
-                       break;
+                switch (*p)
+                {
+                    case 'n':
+                        value.append('\n');
+                        break;
 
-                   case 'r':
-                       value.append('\r');
-                       break;
+                    case 'r':
+                        value.append('\r');
+                        break;
 
-                   case 't':
-                       value.append('\t');
-                       break;
+                    case 't':
+                        value.append('\t');
+                        break;
 
-                   case 'f':
-                       value.append('\f');
-                       break;
+                    case 'f':
+                        value.append('\f');
+                        break;
 
-                   case '"':
-                       value.append('"');
-                       break;
+                    case '"':
+                        value.append('"');
+                        break;
 
-                   case '\0':
-                       throw OMConfigFileSyntaxError(fileName, lineNumber);
+                    case '\0':
+                        throw OMConfigFileSyntaxError(fileName, lineNumber);
 
-                   default:
-                       value.append(*p);
-               }
-               p++;
-           }
-           else
-               value.append(*p++);
-       }
+                    default:
+                        value.append(*p);
+                }
+                p++;
+            }
+            else
+                value.append(*p++);
+        }
 
 
-       // Expect close quote:
+        // Expect close quote:
 
-       if (*p != '"')
-           throw OMConfigFileSyntaxError(fileName, lineNumber);
-       p++;
+        if (*p != '"')
+            throw OMConfigFileSyntaxError(fileName, lineNumber);
+        p++;
 
-       // Skip whitespace through end of line:
+        // Skip whitespace through end of line:
 
-       while (*p && isspace(*p))
-           p++;
+        while (*p && isspace(*p))
+            p++;
 
-       if (*p)
-           throw OMConfigFileSyntaxError(fileName, lineNumber);
+        if (*p)
+            throw OMConfigFileSyntaxError(fileName, lineNumber);
 
-       // Now that we have the identifier and value, merge it:
+        // Now that we have the identifier and value, merge it:
 
-       Option* option = (Option*)lookupOption(ident);
+        Option* option = (Option*)lookupOption(ident);
 
-       if (!option)
-           throw OMUnrecognizedConfigFileOption(ident);
+        if (!option)
+            throw OMUnrecognizedConfigFileOption(ident);
 
-       if (!option->isValid(value))
-           throw OMInvalidOptionValue(ident, value);
+        if (!option->isValid(value))
+            throw OMInvalidOptionValue(ident, value);
 
-       option->setValue(value);
+        option->setValue(value);
     }
 }
 
@@ -386,10 +380,10 @@ void OptionManager::checkRequiredOptions() const
 {
     for (Uint32 i = 0; i < _options.size(); i++)
     {
-       const Option* option = _options[i];
+        const Option* option = _options[i];
 
-       if (option->getRequired() && !option->isResolved())
-           throw OMMissingRequiredOptionValue(option->getOptionName());
+        if (option->getRequired() && !option->isResolved())
+            throw OMMissingRequiredOptionValue(option->getOptionName());
     }
 }
 
@@ -397,8 +391,8 @@ const Option* OptionManager::lookupOption(const String& name) const
 {
     for (Uint32 i = 0; i < _options.size(); i++)
     {
-       if (_options[i]->getOptionName() == name)
-           return _options[i];
+        if (_options[i]->getOptionName() == name)
+            return _options[i];
     }
 
     return 0;
@@ -409,34 +403,37 @@ Boolean OptionManager::lookupValue(const String& name, String& value) const
     const Option* option = lookupOption(name);
 
     if (!option)
-       return false;
+        return false;
 
     value = option->getValue();
     return true;
 }
 
-Boolean OptionManager::lookupIntegerValue(const String& name, Uint32& value) const
+Boolean OptionManager::lookupIntegerValue(
+    const String& name,
+    Uint32& value) const
 {
     //ATTN: KS P1 7 May 2002 - Add test for Integer type in om table.
     String valueString;
     if (lookupValue(name, valueString))
     {
-       value = atol(valueString.getCString());
-       return true;
+        value = atol(valueString.getCString());
+        return true;
     }
     else
     {
-       return false;
+        return false;
     }
 
 }
 
-Boolean OptionManager::valueEquals(const String& name, const String& value)
-    const
+Boolean OptionManager::valueEquals(
+    const String& name,
+    const String& value) const
 {
     String optionString;
 
-    return (lookupValue(name, optionString) && optionString == value) ? true : false;
+    return (lookupValue(name, optionString) && optionString == value);
 }
 
 Boolean OptionManager::isTrue(const String& name) const
@@ -444,17 +441,19 @@ Boolean OptionManager::isTrue(const String& name) const
     //ATTN: KS 7 May 2002 P3 Add test to confirm boolean type
     return valueEquals(name, "true") ? true: false;
 }
+
 /*  ATTN: P3 MB 2001 Buried this one for the moment to think about it.
-Uint32 OptionManager::isStringInOptionMask(const String& option,
-                                          const String& entry)
+Uint32 OptionManager::isStringInOptionMask(
+    const String& option,
+    const String& entry)
 {
     String optionString;
 
     if (lookupValue(name, optionString) && optionString == value)
-       if (optionString.find(entry)
-           return 1;
+        if (optionString.find(entry)
+            return 1;
     else
-       return PEG_NOT_FOUND;
+        return PEG_NOT_FOUND;
 }
 */
 
@@ -462,8 +461,8 @@ Option* OptionManager::_lookupOptionByCommandLineOptionName(const String& name)
 {
     for (Uint32 i = 0; i < _options.size(); i++)
     {
-       if (_options[i]->getCommandLineOptionName() == name)
-           return _options[i];
+        if (_options[i]->getCommandLineOptionName() == name)
+            return _options[i];
     }
 
     return 0;
@@ -473,10 +472,10 @@ void OptionManager::print() const
 {
     for (Uint32 i = 0; i < _options.size(); i++)
     {
-       Option* option = _options[i];
-       cout << option->getOptionName() << "=\"";
-       cout << option->getValue() << "\" ";
-       cout << option->getOptionHelpMessage() << "\n";
+        Option* option = _options[i];
+        cout << option->getOptionName() << "=\"";
+        cout << option->getValue() << "\" ";
+        cout << option->getOptionHelpMessage() << "\n";
     }
     cout << endl;
 }
@@ -485,18 +484,20 @@ void OptionManager::printOptionsHelp() const
 {
     for (Uint32 i = 0; i < _options.size(); i++)
     {
-       Option* option = _options[i];
-       cout << " -";
-       cout << option->getCommandLineOptionName() << "  ";
-       cout << option->getOptionName() << ". ";
-       cout << option->getOptionHelpMessage();
+        Option* option = _options[i];
+        cout << " -";
+        cout << option->getCommandLineOptionName() << "  ";
+        cout << option->getOptionName() << ". ";
+        cout << option->getOptionHelpMessage();
         cout << ". Default(" << option->getDefaultValue() << ")\n";
     }
     cout << endl;
 
 }
 
-void OptionManager::printOptionsHelpTxt(const String& header, const String& trailer) const
+void OptionManager::printOptionsHelpTxt(
+    const String& header,
+    const String& trailer) const
 {
     cout << "\n" << header << "\n";
     printOptionsHelp();
@@ -529,7 +530,7 @@ Option::Option(
     _resolved(false)
 {
     if (!isValid(_value))
-       throw OMInvalidOptionValue(_optionName, _value);
+        throw OMInvalidOptionValue(_optionName, _value);
 }
 
 Option::Option(const Option& x)
@@ -555,14 +556,14 @@ Option& Option::operator=(const Option& x)
 {
     if (this != &x)
     {
-       _optionName = x._optionName;
-       _defaultValue = x._defaultValue;
-       _value = x._value;
-       _required = x._required;
-       _type = x._type;
-       _domain = x._domain;
-       _commandLineOptionName = x._commandLineOptionName;
-       _optionHelpMessage = x._optionHelpMessage;
+        _optionName = x._optionName;
+        _defaultValue = x._defaultValue;
+        _value = x._value;
+        _required = x._required;
+        _type = x._type;
+        _domain = x._domain;
+        _commandLineOptionName = x._commandLineOptionName;
+        _optionHelpMessage = x._optionHelpMessage;
     }
     return *this;
 }
@@ -575,59 +576,59 @@ Boolean Option::isValid(const String& value) const
 
     if (domainSize)
     {
-       Boolean found = false;
+        Boolean found = false;
 
-       for (Uint32 i = 0; i < domainSize; i++)
-       {
-           if (value == _domain[i])
-               found = true;
-       }
+        for (Uint32 i = 0; i < domainSize; i++)
+        {
+            if (value == _domain[i])
+                found = true;
+        }
 
-       if (!found)
-           return false;
+        if (!found)
+            return false;
     }
 
     // Check the type:
 
     switch (_type)
     {
-       case BOOLEAN:
-       {
-           if (value == "true" || value == "false")
-               return true;
+        case BOOLEAN:
+        {
+            if (value == "true" || value == "false")
+                return true;
             else
                 return false;
-       }
+        }
 
-       case STRING:
-           return true;
+        case STRING:
+            return true;
 
-       case INTEGER:
-       case NATURAL_NUMBER:
-       case WHOLE_NUMBER:
-       {
-           CString tmp = value.getCString();
-           char* end = 0;
-           long x = strtol(tmp, &end, 10);
+        case INTEGER:
+        case NATURAL_NUMBER:
+        case WHOLE_NUMBER:
+        {
+            CString tmp = value.getCString();
+            char* end = 0;
+            long x = strtol(tmp, &end, 10);
 
-           if (!end || *end != '\0')
-               return false;
+            if (!end || *end != '\0')
+                return false;
 
-           switch (_type)
-           {
-               case INTEGER:
-                   return true;
+            switch (_type)
+            {
+                case INTEGER:
+                    return true;
 
-               case NATURAL_NUMBER:
-                   return x >= 1;
+                case NATURAL_NUMBER:
+                    return x >= 1;
 
-               case WHOLE_NUMBER:
-                   return x >= 0;
+                case WHOLE_NUMBER:
+                    return x >= 0;
 
-               default:
-                   break;
-           }
-       }
+                default:
+                    break;
+            }
+        }
     }
 
     // Unreachable!
@@ -645,11 +646,10 @@ String OMConfigFileSyntaxError::_formatMessage(
 {
     char buffer[32];
     sprintf(buffer, "%d", line);
-        //l10n
-        MessageLoaderParms parms("Common.OptionManager.SYNTAX_ERR_CONFIG_FILE",
-                                                                        "Syntax error in configuration file: ");
-        String result = MessageLoader::getMessage(parms);
-    //String result = "Syntax error in configuration file: ";
+    MessageLoaderParms parms(
+        "Common.OptionManager.SYNTAX_ERR_CONFIG_FILE",
+        "Syntax error in configuration file: ");
+    String result = MessageLoader::getMessage(parms);
     result.append(file);
     result.append("(");
     result.append(buffer);
index f4899f884fa0d79d1cb881f114c77fa130d23474..5864936d53192787b73c89715a8b79895eab2727 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By: Karl Schopmyer(k.schopmeyer@opengroup.org)
-//              David Dillard, VERITAS Software Corp.
-//                  (david.dillard@veritas.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////
@@ -44,7 +38,7 @@
 //   The OptionManager Class
 //   The Option Class - Used to define information about an option
 //   The Option Row structure - Used to define option declarations in a
-//     program
+//      program
 //   The optionexcptions Class
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -76,8 +70,8 @@ typedef Option* OptionPtr;
     A program option may be specified in two ways:
 
     <ul>
-       <li>In a configuration file</li>
-       <li>On the command line</li>
+        <li>In a configuration file</li>
+        <li>On the command line</li>
     </ul>
 
     This class provides methods for merging options from both of these
@@ -85,19 +79,19 @@ typedef Option* OptionPtr;
     merge options from a command line into the option manager.
 
     <pre>
-       int main(int argc, char** argv)
-       {
-           OptionManager om;
+        int main(int argc, char** argv)
+        {
+            OptionManager om;
 
-           ...
+            ...
 
-           // Merge options from the command line into the option manager's
-           // option list. Remove arguments from command line.
+            // Merge options from the command line into the option manager's
+            // option list. Remove arguments from command line.
 
-           om.mergeCommandLine(argc, argv);
+            om.mergeCommandLine(argc, argv);
 
-           ...
-       }
+            ...
+        }
     </pre>
 
     Similarly, the OptionManager::mergeFile() method allows options to be
@@ -108,23 +102,23 @@ typedef Option* OptionPtr;
     can be resolved:
 
     <ul>
-       <li>The option's name</li>
-       <li>The default value (to be used if not specified elsewhere)</li>
-       <li>Whether the option is required</li>
-       <li>The option's type (e.g., boolean, integer or string)</li>
-       <li>The domain of the option if any (set of legal values)</li>
-       <li>The name the option as it appears on the command line</li>
+        <li>The option's name</li>
+        <li>The default value (to be used if not specified elsewhere)</li>
+        <li>Whether the option is required</li>
+        <li>The option's type (e.g., boolean, integer or string)</li>
+        <li>The domain of the option if any (set of legal values)</li>
+        <li>The name the option as it appears on the command line</li>
     </ul>
 
     Here is how to regsiter an option:
 
     <pre>
-       OptionManager om;
+        OptionManager om;
 
-       Option* option = new Option("port", "80", false,
-           Option::NATURAL_NUMBER, Array<String>(), "p");
+        Option* option = new Option("port", "80", false,
+            Option::NATURAL_NUMBER, Array<String>(), "p");
 
-       om.registerOption(option);
+        om.registerOption(option);
     </pre>
 
     The arguments of the Option constructor are the same (and in the same
@@ -140,15 +134,15 @@ typedef Option* OptionPtr;
     lookupOption() method like this:
 
     <pre>
-       Option* option = om.lookupOption("port");
-       String port = option->getValue();
+        Option* option = om.lookupOption("port");
+        String port = option->getValue();
     </pre>
 
     Or the lookupValue() convenience function may be used to lookup values:
 
     <pre>
-       String value;
-       om.lookupValue("port", value);
+        String value;
+        om.lookupValue("port", value);
     </pre>
 
     Boolean Options can easily be tested as follows:
@@ -161,7 +155,7 @@ typedef Option* OptionPtr;
     mergeCommandLine() like this:
 
     <pre>
-       om.mergeCommandLine(argc, argv);
+        om.mergeCommandLine(argc, argv);
     </pre>
 
     This method searches the command line for options that match the registered
@@ -174,7 +168,7 @@ typedef Option* OptionPtr;
     method like this:
 
     <pre>
-       om.mergeFile(fileName);
+        om.mergeFile(fileName);
     </pre>
 
     This searches the file for options matching registered ones. Exceptions
@@ -186,12 +180,12 @@ typedef Option* OptionPtr;
     information optatined during option registration).
 
     <ul>
-       <li>The type of the option - whether integer, positive integer,
-           or string or whatever.</li>
-       <li>The domain of the option - whether the supplied option is a legal
-           value for that otpion</li>
-       <li>User extended validation - whether the user overriden
-           Option::isValid() returns true when the value is passed to it</li>
+        <li>The type of the option - whether integer, positive integer,
+            or string or whatever.</li>
+        <li>The domain of the option - whether the supplied option is a legal
+            value for that otpion</li>
+        <li>User extended validation - whether the user overriden
+            Option::isValid() returns true when the value is passed to it</li>
     </ul>
 
     <h4>Typcial Usage</h4>
@@ -206,32 +200,32 @@ typedef Option* OptionPtr;
 
     The option manager allows for several types of options including:
     <UL>
-       <LI> (BOOLEAN)Simple keyword parameters (ex. -t or -h on the command
-       line). These are Boolean parameters and there are no additional parameters
-       after the keyword.
+        <LI> (BOOLEAN)Simple keyword parameters (ex. -t or -h on the command
+        line). These are Boolean parameters and there are no additional
+        parameters after the keyword.
 
-       <LI> (INTEGER) Numeric parameters - (ex -port 5988). These are
-       parameters where a numeric variable follows the parameter defintion.
+        <LI> (INTEGER) Numeric parameters - (ex -port 5988). These are
+        parameters where a numeric variable follows the parameter defintion.
 
-       <LI>(WHOLE_NUMBER) Numeric parameters  ATTN: Finish.
+        <LI>(WHOLE_NUMBER) Numeric parameters  ATTN: Finish.
 
-       <LI> (NATURAL_NUMBER Numieric parameters - (ex ). ATTN: finish
+        <LI> (NATURAL_NUMBER Numieric parameters - (ex ). ATTN: finish
 
-       <LI>(STRING) String Parameters - (ex. -file abd.log) These are
-       parameters that are represented by strings following the option
-       keyword. No limitations are placed on the string except that it must
-       be resolvable to a single string.
+        <LI>(STRING) String Parameters - (ex. -file abd.log) These are
+        parameters that are represented by strings following the option
+        keyword. No limitations are placed on the string except that it must
+        be resolvable to a single string.
 
-       <LI> (STRING) Domain Parameters - These are parameters where there is
-       a choice of keywords from a domain of keywords. The input parameter may be any
-       one of these keywords. Thus, the domain (red blue green) for the
-       parameter "color" (-c) could be entered as -c red. The difference
-       between String interpretation and domain interpretation is the use of the
-       domain fields in the option definition.
+        <LI> (STRING) Domain Parameters - These are parameters where there is
+        a choice of keywords from a domain of keywords.  The input parameter
+        may be any one of these keywords. Thus, the domain (red blue green)
+        for the parameter "color" (-c) could be entered as -c red. The
+        difference between String interpretation and domain interpretation
+        is the use of the domain fields in the option definition.
 
-       <LI> Mask parameters - These are parameters that define an internal
-       bit mask from a set of keywords input.
-       ATTN: Finish this definition.
+        <LI> Mask parameters - These are parameters that define an internal
+        bit mask from a set of keywords input.
+        ATTN: Finish this definition.
     </UL>
 */
 
@@ -246,101 +240,102 @@ public:
     ~OptionManager();
 
     /** Registers an option. The OptionManager is responsible for disposing
-       of the option; the caller must not delete this object.
+        of the option; the caller must not delete this object.
 
-       @param option option to be registerd.
-       @exception NullPointer exception if option argument is null.
-       @exception OMDuplicateOption if option already defined.
+        @param option option to be registerd.
+        @exception NullPointer exception if option argument is null.
+        @exception OMDuplicateOption if option already defined.
     */
     void registerOption(Option* option);
 
     /** Provides a simple way to register several options at once using
-       a declartive style table. This may also be done programmitically
-       by repeatedly calling registerOption above. See documentation for
-       OptionRow for details on how to use them.
+        a declartive style table. This may also be done programmitically
+        by repeatedly calling registerOption above. See documentation for
+        OptionRow for details on how to use them.
     */
     void registerOptions(OptionRow* options, Uint32 numOptions);
 
     /** Merge option values from the command line. Searches the command
-       line for registered options whose names are given by the
-       Option::getCommandLineOptionName() method. Validation is performed
-       on each option value obtained by calling Option::isValid(). Valid
-       option values are set by calling Option::setValue(). The argc and
-       argv arguments are modified: the option and its argument are
-       stripped from the command line. The option and its argument have the
-       following form: -option-name argument. A space must be supplied
-       between the two. Boolean option arguments are an exception. They
-       must have the form -option. If they are present, then they are
-       taken to be true.
-
-       &param argc number of argument on the command line.
-       &param argv list of command line arguments.
-        &param abortOnErr - Optional Boolean that if true causes exception if there is
-        a parameter found that is not in the table. Defaults to true
-       &exception InvalidOptionValue if validation fails.
-       &exception OMMissingCommandLineOptionArgument
+        line for registered options whose names are given by the
+        Option::getCommandLineOptionName() method. Validation is performed
+        on each option value obtained by calling Option::isValid(). Valid
+        option values are set by calling Option::setValue(). The argc and
+        argv arguments are modified: the option and its argument are
+        stripped from the command line. The option and its argument have the
+        following form: -option-name argument. A space must be supplied
+        between the two. Boolean option arguments are an exception. They
+        must have the form -option. If they are present, then they are
+        taken to be true.
+
+        @param argc number of argument on the command line.
+        @param argv list of command line arguments.
+        @param abortOnErr - Optional Boolean that if true causes exception
+        if there is a parameter found that is not in the table. Defaults to
+        true
+        @exception InvalidOptionValue if validation fails.
+        @exception OMMissingCommandLineOptionArgument
     */
     void mergeCommandLine(int& argc, char**& argv, Boolean abortOnErr=true);
 
     /** Merge option values from a file. Searches file for registered options
-       whose names are given by the options which have been registered.
-       Validation is performed on each option value by calling
-       Option::isValid(). Valid option values are set by calling
-       Option::setValue().
-
-       &param fileName name of file to be merged.
-       &exception NoSuchFile if file cannot be opened.
-       &exception BadConfigFileOption
+        whose names are given by the options which have been registered.
+        Validation is performed on each option value by calling
+        Option::isValid(). Valid option values are set by calling
+        Option::setValue().
+
+        @param fileName name of file to be merged.
+        @exception NoSuchFile if file cannot be opened.
+        @exception BadConfigFileOption
     */
     void mergeFile(const String& fileName);
 
     /** After merging, this method is called to check for required options
-       that were not merged (specified).
+        that were not merged (specified).
 
-       &exception OMMissingRequiredRequiredOption
+        @exception OMMissingRequiredRequiredOption
     */
     void checkRequiredOptions() const;
 
     /** Lookup the option with the given name.
-       @param Name provides the name of the option.
-       @return 0 if no such option.
+        @param Name provides the name of the option.
+        @return 0 if no such option.
     */
     const Option* lookupOption(const String& name) const;
 
     /** Lookup value of an option.
-       @param Name provides the name of the option (ex. "port")
-       @param String parameter contains the String that contains the
-       value for this parameter (in String format).
-       @return Boolean return. True if the option found.
+        @param Name provides the name of the option (ex. "port")
+        @param String parameter contains the String that contains the
+        value for this parameter (in String format).
+        @return Boolean return. True if the option found.
     */
     Boolean lookupValue(const String& name, String& value ) const;
 
     /** LookupIntegerValue value of an option determines if the value exists
-       and converts it to integer (Uint32).
-       @param Name provides the name of the option (ex. "port")
-       @param String parameter contains the String that contains the
-       value for this parameter (in String format).
-       @return Boolean return. True if the option found.
+        and converts it to integer (Uint32).
+        @param Name provides the name of the option (ex. "port")
+        @param String parameter contains the String that contains the
+        value for this parameter (in String format).
+        @return Boolean return. True if the option found.
     */
     Boolean lookupIntegerValue(const String& name, Uint32& value) const;
 
 
-    /**        isStringInOptionMask - Looks for a String value in an option.
-       This function is used to detect particular options listed in strings of
-       entries forming a STRING option.  Thus, for example if the option string
-       were "abc,def,ijk" in option toy isStringInOption ("toy", "def") returns
-       true.
-       @param option  name of the option in the option table
-       @param entry  Entry to compare
-       @return True if the entry String is found in the option.
+    /** isStringInOptionMask - Looks for a String value in an option.
+        This function is used to detect particular options listed in strings of
+        entries forming a STRING option.  Thus, for example if the option string
+        were "abc,def,ijk" in option toy isStringInOption ("toy", "def") returns
+        true.
+        @param option  name of the option in the option table
+        @param entry  Entry to compare
+        @return True if the entry String is found in the option.
     */
     //Uint32 isStringInOptionMask (const String& option, String& entry) const;
 
     /** optionValueEquals - Test the string value of an option.
-       @param name provides the name of the option (ex. "port")
-       @param value String value for comparison.
-       @return true if the option exists and the value of the option
-       equals the input parameter value.
+        @param name provides the name of the option (ex. "port")
+        @param value String value for comparison.
+        @return true if the option exists and the value of the option
+        equals the input parameter value.
     */
     Boolean valueEquals(const String& name, const String& value) const;
 
@@ -359,8 +354,8 @@ public:
     */
     void printOptionsHelp() const;
 
-    /** Print Complete Help Text message including header before the options help
-        and trailer after the options help
+    /** Print Complete Help Text message including header before the options
+        help and trailer after the options help
     */
     void printOptionsHelpTxt(const String& header, const String& trailer) const;
 
@@ -368,7 +363,7 @@ public:
 private:
 
     /** Lookup the option by its commandLineOptionName.
-       @return 0 if no such option.
+        @return 0 if no such option.
     */
     Option* _lookupOptionByCommandLineOptionName(const String& name);
 
@@ -390,40 +385,40 @@ public:
     /** Valid value types. */
     enum Type
     {
-       // (..., -3, -2, -1, 0, 1, 2, 3, ...)
-       INTEGER,
+        // (..., -3, -2, -1, 0, 1, 2, 3, ...)
+        INTEGER,
 
-       // (1, 2, 3, ...)
-       NATURAL_NUMBER,
+        // (1, 2, 3, ...)
+        NATURAL_NUMBER,
 
-       // (0, 1, 2, 3, ...)
-       WHOLE_NUMBER,
+        // (0, 1, 2, 3, ...)
+        WHOLE_NUMBER,
 
-       // "true" or "false"
-       BOOLEAN,
+        // "true" or "false"
+        BOOLEAN,
 
-       // Anything
-       STRING
+        // Anything
+        STRING
     };
 
     /** Constructor.
 
-       @param optionName the name of this option.
+        @param optionName the name of this option.
 
-       @param defaultValue the default value of this option.
+        @param defaultValue the default value of this option.
 
-       @param required whether the value of this option is required.
+        @param required whether the value of this option is required.
 
-       @param type type of the value. This is used to validate the value.
+        @param type type of the value. This is used to validate the value.
 
-       @param domain list of legal value for this option. If this list
-           is empty, then no domain is enforced.
+        @param domain list of legal value for this option. If this list
+            is empty, then no domain is enforced.
 
-       @param commandLineOptionName name of the corresponding command line
-           option (which may be different from the option name).
+        @param commandLineOptionName name of the corresponding command line
+            option (which may be different from the option name).
 
-       @param optionHelpMessage Text message that defines option. To be used
-           in Usage messages.
+        @param optionHelpMessage Text message that defines option. To be used
+            in Usage messages.
     */
     Option(
         const String& optionName,
@@ -465,7 +460,7 @@ public:
     }
 
     /** Accessor
-       @return - Returns string representation of value
+        @return - Returns string representation of value
     */
     const String& getValue() const
     {
@@ -476,7 +471,7 @@ public:
     void setValue(const String& value)
     {
         _value = value;
-       _resolved = true;
+        _resolved = true;
     }
 
     /** Accessor */
@@ -518,7 +513,7 @@ public:
     /** Accessor */
     const String& getOptionHelpMessage() const
     {
-       return _optionHelpMessage;
+        return _optionHelpMessage;
     }
 
     /** Modifier */
@@ -528,16 +523,16 @@ public:
     }
 
     /** Accesor. Returns true if an option value was ever obtained for
-       this option.
+        this option.
     */
     Boolean isResolved() const
     {
-       return _resolved;
+        return _resolved;
     }
 
     /** Checks to see if the given value is valid or not. This method may be
-       overriden by derived classes to do special purpose validation of the
-       value. This implementation just checks the domain and type.
+        overriden by derived classes to do special purpose validation of the
+        value. This implementation just checks the domain and type.
     */
     virtual Boolean isValid(const String& value) const;
 
@@ -566,16 +561,16 @@ private:
     register one of these option lists with an OptionManager.
 
     <pre>
-       static OptionRow options[] =
-       {
-           { "port", "80", false, Option::NATURAL_NUMBER },
-           { "hostname", "", true, Option::STRING }
-       };
+        static OptionRow options[] =
+        {
+            { "port", "80", false, Option::NATURAL_NUMBER },
+            { "hostname", "", true, Option::STRING }
+        };
 
-       ...
+        ...
 
-       OptionManager om;
-       om.registerOptions(options, sizeof(options) / sizeof(options[0]));
+        OptionManager om;
+        om.registerOptions(options, sizeof(options) / sizeof(options[0]));
     </pre>
 
     Recall that static memory areas are initialized with zeros so that the
@@ -588,13 +583,13 @@ private:
     {"red", "green", "blue"}. Here is how to express that:
 
     <pre>
-       static const char* colors[] = { "red", "green", "blue" };
-       static const Uint32 NUM_COLORS = sizeof(colors) / sizeof(colors[0]);
+        static const char* colors[] = { "red", "green", "blue" };
+        static const Uint32 NUM_COLORS = sizeof(colors) / sizeof(colors[0]);
 
-       static OptionRow options[] =
-       {
-           { "color", "red", false, Option::STRING, colors, NUM_COLORS }
-       };
+        static OptionRow options[] =
+        {
+            { "color", "red", false, Option::STRING, colors, NUM_COLORS }
+        };
     </pre>
     When a domain is defined, any of the keywords in that domain are legal
     option keywords.  For example.  With the domain defined above,  a command
@@ -618,17 +613,18 @@ struct OptionRow
 */
 
 /** Exception class */
-class PEGASUS_COMMON_LINKAGE OMMissingCommandLineOptionArgument : public Exception
+class PEGASUS_COMMON_LINKAGE OMMissingCommandLineOptionArgument
+    : public Exception
 {
 public:
 
-       //l10n
-    //OMMissingCommandLineOptionArgument(const String& optionName)
-       //: Exception("Missing command line option argument: " + optionName) { }
-       OMMissingCommandLineOptionArgument(const String& optionName)
-       : Exception(MessageLoaderParms("Common.OptionManager.MISSING_CMD_LINE_OPTION",
-                                                                                        "Missing command line option argument: $0",
-                                                                                        optionName)) { }
+    OMMissingCommandLineOptionArgument(const String& optionName)
+        : Exception(MessageLoaderParms(
+              "Common.OptionManager.MISSING_CMD_LINE_OPTION",
+              "Missing command line option argument: $0",
+              optionName))
+    {
+    }
 };
 
 /** Exception class */
@@ -636,27 +632,27 @@ class PEGASUS_COMMON_LINKAGE OMInvalidOptionValue : public Exception
 {
 public:
 
-       //l10n
-    //OMInvalidOptionValue(const String& name, const String& value)
-       //: Exception("Invalid option value: " + name + "=\"" + value + "\"") { }
-       OMInvalidOptionValue(const String& name, const String& value)
-       : Exception(MessageLoaderParms("Common.OptionManager.INVALID_OPTION_VALUE",
-                                                                                        "Invalid option value: $0=\"$1\"",
-                                                                                        name,
-                                                                                        value)) { }
+    OMInvalidOptionValue(const String& name, const String& value)
+        : Exception(MessageLoaderParms(
+              "Common.OptionManager.INVALID_OPTION_VALUE",
+              "Invalid option value: $0=\"$1\"",
+              name,
+              value))
+    {
+    }
 };
 
 /** Exception class */
 class PEGASUS_COMMON_LINKAGE OMDuplicateOption : public Exception
 {
 public:
-//l10n
-    //OMDuplicateOption(const String& name)
-       //: Exception("Duplicate option: " + name) { }
-       OMDuplicateOption(const String& name)
-       : Exception(MessageLoaderParms("Common.OptionManager.DUPLICATE_OPTION",
-                                                                                        "Duplicate option: $0",
-                                                                                        name)) { }
+    OMDuplicateOption(const String& name)
+        : Exception(MessageLoaderParms(
+              "Common.OptionManager.DUPLICATE_OPTION",
+              "Duplicate option: $0",
+              name))
+    {
+    }
 };
 
 /** Exception class */
@@ -665,7 +661,7 @@ class PEGASUS_COMMON_LINKAGE OMConfigFileSyntaxError : public Exception
 public:
 
     OMConfigFileSyntaxError(const String& file, Uint32 line)
-       : Exception(_formatMessage(file, line)) { }
+        : Exception(_formatMessage(file, line)) { }
 
     static String _formatMessage(const String& file, Uint32 line);
 };
@@ -674,42 +670,41 @@ public:
 class PEGASUS_COMMON_LINKAGE OMUnrecognizedConfigFileOption : public Exception
 {
 public:
-//l10n
-    //OMUnrecognizedConfigFileOption(const String& name)
-       //: Exception("Unrecognized config file option: " + name) { }
-       OMUnrecognizedConfigFileOption(const String& name)
-       : Exception(MessageLoaderParms("Common.OptionManager.UNRECOGNIZED_CONFIG_FILE_OPTION",
-                                                                                        "Unrecognized config file option: $0",
-                                                                                        name)) { }
+    OMUnrecognizedConfigFileOption(const String& name)
+        : Exception(MessageLoaderParms(
+              "Common.OptionManager.UNRECOGNIZED_CONFIG_FILE_OPTION",
+              "Unrecognized config file option: $0",
+              name))
+    {
+    }
 };
 
 /** Exception class */
 class PEGASUS_COMMON_LINKAGE OMMissingRequiredOptionValue : public Exception
 {
 public:
-//l10n
-    //OMMissingRequiredOptionValue(const String& name)
-       //: Exception("Missing required option value: " + name) { }
-       OMMissingRequiredOptionValue(const String& name)
-       : Exception(MessageLoaderParms("Common.OptionManager.MISSING_REQUIRED_OPTION",
-                                                                                        "Missing required option value: $0",
-                                                                                        name)) { }
+    OMMissingRequiredOptionValue(const String& name)
+        : Exception(MessageLoaderParms(
+              "Common.OptionManager.MISSING_REQUIRED_OPTION",
+              "Missing required option value: $0",
+              name))
+    {
+    }
 };
 
 /** Exception class */
 class PEGASUS_COMMON_LINKAGE OMMBadCmdLineOption : public Exception
 {
 public:
-//l10n
-   // OMMBadCmdLineOption(const String& name)
-       //: Exception("Parameter not Valid: " + name) { }
-       OMMBadCmdLineOption(const String& name)
-       : Exception(MessageLoaderParms("Common.OptionManager.PARAMETER_NOT_VALID",
-                                                                                        "Parameter not Valid: $0",
-                                                                                        name)) { }
+    OMMBadCmdLineOption(const String& name)
+        : Exception(MessageLoaderParms(
+              "Common.OptionManager.PARAMETER_NOT_VALID",
+              "Parameter not Valid: $0",
+              name))
+    {
+    }
 };
 
-
 PEGASUS_NAMESPACE_END
 
 #endif /* Pegasus_OM_h */
index 21fa9969bf838690bab684029a5031cdbcf04a46..8eb7ba14c899b63dff1bce2dacd2468781977ca8 100644 (file)
@@ -29,8 +29,6 @@
 //
 //==============================================================================
 //
-// Author: Michael E. Brasher
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include <string.h>
@@ -45,8 +43,8 @@ static bool _constains16BitChars(const String& x)
 
     while (n--)
     {
-       if (Uint16(*p++) > 0xFF)
-           return true;
+        if (Uint16(*p++) > 0xFF)
+            return true;
     }
 
     return false;
@@ -58,18 +56,18 @@ void Packer::packString(Buffer& out, const String& x)
 
     if (_constains16BitChars(x))
     {
-       packUint8(out, 16);
-       packSize(out, n);
-       packChar16(out, x.getChar16Data(), n);
+        packUint8(out, 16);
+        packSize(out, n);
+        packChar16(out, x.getChar16Data(), n);
     }
     else
     {
-       packUint8(out, 8);
-       packSize(out, n);
-       const Char16* data = x.getChar16Data();
+        packUint8(out, 8);
+        packSize(out, n);
+        const Char16* data = x.getChar16Data();
 
-       for (Uint32 i = 0; i < n; i++)
-           Packer::packUint8(out, (Uint8)data[i]);
+        for (Uint32 i = 0; i < n; i++)
+            Packer::packUint8(out, (Uint8)data[i]);
     }
 }
 
@@ -85,18 +83,18 @@ void Packer::packSize(Buffer& out, Uint32 x)
 
     if (x > 16383)
     {
-       // Use four bytes for size (tag == '1')
-       packUint32(out, 0x80000000 | x);
+        // Use four bytes for size (tag == '1')
+        packUint32(out, 0x80000000 | x);
     }
     else if (x > 63)
     {
-       // Use two bytes for size.
-       packUint16(out, 0x4000 | Uint16(x));
+        // Use two bytes for size.
+        packUint16(out, 0x4000 | Uint16(x));
     }
     else /* x > 1073741823 */
     {
-       // Use one byte for size.
-       packUint8(out, 0x00 | Uint8(x));
+        // Use one byte for size.
+        packUint8(out, 0x00 | Uint8(x));
     }
 }
 
@@ -117,37 +115,37 @@ void Packer::unpackSize(const Buffer& in, Uint32& pos, Uint32& x)
 
     if (!tag)
     {
-       // One-byte size:
-       x = byte;
+        // One-byte size:
+        x = byte;
     }
     else if (tag == 0x80)
     {
-       // Four-byte size:
-       Uint8 b0 = tag ^ byte;
-       Uint8 b1;
-       Uint8 b2;
-       Uint8 b3;
-
-       Packer::unpackUint8(in, pos, b1);
-       Packer::unpackUint8(in, pos, b2);
-       Packer::unpackUint8(in, pos, b3);
-       Uint32 tmp = (Uint32(b0) << 24) | 
-           (Uint32(b1) << 16) | 
-           (Uint32(b2) <<  8) | 
-           (Uint32(b3));
-
-       x = tmp;
+        // Four-byte size:
+        Uint8 b0 = tag ^ byte;
+        Uint8 b1;
+        Uint8 b2;
+        Uint8 b3;
+
+        Packer::unpackUint8(in, pos, b1);
+        Packer::unpackUint8(in, pos, b2);
+        Packer::unpackUint8(in, pos, b3);
+        Uint32 tmp = (Uint32(b0) << 24) |
+            (Uint32(b1) << 16) |
+            (Uint32(b2) <<  8) |
+            (Uint32(b3));
+
+        x = tmp;
     }
     else if (tag == 0x40)
     {
-       // Two-byte size:
-       x = (tag ^ byte) << 8;
-       Packer::unpackUint8(in, pos, byte);
-       x |= byte;
+        // Two-byte size:
+        x = (tag ^ byte) << 8;
+        Packer::unpackUint8(in, pos, byte);
+        x |= byte;
     }
     else
     {
-       PEGASUS_DEBUG_ASSERT(0);
+        PEGASUS_DEBUG_ASSERT(0);
     }
 
     PEGASUS_DEBUG_ASSERT(pos <= in.size());
@@ -161,14 +159,14 @@ void _pack_array(Buffer& out, const T* x, Uint32 n)
 
     if (Packer::isLittleEndian())
     {
-       for (size_t i = 0; i < n; i++)
-       {
-           T tmp = Packer::swap(x[i]);
-           out.append((char*)&tmp, sizeof(tmp));
-       }
+        for (size_t i = 0; i < n; i++)
+        {
+            T tmp = Packer::swap(x[i]);
+            out.append((char*)&tmp, sizeof(tmp));
+        }
     }
     else
-       out.append((char*)x, bytes);
+        out.append((char*)x, bytes);
 }
 
 void Packer::packBoolean(Buffer& out, const Boolean* x, Uint32 n)
@@ -177,8 +175,8 @@ void Packer::packBoolean(Buffer& out, const Boolean* x, Uint32 n)
 
     for (size_t i = 0; i < n; i++)
     {
-       Uint8 tmp = Uint8(x[i]); 
-       out.append((char*)&tmp, sizeof(tmp));
+        Uint8 tmp = Uint8(x[i]);
+        out.append((char*)&tmp, sizeof(tmp));
     }
 }
 
@@ -205,7 +203,7 @@ void Packer::packUint64(Buffer& out, const Uint64* x, Uint32 n)
 void Packer::packString(Buffer& out, const String* x, Uint32 n)
 {
     for (size_t i = 0; i < n; i++)
-       packString(out, x[i]);
+        packString(out, x[i]);
 }
 
 void Packer::unpackUint16(
@@ -215,7 +213,7 @@ void Packer::unpackUint16(
     pos += sizeof(x);
 
     if (isLittleEndian())
-       x = Packer::swapUint16(x);
+        x = Packer::swapUint16(x);
 }
 
 void Packer::unpackUint32(
@@ -225,7 +223,7 @@ void Packer::unpackUint32(
     pos += sizeof(x);
 
     if (isLittleEndian())
-       x = Packer::swapUint32(x);
+        x = Packer::swapUint32(x);
 
     PEGASUS_DEBUG_ASSERT(pos <= in.size());
 }
@@ -237,7 +235,7 @@ void Packer::unpackUint64(
     pos += sizeof(x);
 
     if (isLittleEndian())
-       x = Packer::swapUint64(x);
+        x = Packer::swapUint64(x);
 
     PEGASUS_DEBUG_ASSERT(pos <= in.size());
 }
@@ -257,20 +255,20 @@ void Packer::unpackString(const Buffer& in, Uint32& pos, String& x)
 
     if (bits & 8)
     {
-       x.assign(&in[pos], n);
-       pos += n;
+        x.assign(&in[pos], n);
+        pos += n;
     }
     else
     {
-       x.clear();
-       x.reserveCapacity(n);
-
-       for (size_t i = 0; i < n; i++)
-       {
-           Char16 tmp;
-           unpackChar16(in , pos, tmp);
-           x.append(tmp);
-       }
+        x.clear();
+        x.reserveCapacity(n);
+
+        for (size_t i = 0; i < n; i++)
+        {
+            Char16 tmp;
+            unpackChar16(in , pos, tmp);
+            x.append(tmp);
+        }
     }
 
     PEGASUS_DEBUG_ASSERT(pos <= in.size());
@@ -280,7 +278,7 @@ void Packer::unpackBoolean(
     Buffer& in, Uint32& pos, Boolean* x, Uint32 n)
 {
     for (size_t i = 0; i < n; i++)
-       unpackBoolean(in, pos, x[i]);
+        unpackBoolean(in, pos, x[i]);
 
     PEGASUS_DEBUG_ASSERT(pos <= in.size());
 }
@@ -289,7 +287,7 @@ void Packer::unpackUint8(
     Buffer& in, Uint32& pos, Uint8* x, Uint32 n)
 {
     for (size_t i = 0; i < n; i++)
-       unpackUint8(in, pos, x[i]);
+        unpackUint8(in, pos, x[i]);
 
     PEGASUS_DEBUG_ASSERT(pos <= in.size());
 }
@@ -298,7 +296,7 @@ void Packer::unpackUint16(
     Buffer& in, Uint32& pos, Uint16* x, Uint32 n)
 {
     for (size_t i = 0; i < n; i++)
-       unpackUint16(in, pos, x[i]);
+        unpackUint16(in, pos, x[i]);
 
     PEGASUS_DEBUG_ASSERT(pos <= in.size());
 }
@@ -307,7 +305,7 @@ void Packer::unpackUint32(
     Buffer& in, Uint32& pos, Uint32* x, Uint32 n)
 {
     for (size_t i = 0; i < n; i++)
-       unpackUint32(in, pos, x[i]);
+        unpackUint32(in, pos, x[i]);
 
     PEGASUS_DEBUG_ASSERT(pos <= in.size());
 }
@@ -316,7 +314,7 @@ void Packer::unpackUint64(
     Buffer& in, Uint32& pos, Uint64* x, Uint32 n)
 {
     for (size_t i = 0; i < n; i++)
-       unpackUint64(in, pos, x[i]);
+        unpackUint64(in, pos, x[i]);
 
     PEGASUS_DEBUG_ASSERT(pos <= in.size());
 }
@@ -325,7 +323,7 @@ void Packer::unpackString(
     Buffer& in, Uint32& pos, String* x, Uint32 n)
 {
     for (size_t i = 0; i < n; i++)
-       unpackString(in, pos, x[i]);
+        unpackString(in, pos, x[i]);
 
     PEGASUS_DEBUG_ASSERT(pos <= in.size());
 }
index 59c70ec6de426926a2e2e51e74270b59e300eeff..fe4185999d5c1bb59395e5bd1171865fb7ed9031 100644 (file)
@@ -29,8 +29,6 @@
 //
 //==============================================================================
 //
-// Author: Michael E. Brasher
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef _Pegasus_Common_Packer_h
@@ -89,23 +87,23 @@ public:
     static void unpackSize(const Buffer& out, Uint32& pos, Uint32& x);
 
     static void unpackBoolean(
-       Buffer& in, Uint32& pos, Boolean* x, Uint32 n);
+        Buffer& in, Uint32& pos, Boolean* x, Uint32 n);
     static void unpackUint8(
-       Buffer& in, Uint32& pos, Uint8* x, Uint32 n);
+        Buffer& in, Uint32& pos, Uint8* x, Uint32 n);
     static void unpackUint16(
-       Buffer& in, Uint32& pos, Uint16* x, Uint32 n);
+        Buffer& in, Uint32& pos, Uint16* x, Uint32 n);
     static void unpackUint32(
-       Buffer& in, Uint32& pos, Uint32* x, Uint32 n);
+        Buffer& in, Uint32& pos, Uint32* x, Uint32 n);
     static void unpackUint64(
-       Buffer& in, Uint32& pos, Uint64* x, Uint32 n);
+        Buffer& in, Uint32& pos, Uint64* x, Uint32 n);
     static void unpackReal32(
-       Buffer& in, Uint32& pos, Real32* x, Uint32 n);
+        Buffer& in, Uint32& pos, Real32* x, Uint32 n);
     static void unpackReal64(
-       Buffer& in, Uint32& pos, Real64* x, Uint32 n);
+        Buffer& in, Uint32& pos, Real64* x, Uint32 n);
     static void unpackChar16(
-       Buffer& in, Uint32& pos, Char16* x, Uint32 n);
+        Buffer& in, Uint32& pos, Char16* x, Uint32 n);
     static void unpackString(
-       Buffer& in, Uint32& pos, String* x, Uint32 n);
+        Buffer& in, Uint32& pos, String* x, Uint32 n);
 
     static bool isLittleEndian();
 
@@ -150,7 +148,7 @@ inline void Packer::packUint8(Buffer& out, Uint8 x)
 inline void Packer::packUint16(Buffer& out, Uint16 x)
 {
     if (isLittleEndian())
-       x = Packer::swapUint16(x);
+        x = Packer::swapUint16(x);
 
     out.append((char*)&x, sizeof(x));
 }
@@ -158,7 +156,7 @@ inline void Packer::packUint16(Buffer& out, Uint16 x)
 inline void Packer::packUint32(Buffer& out, Uint32 x)
 {
     if (isLittleEndian())
-       x = Packer::swapUint32(x);
+        x = Packer::swapUint32(x);
 
     out.append((char*)&x, sizeof(x));
 }
@@ -166,7 +164,7 @@ inline void Packer::packUint32(Buffer& out, Uint32 x)
 inline void Packer::packUint64(Buffer& out, Uint64 x)
 {
     if (isLittleEndian())
-       x = Packer::swapUint64(x);
+        x = Packer::swapUint64(x);
 
     out.append((char*)&x, sizeof(x));
 }
@@ -257,17 +255,17 @@ inline void Packer::unpackChar16(
 inline Uint16 Packer::swapUint16(Uint16 x)
 {
     return (Uint16)(
-       (((Uint16)(x) & 0x00ffU) << 8) | 
-       (((Uint16)(x) & 0xff00U) >> 8));
+        (((Uint16)(x) & 0x00ffU) << 8) |
+        (((Uint16)(x) & 0xff00U) >> 8));
 }
 
 inline Uint32 Packer::swapUint32(Uint32 x)
 {
     return (Uint32)(
-       (((Uint32)(x) & 0x000000ffUL) << 24) |
-       (((Uint32)(x) & 0x0000ff00UL) <<  8) |
-       (((Uint32)(x) & 0x00ff0000UL) >>  8) |
-       (((Uint32)(x) & 0xff000000UL) >> 24));
+        (((Uint32)(x) & 0x000000ffUL) << 24) |
+        (((Uint32)(x) & 0x0000ff00UL) <<  8) |
+        (((Uint32)(x) & 0x00ff0000UL) >>  8) |
+        (((Uint32)(x) & 0xff000000UL) >> 24));
 }
 
 inline void Packer::swap(Uint8& x, Uint8& y)
@@ -281,8 +279,8 @@ inline Uint64 Packer::swapUint64(Uint64 x)
 {
     union
     {
-       Uint64 x;
-       Uint8 bytes[8];
+        Uint64 x;
+        Uint8 bytes[8];
     }
     u;
 
index 79070854433b21b6f453f7ea06f1095f74052437..54bcb40ca5ed19b693f3d8d7b4748610f533b466 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By:
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include "Pair.h"
index 9adcfeb716645b8c1c2d5aa6ac4e402a678eda6f..e16f678f52b9856517c9608d61ffa10092691e32 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By:
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_Pair_h
@@ -49,25 +45,22 @@ struct Pair
     U second;
 
     Pair() : first(), second()
-    { 
-
+    {
     }
 
     Pair(const Pair<T,U>& x) : first(x.first), second(x.second)
-    { 
-
+    {
     }
 
     Pair(const T& first_, const U& second_) : first(first_), second(second_)
     {
-
     }
 
     Pair<T,U>& operator=(const Pair<T,U>& x)
     {
-       first = x.first;
-       second = x.second;
-       return *this;
+        first = x.first;
+        second = x.second;
+        return *this;
     }
 };
 
index 7aa687112e56f9b433d01765b219493b99b9519e..fc23f6b88dcaede15ff78456561ed8d34568be2c 100644 (file)
 //
 //==============================================================================
 //
-// Author: Jim Wunderlich, (Jim_Wunderlich@prodigy.net)
-//
-// Modified By:
-//
 //%/////////////////////////////////////////////////////////////////////////////
 #ifndef Pegasus_Assert_h
 #define Pegasus_Assert_h
 
-// NOTE: 
+
+// NOTE:
 //
-// All built and tested OK with <assert.h> 
+// All built and tested OK with <assert.h>
 // but <cassert> is more appropriate for c++ files
-// however if this should be a problem for any c fileswithin the tree 
-// it is possible to revert back to assert.h 
+// however if this should be a problem for any c fileswithin the tree
+// it is possible to revert back to assert.h
 //     J Wunderlich 11/21/2005
 //
 
 /** define PEGASUS_ASSERT assertion statement.  This statement tests the
     condition defined by the parameters and if not True executes an
 
-   It only generates code if NDEBUG is not defined. 
+   It only generates code if NDEBUG is not defined.
    See also the man page for assert().
 
-   NOTE: if NDEBUG is set then the assert() macro will generate no code, 
-         and hence do nothing at all.  
+   NOTE: if NDEBUG is set then the assert() macro will generate no code,
+         and hence do nothing at all.
 
     <pre>
     assert()
 
 
 /* define PEGASUS_DEBUG_ASSERT() assertion statement. This statement tests the
-   condition defined by the parameters and if not True executes an assert. 
+   condition defined by the parameters and if not True executes an assert.
    It only generates code if PEGASUS_DEBUG is defined and NDEBUG is not
-   defined. 
+   defined.
    See also the man page for assert().
 
-   NOTE: if NDEBUG is set then the assert() macro will generate no code, 
-         and hence do nothing at all.  
+   NOTE: if NDEBUG is set then the assert() macro will generate no code,
+         and hence do nothing at all.
 
 */
 
 #ifdef PEGASUS_DEBUG
-#define PEGASUS_DEBUG_ASSERT(COND) assert(COND)
+# define PEGASUS_DEBUG_ASSERT(COND) assert(COND)
 #else
-#define PEGASUS_DEBUG_ASSERT(COND)
+# define PEGASUS_DEBUG_ASSERT(COND)
 #endif
 
 
-#define PEGASUS_TEST_ASSERT(COND)                                 \
-do                                                                \
-{                                                                 \
-  if (!(COND))                                                   \
-    {                                                            \
-      printf("PEGASUS_TEST_ASSERT failed in file %s at line %d\n",__FILE__, __LINE__); \
-      abort();                                                   \
-    }                                                            \
-} while (0)
+#define PEGASUS_TEST_ASSERT(COND)                                         \
+    do                                                                    \
+    {                                                                     \
+        if (!(COND))                                                      \
+        {                                                                 \
+            printf("PEGASUS_TEST_ASSERT failed in file %s at line %d\n",  \
+                __FILE__, __LINE__);                                      \
+            abort();                                                      \
+        }                                                                 \
+    } while (0)
 
 
 #endif  /* Pegasus_Assert_h */
index c6dd72d4d48b07cd8a28d6870cb410ab06f9ec05..e70559d6571fc04d5bc05fc141fba51421424c25 100644 (file)
 //
 //==============================================================================
 //
-// Author: Karl Schopmeyer (k.schopmeyer@opengroup.org)
-//
-// Modified By: Jenny Yu (jenny_yu@hp.com)
-//              Warren Otsuka (warren.otsuka@hp.com)
-//              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_Version_h
@@ -56,7 +50,7 @@ PEGASUS_NAMESPACE_BEGIN
 //
 // The sequence would look like:
 //  # define PEGASUS_PRODUCT_VERSION "2.5"
-//  # define PEGASUS_PRODUCT_STATUS  ""       // Blank implies Released 
+//  # define PEGASUS_PRODUCT_STATUS  ""       // Blank implies Released
 //
 //  # define PEGASUS_PRODUCT_VERSION "2.5.1"
 //  # define PEGASUS_PRODUCT_STATUS  "Development"
@@ -65,7 +59,7 @@ PEGASUS_NAMESPACE_BEGIN
 //  # define PEGASUS_PRODUCT_STATUS  "Pre-Release"
 //
 //  # define PEGASUS_PRODUCT_VERSION "2.5.1"
-//  # define PEGASUS_PRODUCT_STATUS  ""       // Blank implies Released 
+//  # define PEGASUS_PRODUCT_STATUS  ""       // Blank implies Released
 //
 //  # define PEGASUS_PRODUCT_VERSION "2.5.2"
 //  # define PEGASUS_PRODUCT_STATUS  "Development"
@@ -74,8 +68,8 @@ PEGASUS_NAMESPACE_BEGIN
 //  # define PEGASUS_PRODUCT_STATUS  "Pre-Release"
 //
 //  # define PEGASUS_PRODUCT_VERSION "2.5.2"
-//  # define PEGASUS_PRODUCT_STATUS  ""       // Blank implies Released 
-// 
+//  # define PEGASUS_PRODUCT_STATUS  ""       // Blank implies Released
+//
 
 
 # define PEGASUS_PRODUCT_NAME    "CIM Server"
@@ -99,8 +93,8 @@ PEGASUS_NAMESPACE_BEGIN
 #  define PLATFORM_COMPONENT_NAME  "Pegasus Component"
 # endif
 
-# ifndef PLATFORM_COMPONENT_VERSION 
-#  define PLATFORM_COMPONENT_VERSION PEGASUS_PRODUCT_VERSION 
+# ifndef PLATFORM_COMPONENT_VERSION
+#  define PLATFORM_COMPONENT_VERSION PEGASUS_PRODUCT_VERSION
 # endif
 
 # ifndef PLATFORM_COMPONENT_STATUS
@@ -129,8 +123,8 @@ static const char *PLATFORM_EMBEDDED_IDENTIFICATION_STRING =
 
 #endif /* PEGASUS_OS_HPUX */
 
-// This macro can be examined by preprocessor directives (i.e., #if) to 
-// make compile time branch decisions based on the Pegasus version number. 
+// This macro can be examined by preprocessor directives (i.e., #if) to
+// make compile time branch decisions based on the Pegasus version number.
 // When read from left to right, the bytes have the following meaning:
 //
 //     Byte 0: major version number
@@ -152,7 +146,7 @@ static const char *PLATFORM_EMBEDDED_IDENTIFICATION_STRING =
 //      ..
 //    #endif
 //
-// CAUTION: always check whether PEGASUS_VERSION_NUMBER is defined when 
+// CAUTION: always check whether PEGASUS_VERSION_NUMBER is defined when
 // integrating with versions prior to 2.5.1.
 //
 #define PEGASUS_VERSION_NUMBER 0x02060000
index 641a905a35f3e14e4872e10dc50fb258a5c6145d..f6dbaa9b285f06ec31c3b2175f1f2f17c7392765 100644 (file)
@@ -42,7 +42,7 @@
 #define _MSE_PROTOS
 #define _OPEN_SOURCE 3
 
-#define _MULTI_THREADED 
+#define _MULTI_THREADED
 
 #include <cstddef>
 
@@ -55,7 +55,7 @@
 #define PEGASUS_OS_TYPE_UNIX
 
 #include <ifs.cleinc>
-  
+
 #define PEGASUS_OS_OS400
 
 #define PEGASUS_ARCHITECTURE_ISERIES
@@ -64,7 +64,7 @@
 
 #define PEGASUS_UINT64 unsigned long long
 
-#define PEGASUS_SINT64 signed long long  
+#define PEGASUS_SINT64 signed long long
 
 #define PEGASUS_HAVE_NAMESPACES
 
index 1cbcd0877e588d94e597cd0c19ad21ba3d50c04e..ba378e1ee9f50c27535827e575b269c3936ca8a9 100755 (executable)
 //
 //==============================================================================
 //
-// Author: Sean Keenan (sean.keenan@hp.com)
-//
-// Modified By: 
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_Platform_VMS_h
index 33c2d2ebd9d0d92900115d8120f05e24ca97e2b4..0d30d8c8b3cc8a2686b4d8ec4169a75e3ded400d 100755 (executable)
 //
 //==============================================================================
 //
-// Author: Sean Keenan (sean.keenan@hp.com)
-//
-// Modified By:
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_Platform_VMS_ALPHA_DECCXX_h
@@ -89,9 +85,9 @@
 #define PEGASUS_HAVE_BROKEN_GLOBAL_CONSTRUCTION
 
 // PEGASUS_DISABLE_INTERNAL_INLINES
-// Debug builds fail with undefined symbols. Perhaps this is 
-// because debug (nooptimize) builds have the compiler inline 
-// feature turned off. 
+// Debug builds fail with undefined symbols. Perhaps this is
+// because debug (nooptimize) builds have the compiler inline
+// feature turned off.
 #define PEGASUS_DISABLE_INTERNAL_INLINES
 
 #define PEGASUS_HAVE_PTHREADS
index 13dc3d95c8bf0cd11f39314d1a27018df6b9839b..c85436bc347c91e103c10bf21b8fa5299716c208 100755 (executable)
 //
 //==============================================================================
 //
-// Author: Sean Keenan (sean.keenan@hp.com)
-//
-// Modified By:
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_Platform_VMS_IA64_DECCXX_h
index 82a7d2b6cf3fce3c39ea83a4f0d446fbca452228..ef8d8081ed2c4124daa8bdff6cdc62151f260f5e 100644 (file)
@@ -49,7 +49,7 @@
 #define PEGASUS_UINT64 unsigned __int64
 
 #define PEGASUS_SINT64 __int64
-       
+
 #define PEGASUS_SINT64_LITERAL(X) Sint64(X)
 #define PEGASUS_UINT64_LITERAL(X) Uint64(X)
 
@@ -72,7 +72,7 @@
 #define PEGASUS_DISABLE_INTERNAL_INLINES
 
 // Exclude rarely-used stuff from Windows headers
-// Note: this is also an easy way to avoid the often introduced 
+// Note: this is also an easy way to avoid the often introduced
 // winsock.h/winsock2.h mixing compiler error problems.
 #ifndef WIN32_LEAN_AND_MEAN
 #define WIN32_LEAN_AND_MEAN
 // Suppress this warning : "'this' : used in base member initializer list"
 #pragma warning ( disable : 4355 )
 
-// Suppress this warning: 'type' : forcing value to bool 'true' or 'false' (performance warning)
+// Suppress this warning: 'type' : forcing value to bool 'true' or 'false'
+// (performance warning)
 #ifdef PEGASUS_INTERNALONLY
-#pragma warning( disable : 4800 ) 
+#pragma warning( disable : 4800 )
 #endif
 
 // VC 8 specific pragmas
 // This warning is supported beginning with VC 8.
 #pragma warning ( disable : 4996 )
 
-// Suppress this warning: behavior change: an object of POD type constructed with an
-// initializer of the form () will be default-initialized
+// Suppress this warning: behavior change: an object of POD type constructed
+// with an initializer of the form () will be default-initialized
 #pragma warning ( disable : 4345 )
 #endif
 
 //
 // Prior to Microsoft Visual Studio 7.0, there were no stream inserters for
 // __int64 and unsigned __int64. We declare them if the _MSC_VER is less than
-// 1300 (subtract 600 to get the version of Visual Studio). Look in 
+// 1300 (subtract 600 to get the version of Visual Studio). Look in
 // SystemWindows.cpp for the definitions.
 //
 #if (_MSC_VER < 1300) && defined(PEGASUS_INTERNALONLY) && defined(__cplusplus)
index 00fb0b5075635c8590457c292ca21fc184d56433..b7e0fd66108ea9738408941d2884746ef9865107 100644 (file)
 //
 //==============================================================================
 //
-// Author: Markus Mueller (mmueller@de.ibm.com)
-//
-// Modified By: Carol Ann Krug Graves, Hewlett-Packard Company
-//                (carolann_graves@hp.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_Platform_ZOS_ZSERIES_IBM_h
index 07eada65135a63a28a7993818e783025ed7b62c8..3c156cafddf13eeefe047d75d8e4be5d94d761ce 100644 (file)
@@ -29,9 +29,6 @@
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com),
-//         
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include "PropertyAccessor.h"
@@ -47,8 +44,8 @@ PEGASUS_NAMESPACE_BEGIN
 */
 template<class T>
 bool _Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     T& x)
 {
     bool isNull;
@@ -56,9 +53,9 @@ bool _Get(
     const CIMValue& value = inst.getProperty(pos).getValue();
 
     if ((isNull = value.isNull()))
-       x = T();
+        x = T();
     else
-       value.get(x);
+        value.get(x);
     return !isNull;
 }
 
@@ -71,8 +68,8 @@ bool _Get(
 */
 template<class T>
 void _Set(
-    CIMInstance& inst, 
-    const String& name, 
+    CIMInstance& inst,
+    const String& name,
     const T& x,
     bool null)
 {
@@ -87,25 +84,25 @@ void _Set(
 }
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Boolean& value)
 {
     return _Get(inst, name, value);
 }
 
 void Set(
-    CIMInstance& inst, 
-    const String& name, 
-    const Boolean& value, 
+    CIMInstance& inst,
+    const String& name,
+    const Boolean& value,
     bool null)
 {
     _Set(inst, name, value, null);
 }
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Array<Boolean>& value)
 {
     return _Get(inst, name, value);;
@@ -113,15 +110,15 @@ bool Get(
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Array<Boolean>& value, 
+    const String& name,
+    const Array<Boolean>& value,
     bool null)
 {
     _Set(inst, name, value, null);
 }
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Uint8& value)
 {
     return _Get(inst, name, value);;
@@ -129,16 +126,16 @@ bool Get(
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Uint8& value, 
+    const String& name,
+    const Uint8& value,
     bool null)
 {
     _Set(inst, name, value, null);
 }
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Array<Uint8>& value)
 {
     return _Get(inst, name, value);
@@ -146,15 +143,15 @@ bool Get(
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Array<Uint8>& value, 
+    const String& name,
+    const Array<Uint8>& value,
     bool null)
 {
     _Set(inst, name, value, null);
 }
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Sint8& value)
 {
     return _Get(inst, name, value);;
@@ -162,16 +159,16 @@ bool Get(
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Sint8& value, 
+    const String& name,
+    const Sint8& value,
     bool null)
 {
     _Set(inst, name, value, null);
 }
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Array<Sint8>& value)
 {
     return _Get(inst, name, value);;
@@ -179,15 +176,15 @@ bool Get(
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Array<Sint8>& value, 
+    const String& name,
+    const Array<Sint8>& value,
     bool null)
 {
     _Set(inst, name, value, null);
 }
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Uint16& value)
 {
     return _Get(inst, name, value);;
@@ -195,16 +192,16 @@ bool Get(
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Uint16& value, 
+    const String& name,
+    const Uint16& value,
     bool null)
 {
     _Set(inst, name, value, null);
 }
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Array<Uint16>& value)
 {
     return _Get(inst, name, value);;
@@ -212,15 +209,16 @@ bool Get(
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Array<Uint16>& value, 
+    const String& name,
+    const Array<Uint16>& value,
     bool null)
 {
     _Set(inst, name, value, null);
 }
+
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Sint16& value)
 {
     return _Get(inst, name, value);;
@@ -228,16 +226,16 @@ bool Get(
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Sint16& value, 
+    const String& name,
+    const Sint16& value,
     bool null)
 {
     _Set(inst, name, value, null);
 }
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Array<Sint16>& value)
 {
     return _Get(inst, name, value);;
@@ -245,15 +243,15 @@ bool Get(
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Array<Sint16>& value, 
+    const String& name,
+    const Array<Sint16>& value,
     bool null)
 {
     _Set(inst, name, value, null);
 }
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Uint32& value)
 {
     return _Get(inst, name, value);;
@@ -261,16 +259,16 @@ bool Get(
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Uint32& value, 
+    const String& name,
+    const Uint32& value,
     bool null)
 {
     _Set(inst, name, value, null);
 }
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Array<Uint32>& value)
 {
     return _Get(inst, name, value);;
@@ -278,15 +276,15 @@ bool Get(
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Array<Uint32>& value, 
+    const String& name,
+    const Array<Uint32>& value,
     bool null)
 {
     _Set(inst, name, value, null);
 }
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Sint32& value)
 {
     return _Get(inst, name, value);;
@@ -294,16 +292,16 @@ bool Get(
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Sint32& value, 
+    const String& name,
+    const Sint32& value,
     bool null)
 {
     _Set(inst, name, value, null);
 }
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Array<Sint32>& value)
 {
     return _Get(inst, name, value);;
@@ -311,15 +309,15 @@ bool Get(
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Array<Sint32>& value, 
+    const String& name,
+    const Array<Sint32>& value,
     bool null)
 {
     _Set(inst, name, value, null);
 }
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Uint64& value)
 {
     return _Get(inst, name, value);;
@@ -327,16 +325,16 @@ bool Get(
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Uint64& value, 
+    const String& name,
+    const Uint64& value,
     bool null)
 {
     _Set(inst, name, value, null);
 }
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Array<Uint64>& value)
 {
     return _Get(inst, name, value);;
@@ -344,15 +342,15 @@ bool Get(
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Array<Uint64>& value, 
+    const String& name,
+    const Array<Uint64>& value,
     bool null)
 {
     _Set(inst, name, value, null);
 }
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Sint64& value)
 {
     return _Get(inst, name, value);;
@@ -360,16 +358,16 @@ bool Get(
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Sint64& value, 
+    const String& name,
+    const Sint64& value,
     bool null)
 {
     _Set(inst, name, value, null);
 }
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Array<Sint64>& value)
 {
     return _Get(inst, name, value);;
@@ -377,15 +375,15 @@ bool Get(
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Array<Sint64>& value, 
+    const String& name,
+    const Array<Sint64>& value,
     bool null)
 {
     _Set(inst, name, value, null);
 }
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Real32& value)
 {
     return _Get(inst, name, value);;
@@ -393,16 +391,16 @@ bool Get(
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Real32& value, 
+    const String& name,
+    const Real32& value,
     bool null)
 {
     _Set(inst, name, value, null);
 }
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Array<Real32>& value)
 {
     return _Get(inst, name, value);;
@@ -410,15 +408,15 @@ bool Get(
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Array<Real32>& value, 
+    const String& name,
+    const Array<Real32>& value,
     bool null)
 {
     _Set(inst, name, value, null);
 }
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Real64& value)
 {
     return _Get(inst, name, value);;
@@ -426,16 +424,16 @@ bool Get(
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Real64& value, 
+    const String& name,
+    const Real64& value,
     bool null)
 {
     _Set(inst, name, value, null);
 }
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Array<Real64>& value)
 {
     return _Get(inst, name, value);;
@@ -443,15 +441,15 @@ bool Get(
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Array<Real64>& value, 
+    const String& name,
+    const Array<Real64>& value,
     bool null)
 {
     _Set(inst, name, value, null);
 }
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Char16& value)
 {
     return _Get(inst, name, value);;
@@ -459,16 +457,16 @@ bool Get(
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Char16& value, 
+    const String& name,
+    const Char16& value,
     bool null)
 {
     _Set(inst, name, value, null);
 }
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Array<Char16>& value)
 {
     return _Get(inst, name, value);;
@@ -476,15 +474,15 @@ bool Get(
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Array<Char16>& value, 
+    const String& name,
+    const Array<Char16>& value,
     bool null)
 {
     _Set(inst, name, value, null);
 }
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     String& value)
 {
     return _Get(inst, name, value);;
@@ -492,16 +490,16 @@ bool Get(
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const String& value, 
+    const String& name,
+    const String& value,
     bool null)
 {
     _Set(inst, name, value, null);
 }
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Array<String>& value)
 {
     return _Get(inst, name, value);
@@ -509,15 +507,15 @@ bool Get(
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Array<String>& value, 
+    const String& name,
+    const Array<String>& value,
     bool null)
 {
     _Set(inst, name, value, null);
 }
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     CIMDateTime& value)
 {
     return _Get(inst, name, value);
@@ -525,16 +523,16 @@ bool Get(
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const CIMDateTime& value, 
+    const String& name,
+    const CIMDateTime& value,
     bool null)
 {
     _Set(inst, name, value, null);
 }
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Array<CIMDateTime>& value)
 {
     return _Get(inst, name, value);
@@ -542,8 +540,8 @@ bool Get(
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Array<CIMDateTime>& value, 
+    const String& name,
+    const Array<CIMDateTime>& value,
     bool null)
 {
     _Set(inst, name, value, null);
index f5716538f7868a46535fd123debb8fcba0050d5c..54d0e00dc4beda1cd537dbad316c2d0cfb9a4aa3 100644 (file)
 #include <Pegasus/Common/CIMInstance.h>
 
 PEGASUS_NAMESPACE_BEGIN
-/* PropertyAccessor is a set of support functions for property value access within instances.
-   These functions provide the capability to get and set the value of all of the
-   native property types within Pegasus using only the reference to the instance and
-   the property name as identifiers.  The provide, in effect, an associative link to
-   property values as an alternate to the index based reference defined in the CIMInstance
-   object.  Further, they allow directly getting and setting the value in place of the
-   multistep approach in the objects where the the CIMValue must first be retrieved before
-   the value can be accessed.   This reduces the access to a single line of code.
-
-   These functions assume that the property exists in the instance and execute a 
-   Examples:
-       Set(_inst, "ErrorSourceFormat", Uint16(value), null);
-       bool nullStat = Get(_inst, "ErrorSourceFormat", t);
-   These functions are to be used only internally within Open Pegasus
+/*
+    PropertyAccessor is a set of support functions for property value access
+    within instances.  These functions provide the capability to get and set
+    the value of all of the native property types within Pegasus using only
+    the reference to the instance and the property name as identifiers.  They
+    provide, in effect, an associative link to property values as an
+    alternate to the index based reference defined in the CIMInstance
+    object.  Further, they allow directly getting and setting the value in
+    place of the multistep approach in the objects where the the CIMValue
+    must first be retrieved before the value can be accessed.  This reduces
+    the access to a single line of code.
+
+    These functions assume that the property exists in the instance.
+
+    Examples:
+        Set(_inst, "ErrorSourceFormat", Uint16(value), null);
+        bool nullStat = Get(_inst, "ErrorSourceFormat", t);
+    These functions are to be used only internally within OpenPegasus
 */
 
 /** Get the named property value from the target instance.
@@ -60,12 +64,12 @@ PEGASUS_NAMESPACE_BEGIN
     variable if the NULL attribute is NOT set for the CIMValue for this
     property.
     @return bool returns true if the CIMValue for the property is NOT Null.
-    @exception Returns CIM_ERR_NO_SUCH_PROPERTY if the named property is not in the
-    instance.
-*/    
+    @exception Returns CIM_ERR_NO_SUCH_PROPERTY if the named property is not
+    in the instance.
+*/
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Boolean& value);
 
 /** Get the named property value from the target instance.
@@ -77,310 +81,310 @@ bool Get(
     @param null bool If this is set true, the value parameter is ignored and the
     property is set to NULL.
     @return bool returns true if the CIMValue for the property is NOT Null.
-    @exception Returns CIM_ERR_NO_SUCH_PROPERTY if the named property is not in the
-    instance.
-*/    
+    @exception Returns CIM_ERR_NO_SUCH_PROPERTY if the named property is not
+    in the instance.
+*/
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Boolean& value, 
+    const String& name,
+    const Boolean& value,
     bool null);
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Array<Boolean>& value);
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Array<Boolean>& value, 
+    const String& name,
+    const Array<Boolean>& value,
     bool null);
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Uint8& value);
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Uint8& value, 
+    const String& name,
+    const Uint8& value,
     bool null);
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Array<Uint8>& value);
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Array<Uint8>& value, 
+    const String& name,
+    const Array<Uint8>& value,
     bool null);
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Sint8& value);
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Sint8& value, 
+    const String& name,
+    const Sint8& value,
     bool null);
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Array<Sint8>& value);
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Array<Sint8>& value, 
+    const String& name,
+    const Array<Sint8>& value,
     bool null);
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Uint16& value);
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Uint16& value, 
+    const String& name,
+    const Uint16& value,
     bool null);
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Array<Uint16>& value);
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Array<Uint16>& value, 
+    const String& name,
+    const Array<Uint16>& value,
     bool null);
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Sint16& value);
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Sint16& value, 
+    const String& name,
+    const Sint16& value,
     bool null);
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Array<Sint16>& value);
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Array<Sint16>& value, 
+    const String& name,
+    const Array<Sint16>& value,
     bool null);
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Uint32& value);
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Uint32& value, 
+    const String& name,
+    const Uint32& value,
     bool null);
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Array<Uint32>& value);
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Array<Uint32>& value, 
+    const String& name,
+    const Array<Uint32>& value,
     bool null);
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Sint32& value);
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Sint32& value, 
+    const String& name,
+    const Sint32& value,
     bool null);
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Array<Sint32>& value);
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Array<Sint32>& value, 
+    const String& name,
+    const Array<Sint32>& value,
     bool null);
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Uint64& value);
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Uint64& value, 
+    const String& name,
+    const Uint64& value,
     bool null);
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Array<Uint64>& value);
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Array<Uint64>& value, 
+    const String& name,
+    const Array<Uint64>& value,
     bool null);
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Sint64& value);
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Sint64& value, 
+    const String& name,
+    const Sint64& value,
     bool null);
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Array<Sint64>& value);
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Array<Sint64>& value, 
+    const String& name,
+    const Array<Sint64>& value,
     bool null);
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Real32& value);
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Real32& value, 
+    const String& name,
+    const Real32& value,
     bool null);
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Array<Real32>& value);
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Array<Real32>& value, 
+    const String& name,
+    const Array<Real32>& value,
     bool null);
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Real64& value);
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Real64& value, 
+    const String& name,
+    const Real64& value,
     bool null);
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Array<Real64>& value);
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Array<Real64>& value, 
+    const String& name,
+    const Array<Real64>& value,
     bool null);
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Char16& value);
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Char16& value, 
+    const String& name,
+    const Char16& value,
     bool null);
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Array<Char16>& value);
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Array<Char16>& value, 
+    const String& name,
+    const Array<Char16>& value,
     bool null);
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     String& value);
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const String& value, 
+    const String& name,
+    const String& value,
     bool null);
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Array<String>& value);
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Array<String>& value, 
+    const String& name,
+    const Array<String>& value,
     bool null);
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     CIMDateTime& value);
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const CIMDateTime& value, 
+    const String& name,
+    const CIMDateTime& value,
     bool null);
 
 bool Get(
-    const CIMInstance& inst, 
-    const String& name, 
+    const CIMInstance& inst,
+    const String& name,
     Array<CIMDateTime>& value);
 
 void Set(
     CIMInstance& inst,
-    const String& name, 
-    const Array<CIMDateTime>& value, 
+    const String& name,
+    const Array<CIMDateTime>& value,
     bool null);
 
 inline CIMType GetType(Boolean*) { return CIMTYPE_BOOLEAN; }
index 0ed906dee3fc54e51af30e9c0d753b3de1dc0bda..a6c03059d0b42ea587b51709418f79ce84a50215 100644 (file)
 //
 //==============================================================================
 //
-// Author: Adrian Schuur (schuur@de.ibm.com)
-//
-// Modified By:
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
-#include "QueryExpressionRep.h" 
+#include "QueryExpressionRep.h"
 
 PEGASUS_NAMESPACE_BEGIN
 
-QueryExpressionRep::QueryExpressionRep(const String & language)
-   : _queryLanguage(language), _query(String::EMPTY)
+QueryExpressionRep::QueryExpressionRep(const String& language)
+    : _queryLanguage(language), _query(String::EMPTY)
 {
 }
 
-QueryExpressionRep::QueryExpressionRep(const String & language, const String & query)
-   : _queryLanguage(language), _query(query)
+QueryExpressionRep::QueryExpressionRep(
+    const String& language,
+    const String& query)
+    : _queryLanguage(language), _query(query)
 {
 }
 
-const String & QueryExpressionRep::getQueryLanguage() const
+const String& QueryExpressionRep::getQueryLanguage() const
 {
-   return _queryLanguage;
+    return _queryLanguage;
 }
 
-const String & QueryExpressionRep::getQuery() const
+const String& QueryExpressionRep::getQuery() const
 {
-   return _query;
+    return _query;
 }
 
 PEGASUS_NAMESPACE_END
index f6846b62d59b1c58a653aa97e69fa61e042cae82..47263c1f5ca95b32c8f91af1216f9a0243c38d5a 100644 (file)
 //
 //==============================================================================
 //
-// Author: Adrian Schuur (schuur@de.ibm.com)
-//
-// Modified By:
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_QueryExpressionRep_h
index 6b94aeab4920d070928999a149fff641dcbc5ef1..f2eb3fb17758a3d758cb305a5c0cb7d851277f2f 100644 (file)
@@ -54,8 +54,9 @@ ReadWriteSem::ReadWriteSem():_readers(0), _writers(0)
 
 ReadWriteSem::~ReadWriteSem()
 {
-    int r=0;
-    while (r=pthread_rwlock_destroy(&_rwlock.rwlock) == EBUSY || (r == -1 && errno == EBUSY))
+    int r = 0;
+    while (r=pthread_rwlock_destroy(&_rwlock.rwlock) == EBUSY ||
+           (r == -1 && errno == EBUSY))
     {
         Threads::yield();
     }
@@ -207,12 +208,12 @@ void ReadWriteSem::unlock(Uint32 mode, ThreadType caller)
 
 int ReadWriteSem::read_count() const
 {
-    return (_readers.get());
+    return _readers.get();
 }
 
 int ReadWriteSem::write_count() const
 {
-    return (_writers.get());
+    return _writers.get();
 }
 
 #endif /* PEGASUS_USE_POSIX_RWLOCK */
@@ -258,11 +259,11 @@ ReadWriteSem::~ReadWriteSem()
     {
         _rwlock._internal_lock.lock();
     }
-    catch(Deadlock &)
+    catch (Deadlock &)
     {
         // no problem - we own the lock, which is what we want
     }
-    catch(IPCException &)
+    catch (IPCException &)
     {
         PEGASUS_ASSERT(0);
     }
@@ -314,7 +315,7 @@ void ReadWriteSem::timed_wait(Uint32 mode, ThreadType caller,
             else
                 _rwlock._internal_lock.timed_lock(milliseconds);
         }
-        catch(const IPCException & e)
+        catch (const IPCException & e)
         {
             caught = e;
             goto throw_from_here;
@@ -371,7 +372,7 @@ void ReadWriteSem::timed_wait(Uint32 mode, ThreadType caller,
                 {
                     _rwlock._wlock.try_lock();
                 }
-                catch(IPCException & e)
+                catch (IPCException & e)
                 {
                     _rwlock._internal_lock.unlock();
                     caught = e;
@@ -384,7 +385,7 @@ void ReadWriteSem::timed_wait(Uint32 mode, ThreadType caller,
                 {
                     _rwlock._wlock.lock();
                 }
-                catch(const IPCException & e)
+                catch (const IPCException & e)
                 {
                     _rwlock._internal_lock.unlock();
                     caught = e;
@@ -397,7 +398,7 @@ void ReadWriteSem::timed_wait(Uint32 mode, ThreadType caller,
                 {
                     _rwlock._wlock.timed_lock(milliseconds);
                 }
-                catch(const IPCException & e)
+                catch (const IPCException & e)
                 {
                     _rwlock._internal_lock.unlock();
                     caught = e;
@@ -468,7 +469,7 @@ void ReadWriteSem::timed_wait(Uint32 mode, ThreadType caller,
                 {
                     _rwlock._rlock.try_wait();
                 }
-                catch(const IPCException &)
+                catch (const IPCException &)
                 {
                     // the wait failed, there must be too many readers
                     // already.
@@ -484,7 +485,7 @@ void ReadWriteSem::timed_wait(Uint32 mode, ThreadType caller,
                 {
                     _rwlock._rlock.wait();
                 }
-                catch(const IPCException & e)
+                catch (const IPCException & e)
                 {
                     _rwlock._internal_lock.unlock();
                     caught = e;
@@ -497,7 +498,7 @@ void ReadWriteSem::timed_wait(Uint32 mode, ThreadType caller,
                 {
                     _rwlock._rlock.time_wait(milliseconds);
                 }
-                catch(const IPCException & e)
+                catch (const IPCException & e)
                 {
                     _rwlock._internal_lock.unlock();
                     caught = e;
@@ -513,7 +514,7 @@ void ReadWriteSem::timed_wait(Uint32 mode, ThreadType caller,
             _rwlock._internal_lock.unlock();
         }
       throw_from_here:
-       // ATTN:
+        // ATTN:
         Threads::cleanup_pop(0);
     }
 
@@ -557,12 +558,12 @@ void ReadWriteSem::unlock(Uint32 mode, ThreadType caller)
 
 int ReadWriteSem::read_count() const
 {
-    return (_readers.get());
+    return _readers.get();
 }
 
 int ReadWriteSem::write_count() const
 {
-    return (_writers.get());
+    return _writers.get();
 }
 
 #endif /* !PEGASUS_USE_SEMAPHORE_RWLOCK */
index ef2a341866906100d016f6c9e5f82815cfda5f08..d844a70f1b11dc0e8aaa9a735fd5fe5d66e02e19 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Day (mdday@us.ibm.com)
-//
-// Reworked By: Mike Brasher (m.brasher@inovadevelopment.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_ReadWriteSem_h
@@ -101,7 +97,7 @@ struct ReadWriteSemRep
     Mutex _wlock;
     Mutex _internal_lock;
     ThreadType _owner;
-    ReadWriteSemRep() : 
+    ReadWriteSemRep() :
         _rlock(10), _wlock(), _internal_lock(), _owner(Threads::self())
     {
     }
index 83b52013764a774f5d2c2ca77f4a0887d189ace7..95bec08475122f18dd7263433566f32116696dc3 100644 (file)
 //
 //==============================================================================
 //
-// Author: Carol Ann Krug Graves, Hewlett-Packard Company
-//           (carolann_graves@hp.com)
-//
-// Modified By: 
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include <Pegasus/Common/Resolver.h>
 
 PEGASUS_NAMESPACE_BEGIN
 
-void Resolver::resolveClass (
-    CIMClass & theClass,
-    DeclContext * declContext,
-    const CIMNamespaceName & nameSpace)
+void Resolver::resolveClass(
+    CIMClass& theClass,
+    DeclContext* declContext,
+    const CIMNamespaceName& nameSpace)
 {
-    theClass._checkRep ();
-    theClass._rep->resolve (declContext, nameSpace);
+    theClass._checkRep();
+    theClass._rep->resolve(declContext, nameSpace);
 }
 
-void Resolver::resolveInstance (
-    CIMInstance & theInstance,
-    DeclContext * declContext,
-    const CIMNamespaceName & nameSpace,
+void Resolver::resolveInstance(
+    CIMInstance& theInstance,
+    DeclContext* declContext,
+    const CIMNamespaceName& nameSpace,
     Boolean propagateQualifiers)
 {
-    theInstance._checkRep ();
+    theInstance._checkRep();
     CIMConstClass cimClass;
-    theInstance._rep->resolve (declContext, nameSpace, cimClass, 
-        propagateQualifiers);
+    theInstance._rep->resolve(
+        declContext, nameSpace, cimClass, propagateQualifiers);
 }
 
-void Resolver::resolveInstance (
-    CIMInstance & theInstance,
-    DeclContext * declContext,
-    const CIMNamespaceName & nameSpace,
-    CIMConstClass & cimClassOut,
+void Resolver::resolveInstance(
+    CIMInstance& theInstance,
+    DeclContext* declContext,
+    const CIMNamespaceName& nameSpace,
+    CIMConstClass& cimClassOut,
     Boolean propagateQualifiers)
 {
-    theInstance._checkRep ();
-    theInstance._rep->resolve (declContext, nameSpace, cimClassOut, 
+    theInstance._checkRep();
+    theInstance._rep->resolve(declContext, nameSpace, cimClassOut,
         propagateQualifiers);
 }
 
-void Resolver::resolveProperty (
-    CIMProperty & theProperty,
-    DeclContext * declContext,
-    const CIMNamespaceName & nameSpace,
+void Resolver::resolveProperty(
+    CIMProperty& theProperty,
+    DeclContext* declContext,
+    const CIMNamespaceName& nameSpace,
     Boolean isInstancePart,
-    const CIMConstProperty & inheritedProperty,
+    const CIMConstProperty& inheritedProperty,
     Boolean propagateQualifiers)
 {
-    theProperty._checkRep ();
-    theProperty._rep->resolve (declContext, nameSpace, isInstancePart, 
+    theProperty._checkRep();
+    theProperty._rep->resolve(declContext, nameSpace, isInstancePart,
         inheritedProperty, propagateQualifiers);
 }
 
-void Resolver::resolveProperty (
-    CIMProperty & theProperty,
-    DeclContext * declContext,
-    const CIMNamespaceName & nameSpace,
+void Resolver::resolveProperty(
+    CIMProperty& theProperty,
+    DeclContext* declContext,
+    const CIMNamespaceName& nameSpace,
     Boolean isInstancePart,
     Boolean propagateQualifiers)
 {
-    theProperty._checkRep ();
-    theProperty._rep->resolve (declContext, nameSpace, isInstancePart, 
+    theProperty._checkRep();
+    theProperty._rep->resolve(declContext, nameSpace, isInstancePart,
         propagateQualifiers);
 }
 
-void Resolver::resolveMethod (
-    CIMMethod & theMethod,
-    DeclContext * declContext,
-    const CIMNamespaceName & nameSpace,
-    const CIMConstMethod & inheritedMethod)
+void Resolver::resolveMethod(
+    CIMMethod& theMethod,
+    DeclContext* declContext,
+    const CIMNamespaceName& nameSpace,
+    const CIMConstMethod& inheritedMethod)
 {
-    theMethod._checkRep ();
-    theMethod._rep->resolve (declContext, nameSpace, inheritedMethod);
+    theMethod._checkRep();
+    theMethod._rep->resolve(declContext, nameSpace, inheritedMethod);
 }
 
-void Resolver::resolveMethod (
-    CIMMethod & theMethod,
-    DeclContext * declContext,
-    const CIMNamespaceName & nameSpace)
+void Resolver::resolveMethod(
+    CIMMethod& theMethod,
+    DeclContext* declContext,
+    const CIMNamespaceName& nameSpace)
 {
-    theMethod._checkRep ();
-    theMethod._rep->resolve (declContext, nameSpace);
+    theMethod._checkRep();
+    theMethod._rep->resolve(declContext, nameSpace);
 }
 
-void Resolver::resolveParameter (
-    CIMParameter & theParameter,
-    DeclContext * declContext, 
-    const CIMNamespaceName & nameSpace)
+void Resolver::resolveParameter(
+    CIMParameter& theParameter,
+    DeclContext* declContext,
+    const CIMNamespaceName& nameSpace)
 {
-    theParameter._checkRep ();
-    theParameter._rep->resolve (declContext, nameSpace);
+    theParameter._checkRep();
+    theParameter._rep->resolve(declContext, nameSpace);
 }
 
-void Resolver::resolveQualifierFlavor (
-    CIMQualifier & theQualifier,
-    const CIMFlavor & inheritedFlavor, 
+void Resolver::resolveQualifierFlavor(
+    CIMQualifier& theQualifier,
+    const CIMFlavor& inheritedFlavor,
     Boolean inherited)
 {
-    theQualifier._checkRep ();
-    theQualifier._rep->resolveFlavor (inheritedFlavor, inherited);
+    theQualifier._checkRep();
+    theQualifier._rep->resolveFlavor(inheritedFlavor, inherited);
 }
 
 PEGASUS_NAMESPACE_END
index bdb3ab83086b83f6aa7199c5eec077d5c94814a4..7b41e7852acf1d20da4e0d2d0e8ccf0bbe4859f3 100644 (file)
 //
 //==============================================================================
 //
-// Author: Carol Ann Krug Graves, Hewlett-Packard Company 
-//           (carolann_graves@hp.com)
-//
-// Modified By: 
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_Resolver_h
 PEGASUS_NAMESPACE_BEGIN
 
 /**
-    The Resolver class provides methods to resolve CIM objects, including 
-    CIMClass, CIMInstance, CIMProperty, CIMMethod, CIMParameter, and 
-    CIMQualifier flavor.  These methods were moved here from the 
-    CIM[objectType] classes.  These methods in turn call the resolve () methods
+    The Resolver class provides methods to resolve CIM objects, including
+    CIMClass, CIMInstance, CIMProperty, CIMMethod, CIMParameter, and
+    CIMQualifier flavor.  These methods were moved here from the
+    CIM[objectType] classes.  These methods in turn call the resolve() methods
     of the CIM[objectType]Rep classes, which actually do the work.
 
-    Note that this class contains only internal functions and should not be 
+    Note that this class contains only internal functions and should not be
     made available to external users.
-
-    @author  Hewlett-Packard Company
  */
 
 class PEGASUS_COMMON_LINKAGE Resolver
 {
 public:
 
-    /** 
-        Resolves the class.  Inherits any properties, methods and qualifiers.  
-        Makes sure the superClass exists and is consistent with this class.  
+    /**
+        Resolves the class.  Inherits any properties, methods and qualifiers.
+        Makes sure the superClass exists and is consistent with this class.
         Sets the propagated and class origin flags for each class feature.
 
         @param theClass            CIMClass object to be resolved
         @param declContext         Defines the context in which the class is
                                    to be resolved.  This provides the basis for
-                                   other functions to get information from the 
+                                   other functions to get information from the
                                    context to use to resolve the class.
         @param nameSpace           Namespace in which the class is to be placed
     */
-    static void resolveClass (
-        CIMClass & theClass,
-        DeclContext * declContext,
-        const CIMNamespaceName & nameSpace);
+    static void resolveClass(
+        CIMClass& theClass,
+        DeclContext* declContext,
+        const CIMNamespaceName& nameSpace);
 
-    /** 
+    /**
         Resolves the instance.  Makes sure the class exists and is not
-        abstract.  Validates and propagates qualifiers, if requested.  
-        Validates and resolves properties.  Sets the propagated and class 
+        abstract.  Validates and propagates qualifiers, if requested.
+        Validates and resolves properties.  Sets the propagated and class
         origin flags.
 
         @param theInstance         CIMInstance object to be resolved
         @param declContext         Defines the context in which the instance is
                                    to be resolved.  This provides the basis for
-                                   other functions to get information from the 
+                                   other functions to get information from the
                                    context to use to resolve the instance.
-        @param nameSpace           Namespace in which the instance is to be 
+        @param nameSpace           Namespace in which the instance is to be
                                    placed
         @param propagateQualifiers Boolean indicating whether qualifiers are to
-                                   be propagated 
+                                   be propagated
     */
-    static void resolveInstance (
-        CIMInstance & theInstance,
-        DeclContext * declContext,
-        const CIMNamespaceName & nameSpace,
+    static void resolveInstance(
+        CIMInstance& theInstance,
+        DeclContext* declContext,
+        const CIMNamespaceName& nameSpace,
         Boolean propagateQualifiers);
 
-    /** 
+    /**
         Resolves the instance.  Makes sure the class exists and is not
-        abstract.  Validates and propagates qualifiers, if requested.  
-        Validates and resolves properties.  Sets the propagated and class 
+        abstract.  Validates and propagates qualifiers, if requested.
+        Validates and resolves properties.  Sets the propagated and class
         origin flags.
 
         @param theInstance         CIMInstance object to be resolved
         @param declContext         Defines the context in which the instance is
                                    to be resolved.  This provides the basis for
-                                   other functions to get information from the 
+                                   other functions to get information from the
                                    context to use to resolve the instance.
-        @param nameSpace           Namespace in which the instance is to be 
+        @param nameSpace           Namespace in which the instance is to be
                                    placed
-        @param cimClassOut         CIMClass output parameter containing the 
+        @param cimClassOut         CIMClass output parameter containing the
                                    class to which the instance belongs
         @param propagateQualifiers Boolean indicating whether qualifiers are to
-                                   be propagated 
+                                   be propagated
     */
-    static void resolveInstance (
-        CIMInstance & theInstance,
-        DeclContext * declContext,
-        const CIMNamespaceName & nameSpace,
-        CIMConstClass & cimClassOut,
+    static void resolveInstance(
+        CIMInstance& theInstance,
+        DeclContext* declContext,
+        const CIMNamespaceName& nameSpace,
+        CIMConstClass& cimClassOut,
         Boolean propagateQualifiers);
 
-    /** 
-        Resolves the property.  Resolution is the process of integrating the 
-        property into the the context of a repository or other store.  
+    /**
+        Resolves the property.  Resolution is the process of integrating the
+        property into the the context of a repository or other store.
         Validates the qualifiers of the property.
 
         @param theProperty         CIMProperty object to be resolved
         @param declContext         Defines the context in which the property is
                                    to be resolved.  This provides the basis for
-                                   other functions to get information from the 
+                                   other functions to get information from the
                                    context to use to resolve the property.
-        @param nameSpace           Namespace in which the property is to be 
+        @param nameSpace           Namespace in which the property is to be
                                    placed
         @param isInstancePart      Indicates instance or class resolution
         @param inheritedProperty   CIMConstProperty containing the property from
                                    the class or superclass
         @param propagateQualifiers Boolean indicating whether qualifiers are to
     */
-    static void resolveProperty (
-        CIMProperty & theProperty,
-       DeclContext * declContext,
-       const CIMNamespaceName & nameSpace,
-       Boolean isInstancePart,
-       const CIMConstProperty & inheritedProperty,
-       Boolean propagateQualifiers);
+    static void resolveProperty(
+        CIMProperty& theProperty,
+        DeclContext* declContext,
+        const CIMNamespaceName& nameSpace,
+        Boolean isInstancePart,
+        const CIMConstProperty& inheritedProperty,
+        Boolean propagateQualifiers);
 
     //  ATTN: P3 03/02/02 KS Needs more documentation.
-    /** 
-        Resolves the property.  Resolution is the process of integrating the 
-        property into the the context of a repository or other store.  
+    /**
+        Resolves the property.  Resolution is the process of integrating the
+        property into the the context of a repository or other store.
         Validates the qualifiers of the property.
 
         @param theProperty         CIMProperty object to be resolved
         @param declContext         Defines the context in which the property is
                                    to be resolved.  This provides the basis for
-                                   other functions to get information from the 
+                                   other functions to get information from the
                                    context to use to resolve the property.
-        @param nameSpace           Namespace in which the property is to be 
+        @param nameSpace           Namespace in which the property is to be
                                    placed
         @param isInstancePart      Indicates instance or class resolution
         @param propagateQualifiers Boolean indicating whether qualifiers are to
-                                   be propagated 
+                                   be propagated
     */
-    static void resolveProperty (
-        CIMProperty & theProperty,
-       DeclContext * declContext,
-       const CIMNamespaceName & nameSpace,
-       Boolean isInstancePart,
-       Boolean propagateQualifiers);
+    static void resolveProperty(
+        CIMProperty& theProperty,
+        DeclContext* declContext,
+        const CIMNamespaceName& nameSpace,
+        Boolean isInstancePart,
+        Boolean propagateQualifiers);
 
-    /** 
+    /**
         Resolves the CIMMethod.  Validates the qualifiers and parameters of the
         method.
 
         @param theMethod           CIMMethod object to be resolved
         @param declContext         Defines the context in which the method is
                                    to be resolved.  This provides the basis for
-                                   other functions to get information from the 
+                                   other functions to get information from the
                                    context to use to resolve the method.
-        @param nameSpace           Namespace in which the method is to be 
+        @param nameSpace           Namespace in which the method is to be
                                    placed
         @param inheritedMethod     CIMConstMethod containing the method from
                                    the class or superclass
     */
-    static void resolveMethod (
-        CIMMethod & theMethod,
-        DeclContext * declContext,
-        const CIMNamespaceName & nameSpace,
-        const CIMConstMethod & inheritedMethod);
+    static void resolveMethod(
+        CIMMethod& theMethod,
+        DeclContext* declContext,
+        const CIMNamespaceName& nameSpace,
+        const CIMConstMethod& inheritedMethod);
 
-    /** 
+    /**
         Resolves the CIMMethod.  Validates the qualifiers and parameters of the
         method.
 
         @param theMethod           CIMMethod object to be resolved
         @param declContext         Defines the context in which the method is
                                    to be resolved.  This provides the basis for
-                                   other functions to get information from the 
+                                   other functions to get information from the
                                    context to use to resolve the method.
-        @param nameSpace           Namespace in which the method is to be 
+        @param nameSpace           Namespace in which the method is to be
                                    placed
     */
-    static void resolveMethod (
-        CIMMethod & theMethod,
-        DeclContext * declContext,
-        const CIMNamespaceName & nameSpace);
+    static void resolveMethod(
+        CIMMethod& theMethod,
+        DeclContext* declContext,
+        const CIMNamespaceName& nameSpace);
 
-    /** 
+    /**
         Resolves the parameter.  Validates the qualifiers of the parameter.
 
         @param theParameter        CIMParameter object to be resolved
         @param declContext         Defines the context in which the parameter is
                                    to be resolved.  This provides the basis for
-                                   other functions to get information from the 
+                                   other functions to get information from the
                                    context to use to resolve the parameter.
-        @param nameSpace           Namespace in which the parameter is to be 
+        @param nameSpace           Namespace in which the parameter is to be
                                    placed
     */
-    static void resolveParameter (
-        CIMParameter & theParameter,
-        DeclContext * declContext, 
-        const CIMNamespaceName & nameSpace);
+    static void resolveParameter(
+        CIMParameter& theParameter,
+        DeclContext* declContext,
+        const CIMNamespaceName& nameSpace);
 
-    /** 
-        Resolves the qualifier flavor.  This function is used only in object 
+    /**
+        Resolves the qualifier flavor.  This function is used only in object
         creation to resolve the combination of a qualifer flavor input and
-        the corresponding inherited flavor from declaration or superclass and 
-        set the current qualifier to that definition.  The function changes 
+        the corresponding inherited flavor from declaration or superclass and
+        set the current qualifier to that definition.  The function changes
         the current flavor based on the characteristics of the inheritance.
 
         @param inheritedFlavor   The flavor inherited from higher level
-        @param inherited         True if inherited from definition 
+        @param inherited         True if inherited from definition
                                  False if this is definition that inherits from
                                  the declaration
     */
-    static void resolveQualifierFlavor (
-        CIMQualifier & theQualifier,
-        const CIMFlavor & inheritedFlavor, 
+    static void resolveQualifierFlavor(
+        CIMQualifier& theQualifier,
+        const CIMFlavor& inheritedFlavor,
         Boolean inherited);
 };
 
index 000f75c92b62d6ba925b2edc23063ce7728ccbb8..8cf0eef08137f773817bec8545a5a15b8edda6db 100644 (file)
 //
 //==============================================================================
 //
-// Author: Chip Vincent (cvincent@us.ibm.com)
-//
-// Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include "ResponseHandler.h"
@@ -127,9 +123,9 @@ ResponseHandler::~ResponseHandler()
     _deleteRep(this);
 }
 
-OperationContext ResponseHandler::getContext(void) const
+OperationContext ResponseHandler::getContext() const
 {
-    return(_getRep(this)->getContext());
+    return _getRep(this)->getContext();
 }
 
 void ResponseHandler::setContext(const OperationContext & context)
index 889466ad396fcfaa5bd0065ea8b62f943dd24a6a..9ae764b21feaa2d750aba5d54cc75602d0cd91f0 100644 (file)
@@ -29,8 +29,6 @@
 //
 //==============================================================================
 //
-// Author: Chuck Carmack (carmack@us.ibm.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include "ResponseHandlerRep.h"
@@ -45,13 +43,11 @@ ResponseHandlerRep::ResponseHandlerRep()
 
 ResponseHandlerRep::~ResponseHandlerRep()
 {
-
 }
 
-ResponseHandlerRep::ResponseHandlerRep(const ResponseHandlerRep& x) : 
-    _context(x._context)
+ResponseHandlerRep::ResponseHandlerRep(const ResponseHandlerRep& x)
+    _context(x._context)
 {
-
 }
 
 OperationContext ResponseHandlerRep::getContext() const
index 59425a414e120a23d9d7b2317b05a7529a378c5c..3dbd594b9c5ecb5b79e89123c50836312f5aeb18 100644 (file)
@@ -29,8 +29,6 @@
 //
 //==============================================================================
 //
-// Author: Chuck Carmack (carmack@us.ibm.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_ResponseHandlerRep_h
@@ -44,7 +42,7 @@ PEGASUS_NAMESPACE_BEGIN
 
 /** This class defines the internal representation of the ResponseHandler class.
 */
-class ResponseHandlerRep  
+class ResponseHandlerRep
 {
 public:
 
index 4b8d6452dc4c28afee65e232bff4a19ea1b0124f..ef3464d53ae10e3b7ef9a5c71b8f1b29316584c8 100644 (file)
 //
 //==============================================================================
 //
-// Author: Markus Mueller (sedgewick_de@yahoo.de)
-//
-// Modified By: Nag Boranna, Hewlett-Packard Company (nagaraja_boranna@hp.com)
-//              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//              Sushma Fernandes, Hewlett-Packard Company (sushma_fernandes@hp.com)
-//              Heather Sterling, IBM (hsterl@us.ibm.com)
-//              Amit K Arora, IBM (amita@in.ibm.com) for Bug#1090
-//              David Dillard, Symantec Corp. (david_dillard@symantec.com)
-//              Aruran, IBM (ashanmug@in.ibm.com) for Bug#4422
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifdef PEGASUS_HAS_SSL
@@ -58,7 +48,7 @@
 #include <Pegasus/Common/Tracer.h>
 #include <Pegasus/Common/FileSystem.h>
 #include <time.h>
-#include <Pegasus/Common/MessageLoader.h> //l10n
+#include <Pegasus/Common/MessageLoader.h>
 #include <Pegasus/Common/Formatter.h>
 
 #include "SSLContext.h"
@@ -191,7 +181,7 @@ CIMDateTime getDateTime(const ASN1_UTCTIME *utcTime)
     strcpy(tempString, (char *)&timeStamp);
     dateTime.set(tempString);
 
-    return (dateTime);
+    return dateTime;
 }
 
 //
@@ -201,8 +191,13 @@ class SSLCallback
 {
 
 public:
-    static int verificationCallback(int preVerifyOk, X509_STORE_CTX *ctx);
-    static int verificationCRLCallback(int ok, X509_STORE_CTX *ctx, X509_STORE* sslCRLStore);
+    static int verificationCallback(
+        int preVerifyOk,
+        X509_STORE_CTX* ctx);
+    static int verificationCRLCallback(
+        int ok,
+        X509_STORE_CTX* ctx,
+        X509_STORE* sslCRLStore);
 };
 
 //
@@ -211,7 +206,10 @@ public:
 //
 // return 1 if revoked, 0 otherwise
 //
-int SSLCallback::verificationCRLCallback(int ok, X509_STORE_CTX *ctx, X509_STORE* sslCRLStore)
+int SSLCallback::verificationCRLCallback(
+    int ok,
+    X509_STORE_CTX* ctx,
+    X509_STORE* sslCRLStore)
 {
     PEG_METHOD_ENTER(TRC_SSL, "SSLCallback::verificationCRLCallback");
 
@@ -220,7 +218,8 @@ int SSLCallback::verificationCRLCallback(int ok, X509_STORE_CTX *ctx, X509_STORE
     //check whether a CRL store was specified
     if (sslCRLStore == NULL)
     {
-        PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL3, "---> SSL: CRL store is NULL");
+        PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL3,
+            "---> SSL: CRL store is NULL");
         PEG_METHOD_EXIT();
         return 0;
     }
@@ -239,7 +238,8 @@ int SSLCallback::verificationCRLCallback(int ok, X509_STORE_CTX *ctx, X509_STORE
     //log certificate information
     //this is information in the "public" key, so it does no harm to log it
     X509_NAME_oneline(issuerName, buf, sizeof(buf));
-    PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4, "---> SSL: Certificate Data: Issuer/Subject");
+    PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4,
+        "---> SSL: Certificate Data: Issuer/Subject");
     PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4, buf);
     X509_NAME_oneline(subjectName, buf, sizeof(buf));
     PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4, buf);
@@ -248,13 +248,16 @@ int SSLCallback::verificationCRLCallback(int ok, X509_STORE_CTX *ctx, X509_STORE
     X509_STORE_CTX crlStoreCtx;
     X509_STORE_CTX_init(&crlStoreCtx, sslCRLStore, NULL, NULL);
 
-    PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4, "---> SSL: Initialized CRL store");
+    PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4,
+        "---> SSL: Initialized CRL store");
 
     //attempt to get a CRL issued by the certificate's issuer
     X509_OBJECT obj;
-    if (X509_STORE_get_by_subject(&crlStoreCtx, X509_LU_CRL, issuerName, &obj) <= 0)
+    if (X509_STORE_get_by_subject(
+            &crlStoreCtx, X509_LU_CRL, issuerName, &obj) <= 0)
     {
-        PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL3, "---> SSL: No CRL by that issuer");
+        PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL3,
+            "---> SSL: No CRL by that issuer");
         PEG_METHOD_EXIT();
         return 0;
     }
@@ -267,16 +270,20 @@ int SSLCallback::verificationCRLCallback(int ok, X509_STORE_CTX *ctx, X509_STORE
         PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4, "---> SSL: CRL is null");
         PEG_METHOD_EXIT();
         return 0;
-    } else
+    }
+    else
     {
-        PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4, "---> SSL: Found CRL by that issuer");
+        PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4,
+            "---> SSL: Found CRL by that issuer");
     }
 
     //get revoked certificates
     STACK_OF(X509_REVOKED)* revokedCerts = NULL;
     revokedCerts = X509_CRL_get_REVOKED(crl);
     int numRevoked = sk_X509_REVOKED_num(revokedCerts);
-    Tracer::trace(TRC_SSL, Tracer::LEVEL4,"---> SSL: Number of certificates revoked by the issuer %d\n", numRevoked);
+    Tracer::trace(TRC_SSL, Tracer::LEVEL4,
+        "---> SSL: Number of certificates revoked by the issuer %d\n",
+        numRevoked);
 
     //check whether the subject's certificate is revoked
     X509_REVOKED* revokedCert = NULL;
@@ -287,14 +294,16 @@ int SSLCallback::verificationCRLCallback(int ok, X509_STORE_CTX *ctx, X509_STORE
         //a matching serial number indicates revocation
         if (ASN1_INTEGER_cmp(revokedCert->serialNumber, serialNumber) == 0)
         {
-            PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL2, "---> SSL: Certificate is revoked");
+            PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL2,
+                "---> SSL: Certificate is revoked");
             X509_STORE_CTX_set_error(ctx, X509_V_ERR_CERT_REVOKED);
             PEG_METHOD_EXIT();
             return 1;
         }
     }
 
-    PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4, "---> SSL: Certificate is not revoked at this level");
+    PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4,
+        "---> SSL: Certificate is not revoked at this level");
 
     PEG_METHOD_EXIT();
     return 0;
@@ -304,10 +313,10 @@ int SSLCallback::verificationCRLCallback(int ok, X509_STORE_CTX *ctx, X509_STORE
 // Callback function that is called by the OpenSSL library. This function
 // extracts X509 certficate information and pass that on to client application
 // callback function.
-// We HAVE to build the certificate in all cases since it's needed to get the associated username out of the repository
-// later in the transaction
+// We HAVE to build the certificate in all cases since it's needed to get
+// the associated username out of the repository later in the transaction.
 //
-int SSLCallback::verificationCallback(int preVerifyOk, X509_STORE_CTX *ctx)
+int SSLCallback::verificationCallback(int preVerifyOk, X509_STORE_CTXctx)
 {
     PEG_METHOD_ENTER(TRC_SSL, "SSLCallback::callback()");
 
@@ -318,23 +327,26 @@ int SSLCallback::verificationCallback(int preVerifyOk, X509_STORE_CTX *ctx)
     int    revoked = -1;
 
     Tracer::trace(TRC_SSL, Tracer::LEVEL4,
-                  "--->SSL: Preverify Error %d", verifyError);
+        "--->SSL: Preverify Error %d", verifyError);
 
     //
     // get the verification callback info specific to each SSL connection
     //
-    ssl = (SSL*) X509_STORE_CTX_get_ex_data(ctx, SSL_get_ex_data_X509_STORE_CTX_idx());
-    SSLCallbackInfo* exData = (SSLCallbackInfo*) SSL_get_ex_data(ssl, SSLCallbackInfo::SSL_CALLBACK_INDEX);
+    ssl = (SSL*) X509_STORE_CTX_get_ex_data(
+        ctx, SSL_get_ex_data_X509_STORE_CTX_idx());
+    SSLCallbackInfo* exData = (SSLCallbackInfo*) SSL_get_ex_data(
+        ssl, SSLCallbackInfo::SSL_CALLBACK_INDEX);
 
-       
 #ifdef PEGASUS_ENABLE_SSL_CRL_VERIFICATION
     //
     // Check to see if a CRL path is defined
     //
     if (exData->_rep->crlStore != NULL)
     {
-        revoked = verificationCRLCallback(preVerifyOk,ctx,exData->_rep->crlStore);
-        Tracer::trace(TRC_SSL, Tracer::LEVEL4, "---> SSL: CRL callback returned %d", revoked);
+        revoked = verificationCRLCallback(
+            preVerifyOk,ctx,exData->_rep->crlStore);
+        Tracer::trace(TRC_SSL, Tracer::LEVEL4,
+            "---> SSL: CRL callback returned %d", revoked);
 
         if (revoked) //with the SSL callbacks '0' indicates failure
         {
@@ -343,7 +355,8 @@ int SSLCallback::verificationCallback(int preVerifyOk, X509_STORE_CTX *ctx)
         }
     }
 
-    Tracer::trace(TRC_SSL, Tracer::LEVEL4, "---> SSL: CRL callback returned %d", revoked);
+    Tracer::trace(TRC_SSL, Tracer::LEVEL4,
+        "---> SSL: CRL callback returned %d", revoked);
 #endif
 
     //
@@ -395,7 +408,8 @@ int SSLCallback::verificationCallback(int preVerifyOk, X509_STORE_CTX *ctx)
     if (!preVerifyOk)
     {
         Tracer::trace(TRC_SSL, Tracer::LEVEL4,
-                      "---> SSL: certificate default verification error: %s", (const char*)errorStr.getCString());
+            "---> SSL: certificate default verification error: %s",
+            (const char*)errorStr.getCString());
     }
 
     //
@@ -407,37 +421,51 @@ int SSLCallback::verificationCallback(int preVerifyOk, X509_STORE_CTX *ctx)
     //
     // Create the certificate object
     //
-  
-    //insert at the beginning of the array so that the peer certificate is first and the root CA is last
-    exData->_rep->peerCertificate.insert(0, new SSLCertificateInfo(subjectName, issuerName, version, serialNumber,
+
+    // insert at the beginning of the array so that the peer certificate is
+    // first and the root CA is last
+    exData->_rep->peerCertificate.insert(0, new SSLCertificateInfo(
+        subjectName, issuerName, version, serialNumber,
         notBefore, notAfter, depth, errorCode, errorStr, preVerifyOk));
 
     PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL3, "Created SSLCertificateInfo");
 
-    // NOT_YET_VALID checks do not work correctly on subsequent tries -- Bugzilla#4283
-    // call this prior to calling the user-specified callback in case they want to override it
-    if (errorCode == X509_V_OK && (CIMDateTime::getDifference(CIMDateTime::getCurrentDateTime(), notBefore) > 0))
+    // NOT_YET_VALID checks do not work correctly on subsequent tries --
+    // Bugzilla#4283
+    // call this prior to calling the user-specified callback in case they
+    // want to override it
+    if (errorCode == X509_V_OK &&
+        (CIMDateTime::getDifference(
+             CIMDateTime::getCurrentDateTime(), notBefore) > 0))
     {
-        PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4, "Certificate was not yet valid.");
-        X509_STORE_CTX_set_error(ctx, X509_V_ERR_CERT_NOT_YET_VALID);   
+        PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4,
+            "Certificate was not yet valid.");
+        X509_STORE_CTX_set_error(ctx, X509_V_ERR_CERT_NOT_YET_VALID);
     }
 
     //
-    // Call the user-specified application callback if it is specified.  If it is null, return OpenSSL's verification code.
-    // Note that the verification result does not automatically get set to X509_V_OK if the callback is successful.
-    // This is because OpenSSL retains the original default error in case we want to use it later.
-    // To set the error, we could use X509_STORE_CTX_set_error(ctx, verifyError); but there is no real benefit to doing that here.
+    // Call the user-specified application callback if it is specified.
+    // If it is null, return OpenSSL's verification code.
+    // Note that the verification result does not automatically get set
+    // to X509_V_OK if the callback is successful.
+    // This is because OpenSSL retains the original default error in case
+    // we want to use it later.
+    // To set the error, we could use X509_STORE_CTX_set_error(ctx,
+    // verifyError); but there is no real benefit to doing that here.
     //
     if (exData->_rep->verifyCertificateCallback == NULL)
     {
         return preVerifyOk;
 
-    } else
+    }
+    else
     {
-        if (exData->_rep->verifyCertificateCallback(*exData->_rep->peerCertificate[0]))
+        if (exData->_rep->verifyCertificateCallback(
+                *exData->_rep->peerCertificate[0]))
         {
-                   Tracer::trace(TRC_SSL, Tracer::LEVEL4,
-                "--> SSL: _rep->verifyCertificateCallback() returned X509_V_OK");
+            Tracer::trace(TRC_SSL, Tracer::LEVEL4,
+                "--> SSL: _rep->verifyCertificateCallback() returned "
+                    "X509_V_OK");
 
             PEG_METHOD_EXIT();
             return 1;
@@ -445,7 +473,8 @@ int SSLCallback::verificationCallback(int preVerifyOk, X509_STORE_CTX *ctx)
         else // verification failed, handshake will be immediately terminated
         {
             Tracer::trace(TRC_SSL, Tracer::LEVEL4,
-                "--> SSL: _rep->verifyCertificateCallback() returned error %d", exData->_rep->peerCertificate[0]->getErrorCode());
+                "--> SSL: _rep->verifyCertificateCallback() returned error %d",
+                exData->_rep->peerCertificate[0]->getErrorCode());
 
             PEG_METHOD_EXIT();
             return 0;
@@ -454,9 +483,10 @@ int SSLCallback::verificationCallback(int preVerifyOk, X509_STORE_CTX *ctx)
 }
 
 //
-// Callback function called by OpenSSL.  This request is merely forwarded to the static
-// function SSLCallback::callback().  The SSLCallback class is a friend class of the
-// Pegasus SSL related classes needed to complete the callback.
+// Callback function called by OpenSSL.  This request is merely forwarded
+// to the static function SSLCallback::callback().  The SSLCallback class
+// is a friend class of the Pegasus SSL related classes needed to complete
+// the callback.
 //
 extern "C" int prepareForCallback(int preVerifyOk, X509_STORE_CTX *ctx)
 {
@@ -466,10 +496,11 @@ extern "C" int prepareForCallback(int preVerifyOk, X509_STORE_CTX *ctx)
 //
 // Implement OpenSSL locking callback.
 //
-void pegasus_locking_callback( int      mode,
-                               int      type,
-                               const char*  file,
-                               int      line)
+void pegasus_locking_callback(
+    int mode,
+    int type,
+    const char* file,
+    int line)
 {
     // Check whether the mode is lock or unlock.
 
@@ -511,7 +542,8 @@ void SSLContextRep::init_ssl()
 
      // Set the locking callback to pegasus_locking_callback.
 
-     CRYPTO_set_locking_callback((CRYPTO_SET_LOCKING_CALLBACK) pegasus_locking_callback);
+     CRYPTO_set_locking_callback(
+         (CRYPTO_SET_LOCKING_CALLBACK) pegasus_locking_callback);
 
 }
 
@@ -535,12 +567,12 @@ void SSLContextRep::free_ssl()
 // must enable PEGASUS_SSL_RANDOMFILE flag.
 //
 SSLContextRep::SSLContextRep(
-                       const String& trustStore,
-                       const String& certPath,
-                       const String& keyPath,
-                       const String& crlPath,
-                       SSLCertificateVerifyFunction* verifyCert,
-                       const String& randomFile)
+    const String& trustStore,
+    const String& certPath,
+    const String& keyPath,
+    const String& crlPath,
+    SSLCertificateVerifyFunction* verifyCert,
+    const String& randomFile)
 {
     PEG_METHOD_ENTER(TRC_SSL, "SSLContextRep::SSLContextRep()");
 
@@ -557,7 +589,8 @@ SSLContextRep::SSLContextRep(
     _certificateVerifyFunction = verifyCert;
 
     //
-    // If a truststore and/or peer verification function is specified, enable peer verification
+    // If a truststore and/or peer verification function is specified,
+    // enable peer verification
     //
     if (trustStore != String::EMPTY || verifyCert != NULL)
     {
@@ -569,7 +602,7 @@ SSLContextRep::SSLContextRep(
     }
 
     //
-    // Initialiaze SSL callbacks and increment the SSLContextRep object _counter.
+    // Initialize SSL callbacks and increment the SSLContextRep object _counter.
     //
     {
        AutoMutex autoMut(_countRepMutex);
@@ -600,7 +633,7 @@ SSLContextRep::SSLContextRep(
                 "After calling SSL_library_init %d", Threads::id());
         }
 
-    _countRep++;
+        _countRep++;
     }  // mutex unlocks here
 
     _randomInit(randomFile);
@@ -623,17 +656,17 @@ SSLContextRep::SSLContextRep(const SSLContextRep& sslContextRep)
     _certificateVerifyFunction = sslContextRep._certificateVerifyFunction;
     _randomFile = sslContextRep._randomFile;
 
-    // Initialiaze SSL callbacks and increment the SSLContextRep object _counter.
+    // Initialize SSL callbacks and increment the SSLContextRep object _counter.
     {
         AutoMutex autoMut(_countRepMutex);
         Tracer::trace(TRC_SSL, Tracer::LEVEL4,
-             "Value of Countrep in copy constructor %d", _countRep);
+            "Value of Countrep in copy constructor %d", _countRep);
         if ( _countRep == 0 )
         {
             init_ssl();
         }
 
-    _countRep++;
+        _countRep++;
     }  // mutex unlocks here
 
     _sslContext = _makeSSLContext();
@@ -657,7 +690,7 @@ SSLContextRep::~SSLContextRep()
         // Free SSL locks if no instances of SSLContextRep exist.
 
         Tracer::trace(TRC_SSL, Tracer::LEVEL4,
-                "Value of Countrep in destructor %d", _countRep);
+            "Value of Countrep in destructor %d", _countRep);
         if ( _countRep == 0 )
         {
             free_ssl();
@@ -688,10 +721,9 @@ void SSLContextRep::_randomInit(const String& randomFile)
             PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4,
                 "Random seed file is required.");
             PEG_METHOD_EXIT();
-            //l10n
-            //throw( SSLException("Random seed file required"));
-            MessageLoaderParms parms("Common.SSLContext.RANDOM_SEED_FILE_REQUIRED",
-                                     "Random seed file required");
+            MessageLoaderParms parms(
+                "Common.SSLContext.RANDOM_SEED_FILE_REQUIRED",
+                "Random seed file required");
             throw SSLException(parms);
         }
 
@@ -699,7 +731,7 @@ void SSLContextRep::_randomInit(const String& randomFile)
         // Try the given random seed file
         //
         ret = FileSystem::exists(randomFile);
-        if( ret )
+        if (ret)
         {
             retVal = RAND_load_file(randomFile.getCString(), -1);
             if ( retVal < 0 )
@@ -707,12 +739,12 @@ void SSLContextRep::_randomInit(const String& randomFile)
                 PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4,
                     "Not enough seed data in seed file: " + randomFile);
                 PEG_METHOD_EXIT();
-                //l10n
-        // do not put in $0 in default message, but pass in filename for bundle message
-                //throw( SSLException("Not enough seed data in random seed file."));
-                MessageLoaderParms parms("Common.SSLContext.NOT_ENOUGH_SEED_DATA_IN_FILE",
-                                         "Not enough seed data in random seed file.",
-                                         randomFile);
+                // do not put in $0 in default message, but pass in filename
+                // for bundle message
+                MessageLoaderParms parms(
+                    "Common.SSLContext.NOT_ENOUGH_SEED_DATA_IN_FILE",
+                    "Not enough seed data in random seed file.",
+                    randomFile);
                 throw SSLException(parms);
             }
         }
@@ -721,11 +753,10 @@ void SSLContextRep::_randomInit(const String& randomFile)
             PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4,
                 "seed file - " + randomFile + " does not exist.");
             PEG_METHOD_EXIT();
-            //l10n
-            //throw( SSLException("Seed file '" + randomFile + "' does not exist."));
-            MessageLoaderParms parms("Common.SSLContext.SEED_FILE_DOES_NOT_EXIST",
-                                     "Seed file '$0' does not exist.",
-                                     randomFile);
+            MessageLoaderParms parms(
+                "Common.SSLContext.SEED_FILE_DOES_NOT_EXIST",
+                "Seed file '$0' does not exist.",
+                randomFile);
             throw SSLException(parms);
         }
 
@@ -751,35 +782,34 @@ void SSLContextRep::_randomInit(const String& randomFile)
                     "Not enough seed data in random seed file, RAND_status = " +
                     seedRet);
                 PEG_METHOD_EXIT();
-                //l10n 485
-        // do not put in $0 in default message, but pass in filename for bundle message
-                //throw( SSLException("Not enough seed data in random seed file."));
-                MessageLoaderParms parms("Common.SSLContext.NOT_ENOUGH_SEED_DATA_IN_FILE",
-                                         "Not enough seed data in random seed file.",
-                                         randomFile);
+                // do not put in $0 in default message, but pass in filename
+                // for bundle message
+                MessageLoaderParms parms(
+                    "Common.SSLContext.NOT_ENOUGH_SEED_DATA_IN_FILE",
+                    "Not enough seed data in random seed file.",
+                    randomFile);
                 throw SSLException(parms);
             }
         }
     }
 #endif  /* PEGASUS_SSL_RANDOMFILE */
 
-    int  seedRet = RAND_status();
-    if ( seedRet == 0 )
+    int seedRet = RAND_status();
+    if (seedRet == 0)
     {
         PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4,
             "Not enough seed data , RAND_status = " + seedRet );
         PEG_METHOD_EXIT();
-        //l10n
-        //throw( SSLException("Not enough seed data."));
-        MessageLoaderParms parms("Common.SSLContext.NOT_ENOUGH_SEED_DATA",
-                                 "Not enough seed data.");
+        MessageLoaderParms parms(
+            "Common.SSLContext.NOT_ENOUGH_SEED_DATA",
+            "Not enough seed data.");
         throw SSLException(parms);
     }
 
     PEG_METHOD_EXIT();
 }
 
-SSL_CTX * SSLContextRep::_makeSSLContext()
+SSL_CTX* SSLContextRep::_makeSSLContext()
 {
     PEG_METHOD_ENTER(TRC_SSL, "SSLContextRep::_makeSSLContext()");
 
@@ -789,22 +819,21 @@ SSL_CTX * SSLContextRep::_makeSSLContext()
     // create SSL Context Area
     //
 
-    if (!( sslContext = SSL_CTX_new(SSLv23_method()) ))
+    if (!(sslContext = SSL_CTX_new(SSLv23_method())))
     {
         PEG_METHOD_EXIT();
-        //l10n
-        //throw( SSLException("Could not get SSL CTX"));
-        MessageLoaderParms parms("Common.SSLContext.COULD_NOT_GET",
-                                 "Could not get SSL CTX");
+        MessageLoaderParms parms(
+            "Common.SSLContext.COULD_NOT_GET",
+            "Could not get SSL CTX");
         throw SSLException(parms);
     }
 
 #ifdef PEGASUS_SSL_WEAKENCRYPTION
-    if (!(SSL_CTX_set_cipher_list(sslContext, SSL_TXT_EXP40))){
-        //l10n
-        //throw( SSLException("Could not set the cipher list"));
-        MessageLoaderParms parms("Common.SSLContext.COULD_NOT_SET_CIPHER_LIST",
-                                 "Could not set the cipher list");
+    if (!(SSL_CTX_set_cipher_list(sslContext, SSL_TXT_EXP40)))
+    {
+        MessageLoaderParms parms(
+            "Common.SSLContext.COULD_NOT_SET_CIPHER_LIST",
+            "Could not set the cipher list");
         throw SSLException(parms);
     }
 #endif
@@ -826,10 +855,12 @@ SSL_CTX * SSLContextRep::_makeSSLContext()
 
     if (_verifyPeer)
     {
-        //ATTN: We might still need a flag to specify SSL_VERIFY_FAIL_IF_NO_PEER_CERT
-        // If SSL_VERIFY_FAIL_IF_NO_PEER_CERT is ON, SSL will immediately be terminated
-        // if the client sends no certificate or sends an untrusted certificate.  The
-        // callback function is not called in this case; the handshake is simply terminated.
+        // ATTN: We might still need a flag to specify
+        // SSL_VERIFY_FAIL_IF_NO_PEER_CERT
+        // If SSL_VERIFY_FAIL_IF_NO_PEER_CERT is ON, SSL will immediately be
+        // terminated if the client sends no certificate or sends an
+        // untrusted certificate.  The callback function is not called in
+        // this case; the handshake is simply terminated.
         // This value has NO effect in from a client perspective
 
         if (_certificateVerifyFunction != NULL)
@@ -841,22 +872,25 @@ SSL_CTX * SSLContextRep::_makeSSLContext()
         }
         else
         {
-            PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL3, "---> SSL: Trust Store specified");
+            PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL3,
+                "---> SSL: Trust Store specified");
             SSL_CTX_set_verify(sslContext,
-                SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE | SSL_VERIFY_FAIL_IF_NO_PEER_CERT,
+                SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE |
+                    SSL_VERIFY_FAIL_IF_NO_PEER_CERT,
                 prepareForCallback);
         }
     }
     else
     {
         PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL3,
-            "---> SSL: Trust Store and certificate verification callback are NOT specified");
+            "---> SSL: Trust Store and certificate verification callback "
+                "are NOT specified");
         SSL_CTX_set_verify(sslContext, SSL_VERIFY_NONE, NULL);
     }
 
     //
-    // Check if there is CA certificate file or directory specified. If specified,
-    // and is not empty, load the certificates from the Trust store.
+    // Check if there is CA certificate file or directory specified. If
+    // specified, and is not empty, load the certificates from the Trust store.
     //
     if (_trustStore != String::EMPTY)
     {
@@ -877,15 +911,18 @@ SSL_CTX * SSLContextRep::_makeSSLContext()
             // load certificates from the trust store
             //
             PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL2,
-                "---> SSL: Loading certificates from the trust store: " + _trustStore);
+                "---> SSL: Loading certificates from the trust store: " +
+                    _trustStore);
 
-            if ((!SSL_CTX_load_verify_locations(sslContext, NULL, _trustStore.getCString())) ||
+            if ((!SSL_CTX_load_verify_locations(
+                     sslContext, NULL, _trustStore.getCString())) ||
                 (!SSL_CTX_set_default_verify_paths(sslContext)))
             {
                 PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL2,
-                    "---> SSL: Could not load certificates from the trust store: " + _trustStore);
-                //l10n
-                MessageLoaderParms parms("Common.SSLContext.COULD_NOT_LOAD_CERTIFICATES",
+                    "---> SSL: Could not load certificates from the trust "
+                        "store: " + _trustStore);
+                MessageLoaderParms parms(
+                    "Common.SSLContext.COULD_NOT_LOAD_CERTIFICATES",
                     "Could not load certificates in to trust store.");
                 PEG_METHOD_EXIT();
                 throw SSLException(parms);
@@ -895,7 +932,7 @@ SSL_CTX * SSLContextRep::_makeSSLContext()
         else if (FileSystem::exists(_trustStore))
         {
             PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL3,
-                            "---> SSL: Truststore is a file");
+                "---> SSL: Truststore is a file");
             //
             // Get size of the trust store file:
             //
@@ -909,15 +946,18 @@ SSL_CTX * SSLContextRep::_makeSSLContext()
                 // load certificates from the trust store
                 //
                 PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL2,
-                    "---> SSL: Loading certificates from the trust store: " + _trustStore);
+                    "---> SSL: Loading certificates from the trust store: " +
+                        _trustStore);
 
-                if ((!SSL_CTX_load_verify_locations(sslContext, _trustStore.getCString(), NULL)) ||
+                if ((!SSL_CTX_load_verify_locations(
+                         sslContext, _trustStore.getCString(), NULL)) ||
                     (!SSL_CTX_set_default_verify_paths(sslContext)))
                 {
                     PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL2,
-                        "---> SSL: Could not load certificates from the trust store: " + _trustStore);
-                    //l10n
-                    MessageLoaderParms parms("Common.SSLContext.COULD_NOT_LOAD_CERTIFICATES",
+                        "---> SSL: Could not load certificates from the "
+                            "trust store: " + _trustStore);
+                    MessageLoaderParms parms(
+                        "Common.SSLContext.COULD_NOT_LOAD_CERTIFICATES",
                         "Could not load certificates in to trust store.");
                     PEG_METHOD_EXIT();
                     throw SSLException(parms);
@@ -929,56 +969,67 @@ SSL_CTX * SSLContextRep::_makeSSLContext()
                 // no certificates found in the trust store
                 //
                 PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL2,
-                    "---> SSL: No certificates to load from the trust store: " + _trustStore);
+                    "---> SSL: No certificates to load from the trust "
+                        "store: " + _trustStore);
             }
         }
     }
 
     if (_crlPath != String::EMPTY)
     {
-        //need to save this -- can we make it static since there's only one CRL for cimserver?
+        // need to save this -- can we make it static since there's only
+        // one CRL for cimserver?
         X509_LOOKUP* pLookup;
 
         _crlStore = X509_STORE_new();
 
-        //the validity of the crlstore was checked in ConfigManager during server startup
+        // the validity of the crlstore was checked in ConfigManager
+        // during server startup
         if (FileSystem::isDirectory(_crlPath))
         {
             Tracer::trace(TRC_SSL, Tracer::LEVEL3,
-                          "---> SSL: CRL store is a directory in %s", (const char*)_crlPath.getCString());
+                "---> SSL: CRL store is a directory in %s",
+                (const char*)_crlPath.getCString());
 
-            if ((pLookup = X509_STORE_add_lookup(_crlStore, X509_LOOKUP_hash_dir())) == NULL)
+            if ((pLookup = X509_STORE_add_lookup(
+                     _crlStore, X509_LOOKUP_hash_dir())) == NULL)
             {
-                MessageLoaderParms parms("Common.SSLContext.COULD_NOT_LOAD_CRLS",
-                                         "Could not load certificate revocation list.");
+                MessageLoaderParms parms(
+                    "Common.SSLContext.COULD_NOT_LOAD_CRLS",
+                    "Could not load certificate revocation list.");
                 X509_STORE_free(_crlStore);
                 PEG_METHOD_EXIT();
                 throw SSLException(parms);
             }
 
-            X509_LOOKUP_add_dir(pLookup, (const char*)_crlPath.getCString(), X509_FILETYPE_PEM);
+            X509_LOOKUP_add_dir(
+                pLookup, (const char*)_crlPath.getCString(), X509_FILETYPE_PEM);
 
             PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL3,
-                            "---> SSL: Successfully configured CRL directory");
-
-        else
+                "---> SSL: Successfully configured CRL directory");
+        }
+        else
         {
             Tracer::trace(TRC_SSL, Tracer::LEVEL3,
-                          "---> SSL: CRL store is the file %s", (const char*)_crlPath.getCString());
+                "---> SSL: CRL store is the file %s",
+                (const char*)_crlPath.getCString());
 
-            if ((pLookup = X509_STORE_add_lookup(_crlStore, X509_LOOKUP_file())) == NULL)
+            if ((pLookup = X509_STORE_add_lookup(
+                   _crlStore, X509_LOOKUP_file())) == NULL)
             {
-                MessageLoaderParms parms("Common.SSLContext.COULD_NOT_LOAD_CRLS",
-                                         "Could not load certificate revocation list.");
+                MessageLoaderParms parms(
+                    "Common.SSLContext.COULD_NOT_LOAD_CRLS",
+                    "Could not load certificate revocation list.");
                 X509_STORE_free(_crlStore);
                 PEG_METHOD_EXIT();
                 throw SSLException(parms);
             }
 
-            X509_LOOKUP_load_file(pLookup, (const char*)_crlPath.getCString(), X509_FILETYPE_PEM);
+            X509_LOOKUP_load_file(
+                pLookup, (const char*)_crlPath.getCString(), X509_FILETYPE_PEM);
 
             PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL3,
-                            "---> SSL: Successfully configured CRL file");
+                "---> SSL: Successfully configured CRL file");
         }
     }
 
@@ -1002,17 +1053,19 @@ SSL_CTX * SSLContextRep::_makeSSLContext()
         {
             PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL2,
                 "---> SSL: No server certificate found in " + _certPath);
-            MessageLoaderParms parms("Common.SSLContext.COULD_NOT_GET_SERVER_CERTIFICATE",
-                                     "Could not get server certificate.");
+            MessageLoaderParms parms(
+                "Common.SSLContext.COULD_NOT_GET_SERVER_CERTIFICATE",
+                "Could not get server certificate.");
             PEG_METHOD_EXIT();
             throw SSLException(parms);
         }
 
         //
         // If there is no key file (file containing server
-        // private key) specified, then try loading the key from the certificate file.
-        // As of 2.4, if a keyfile is specified, its location is verified during server
-        // startup and will throw an error if the path is invalid.
+        // private key) specified, then try loading the key from the
+        // certificate file.
+        // As of 2.4, if a keyfile is specified, its location is verified
+        // during server startup and will throw an error if the path is invalid.
         //
         if (_keyPath == String::EMPTY)
         {
@@ -1023,8 +1076,9 @@ SSL_CTX * SSLContextRep::_makeSSLContext()
             //
             if (!_verifyPrivateKey(sslContext, _certPath))
             {
-                MessageLoaderParms parms("Common.SSLContext.COULD_NOT_GET_PRIVATE_KEY",
-                                         "Could not get private key.");
+                MessageLoaderParms parms(
+                    "Common.SSLContext.COULD_NOT_GET_PRIVATE_KEY",
+                    "Could not get private key.");
                 PEG_METHOD_EXIT();
                 throw SSLException(parms);
             }
@@ -1046,8 +1100,9 @@ SSL_CTX * SSLContextRep::_makeSSLContext()
         //
         if (!_verifyPrivateKey(sslContext, _keyPath))
         {
-            MessageLoaderParms parms("Common.SSLContext.COULD_NOT_GET_PRIVATE_KEY",
-                                         "Could not get private key.");
+            MessageLoaderParms parms(
+                "Common.SSLContext.COULD_NOT_GET_PRIVATE_KEY",
+                "Could not get private key.");
             PEG_METHOD_EXIT();
             throw SSLException(parms);
         }
@@ -1062,7 +1117,8 @@ Boolean SSLContextRep::_verifyPrivateKey(SSL_CTX *ctx, const String& keyPath)
 {
     PEG_METHOD_ENTER(TRC_SSL, "_verifyPrivateKey()");
 
-    if (SSL_CTX_use_PrivateKey_file(ctx, keyPath.getCString(), SSL_FILETYPE_PEM) <= 0)
+    if (SSL_CTX_use_PrivateKey_file(
+            ctx, keyPath.getCString(), SSL_FILETYPE_PEM) <= 0)
     {
         PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL2,
             "---> SSL: no private key found in " + String(keyPath));
@@ -1082,7 +1138,7 @@ Boolean SSLContextRep::_verifyPrivateKey(SSL_CTX *ctx, const String& keyPath)
     return true;
 }
 
-SSL_CTX * SSLContextRep::getContext() const
+SSL_CTX* SSLContextRep::getContext() const
 {
     return _sslContext;
 }
@@ -1129,7 +1185,8 @@ Boolean SSLContextRep::isPeerVerificationEnabled() const
     return _verifyPeer;
 }
 
-SSLCertificateVerifyFunction* SSLContextRep::getSSLCertificateVerifyFunction() const
+SSLCertificateVerifyFunction*
+    SSLContextRep::getSSLCertificateVerifyFunction() const
 {
     return _certificateVerifyFunction;
 }
@@ -1140,24 +1197,30 @@ SSLCertificateVerifyFunction* SSLContextRep::getSSLCertificateVerifyFunction() c
 // these definitions are used if ssl is not available
 //
 
-SSLContextRep::SSLContextRep(const String& trustStore,
-                       const String& certPath,
-                       const String& keyPath,
-                       const String& crlPath,
-                       SSLCertificateVerifyFunction* verifyCert,
-                       const String& randomFile)
-{}
+SSLContextRep::SSLContextRep(
+    const String& trustStore,
+    const String& certPath,
+    const String& keyPath,
+    const String& crlPath,
+    SSLCertificateVerifyFunction* verifyCert,
+    const String& randomFile)
+{
+}
 
 SSLContextRep::SSLContextRep(const SSLContextRep& sslContextRep) {}
 
 SSLContextRep::~SSLContextRep() {}
 
-SSL_CTX * SSLContextRep::_makeSSLContext() { return 0; }
+SSL_CTX* SSLContextRep::_makeSSLContext() { return 0; }
 
-Boolean SSLContextRep::_verifyPrivateKey(SSL_CTX *ctx,
-                                         const String& keyPath) { return false; }
+Boolean SSLContextRep::_verifyPrivateKey(
+    SSL_CTX *ctx,
+    const String& keyPath)
+{
+    return false;
+}
 
-SSL_CTX * SSLContextRep::getContext() const { return 0; }
+SSL_CTX* SSLContextRep::getContext() const { return 0; }
 
 String SSLContextRep::getTrustStore() const { return String::EMPTY; }
 
@@ -1177,7 +1240,11 @@ void SSLContextRep::setCRLStore(X509_STORE* store) { }
 
 Boolean SSLContextRep::isPeerVerificationEnabled() const { return false; }
 
-SSLCertificateVerifyFunction* SSLContextRep::getSSLCertificateVerifyFunction() const { return NULL; }
+SSLCertificateVerifyFunction*
+    SSLContextRep::getSSLCertificateVerifyFunction() const
+{
+    return NULL;
+}
 
 void SSLContextRep::init_ssl() {}
 
@@ -1197,7 +1264,13 @@ SSLContext::SSLContext(
     SSLCertificateVerifyFunction* verifyCert,
     const String& randomFile)
 {
-    _rep = new SSLContextRep(trustStore, String::EMPTY, String::EMPTY, String::EMPTY, verifyCert, randomFile);
+    _rep = new SSLContextRep(
+        trustStore,
+        String::EMPTY,
+        String::EMPTY,
+        String::EMPTY,
+        verifyCert,
+        randomFile);
 }
 
 SSLContext::SSLContext(
@@ -1207,7 +1280,8 @@ SSLContext::SSLContext(
     SSLCertificateVerifyFunction* verifyCert,
     const String& randomFile)
 {
-    _rep = new SSLContextRep(trustStore, certPath, keyPath, String::EMPTY, verifyCert, randomFile);
+    _rep = new SSLContextRep(
+        trustStore, certPath, keyPath, String::EMPTY, verifyCert, randomFile);
 }
 
 //PEP187
@@ -1220,14 +1294,16 @@ SSLContext::SSLContext(
         const String& randomFile)
 {
 #ifndef PEGASUS_ENABLE_SSL_CRL_VERIFICATION
-    if ( crlPath.size() > 0 )
+    if (crlPath.size() > 0)
     {
-        MessageLoaderParms parms("Common.Exception.SSL_CRL_NOT_ENABLED_EXCEPTION",
-                                 "SSL CRL verification is not enabled.");
+        MessageLoaderParms parms(
+            "Common.Exception.SSL_CRL_NOT_ENABLED_EXCEPTION",
+            "SSL CRL verification is not enabled.");
         throw Exception(parms);
     }
 #endif
-    _rep = new SSLContextRep(trustStore, certPath, keyPath, crlPath, verifyCert, randomFile);
+    _rep = new SSLContextRep(
+        trustStore, certPath, keyPath, crlPath, verifyCert, randomFile);
 }
 
 #ifdef PEGASUS_USE_DEPRECATED_INTERFACES
@@ -1239,7 +1315,8 @@ SSLContext::SSLContext(
     String trustStoreUserName,
     const String& randomFile)
 {
-    _rep = new SSLContextRep(trustStore, certPath, keyPath, String::EMPTY, verifyCert, randomFile);
+    _rep = new SSLContextRep(
+        trustStore, certPath, keyPath, String::EMPTY, verifyCert, randomFile);
 }
 #endif
 
@@ -1260,26 +1337,27 @@ SSLContext::~SSLContext()
 
 String SSLContext::getTrustStore() const
 {
-    return (_rep->getTrustStore());
+    return _rep->getTrustStore();
 }
 
 String SSLContext::getCertPath() const
 {
-    return (_rep->getCertPath());
+    return _rep->getCertPath();
 }
 
 String SSLContext::getKeyPath() const
 {
-    return (_rep->getKeyPath());
+    return _rep->getKeyPath();
 }
 
 String SSLContext::getCRLPath() const
 {
 #ifdef PEGASUS_ENABLE_SSL_CRL_VERIFICATION
-    return (_rep->getCRLPath());
+    return _rep->getCRLPath();
 #else
-    MessageLoaderParms parms("Common.Exception.SSL_CRL_NOT_ENABLED_EXCEPTION",
-                             "SSL CRL verification is not enabled.");
+    MessageLoaderParms parms(
+        "Common.Exception.SSL_CRL_NOT_ENABLED_EXCEPTION",
+        "SSL CRL verification is not enabled.");
     throw Exception(parms);
 #endif
 }
@@ -1287,29 +1365,31 @@ String SSLContext::getCRLPath() const
 X509_STORE* SSLContext::getCRLStore() const
 {
 #ifdef PEGASUS_ENABLE_SSL_CRL_VERIFICATION
-    return (_rep->getCRLStore());
+    return _rep->getCRLStore();
 #else
-    MessageLoaderParms parms("Common.Exception.SSL_CRL_NOT_ENABLED_EXCEPTION",
-                             "SSL CRL verification is not enabled.");
+    MessageLoaderParms parms(
+        "Common.Exception.SSL_CRL_NOT_ENABLED_EXCEPTION",
+        "SSL CRL verification is not enabled.");
     throw Exception(parms);
 #endif
 }
 
 Boolean SSLContext::isPeerVerificationEnabled() const
 {
-    return (_rep->isPeerVerificationEnabled());
+    return _rep->isPeerVerificationEnabled();
 }
 
 #ifdef PEGASUS_USE_DEPRECATED_INTERFACES
 String SSLContext::getTrustStoreUserName() const
 {
-       return (_rep->getTrustStoreUserName());
+    return _rep->getTrustStoreUserName();
 }
 #endif
 
-SSLCertificateVerifyFunction* SSLContext::getSSLCertificateVerifyFunction() const
+SSLCertificateVerifyFunction*
+    SSLContext::getSSLCertificateVerifyFunction() const
 {
-    return (_rep->getSSLCertificateVerifyFunction());
+    return _rep->getSSLCertificateVerifyFunction();
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -1320,41 +1400,41 @@ SSLCertificateVerifyFunction* SSLContext::getSSLCertificateVerifyFunction() cons
 //
 // Certificate validation result codes.
 //
-const int    SSLCertificateInfo::V_OK                                       = 0;
-
-const int    SSLCertificateInfo::V_ERR_UNABLE_TO_GET_ISSUER_CERT            = 2;
-const int    SSLCertificateInfo::V_ERR_UNABLE_TO_GET_CRL                    = 3;
-const int    SSLCertificateInfo::V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE     = 4;
-const int    SSLCertificateInfo::V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE      = 5;
-const int    SSLCertificateInfo::V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY   = 6;
-const int    SSLCertificateInfo::V_ERR_CERT_SIGNATURE_FAILURE               = 7;
-const int    SSLCertificateInfo::V_ERR_CRL_SIGNATURE_FAILURE                = 8;
-const int    SSLCertificateInfo::V_ERR_CERT_NOT_YET_VALID                   = 9;
-const int    SSLCertificateInfo::V_ERR_CERT_HAS_EXPIRED                     = 10;
-const int    SSLCertificateInfo::V_ERR_CRL_NOT_YET_VALID                    = 11;
-const int    SSLCertificateInfo::V_ERR_CRL_HAS_EXPIRED                      = 12;
-const int    SSLCertificateInfo::V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD       = 13;
-const int    SSLCertificateInfo::V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD        = 14;
-const int    SSLCertificateInfo::V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD       = 15;
-const int    SSLCertificateInfo::V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD       = 16;
-const int    SSLCertificateInfo::V_ERR_OUT_OF_MEM                           = 17;
-const int    SSLCertificateInfo::V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT          = 18;
-const int    SSLCertificateInfo::V_ERR_SELF_SIGNED_CERT_IN_CHAIN            = 19;
-const int    SSLCertificateInfo::V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY    = 20;
-const int    SSLCertificateInfo::V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE      = 21;
-const int    SSLCertificateInfo::V_ERR_CERT_CHAIN_TOO_LONG                  = 22;
-const int    SSLCertificateInfo::V_ERR_CERT_REVOKED                         = 23;
-const int    SSLCertificateInfo::V_ERR_INVALID_CA                           = 24;
-const int    SSLCertificateInfo::V_ERR_PATH_LENGTH_EXCEEDED                 = 25;
-const int    SSLCertificateInfo::V_ERR_INVALID_PURPOSE                      = 26;
-const int    SSLCertificateInfo::V_ERR_CERT_UNTRUSTED                       = 27;
-const int    SSLCertificateInfo::V_ERR_CERT_REJECTED                        = 28;
-const int    SSLCertificateInfo::V_ERR_SUBJECT_ISSUER_MISMATCH              = 29;
-const int    SSLCertificateInfo::V_ERR_AKID_SKID_MISMATCH                   = 30;
-const int    SSLCertificateInfo::V_ERR_AKID_ISSUER_SERIAL_MISMATCH          = 31;
-const int    SSLCertificateInfo::V_ERR_KEYUSAGE_NO_CERTSIGN                 = 32;
-
-const int    SSLCertificateInfo::V_ERR_APPLICATION_VERIFICATION             = 50;
+const int    SSLCertificateInfo::V_OK                                      = 0;
+
+const int    SSLCertificateInfo::V_ERR_UNABLE_TO_GET_ISSUER_CERT           = 2;
+const int    SSLCertificateInfo::V_ERR_UNABLE_TO_GET_CRL                   = 3;
+const int    SSLCertificateInfo::V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE    = 4;
+const int    SSLCertificateInfo::V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE     = 5;
+const int    SSLCertificateInfo::V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY  = 6;
+const int    SSLCertificateInfo::V_ERR_CERT_SIGNATURE_FAILURE              = 7;
+const int    SSLCertificateInfo::V_ERR_CRL_SIGNATURE_FAILURE               = 8;
+const int    SSLCertificateInfo::V_ERR_CERT_NOT_YET_VALID                  = 9;
+const int    SSLCertificateInfo::V_ERR_CERT_HAS_EXPIRED                    = 10;
+const int    SSLCertificateInfo::V_ERR_CRL_NOT_YET_VALID                   = 11;
+const int    SSLCertificateInfo::V_ERR_CRL_HAS_EXPIRED                     = 12;
+const int    SSLCertificateInfo::V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD      = 13;
+const int    SSLCertificateInfo::V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD       = 14;
+const int    SSLCertificateInfo::V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD      = 15;
+const int    SSLCertificateInfo::V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD      = 16;
+const int    SSLCertificateInfo::V_ERR_OUT_OF_MEM                          = 17;
+const int    SSLCertificateInfo::V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT         = 18;
+const int    SSLCertificateInfo::V_ERR_SELF_SIGNED_CERT_IN_CHAIN           = 19;
+const int    SSLCertificateInfo::V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY   = 20;
+const int    SSLCertificateInfo::V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE     = 21;
+const int    SSLCertificateInfo::V_ERR_CERT_CHAIN_TOO_LONG                 = 22;
+const int    SSLCertificateInfo::V_ERR_CERT_REVOKED                        = 23;
+const int    SSLCertificateInfo::V_ERR_INVALID_CA                          = 24;
+const int    SSLCertificateInfo::V_ERR_PATH_LENGTH_EXCEEDED                = 25;
+const int    SSLCertificateInfo::V_ERR_INVALID_PURPOSE                     = 26;
+const int    SSLCertificateInfo::V_ERR_CERT_UNTRUSTED                      = 27;
+const int    SSLCertificateInfo::V_ERR_CERT_REJECTED                       = 28;
+const int    SSLCertificateInfo::V_ERR_SUBJECT_ISSUER_MISMATCH             = 29;
+const int    SSLCertificateInfo::V_ERR_AKID_SKID_MISMATCH                  = 30;
+const int    SSLCertificateInfo::V_ERR_AKID_ISSUER_SERIAL_MISMATCH         = 31;
+const int    SSLCertificateInfo::V_ERR_KEYUSAGE_NO_CERTSIGN                = 32;
+
+const int    SSLCertificateInfo::V_ERR_APPLICATION_VERIFICATION            = 50;
 
 class SSLCertificateInfoRep
 {
@@ -1445,42 +1525,42 @@ SSLCertificateInfo::~SSLCertificateInfo()
 
 String SSLCertificateInfo::getSubjectName() const
 {
-    return (_rep->subjectName);
+    return _rep->subjectName;
 }
 
 String SSLCertificateInfo::getIssuerName() const
 {
-    return (_rep->issuerName);
+    return _rep->issuerName;
 }
 
 Uint32 SSLCertificateInfo::getVersionNumber() const
 {
-    return (_rep->versionNumber);
+    return _rep->versionNumber;
 }
 
 long SSLCertificateInfo::getSerialNumber() const
 {
-    return (_rep->serialNumber);
+    return _rep->serialNumber;
 }
 
 CIMDateTime SSLCertificateInfo::getNotBefore() const
 {
-    return (_rep->notBefore);
+    return _rep->notBefore;
 }
 
 CIMDateTime SSLCertificateInfo::getNotAfter() const
 {
-    return (_rep->notAfter);
+    return _rep->notAfter;
 }
 
 Uint32 SSLCertificateInfo::getErrorDepth() const
 {
-    return (_rep->depth);
+    return _rep->depth;
 }
 
 Uint32 SSLCertificateInfo::getErrorCode()  const
 {
-    return (_rep->errorCode);
+    return _rep->errorCode;
 }
 
 void SSLCertificateInfo::setErrorCode(const int errorCode)
@@ -1490,12 +1570,12 @@ void SSLCertificateInfo::setErrorCode(const int errorCode)
 
 String SSLCertificateInfo::getErrorString() const
 {
-    return (_rep->errorString);
+    return _rep->errorString;
 }
 
 Uint32 SSLCertificateInfo::getResponseCode()  const
 {
-    return (_rep->respCode);
+    return _rep->respCode;
 }
 
 void SSLCertificateInfo::setResponseCode(const int respCode)
@@ -1560,7 +1640,9 @@ SSLCallbackInfo::SSLCallbackInfo(SSLCertificateVerifyFunction* verifyCert)
     _rep->crlStore = NULL;
 }
 
-SSLCallbackInfo::SSLCallbackInfo(SSLCertificateVerifyFunction* verifyCert, X509_STORE* crlStore)
+SSLCallbackInfo::SSLCallbackInfo(
+    SSLCertificateVerifyFunction* verifyCert,
+    X509_STORE* crlStore)
 {
     _rep = new SSLCallbackInfoRep();
     _rep->verifyCertificateCallback = verifyCert;
index 796b9b2cb4e5f0a6b1ea4af630a35c0c9e7a2b4a..a6263809d79ba5ebadb80dac07817cab79db3759 100644 (file)
@@ -62,14 +62,17 @@ class SSLCallbackInfoRep;
 // Pegasus-defined SSL certificate verification callback
 typedef Boolean (SSLCertificateVerifyFunction) (SSLCertificateInfo &certInfo);
 
-/** This class provides information that is used during the SSL verification callback.
-    We pass a pointer to this object to the SSL_set_ex_data function.  We can then use SSL_get_ex_data
-    from within the callback and cast the void* back to this object.  In this case, we store a pointer
-    to the Pegasus-defined callback function set in the SSLContext.  We also store a pointer to a
-    certificate object which we construct during the callback.  Some of the certificate information is
-    inaccessible outside the callback, so we need to retrieve the data within the function.
-    Each SSL connection object will have the same callback function, but each connection will have its
-    own certificate.  Therefore, this class is constructed on a per-connection basis in SSLSocket.
+/** This class provides information that is used during the SSL verification
+    callback.  We pass a pointer to this object to the SSL_set_ex_data
+    function.  We can then use SSL_get_ex_data from within the callback and
+    cast the void* back to this object.  In this case, we store a pointer to
+    the Pegasus-defined callback function set in the SSLContext.  We also
+    store a pointer to a certificate object which we construct during the
+    callback.  Some of the certificate information is inaccessible outside
+    the callback, so we need to retrieve the data within the function.  Each
+    SSL connection object will have the same callback function, but each
+    connection will have its own certificate.  Therefore, this class is
+    constructed on a per-connection basis in SSLSocket.
 */
 class PEGASUS_COMMON_LINKAGE SSLCallbackInfo
 {
@@ -110,41 +113,41 @@ public:
     //
     // Certificate validation result codes.
     //
-    static const int    V_OK;
-
-    static const int    V_ERR_UNABLE_TO_GET_ISSUER_CERT;
-    static const int    V_ERR_UNABLE_TO_GET_CRL;
-    static const int    V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE;
-    static const int    V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE;
-    static const int    V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY;
-    static const int    V_ERR_CERT_SIGNATURE_FAILURE;
-    static const int    V_ERR_CRL_SIGNATURE_FAILURE;
-    static const int    V_ERR_CERT_NOT_YET_VALID;
-    static const int    V_ERR_CERT_HAS_EXPIRED;
-    static const int    V_ERR_CRL_NOT_YET_VALID;
-    static const int    V_ERR_CRL_HAS_EXPIRED;
-    static const int    V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD;
-    static const int    V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD;
-    static const int    V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD;
-    static const int    V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD;
-    static const int    V_ERR_OUT_OF_MEM;
-    static const int    V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT;
-    static const int    V_ERR_SELF_SIGNED_CERT_IN_CHAIN;
-    static const int    V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY;
-    static const int    V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE;
-    static const int    V_ERR_CERT_CHAIN_TOO_LONG;
-    static const int    V_ERR_CERT_REVOKED;
-    static const int    V_ERR_INVALID_CA;
-    static const int    V_ERR_PATH_LENGTH_EXCEEDED;
-    static const int    V_ERR_INVALID_PURPOSE;
-    static const int    V_ERR_CERT_UNTRUSTED;
-    static const int    V_ERR_CERT_REJECTED;
-    static const int    V_ERR_SUBJECT_ISSUER_MISMATCH;
-    static const int    V_ERR_AKID_SKID_MISMATCH;
-    static const int    V_ERR_AKID_ISSUER_SERIAL_MISMATCH;
-    static const int    V_ERR_KEYUSAGE_NO_CERTSIGN;
-
-    static const int    V_ERR_APPLICATION_VERIFICATION;
+    static const int V_OK;
+
+    static const int V_ERR_UNABLE_TO_GET_ISSUER_CERT;
+    static const int V_ERR_UNABLE_TO_GET_CRL;
+    static const int V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE;
+    static const int V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE;
+    static const int V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY;
+    static const int V_ERR_CERT_SIGNATURE_FAILURE;
+    static const int V_ERR_CRL_SIGNATURE_FAILURE;
+    static const int V_ERR_CERT_NOT_YET_VALID;
+    static const int V_ERR_CERT_HAS_EXPIRED;
+    static const int V_ERR_CRL_NOT_YET_VALID;
+    static const int V_ERR_CRL_HAS_EXPIRED;
+    static const int V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD;
+    static const int V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD;
+    static const int V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD;
+    static const int V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD;
+    static const int V_ERR_OUT_OF_MEM;
+    static const int V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT;
+    static const int V_ERR_SELF_SIGNED_CERT_IN_CHAIN;
+    static const int V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY;
+    static const int V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE;
+    static const int V_ERR_CERT_CHAIN_TOO_LONG;
+    static const int V_ERR_CERT_REVOKED;
+    static const int V_ERR_INVALID_CA;
+    static const int V_ERR_PATH_LENGTH_EXCEEDED;
+    static const int V_ERR_INVALID_PURPOSE;
+    static const int V_ERR_CERT_UNTRUSTED;
+    static const int V_ERR_CERT_REJECTED;
+    static const int V_ERR_SUBJECT_ISSUER_MISMATCH;
+    static const int V_ERR_AKID_SKID_MISMATCH;
+    static const int V_ERR_AKID_ISSUER_SERIAL_MISMATCH;
+    static const int V_ERR_KEYUSAGE_NO_CERTSIGN;
+
+    static const int V_ERR_APPLICATION_VERIFICATION;
 
 
     /** Constructor for a SSLCertificateInfo object.
@@ -249,8 +252,10 @@ private:
         @param issuerName  issuer name of the certificate.
         @param version version number value from the certificate.
         @param serailNumber serial number value from the certificate.
-        @param notAfter notAfter date from the validity period of the certificate.
-        @param notBefore notBefore date from the validity period of the certificate.
+        @param notAfter notAfter date from the validity period of the
+        certificate.
+        @param notBefore notBefore date from the validity period of the
+        certificate.
         @param depth  depth of the certificate chain.
         @param errorCode   error code from the default verification of the
         certificate by the OpenSSL library.
@@ -314,7 +319,8 @@ public:
 
     ~SSLContext();
 
-    /** Gets the truststore path of the SSLContext object.  This may be a CA file or a directory.
+    /** Gets the truststore path of the SSLContext object.  This may be a
+        CA file or a directory.
         @return a string containing the truststore path.
     */
     String getTrustStore() const;
@@ -356,7 +362,8 @@ public:
     String getTrustStoreUserName() const;
 #endif
 
-    /** Returns the verification callback associated with this context.  This may be NULL.
+    /** Returns the verification callback associated with this context.
+        This may be NULL.
         @return the verification callback function
     */
     SSLCertificateVerifyFunction* getSSLCertificateVerifyFunction() const;
@@ -412,14 +419,16 @@ public:
         @param keyPath  server key file path
         @param verifyCert  function pointer to a certificate verification
         call back function.
-        @param trustStoreUserName In OpenPegasus 2.5 this parameter specified the user to
-        associate the truststore with; this was basically a workaround to
-        providers that required a username. With the support provided in PEP 187,
+        @param trustStoreUserName In OpenPegasus 2.5 this parameter
+        specified the user to associate the truststore with; this was
+        basically a workaround to providers that required a username. With
+        the support provided in PEP 187,
         this parameter is ignored beginning in release 2.5.
         @param randomFile  file path of a random file that is used as a seed
         for random number generation by OpenSSL.
 
-        @exception SSLException  exception indicating failure to create a context.
+        @exception SSLException  exception indicating failure to create a
+        context.
     */
     SSLContext(
         const String& trustStore,
index 2598886f636609cf2727497e4f47f7fb6f9a254d..d66b205c6468cb763bc7ac9d66ec9d3b0579847d 100644 (file)
@@ -156,8 +156,10 @@ void SSLContextManager::reloadTrustStore()
           "Could not reload the trust store, SSL Context is not initialized.");
 
         MessageLoaderParms parms(
-         "Pegasus.Common.SSLContextManager.COULD_NOT_RELOAD_TRUSTSTORE_SSL_CONTEXT_NOT_INITIALIZED",
-         "Could not reload the trust store, SSL Context is not initialized.");
+            "Pegasus.Common.SSLContextManager."
+                "COULD_NOT_RELOAD_TRUSTSTORE_SSL_CONTEXT_NOT_INITIALIZED",
+            "Could not reload the trust store, SSL Context is not "
+                "initialized.");
         PEG_METHOD_EXIT();
         throw SSLException(parms);
     }
@@ -165,11 +167,13 @@ void SSLContextManager::reloadTrustStore()
     if (trustStore == String::EMPTY)
     {
         PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4,
-            "Could not reload the trust store, the trust store is not configured.");
+            "Could not reload the trust store, the trust store is not "
+                "configured.");
 
         MessageLoaderParms parms(
             "Pegasus.Common.SSLContextManager.TRUST_STORE_NOT_CONFIGURED",
-            "Could not reload the trust store, the trust store is not configured.");
+            "Could not reload the trust store, the trust store is not "
+                "configured.");
         PEG_METHOD_EXIT();
         throw SSLException(parms);
     }
@@ -196,8 +200,9 @@ void SSLContextManager::reloadCRLStore()
         "Could not reload the crl store, SSL Context is not initialized.");
 
         MessageLoaderParms parms(
-         "Pegasus.Common.SSLContextManager.COULD_NOT_RELOAD_CRL_STORE_SSL_CONTEXT_NOT_INITIALIZED",
-         "Could not reload the crl store, SSL Context is not initialized.");
+            "Pegasus.Common.SSLContextManager."
+                "COULD_NOT_RELOAD_CRL_STORE_SSL_CONTEXT_NOT_INITIALIZED",
+            "Could not reload the crl store, SSL Context is not initialized.");
 
         PEG_METHOD_EXIT();
         throw SSLException(parms);
@@ -219,7 +224,8 @@ void SSLContextManager::reloadCRLStore()
 
     PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4, "CRL store path is " + crlPath);
 
-    //update the CRL store for both the server and the export server since they share the same CRL store
+    // update the CRL store for both the server and the export server since
+    // they share the same CRL store
     X509_STORE* crlStore;
 
     {
@@ -262,8 +268,9 @@ X509_STORE* SSLContextManager::_getNewX509Store(const String& storePath)
                 "Could not reload the trust or crl store.");
 
             MessageLoaderParms parms(
-             "Pegasus.Common.SSLContextManager.COULD_NOT_RELOAD_TRUST_OR_CRL_STORE",
-             "Could not reload the trust or crl store.");
+                "Pegasus.Common.SSLContextManager."
+                    "COULD_NOT_RELOAD_TRUST_OR_CRL_STORE",
+                "Could not reload the trust or crl store.");
             PEG_METHOD_EXIT();
             throw SSLException(parms);
         }
@@ -272,8 +279,8 @@ X509_STORE* SSLContextManager::_getNewX509Store(const String& storePath)
     }
     else if (FileSystem::exists(storePath))
     {
-        X509_LOOKUP* storeLookup = X509_STORE_add_lookup(newStore,
-                                                     X509_LOOKUP_file());
+        X509_LOOKUP* storeLookup = X509_STORE_add_lookup(
+            newStore, X509_LOOKUP_file());
         if (storeLookup == NULL)
         {
             X509_STORE_free(newStore);
@@ -282,8 +289,9 @@ X509_STORE* SSLContextManager::_getNewX509Store(const String& storePath)
                 "Could not reload the trust or crl store.");
 
             MessageLoaderParms parms(
-             "Pegasus.Common.SSLContextManager.COULD_NOT_RELOAD_TRUST_OR_CRL_STORE",
-             "Could not reload the trust or crl store.");
+                "Pegasus.Common.SSLContextManager."
+                    "COULD_NOT_RELOAD_TRUST_OR_CRL_STORE",
+                "Could not reload the trust or crl store.");
             PEG_METHOD_EXIT();
             throw SSLException(parms);
         }
@@ -293,11 +301,14 @@ X509_STORE* SSLContextManager::_getNewX509Store(const String& storePath)
     else
     {
         PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4,
-            "Could not reload the trust or crl store, configured store not found.");
+            "Could not reload the trust or crl store, configured store "
+                "not found.");
 
         MessageLoaderParms parms(
-         "Pegasus.Common.SSLContextManager.CONFIGURED_TRUST_OR_CRL_STORE_NOT_FOUND",
-         "Could not reload the trust or crl store, configured store not found.");
+            "Pegasus.Common.SSLContextManager."
+                "CONFIGURED_TRUST_OR_CRL_STORE_NOT_FOUND",
+            "Could not reload the trust or crl store, configured store "
+                "not found.");
         PEG_METHOD_EXIT();
         throw SSLException(parms);
     }
@@ -312,7 +323,11 @@ void SSLContextManager::reloadTrustStore() { }
 
 void SSLContextManager::reloadCRLStore() { }
 
-X509_STORE* SSLContextManager::_getNewX509Store(const String& storePath) { return NULL; }
+X509_STORE* SSLContextManager::_getNewX509Store(
+    const String& storePath)
+{
+    return NULL;
+}
 
 #endif   //#ifdef PEGASUS_HAS_SSL
 
index b6944b1bdefe961f766dad46bf559df9ce4bbd98..a207d37c131f0f991bde72e79fa61372244a6fef 100644 (file)
@@ -53,8 +53,9 @@
 PEGASUS_NAMESPACE_BEGIN
 
 
-/** 
-    This class provides the functionality necessary to manage SSLContext objects.
+/**
+    This class provides the functionality necessary to manage SSLContext
+    objects.
  */
 class PEGASUS_COMMON_LINKAGE SSLContextManager
 {
@@ -66,15 +67,15 @@ public:
     ~SSLContextManager();
 
     void createSSLContext(
-        const String& trustStore, 
+        const String& trustStore,
         const String& certPath,
-        const String& keyPath, 
-        const String& crlStore, 
-        Boolean callback, 
+        const String& keyPath,
+        const String& crlStore,
+        Boolean callback,
         const String& randFile);
 
     /**
-        Reload the trust store used by either the CIM Server or 
+        Reload the trust store used by either the CIM Server or
         Indication Server based on the context type.
      */
     void reloadTrustStore();
@@ -103,12 +104,12 @@ private:
 
     /**
         A lock to control access to the _sslContext object.
-        Before read accessing the _sslContext object, one must first 
-        lock this for read access.  Before write accessing the _sslContext 
+        Before read accessing the _sslContext object, one must first
+        lock this for read access.  Before write accessing the _sslContext
         object, one must first lock this for write access.
      */
     ReadWriteSem _sslContextObjectLock;
-    SSLContext* _sslContext; 
+    SSLContext* _sslContext;
 };
 
 PEGASUS_NAMESPACE_END
index d51418f321e5ebedef24bc5731e2adfd6dc708c7..d9fa9e8ebf651aa0b48924e124a72d10a1514758 100644 (file)
 //
 //==============================================================================
 //
-// Author: Nag Boranna, Hewlett-Packard Company ( nagaraja_boranna@hp.com )
-//
-// Modified By: Sushma Fernandes, Hewlett-Packard Company (sushma_fernandes@hp.com)
-//              Heather Sterling, IBM (hsterl@us.ibm.com)
-//              Aruran, IBM (ashanmug@in.ibm.com) for Bug#4422
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifdef PEGASUS_HAS_SSL
-#define OPENSSL_NO_KRB5 1 
+#define OPENSSL_NO_KRB5 1
 #include <openssl/err.h>
 #include <openssl/ssl.h>
 #include <openssl/rand.h>
@@ -66,7 +60,7 @@ public:
 class SSLContextRep
 {
     /*
-    SSL locking callback function. It is needed to perform locking on 
+    SSL locking callback function. It is needed to perform locking on
     shared data structures.
 
     This function needs access to variable ssl_locks.
@@ -117,7 +111,7 @@ public:
     String getKeyPath() const;
 
 #ifdef PEGASUS_USE_DEPRECATED_INTERFACES
-       String getTrustStoreUserName() const;
+    String getTrustStoreUserName() const;
 #endif
 
     String getCRLPath() const;
@@ -137,8 +131,8 @@ private:
     Boolean _verifyPrivateKey(SSL_CTX *ctx, const String& keyPath);
 
     /*
-    Initialize the SSL locking environment. 
-         
+    Initialize the SSL locking environment.
+
     This function sets the locking callback functions.
     */
     static void init_ssl();
index 72bc5a50ce04f772b4d3bda3c8330f830eb9262e..ec6c3b31c3abee1f086701b9b13ec86d3d02d931 100644 (file)
@@ -35,7 +35,7 @@
 #include <Pegasus/Common/IPCExceptions.h>
 #include "Semaphore.h"
 
-PEGASUS_NAMESPACE_BEGIN 
+PEGASUS_NAMESPACE_BEGIN
 
 static const Uint32 PEGASUS_SEM_VALUE_MAX = 0x0000ffff;
 
@@ -416,7 +416,7 @@ void Semaphore::signal()
 // return the count of the semaphore
 int Semaphore::count() const
 {
-    return (_count);
+    return _count;
 }
 
 #endif /* PEGASUS_USE_WINDOWS_SEMAPHORE */
index 74ca9c754069631eb8e50761f7630c32fbcc0b76..32de1607a384ac07be0c0106629cb614795a86bc 100644 (file)
@@ -29,8 +29,6 @@
 //
 //==============================================================================
 //
-// Author: Mike Day (mdday@us.ibm.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_Semaphore_h
index c7e7dd1c8d431372e9da49c537a43887d54bb994..f5f9ad454a5932e6b1ec77d65d4a822db98b3123 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By:
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include "Sharable.h"
index dab452ebe9b742c3ed906c196f2f5f78626187e4..312541770802c1e6bd2596c7d32926d4d48b4fd0 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//              David Eger (dteger@us.ibm.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_Sharable_h
@@ -46,9 +41,9 @@
 
 PEGASUS_NAMESPACE_BEGIN
 
-/** 
-    The Sharable class implements a simple reference counting scheme. 
-    The static Inc() method increments the reference count member. 
+/**
+    The Sharable class implements a simple reference counting scheme.
+    The static Inc() method increments the reference count member.
     The static Dec() method decrements the reference count and deletes
     the object when the reference count becomes zero.
 
@@ -63,7 +58,7 @@ public:
 
     virtual ~Sharable();
 
-    friend void Inc(Sharable* sharable); 
+    friend void Inc(Sharable* sharable);
 
     friend void Dec(Sharable* sharable);
 
@@ -78,9 +73,9 @@ inline void Inc(Sharable* x)
 {
     if (x)
     {
-       // A sharable object should never be incremented from zero.
-       PEGASUS_DEBUG_ASSERT(x->_ref.get());
-       x->_ref++;
+        // A sharable object should never be incremented from zero.
+        PEGASUS_DEBUG_ASSERT(x->_ref.get());
+        x->_ref++;
     }
 }
 
index 05caa8427a9e1c99a7edbdea2b1f4b1732be5be5..c7fd323471ae6a65bbf08d66c8020b3eebe71a27 100644 (file)
 //
 //==============================================================================
 //
-// Author: Markus Mueller (markus_mueller@de.ibm.com)
-//
-// Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//              Amit K Arora, IBM (amita@in.ibm.com) for Bug#1090
-//              David Dillard, VERITAS Software Corp (david.dillard@veritas.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include <cstdio>
@@ -73,7 +67,7 @@ PEGASUS_NAMESPACE_BEGIN
 
 SignalHandler::SignalHandler()
 {
-    for(unsigned i=0;i <= PEGASUS_NSIG;i++)
+    for (unsigned i = 0; i <= PEGASUS_NSIG; i++)
     {
        register_handler &rh = reg_handler[i];
        rh.signum = i;
@@ -96,11 +90,11 @@ void SignalHandler::verifySignum(unsigned signum)
     }
 }
 
-SignalHandler::register_handler& 
+SignalHandler::register_handler&
 SignalHandler::getHandler(unsigned signum)
 {
     verifySignum(signum);
-    return(reg_handler[signum]);
+    return reg_handler[signum];
 }
 
 void SignalHandler::registerHandler(unsigned signum, signal_handler _sighandler)
@@ -165,7 +159,8 @@ void SignalHandler::ignore(unsigned signum)
 
     verifySignum(signum);
 
-#if !defined(PEGASUS_PLATFORM_OS400_ISERIES_IBM) && !defined(PEGASUS_PLATFORM_DARWIN_PPC_GNU)
+#if !defined(PEGASUS_PLATFORM_OS400_ISERIES_IBM) && \
+    !defined(PEGASUS_PLATFORM_DARWIN_PPC_GNU)
     sigignore(signum);
 #else
     struct sigaction sig_acts;
index de60dabdba76e5e337d82a61cb32619862adf882..f0110d6c717d83a2255ef75644e9ed83a6e77663 100644 (file)
 //
 //==============================================================================
 //
-// Author: Markus Mueller (markus_mueller@de.ibm.com)
-//
-// Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//           : Yi Zhou, Hewlett-Packard Company (yi_zhou@hp.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_Signal_h
index 537a701fdd98734f9678f5fb6ec8d48c0a5cc4e7..a7a152822eebfabbc48c8dbd3f75374a86820dd4 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By: Josephine Eskaline Joyce, IBM (jojustin@in.ibm.com) for Bug#2513
-//              David Dillard, Symantec Corp.,  (david_dillard@symantec.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include "Socket.h"
@@ -86,10 +81,11 @@ Sint32 Socket::write(SocketHandle socket, const void* ptr, Uint32 size)
 #endif
 }
 
-Sint32 Socket::timedWrite(SocketHandle socket, 
-                          const void* ptr, 
-                          Uint32 size, 
-                          Uint32 socketWriteTimeout)
+Sint32 Socket::timedWrite(
+    SocketHandle socket,
+    const void* ptr,
+    Uint32 size,
+    Uint32 socketWriteTimeout)
 {
     Sint32 bytesWritten = 0;
     Sint32 totalBytesWritten = 0;
@@ -104,7 +100,7 @@ Sint32 Socket::timedWrite(SocketHandle socket,
         PEGASUS_RETRY_SYSTEM_CALL(
             ::write(socket, (char*)ptr, size), bytesWritten);
 #endif
-        // Some data written this cycle ? 
+        // Some data written this cycle ?
         // Add it to the total amount of written data.
         if (bytesWritten > 0)
         {
@@ -130,7 +126,7 @@ Sint32 Socket::timedWrite(SocketHandle socket,
         if (bytesWritten == PEGASUS_SOCKET_ERROR)
         {
             // if we already waited for the socket to get ready, bail out
-            if( socketTimedOut ) return bytesWritten;
+            if (socketTimedOut) return bytesWritten;
 #ifdef PEGASUS_OS_TYPE_WINDOWS
             if (WSAGetLastError() == WSAEWOULDBLOCK)
 #else
@@ -144,7 +140,7 @@ Sint32 Socket::timedWrite(SocketHandle socket,
                 FD_SET(socket, &fdwrite);
                 selreturn = select(FD_SETSIZE, NULL, &fdwrite, NULL, &tv);
                 if (selreturn == 0) socketTimedOut = true; // ran out of time
-                continue;            
+                continue;
             }
             return bytesWritten;
         }
@@ -156,14 +152,14 @@ void Socket::close(SocketHandle socket)
     if (socket != -1)
     {
 #ifdef PEGASUS_OS_TYPE_WINDOWS
-       if(!closesocket(socket)) 
-           socket = -1;
+        if (!closesocket(socket))
+            socket = -1;
 #else
-       int status;
-       PEGASUS_RETRY_SYSTEM_CALL(::close(socket), status);
+        int status;
+        PEGASUS_RETRY_SYSTEM_CALL(::close(socket), status);
 
-       if (status == 0)
-           socket = -1;
+        if (status == 0)
+            socket = -1;
 #endif
     }
 }
@@ -199,8 +195,8 @@ void Socket::initializeInterface()
     {
         WSADATA tmp;
 
-       if (WSAStartup(0x202, &tmp) == SOCKET_ERROR)
-           WSACleanup();
+        if (WSAStartup(0x202, &tmp) == SOCKET_ERROR)
+            WSACleanup();
     }
 
     _socketInterfaceRefCount++;
@@ -227,10 +223,10 @@ inline void _setTCPNoDelay(SocketHandle socket)
 {
     // This function disables "Nagle's Algorithm" also known as "the TCP delay
     // algorithm", which causes read operations to obtain whatever data is
-    // already in the input queue and then wait a little longer to see if 
-    // more data arrives. This algorithm optimizes the case in which data is 
-    // sent in only one direction but severely impairs performance of round 
-    // trip servers. Disabling TCP delay is a standard technique for round 
+    // already in the input queue and then wait a little longer to see if
+    // more data arrives. This algorithm optimizes the case in which data is
+    // sent in only one direction but severely impairs performance of round
+    // trip servers. Disabling TCP delay is a standard technique for round
     // trip servers.
 
    int opt = 1;
@@ -245,13 +241,18 @@ inline void _setInformIfNewTCPIP(SocketHandle socket)
 {
 #ifdef PEGASUS_OS_ZOS
    // This function enables the notification of the CIM Server that a new
-   // TCPIP transport layer is active. This is needed to be aware of a 
+   // TCPIP transport layer is active. This is needed to be aware of a
    // restart of the transport layer. When this option is in effect,
    // the accetp(), select(), and read() request will receive an errno=EIO.
    // Once this happens, the socket should be closed and create a new.
-   
+
    int NewTcpipOn = 1;
-   setibmsockopt(socket,SOL_SOCKET,SO_EioIfNewTP,(char*)&NewTcpipOn,sizeof(NewTcpipOn));
+   setibmsockopt(
+       socket,
+       SOL_SOCKET,
+       SO_EioIfNewTP,
+       (char*)&NewTcpipOn,
+       sizeof(NewTcpipOn));
 #endif
 }
 
@@ -260,34 +261,35 @@ SocketHandle Socket::createSocket(int domain, int type, int protocol)
 {
     SocketHandle newSocket;
 
-    ifdomain == AF_UNIX)
+    if (domain == AF_UNIX)
     {
-        return(socket(domain,type,protocol));
+        return socket(domain,type,protocol);
     }
 
     bool sendTcpipMsg = true;
 
-    while(1)
+    while (1)
     {
-
         newSocket = socket(domain,type,protocol);
 
         // The program should wait for transport layer to become ready.
 
-        if(newSocket == PEGASUS_INVALID_SOCKET && 
+        if (newSocket == PEGASUS_INVALID_SOCKET &&
            getSocketError() == PEGASUS_NETWORK_TCPIP_TRYAGAIN )
         {
-           if(sendTcpipMsg)
+           if (sendTcpipMsg)
            {
-               Logger::put_l(Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION,
-                             "Common.Socket.WAIT_FOR_TCPIP",
-                             "TCP/IP temporary unavailable.");
+               Logger::put_l(
+                   Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION,
+                   "Common.Socket.WAIT_FOR_TCPIP",
+                   "TCP/IP temporary unavailable.");
                sendTcpipMsg=false;
            }
 
            System::sleep(30);
            continue;
-        } else 
+        }
+        else
         {
            break;
         }
@@ -297,17 +299,16 @@ SocketHandle Socket::createSocket(int domain, int type, int protocol)
     if (newSocket == PEGASUS_INVALID_SOCKET)
     {
         // return immediate
-        return(PEGASUS_INVALID_SOCKET);
-    } else {
-        
+        return PEGASUS_INVALID_SOCKET;
+    }
+    else
+    {
         // set aditional socket options
         _setTCPNoDelay(newSocket);
         _setInformIfNewTCPIP(newSocket);
 
-        return(newSocket);            
+        return newSocket;
     }
-
 }
 
 PEGASUS_NAMESPACE_END
-
index 47bff2ec4dc976dd397fd833fa6ea1aef1d3a783..4893986a8d1169089cd98b1b348edc8981e17d8d 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By: David Dillard, Symantec Corp.  (david_dillard@symantec.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_Socket_h
index 6bec755beb0714f2de10d1c4031aa340af4b1ec5..491c84b63c2e82ff9fe0e88117e0c59e7a5067c1 100644 (file)
 // 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 SocketzOS_inline_h
 #define SocketzOS_inline_h
 
-#include <Pegasus/Common/Logger.h>         
+#include <Pegasus/Common/Logger.h>
 #include <sys/ioctl.h>
 #include <net/rtrouteh.h>
 #include <net/if.h>
@@ -42,21 +45,21 @@ PEGASUS_NAMESPACE_BEGIN
 
 
 MP_Socket::MP_Socket(SocketHandle socket)
- : _socket(socket), _isSecure(false),
-   _userAuthenticated(false)
   : _socket(socket), _isSecure(false),
+      _userAuthenticated(false)
 {
-  _username[0]=0; 
+    _username[0]=0;
 }
 
 MP_Socket::MP_Socket(
     SocketHandle socket,
     SSLContext * sslcontext,
     ReadWriteSem * sslContextObjectLock)
-    : _socket(socket), 
+    : _socket(socket),
       _userAuthenticated(false)
 {
     PEG_METHOD_ENTER(TRC_SSL, "MP_Socket::MP_Socket()");
-    _username[0]=0; 
+    _username[0]=0;
     if (sslcontext != NULL)
     {
         _isSecure = true;
@@ -87,42 +90,46 @@ int MP_Socket::ATTLS_zOS_query()
    errnoIoctl = errno;
    errno2Ioctl =__errno2();
 
-   if(rcIoctl < 0)
+   if (rcIoctl < 0)
    {
       switch(errnoIoctl)
-      {   
+      {
           case(EINPROGRESS):
           case(EWOULDBLOCK):
           {
-              PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4, "---> Accept pending (EWB).");
+              PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4,
+                  "---> Accept pending (EWB).");
               return 0; // accept pending
           }
           case(ECONNRESET):
           {
-              Logger::put_l(Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE,
-                     "Pegasus.Common.SocketzOS_inline.CONNECTION_RESET_ERROR",
-                     "ATTLS reset the connection due to handshake failure. \
-                            Connection closed.");
+              Logger::put_l(
+                  Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE,
+                  "Pegasus.Common.SocketzOS_inline.CONNECTION_RESET_ERROR",
+                  "ATTLS reset the connection due to handshake failure. "
+                      "Connection closed.");
               PEG_METHOD_EXIT();
-              return -1;              
+              return -1;
           }
           default:
           {
               char str_errno2[10];
               sprintf(str_errno2,"%08X",errno2Ioctl);
-              Logger::put_l(Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE,
-                     "Pegasus.Common.SocketzOS_inline.UNEXPECTED_ERROR",
-                     "An unexpected error occurs: $0 ( errno $1, reason code 0x$2 ). \
-                            Connection closed."
-                            ,strerror(errnoIoctl),errnoIoctl,str_errno2);
+              Logger::put_l(
+                  Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE,
+                  "Pegasus.Common.SocketzOS_inline.UNEXPECTED_ERROR",
+                  "An unexpected error occurs: $0 ( errno $1, reason code "
+                      "0x$2 ). Connection closed.",
+                  strerror(errnoIoctl),
+                  errnoIoctl,
+                  str_errno2);
               PEG_METHOD_EXIT();
               return -1;
-
           }
       } // end switch(errnoIoctl)
-   } // -1 ioctl() 
+   } // -1 ioctl()
 
-   // this should be a secured connection so 
+   // this should be a secured connection so
    // check the configuration of ATTLS policy.
    switch(ioc.TTLSi_Stat_Policy)
    {
@@ -130,28 +137,31 @@ int MP_Socket::ATTLS_zOS_query()
        case(TTLS_POL_NO_POLICY):
        case(TTLS_POL_NOT_ENABLED):
        {
-           Logger::put_l(Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE,
-                  "Pegasus.Common.SocketzOS_inline.POLICY_NOT_ENABLED",
-                  "ATTLS policy is not aktive for the CIM Server HTTPS port. \
-                         Communication not secured. Connection closed.");
+           Logger::put_l(
+               Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE,
+               "Pegasus.Common.SocketzOS_inline.POLICY_NOT_ENABLED",
+               "ATTLS policy is not aktive for the CIM Server HTTPS port. "
+                   "Communication not secured. Connection closed.");
            PEG_METHOD_EXIT();
            return -1;
        }
        case(TTLS_POL_ENABLED):
        {
-           break;  // a policy exists so it is ensured that a secured connectio will be established
+           // a policy exists so it is ensured that a secured connection will
+           // be established
+           break;
        }
        case(TTLS_POL_APPLCNTRL):
        {
-           Logger::put_l(Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE,
-                  "Pegasus.Common.SocketzOS_inline.APPLCNTRL",
-                  "ATTLS policy not valid for CIM Server. \
-                         Set ApplicationControlled to OFF. Connection closed.");
+           Logger::put_l(
+               Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE,
+               "Pegasus.Common.SocketzOS_inline.APPLCNTRL",
+               "ATTLS policy not valid for CIM Server. "
+                   "Set ApplicationControlled to OFF. Connection closed.");
            PEG_METHOD_EXIT();
            return -1;
-
        }
-   
+
    } // end switch(ioc.TTLSi_Stat_Policy)
 
    // check status of connection, configuration is ok for the CIM Server
@@ -168,20 +178,22 @@ int MP_Socket::ATTLS_zOS_query()
        {
            break; // the connection is secure
        }
-        
+
 
    } // end switch(ioc.TTLSi_Stat_Conn)
 
-   // 
+   //
    switch(ioc.TTLSi_Sec_Type)
    {
        case(TTLS_SEC_UNKNOWN):
        case(TTLS_SEC_CLIENT):
        {
-           Logger::put_l(Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE,
-                  "Pegasus.Common.SocketzOS_inline.WRONG_ROLE",
-                  "ATTLS policy specifies the wrong HandshakeRole for the CIM Server HTTPS port. \
-                         Communication not secured. Connection closed.");
+           Logger::put_l(
+               Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE,
+               "Pegasus.Common.SocketzOS_inline.WRONG_ROLE",
+               "ATTLS policy specifies the wrong HandshakeRole for the "
+                   "CIM Server HTTPS port. Communication not secured. "
+                   "Connection closed.");
            PEG_METHOD_EXIT();
            return -1;
 
@@ -192,8 +204,8 @@ int MP_Socket::ATTLS_zOS_query()
        case(TTLS_SEC_SRV_CA_FULL):
        case(TTLS_SEC_SRV_CA_REQD):
        {
-           PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4, 
-                            "---> ATTLS Securtiy Type is valid but no SAFCHK.");
+           PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4,
+               "---> ATTLS Securtiy Type is valid but no SAFCHK.");
            PEG_METHOD_EXIT();
            return 1;
        }
@@ -202,18 +214,19 @@ int MP_Socket::ATTLS_zOS_query()
        {
            _userAuthenticated=true;
            memcpy(_username,ioc.TTLSi_UserID,ioc.TTLSi_UserID_Len);
-           _username[ioc.TTLSi_UserID_Len]=0;      // null terminated string
-           __etoa(_username);                        // the user name is in EBCDIC !
-           PEG_TRACE((TRC_SSL, Tracer::LEVEL2, 
-                    "---> ATTLS Securtiy Type is SAFCHK. Resolved user ID \'%s\'",_username));
+           _username[ioc.TTLSi_UserID_Len]=0;   // null terminated string
+           __etoa(_username);                   // the user name is in EBCDIC !
+           PEG_TRACE((TRC_SSL, Tracer::LEVEL2,
+               "---> ATTLS Securtiy Type is SAFCHK. Resolved user ID \'%s\'",
+               _username));
            PEG_METHOD_EXIT();
            return 1;
 
        }
    } // end switch(ioc.TTLSi_Sec_Type)
    // This should never be reached
-   PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4, 
-                    "---> Never reach this! New/wrong return value of ioctl().");
+   PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4,
+       "---> Never reach this! New/wrong return value of ioctl().");
    PEG_METHOD_EXIT();
    return -1;
 } // end ATTLS_zOS_Query
index 1e6ae0285f3c744cbf1b39197e4afa5b5c64167e..330398e166cd20b8a7766ef3f71850fceaecad83 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher, Inova Europe (mike-brasher@austin.rr.com)
-//
-// Modified By: David Dillard, Symantec Corp. (david_dillard@symantec.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include "Network.h"
index 3b774489bb8e265e3c2f2d0c178e3eb914ba4438..01056b5594654e91087d92291fa6cede9b907ac8 100644 (file)
@@ -29,9 +29,6 @@
 //
 //==============================================================================
 //
-// Author: Mike Brasher, Inova Europe (mike-brasher@austin.rr.com)
-// Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_SpinLock_h
@@ -65,7 +62,7 @@ extern "C" void _flush_globals();
 
 PEGASUS_NAMESPACE_BEGIN
 
-// This type implements a spinlock. It is deliberately not a class since we 
+// This type implements a spinlock. It is deliberately not a class since we
 // wish to avoid automatic construction/destruction.
 struct SpinLock
 {
@@ -165,7 +162,7 @@ PEGASUS_NAMESPACE_END
 
 PEGASUS_NAMESPACE_BEGIN
 
-// This type implements a spinlock. It is deliberately not a class since we 
+// This type implements a spinlock. It is deliberately not a class since we
 // wish to avoid automatic construction/destruction.
 struct SpinLock
 {
@@ -188,12 +185,12 @@ inline void SpinLockLock(SpinLock& x)
     // Loop until lock becomes zero.
     do
     {
-       // Load and store unsigned byte (LDSTUB). Load the lock argument
-       // into value and set lock to 0xFF (atomically).
-       asm("ldstub %1, %0"
-           : "=r" (value),
-             "=m" (x.lock)
-           : "m" (x.lock));
+        // Load and store unsigned byte (LDSTUB). Load the lock argument
+        // into value and set lock to 0xFF (atomically).
+        asm("ldstub %1, %0"
+            : "=r" (value),
+              "=m" (x.lock)
+            : "m" (x.lock));
     }
     while (value);
 }
@@ -221,14 +218,14 @@ PEGASUS_NAMESPACE_END
 
 PEGASUS_NAMESPACE_BEGIN
 
-// This type implements a spinlock. It is deliberately not a class since we 
+// This type implements a spinlock. It is deliberately not a class since we
 // wish to avoid automatic construction/destruction.
 struct SpinLock
 {
     union
     {
-       char mutex[sizeof(Mutex)];
-       Uint64 alignment8;
+        char mutex[sizeof(Mutex)];
+        Uint64 alignment8;
     };
 };
 
@@ -266,7 +263,7 @@ PEGASUS_NAMESPACE_END
 
 PEGASUS_NAMESPACE_BEGIN
 
-// This array defines spin locks shared across the system. These are 
+// This array defines spin locks shared across the system. These are
 // initialized by calling SpinLockCreatePool().
 extern SpinLock spinLockPool[PEGASUS_NUM_SHARED_SPIN_LOCKS];
 
@@ -278,7 +275,7 @@ extern int spinLockPoolInitialized;
 void SpinLockCreatePool();
 
 // Maps an address into the spinLockPool[] array defined above. This is used
-// to assign objects (by their addresses) to a shared lock. Collisions are 
+// to assign objects (by their addresses) to a shared lock. Collisions are
 // okay.
 inline size_t SpinLockIndex(const void* x)
 {
index 918bcc1ab9589565524dc22d8b8ccb99a0139e2b..ce1950857ccd527ce788af93d8affa5ec3cfc076 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By:
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include "Stack.h"
index f656cd5ff1618dfe3058cf9150b03672af05cc2c..561164a6224a45ba10410dec82a984b0e47ddbd0 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By:
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_Stack_h
@@ -61,13 +57,13 @@ public:
     Stack(const Stack<T>& x) : _rep(x._rep) { }
 
     /** This constructor was added to provide a fast way of creating a stack
-       with a single element on it. This constructor is necessary to realize
-       the return-value compiler optimization which permits objects used in
-       return/constructor expressions to be initialized only once.
+        with a single element on it. This constructor is necessary to realize
+        the return-value compiler optimization which permits objects used in
+        return/constructor expressions to be initialized only once.
 
-       Notice that this constructor is explicit to avoid implicit 
-       initialization of a stack with the type of T.
-       which 
+        Notice that this constructor is explicit to avoid implicit
+        initialization of a stack with the type of T.
+        which
     */
     PEGASUS_EXPLICIT Stack(const T& x) { _rep.append(x); }
 
@@ -87,8 +83,8 @@ public:
     void push(const T& x) { _rep.append(x); }
 
     /** Returns reference to the top element on the stack.
-       @return reference to top element on stack.
-       @exception throws StackUnderflow if stack is empty.
+        @return reference to top element on stack.
+        @exception throws StackUnderflow if stack is empty.
     */
     T& top();
 
@@ -104,7 +100,7 @@ public:
 
     /** Const version of indxing operator. */
     const T& operator[](Uint32 i) const { return _rep[i]; }
-    
+
     void reserveCapacity(Uint32 capacity) { _rep.reserveCapacity(capacity); }
 
 private:
@@ -116,7 +112,7 @@ template<class T>
 T& Stack<T>::top()
 {
     if (isEmpty())
-       throw StackUnderflow();
+        throw StackUnderflow();
 
     return _rep[_rep.size() - 1];
 }
@@ -125,7 +121,7 @@ template<class T>
 void Stack<T>::pop()
 {
     if (isEmpty())
-       throw StackUnderflow();
+        throw StackUnderflow();
 
     _rep.remove(_rep.size() - 1);
 }
index 3e9ea21374d6f350fb34382d3d9169d3cb284681..7a9363823776118c7c67bd56dc908e2443b37d0d 100644 (file)
 //
 //==============================================================================
 //
-// Author: Arthur Pichlkostner
-//             (checked in: Markus Mueller sedgewick_de@yahoo.de)
-// Modified By: Amit K Arora, IBM (amita@in.ibm.com) for Bug#1090
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include "StatisticalData.h"
@@ -42,42 +38,42 @@ PEGASUS_NAMESPACE_BEGIN
 
 
 // The table on the right represents the mapping from the enumerated types
-// in the CIM_CIMOMStatisticalDate class ValueMap versus the internal 
-// message type defined in Message.h. This conversion is performed by 
+// in the CIM_CIMOMStatisticalDate class ValueMap versus the internal
+// message type defined in Message.h. This conversion is performed by
 // getOpType() in CIMOMStatDataProvider.cpp.
 //
 
-String StatisticalData::requestName[] = 
+String StatisticalData::requestName[] =
 {
-                                    // Enumerated     ValueMap Value 
+                                    // Enumerated     ValueMap Value
                                     // value from     from class
                                     // internal       CIM_StatisticalData
                                     // message type
                                     // -------------- -------------------
-  "GetClass",                       //     1           3  
-  "GetInstance",                    //     2           4  
-  "IndicationDelivery",             //     3           26  
-  "DeleteClass",                    //     4           5  
-  "DeleteInstance",                 //     5           6  
-  "CreateClass",                    //     6           7  
+  "GetClass",                       //     1           3
+  "GetInstance",                    //     2           4
+  "IndicationDelivery",             //     3           26
+  "DeleteClass",                    //     4           5
+  "DeleteInstance",                 //     5           6
+  "CreateClass",                    //     6           7
   "CreateInstance",                 //     7           8
   "ModifyClass",                    //     8           9
-  "ModifyInstance",                 //     9          10 
-  "EnumerateClasses",               //    10          11  
-  "EnumerateClassNames",            //    11          12  
-  "EnumerateInstances",             //    12          13  
-  "EnumerateInstanceNames",         //    13          14  
-  "ExecQuery",                      //    14          15  
-  "Associators",                    //    15          16  
-  "AssociatorNames",                //    16          17  
-  "References",                     //    17          18  
-  "ReferenceNames",                 //    18          19 
-  "GetProperty",                    //    19          20  
-  "SetProperty",                    //    20          21  
-  "GetQualifier",                   //    21          22  
-  "SetQualifier",                   //    22          23  
-  "DeleteQualifier",                //    23          24  
-  "EnumerateQualifiers",            //    24          25  
+  "ModifyInstance",                 //     9          10
+  "EnumerateClasses",               //    10          11
+  "EnumerateClassNames",            //    11          12
+  "EnumerateInstances",             //    12          13
+  "EnumerateInstanceNames",         //    13          14
+  "ExecQuery",                      //    14          15
+  "Associators",                    //    15          16
+  "AssociatorNames",                //    16          17
+  "References",                     //    17          18
+  "ReferenceNames",                 //    18          19
+  "GetProperty",                    //    19          20
+  "SetProperty",                    //    20          21
+  "GetQualifier",                   //    21          22
+  "SetQualifier",                   //    22          23
+  "DeleteQualifier",                //    23          24
+  "EnumerateQualifiers",            //    24          25
   "InvokeMethod"                    //    25          Not Present
 };
 
@@ -101,7 +97,7 @@ StatisticalData::StatisticalData()
     for (unsigned int i=0; i<StatisticalData::length; i++)
     {
         numCalls[i] = 0;
-        cimomTime[i] = 0;      
+        cimomTime[i] = 0;
         providerTime[i] = 0;
         responseSize[i] = 0;
         requestSize[i] = 0;
@@ -170,8 +166,7 @@ void StatisticalData::addToValue(Sint64 value, Uint16 type, Uint32 t)
 
 void StatisticalData::setCopyGSD(Boolean flag)
 {
-
-       copyGSD = flag;
+    copyGSD = flag;
 }
 
 PEGASUS_NAMESPACE_END
index 3cc2c4e6dfbe4a1084be92fd9899e74106e8f8f6..883e5bd43869f5f51f7419e6ccc746aa6ad825cb 100644 (file)
@@ -62,23 +62,28 @@ request->setServerStartTime(serverStartTimeMicroseconds);
 response->endServer();\
 
 #define STAT_BYTESSENT \
-Uint16 statType = (response->getType() >= CIM_GET_CLASS_RESPONSE_MESSAGE)? \
-  response->getType() - CIM_GET_CLASS_RESPONSE_MESSAGE:response->getType() - 1;\
-StatisticalData::current()->addToValue(message.size(), statType, StatisticalData::PEGASUS_STATDATA_BYTES_SENT);
-
+Uint16 statType = (response->getType() >= CIM_GET_CLASS_RESPONSE_MESSAGE) ? \
+    response->getType() - CIM_GET_CLASS_RESPONSE_MESSAGE : \
+    response->getType() - 1; \
+StatisticalData::current()->addToValue( \
+    message.size(), statType, StatisticalData::PEGASUS_STATDATA_BYTES_SENT);
 
 
 #define STAT_SERVEREND_ERROR \
 response->endServer();
 
-/*the request size value must be stored (requSize) and passed to the StatisticalData object at the
- end of processing other wise it will be the ONLY vlaue that is passed to the client which reports 
- the current state of the object, not the pevious (one command ago) state */
+/*
+    The request size value must be stored (requSize) and passed to the
+    StatisticalData object at the end of processing other wise it will be
+    the ONLY vlaue that is passed to the client which reports the current
+    state of the object, not the pevious (one command ago) state
+*/
 
 #define STAT_BYTESREAD \
-Uint16 statType = (request->getType() >= CIM_GET_CLASS_RESPONSE_MESSAGE)? \
-    request->getType() - CIM_GET_CLASS_RESPONSE_MESSAGE: request->getType()-1;\
-StatisticalData::current()->requSize = contentLength; 
+Uint16 statType = (request->getType() >= CIM_GET_CLASS_RESPONSE_MESSAGE) ? \
+    request->getType() - CIM_GET_CLASS_RESPONSE_MESSAGE : \
+    request->getType() - 1; \
+StatisticalData::current()->requSize = contentLength;
 
 #else
 #define STAT_GETSTARTTIME
@@ -120,65 +125,66 @@ private:
 
 class PEGASUS_COMMON_LINKAGE StatisticalData
 {
-   public:
-      enum StatRequestType{
-         GET_CLASS,
-         GET_INSTANCE,
-        INDICATION_DELIVERY,
-         DELETE_CLASS,
-         DELETE_INSTANCE,
-         CREATE_CLASS,
-         CREATE_INSTANCE,
-         MODIFY_CLASS,
-         MODIFY_INSTANCE,
-         ENUMERATE_CLASSES,
-         ENUMERATE_CLASS_NAMES,
-         ENUMERATE_INSTANCES,
-         ENUMERATE_INSTANCE_NAMES,
-         EXEC_QUERY,
-         ASSOCIATORS,
-         ASSOCIATOR_NAMES,
-         REFERENCES,
-         REFERENCE_NAMES,
-         GET_PROPERTY,
-         SET_PROPERTY,
-         GET_QUALIFIER,
-         SET_QUALIFIER,
-         DELETE_QUALIFIER,
-         ENUMERATE_QUALIFIERS,
-         INVOKE_METHOD,
-         NUMBER_OF_TYPES
-      };
-
-      enum StatDataType{
-         PEGASUS_STATDATA_SERVER,
-         PEGASUS_STATDATA_PROVIDER,
-         PEGASUS_STATDATA_BYTES_SENT,
-         PEGASUS_STATDATA_BYTES_READ
-      };
-
-      static const Uint32 length;
-      static StatisticalData* current();
-
-      StatisticalData();
-
-      timeval timestamp;
-
-      Sint64 numCalls[NUMBER_OF_TYPES];
-      Sint64 cimomTime[NUMBER_OF_TYPES];
-      Sint64 providerTime[NUMBER_OF_TYPES];
-      Sint64 responseSize[NUMBER_OF_TYPES];
-      Sint64 requestSize[NUMBER_OF_TYPES];
-       Sint64 requSize;        //tempory storage for requestSize vlaue
-       Boolean copyGSD;
-//     Uint64 totalServTime;
-      static StatisticalData* cur;
-      void addToValue(Sint64 value, Uint16 type, Uint32 t);
-      static String requestName[];
-     void setCopyGSD(Boolean flag);
-
-   protected:
-      Mutex _mutex;
+public:
+    enum StatRequestType
+    {
+        GET_CLASS,
+        GET_INSTANCE,
+        INDICATION_DELIVERY,
+        DELETE_CLASS,
+        DELETE_INSTANCE,
+        CREATE_CLASS,
+        CREATE_INSTANCE,
+        MODIFY_CLASS,
+        MODIFY_INSTANCE,
+        ENUMERATE_CLASSES,
+        ENUMERATE_CLASS_NAMES,
+        ENUMERATE_INSTANCES,
+        ENUMERATE_INSTANCE_NAMES,
+        EXEC_QUERY,
+        ASSOCIATORS,
+        ASSOCIATOR_NAMES,
+        REFERENCES,
+        REFERENCE_NAMES,
+        GET_PROPERTY,
+        SET_PROPERTY,
+        GET_QUALIFIER,
+        SET_QUALIFIER,
+        DELETE_QUALIFIER,
+        ENUMERATE_QUALIFIERS,
+        INVOKE_METHOD,
+        NUMBER_OF_TYPES
+    };
+
+    enum StatDataType
+    {
+        PEGASUS_STATDATA_SERVER,
+        PEGASUS_STATDATA_PROVIDER,
+        PEGASUS_STATDATA_BYTES_SENT,
+        PEGASUS_STATDATA_BYTES_READ
+    };
+
+    static const Uint32 length;
+    static StatisticalData* current();
+
+    StatisticalData();
+
+    timeval timestamp;
+
+    Sint64 numCalls[NUMBER_OF_TYPES];
+    Sint64 cimomTime[NUMBER_OF_TYPES];
+    Sint64 providerTime[NUMBER_OF_TYPES];
+    Sint64 responseSize[NUMBER_OF_TYPES];
+    Sint64 requestSize[NUMBER_OF_TYPES];
+    Sint64 requSize;    //tempory storage for requestSize vlaue
+    Boolean copyGSD;
+    static StatisticalData* cur;
+    void addToValue(Sint64 value, Uint16 type, Uint32 t);
+    static String requestName[];
+    void setCopyGSD(Boolean flag);
+
+protected:
+    Mutex _mutex;
 };
 
 
index a183d0c318ad4908c49309720e06f2b79c023509..50b7e335eecf532452330399cb465d942f44fe4c 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By:
-//      Chip Vincent (cvincent@us.ibm.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 #include "Stopwatch.h"
 
 
 PEGASUS_NAMESPACE_BEGIN
 
-Stopwatch::Stopwatch(void) : _start(0), _stop(0), _total(0)
+Stopwatch::Stopwatch() : _start(0), _stop(0), _total(0)
 {
 }
 
-void Stopwatch::start(void)
+void Stopwatch::start()
 {
     _start = TimeValue::getCurrentTime().toMicroseconds();
 }
 
-void Stopwatch::stop(void)
+void Stopwatch::stop()
 {
     _stop = TimeValue::getCurrentTime().toMicroseconds();
     _total += _stop - _start;
 }
 
-void Stopwatch::reset(void)
+void Stopwatch::reset()
 {
     _start = 0;
     _stop = 0;
     _total = 0;
 }
 
-double Stopwatch::getElapsed(void) const
+double Stopwatch::getElapsed() const
 {
     Sint64 tmp = (Sint64)_total;
-    return((double)tmp / (double)1000000.0);
+    return (double)tmp / (double)1000000.0;
 }
 
-Uint64 Stopwatch::getElapsedUsec(void) const
+Uint64 Stopwatch::getElapsedUsec() const
 {
     return _total;
 }
 
-void Stopwatch::printElapsed(void)
+void Stopwatch::printElapsed()
 {
     PEGASUS_STD(cout) << getElapsed() << " seconds" << PEGASUS_STD(endl);
 }
index f7e8e984fc2bb2e089f667072b1b2a26ceb1641b..cfd9cd3d461b919938e68ca4cab616dec6d87246 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By:
-//      Chip Vincent (cvincent@us.ibm.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_Stopwatch_h
@@ -57,37 +52,37 @@ public:
     must be called to start the timer.
     @example Stopwatch time;
     */
-    Stopwatch(void);
+    Stopwatch();
 
     /** start - Starts accumulating time and continues until stop is called.
     The object can be started and stopped multiple times to measure the
     sum of several intervals, but each start must have a corresponding start.
     */
-    void start(void);
+    void start();
 
     /** stop - Stops the accumlation of time for an interval. The object
     should only stopped if it has been started.
     */
-    void stop(void);
+    void stop();
 
     /** reset - Effectively clears the time values stored by a Stopwatch.
     */
-    void reset(void);
+    void reset();
 
     /** getElapsed - Get the elapsed time for the defined stopwatch. This
     method should only be called if it is currently stopped.
     @return Returns the elapsed time value as a double (in milliseconds).
     */
-    double getElapsed(void) const;
+    double getElapsed() const;
 
     /** Get number of elapsed microseconds
     */
-    Uint64 getElapsedUsec(void) const;
+    Uint64 getElapsedUsec() const;
 
     /** printElapsed method gets the current value of the timer and
     sends it to standard out as a string with the word seconds attached
     */
-    void printElapsed(void);
+    void printElapsed();
 
 private:
     Uint64 _start;
index dc6e2926d9eeac12f864defc68208f6e5ec373d6..35e8c0fec9b1afddb696160ebff6c4eddd2f0f3f 100644 (file)
@@ -29,8 +29,6 @@
 //
 //==============================================================================
 //
-// Author: Mike Brasher, Inova Europe (mike-brasher@austin.rr.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_StrLit_h
@@ -47,54 +45,54 @@ PEGASUS_NAMESPACE_BEGIN
 /*  The StrLit class and associated macros provide a mechanism for retaining the
     length C string literals at compile time. This is preferrable to repeated
     recalculation of the length, usually with strlen(). For example, this:
-   
-       String s("hello world");
+
+        String s("hello world");
 
     Is less efficient than this:
 
-       String s("hello world", 11);
+        String s("hello world", 11);
 
     The first form, forces the String constructor to call strlen(), an O(N)
-    operation. This is unfortunate for C string literals since the length can 
+    operation. This is unfortunate for C string literals since the length can
     be obtained at compile time with the sizeof operator. For example:
 
-       String s("hello world", sizeof("hello world") - 1);
+        String s("hello world", sizeof("hello world") - 1);
 
     But repeating the literal twice is error prone, so instead we use the
     STRLIT_ARGS() macro.
 
-       String s(STRLIT_ARGS("hello world"));
+        String s(STRLIT_ARGS("hello world"));
 
     This macro can also be used to define StrLit objects at compile time.
     For example:
 
-       const StrLit DEFAULT_HOSTNAME(STRLIT_ARGS("localhost"));
+        const StrLit DEFAULT_HOSTNAME(STRLIT_ARGS("localhost"));
 
-    You can implement functions that take StrLit objects. For example, we 
+    You can implement functions that take StrLit objects. For example, we
     define this function:
 
-       operator<<(const Buffer&, const StrLit&);
+        operator<<(const Buffer&, const StrLit&);
 
     This function can be used in two ways. You can pass predefined StrLit
     object to it like this:
 
-       Buffer out;
-       out << DEFAULT_HOSTNAME;
+        Buffer out;
+        out << DEFAULT_HOSTNAME;
 
     Or you can use the STRLIT() macro to construct on on the fly:
 
-       Buffer out;
-       out << STRLIT("localhost");
+        Buffer out;
+        out << STRLIT("localhost");
 
     Note that the latter form would be faster than this, since somebody
     is going to have to call strlen() eventually.
 
-       Buffer out;
-       out << "localhost";
+        Buffer out;
+        out << "localhost";
 
-    At first glance, this may seem like a small optimization, but this 
-    technique alone was used to decrease the Pegasus CIM server latency 
-    by ten percent (with only moderate application to the XML marshalling 
+    At first glance, this may seem like a small optimization, but this
+    technique alone was used to decrease the Pegasus CIM server latency
+    by ten percent (with only moderate application to the XML marshalling
     routines).
 */
 struct StrLit
index f274cf28a0171bba17ccbc601dcf4ddd410367a2..ebfeae382b9ccb5bbc7737a81ad6beccfd39b29d 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@austin.rr.com)
-//
-// Modified By:
-//     Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//     Josephine Eskaline Joyce, IBM (jojustin@in.ibm.com) for Bug#3297
-//     David Dillard, Symantec Corp. (david_dillard@symantec.com)
-//     Mike Brasher (mike-brasher@austin.rr.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include <Pegasus/Common/PegasusAssert.h>
@@ -1502,7 +1494,7 @@ TO-DO:
     (+) DOC++ String.h - will open new bug?
 
     (+) Added PEGASUS_DISABLE_INTERNAL_INLINES macro (to permit suppression
-       on certain platforms).
+        on certain platforms).
 
 ================================================================================
 */
index 57bf21674470d0e501afef3c70411ce6e0353a4e..4ef7c73b0b491da5edd579103200631a0b24de8c 100644 (file)
@@ -271,10 +271,10 @@ public:
             callers stack as a temporary object. The deletion is therefore
             also the responsibility of the Compiler. The Compiler may cause
             it to be deleted at anytime after the return. Typically it is
-            done at the closeof the next scope. When it is deleted the 
-            "const char *p" above will become a dangling pointer. 
+            done at the closeof the next scope. When it is deleted the
+            "const char *p" above will become a dangling pointer.
 
-           The correct usage to achieve the "const char * p" is
+            The correct usage to achieve the "const char * p" is
             as follows:
 
               String str = "hello";
index bc17c603cc8683fd1daa3fdf92f7d6800a0c291c..0ef62dc8e9f978fac4c2c2339dfba3277b96510e 100644 (file)
@@ -65,7 +65,7 @@ PEGASUS_STRING_INLINE CString::operator const char*() const
 
 PEGASUS_STRING_INLINE String::String()
 {
-    // Note: ref() and unref() never touch the reference count of _emptyRep. 
+    // Note: ref() and unref() never touch the reference count of _emptyRep.
     // This allows use to optimize the copy constructor by not incrementing
     // _emptyRep.refs here. Performance is critical in this function. Please
     // do not add any code to this function.
@@ -75,12 +75,12 @@ PEGASUS_STRING_INLINE String::String()
 PEGASUS_STRING_INLINE String::String(const String& str)
 {
 #ifdef PEGASUS_HAVE_BROKEN_GLOBAL_CONSTRUCTION
-    // 
+    //
     // Some compilers don't do a good job of initializing global
     //   constructors in the proper sequence.  This is one such case.
     // String::EMPTY is not initialized by the time this is first
     //   called during initialization of the executable.
-    // 
+    //
     if (!str._rep)
     {
       _rep = &StringRep::_emptyRep;
@@ -88,37 +88,37 @@ PEGASUS_STRING_INLINE String::String(const String& str)
     }
 #endif
     StringRep::ref(_rep = str._rep);
-} 
+}
 
 PEGASUS_STRING_INLINE String::~String()
 {
     StringRep::unref(_rep);
 }
 
-PEGASUS_STRING_INLINE Uint32 String::size() const 
-{ 
-    return _rep->size; 
+PEGASUS_STRING_INLINE Uint32 String::size() const
+{
+    return _rep->size;
 }
 
-PEGASUS_STRING_INLINE const Char16* String::getChar16Data() const 
-{ 
-    return (Char16*)&(_rep->data[0]); 
+PEGASUS_STRING_INLINE const Char16* String::getChar16Data() const
+{
+    return (Char16*)&(_rep->data[0]);
 }
 
-PEGASUS_STRING_INLINE Char16& String::operator[](Uint32 i) 
+PEGASUS_STRING_INLINE Char16& String::operator[](Uint32 i)
 {
     _checkBounds(i, _rep->size);
 
     if (_rep->refs.get() != 1)
         _rep = StringRep::copyOnWrite(_rep);
 
-    return (Char16&)_rep->data[i]; 
+    return (Char16&)_rep->data[i];
 }
 
-PEGASUS_STRING_INLINE const Char16 String::operator[](Uint32 i) const 
+PEGASUS_STRING_INLINE const Char16 String::operator[](Uint32 i) const
 {
     _checkBounds(i, _rep->size);
-    return (Char16&)_rep->data[i]; 
+    return (Char16&)_rep->data[i];
 }
 
 PEGASUS_STRING_INLINE String& String::operator=(const String& str)
index 9313d3e2e7adfb0a9961bb18859c5726f32d3691..53f45dbc062fc526b828acfa5e25926289cbb786 100644 (file)
@@ -106,8 +106,8 @@ inline void StringRep::ref(const StringRep* rep)
 
 inline void StringRep::unref(const StringRep* rep)
 {
-    if (rep != &StringRep::_emptyRep && 
-       ((StringRep*)rep)->refs.decAndTestIfZero())
+    if (rep != &StringRep::_emptyRep &&
+        ((StringRep*)rep)->refs.decAndTestIfZero())
         StringRep::free((StringRep*)rep);
 }
 
index 55d5830b263778f38cd40a2e8d5d3de2fa65f0be..98cdfdd42bfd3da54a051f6f8a14d0271f05571f 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By: Rudy Schuet (rudy.schuet@compaq.com) 11/12/01
-//                  added nsk platform support
-//              Ramnath Ravindran (Ramnath.Ravindran@compaq.com) 03/21/2002
-//                  replaced instances of "| ios::binary" with
-//                  PEGASUS_OR_IOS_BINARY
-//              Robert Kieninger, IBM (kieningr@de.ibm.com) for Bug#667
-//              Dave Sudlik, IBM (dsudlik@us.ibm.com) for Bug#1462
-//              Sean Keenan, Hewlett-Packard Company (sean.keenan@hp.com)
-//              David Dillard, Symantec Corp. (david_dillard@symantec.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #if defined(PEGASUS_PLATFORM_ZOS_ZSERIES_IBM)
 #include <Pegasus/Common/Config.h>
 #endif
 
-
 #include <fstream>
 #include <cctype>  // for tolower()
 #include <cstring>
@@ -83,14 +70,14 @@ Boolean System::copyFile(const char* fromPath, const char* toPath)
 
     while (is.get(c))
     {
-       if (!os.put(c))
-           return false;
+        if (!os.put(c))
+            return false;
     }
 
     return is.eof();
 }
 
-static const Uint8 _toLowerTable[256] = 
+static const Uint8 _toLowerTable[256] =
 {
     0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
     0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
@@ -136,14 +123,14 @@ Sint32 System::strcasecmp(const char* s1, const char* s2)
 
     for (;;)
     {
-       if ((r = _toLowerTable[p[0]] - _toLowerTable[q[0]]) || !p[0] ||
-           (r = _toLowerTable[p[1]] - _toLowerTable[q[1]]) || !p[1] ||
-           (r = _toLowerTable[p[2]] - _toLowerTable[q[2]]) || !p[2] ||
-           (r = _toLowerTable[p[3]] - _toLowerTable[q[3]]) || !p[3])
-           break;
-
-       p += 4;
-       q += 4;
+        if ((r = _toLowerTable[p[0]] - _toLowerTable[q[0]]) || !p[0] ||
+            (r = _toLowerTable[p[1]] - _toLowerTable[q[1]]) || !p[1] ||
+            (r = _toLowerTable[p[2]] - _toLowerTable[q[2]]) || !p[2] ||
+            (r = _toLowerTable[p[3]] - _toLowerTable[q[3]]) || !p[3])
+            break;
+
+        p += 4;
+        q += 4;
     }
 
     return r;
@@ -152,48 +139,48 @@ Sint32 System::strcasecmp(const char* s1, const char* s2)
 // Return the just the file name from the path into basename
 char *System::extract_file_name(const char *fullpath, char *basename)
 {
-  if (fullpath == NULL)
-  {
-      basename[0] = '\0';
-      return basename;
-  }
-
-  for (const char* p = fullpath + strlen(fullpath) - 1; p >= fullpath; p--)
-  {
-      if (*p == '\\' || *p == '/')
-      {
-          strcpy(basename, p+1);
-          return basename;
-      }
-  }
-
-  strcpy(basename, fullpath);
-  return basename;
+    if (fullpath == NULL)
+    {
+        basename[0] = '\0';
+        return basename;
+    }
+
+    for (const char* p = fullpath + strlen(fullpath) - 1; p >= fullpath; p--)
+    {
+        if (*p == '\\' || *p == '/')
+        {
+            strcpy(basename, p+1);
+            return basename;
+        }
+    }
+
+    strcpy(basename, fullpath);
+    return basename;
 }
 
 // Return the just the path to the file name into dirname
 char *System::extract_file_path(const char *fullpath, char *dirname)
 {
-  char *p;
-  char buff[4096];
-  if (fullpath == NULL)
+    char *p;
+    char buff[4096];
+    if (fullpath == NULL)
     {
-      dirname[0] = '\0';
-      return dirname;
+        dirname[0] = '\0';
+        return dirname;
     }
-  strncpy(buff, fullpath, sizeof(buff)-1);
-  buff[sizeof(buff)-1] =  '\0';
-  for(p = buff + strlen(buff); p >= buff; p--)
+    strncpy(buff, fullpath, sizeof(buff)-1);
+    buff[sizeof(buff)-1] =  '\0';
+    for (p = buff + strlen(buff); p >= buff; p--)
     {
-      if (*p == '\\' || *p == '/')
+        if (*p == '\\' || *p == '/')
         {
           strncpy(dirname, buff, p+1 - buff);
           dirname[p+1 - buff] = '\0';
           return dirname;
         }
     }
-  strcpy(dirname, fullpath);
-  return dirname;
+    strcpy(dirname, fullpath);
+    return dirname;
 }
 
 String System::getHostIP(const String &hostName)
@@ -245,10 +232,10 @@ String System::getHostIP(const String &hostName)
 #if defined(PEGASUS_OS_OS400)
         char * gottenIPAdress = NULL;
         gottenIPAdress = ::inet_ntoa( inaddr );
-        
+
         if (gottenIPAdress != NULL)
         {
-           EtoA(gottenIPAdress);
+            EtoA(gottenIPAdress);
             ipAddress.assign(gottenIPAdress);
         }
 #else
@@ -263,34 +250,34 @@ String System::getHostIP(const String &hostName)
 // ------------------------------------------------------------------------
 Uint32 System::_acquireIP(const char* hostname)
 {
-       Uint32 ip = 0xFFFFFFFF;
-       if (!hostname) return 0xFFFFFFFF;
+    Uint32 ip = 0xFFFFFFFF;
+    if (!hostname) return 0xFFFFFFFF;
 
 #ifdef PEGASUS_OS_OS400
-       char ebcdicHost[PEGASUS_MAXHOSTNAMELEN];
-       if (strlen(hostname) < PEGASUS_MAXHOSTNAMELEN)
-               strcpy(ebcdicHost, hostname);
-       else
-               return 0xFFFFFFFF;
-       AtoE(ebcdicHost);
+    char ebcdicHost[PEGASUS_MAXHOSTNAMELEN];
+    if (strlen(hostname) < PEGASUS_MAXHOSTNAMELEN)
+        strcpy(ebcdicHost, hostname);
+    else
+        return 0xFFFFFFFF;
+    AtoE(ebcdicHost);
 #endif
 
 ////////////////////////////////////////////////////////////////////////////////
 // This code used to check if the first character of "hostname" was alphabetic
-// to indicate hostname instead of IP address. But RFC 1123, section 2.1, relaxed
-// this requirement to alphabetic character *or* digit. So bug 1462 changed the
-// flow here to call inet_addr first to check for a valid IP address in dotted
-// decimal notation. If it's not a valid IP address, then try to validate
-// it as a hostname.
-// RFC 1123 states: The host SHOULD check the string syntactically for a 
-// dotted-decimal number before looking it up in the Domain Name System. 
+// to indicate hostname instead of IP address. But RFC 1123, section 2.1,
+// relaxed this requirement to alphabetic character *or* digit. So bug 1462
+// changed the flow here to call inet_addr first to check for a valid IP
+// address in dotted decimal notation. If it's not a valid IP address, then
+// try to validate it as a hostname.
+// RFC 1123 states: The host SHOULD check the string syntactically for a
+// dotted-decimal number before looking it up in the Domain Name System.
 // Hence the call to inet_addr() first.
 ////////////////////////////////////////////////////////////////////////////////
 
 #ifdef PEGASUS_OS_OS400
-       Uint32 tmp_addr = inet_addr(ebcdicHost);
+    Uint32 tmp_addr = inet_addr(ebcdicHost);
 #else
-       Uint32 tmp_addr = inet_addr((char *) hostname);
+    Uint32 tmp_addr = inet_addr((char *) hostname);
 #endif
 
     struct hostent* hostEntry;
@@ -333,7 +320,8 @@ Uint32 System::_acquireIP(const char* hostname)
             gethostname( hostName, PEGASUS_MAXHOSTNAMELEN );
             hostName[sizeof(hostName)-1] = 0;
             hostEntry = gethostbyname(hostName);
-        } else
+        }
+        else
         {
             hostEntry = gethostbyname((char *)hostname);
         }
@@ -341,50 +329,53 @@ Uint32 System::_acquireIP(const char* hostname)
         hostEntry = gethostbyname((char *)hostname);
 #endif
         if (!hostEntry)
-               {
-                       return 0xFFFFFFFF;
-               }
-               unsigned char ip_part1,ip_part2,ip_part3,ip_part4;
-
-               ip_part1 = hostEntry->h_addr[0];
-               ip_part2 = hostEntry->h_addr[1];
-               ip_part3 = hostEntry->h_addr[2];
-               ip_part4 = hostEntry->h_addr[3];
-               ip = ip_part1;
-               ip = (ip << 8) + ip_part2;
-               ip = (ip << 8) + ip_part3;
-               ip = (ip << 8) + ip_part4;
-       }
+        {
+            return 0xFFFFFFFF;
+        }
+        unsigned char ip_part1,ip_part2,ip_part3,ip_part4;
+
+        ip_part1 = hostEntry->h_addr[0];
+        ip_part2 = hostEntry->h_addr[1];
+        ip_part3 = hostEntry->h_addr[2];
+        ip_part4 = hostEntry->h_addr[3];
+        ip = ip_part1;
+        ip = (ip << 8) + ip_part2;
+        ip = (ip << 8) + ip_part3;
+        ip = (ip << 8) + ip_part4;
+    }
     else    // else hostname *is* a dotted-decimal IP address
-       {
-               // resolve hostaddr to a real host entry
-               // casting to (const char *) as (char *) will work as (void *) too, those it fits all platforms
+    {
+        // resolve hostaddr to a real host entry
+        // casting to (const char *) as (char *) will work as (void *) too,
+        // those it fits all platforms
 #ifndef PEGASUS_OS_OS400
-        hostEntry = gethostbyaddr((const char *) &tmp_addr, sizeof(tmp_addr), AF_INET);
+        hostEntry =
+            gethostbyaddr((const char *) &tmp_addr, sizeof(tmp_addr), AF_INET);
 #else
-               hostEntry = gethostbyaddr((char *) &tmp_addr, sizeof(tmp_addr), AF_INET);
+        hostEntry =
+            gethostbyaddr((char *) &tmp_addr, sizeof(tmp_addr), AF_INET);
 #endif
-               if (hostEntry == 0)
-               {
-                       // error, couldn't resolve the ip
-                       return 0xFFFFFFFF;
-               } else
-               {
-
-                       unsigned char ip_part1,ip_part2,ip_part3,ip_part4;
-
-                       ip_part1 = hostEntry->h_addr[0];
-                       ip_part2 = hostEntry->h_addr[1];
-                       ip_part3 = hostEntry->h_addr[2];
-                       ip_part4 = hostEntry->h_addr[3];
-                       ip = ip_part1;
-                       ip = (ip << 8) + ip_part2;
-                       ip = (ip << 8) + ip_part3;
-                       ip = (ip << 8) + ip_part4;
-               }
-       }
-
-       return ip;
+        if (hostEntry == 0)
+        {
+            // error, couldn't resolve the ip
+            return 0xFFFFFFFF;
+        }
+        else
+        {
+            unsigned char ip_part1,ip_part2,ip_part3,ip_part4;
+
+            ip_part1 = hostEntry->h_addr[0];
+            ip_part2 = hostEntry->h_addr[1];
+            ip_part3 = hostEntry->h_addr[2];
+            ip_part4 = hostEntry->h_addr[3];
+            ip = ip_part1;
+            ip = (ip << 8) + ip_part2;
+            ip = (ip << 8) + ip_part3;
+            ip = (ip << 8) + ip_part4;
+        }
+    }
+
+    return ip;
 }
 
 Boolean System::sameHost (const String & hostName)
@@ -447,44 +438,47 @@ Boolean System::sameHost (const String & hostName)
     return true;
 }
 
-Boolean System::resolveHostNameAtDNS(const char* hostname, Uint32 * resolvedNameIP)
+Boolean System::resolveHostNameAtDNS(
+    const char* hostname,
+    Uint32* resolvedNameIP)
 {
     // ask the DNS for hostname resolution to IP address
     // this can mean a time delay for as long as the DNS
-    // takes to answer    
+    // takes to answer
     struct hostent* hostEntry;
 
 #if defined(PEGASUS_OS_LINUX)
-        char hostEntryBuffer[8192];
-        struct hostent hostEntryStruct;
-        int hostEntryErrno;
+    char hostEntryBuffer[8192];
+    struct hostent hostEntryStruct;
+    int hostEntryErrno;
 
-        gethostbyname_r(
-            hostname,
-            &hostEntryStruct,
-            hostEntryBuffer,
-            sizeof(hostEntryBuffer),
-            &hostEntry,
-            &hostEntryErrno);
+    gethostbyname_r(
+        hostname,
+        &hostEntryStruct,
+        hostEntryBuffer,
+        sizeof(hostEntryBuffer),
+        &hostEntry,
+        &hostEntryErrno);
 #elif defined(PEGASUS_OS_SOLARIS)
-        char hostEntryBuffer[8192];
-        struct hostent hostEntryStruct;
-        int hostEntryErrno;
+    char hostEntryBuffer[8192];
+    struct hostent hostEntryStruct;
+    int hostEntryErrno;
 
-        hostEntry = gethostbyname_r(
-            (char *)hostname,
-            &hostEntryStruct,
-            hostEntryBuffer,
-            sizeof(hostEntryBuffer),
-            &hostEntryErrno);
+    hostEntry = gethostbyname_r(
+        (char *)hostname,
+        &hostEntryStruct,
+        hostEntryBuffer,
+        sizeof(hostEntryBuffer),
+        &hostEntryErrno);
 #else
-        hostEntry = gethostbyname((char *)hostname);
+    hostEntry = gethostbyname((char *)hostname);
 #endif
     if (hostEntry == 0)
     {
         // error, couldn't resolve the hostname to an ip address
         return false;
-    } else
+    }
+    else
     {
         unsigned char ip_part1,ip_part2,ip_part3,ip_part4;
         ip_part1 = hostEntry->h_addr[0];
@@ -501,30 +495,31 @@ Boolean System::resolveHostNameAtDNS(const char* hostname, Uint32 * resolvedName
 
 Boolean System::resolveIPAtDNS(Uint32 ip_addr, Uint32 * resolvedIP)
 {
-        struct hostent *entry;
+    struct hostent *entry;
 
 #ifndef PEGASUS_OS_OS400
-        entry = gethostbyaddr((const char *) &ip_addr, sizeof(ip_addr), AF_INET);
+    entry = gethostbyaddr((const char *) &ip_addr, sizeof(ip_addr), AF_INET);
 #else
-               entry = gethostbyaddr((char *) &ip_addr, sizeof(ip_addr), AF_INET);
+    entry = gethostbyaddr((char *) &ip_addr, sizeof(ip_addr), AF_INET);
 #endif
-               if (entry == 0)
-               {
-                       // error, couldn't resolve the ip
-                       return false;
-               } else
-               {
-                       unsigned char ip_part1,ip_part2,ip_part3,ip_part4;
-                       ip_part1 = entry->h_addr[0];
-                       ip_part2 = entry->h_addr[1];
-                       ip_part3 = entry->h_addr[2];
-                       ip_part4 = entry->h_addr[3];
-                       *resolvedIP = ip_part1;
-                       *resolvedIP = (*resolvedIP << 8) + ip_part2;
-                       *resolvedIP = (*resolvedIP << 8) + ip_part3;
-                       *resolvedIP = (*resolvedIP << 8) + ip_part4;
-               }
-        return true;
+    if (entry == 0)
+    {
+        // error, couldn't resolve the ip
+        return false;
+    }
+    else
+    {
+        unsigned char ip_part1,ip_part2,ip_part3,ip_part4;
+        ip_part1 = entry->h_addr[0];
+        ip_part2 = entry->h_addr[1];
+        ip_part3 = entry->h_addr[2];
+        ip_part4 = entry->h_addr[3];
+        *resolvedIP = ip_part1;
+        *resolvedIP = (*resolvedIP << 8) + ip_part2;
+        *resolvedIP = (*resolvedIP << 8) + ip_part3;
+        *resolvedIP = (*resolvedIP << 8) + ip_part4;
+    }
+    return true;
 }
 
 
@@ -545,7 +540,7 @@ Boolean System::isLocalHost(const String &hostName)
     //       should define their platform here,
     //        as this is the superior way to work
 #if defined(PEGASUS_OS_LINUX) || defined(PEGASUS_OS_AIX)
-    
+
     struct in_addr inaddr;
     // if inet_aton failed(return=0),
     // we do not have a valip IP address (x.x.x.x)
@@ -561,16 +556,17 @@ Boolean System::isLocalHost(const String &hostName)
     //       A better solution would be to use inet_aton() or equivalent, as
     //       inet_addr() is now considered "obsolete".
     // Note: inet_aton() not yet supported on all Pegasus platforms
-       tmp_addr = inet_addr((char *) cc_hostname);
+    tmp_addr = inet_addr((char *) cc_hostname);
     if (tmp_addr == 0xFFFFFFFF) hostNameIsIPNotation = false;
     else hostNameIsIPNotation = true;
 #endif
-    
+
     if (!hostNameIsIPNotation)  // if hostname is not an IP address
-       {
+    {
         // localhost ?
         if (String::equalNoCase(hostName,String("localhost"))) return true;
-        char* localHostName = strdup( (const char *) System::getHostName ().getCString() );
+        char* localHostName =
+            strdup((const char*) System::getHostName().getCString());
         // given hostname equals what system returns as local hostname ?
         if (String::equalNoCase(hostName,localHostName)) return true;
         Uint32 hostIP;
@@ -582,9 +578,11 @@ Boolean System::isLocalHost(const String &hostName)
         // need to check if the local hosts name is possibly
         // registered at the DNS with the IP address equal resolvedNameIP
         Uint32 localHostIP;
-        if (!System::resolveHostNameAtDNS(localHostName, &localHostIP)) return false;
+        if (!System::resolveHostNameAtDNS(localHostName, &localHostIP))
+            return false;
         if (localHostIP == hostIP) return true;
-    } else
+    }
+    else
     {   // hostname is an IP address
         // 127.0.0.1 is always the loopback
         // inet_addr returns network byte order
@@ -594,11 +592,14 @@ Boolean System::isLocalHost(const String &hostName)
         // out of luck so far, lets ask the DNS what our IP is
         // and check against what we got
         Uint32 localHostIP;
-        if (!System::resolveHostNameAtDNS((const char *) System::getHostName().getCString(), &localHostIP)) return false;
+        if (!System::resolveHostNameAtDNS(
+                (const char*) System::getHostName().getCString(), &localHostIP))
+            return false;
         if (localHostIP == tmp_addr) return true;
         // not yet, sometimes resolving the IP address we got against the DNS
         // can solve the problem
-               // casting to (const char *) as (char *) will work as (void *) too, those it fits all platforms
+        // casting to (const char *) as (char *) will work as (void *) too,
+        // those it fits all platforms
         Uint32 hostIP;
         if (!System::resolveIPAtDNS(tmp_addr, &hostIP)) return false;
         if (hostIP == localHostIP) return true;
index 4e19f4505cfaffcaad264e79ac1da8df2bde9045..f083060a2fdc451d76dfd2ce94f539b5d78bfc8b 100644 (file)
@@ -86,13 +86,13 @@ public:
     static void getCurrentTime(Uint32& seconds, Uint32& milliseconds);
 
     /** Similar to getCurrentTime() above but get microseconds (rather than
-       milliseconds).
+        milliseconds).
     */
     static void getCurrentTimeUsec(Uint32& seconds, Uint32& microseconds);
 
     /** getCurrentASCIITime Gets time/date in a fixed format. The format is
         YY MM DD-HH:MM:SS
-       @return Returns String with the ASCII time date.
+        @return Returns String with the ASCII time date.
     */
     static String getCurrentASCIITime();
 
@@ -135,7 +135,7 @@ public:
 
     /**
         Attempts to validate that the input hostName represents the same host as
-        the host represented by the value returned by the 
+        the host represented by the value returned by the
         getFullyQualifiedHostName() method.
 
         @param  hostName  the host name to validate
@@ -147,100 +147,100 @@ public:
     static Boolean sameHost (const String & hostName);
 
     /**
-     *  Attempts to find the given IP address(32bit) on any of the local defined
-     *  network interfaces
+        Attempts to find the given IP address(32bit) on any of the local defined
+        network interfaces
      */
     static Boolean isIpOnNetworkInterface(Uint32 inIP);
-    
+
     /**
-     *  Attempts to resolve a given hostname
-     *  this function possibly can take some as it can request information
-     *  from the DNS
-     * 
-     *  Return: return value == true if successful, false if not successful
-     *          the IP address that was determined resides in resolvedNameIP
+        Attempts to resolve a given hostname
+        this function possibly can take some as it can request information
+        from the DNS
+
+        @param resolvedNameIP On successful hostname resolution, this output
+        parameter contains the IP address that was determined.
+        @return true if successful, false if not successful.
      */
-    static Boolean resolveHostNameAtDNS(const char* hostname, Uint32 * resolvedNameIP);
+    static Boolean resolveHostNameAtDNS(
+        const char* hostname,
+        Uint32* resolvedNameIP);
 
     /**
-     *  Attempts to resolve a given IP address
-     *  this function possibly can take some as it can request information
-     *  from the DNS
-     *  Return: return value == true if successful, false if not successful
-     *          the IP address that was determined resides in resolvedNameIP
+        Attempts to resolve a given IP address
+        this function possibly can take some as it can request information
+        from the DNS
+        @param resolvedIP On successful hostname resolution, this output
+        parameter contains the IP address that was determined.
+        @return true if successful, false if not successful.
      */
     static Boolean resolveIPAtDNS(Uint32 ip_addr, Uint32 * resolvedIP);
 
-    /** 
-     * Bundling function used to determine if a given hostname or IP address
-     * belongs to the local host
-     * this function has the potential to take some time as it will possibly
-     * use the DNS
+    /**
+        Bundling function used to determine if a given hostname or IP address
+        belongs to the local host
+        this function has the potential to take some time as it will possibly
+        use the DNS
      */
-    static Boolean isLocalHost(const String &hostName);
+    static Boolean isLocalHost(const StringhostName);
 
     static String getEffectiveUserName();
 
     /**
-    This function is used to input a password with echo disabled.
-    The function reads up to a newline and returns a password of at most
-    8 characters.
+        This function is used to input a password with echo disabled.
+        The function reads up to a newline and returns a password of at most
+        8 characters.
 
-    @param  prompt      String containing the message prompt to be displayed
-    @return             password obtained from the user
+        @param prompt String containing the message prompt to be displayed
+        @return password obtained from the user
     */
     static String getPassword(const char* prompt);
 
     /**
-    This function is used to encrypt the user's password.
-    The encryption is compatible with Apache's  password file (generated using
-    the htpasswd command )
+        This function is used to encrypt the user's password.
+        The encryption is compatible with Apache's password file (generated
+        using the htpasswd command)
 
-    @param password     Password to be encrypted.
-    @param salt         Two character string chosen from the set [a-zA-Z0-9./].
+        @param password Password to be encrypted.
+        @param salt Two character string chosen from the set [a-zA-Z0-9./].
 
-    @return             Encrypted password.
+        @return Encrypted password.
     */
     static String encryptPassword(const char* password, const char* salt);
 
     /**
-    This function is used to verify whether specified user is a user
-    on the local system.
+        This function is used to verify whether specified user is a user
+        on the local system.
 
-    @param userName     User name to be verified.
+        @param userName User name to be verified.
 
-    @return             true if the username is valid, else false
+        @return true if the username is valid, else false
     */
     static Boolean isSystemUser(const char* userName);
 
     /**
-    Checks whether the given user is a privileged user.
+        Checks whether the given user is a privileged user.
 
-    @param userName     User name to be checked.
-    @return             true if the user is a privileged user, else false
+        @param userName User name to be checked.
+        @return true if the user is a privileged user, else false
     */
     static Boolean isPrivilegedUser(const String& userName);
 
     /**
-    This function returns the privileged user name on the system.
-
-    @return             the privileged user name
+        This function returns the privileged user name on the system.
+        @return the privileged user name
     */
     static String getPrivilegedUserName();
 
     /**
-    This function is used to verify whether the specified user is a member
-    of the specified user group.
+        This function is used to verify whether the specified user is a member
+        of the specified user group.
 
-    @param userName     User name to be verified.
+        @param userName User name to be verified.
+        @param groupName User group name.
 
-    @param groupName    User group name.
-
-    @return             true if the user is a member of the user group,
-                        false otherwise.
-
-    @throw              InternalSystemError - If there is an error
-                        accessing the specified user or group information.
+        @return true if the user is a member of the user group, false otherwise.
+        @throw InternalSystemError - If there is an error accessing the
+        specified user or group information.
     */
     static Boolean isGroupMember(const char* userName, const char* groupName);
 
@@ -273,9 +273,8 @@ public:
 #endif
 
     /**
-    This function is used to get the process ID of the calling process.
-
-    @return             Process ID
+        This function is used to get the process ID of the calling process.
+        @return Process ID
     */
     static Uint32 getPID();
 
@@ -348,8 +347,8 @@ public:
         const char* message);
 
     static void openlog(
-        const char *ident, 
-        int logopt, 
+        const char *ident,
+        int logopt,
         int facility);
 
     static void closelog();
index d2cca1e0fba19643f0bf6ab2e7df9e2af4f65ddc..bed92f758f77ced60bd20a94f3976328c44a9344 100644 (file)
@@ -398,15 +398,13 @@ String System::getFullyQualifiedHostName ()
     hint.ai_family = AF_UNSPEC; // any family
     hint.ai_socktype = 0;       // any socket type
     hint.ai_protocol = 0;       // any protocol
-    int success = getaddrinfo(hostName,
-                NULL,
-                &hint,
-                &resolv);
+    int success = getaddrinfo(hostName, NULL, &hint, &resolv);
     if (success==0)
     {
         // assign fully qualified hostname
         fqName.assign(resolv->ai_canonname);
-    } else
+    }
+    else
     {
         if ((he = gethostbyname(hostName)))
         {
@@ -415,7 +413,7 @@ String System::getFullyQualifiedHostName ()
         // assign hostName
         // if gethostbyname was successful assign that result
         // else assign unqualified hostname
-    fqName.assign(hostName);
+        fqName.assign(hostName);
     }
     freeaddrinfo(resolv);
     delete resolv;
@@ -513,36 +511,37 @@ Uint32 System::lookupPort(
 */
 char *getpassword(const char *prompt)
 {
-  const size_t MAX_PASS_LEN = 1024;
-  static char buf[MAX_PASS_LEN];
-  struct termios old, new_val;
-  char *ptr;
-  int c;
+    const size_t MAX_PASS_LEN = 1024;
+    static char buf[MAX_PASS_LEN];
+    struct termios old, new_val;
+    char *ptr;
+    int c;
+
+    buf[0] = 0;
 
-  buf[0] = 0;
+    /* Turn echoing off and fail if we can't. */
+    if (tcgetattr (fileno (stdin), &old) != 0)
+        return buf;
+    new_val = old;
+    new_val.c_lflag &= ~(ECHO | ECHOE | ECHOK | ECHONL);
+    if (tcsetattr (fileno (stdin), TCSAFLUSH, &new_val) != 0)
+        return buf;
 
-  /* Turn echoing off and fail if we can't. */
-  if (tcgetattr (fileno (stdin), &old) != 0)
-    return buf;
-  new_val = old;
-  new_val.c_lflag &= ~(ECHO | ECHOE | ECHOK | ECHONL);
-  if (tcsetattr (fileno (stdin), TCSAFLUSH, &new_val) != 0)
-    return buf;
+    /* Read the password. */
+    fputs (prompt, stdin);
+    ptr = buf;
+    while ( (c = getc(stdin)) != EOF && c != '\n')
+    {
+        if (ptr < &buf[MAX_PASS_LEN])
+            *ptr++ = c;
+    }
+    *ptr = 0;
+    putc('\n', stdin);
 
-  /* Read the password. */
-  fputs (prompt, stdin);
-  ptr = buf;
-  while ( (c = getc(stdin)) != EOF && c != '\n') {
-    if (ptr < &buf[MAX_PASS_LEN])
-      *ptr++ = c;
-  }
-  *ptr = 0;
-  putc('\n', stdin);
-
-  /* Restore terminal. */
-  (void) tcsetattr (fileno (stdin), TCSAFLUSH, &old);
-  fclose(stdin);
-  return buf;
+    /* Restore terminal. */
+    (void) tcsetattr (fileno (stdin), TCSAFLUSH, &old);
+    fclose(stdin);
+    return buf;
 }
 
 #endif /* PEGASUS_OS_LSB */
@@ -740,7 +739,7 @@ String System::getEffectiveUserName()
     struct passwd       local_pwd;
     char                buf[PWD_BUFF_SIZE];
 
-    if(getpwuid_r(geteuid(), &local_pwd, buf, PWD_BUFF_SIZE, &pwd) != 0)
+    if (getpwuid_r(geteuid(), &local_pwd, buf, PWD_BUFF_SIZE, &pwd) != 0)
     {
         String errorMsg = String("getpwuid_r failure : ") +
                             String(strerror(errno));
@@ -780,7 +779,7 @@ String System::getEffectiveUserName()
         userName.assign(pwd->pw_name);
     }
 
-    return(userName);
+    return userName;
 }
 
 String System::encryptPassword(const char* password, const char* salt)
@@ -805,12 +804,12 @@ String System::encryptPassword(const char* password, const char* salt)
 
 #elif !defined(PEGASUS_OS_OS400)
 
-    return ( String(crypt( password,salt)) );
+    return String(crypt( password,salt));
 
 #else
 
     // Not supported on OS400, and we don't need it.
-    return ( String(password) );
+    return String(password);
 
 #endif
 }
@@ -903,7 +902,7 @@ Boolean System::isPrivilegedUser(const String& userName)
         return false;
 
     // ATTN-VMS: should this be a bitwise and?
-    return ((PRV$M_SETPRV && prvPrv) == 1) ? true : false;
+    return ((PRV$M_SETPRV && prvPrv) == 1);
 
 #else /* default */
 
@@ -1010,13 +1009,14 @@ Boolean System::isGroupMember(const char* userName, const char* groupName)
             String errorMsg = String("getgrgid_r failure : ") +
                                  String(strerror(errno));
             PEG_TRACE_STRING(TRC_OS_ABSTRACTION, Tracer::LEVEL2, errorMsg);
-            Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::WARNING,
-                                  errorMsg);
+            Logger::put(
+                Logger::STANDARD_LOG, System::CIMSERVER, Logger::WARNING,
+                errorMsg);
             throw InternalSystemError();
         }
 
         // Compare the user's group name to groupName.
-        if ( strcmp (grp.gr_name, groupName) == 0 )
+        if (strcmp(grp.gr_name, groupName) == 0)
         {
              // User is a member of the group.
              return true;
@@ -1338,7 +1338,7 @@ void System::syslog(const String& ident, Uint32 severity, const char* message)
     }
 
     // if message greater then 4096 bytes results are undefined !
-    if(zosMessageStringLength > 4095)
+    if (zosMessageStringLength > 4095)
     {
         // the temp buffer is already used !
         if (tmpMessageString)
@@ -1347,7 +1347,9 @@ void System::syslog(const String& ident, Uint32 severity, const char* message)
             // to the same storage but the tmpMessageString is not const !
             tmpMessageString[4095] = 0;
 
-        } else {
+        }
+        else
+        {
             // allocate an appropriate buffer, init with 0
             tmpMessageString = (char*)calloc(4096,1);
             memcpy(tmpMessageString,zosMessageString,4095);
@@ -1359,7 +1361,7 @@ void System::syslog(const String& ident, Uint32 severity, const char* message)
     CString identCString = ident.getCString();
     // Issue important messages to the z/OS console
     // and audit messages are not important
-    if (!(severity & Logger::TRACE) && 
+    if (!(severity & Logger::TRACE) &&
         !(strcmp("cimserver audit",identCString) == 0))
     {
         struct __cons_msg   cons;
@@ -1426,26 +1428,27 @@ Boolean System::isIpOnNetworkInterface(Uint32 inIP)
     #define PEGASUS_MAX_NETWORK_INTERFACES 32
     struct ifconf conf;
 
-    conf.ifc_buf = (char *)calloc( PEGASUS_MAX_NETWORK_INTERFACES, sizeof(struct ifreq ) );
-    conf.ifc_len = PEGASUS_MAX_NETWORK_INTERFACES * sizeof( struct ifreq ) ;
-        
-    if( -1 < ioctl(AF_INET, SIOCGIFCONF, &conf ) )
+    conf.ifc_buf =
+        (char *)calloc(PEGASUS_MAX_NETWORK_INTERFACES, sizeof(struct ifreq));
+    conf.ifc_len = PEGASUS_MAX_NETWORK_INTERFACES * sizeof(struct ifreq);
+
+    if (-1 < ioctl(AF_INET, SIOCGIFCONF, &conf))
     {
-      struct ifreq *r = conf.ifc_req;
-      sockaddr_in *addr ;
-      addr = (sockaddr_in *)&r->ifr_addr;
-      while(  addr->sin_addr.s_addr != 0 )
-      {
-          Uint32 ip = addr->sin_addr.s_addr;
-          if (ip == inIP)
-          {
-              free(conf.ifc_buf);
-              return true;
-          }
-          // next interface
-          r++;
-          addr = (sockaddr_in *) &r->ifr_addr;
-      }
+        struct ifreq* r = conf.ifc_req;
+        sockaddr_in* addr ;
+        addr = (sockaddr_in *)&r->ifr_addr;
+        while (addr->sin_addr.s_addr != 0)
+        {
+            Uint32 ip = addr->sin_addr.s_addr;
+            if (ip == inIP)
+            {
+                free(conf.ifc_buf);
+                return true;
+            }
+            // next interface
+            r++;
+            addr = (sockaddr_in *) &r->ifr_addr;
+        }
     }
     free(conf.ifc_buf);
     return false;
index 1ab457c477aa1e67b57e90787ec757a1205da639..08971b5a1ab33735a55833dfd4f84208f4acb8e4 100644 (file)
@@ -307,62 +307,63 @@ String System::getEffectiveUserName()
 {
 #if (_MSC_VER >= 1300) || defined(PEGASUS_WINDOWS_SDK_HOME)
 
-       //Bug 3076 fix
-       wchar_t fullUserName[UNLEN+1];
-       DWORD userNameSize = sizeof(fullUserName)/sizeof(fullUserName[0]);
-       wchar_t computerName[MAX_COMPUTERNAME_LENGTH+1];
-    DWORD computerNameSize = sizeof(computerName)/sizeof(computerName[0]);    
-       wchar_t userName[UNLEN+1];
+    //Bug 3076 fix
+    wchar_t fullUserName[UNLEN+1];
+    DWORD userNameSize = sizeof(fullUserName)/sizeof(fullUserName[0]);
+    wchar_t computerName[MAX_COMPUTERNAME_LENGTH+1];
+    DWORD computerNameSize = sizeof(computerName)/sizeof(computerName[0]);
+    wchar_t userName[UNLEN+1];
     wchar_t userDomain[UNLEN+1];
-       String userId;
-
-       if (!GetUserNameExW(NameSamCompatible, fullUserName, &userNameSize))
-       {
-               return String();
-       }
-
-       wchar_t* index = wcschr(fullUserName, '\\');
-       *index = 0;
-       wcscpy(userDomain, fullUserName);
-       wcscpy(userName, index + 1);
-       //The above function will return the system name as the domain if
-       //the user is not on a real domain.  Strip this out so that the rest of
-       //our windows user functions work.  What if the system name and the domain
-       //name are the same?
+    String userId;
+
+    if (!GetUserNameExW(NameSamCompatible, fullUserName, &userNameSize))
+    {
+        return String();
+    }
+
+    wchar_t* index = wcschr(fullUserName, '\\');
+    *index = 0;
+    wcscpy(userDomain, fullUserName);
+    wcscpy(userName, index + 1);
+
+    //The above function will return the system name as the domain if
+    //the user is not on a real domain.  Strip this out so that the rest of
+    //our windows user functions work.  What if the system name and the domain
+    //name are the same?
     GetComputerNameW(computerName, &computerNameSize);
-               
-       if (wcscmp(computerName, userDomain) != 0) 
-       {
+
+    if (wcscmp(computerName, userDomain) != 0)
+    {
         //userId.append(userDomain);
         Uint32 n = wcslen(userDomain);
-        for(unsigned long i = 0; i < n; i++)
+        for (unsigned long i = 0; i < n; i++)
         {
             userId.append(Char16(userDomain[i]));
         }
-               userId.append("\\");
-               //userId.append(userName);
+        userId.append("\\");
+        //userId.append(userName);
         n = wcslen(userName);
-        for(unsigned long i = 0; i < n; i++)
+        for (unsigned long i = 0; i < n; i++)
         {
             userId.append(Char16(userName[i]));
         }
 
-       } else
-       {
-               //userId.append(userName);
+    }
+    else
+    {
+        //userId.append(userName);
         Uint32 n = wcslen(userName);
-        for(unsigned long i = 0; i < n; i++)
+        for (unsigned long i = 0; i < n; i++)
         {
             userId.append(Char16(userName[i]));
         }
 
-       }
+    }
 
-       return userId;
+    return userId;
 
 #else //original getEffectiveUserName function
-    
+
     int retcode = 0;
 
     // UNLEN (256) is the limit, not including null
@@ -377,12 +378,11 @@ String System::getEffectiveUserName()
     }
     String userId;
     Uint32 n = wcslen(pUserName);
-    for(unsigned long i = 0; i < n; i++)
+    for (unsigned long i = 0; i < n; i++)
     {
         userId.append(Char16(pUserName[i]));
     }
 
-
     return userId;
 #endif
 }
@@ -407,17 +407,17 @@ Mutex processUserNameMut;
 
 Boolean System::isSystemUser(const char* userName)
 {
-    if(processUserName.size() == 0)
+    if (processUserName.size() == 0)
     {
         // Lock and recheck the processUserName length in case two threads
         // enter this block simultaneously
         AutoMutex mut(processUserNameMut);
-        if(processUserName.size() == 0)
+        if (processUserName.size() == 0)
         {
             processUserName = getEffectiveUserName();
         }
     }
-    if(processUserName == userName)
+    if (processUserName == userName)
     {
       return true;
     }
@@ -437,8 +437,8 @@ Boolean System::isSystemUser(const char* userName)
     LPUSER_INFO_1 pUserInfo = NULL;
     NET_API_STATUS nStatus = NULL;
 
-    // Make a copy of the specified username, it cannot be used directly because it's
-    // declared as const and strchr() may modify the string.
+    // Make a copy of the specified username, it cannot be used directly
+    // because it's declared as const and strchr() may modify the string.
     strncpy(tUserName, userName, sizeof(tUserName) - 1);
     tUserName[sizeof(tUserName)- 1] = '\0';
 
@@ -450,28 +450,32 @@ Boolean System::isSystemUser(const char* userName)
         strcpy(mUserName, pbs+1);
         usingDomain = true;
 
-    } else if ((NULL != (pbs = (strchr(tUserName, '@')))) ||
-               (NULL != (pbs = (strchr(tUserName, '.')))))
+    }
+    else if ((NULL != (pbs = (strchr(tUserName, '@')))) ||
+             (NULL != (pbs = (strchr(tUserName, '.')))))
     {
         *pbs = '\0';
         strcpy(mDomainName, pbs+1);
         strcpy(mUserName, tUserName);
         usingDomain = true;
 
-    } else
+    }
+    else
     {
         strcpy(mDomainName, ".");
         strcpy(mUserName, tUserName);
     }
 
     //convert domain name to unicode
-    if (!MultiByteToWideChar(CP_ACP, 0, mDomainName, -1, wDomainName, strlen(mDomainName)+1))
+    if (!MultiByteToWideChar(
+            CP_ACP, 0, mDomainName, -1, wDomainName, strlen(mDomainName) + 1))
     {
         return false;
     }
 
     //convert username to unicode
-    if (!MultiByteToWideChar(CP_ACP, 0, mUserName, -1, wUserName, strlen(mUserName)+1))
+    if (!MultiByteToWideChar(
+            CP_ACP, 0, mUserName, -1, wUserName, strlen(mUserName) + 1))
     {
         return false;
     }
@@ -482,13 +486,15 @@ Boolean System::isSystemUser(const char* userName)
         DWORD rc = NetGetDCName(NULL, wDomainName, &pComputerName);
         if (rc == NERR_Success)
         {
-            wcscpy(wDomainName, (LPWSTR) pComputerName); //this is automatically prefixed with "\\"
+            // this is automatically prefixed with "\\"
+            wcscpy(wDomainName, (LPWSTR) pComputerName);
         }
         /*
         else
         {
             // failover
-            // ATTN: This is commented out until there is resolution on Bugzilla 2236. -hns 2/2005
+            // ATTN: This is commented out until there is resolution on
+            // Bugzilla 2236. -hns 2/2005
             // This needs to be more thoroughly tested when we uncomment it out.
 
             PDOMAIN_CONTROLLER_INFO DomainControllerInfo = NULL;
@@ -498,7 +504,8 @@ Boolean System::isSystemUser(const char* userName)
                              mDomainName,
                              NULL,
                              NULL,
-                             DS_DIRECTORY_SERVICE_REQUIRED,  //not sure what flags we want here
+                             //not sure what flags we want here
+                             DS_DIRECTORY_SERVICE_REQUIRED,
                              &DomainControllerInfo);
 
             if (rc == ERROR_SUCCESS && DomainControllerInfo)
@@ -506,7 +513,9 @@ Boolean System::isSystemUser(const char* userName)
                 strcpy(mDomainName, DomainControllerInfo->DomainName);
                 NetApiBufferFree(DomainControllerInfo);
 
-                if (!MultiByteToWideChar(CP_ACP, 0, mDomainName, -1, wDomainName, strlen(mDomainName)+1))
+                if (!MultiByteToWideChar(
+                        CP_ACP, 0, mDomainName, -1, wDomainName,
+                        strlen(mDomainName) + 1))
                 {
                     return false;
                 }
@@ -568,28 +577,32 @@ Boolean System::isPrivilegedUser(const String& userName)
         strcpy(mUserName, pbs+1);
         usingDomain = true;
 
-    } else if ((NULL != (pbs = (strchr(userStr, '@')))) ||
-               (NULL != (pbs = (strchr(userStr, '.')))))
+    }
+    else if ((NULL != (pbs = (strchr(userStr, '@')))) ||
+             (NULL != (pbs = (strchr(userStr, '.')))))
     {
         *pbs = '\0';
         strcpy(mDomainName, pbs+1);
         strcpy(mUserName, userStr);
         usingDomain = true;
 
-    } else
+    }
+    else
     {
         strcpy(mDomainName, ".");
         strcpy(mUserName, userStr);
     }
 
     //convert domain name to unicode
-    if (!MultiByteToWideChar(CP_ACP, 0, mDomainName, -1, wDomainName, strlen(mDomainName)+1))
+    if (!MultiByteToWideChar(
+            CP_ACP, 0, mDomainName, -1, wDomainName, strlen(mDomainName) + 1))
     {
         return false;
     }
 
     //convert username to unicode
-    if (!MultiByteToWideChar(CP_ACP, 0, mUserName, -1, wUserName, strlen(mUserName)+1))
+    if (!MultiByteToWideChar(
+            CP_ACP, 0, mUserName, -1, wUserName, strlen(mUserName) + 1))
     {
         return false;
     }
@@ -600,13 +613,15 @@ Boolean System::isPrivilegedUser(const String& userName)
         DWORD rc = NetGetDCName(NULL, wDomainName, &pComputerName);
         if (rc == NERR_Success)
         {
-            wcscpy(wDomainName, (LPWSTR) pComputerName); //this is automatically prefixed with "\\"
+            // this is automatically prefixed with "\\"
+            wcscpy(wDomainName, (LPWSTR) pComputerName);
         }
         /*
         else
         {
             // failover
-            // ATTN: This is commented out until there is resolution on Bugzilla 2236. -hns 2/2005
+            // ATTN: This is commented out until there is resolution on
+            // Bugzilla 2236. -hns 2/2005
             // This needs to be more thoroughly tested when we uncomment it out.
 
             PDOMAIN_CONTROLLER_INFO DomainControllerInfo = NULL;
@@ -616,7 +631,8 @@ Boolean System::isPrivilegedUser(const String& userName)
                              mDomainName,
                              NULL,
                              NULL,
-                             DS_DIRECTORY_SERVICE_REQUIRED,  //not sure what flags we want here
+                             // not sure what flags we want here
+                             DS_DIRECTORY_SERVICE_REQUIRED,
                              &DomainControllerInfo);
 
             if (rc == ERROR_SUCCESS && DomainControllerInfo)
@@ -624,7 +640,9 @@ Boolean System::isPrivilegedUser(const String& userName)
                 strcpy(mDomainName, DomainControllerInfo->DomainName);
                 NetApiBufferFree(DomainControllerInfo);
 
-                if (!MultiByteToWideChar(CP_ACP, 0, mDomainName, -1, wDomainName, strlen(mDomainName)+1))
+                if (!MultiByteToWideChar(
+                        CP_ACP, 0, mDomainName, -1, wDomainName,
+                        strlen(mDomainName) + 1))
                 {
                     return false;
                 }
@@ -664,7 +682,7 @@ String System::getPrivilegedUserName()
     // ATTN-NB-03-20000304: Implement better way to get the privileged
     // user on the system.
 
-    return (String("Administrator"));
+    return String("Administrator");
 }
 
 Boolean System::isGroupMember(const char* userName, const char* groupName)
@@ -854,11 +872,12 @@ Boolean System::is_absolute_path(const char *path)
     strncpy(path_slash, path, _MAX_PATH);
     path_slash[_MAX_PATH-1] = '\0';
 
-    for(p = path_slash; p < path_slash + strlen(path_slash); p++)
+    for (p = path_slash; p < path_slash + strlen(path_slash); p++)
       if (*p == '/')
           *p = '\\';
 
-    return (strcasecmp(_fullpath( full, path_slash, _MAX_PATH ), path_slash) == 0) ? true : false;
+    return (strcasecmp(
+        _fullpath(full, path_slash, _MAX_PATH), path_slash) == 0);
 }
 
 // Changes file permissions on the given file.
@@ -908,7 +927,7 @@ Boolean System::isIpOnNetworkInterface(Uint32 inIP)
         unsigned long *bytes_returned=0;
         char *output_buf = (char *)calloc(1, 256);
         int buf_size = 256;
-    
+
         if ( 0 == (errcode = WSAIoctl(sock,
                                       SIO_ADDRESS_LIST_QUERY,
                                       NULL,
@@ -923,13 +942,13 @@ Boolean System::isIpOnNetworkInterface(Uint32 inIP)
             SOCKET_ADDRESS *addr;
             Uint32 ip;
             struct sockaddr_in *sin;
-        
-            addr_list = (SOCKET_ADDRESS_LIST *)output_buf;        
+
+            addr_list = (SOCKET_ADDRESS_LIST *)output_buf;
             addr = addr_list->Address;
-        
+
             sin = (struct sockaddr_in *)addr->lpSockaddr;
-        
-            for( ; interfaces < addr_list->iAddressCount; interfaces++)
+
+            for ( ; interfaces < addr_list->iAddressCount; interfaces++)
             {
                 ip = sin->sin_addr.s_addr;
                 addr++;
@@ -938,10 +957,12 @@ Boolean System::isIpOnNetworkInterface(Uint32 inIP)
                 {
                     free(output_buf);
                     closesocket(sock);
-                    return(true);
+                    return true;
                 }
             }
-        } else {
+        }
+        else
+        {
             free(output_buf);
             return false;
         }
index a08eeb00cfa154266c5d7d07c4a038771831736f..4b8e0a0f1efae8147d59eb8d8f40af9cdf978d61 100644 (file)
@@ -35,7 +35,7 @@
 #include <Pegasus/Common/Tracer.h>
 #include <Pegasus/Common/SSLContextRep.h>
 #include <Pegasus/Common/SSLContext.h>
-#include <Pegasus/Common/MessageLoader.h> //l10n
+#include <Pegasus/Common/MessageLoader.h>
 #include <Pegasus/Common/FileSystem.h>
 
 #include "TLS.h"
@@ -77,10 +77,9 @@ SSLSocket::SSLSocket(
     if (!( _SSLConnection = SSL_new(_SSLContext->_rep->getContext() )))
     {
         PEG_METHOD_EXIT();
-        //l10n
-        //throw( SSLException("Could not get SSL Connection Area"));
-        MessageLoaderParms parms("Common.TLS.COULD_NOT_GET_SSL_CONNECTION_AREA",
-                                                "Could not get SSL Connection Area");
+        MessageLoaderParms parms(
+            "Common.TLS.COULD_NOT_GET_SSL_CONNECTION_AREA",
+            "Could not get SSL Connection Area");
         throw SSLException(parms);
     }
 
@@ -92,26 +91,34 @@ SSLSocket::SSLSocket(
         // set the verification callback data
         //
 
-        //we are only storing one set of data, so we can just use index 0, this is defined in SSLContext.h
-        //int index = SSL_get_ex_new_index(0, (void*)"pegasus", NULL, NULL, NULL);
+        // we are only storing one set of data, so we can just use index 0,
+        // this is defined in SSLContext.h
+        //int index = SSL_get_ex_new_index(
+        //    0, (void*)"pegasus", NULL, NULL, NULL);
 
         //
         // Create a new callback info for each new connection
         //
-        _SSLCallbackInfo.reset(new SSLCallbackInfo(_SSLContext->getSSLCertificateVerifyFunction()
+        _SSLCallbackInfo.reset(new SSLCallbackInfo(
+            _SSLContext->getSSLCertificateVerifyFunction()
 #ifdef PEGASUS_ENABLE_SSL_CRL_VERIFICATION
-                                                   , _SSLContext->getCRLStore()));
+            , _SSLContext->getCRLStore()));
 #else
-                                                   ));
+            ));
 #endif
 
-        if (SSL_set_ex_data(_SSLConnection, SSLCallbackInfo::SSL_CALLBACK_INDEX, _SSLCallbackInfo.get()))
+        if (SSL_set_ex_data(
+                _SSLConnection,
+                SSLCallbackInfo::SSL_CALLBACK_INDEX,
+                _SSLCallbackInfo.get()))
         {
-            PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4, "--->SSL: Set callback info");
+            PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4,
+                "--->SSL: Set callback info");
         }
         else
         {
-            PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL3, "--->SSL: Error setting callback info");
+            PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL3,
+                "--->SSL: Error setting callback info");
         }
 
         //
@@ -120,14 +127,13 @@ SSLSocket::SSLSocket(
         if (!(SSL_set_fd(_SSLConnection, _socket) ))
         {
             PEG_METHOD_EXIT();
-            //l10n
-            //throw( SSLException("Could not link socket to SSL Connection"));
-            MessageLoaderParms parms("Common.TLS.COULD_NOT_LINK_SOCKET",
-                                                "Could not link socket to SSL Connection");
+            MessageLoaderParms parms(
+                "Common.TLS.COULD_NOT_LINK_SOCKET",
+                "Could not link socket to SSL Connection");
             throw SSLException(parms);
         }
     }
-    catch(...)
+    catch (...)
     {
         SSL_free(_SSLConnection);
         throw;
@@ -157,9 +163,10 @@ Boolean SSLSocket::incompleteReadOccurred(Sint32 retCode)
     Tracer::trace(TRC_SSL, Tracer::LEVEL4,
         "In SSLSocket::incompleteReadOccurred : err = %d", err);
 
-    return ((err == SSL_ERROR_SYSCALL) && (_sslReadErrno == EAGAIN || _sslReadErrno == EINTR)) ||
-            err == SSL_ERROR_WANT_READ ||
-            err == SSL_ERROR_WANT_WRITE;
+    return ((err == SSL_ERROR_SYSCALL) &&
+            (_sslReadErrno == EAGAIN || _sslReadErrno == EINTR)) ||
+           (err == SSL_ERROR_WANT_READ) ||
+           (err == SSL_ERROR_WANT_WRITE);
 }
 
 Sint32 SSLSocket::read(void* ptr, Uint32 size)
@@ -168,7 +175,8 @@ Sint32 SSLSocket::read(void* ptr, Uint32 size)
     Sint32 rc;
 
     PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4, "---> SSL: (r) ");
-    PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4, SSL_state_string_long(_SSLConnection) );
+    PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4,
+        SSL_state_string_long(_SSLConnection));
     rc = SSL_read(_SSLConnection, (char *)ptr, size);
 
     _sslReadErrno = errno;
@@ -190,7 +198,7 @@ Sint32 SSLSocket::timedWrite( const void* ptr,
   while (1)
   {
     PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4, "---> SSL: (w) ");
-    PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4, 
+    PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4,
                      SSL_state_string_long(_SSLConnection) );
     bytesWritten = SSL_write(_SSLConnection, (char *)ptr, size);
 
@@ -221,7 +229,7 @@ Sint32 SSLSocket::timedWrite( const void* ptr,
     if (bytesWritten <= 0)
     {
         // if we already waited for the socket to get ready, bail out
-        if( socketTimedOut )
+        if (socketTimedOut)
         {
             // bytesWritten contains the error indication
             PEG_METHOD_EXIT();
@@ -231,14 +239,14 @@ Sint32 SSLSocket::timedWrite( const void* ptr,
         // just interrupted by a signal, try again
 #ifdef PEGASUS_OS_TYPE_WINDOWS
         if (WSAGetLastError() == WSAEINTR) continue;
-#else        
+#else
         if (errno == EINTR) continue;
 #endif
 
         // socket not ready ...
 #ifdef PEGASUS_OS_TYPE_WINDOWS
         if (WSAGetLastError() == WSAEWOULDBLOCK)
-#else        
+#else
         if (errno == EAGAIN || errno == EWOULDBLOCK)
 #endif
         {
@@ -249,7 +257,7 @@ Sint32 SSLSocket::timedWrite( const void* ptr,
             FD_SET(_socket, &fdwrite);
             selreturn = select(FD_SETSIZE, NULL, &fdwrite, NULL, &tv);
             if (selreturn == 0) socketTimedOut = true; // ran out of time
-            continue;            
+            continue;
         }
         // bytesWritten contains the error indication
         PEG_METHOD_EXIT();
@@ -308,20 +316,21 @@ Sint32 SSLSocket::accept()
 
     if (ssl_rc < 0)
     {
-       ssl_rsn = SSL_get_error(_SSLConnection, ssl_rc);
-       Tracer::trace(TRC_SSL, Tracer::LEVEL3, "---> SSL: Not accepted %d", ssl_rsn );
+        ssl_rsn = SSL_get_error(_SSLConnection, ssl_rc);
+        Tracer::trace(TRC_SSL, Tracer::LEVEL3,
+            "---> SSL: Not accepted %d", ssl_rsn );
 
-       if ((ssl_rsn == SSL_ERROR_WANT_READ) ||
-           (ssl_rsn == SSL_ERROR_WANT_WRITE))
-       {
-           PEG_METHOD_EXIT();
-           return 0;
-       }
-       else
-       {
-           PEG_METHOD_EXIT();
-           return -1;
-       }
+        if ((ssl_rsn == SSL_ERROR_WANT_READ) ||
+            (ssl_rsn == SSL_ERROR_WANT_WRITE))
+        {
+            PEG_METHOD_EXIT();
+            return 0;
+        }
+        else
+        {
+            PEG_METHOD_EXIT();
+            return -1;
+        }
     }
     else if (ssl_rc == 0)
     {
@@ -343,7 +352,8 @@ Sint32 SSLSocket::accept()
     //
     if (_SSLContext->isPeerVerificationEnabled())
     {
-        PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL3, "Attempting to certify client");
+        PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL3,
+            "Attempting to certify client");
 
         //
         // get client's certificate
@@ -355,7 +365,8 @@ Sint32 SSLSocket::accept()
             // get certificate verification result
             //
             int verifyResult = SSL_get_verify_result(_SSLConnection);
-            Tracer::trace(TRC_SSL, Tracer::LEVEL3, "Verification Result:  %d", verifyResult );
+            Tracer::trace(TRC_SSL, Tracer::LEVEL3,
+                "Verification Result:  %d", verifyResult );
 
             if (verifyResult == X509_V_OK)
             {
@@ -383,7 +394,8 @@ Sint32 SSLSocket::accept()
     }
     else
     {
-        PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL3, "---> SSL: Client certification disabled");
+        PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL3,
+            "---> SSL: Client certification disabled");
     }
 
     PEG_METHOD_EXIT();
@@ -405,7 +417,8 @@ redo_connect:
     if (ssl_rc < 0)
     {
        ssl_rsn = SSL_get_error(_SSLConnection, ssl_rc);
-       PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL3, "---> SSL: Not connected " + ssl_rsn );
+       PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL3,
+           "---> SSL: Not connected " + ssl_rsn);
 
        if ((ssl_rsn == SSL_ERROR_WANT_READ) ||
            (ssl_rsn == SSL_ERROR_WANT_WRITE))
@@ -420,7 +433,8 @@ redo_connect:
     }
     else if (ssl_rc == 0)
     {
-       PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL3, "---> SSL: Shutdown SSL_connect()");
+       PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL3,
+           "---> SSL: Shutdown SSL_connect()");
        PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL3,
            "Error string: " + String(ERR_error_string(ssl_rc, NULL)));
        PEG_METHOD_EXIT();
@@ -430,39 +444,48 @@ redo_connect:
 
     if (_SSLContext->isPeerVerificationEnabled())
     {
-        PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL3, "Attempting to verify server certificate.");
+        PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL3,
+           "Attempting to verify server certificate.");
 
-        X509 * server_cert = SSL_get_peer_certificate(_SSLConnection);
+        X509* server_cert = SSL_get_peer_certificate(_SSLConnection);
         if (server_cert != NULL)
         {
             //
-            // Do not check the verification result using SSL_get_verify_result here to see whether or not to continue.
-            // The prepareForCallback does not reset the verification result, so it will still contain the original error.
-            // If the client chose to override the default error in the callback and return true, we got here and
-            // should proceed with the transaction.  Otherwise, the handshake was already terminated.
+            // Do not check the verification result using
+            // SSL_get_verify_result here to see whether or not to continue.
+            // The prepareForCallback does not reset the verification result,
+            // so it will still contain the original error.  If the client
+            // chose to override the default error in the callback and
+            // return true, we got here and should proceed with the
+            // transaction.  Otherwise, the handshake was already terminated.
             //
 
             if (SSL_get_verify_result(_SSLConnection) == X509_V_OK)
             {
-                 PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL3, "--->SSL: Server Certificate verified.");
+                 PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL3,
+                     "--->SSL: Server Certificate verified.");
             }
             else
             {
-                PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL3, "--->SSL: Server Certificate not verified, but the callback overrode the default error.");
+                PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL3,
+                     "--->SSL: Server Certificate not verified, but the "
+                         "callback overrode the default error.");
             }
 
             X509_free (server_cert);
         }
         else
         {
-            PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL3, "-->SSL: Server not certified, no certificate received.");
+            PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL3,
+                "-->SSL: Server not certified, no certificate received.");
             PEG_METHOD_EXIT();
             return -1;
         }
     }
     else
     {
-        PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL3, "---> SSL: Server certification disabled");
+        PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL3,
+            "---> SSL: Server certification disabled");
     }
 
     PEG_METHOD_EXIT();
@@ -471,7 +494,7 @@ redo_connect:
 
 Boolean SSLSocket::isPeerVerificationEnabled()
 {
-    return (_SSLContext->isPeerVerificationEnabled());
+    return _SSLContext->isPeerVerificationEnabled();
 }
 
 Array<SSLCertificateInfo*> SSLSocket::getPeerCertificateChain()
@@ -538,7 +561,7 @@ Boolean MP_Socket::isSecure() {return _isSecure;}
 Boolean MP_Socket::incompleteReadOccurred(Sint32 retCode)
 {
     if (_isSecure)
-        return(_sslsock->incompleteReadOccurred(retCode));
+        return _sslsock->incompleteReadOccurred(retCode);
     return (retCode <=  0);
 }
 
@@ -594,7 +617,7 @@ Sint32 MP_Socket::accept()
 {
     if (_isSecure)
     {
-        return (_sslsock->accept());
+        return _sslsock->accept();
     }
     return 1;
 }
@@ -610,7 +633,7 @@ Boolean MP_Socket::isPeerVerificationEnabled()
 {
     if (_isSecure)
     {
-        return (_sslsock->isPeerVerificationEnabled());
+        return _sslsock->isPeerVerificationEnabled();
     }
     return false;
 }
@@ -630,7 +653,7 @@ Boolean MP_Socket::isCertificateVerified()
 {
     if (_isSecure)
     {
-        return (_sslsock->isCertificateVerified());
+        return _sslsock->isCertificateVerified();
     }
     return false;
 }
@@ -698,35 +721,35 @@ void MP_Socket::disableBlocking()
     Socket::disableBlocking(_socket);
 }
 
-Sint32 MP_Socket::accept() 
-{ 
+Sint32 MP_Socket::accept()
+{
 #ifndef PEGASUS_OS_ZOS
-    return 1; 
+    return 1;
 #else
-PEG_METHOD_ENTER(TRC_SSL, "MP_Socket::accept()");
-// ****************************************************************************
-// This is a z/OS speciffic section. No other platform can port this.
-// Pegsus on z/OS has no OpenSSL but cat use a transparent layer called
-// AT-TLS ( Applicatin Transparent Transport Layer Security ) to handel 
-// HTTTPS connections.
-// ****************************************************************************
+    PEG_METHOD_ENTER(TRC_SSL, "MP_Socket::accept()");
+    // ************************************************************************
+    // This is a z/OS specific section. No other platform can port this.
+    // Pegasus on z/OS has no OpenSSL but cat use a transparent layer called
+    // AT-TLS ( Applicatin Transparent Transport Layer Security ) to handle
+    // HTTPS connections.
+    // ************************************************************************
 
-int rc;
-
-if(isSecure())
-{
-   PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4, "---> HTTPS processing.");
-   rc = ATTLS_zOS_query();
-} else
-{
-   PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4, "---> Normal HTTP processing.");
-   rc = 1;
-}
-PEG_METHOD_EXIT();
-return rc;
+    int rc;
 
+    if (isSecure())
+    {
+        PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4, "---> HTTPS processing.");
+        rc = ATTLS_zOS_query();
+    }
+    else
+    {
+        PEG_TRACE_STRING(TRC_SSL, Tracer::LEVEL4,
+            "---> Normal HTTP processing.");
+        rc = 1;
+    }
+    PEG_METHOD_EXIT();
+    return rc;
 #endif
-
 }
 
 Sint32 MP_Socket::connect() { return 0; }
@@ -735,10 +758,10 @@ Boolean MP_Socket::isPeerVerificationEnabled() { return false; }
 
 Array<SSLCertificateInfo*> MP_Socket::getPeerCertificateChain()
 {
-//
-//  Return empty array
-//
-return Array<SSLCertificateInfo*>();
+    //
+    //  Return empty array
+    //
+    return Array<SSLCertificateInfo*>();
 }
 
 Boolean MP_Socket::isCertificateVerified() { return false; }
index 7741da8a7af92829d3a5102bc8a9303995add16b..bbc14ebe43c55f39768c705ae6993f33724f21f4 100644 (file)
@@ -186,10 +186,9 @@ public:
 
 #ifdef PEGASUS_OS_ZOS
     // Return the authenicated user name
-    String getAuthenticatedUser(){ return String(_username); }
-    Boolean isClientAuthenticated(){ return _userAuthenticated; }
-#endif 
-
+    String getAuthenticatedUser() { return String(_username); }
+    Boolean isClientAuthenticated() { return _userAuthenticated; }
+#endif
 
     union {
         SocketHandle _socket;
@@ -200,12 +199,12 @@ private:
     Boolean   _isSecure;
     Uint32    _socketWriteTimeout;
 #ifdef PEGASUS_OS_ZOS
-    
+
     int ATTLS_zOS_query();
     // The user name if authenticated through ATTLS.
     char _username[10];
     Boolean _userAuthenticated;
-#endif 
+#endif
 
 };
 
index 85495d90ffcfa168303760a8c3036f526edf6b95..ce4df189eaf4ceaa6676d747ed6b22e47ac1c9e5 100644 (file)
@@ -29,8 +29,6 @@
 //
 //==============================================================================
 //
-// Author: Mike Brasher (m.brasher@inovadevelopment.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include "TSDKey.h"
index ad361bc2b59ab96e413316c86dff218e7a29acf2..dbf5d78a15e5867f77703c9c033d7143a89acc19 100644 (file)
@@ -29,8 +29,6 @@
 //
 //==============================================================================
 //
-// Author: Mike Brasher (m.brasher@inovadevelopment.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_TSDKey_h
index 642966bb9c0e0ee948498c6cac2b3d6b506b4d3d..0d26fd4fc0edcc41e650b21a96d62e379ccfd25a 100644 (file)
@@ -80,7 +80,7 @@ void Thread::test_cancel()
 #endif
 }
 
-Boolean Thread::is_cancelled(void)
+Boolean Thread::is_cancelled()
 {
     return _cancelled;
 }
@@ -114,7 +114,7 @@ void Thread::sleep(Uint32 msec)
     Threads::sleep(msec);
 }
 
-void Thread::join(void)
+void Thread::join()
 {
     if (!_is_detached && !Threads::null(_handle.thid))
         pthread_join(_handle.thid.thread, &_exit_code);
@@ -122,7 +122,7 @@ void Thread::join(void)
     Threads::clear(_handle.thid);
 }
 
-void Thread::thread_init(void)
+void Thread::thread_init()
 {
 #if defined(PEGASUS_PLATFORM_ZOS_ZSERIES_IBM)
     pthread_setintr(PTHREAD_INTR_ENABLE);
@@ -134,7 +134,7 @@ void Thread::thread_init(void)
     _cancel_enabled = true;
 }
 
-void Thread::detach(void)
+void Thread::detach()
 {
     _is_detached = true;
 #if defined(PEGASUS_PLATFORM_ZOS_ZSERIES_IBM)
@@ -154,9 +154,9 @@ ThreadStatus Thread::run()
     Threads::Type type = _is_detached ? Threads::DETACHED : Threads::JOINABLE;
     int rc = Threads::create(_handle.thid, type, _start_wrapper, arg);
 
-    // On Linux distributions released prior 2005, the implementation of 
+    // On Linux distributions released prior 2005, the implementation of
     // Native POSIX Thread Library returns ENOMEM instead of EAGAIN when
-    // there 
+    // there
     // are no insufficient memory.  Hence we are checking for both.  See bug
     // 386.
 
@@ -208,10 +208,18 @@ static sigset_t *block_signal_mask(sigset_t * sig)
     return sig;
 }
 
-Thread::Thread(ThreadReturnType(PEGASUS_THREAD_CDECL * start) (void *), void *parameter, Boolean detached):_is_detached(detached),
-_cancel_enabled(true),
-_cancelled(false),
-_start(start), _cleanup(), _tsd(), _thread_parm(parameter), _exit_code(0)
+Thread::Thread(
+    ThreadReturnType(PEGASUS_THREAD_CDECL* start) (void*),
+    void* parameter,
+    Boolean detached)
+    : _is_detached(detached),
+      _cancel_enabled(true),
+      _cancelled(false),
+      _start(start),
+      _cleanup(),
+      _tsd(),
+      _thread_parm(parameter),
+      _exit_code(0)
 {
     Threads::clear(_handle.thid);
 }
@@ -223,7 +231,7 @@ Thread::~Thread()
         join();
         empty_tsd();
     }
-    catch(...)
+    catch (...)
     {
         // Do not allow the destructor to throw an exception
     }
@@ -239,7 +247,7 @@ Thread::~Thread()
 
 #if defined(PEGASUS_HAVE_WINDOWS_THREADS)
 
-ThreadStatus Thread::run(void)
+ThreadStatus Thread::run()
 {
     // Note: A Win32 thread ID is not the same thing as a pthread ID.
     // Win32 threads have both a thread ID and a handle.  The handle
@@ -266,12 +274,12 @@ ThreadStatus Thread::run(void)
     return PEGASUS_THREAD_OK;
 }
 
-void Thread::cancel(void)
+void Thread::cancel()
 {
     _cancelled = true;
 }
 
-void Thread::test_cancel(void)
+void Thread::test_cancel()
 {
     if (_cancel_enabled && _cancelled)
     {
@@ -279,12 +287,12 @@ void Thread::test_cancel(void)
     }
 }
 
-Boolean Thread::is_cancelled(void)
+Boolean Thread::is_cancelled()
 {
     return _cancelled;
 }
 
-void Thread::thread_switch(void)
+void Thread::thread_switch()
 {
     Sleep(0);
 }
@@ -294,7 +302,7 @@ void Thread::sleep(Uint32 milliseconds)
     Sleep(milliseconds);
 }
 
-void Thread::join(void)
+void Thread::join()
 {
     if (!Threads::null(_handle.thid))
     {
@@ -309,7 +317,7 @@ void Thread::join(void)
             else
             {
                 // Currently this is the only way to ensure this code does
-                // not 
+                // not
                 // hang forever.
                 if (WaitForSingleObject(_handle.thid.handle, 10000) ==
                     WAIT_TIMEOUT)
@@ -328,12 +336,12 @@ void Thread::join(void)
     }
 }
 
-void Thread::thread_init(void)
+void Thread::thread_init()
 {
     _cancel_enabled = true;
 }
 
-void Thread::detach(void)
+void Thread::detach()
 {
     _is_detached = true;
 }
@@ -355,7 +363,7 @@ Thread::~Thread()
         join();
         empty_tsd();
     }
-    catch(...)
+    catch (...)
     {
     }
 }
@@ -407,7 +415,7 @@ void Thread::cleanup_pop(Boolean execute)
     {
         cu.reset(_cleanup.remove_front());
     }
-    catch(IPCException &)
+    catch (IPCException &)
     {
         PEGASUS_ASSERT(0);
     }
@@ -416,9 +424,6 @@ void Thread::cleanup_pop(Boolean execute)
 }
 
 
-//thread_data *Thread::put_tsd(const Sint8 *key, void (*delete_func)(void *), Uint32 size, void *value)
-
-
 void Thread::exit_self(ThreadReturnType exit_code)
 {
 #ifndef PEGASUS_PLATFORM_AIX_RS_IBMCXX
@@ -431,7 +436,7 @@ void Thread::exit_self(ThreadReturnType exit_code)
         {
             cleanup_pop(true);
         }
-        catch(IPCException &)
+        catch (IPCException &)
         {
             PEGASUS_ASSERT(0);
             break;
@@ -520,7 +525,7 @@ AcceptLanguageList *Thread::getLanguages()
     return acceptLangs;
 }
 
-void Thread::setLanguages(AcceptLanguageList * langs)   // l10n
+void Thread::setLanguages(AcceptLanguageList * langs)
 {
     PEG_METHOD_ENTER(TRC_THREAD, "Thread::setLanguages");
 
@@ -536,7 +541,7 @@ void Thread::setLanguages(AcceptLanguageList * langs)   // l10n
     PEG_METHOD_EXIT();
 }
 
-void Thread::clearLanguages()   // l10n
+void Thread::clearLanguages()
 {
     PEG_METHOD_ENTER(TRC_THREAD, "Thread::clearLanguages");
 
index 1833da3fb82a29684f130d53441451707b3cf2b9..72c929b6dcc5365d2601051d0b69d6b248b6d55f 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Day (mdday@us.ibm.com)
-//
-// Modified By: Markus Mueller
-//              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//              Amit K Arora, IBM (amita@in.ibm.com) for PEP#101
-//              David Dillard, VERITAS Software Corp.
-//                  (david.dillard@veritas.com)
-//              Sean Keenan, Hewlett-Packard Company (sean.keenan@hp.com)
-//              Josephine Eskaline Joyce, IBM (jojustin@in.ibm.com) for Bug#2393
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_Thread_h
@@ -61,7 +51,7 @@
 # include <signal.h>
 #endif
 
-PEGASUS_NAMESPACE_BEGIN 
+PEGASUS_NAMESPACE_BEGIN
 
 class PEGASUS_COMMON_LINKAGE cleanup_handler : public Linkable
 {
@@ -81,8 +71,8 @@ private:
         _routine(_arg);
     }
 
-    cleanup_handler(); 
-    
+    cleanup_handler();
+
     void (*_routine)(void*);
     void *_arg;
 
@@ -117,8 +107,8 @@ public:
         _data =::operator  new(_size);
     }
 
-    thread_data(const char *key, size_t size, void *data) : 
-        _delete_func(default_delete), _size(size)
+    thread_data(const char *key, size_t size, void *data)
+        _delete_func(default_delete), _size(size)
     {
         PEGASUS_ASSERT(key != NULL);
         PEGASUS_ASSERT(data != NULL);
@@ -153,7 +143,7 @@ public:
      *
      * @exception NullPointer
     */
-    void put_data(void (*del) (void *), size_t size, void *data)
+    void put_data(void (*del) (void *), size_t size, voiddata)
     {
         if (_data != NULL)
             if (_delete_func != NULL)
@@ -170,63 +160,60 @@ public:
         return _size;
     }
 
-      /**
-       * This function is used to retrieve data from the
-       * TSD, the thread specific data.
-       *
-       * Be aware that there is NOTHING in place to stop
-       * other users of the thread to change the data you
-       * get from this function.
-       *
-       * You, the developer has to make sure that there are
-       * no situations in which this can arise (ie, have a
-       * lock for the function which manipulates the TSD.
-       */
-    void get_data(void **data, size_t * size)
+    /**
+        This function is used to retrieve data from the
+        TSD, the thread specific data.
+
+        Be aware that there is NOTHING in place to stop
+        other users of the thread to change the data you
+        get from this function.
+
+        You, the developer has to make sure that there are
+        no situations in which this can arise (ie, have a
+        lock for the function which manipulates the TSD.
+     */
+    void get_data(void** data, size_t* size)
     {
         if (data == NULL || size == NULL)
             throw NullPointer();
 
         *data = _data;
         *size = _size;
-        return;
-
     }
 
     // @exception NullPointer
-    void copy_data(void **buf, size_t * size)
+    void copy_data(void** buf, size_t* size)
     {
         if ((buf == NULL) || (size == NULL))
             throw NullPointer();
         *buf =::operator  new(_size);
         *size = _size;
         memcpy(*buf, _data, _size);
-        return;
     }
 
-    inline Boolean operator==(const void *key) const
+    inline Boolean operator==(const voidkey) const
     {
         if (!strcmp(_key.get(), reinterpret_cast < const char *>(key)))
-              return (true);
-          return (false);
+            return true;
+        return false;
     }
 
-    inline Boolean operator==(const thread_data & b) const
+    inline Boolean operator==(const thread_data& b) const
     {
-        return (operator==(b._key.get()));
+        return operator==(b._key.get());
     }
 
-    static bool equal(const thread_data * node, const void *key)
+    static bool equal(const thread_data* node, const void* key)
     {
         return ((thread_data *) node)->operator==(key);
     }
 
   private:
-    void (*_delete_func) (void *data);
+    void (*_delete_func) (voiddata);
     thread_data();
-    void *_data;
+    void_data;
     size_t _size;
-    AutoArrayPtr < char >_key;
+    AutoArrayPtr<char> _key;
 
     friend class Thread;
 };
@@ -238,7 +225,7 @@ enum ThreadStatus
     PEGASUS_THREAD_INSUFFICIENT_RESOURCES,      /* Can't allocate a thread.
                                                    Not enough memory. Try
                                                    again later */
-    PEGASUS_THREAD_SETUP_FAILURE,       /* Could not allocate into the thread 
+    PEGASUS_THREAD_SETUP_FAILURE,       /* Could not allocate into the thread
                                            specific data storage. */
     PEGASUS_THREAD_UNAVAILABLE  /* Service is being destroyed and no new
                                    threads can be provided. */
@@ -246,20 +233,22 @@ enum ThreadStatus
 
 ///////////////////////////////////////////////////////////////////////////
 
-class PEGASUS_COMMON_LINKAGE Thread:public Linkable
+class PEGASUS_COMMON_LINKAGE Thread : public Linkable
 {
-  public:
+public:
 
-    Thread(ThreadReturnType(PEGASUS_THREAD_CDECL * start) (void *),
-           void *parameter, Boolean detached);
+    Thread(
+        ThreadReturnType(PEGASUS_THREAD_CDECL* start) (void*),
+        void* parameter,
+        Boolean detached);
 
      ~Thread();
 
       /** Start the thread.
-          @return PEGASUS_THREAD_OK if the thread is started successfully, 
-          PEGASUS_THREAD_INSUFFICIENT_RESOURCES if the resources necessary 
-          to start the thread are not currently available.  
-         PEGASUS_THREAD_SETUP_FAILURE if the thread could not
+          @return PEGASUS_THREAD_OK if the thread is started successfully,
+          PEGASUS_THREAD_INSUFFICIENT_RESOURCES if the resources necessary
+          to start the thread are not currently available.
+          PEGASUS_THREAD_SETUP_FAILURE if the thread could not
           be create properly - check the 'errno' value for specific operating
           system return code.
        */
@@ -312,16 +301,16 @@ class PEGASUS_COMMON_LINKAGE Thread:public Linkable
     // stack of functions to be called when thread terminates
     // will be called last in first out (LIFO)
     // @exception IPCException
-    void cleanup_push(void (*routine) (void *), void *parm);
+    void cleanup_push(void (*routine) (void *), voidparm);
 
     // @exception IPCException
     void cleanup_pop(Boolean execute = true);
 
     // create and initialize a tsd
     // @exception IPCException
-    inline void create_tsd(const char *key, int size, void *buffer)
+    inline void create_tsd(const char* key, int size, void* buffer)
     {
-        AutoPtr < thread_data > tsd(new thread_data(key, size, buffer));
+        AutoPtr<thread_data> tsd(new thread_data(key, size, buffer));
         _tsd.insert_front(tsd.get());
         tsd.release();
     }
@@ -329,14 +318,14 @@ class PEGASUS_COMMON_LINKAGE Thread:public Linkable
     // get the buffer associated with the key
     // NOTE: this call leaves the tsd LOCKED !!!!
     // @exception IPCException
-    inline void *reference_tsd(const char *key)
+    inline void *reference_tsd(const charkey)
     {
         _tsd.lock();
         thread_data *tsd = _tsd.find(thread_data::equal, key);
         if (tsd != NULL)
-            return ((void *) (tsd->_data));
+            return (void *) (tsd->_data);
         else
-            return (NULL);
+            return NULL;
     }
 
     // @exception IPCException
@@ -345,9 +334,9 @@ class PEGASUS_COMMON_LINKAGE Thread:public Linkable
         _tsd.try_lock();
         thread_data *tsd = _tsd.find(thread_data::equal, key);
         if (tsd != NULL)
-            return ((void *) (tsd->_data));
+            return (void *) (tsd->_data);
         else
-            return (NULL);
+            return NULL;
     }
 
 
@@ -375,28 +364,24 @@ class PEGASUS_COMMON_LINKAGE Thread:public Linkable
     // create or re-initialize tsd associated with the key
     // if the tsd already exists, delete the existing buffer
     // @exception IPCException
-    void put_tsd(const char *key, void (*delete_func) (void *), Uint32 size,
-                 void *value)
+    void put_tsd(
+        const char* key,
+        void (*delete_func) (void *),
+        Uint32 size,
+        void* value)
     {
         PEGASUS_ASSERT(key != NULL);
-        AutoPtr < thread_data > tsd;
-        tsd.reset(_tsd.remove(thread_data::equal, key));        // may throw
-                                                                // an IPC
-                                                                // exception
+        AutoPtr<thread_data> tsd;
+        // This may throw an IPCException
+        tsd.reset(_tsd.remove(thread_data::equal, key));
         tsd.reset();
-        AutoPtr < thread_data > ntsd(new thread_data(key));
+        AutoPtr<thread_data> ntsd(new thread_data(key));
         ntsd->put_data(delete_func, size, value);
-        try
-        {
-            _tsd.insert_front(ntsd.get());
-        }
-        catch(IPCException & e)
-        {
-            e = e;
-            throw;
-        }
+        // This may throw an IPCException
+        _tsd.insert_front(ntsd.get());
         ntsd.release();
     }
+
     inline ThreadReturnType get_exit()
     {
         return _exit_code;
@@ -413,54 +398,55 @@ class PEGASUS_COMMON_LINKAGE Thread:public Linkable
 
     void detach();
 
-    // 
+    //
     // Gets the Thread object associated with the caller's thread.
     // Note: this may return NULL if no Thread object is associated
     // with the caller's thread.
-    // 
-    static Thread *getCurrent();        // l10n
+    //
+    static Thread *getCurrent();
 
-    // 
+    //
     // Sets the Thread object associated with the caller's thread.
     // Note: the Thread object must be placed on the heap.
-    // 
-    static void setCurrent(Thread * thrd);      // l10n
+    //
+    static void setCurrent(Thread* thrd);
 
-    // 
+    //
     // Gets the AcceptLanguageList object associated with the caller's
     // Thread.
     // Note: this may return NULL if no Thread object, or no
     // AcceptLanguageList object, is associated with the caller's thread.
-    // 
-    static AcceptLanguageList *getLanguages();  // l10n
+    //
+    static AcceptLanguageList* getLanguages();
 
-    // 
+    //
     // Sets the AcceptLanguageList object associated with the caller's
     // Thread.
     // Note: a Thread object must have been previously associated with
     // the caller's thread.
     // Note: the AcceptLanguageList object must be placed on the heap.
-    // 
-    static void setLanguages(AcceptLanguageList * langs);       // l10n
+    //
+    static void setLanguages(AcceptLanguageList* langs);
 
-    // 
+    //
     // Removes the AcceptLanguageList object associated with the caller's
     // Thread.
-    // 
-    static void clearLanguages();       // l10n
+    //
+    static void clearLanguages();
 
-  private:
+private:
     Thread();
 
-    static Sint8 initializeKey();       // l10n
+    static Sint8 initializeKey();
 
     // @exception IPCException
     inline void create_tsd(const char *key)
     {
-        AutoPtr < thread_data > tsd(new thread_data(key));
+        AutoPtr<thread_data> tsd(new thread_data(key));
         _tsd.insert_front(tsd.get());
         tsd.release();
     }
+
     ThreadHandle _handle;
     Boolean _is_detached;
     Boolean _cancel_enabled;
@@ -469,16 +455,16 @@ class PEGASUS_COMMON_LINKAGE Thread:public Linkable
     // always pass this * as the void * parameter to the thread
     // store the user parameter in _thread_parm
 
-    ThreadReturnType(PEGASUS_THREAD_CDECL * _start) (void *);
-    List < cleanup_handler, Mutex > _cleanup;
-    List < thread_data, Mutex > _tsd;
+    ThreadReturnType(PEGASUS_THREAD_CDECL* _start) (void *);
+    List<cleanup_handler, Mutex> _cleanup;
+    List<thread_data, Mutex> _tsd;
 
-    void *_thread_parm;
+    void_thread_parm;
     ThreadReturnType _exit_code;
     static Boolean _signals_blocked;
-    static TSDKeyType _platform_thread_key;     // l10n
-    static Boolean _key_initialized;    // l10n
-    static Boolean _key_error;  // l10n
+    static TSDKeyType _platform_thread_key;
+    static Boolean _key_initialized;
+    static Boolean _key_error;
 };
 
 PEGASUS_NAMESPACE_END
index d07dba3b8a35d3011985c470cf3672771449440e..ca76a9407a224851bda3b0cadf0a088235274116 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Day (mdday@us.ibm.com)
-//
-// Modified By: Rudy Schuet (rudy.schuet@compaq.com) 11/12/01
-//              added nsk platform support
-//              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//              Amit K Arora, IBM (amita@in.ibm.com) for PEP#101
-//              Sean Keenan, Hewlett-Packard Company (sean.keenan@hp.com)
-//              David Dillard, VERITAS Software Corp.
-//                  (david.dillard@veritas.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include "ThreadPool.h"
@@ -57,14 +47,19 @@ PEGASUS_NAMESPACE_BEGIN
 //
 ///////////////////////////////////////////////////////////////////////////////
 
-ThreadPool::ThreadPool(Sint16 initialSize,
-                       const char *key,
-                       Sint16 minThreads,
-                       Sint16 maxThreads,
-                       struct timeval
-                       &deallocateWait):_maxThreads(maxThreads),
-_minThreads(minThreads), _currentThreads(0), _idleThreads(),
-_runningThreads(), _dying(0)
+ThreadPool::ThreadPool(
+    Sint16 initialSize,
+    const char* key,
+    Sint16 minThreads,
+    Sint16 maxThreads,
+    struct timeval
+    &deallocateWait)
+    : _maxThreads(maxThreads),
+      _minThreads(minThreads),
+      _currentThreads(0),
+      _idleThreads(),
+      _runningThreads(),
+      _dying(0)
 {
     _deallocateWait.tv_sec = deallocateWait.tv_sec;
     _deallocateWait.tv_usec = deallocateWait.tv_usec;
@@ -101,11 +96,11 @@ ThreadPool::~ThreadPool()
         // entered
         _dying++;
         Tracer::trace(TRC_THREAD, Tracer::LEVEL2,
-                      "Cleaning up %d idle threads. ", _currentThreads.get());
+            "Cleaning up %d idle threads.", _currentThreads.get());
 
         while (_currentThreads.get() > 0)
         {
-            Thread *thread = _idleThreads.remove_front();
+            Threadthread = _idleThreads.remove_front();
             if (thread != 0)
             {
                 _cleanupThread(thread);
@@ -117,12 +112,12 @@ ThreadPool::~ThreadPool()
             }
         }
     }
-    catch(...)
+    catch (...)
     {
     }
 }
 
-ThreadReturnType PEGASUS_THREAD_CDECL ThreadPool::_loop(void *parm)
+ThreadReturnType PEGASUS_THREAD_CDECL ThreadPool::_loop(voidparm)
 {
     PEG_METHOD_ENTER(TRC_THREAD, "ThreadPool::_loop");
 
@@ -153,16 +148,16 @@ ThreadReturnType PEGASUS_THREAD_CDECL ThreadPool::_loop(void *parm)
             myself->dereference_tsd();
             PEGASUS_ASSERT(lastActivityTime != 0);
         }
-        catch(...)
+        catch (...)
         {
             Tracer::trace(TRC_DISCARDED_DATA, Tracer::LEVEL2,
-                          "ThreadPool::_loop: Failure getting sleep_sem or "
-                          "lastActivityTime.");
+                "ThreadPool::_loop: Failure getting sleep_sem or "
+                    "lastActivityTime.");
             PEGASUS_ASSERT(false);
             pool->_idleThreads.remove(myself);
             pool->_currentThreads--;
             PEG_METHOD_EXIT();
-            return ((ThreadReturnType) 1);
+            return (ThreadReturnType) 1;
         }
 
         while (1)
@@ -171,15 +166,15 @@ ThreadReturnType PEGASUS_THREAD_CDECL ThreadPool::_loop(void *parm)
             {
                 sleep_sem->wait();
             }
-            catch(...)
+            catch (...)
             {
                 Tracer::trace(TRC_DISCARDED_DATA, Tracer::LEVEL2,
-                              "ThreadPool::_loop: failure on sleep_sem->wait().");
+                    "ThreadPool::_loop: failure on sleep_sem->wait().");
                 PEGASUS_ASSERT(false);
                 pool->_idleThreads.remove(myself);
                 pool->_currentThreads--;
                 PEG_METHOD_EXIT();
-                return ((ThreadReturnType) 1);
+                return (ThreadReturnType) 1;
             }
 
             // When we awaken we reside on the _runningThreads queue, not the
@@ -200,22 +195,23 @@ ThreadReturnType PEGASUS_THREAD_CDECL ThreadPool::_loop(void *parm)
                     (Semaphore *) myself->reference_tsd("blocking sem");
                 myself->dereference_tsd();
             }
-            catch(...)
+            catch (...)
             {
                 Tracer::trace(TRC_DISCARDED_DATA, Tracer::LEVEL2,
-                              "ThreadPool::_loop: Failure accessing work func, work parm, "
-                              "or blocking sem.");
+                    "ThreadPool::_loop: Failure accessing work func, work "
+                        "parm, or blocking sem.");
                 PEGASUS_ASSERT(false);
                 pool->_idleThreads.remove(myself);
                 pool->_currentThreads--;
                 PEG_METHOD_EXIT();
-                return ((ThreadReturnType) 1);
+                return (ThreadReturnType) 1;
             }
 
             if (work == 0)
             {
                 Tracer::trace(TRC_THREAD, Tracer::LEVEL4,
-                              "ThreadPool::_loop: work func is 0, meaning we should exit.");
+                    "ThreadPool::_loop: work func is 0, meaning we should "
+                        "exit.");
                 break;
             }
 
@@ -229,26 +225,24 @@ ThreadReturnType PEGASUS_THREAD_CDECL ThreadPool::_loop(void *parm)
                 PEG_TRACE_STRING(TRC_THREAD, Tracer::LEVEL4,
                                  "Work finished.");
             }
-            catch(Exception & e)
+            catch (Exception& e)
             {
                 PEG_TRACE_STRING(TRC_DISCARDED_DATA, Tracer::LEVEL2,
-                                 String
-                                 ("Exception from work in ThreadPool::_loop: ")
-                                 + e.getMessage());
+                    String("Exception from work in ThreadPool::_loop: ") +
+                        e.getMessage());
             }
 #if !defined(PEGASUS_OS_LSB)
-            catch(const exception & e)
+            catch (const exception& e)
             {
                 PEG_TRACE_STRING(TRC_DISCARDED_DATA, Tracer::LEVEL2,
-                                 String
-                                 ("Exception from work in ThreadPool::_loop: ")
-                                 + e.what());
+                    String("Exception from work in ThreadPool::_loop: ") +
+                        e.what());
             }
 #endif
-            catch(...)
+            catch (...)
             {
                 PEG_TRACE_STRING(TRC_DISCARDED_DATA, Tracer::LEVEL2,
-                                 "Unknown exception from work in ThreadPool::_loop.");
+                    "Unknown exception from work in ThreadPool::_loop.");
             }
 
             // put myself back onto the available list
@@ -263,38 +257,36 @@ ThreadReturnType PEGASUS_THREAD_CDECL ThreadPool::_loop(void *parm)
                 pool->_runningThreads.remove(myself);
                 pool->_idleThreads.insert_front(myself);
             }
-            catch(...)
+            catch (...)
             {
                 Tracer::trace(TRC_DISCARDED_DATA, Tracer::LEVEL2,
-                              "ThreadPool::_loop: Adding thread to idle pool failed.");
+                    "ThreadPool::_loop: Adding thread to idle pool failed.");
                 PEGASUS_ASSERT(false);
                 pool->_currentThreads--;
                 PEG_METHOD_EXIT();
-                return ((ThreadReturnType) 1);
+                return (ThreadReturnType) 1;
             }
         }
     }
-    catch(const Exception & e)
+    catch (const Exception & e)
     {
         PEG_TRACE_STRING(TRC_DISCARDED_DATA, Tracer::LEVEL2,
-                         "Caught exception: \"" + e.getMessage() +
-                         "\".  Exiting _loop.");
+            "Caught exception: \"" + e.getMessage() + "\".  Exiting _loop.");
     }
-    catch(...)
+    catch (...)
     {
         PEG_TRACE_STRING(TRC_DISCARDED_DATA, Tracer::LEVEL2,
-                         "Caught unrecognized exception.  Exiting _loop.");
+            "Caught unrecognized exception.  Exiting _loop.");
     }
 
     PEG_METHOD_EXIT();
-    return ((ThreadReturnType) 0);
+    return (ThreadReturnType) 0;
 }
 
-ThreadStatus ThreadPool::allocate_and_awaken(void *parm,
-                                             ThreadReturnType
-                                             (PEGASUS_THREAD_CDECL *
-                                              work) (void *),
-                                             Semaphore * blocking)
+ThreadStatus ThreadPool::allocate_and_awaken(
+    void* parm,
+    ThreadReturnType (PEGASUS_THREAD_CDECL* work) (void*),
+    Semaphore* blocking)
 {
     PEG_METHOD_ENTER(TRC_THREAD, "ThreadPool::allocate_and_awaken");
 
@@ -307,7 +299,7 @@ ThreadStatus ThreadPool::allocate_and_awaken(void *parm,
         if (_dying.get())
         {
             Tracer::trace(TRC_DISCARDED_DATA, Tracer::LEVEL2,
-                          "ThreadPool::allocate_and_awaken: ThreadPool is dying(1).");
+                "ThreadPool::allocate_and_awaken: ThreadPool is dying(1).");
             return PEGASUS_THREAD_UNAVAILABLE;
         }
         struct timeval start;
@@ -336,8 +328,8 @@ ThreadStatus ThreadPool::allocate_and_awaken(void *parm,
 
         // initialize the thread data with the work function and parameters
         Tracer::trace(TRC_THREAD, Tracer::LEVEL4,
-                      "Initializing thread with work function and parameters: parm = %p",
-                      parm);
+            "Initializing thread with work function and parameters: parm = %p",
+            parm);
 
         th->delete_tsd("work func");
         th->put_tsd("work func", NULL,
@@ -360,7 +352,7 @@ ThreadStatus ThreadPool::allocate_and_awaken(void *parm,
         sleep_sem->signal();
         th->dereference_tsd();
     }
-    catch(...)
+    catch (...)
     {
         Tracer::trace(TRC_DISCARDED_DATA, Tracer::LEVEL2,
                       "ThreadPool::allocate_and_awaken: Operation Failed.");
@@ -407,7 +399,7 @@ Uint32 ThreadPool::cleanupIdleThreads()
                 try_reference_tsd("last activity time");
             PEGASUS_ASSERT(lastActivityTime != 0);
         }
-        catch(...)
+        catch (...)
         {
             PEGASUS_ASSERT(false);
             _idleThreads.insert_back(thread);
@@ -458,8 +450,9 @@ void ThreadPool::_cleanupThread(Thread * thread)
     PEG_METHOD_EXIT();
 }
 
-Boolean ThreadPool::_timeIntervalExpired(struct timeval *start,
-                                         struct timeval *interval)
+Boolean ThreadPool::_timeIntervalExpired(
+    struct timeval* start,
+    struct timeval* interval)
 {
     // never time out if the interval is zero
     if (interval && (interval->tv_sec == 0) && (interval->tv_usec == 0))
@@ -496,21 +489,24 @@ Thread *ThreadPool::_initializeThread()
     // initial count is zero, loop function will sleep until
     // we signal the semaphore
     Semaphore *sleep_sem = (Semaphore *) new Semaphore(0);
-    th->put_tsd("sleep sem", &_deleteSemaphore, sizeof (Semaphore),
-                (void *) sleep_sem);
+    th->put_tsd(
+        "sleep sem", &_deleteSemaphore, sizeof(Semaphore), (void*) sleep_sem);
 
-    struct timeval *lastActivityTime =
+    struct timevallastActivityTime =
         (struct timeval *)::operator  new(sizeof (struct timeval));
     Time::gettimeofday(lastActivityTime);
 
-    th->put_tsd("last activity time", thread_data::default_delete,
-                sizeof (struct timeval), (void *) lastActivityTime);
+    th->put_tsd(
+        "last activity time",
+        thread_data::default_delete,
+        sizeof(struct timeval),
+        (void*) lastActivityTime);
     // thread will enter _loop() and sleep on sleep_sem until we signal it
 
     if (th->run() != PEGASUS_THREAD_OK)
     {
         Tracer::trace(TRC_THREAD, Tracer::LEVEL2,
-                      "Could not create thread. Error code is %d.", errno);
+            "Could not create thread. Error code is %d.", errno);
         delete th;
         return 0;
     }
@@ -526,7 +522,7 @@ void ThreadPool::_addToIdleThreadsQueue(Thread * th)
     if (th == 0)
     {
         Tracer::trace(TRC_DISCARDED_DATA, Tracer::LEVEL2,
-                      "ThreadPool::_addToIdleThreadsQueue: Thread pointer is null.");
+            "ThreadPool::_addToIdleThreadsQueue: Thread pointer is null.");
         throw NullPointer();
     }
 
@@ -534,11 +530,11 @@ void ThreadPool::_addToIdleThreadsQueue(Thread * th)
     {
         _idleThreads.insert_front(th);
     }
-    catch(...)
+    catch (...)
     {
         Tracer::trace(TRC_DISCARDED_DATA, Tracer::LEVEL2,
-                      "ThreadPool::_addToIdleThreadsQueue: _idleThreads.insert_front "
-                      "failed.");
+            "ThreadPool::_addToIdleThreadsQueue: _idleThreads.insert_front "
+                "failed.");
     }
 }
 
index 22ccc9e7d3e4d9a638719ce9c78094cf2b74c8e5..7c76763ba0b499e0eed298f0871f743f48fa4048 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Day (mdday@us.ibm.com)
-//
-// Modified By: Markus Mueller
-//              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//              Amit K Arora, IBM (amita@in.ibm.com) for PEP#101
-//              David Dillard, VERITAS Software Corp.
-//                  (david.dillard@veritas.com)
-//              Sean Keenan, Hewlett-Packard Company (sean.keenan@hp.com)
-//              Josephine Eskaline Joyce, IBM (jojustin@in.ibm.com) for Bug#2393
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_ThreadPool_h
@@ -48,7 +38,7 @@
 #include <Pegasus/Common/Linkage.h>
 #include <Pegasus/Common/Thread.h>
 
-PEGASUS_NAMESPACE_BEGIN 
+PEGASUS_NAMESPACE_BEGIN
 
 class PEGASUS_COMMON_LINKAGE ThreadPool
 {
@@ -68,10 +58,12 @@ public:
         @param deallocateWait The minimum time that a thread should be idle
             before it is removed from the pool and cleaned up.
      */
-    ThreadPool(Sint16 initialSize,
-               const char *key,
-               Sint16 minThreads,
-               Sint16 maxThreads, struct timeval &deallocateWait);
+    ThreadPool(
+        Sint16 initialSize,
+        const char* key,
+        Sint16 minThreads,
+        Sint16 maxThreads,
+        struct timeval& deallocateWait);
 
     /**
         Destructs the ThreadPool object.
@@ -86,8 +78,8 @@ public:
         @param blocking A pointer to an optional semaphore which, if
                         specified, is signaled after the thread finishes
                         executing the work function
-        @return PEGASUS_THREAD_OK if the thread is started successfully, 
-               PEGASUS_THREAD_INSUFFICIENT_RESOURCES  if the
+        @return PEGASUS_THREAD_OK if the thread is started successfully,
+                PEGASUS_THREAD_INSUFFICIENT_RESOURCES  if the
                 resources necessary to start the thread are not currently
                 available.  PEGASUS_THREAD_SETUP_FAILURE if the thread
                 could not be setup properly. PEGASUS_THREAD_UNAVAILABLE
@@ -95,10 +87,10 @@ public:
                 be allocated.
         @exception IPCException
      */
-    ThreadStatus allocate_and_awaken(void *parm,
-                                     ThreadReturnType(PEGASUS_THREAD_CDECL *
-                                                      work) (void *),
-                                     Semaphore * blocking = 0);
+    ThreadStatus allocate_and_awaken(
+        void* parm,
+        ThreadReturnType(PEGASUS_THREAD_CDECL* work) (void*),
+        Semaphore* blocking = 0);
 
     /**
         Cleans up idle threads if they have been running longer than the
@@ -109,7 +101,7 @@ public:
      */
     Uint32 cleanupIdleThreads();
 
-    void get_key(Sint8 * buf, int bufsize);
+    void get_key(Sint8* buf, int bufsize);
 
     inline void setMinThreads(Sint16 min)
     {
@@ -149,22 +141,23 @@ private:
 
     static ThreadReturnType PEGASUS_THREAD_CDECL _loop(void *);
 
-    static Boolean _timeIntervalExpired(struct timeval *start,
-                                        struct timeval *interval);
+    static Boolean _timeIntervalExpired(
+        struct timeval* start,
+        struct timeval* interval);
 
-    static void _deleteSemaphore(void *p);
+    static void _deleteSemaphore(voidp);
 
-    void _cleanupThread(Thread * thread);
-    Thread *_initializeThread();
-    void _addToIdleThreadsQueue(Thread * th);
+    void _cleanupThread(Thread* thread);
+    Thread_initializeThread();
+    void _addToIdleThreadsQueue(Thread* th);
 
     Sint16 _maxThreads;
     Sint16 _minThreads;
     AtomicInt _currentThreads;
     struct timeval _deallocateWait;
     char _key[17];
-    List < Thread, Mutex > _idleThreads;
-    List < Thread, Mutex > _runningThreads;
+    List<Thread, Mutex> _idleThreads;
+    List<Thread, Mutex> _runningThreads;
     AtomicInt _dying;
 };
 
index 0d4ed38c115e74a65773e10185d2503c5cd1da61..26df376627d0377d4b624b170c9ecd06816c9d84 100644 (file)
@@ -29,8 +29,6 @@
 //
 //==============================================================================
 //
-// Author: Mike Brasher (m.brasher@inovadevelopment.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include <errno.h>
@@ -64,7 +62,7 @@ void Threads::sleep(int msec)
    else
    {
        loop = microsecs / 1000000;
-       for(int i = 0; i < loop; i++)
+       for (int i = 0; i < loop; i++)
            usleep(1000000);
        if ((loop*1000000) < microsecs)
            usleep(microsecs - (loop*1000000));
@@ -73,7 +71,7 @@ void Threads::sleep(int msec)
 #elif defined(PEGASUS_PLATFORM_WIN32_IX86_MSVC)
 
     if (msec == 0)
-    {         
+    {
         Sleep(0);
         return;
     }
@@ -88,8 +86,8 @@ void Threads::sleep(int msec)
     {
         Sleep(0);
         _ftime(&now);
-    } 
-    whileend.millitm > now.millitm && end.time >= now.time);
+    }
+    while (end.millitm > now.millitm && end.time >= now.time);
 
 #elif defined(PEGASUS_PLATFORM_ZOS_ZSERIES_IBM)
     int seconds;
@@ -158,20 +156,20 @@ static inline int _get_stack_multiplier()
     static int _multiplier = 0;
     static MutexType _multiplier_mutex = PEGASUS_MUTEX_INITIALIZER;
 
-    // 
-    // This code uses a, 'hidden' (non-documented), VMS only, logical 
+    //
+    // This code uses a, 'hidden' (non-documented), VMS only, logical
     //  name (environment variable), PEGASUS_VMS_THREAD_STACK_MULTIPLIER,
     //  to allow in the field adjustment of the thread stack size.
     //
     // We only check for the logical name once to not have an
     //  impact on performance.
-    // 
+    //
     // Note:  This code may have problems in a multithreaded environment
     //  with the setting of doneOnce to true.
-    // 
+    //
     // Current code in Cimserver and the clients do some serial thread
     //  creations first so this is not a problem now.
-    // 
+    //
 
     if (_multiplier == 0)
     {
@@ -206,9 +204,9 @@ static inline int _get_stack_multiplier()
 #if defined(PEGASUS_HAVE_PTHREADS)
 
 int Threads::create(
-    ThreadType& thread, 
+    ThreadType& thread,
     Type type,
-    void* (*start)(void*), 
+    void* (*start)(void*),
     void* arg)
 {
     // Initialize thread attributes:
@@ -273,7 +271,7 @@ int Threads::create(
     return 0;
 }
 
-ThreadType Threads::self() 
+ThreadType Threads::self()
 {
     ThreadType tt;
     tt.thread = pthread_self();
index 4fbfdbf3e17c47338b3ce4f4f0b90c1eb73f2fc6..d40fb9538640673aa750a5969ec922e39af4457c 100644 (file)
@@ -29,8 +29,6 @@
 //
 //==============================================================================
 //
-// Author: Mike Brasher (m.brasher@inovadevelopment.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_Threads_h
@@ -80,7 +78,7 @@ PEGASUS_NAMESPACE_BEGIN
 
 struct ThreadId
 {
-    // The character representation of a uint64 requires 22 bytes including the 
+    // The character representation of a uint64 requires 22 bytes including the
     // null terminator.
     char buffer[22];
 };
@@ -110,8 +108,8 @@ struct ThreadType
 #if defined(PEGASUS_HAVE_WINDOWS_THREADS)
 struct ThreadType
 {
-    ThreadType() : handle(NULL) 
-    { 
+    ThreadType() : handle(NULL)
+    {
     }
 
     HANDLE handle;
@@ -163,9 +161,9 @@ public:
     enum Type { DETACHED, JOINABLE };
 
     static int create(
-        ThreadType& thread, 
+        ThreadType& thread,
         Type type,
-        void* (*start)(void*), 
+        void* (*start)(void*),
         void* arg);
 
     static ThreadType self();
@@ -199,8 +197,8 @@ public:
 
 #if defined(PEGASUS_HAVE_PTHREADS)
 
-inline bool Threads::equal(ThreadType x, ThreadType y) 
-{ 
+inline bool Threads::equal(ThreadType x, ThreadType y)
+{
     return pthread_equal(x.thread, y.thread);
 }
 
@@ -253,10 +251,10 @@ inline ThreadId Threads::id(const ThreadType& x)
 
 #if defined(PEGASUS_PLATFORM_ZOS_ZSERIES_IBM)
     const char* s = x.thread.__;
-    sprintf(tid.buffer, "%X%X%X%X%X%X%X%X", 
+    sprintf(tid.buffer, "%X%X%X%X%X%X%X%X",
         s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7]);
 #else
-    sprintf(tid.buffer, "%" PEGASUS_64BIT_CONVERSION_WIDTH "u", 
+    sprintf(tid.buffer, "%" PEGASUS_64BIT_CONVERSION_WIDTH "u",
         Uint64(x.thread));
 #endif
 
@@ -289,14 +287,14 @@ inline void Threads::clear(ThreadType& x)
 
 #if defined(PEGASUS_HAVE_WINDOWS_THREADS)
 
-inline ThreadType Threads::self() 
+inline ThreadType Threads::self()
 {
     ThreadType tt;
     tt.handle = GetCurrentThread();
     return tt;
 }
 
-inline bool Threads::equal(ThreadType x, ThreadType y) 
+inline bool Threads::equal(ThreadType x, ThreadType y)
 {
     return x.handle == y.handle;
 }
@@ -330,7 +328,7 @@ inline ThreadId Threads::id(const ThreadType& x)
 {
     ThreadId tmp;
 
-    sprintf(tmp.buffer, "%" PEGASUS_64BIT_CONVERSION_WIDTH "u", 
+    sprintf(tmp.buffer, "%" PEGASUS_64BIT_CONVERSION_WIDTH "u",
         Uint64(x.handle));
 
     return tmp;
index f4829e87342cfa7d93a0b21b237c584c1fc1d5fc..8318b9915979fdb7497267926d7b2a2d8324d250 100644 (file)
@@ -56,7 +56,7 @@ int Time::gettimeofday(timeval* tv)
 {
 #if defined(USE_GETTIMEOFDAY)
 
-    if(tv == NULL)
+    if (tv == NULL)
         return EINVAL;
 
     struct timeval tmp;
@@ -104,25 +104,27 @@ int Time::gettimeofday(timeval* tv)
 
 int Time::subtract(timeval* result, timeval* x, timeval* y)
 {
-   /* Perform the carry for the later subtraction by updating Y. */
-   if (x->tv_usec < y->tv_usec) {
-      int nsec = (y->tv_usec - x->tv_usec) / 1000000 + 1;
-      y->tv_usec -= 1000000 * nsec;
-      y->tv_sec += nsec;
-   }
-   if (x->tv_usec - y->tv_usec > 1000000) {
-      int nsec = (x->tv_usec - y->tv_usec) / 1000000;
-      y->tv_usec += 1000000 * nsec;
-      y->tv_sec -= nsec;
-   }
-
-   /* Compute the time remaining to wait.
-      `tv_usec' is certainly positive. */
-   result->tv_sec = x->tv_sec - y->tv_sec;
-   result->tv_usec = x->tv_usec - y->tv_usec;
-
-   /* Return 1 if result is negative. */
-   return x->tv_sec < y->tv_sec;
+    /* Perform the carry for the later subtraction by updating Y. */
+    if (x->tv_usec < y->tv_usec)
+    {
+        int nsec = (y->tv_usec - x->tv_usec) / 1000000 + 1;
+        y->tv_usec -= 1000000 * nsec;
+        y->tv_sec += nsec;
+    }
+    if (x->tv_usec - y->tv_usec > 1000000)
+    {
+        int nsec = (x->tv_usec - y->tv_usec) / 1000000;
+        y->tv_usec += 1000000 * nsec;
+        y->tv_sec -= nsec;
+    }
+
+    /* Compute the time remaining to wait.
+        `tv_usec' is certainly positive. */
+    result->tv_sec = x->tv_sec - y->tv_sec;
+    result->tv_usec = x->tv_usec - y->tv_usec;
+
+    /* Return 1 if result is negative. */
+    return x->tv_sec < y->tv_sec;
 }
 
 PEGASUS_NAMESPACE_END
index 4ad4b0721c94be9acbe06a8071814a73cdf63dd7..d282f4a590a8e884fbb136cc8fe68084adab8ed7 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By:
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include <Pegasus/Common/Config.h>
index 8ec2cf472140f21c937505414476aea2bc9c55c8..7631dd8eaafb37a3e4c236557eb1bdd2d8891616 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By:
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_TimeValue_h
@@ -54,53 +50,53 @@ public:
     {
     }
 
-    TimeValue(Uint32 seconds, Uint32 microseconds) 
-       : _seconds(seconds), _microseconds(microseconds)
+    TimeValue(Uint32 seconds, Uint32 microseconds)
+        : _seconds(seconds), _microseconds(microseconds)
     {
     }
 
-    Uint32 getSeconds() const 
+    Uint32 getSeconds() const
     {
-       return _seconds;
+        return _seconds;
     }
 
     void setSeconds(Uint32 seconds)
     {
-       _seconds = seconds;
+        _seconds = seconds;
     }
 
-    Uint32 getMicroseconds() const 
+    Uint32 getMicroseconds() const
     {
-       return _microseconds;
+        return _microseconds;
     }
 
-    Uint64 toMicroseconds() const 
+    Uint64 toMicroseconds() const
     {
-       return (Uint64(_seconds) * Uint64(1000000)) + Uint64(_microseconds);
+        return (Uint64(_seconds) * Uint64(1000000)) + Uint64(_microseconds);
     }
 
     void setMicroseconds(Uint32 microseconds)
     {
-       _microseconds = microseconds;
+        _microseconds = microseconds;
     }
 
     void fromMilliseconds(Uint32 milliseconds)
     {
-       _seconds = milliseconds / 1000;
-       _microseconds = (milliseconds % 1000) * 1000;
+        _seconds = milliseconds / 1000;
+        _microseconds = (milliseconds % 1000) * 1000;
     }
 
-    Uint32 toMilliseconds() const 
+    Uint32 toMilliseconds() const
     {
-       return _seconds * 1000 + _microseconds / 1000; 
+        return _seconds * 1000 + _microseconds / 1000;
     }
 
     static TimeValue getCurrentTime()
     {
-       Uint32 seconds;
-       Uint32 microseconds;
-       System::getCurrentTimeUsec(seconds, microseconds);
-       return TimeValue(seconds, microseconds);
+        Uint32 seconds;
+        Uint32 microseconds;
+        System::getCurrentTimeUsec(seconds, microseconds);
+        return TimeValue(seconds, microseconds);
     }
 
 private:
index 4be2964b0378f3765a02370cb09b2586ebeda68d..103a0f7d4e1ea3a1d47c9e8fa009af7162a57d3b 100644 (file)
 //
 //==============================================================================
 //
-// Author: Sushma Fernandes, Hewlett-Packard Company (sushma_fernandes@hp.com)
-//
-// Modified By: Yi Zhou (yi_zhou@hp.com)
-//              Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com)
-//              Carol Ann Krug Graves, Hewlett-Packard Company
-//                (carolann_graves@hp.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 // REVIEW: Ask how tracing works (note to myself).
@@ -48,45 +41,45 @@ PEGASUS_NAMESPACE_BEGIN
 /** Steps for adding tracing to a new component:
 
     1. Identify whether the component being added belongs to an existing list
-       of trace components. Refer to the trace component list 
-       (TRACE_COMPONENT_LIST []) defined in this file. If an appropriate 
-       component is found, note the component identifier (starts with a TRC_) 
-       from the list of TRACE_COMPONENT_IDs defined in this file and skip 
+       of trace components. Refer to the trace component list
+       (TRACE_COMPONENT_LIST []) defined in this file. If an appropriate
+       component is found, note the component identifier (starts with a TRC_)
+       from the list of TRACE_COMPONENT_IDs defined in this file and skip
        step 2. If there is no appropriate component available, move to step 2.
 
-    2. Add the new component to this file. This step includes adding a 
+    2. Add the new component to this file. This step includes adding a
        component name and a component identifier.
 
-         a. Add the <component name> to the TRACE_COMPONENT_LIST []. This name 
+         a. Add the <component name> to the TRACE_COMPONENT_LIST []. This name
             will be used to turn on tracing for the component.
-         b. Add the component identifier to the TRACE_COMPONENT_ID list. 
-            The Component identifier must be formed by prefixing the component 
-            name with "TRC_"(E.g. TRC_<component name>). The developer should 
-            use the component identifier, to identify a component in all 
+         b. Add the component identifier to the TRACE_COMPONENT_ID list.
+            The Component identifier must be formed by prefixing the component
+            name with "TRC_"(E.g. TRC_<component name>). The developer should
+            use the component identifier, to identify a component in all
             trace calls.
 
-    (NOTE: It is important that both the TRACE_COMPONENT_ID and 
-           TRACE_COMPONENT_LIST [] are updated appropriately to include the 
+    (NOTE: It is important that both the TRACE_COMPONENT_ID and
+           TRACE_COMPONENT_LIST [] are updated appropriately to include the
            new component.)
 
-    3. Add the trace calls to the component code. The TRACE_COMPONENT_ID 
+    3. Add the trace calls to the component code. The TRACE_COMPONENT_ID
        should be used to identify a component in all trace calls.
-*/    
+*/
 
-/** String constants for naming the various Trace components. 
+/** String constants for naming the various Trace components.
     These strings will used to while turning on tracing for the respective
-    components. The component list needs to be updated whenever a new trace 
-    component needs to be added. An appropriate string constant should be 
+    components. The component list needs to be updated whenever a new trace
+    component needs to be added. An appropriate string constant should be
     defined to identify the component to be traced.
-    Example: 
-    The following example shows the usage of trace component names. 
-    The setTraceComponents method is used to turn on tracing for the 
-    components, config and repository. The component names are passed as a 
+
+    Example:
+    The following example shows the usage of trace component names.
+    The setTraceComponents method is used to turn on tracing for the
+    components, config and repository. The component names are passed as a
     comma separated list.
+
        Tracer::setTraceComponents( "Config,Repository");
-             
+
  */
 static char const* TRACE_COMPONENT_LIST[] =
 {
@@ -138,17 +131,17 @@ static char const* TRACE_COMPONENT_LIST[] =
     "IndicationFormatter",
     "StatisticalData"
 };
-/** Constants identifying the Trace components. These constants are used by 
+/** Constants identifying the Trace components. These constants are used by
     the component to identify its Trace messages. The component ID needs to
-    be updated whenever a new trace component needs to be added. 
+    be updated whenever a new trace component needs to be added.
     The constants need to be prepended with "TRC_". The position of the
     constant identifier needs to correspond with the position of the constant
-    string definition in the TRACE_COMPONENT_LIST. 
-    Example: 
+    string definition in the TRACE_COMPONENT_LIST.
+
+    Example:
     The Configuration framework component will be using the constant,
     TRC_CONFIG while invoking the trace call.
-              
+
         PEG_METHOD_ENTER(TRC_CONFIG, "ConfigManager::updateCurrentValue()");
  */
 
index 33b1dd5460d6b90217148ff0126fea8f2d7c7f1b..72ef9e8877cd8e9b6a7ded52c22da1c3e8717d76 100644 (file)
 //
 //==============================================================================
 //
-// Author: Sushma Fernandes, Hewlett-Packard Company (sushma_fernandes@hp.com)
-//
-// Modified By: Rudy Schuet (rudy.schuet@compaq.com) 11/12/01
-//              added nsk platform support
-//              Amit K Arora, IBM (amita@in.ibm.com) for Bug#1527
-//              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//              Sean Keenan, Hewlett-Packard Company (sean.keenan@hp.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
-//#include <fstream>
-//#include <iostream>
 #include <Pegasus/Common/FileSystem.h>
 #include <Pegasus/Common/TraceFileHandler.h>
 
@@ -61,7 +51,7 @@ PEGASUS_NAMESPACE_BEGIN
 //  Constructs TraceFileHandler
 ////////////////////////////////////////////////////////////////////////////////
 
-TraceFileHandler::TraceFileHandler () 
+TraceFileHandler::TraceFileHandler()
 {
     _fileName = 0;
     _fileHandle = 0;
@@ -76,9 +66,9 @@ TraceFileHandler::TraceFileHandler ()
 //  Destructs TraceFileHandler
 ////////////////////////////////////////////////////////////////////////////////
 
-TraceFileHandler::~TraceFileHandler () 
+TraceFileHandler::~TraceFileHandler()
 {
-    // Close the File 
+    // Close the File
     if (_fileHandle)
     {
         fclose(_fileHandle);
@@ -112,7 +102,7 @@ Uint32 TraceFileHandler::setFileName(const char* fileName)
 
     if (!isValidFilePath(fileName))
     {
-       return 1;
+        return 1;
     }
     _fileHandle = _openFile(fileName);
     if (!_fileHandle)
@@ -189,7 +179,7 @@ Boolean TraceFileHandler::isValidFilePath(const char* filePath)
     FileSystem::translateSlashes(fileName);
     if (FileSystem::isDirectory(fileName))
     {
-       return 0;
+        return 0;
     }
 
     // Check if the file exists and is writable
@@ -197,11 +187,11 @@ Boolean TraceFileHandler::isValidFilePath(const char* filePath)
     {
         if (!FileSystem::canWrite(fileName))
         {
-           return 0;
+            return 0;
         }
-       else
-       {
-           return 1;
+        else
+        {
+            return 1;
         }
     }
     else
@@ -210,22 +200,22 @@ Boolean TraceFileHandler::isValidFilePath(const char* filePath)
         Uint32 index = fileName.reverseFind('/');
 
         if (index != PEG_NOT_FOUND)
-       {
+        {
             String dirName = fileName.subString(0,index);
             if (!FileSystem::isDirectory(dirName))
             {
-               return 0;
+                return 0;
             }
             if (!FileSystem::canWrite(dirName) )
             {
-               return 0;
+                return 0;
             }
-           else
-           {
-               return 1;
+            else
+            {
+                return 1;
             }
         }
-       else
+        else
         {
             String currentDir;
 
@@ -235,11 +225,11 @@ Boolean TraceFileHandler::isValidFilePath(const char* filePath)
 
             if (!FileSystem::canWrite(currentDir))
             {
-               return 0;
+                return 0;
             }
-           else
-           {
-               return 1;
+            else
+            {
+                return 1;
             }
         }
     }
index 731cdde6f0a498e8e9ac926e70d04fd551869d95..dafb34d5849484813198807cf1001b34ae9f0467 100644 (file)
 //
 //==============================================================================
 //
-// Author: Sushma Fernandes, Hewlett-Packard Company (sushma_fernandes@hp.com)
-//
-// Modified By: Amit K Arora, IBM (amita@in.ibm.com) for Bug#1527
-//              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 
 
 PEGASUS_NAMESPACE_BEGIN
 
-/** TraceFileHandler implements logging of messages to file 
+/** TraceFileHandler implements logging of messages to file
  */
 
-class PEGASUS_COMMON_LINKAGE TraceFileHandler 
+class PEGASUS_COMMON_LINKAGE TraceFileHandler
 {
 private:
 
@@ -79,7 +74,7 @@ private:
      */
     FILE* _fileHandle;
 
-    /* Flag to track writing of message to log 
+    /* Flag to track writing of message to log
      */
     Boolean _wroteToLog;
 
@@ -95,14 +90,14 @@ public:
 
     /** Sets the filename to the given filename and opens the file in append
         mode
-        @param    fileName full path of the file 
+        @param    fileName full path of the file
         @return   0        if the function is successful in opening the file
                   1        if an error occurs while opening the file
      */
     Uint32 setFileName(const char* fileName);
 
     /** Validates the File Path for the trace File
-        @param    filePath full path of the file 
+        @param    filePath full path of the file
         @return   1        if the file path is valid
                   0        if the file path is invalid
      */
index 2ad330327091956bc48587cc5958aefb89b36418..de66a81dfa9595b46996f3a2ada828b26aea6184 100644 (file)
 //
 //==============================================================================
 //
-// Author: Sushma Fernandes, Hewlett-Packard Company (sushma_fernandes@hp.com)
-//
-// Modified By: Amit K Arora, IBM (amita@in.ibm.com) for Bug#1527
-//              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//              David Dillard, VERITAS Software Corp.
-//                  (david.dillard@veritas.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #if defined(PEGASUS_OS_VMS)
@@ -98,13 +91,13 @@ void TraceFileHandler::handleMessage(
 
         // Set permissions on the trace file to 0400
 
-        if (!FileSystem::
-            changeFilePermissions(String(_fileName), (S_IRUSR | S_IWUSR)))
+        if (!FileSystem::changeFilePermissions(
+                String(_fileName), (S_IRUSR | S_IWUSR)))
         {
-            Logger::put_l(Logger::DEBUG_LOG, System::CIMSERVER, 
-                         Logger::WARNING,
-                          "Common.TraceFileHandlerVms.FAILED_TO_SET_FILE_PERMISSIONS",
-                          "Failed to set permissions on file $0", _fileName);
+            Logger::put_l(
+                Logger::DEBUG_LOG, System::CIMSERVER, Logger::WARNING,
+                "Common.TraceFileHandlerVms.FAILED_TO_SET_FILE_PERMISSIONS",
+                "Failed to set permissions on file $0", _fileName);
             return;
         }
     }
@@ -181,10 +174,10 @@ void TraceFileHandler::handleMessage(
             // Unable to open file, log a message
             if (!_wroteToLog)
             {
-                Logger::put_l(Logger::DEBUG_LOG, System::CIMSERVER, 
-                             Logger::WARNING,
-                              "Common.TraceFileHandler.FAILED_TO_OPEN_FILE",
-                              "Failed to open File $0", _fileName);
+                Logger::put_l(
+                    Logger::DEBUG_LOG, System::CIMSERVER, Logger::WARNING,
+                    "Common.TraceFileHandler.FAILED_TO_OPEN_FILE",
+                    "Failed to open File $0", _fileName);
                 _wroteToLog = true;
             }
             return;
index 983fd852419808bb3bd40ac309e8bd0c9259e5e1..a2ccce5c657a9d30614550e7616f2e47b1ef0f71 100644 (file)
 //
 //==============================================================================
 //
-// Author: Sushma Fernandes, Hewlett-Packard Company (sushma_fernandes@hp.com)
-//
-// Modified By:
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include <iostream>
@@ -44,9 +40,9 @@ PEGASUS_USING_STD;
 PEGASUS_NAMESPACE_BEGIN
 
 ////////////////////////////////////////////////////////////////////////////////
-//   Writes message to file. 
+//   Writes message to file.
 //   Implementation of this function is platform specific
-// 
+//
 //   Note: The current implementation writes the message to the defined file.
 //         Will have to be enhanced to support synchronous write operations to
 //         the same file.
@@ -54,7 +50,7 @@ PEGASUS_NAMESPACE_BEGIN
 void TraceFileHandler::handleMessage(
     const char* message,
     const char* fmt,
-    va_list argList) 
+    va_list argList)
 {
     Uint32 retCode;
 
@@ -70,31 +66,25 @@ void TraceFileHandler::handleMessage(
 
         if (retCode < 0)
         {
-           // Unable to write message to file
-           // Log message 
-           //l10n
-           //Logger::put(Logger::DEBUG_LOG,"Tracer",Logger::WARNING,
-               //"Unable to write trace message to File $0",_fileName);
-             Logger::put_l(Logger::DEBUG_LOG,System::CIMSERVER,Logger::WARNING,
-               "Common.TraceFileHandlerWindows.UNABLE_TO_WRITE_TRACE_TO_FILE",
-               "Unable to write trace message to File $0",_fileName);
+            // Unable to write message to file
+            // Log message
+            Logger::put_l(Logger::DEBUG_LOG, System::CIMSERVER, Logger::WARNING,
+                "Common.TraceFileHandlerWindows.UNABLE_TO_WRITE_TRACE_TO_FILE",
+                "Unable to write trace message to File $0", _fileName);
         }
-       else
-       {
+        else
+        {
             fflush(_fileHandle);
         }
     }
     else
     {
-       // Invalid file handle
-       // Log message 
-       //l10n
-       //Logger::put(Logger::DEBUG_LOG,"Tracer",Logger::WARNING,
-            //"Invalid file handle for file $0",_fileName);
-      Logger::put_l(Logger::DEBUG_LOG,System::CIMSERVER,Logger::WARNING,
-               "Common.TraceFileHandlerWindows.INVALID_FILE_HANDLE",
-            "Invalid file handle for file $0",_fileName);
+        // Invalid file handle
+        // Log message
+        Logger::put_l(Logger::DEBUG_LOG, System::CIMSERVER, Logger::WARNING,
+            "Common.TraceFileHandlerWindows.INVALID_FILE_HANDLE",
+            "Invalid file handle for file $0", _fileName);
     }
-} 
+}
 
 PEGASUS_NAMESPACE_END
index b330bb109a079002d73fc62f0fc7eb5c4c2dd7d1..db844cb63965fa8b96311e2f2c3b62c4fb94ee82 100644 (file)
 //
 //==============================================================================
 //
-// Author: Sushma Fernandes, Hewlett-Packard Company (sushma_fernandes@hp.com)
-//
-// Modified By: Jenny Yu, Hewlett-Packard Company (jenny_yu@hp.com)
-//              Amit K Arora, IBM (amita@in.ibm.com) for PEP#101
-//              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//              Josephine Eskaline Joyce, IBM (jojustin@in.ibm.com) for Bug#2498
-//              Sean Keenan, Hewlett-Packard Company (sean.keenan@hp.com)
-//              David Dillard, Symantec Corp. (david_dillard@symantec.com)
-//              Aruran, IBM (ashanmug@in.ibm.com) for Bug# 4547
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include <Pegasus/Common/Config.h>
@@ -68,7 +58,9 @@ const char Tracer::_METHOD_ENTER_MSG[] = "Entering method";
 const char Tracer::_METHOD_EXIT_MSG[]  = "Exiting method";
 
 // Set Log messages
-const char Tracer::_LOG_MSG[] = "LEVEL1 may only be used with trace macros PEG_METHOD_ENTER/PEG_METHOD_EXIT.";
+const char Tracer::_LOG_MSG[] =
+    "LEVEL1 may only be used with trace macros "
+        "PEG_METHOD_ENTER/PEG_METHOD_EXIT.";
 
 // Initialize singleton instance of Tracer
 Tracer* Tracer::_tracerInstance = 0;
@@ -122,15 +114,15 @@ void Tracer::_trace(
     const char* fmt,
     va_list argList)
 {
-    if ( traceLevel == LEVEL1 )
+    if (traceLevel == LEVEL1)
     {
-        trace( traceComponent, Tracer::LEVEL4, "%s", _LOG_MSG );
+        trace(traceComponent, Tracer::LEVEL4, "%s", _LOG_MSG);
     }
     else
     {
-        if (_isTraceEnabled(traceComponent,traceLevel))
+        if (_isTraceEnabled(traceComponent, traceLevel))
         {
-            _trace(traceComponent,"",fmt,argList);
+            _trace(traceComponent, "", fmt, argList);
         }
     }
 }
@@ -148,9 +140,9 @@ void Tracer::_trace(
 {
     char* message;
 
-    if ( traceLevel == LEVEL1 )
+    if (traceLevel == LEVEL1)
     {
-        trace( traceComponent, Tracer::LEVEL4, "%s", _LOG_MSG );
+        trace(traceComponent, Tracer::LEVEL4, "%s", _LOG_MSG);
     }
     else
     {
@@ -160,8 +152,8 @@ void Tracer::_trace(
             // Allocate memory for the message string
             // Needs to be updated if additional info is added
             //
-            message = new char[ strlen(fileName) +
-                _STRLEN_MAX_UNSIGNED_INT + (_STRLEN_MAX_PID_TID * 2) + 8 ];
+            message = new char[strlen(fileName) +
+                _STRLEN_MAX_UNSIGNED_INT + (_STRLEN_MAX_PID_TID * 2) + 8];
             sprintf(
                message,
                "[%d:%s:%s:%u]: ",
@@ -170,8 +162,8 @@ void Tracer::_trace(
                fileName,
                lineNum);
 
-            _trace(traceComponent,message,fmt,argList);
-            delete []message;
+            _trace(traceComponent, message, fmt, argList);
+            delete [] message;
         }
     }
 }
@@ -185,21 +177,21 @@ void Tracer::_traceBuffer(
     const char*  data,
     const Uint32 size)
 {
-    if ( traceLevel == LEVEL1 )
+    if (traceLevel == LEVEL1)
     {
-        trace( traceComponent, Tracer::LEVEL4, "%s", _LOG_MSG );
+        trace(traceComponent, Tracer::LEVEL4, "%s", _LOG_MSG);
     }
     else
     {
-        if (_isTraceEnabled(traceComponent,traceLevel))
+        if (_isTraceEnabled(traceComponent, traceLevel))
         {
             char* tmpBuf = new char[size+1];
 
-            strncpy( tmpBuf, data, size );
+            strncpy(tmpBuf, data, size);
             tmpBuf[size] = '\0';
-            trace(traceComponent,traceLevel,"%s",tmpBuf);
+            trace(traceComponent, traceLevel, "%s", tmpBuf);
 
-            delete []tmpBuf;
+            delete [] tmpBuf;
         }
     }
 }
@@ -214,21 +206,21 @@ void Tracer::_traceBuffer(
     const char*  data,
     const Uint32 size)
 {
-    if ( traceLevel == LEVEL1 )
+    if (traceLevel == LEVEL1)
     {
-        trace( traceComponent, Tracer::LEVEL4, "%s", _LOG_MSG );
+        trace(traceComponent, Tracer::LEVEL4, "%s", _LOG_MSG);
     }
     else
     {
-        if ( _isTraceEnabled( traceComponent, traceLevel ) )
+        if (_isTraceEnabled(traceComponent, traceLevel))
         {
             char* tmpBuf = new char[size+1];
 
             strncpy( tmpBuf, data, size );
             tmpBuf[size] = '\0';
-            trace(fileName,lineNum,traceComponent,traceLevel,"%s",tmpBuf);
+            trace(fileName, lineNum, traceComponent, traceLevel, "%s", tmpBuf);
 
-            delete []tmpBuf;
+            delete [] tmpBuf;
         }
     }
 }
@@ -237,19 +229,19 @@ void Tracer::_traceBuffer(
 //Traces the given string
 ////////////////////////////////////////////////////////////////////////////////
 void Tracer::_traceString(
-    const Uint32   traceComponent,
-    const Uint32   traceLevel,
-    const String&  traceString)
+    const Uint32 traceComponent,
+    const Uint32 traceLevel,
+    const String& traceString)
 {
-    if ( traceLevel == LEVEL1 )
+    if (traceLevel == LEVEL1)
     {
-        trace( traceComponent, Tracer::LEVEL4, "%s", _LOG_MSG );
+        trace(traceComponent, Tracer::LEVEL4, "%s", _LOG_MSG);
     }
     else
     {
         if (_isTraceEnabled(traceComponent,traceLevel))
         {
-            trace(traceComponent,traceLevel,"%s",
+            trace(traceComponent, traceLevel, "%s",
                        (const char *)traceString.getCString());
         }
     }
@@ -260,21 +252,21 @@ void Tracer::_traceString(
 //of trace origin.
 ////////////////////////////////////////////////////////////////////////////////
 void Tracer::_traceString(
-    const char*   fileName,
-    const Uint32  lineNum,
-    const Uint32  traceComponent,
-    const Uint32  traceLevel,
+    const char* fileName,
+    const Uint32 lineNum,
+    const Uint32 traceComponent,
+    const Uint32 traceLevel,
     const String& traceString)
 {
-    if ( traceLevel == LEVEL1 )
+    if (traceLevel == LEVEL1)
     {
-        trace( traceComponent, Tracer::LEVEL4, "%s", _LOG_MSG );
+        trace(traceComponent, Tracer::LEVEL4, "%s", _LOG_MSG);
     }
     else
     {
-        if ( _isTraceEnabled( traceComponent, traceLevel ) )
+        if (_isTraceEnabled(traceComponent, traceLevel))
         {
-            trace(fileName,lineNum,traceComponent,traceLevel,"%s",
+            trace(fileName, lineNum, traceComponent, traceLevel, "%s",
                      (const char *)traceString.getCString());
         }
     }
@@ -286,15 +278,15 @@ void Tracer::_traceString(
 void Tracer::_traceCIMException(
     const Uint32 traceComponent,
     const Uint32 traceLevel,
-    CIMException cimException)
+    const CIMException& cimException)
 {
-    if ( traceLevel == LEVEL1 )
+    if (traceLevel == LEVEL1)
     {
-        trace( traceComponent, Tracer::LEVEL4, "%s", _LOG_MSG );
+        trace(traceComponent, Tracer::LEVEL4, "%s", _LOG_MSG);
     }
     else
     {
-        if ( _isTraceEnabled( traceComponent, traceLevel ) )
+        if (_isTraceEnabled(traceComponent, traceLevel))
         {
             // get the CIMException trace message string
             String traceMsg =
@@ -319,30 +311,30 @@ void Tracer::_traceEnter(
     va_list argList;
     char* message;
 
-    if (_isTraceEnabled(traceComponent,LEVEL1))
+    if (_isTraceEnabled(traceComponent, LEVEL1))
     {
 
-        va_start(argList,fmt);
+        va_start(argList, fmt);
 
         //
         // Allocate memory for the message string
         // Needs to be updated if additional info is added
         //
         message = new char[ strlen(fileName) +
-           _STRLEN_MAX_UNSIGNED_INT + (_STRLEN_MAX_PID_TID * 2) + 8 ];
+            _STRLEN_MAX_UNSIGNED_INT + (_STRLEN_MAX_PID_TID * 2) + 8 ];
 
         sprintf(
            message,
            "[%d:%s:%s:%u]: ",
            System::getPID(),
-          Threads::id().buffer,
+           Threads::id().buffer,
            fileName,
            lineNum);
 
-        _trace(traceComponent,message,fmt,argList);
+        _trace(traceComponent, message, fmt, argList);
 
         va_end(argList);
-        delete []message;
+        delete [] message;
     }
 }
 
@@ -359,36 +351,37 @@ void Tracer::_traceExit(
     va_list argList;
     char* message;
 
-    if (_isTraceEnabled(traceComponent,LEVEL1))
+    if (_isTraceEnabled(traceComponent, LEVEL1))
     {
-        va_start(argList,fmt);
+        va_start(argList, fmt);
 
         //
         // Allocate memory for the message string
         // Needs to be updated if additional info is added
         //
-        message = new char[ strlen(fileName) +
-                            _STRLEN_MAX_UNSIGNED_INT + (_STRLEN_MAX_PID_TID * 2) + 8 ];
+        message = new char[strlen(fileName) +
+            _STRLEN_MAX_UNSIGNED_INT + (_STRLEN_MAX_PID_TID * 2) + 8];
 
         sprintf(
            message,
            "[%d:%s:%s:%u]: ",
            System::getPID(),
-          Threads::id().buffer,
+           Threads::id().buffer,
            fileName,
            lineNum);
 
-        _trace(traceComponent,message,fmt,argList);
+        _trace(traceComponent, message, fmt, argList);
         va_end(argList);
 
-        delete []message;
+        delete [] message;
     }
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 //Checks if trace is enabled for the given component and level
 ////////////////////////////////////////////////////////////////////////////////
-Boolean Tracer::_isTraceEnabled(const Uint32 traceComponent,
+Boolean Tracer::_isTraceEnabled(
+    const Uint32 traceComponent,
     const Uint32 traceLevel)
 {
     Tracer* instance = _getInstance();
@@ -397,7 +390,7 @@ Boolean Tracer::_isTraceEnabled(const Uint32 traceComponent,
         return false;
     }
     return (((instance->_traceComponentMask.get())[traceComponent]) &&
-            (traceLevel  & instance->_traceLevelMask));
+            (traceLevel & instance->_traceLevelMask));
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -427,36 +420,36 @@ void Tracer::_trace(
     // timestamp: <component name> [file name:line number]
     if (*message != '\0')
     {
-       // << Wed Jul 16 10:58:40 2003 mdd >> _STRLEN_MAX_PID_TID is not used in this format string
-       msgHeader = new char [strlen(message)
-                             + strlen(TRACE_COMPONENT_LIST[traceComponent])
-                             + strlen(timeStamp) + _STRLEN_MAX_PID_TID + 5];
+       // << Wed Jul 16 10:58:40 2003 mdd >> _STRLEN_MAX_PID_TID is not used
+       // in this format string
+       msgHeader = new char [strlen(message) +
+           strlen(TRACE_COMPONENT_LIST[traceComponent]) +
+           strlen(timeStamp) + _STRLEN_MAX_PID_TID + 5];
 
-        sprintf(msgHeader,"%s: %s %s",(const char*)timeStamp,
-            TRACE_COMPONENT_LIST[traceComponent] ,message);
-        //delete [] msgHeader;
+        sprintf(msgHeader, "%s: %s %s", (const char*)timeStamp,
+            TRACE_COMPONENT_LIST[traceComponent], message);
     }
     else
     {
         //
         // Since the message is blank form a string using the pid and tid
         //
-        char*  tmpBuffer;
+        char* tmpBuffer;
 
         //
         // Allocate messageHeader.
         // Needs to be updated if additional info is added
         //
         tmpBuffer = new char[2 * _STRLEN_MAX_PID_TID + 6];
-        sprintf(tmpBuffer, "[%u:%s]: ", System::getPID(), Threads::id().buffer);
-        msgHeader = new char [ strlen(timeStamp) + strlen(TRACE_COMPONENT_LIST[traceComponent]) +
-                               strlen(tmpBuffer) + 1  + 5 ];
-
-        sprintf(msgHeader,"%s: %s %s ",(const char*)timeStamp,
-            TRACE_COMPONENT_LIST[traceComponent] ,tmpBuffer );
-        delete []tmpBuffer;
-        //delete [] msgHeader;
+        sprintf(tmpBuffer, "[%u:%s]: ",
+            System::getPID(), Threads::id().buffer);
+        msgHeader = new char[strlen(timeStamp) +
+            strlen(TRACE_COMPONENT_LIST[traceComponent]) +
+            strlen(tmpBuffer) + 1  + 5];
 
+        sprintf(msgHeader, "%s: %s %s ", (const char*)timeStamp,
+            TRACE_COMPONENT_LIST[traceComponent], tmpBuffer);
+        delete [] tmpBuffer;
     }
 
     // Call trace file handler to write message
@@ -473,13 +466,13 @@ Boolean Tracer::isValidFileName(const char* filePath)
     String moduleName = _getInstance()->_moduleName;
     if (moduleName == String::EMPTY)
     {
-        return (_getInstance()->_traceHandler->isValidFilePath(filePath));
+        return _getInstance()->_traceHandler->isValidFilePath(filePath);
     }
     else
     {
         String extendedFilePath = String(filePath) + "." + moduleName;
-        return (_getInstance()->_traceHandler->isValidFilePath(
-            extendedFilePath.getCString()));
+        return _getInstance()->_traceHandler->isValidFilePath(
+            extendedFilePath.getCString());
     }
 }
 
@@ -493,7 +486,8 @@ Boolean Tracer::isValidComponents(const String& traceComponents)
 }
 
 Boolean Tracer::isValidComponents(
-    const String& traceComponents, String& invalidComponents)
+    const String& traceComponents,
+    String& invalidComponents)
 {
     // Validate the trace components and modify the traceComponents argument
     // to reflect the invalid components
@@ -550,7 +544,7 @@ Boolean Tracer::isValidComponents(
             // Remove the searched componentname from the traceComponents
             componentStr.remove(0,position+1);
 
-            if ( !validComponent )
+            if (!validComponent)
             {
                 invalidComponents.append(componentName);
                 invalidComponents.append(_COMPONENT_SEPARATOR);
@@ -562,7 +556,8 @@ Boolean Tracer::isValidComponents(
         // trace components is empty, it is a valid value so return true
         return _SUCCESS;
     }
-    if ( invalidComponents != String::EMPTY )
+
+    if (invalidComponents != String::EMPTY)
     {
         retCode = false;
         //
@@ -614,13 +609,13 @@ Uint32 Tracer::setTraceFile(const char* traceFile)
     String moduleName = _getInstance()->_moduleName;
     if (moduleName == String::EMPTY)
     {
-        return (_getInstance()->_traceHandler->setFileName(traceFile));
+        return _getInstance()->_traceHandler->setFileName(traceFile);
     }
     else
     {
         String extendedTraceFile = String(traceFile) + "." + moduleName;
-        return (_getInstance()->_traceHandler->setFileName(
-            extendedTraceFile.getCString()));
+        return _getInstance()->_traceHandler->setFileName(
+            extendedTraceFile.getCString());
     }
 }
 
@@ -672,15 +667,19 @@ void Tracer::setTraceComponents(const String& traceComponents)
         // Check if ALL is specified
         if (String::equalNoCase(componentStr,"ALL"))
         {
-            for (index=0; index < _NUM_COMPONENTS;
-                    (_getInstance()->_traceComponentMask.get())[index++] = true);
+            for (index = 0; index < _NUM_COMPONENTS; index++)
+            {
+                (_getInstance()->_traceComponentMask.get())[index] = true;
+            }
             _traceOn = true;
-            return ;
+            return;
         }
 
-        // initialise ComponentMask array to False
-        for (index = 0;index < _NUM_COMPONENTS;
-              (_getInstance()->_traceComponentMask.get())[index++] = false);
+        // initialize ComponentMask array to False
+        for (index = 0; index < _NUM_COMPONENTS; index++)
+        {
+            (_getInstance()->_traceComponentMask.get())[index] = false;
+        }
         _traceOn = false;
 
         // Append _COMPONENT_SEPARATOR to the end of the traceComponents
@@ -700,7 +699,7 @@ void Tracer::setTraceComponents(const String& traceComponents)
                 if (String::equalNoCase(
                     componentName,TRACE_COMPONENT_LIST[index]))
                 {
-                    (_getInstance()->_traceComponentMask.get())[index]=true;
+                    (_getInstance()->_traceComponentMask.get())[index] = true;
                     _traceOn = true;
 
                     // Found component, break from the loop
@@ -719,50 +718,52 @@ void Tracer::setTraceComponents(const String& traceComponents)
     else
     {
         // initialise ComponentMask array to False
-        for (Uint32 index = 0;index < _NUM_COMPONENTS;
-                 (_getInstance()->_traceComponentMask.get())[index++] = false);
+        for (Uint32 index = 0;index < _NUM_COMPONENTS; index++)
+        {
+            (_getInstance()->_traceComponentMask.get())[index] = false;
+        }
         _traceOn = 0;
     }
     return ;
 }
 
-void Tracer::traceEnter(TracerToken& token, Uint32 traceComponent, const char* method)
+void Tracer::traceEnter(
+    TracerToken& token,
+    Uint32 traceComponent,
+    const char* method)
 {
     if (_traceOn)
     {
-       token.component = traceComponent;
-       token.method = method;
+        token.component = traceComponent;
+        token.method = method;
 
-       //Tracer::traceEnter("unknown", 0, component, method);
-       _traceEnter( "unknown", 0, traceComponent, "%s %s",
-                    _METHOD_ENTER_MSG, method);
+        _traceEnter(
+            "unknown", 0, traceComponent, "%s %s", _METHOD_ENTER_MSG, method);
     }
 }
 
 void Tracer::traceExit(TracerToken& token)
 {
     if (_traceOn)
-
-        // KS Tracer::traceExit("unknown", 0, token.component, token.method);
-        _traceExit( "unknown",0, token.component, "%s %s",
+        _traceExit(
+            "unknown",0, token.component, "%s %s",
             _METHOD_EXIT_MSG, token.method);
 }
 
 void Tracer::traceEnter(
-    TracerToken& token, 
+    TracerToken& token,
     const char* file,
     size_t line,
-    Uint32 traceComponent, 
+    Uint32 traceComponent,
     const char* method)
 {
     if (_traceOn)
     {
-       token.component = traceComponent;
-       token.method = method;
+        token.component = traceComponent;
+        token.method = method;
 
-       //Tracer::traceEnter(file, line, component, method);
-       _traceEnter( file, line, traceComponent, "%s %s",
-                    _METHOD_ENTER_MSG, method);
+        _traceEnter(
+            file, line, traceComponent, "%s %s", _METHOD_ENTER_MSG, method);
     }
 }
 
@@ -772,9 +773,9 @@ void Tracer::traceExit(
     size_t line)
 {
     if (_traceOn)
-       //Tracer::traceExit(file, line, token.component, token.method);
-        _traceExit( file, line, token.component, "%s %s",
-                _METHOD_EXIT_MSG, token.method);
+        _traceExit(
+            file, line, token.component, "%s %s",
+            _METHOD_EXIT_MSG, token.method);
 }
 
 void Tracer::traceBuffer(
@@ -784,7 +785,7 @@ void Tracer::traceBuffer(
     const Uint32 size)
 {
     if (_traceOn)
-       _traceBuffer( traceComponent, traceLevel, data, size );
+        _traceBuffer(traceComponent, traceLevel, data, size);
 }
 
 void Tracer::traceBuffer(
@@ -797,8 +798,8 @@ void Tracer::traceBuffer(
 {
     if (_traceOn)
     {
-       _traceBuffer( fileName, lineNum,
-                     traceComponent, traceLevel, data, size );
+        _traceBuffer(
+            fileName, lineNum, traceComponent, traceLevel, data, size);
     }
 }
 
@@ -810,11 +811,11 @@ void Tracer::trace(
 {
     if (_traceOn)
     {
-       va_list argList;
+        va_list argList;
 
-       va_start(argList,fmt);
-       _trace(traceComponent,traceLevel,fmt,argList);
-       va_end(argList);
+        va_start(argList,fmt);
+        _trace(traceComponent,traceLevel,fmt,argList);
+        va_end(argList);
     }
 }
 
@@ -828,42 +829,42 @@ void Tracer::trace(
 {
     if (_traceOn)
     {
-       va_list argList;
+        va_list argList;
 
-       va_start(argList,fmt);
-       _trace(fileName,lineNum,traceComponent,traceLevel,fmt,argList);
-       va_end(argList);
+        va_start(argList,fmt);
+        _trace(fileName,lineNum,traceComponent,traceLevel,fmt,argList);
+        va_end(argList);
     }
 }
 
 void Tracer::trace(
-    const char*   fileName,
-    const Uint32  lineNum,
-    const Uint32  traceComponent,
-    const Uint32  traceLevel,
+    const char* fileName,
+    const Uint32 lineNum,
+    const Uint32 traceComponent,
+    const Uint32 traceLevel,
     const String& traceString)
 {
     if (_traceOn)
     {
-       _traceString( fileName, lineNum, traceComponent, traceLevel,
-                     traceString );
+        _traceString(
+            fileName, lineNum, traceComponent, traceLevel, traceString);
     }
 }
 
 void Tracer::traceCIMException(
-    const Uint32  traceComponent,
-    const Uint32  traceLevel,
-    CIMException  cimException)
+    const Uint32 traceComponent,
+    const Uint32 traceLevel,
+    const CIMException& cimException)
 {
     if (_traceOn)
     {
-       _traceCIMException( traceComponent, traceLevel, cimException );
+        _traceCIMException(traceComponent, traceLevel, cimException);
     }
 }
 
 void Tracer::trace(
-    const Uint32  traceComponent,
-    const Uint32  level,
+    const Uint32 traceComponent,
+    const Uint32 level,
     const String& string)
 {
     trace("unknown", 0, traceComponent, level, string);
index 975e7b46d5552cdd6734fa1f76cda81ce9e449f0..b88ae6306e1bb29da9415d8d6c01cf144d325af7 100644 (file)
 //
 //==============================================================================
 //
-// Author: Sushma Fernandes, Hewlett-Packard Company (sushma_fernandes@hp.com)
-//
-// Modified By: Jenny Yu, Hewlett-Packard Company (jenny_yu@hp.com)
-//              Amit K Arora, IBM (amita@in.ibm.com) for PEP#101
-//              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//              David Dillard, Symantec Corp. (david_dillard@symantec.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_Tracer_h
@@ -81,185 +74,185 @@ public:
     static const Uint32 LEVEL4;
 
     /** Traces the specified number of bytes in a given buffer
-       @param    traceComponent  component being traced
-       @param    level      trace level of the trace message
-       @param    data            buffer to be traced
-       @param    size            number of bytes to be traced
+        @param traceComponent  component being traced
+        @param level           trace level of the trace message
+        @param data            buffer to be traced
+        @param size            number of bytes to be traced
      */
     static void traceBuffer(
-       const Uint32 traceComponent,
-       const Uint32 level,
-       const char*  data,
-       const Uint32 size);
+        const Uint32 traceComponent,
+        const Uint32 level,
+        const char*  data,
+        const Uint32 size);
 
     /** Traces the specified number of bytes in a given buffer
-       Overloaded to include the filename and the line number
-       of trace origin.
-       @param    fileName        filename of the trace originator
-       @param    lineNum         line number of the trace originator
-       @param    traceComponent  component being traced
-       @param    level      trace level of the trace message
-       @param    data            buffer to be traced
-       @param    size            size of the buffer
+        Overloaded to include the filename and the line number
+        of trace origin.
+        @param fileName        filename of the trace originator
+        @param lineNum         line number of the trace originator
+        @param traceComponent  component being traced
+        @param level           trace level of the trace message
+        @param data            buffer to be traced
+        @param size            size of the buffer
      */
     static void traceBuffer(
-       const char*  fileName,
-       const Uint32 lineNum,
-       const Uint32 traceComponent,
-       const Uint32 level,
-       const char*  data,
-       const Uint32 size);
+        const char*  fileName,
+        const Uint32 lineNum,
+        const Uint32 traceComponent,
+        const Uint32 level,
+        const char*  data,
+        const Uint32 size);
 
     /** Traces the given message
-       @param    traceComponent  component being traced
-       @param    level      trace level of the trace message
-       @param    *fmt            printf style format string
-       @param    ...             variable argument list
+        @param traceComponent  component being traced
+        @param level           trace level of the trace message
+        @param *fmt            printf style format string
+        @param ...             variable argument list
      */
     static void trace(
-       const Uint32 traceComponent,
-       const Uint32 level,
-       const char *fmt,
-       ...);
+        const Uint32 traceComponent,
+        const Uint32 level,
+        const char *fmt,
+        ...);
 
     /** Traces the given message. Overloaded to include the filename and
-       the line number of trace origin.
-       @param    fileName        filename of the trace originator
-       @param    lineNum         line number of the trace originator
-       @param    traceComponent  component being traced
-       @param    level      trace level of the trace message
-       @param    *fmt            printf style format string
-       @param    ...             variable argument list
+        the line number of trace origin.
+        @param fileName        filename of the trace originator
+        @param lineNum         line number of the trace originator
+        @param traceComponent  component being traced
+        @param level           trace level of the trace message
+        @param *fmt            printf style format string
+        @param ...             variable argument list
      */
     static void trace(
-       const char* fileName,
-       const Uint32 lineNum,
-       const Uint32 traceComponent,
-       const Uint32 level,
-       const char* fmt,
-       ...);
+        const char* fileName,
+        const Uint32 lineNum,
+        const Uint32 traceComponent,
+        const Uint32 level,
+        const char* fmt,
+        ...);
 
     /** Traces the given string.  Overloaded to include the filename
-       and line number of trace origin.
-       @param    fileName        filename of the trace originator
-       @param    lineNum         line number of the trace originator
-       @param    traceComponent  component being traced
-       @param    level      trace level of the trace message
-       @param    string     the string to be traced
+        and line number of trace origin.
+        @param fileName        filename of the trace originator
+        @param lineNum         line number of the trace originator
+        @param traceComponent  component being traced
+        @param level           trace level of the trace message
+        @param string          the string to be traced
      */
     static void trace(
-       const char*   fileName,
-       const Uint32  lineNum,
-       const Uint32  traceComponent,
-       const Uint32  level,
-       const String& string);
+        const char* fileName,
+        const Uint32 lineNum,
+        const Uint32 traceComponent,
+        const Uint32 level,
+        const String& string);
 
     /** Traces the given string.
-       @param    fileName        filename of the trace originator
-       @param    lineNum         line number of the trace originator
-       @param    traceComponent  component being traced
-       @param    level      trace level of the trace message
-       @param    string     the string to be traced
+        @param fileName        filename of the trace originator
+        @param lineNum         line number of the trace originator
+        @param traceComponent  component being traced
+        @param level           trace level of the trace message
+        @param string          the string to be traced
      */
     static void trace(
-       const Uint32  traceComponent,
-       const Uint32  level,
-       const String& string);
+        const Uint32 traceComponent,
+        const Uint32 level,
+        const String& string);
 
     /** Traces the message in the given CIMException object.  The message
-       written to the trace file will include the source filename and
-       line number of the CIMException originator.
-       @param    traceComponent  component being traced
-       @param    level      trace level of the trace message
-       @param    CIMException    the CIMException to be traced.
+        written to the trace file will include the source filename and
+        line number of the CIMException originator.
+        @param traceComponent  component being traced
+        @param level           trace level of the trace message
+        @param CIMException    the CIMException to be traced.
      */
     static void traceCIMException(
-       const Uint32  traceComponent,
-       const Uint32  level,
-       CIMException  cimException);
+        const Uint32 traceComponent,
+        const Uint32 level,
+        const CIMException& cimException);
 
     /** Set the trace file to the given file
-       @param    traceFile       full path of the trace file
-       @return   0               if the filepath is valid
-                 1               if the traceFile is an empty string or
-                                 if an error occurs while opening the file
-                                 in append mode
+        @param  traceFile  full path of the trace file
+        @return 0          if the filepath is valid
+                1          if the traceFile is an empty string or
+                           if an error occurs while opening the file
+                           in append mode
     */
     static Uint32 setTraceFile(const char* traceFile);
 
     /** Set the trace level to the given level
-       @param    level      trace level to be set
-       @return   0               if trace level is valid
-                 1               if trace level is invalid
+        @param  level  trace level to be set
+        @return 0      if trace level is valid
+                1      if trace level is invalid
     */
     static Uint32 setTraceLevel(const Uint32 level);
 
     /** Set components to be traced
-       @param    traceComponents list of components to be traced,
-                 components should be separated by ','
+        @param traceComponents list of components to be traced,
+               components should be separated by ','
     */
     static void setTraceComponents(
        const String& traceComponents);
 
     /** Traces method entry.
-        @param    token           TracerToken 
-        @param    traceComponent  component being traced
-        @param    methodName      method being traced
+        @param token           TracerToken
+        @param traceComponent  component being traced
+        @param methodName      method being traced
      */
     static void traceEnter(
-       TracerToken& token,
-       Uint32 component, 
-       const char* method);
+        TracerToken& token,
+        Uint32 component,
+        const char* method);
 
     /** Traces method exit.
-        @param    token           TracerToken containing component and method
+        @param token TracerToken containing component and method
     */
     static void traceExit(
-       TracerToken& token);
+        TracerToken& token);
 
     /** Traces method entry.
-        @param    token           TracerToken 
-        @param    fileName        filename of the trace originator
-        @param    lineNum         line number of the trace originator
-        @param    traceComponent  component being traced
-        @param    methodName      method being traced
+        @param token           TracerToken
+        @param fileName        filename of the trace originator
+        @param lineNum         line number of the trace originator
+        @param traceComponent  component being traced
+        @param methodName      method being traced
      */
     static void traceEnter(
-       TracerToken& token,
-       const char* file,
-       size_t line,
-       Uint32 component, 
-       const char* method);
+        TracerToken& token,
+        const char* file,
+        size_t line,
+        Uint32 component,
+        const char* method);
 
     /** Traces method exit.
-        @param    token           TracerToken containing component and method
-        @param    fileName        filename of the trace originator
-        @param    lineNum         line number of the trace originator
+        @param token    TracerToken containing component and method
+        @param fileName filename of the trace originator
+        @param lineNum  line number of the trace originator
      */
     static void traceExit(
-       TracerToken& token,
-       const char* file,
-       size_t line);
+        TracerToken& token,
+        const char* file,
+        size_t line);
 
     /** Validates the File Path for the trace File
-        @param    filePath full path of the file
-        @return   1        if the file path is valid
-                  0        if the file path is invalid
+        @param  filePath full path of the file
+        @return 1        if the file path is valid
+                0        if the file path is invalid
      */
     static Boolean isValidFileName(const char* filePath);
 
     /** Validates the trace components
-        @param    traceComponents   comma separated list of trace components
-        @return   1        if the components are valid
-                  0        if one or more components are invalid
+        @param  traceComponents   comma separated list of trace components
+        @return 1        if the components are valid
+                0        if one or more components are invalid
      */
     static Boolean isValidComponents(const String& traceComponents);
 
     /** Validates the trace components
-        @param    traceComponents   comma separated list of trace components
-        @param    invalidComponents comma separated list of invalid components
-        @return   1        if the components are valid
-                  0        if one or more components are invalid
+        @param  traceComponents   comma separated list of trace components
+        @param  invalidComponents comma separated list of invalid components
+        @return 1        if the components are valid
+                0        if one or more components are invalid
      */
     static Boolean isValidComponents(
         const String& traceComponents,
@@ -267,7 +260,7 @@ public:
 
     /** Specify the name of the module being traced.  If non-empty, this
         value is used as an extension to the name of the trace file.
-        @param    moduleName   Name of the module being traced.
+        @param  moduleName Name of the module being traced.
      */
     static void setModuleName(const String& moduleName);
 
@@ -309,8 +302,8 @@ private:
     // @return   0               if the component and level are not enabled
     //           1               if the component and level are enabled
     static Boolean _isTraceEnabled(
-       const Uint32 traceComponent,
-       const Uint32 level);
+        const Uint32 traceComponent,
+        const Uint32 level);
 
     // Traces the given message
     //  @param    traceComponent  component being traced
@@ -318,10 +311,10 @@ private:
     //  @param    *fmt            printf style format string
     //  @param    argList         variable argument list
     static void _trace(
-       const Uint32 traceComponent,
+        const Uint32 traceComponent,
         const Uint32 level,
-       const char* fmt,
-       va_list argList);
+        const char* fmt,
+        va_list argList);
 
     // Traces the given message. Overloaded to include the file name and the
     // line number as one of the parameters.
@@ -331,12 +324,12 @@ private:
     // @param    *fmt            printf style format string
     // @param    argList         variable argument list
     static void _trace(
-       const char* fileName,
-       const Uint32 lineNum,
-       const Uint32 traceComponent,
+        const char* fileName,
+        const Uint32 lineNum,
+        const Uint32 traceComponent,
         const Uint32 level,
-       const char* fmt,
-       va_list argList);
+        const char* fmt,
+        va_list argList);
 
     //  Traces the specified number of bytes in a given buffer
     //  @param    traceComponent  component being traced
@@ -344,9 +337,9 @@ private:
     //  @param    data            buffer to be traced
     //  @param    size            number of bytes to be traced
     static void _traceBuffer(
-       const Uint32 traceComponent,
+        const Uint32 traceComponent,
         const Uint32 level,
-        const char*  data,
+        const char* data,
         const Uint32 size);
 
     //  Traces the specified number of bytes in a given buffer
@@ -359,11 +352,11 @@ private:
     //  @param    data            buffer to be traced
     //  @param    size            size of the buffer
     static void _traceBuffer(
-       const char*  fileName,
-       const Uint32 lineNum,
-       const Uint32 traceComponent,
+        const char* fileName,
+        const Uint32 lineNum,
+        const Uint32 traceComponent,
         const Uint32 level,
-        const char*  data,
+        const char* data,
         const Uint32 size);
 
     //  Traces the given string.
@@ -372,8 +365,8 @@ private:
     //  @param    string     the string to be traced
     //
     static void _traceString(
-        const Uint32  traceComponent,
-        const Uint32  level,
+        const Uint32 traceComponent,
+        const Uint32 level,
         const String& string);
 
     //  Traces a given string.  Overloaded to include the filename
@@ -385,10 +378,10 @@ private:
     //  @param    string     the string to be traced
     //
     static void _traceString(
-        const char*   fileName,
-        const Uint32  lineNum,
-        const Uint32  traceComponent,
-        const Uint32  level,
+        const char* fileName,
+        const Uint32 lineNum,
+        const Uint32 traceComponent,
+        const Uint32 level,
         const String& string);
 
     //  Traces the message in the given CIMException object.  The message
@@ -399,9 +392,9 @@ private:
     //  @param    CIMException    the CIMException to be traced.
     //
     static void _traceCIMException(
-        const Uint32  traceComponent,
-        const Uint32  level,
-        CIMException  cimException);
+        const Uint32 traceComponent,
+        const Uint32 level,
+        const CIMException& cimException);
 
     // Called by all the trace interfaces to log message to the
     // trace file
@@ -411,10 +404,10 @@ private:
     // @param    *fmt            printf style format string
     // @param    argList         variable argument list
     static void _trace(
-       const Uint32 traceComponent,
-       const char* message,
-       const char* fmt,
-       va_list argList);
+        const Uint32 traceComponent,
+        const char* message,
+        const char* fmt,
+        va_list argList);
 
     // Traces method enter
     // @param    fileName        filename of the trace originator
@@ -423,11 +416,11 @@ private:
     // @param    *fmt            printf style format string
     // @param    ...             variable argument list
     static void _traceEnter(
-       const char* fileName,
-       const Uint32 lineNum,
-       const Uint32 traceComponent,
-       const char* fmt,
-       ...);
+        const char* fileName,
+        const Uint32 lineNum,
+        const Uint32 traceComponent,
+        const char* fmt,
+        ...);
 
     // Traces method exit
     // @param    fileName        filename of the trace originator
@@ -435,11 +428,11 @@ private:
     // @param    *fmt            printf style format string
     // @param    ...             variable argument list
     static void _traceExit(
-       const char* fileName,
-       const Uint32 lineNum,
-       const Uint32 traceComponent,
-       const char* fmt,
-       ...);
+        const char* fileName,
+        const Uint32 lineNum,
+        const Uint32 traceComponent,
+        const char* fmt,
+        ...);
 
     // Tracer constructor
     // Constructor is private to prevent construction of Tracer objects
@@ -493,7 +486,7 @@ inline void Tracer::trace(
 }
 
 inline void Tracer::trace(
-    const char*  fileName,
+    const char* fileName,
     const Uint32 lineNum,
     const Uint32 traceComponent,
     const Uint32 level,
@@ -504,27 +497,27 @@ inline void Tracer::trace(
 }
 
 inline void Tracer::trace(
-    const char*   fileName,
-    const Uint32  lineNum,
-    const Uint32  traceComponent,
-    const Uint32  level,
+    const char* fileName,
+    const Uint32 lineNum,
+    const Uint32 traceComponent,
+    const Uint32 level,
     const String& string)
 {
     // empty function
 }
 
 inline void Tracer::trace(
-    const Uint32  traceComponent,
-    const Uint32  level,
+    const Uint32 traceComponent,
+    const Uint32 level,
     const String& string)
 {
     // empty function
 }
 
 inline void Tracer::traceCIMException(
-    const Uint32  traceComponent,
-    const Uint32  level,
-    CIMException  cimException)
+    const Uint32 traceComponent,
+    const Uint32 level,
+    const CIMException& cimException)
 {
     // empty function
 }
@@ -585,19 +578,19 @@ inline void Tracer::setTraceComponents(const String& traceComponents)
 # define PEG_TRACE_STRING(comp, level, string) \
     do \
     { \
-           Tracer::trace(PEGASUS_FILE_LINE_COMMA comp, level, string); \
+            Tracer::trace(PEGASUS_FILE_LINE_COMMA comp, level, string); \
     } \
     while (0)
 
-// Macro for Trace variable number of arguments with format string. The trace test
-// is included becase of the possible cost of preparing the variable
+// Macro for Trace variable number of arguments with format string. The trace
+// test is included becase of the possible cost of preparing the variable
 // number of arguments on each call.  The d construct allows this to be
 // treated as a single statement.
 # define PEG_TRACE(VAR_ARGS) \
     do \
     { \
-       if (Tracer::isTraceOn()) \
-           Tracer::trace VAR_ARGS; \
+        if (Tracer::isTraceOn()) \
+            Tracer::trace VAR_ARGS; \
     } \
     while (0)
 
index d233498172dba11722c7b00ebce48b88339e0cc4..107accf0e7543582d1cdb20efa4f575e24f53faa 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By: Mike Brasher, Inova Europe (mike-brasher@austin.rr.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include "Union.h"
index 96ce7d819f4007f22bb142d0b21b601d5c3b6f2e..da4f68e3673ae5262721ce76a3af1ee061ab1468 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//              Dave Sudlik, IBM (dsudlik@us.ibm.com)
-//              Mike Brasher, Inova Europe (mike-brasher@austin.rr.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_Union_h
@@ -48,7 +42,7 @@ struct StringRep;
 
 /** This union is used to represent the values of properties, qualifiers,
     method return values, and method arguments. All of the types
-    defined in CIMType.h are represented by a Union. The 
+    defined in CIMType.h are represented by a Union. The
     Union is used as the the basis for the CIMValue implementation.
 */
 union Union
@@ -69,9 +63,9 @@ union Union
     char _dateTimeValue[sizeof(void*)];
     char _referenceValue[sizeof(void*)];
     char _objectValue[sizeof(void*)];
-#ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT 
+#ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
     char _instanceValue[sizeof(void*)];
-#endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT 
+#endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
 
     char _booleanArray[sizeof(void*)];
     char _uint8Array[sizeof(void*)];
@@ -89,9 +83,9 @@ union Union
     char _dateTimeArray[sizeof(void*)];
     char _referenceArray[sizeof(void*)];
     char _objectArray[sizeof(void*)];
-#ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT 
+#ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
     char _instanceArray[sizeof(void*)];
-#endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT 
+#endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
     void* _voidPtr;
 };
 
index dbada48b4ea5b4e4ed835c100b71b6aaad0ca000..89180d0c38f1544eaf90edd6c79e97a2faed0c56 100644 (file)
 //
 //==============================================================================
 //
-// Author: Carol Ann Krug Graves, Hewlett-Packard Company 
-//         (carolann_graves@hp.com)
-//
-// Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_XmlConstants_h
@@ -45,7 +40,7 @@ PEGASUS_NAMESPACE_BEGIN
 
 //
 //  This include file contains constants related to the CIM XML encoding,
-//  including XML elements, and exception message strings appropriate for 
+//  including XML elements, and exception message strings appropriate for
 //  XML validation exception conditions.
 //
 
@@ -94,12 +89,11 @@ static const char XML_ELEMENT_LOCALINSTANCEPATH [] = "LOCALINSTANCEPATH";
  *  &lt;MULTIREQ&gt; element.
  *
  */
-static const char MISSING_ELEMENT_REQ [] = 
+static const char MISSING_ELEMENT_REQ [] =
     "expected SIMPLEREQ or MULTIREQ element";
-    
-//l10n
-static const char MISSING_ELEMENT_REQ_KEY [] = 
-       "Common.XmlConstants.MISSING_ELEMENT_REQ";
+
+static const char MISSING_ELEMENT_REQ_KEY [] =
+    "Common.XmlConstants.MISSING_ELEMENT_REQ";
 
 /**
  *
@@ -107,12 +101,12 @@ static const char MISSING_ELEMENT_REQ_KEY [] =
  *  &lt;LOCALINSTANCEPATH&gt; element.
  *
  */
-static const char MISSING_ELEMENT_LOCALPATH [] = 
+static const char MISSING_ELEMENT_LOCALPATH [] =
     "expected LOCALCLASSPATH or LOCALINSTANCEPATH element";
 
-//l10n
 static const char MISSING_ELEMENT_LOCALPATH_KEY [] =
-       "Common.XmlConstants.MISSING_ELEMENT_LOCALPATH_KEY";
+    "Common.XmlConstants.MISSING_ELEMENT_LOCALPATH_KEY";
+
 PEGASUS_NAMESPACE_END
 
 #endif /* Pegasus_XmlConstants_h */
index c39e07f695ac2e46d43887a05961b379f3abf588..9ffc7facf3754400507fa3bfb365cb2ef4c124b0 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By: David Dillard, VERITAS Software Corp.
-//                  (david.dillard@veritas.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -83,7 +78,7 @@
 //
 // TODO:
 //
-//      ATTN: KS P1 4 Mar 2002. Review the following TODOs to see if there is 
+//      ATTN: KS P1 4 Mar 2002. Review the following TODOs to see if there is
 //      work. Handle <!DOCTYPE...> sections which are complicated (containing
 //        rules rather than references to files).
 //
@@ -229,7 +224,10 @@ static String _formMessage(Uint32 code, Uint32 line, const String& message)
 }
 */
 
-static MessageLoaderParms _formMessage(Uint32 code, Uint32 line, const String& message)
+static MessageLoaderParms _formMessage(
+    Uint32 code,
+    Uint32 line,
+    const String& message)
 {
     String dftMsg = _xmlMessages[Uint32(code) - 1];
     String key = _xmlKeys[Uint32(code) - 1];
@@ -291,7 +289,6 @@ XmlValidationError::XmlValidationError(
     const String& message)
     : XmlException(XmlException::VALIDATION_ERROR, lineNumber, message)
 {
-
 }
 
 
@@ -300,7 +297,6 @@ XmlValidationError::XmlValidationError(
     MessageLoaderParms& msgParms)
     : XmlException(XmlException::VALIDATION_ERROR, lineNumber, msgParms)
 {
-
 }
 
 
@@ -315,7 +311,6 @@ XmlSemanticError::XmlSemanticError(
     const String& message)
     : XmlException(XmlException::SEMANTIC_ERROR, lineNumber, message)
 {
-
 }
 
 
@@ -324,7 +319,6 @@ XmlSemanticError::XmlSemanticError(
     MessageLoaderParms& msgParms)
     : XmlException(XmlException::SEMANTIC_ERROR, lineNumber, msgParms)
 {
-
 }
 
 
@@ -334,10 +328,13 @@ XmlSemanticError::XmlSemanticError(
 //
 ////////////////////////////////////////////////////////////////////////////////
 
-XmlParser::XmlParser(char* text) : _line(1), _text(text), _current(text),
-    _restoreChar('\0'), _foundRoot(false)
+XmlParser::XmlParser(char* text)
+    : _line(1),
+      _text(text),
+      _current(text),
+      _restoreChar('\0'),
+      _foundRoot(false)
 {
-
 }
 
 inline void _skipWhitespace(Uint32& line, char*& p)
@@ -483,7 +480,7 @@ static void _normalize(Uint32& line, char*& p, char end_char, char*& start)
         }
     }
 
-    // We encountered a the end_char or a zero-terminator. 
+    // We encountered a the end_char or a zero-terminator.
 
     *q = *p;
 
@@ -608,7 +605,7 @@ XmlParser::~XmlParser()
 }
 
 // A-Za-z0-9_-:.
-static unsigned char _isInnerElementChar[] = 
+static unsigned char _isInnerElementChar[] =
 {
     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
     0,0,0,0,0,0,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,
index 9ffe2968f3ef6b70ba7187d2195cc9244de8d2f0..e757efdf06e006b8c463eba9a81fa33ba3081639 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By: David Dillard, VERITAS Software Corp.
-//                  (david.dillard@veritas.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_XmlParser_h
@@ -54,36 +49,36 @@ public:
 
     enum Code
     {
-       BAD_START_TAG = 1,
-       BAD_END_TAG,
-       BAD_ATTRIBUTE_NAME,
-       EXPECTED_EQUAL_SIGN,
-       BAD_ATTRIBUTE_VALUE,
-       MINUS_MINUS_IN_COMMENT,
-       UNTERMINATED_COMMENT,
-       UNTERMINATED_CDATA,
-       UNTERMINATED_DOCTYPE,
-       TOO_MANY_ATTRIBUTES,
-       MALFORMED_REFERENCE,
-       EXPECTED_COMMENT_OR_CDATA,
-       START_END_MISMATCH,
-       UNCLOSED_TAGS,
-       MULTIPLE_ROOTS,
-       VALIDATION_ERROR,
-       SEMANTIC_ERROR
+        BAD_START_TAG = 1,
+        BAD_END_TAG,
+        BAD_ATTRIBUTE_NAME,
+        EXPECTED_EQUAL_SIGN,
+        BAD_ATTRIBUTE_VALUE,
+        MINUS_MINUS_IN_COMMENT,
+        UNTERMINATED_COMMENT,
+        UNTERMINATED_CDATA,
+        UNTERMINATED_DOCTYPE,
+        TOO_MANY_ATTRIBUTES,
+        MALFORMED_REFERENCE,
+        EXPECTED_COMMENT_OR_CDATA,
+        START_END_MISMATCH,
+        UNCLOSED_TAGS,
+        MULTIPLE_ROOTS,
+        VALIDATION_ERROR,
+        SEMANTIC_ERROR
     };
 
 
     XmlException(
-       Code code, 
-       Uint32 lineNumber,
-       const String& message = String());
-       
-       
+        Code code,
+        Uint32 lineNumber,
+        const String& message = String());
+
+
     XmlException(
-       Code code, 
-       Uint32 lineNumber,
-       MessageLoaderParms& msgParms);
+        Code code,
+        Uint32 lineNumber,
+        MessageLoaderParms& msgParms);
 
 
     XmlException::Code getCode() const { return _code; }
@@ -98,7 +93,7 @@ class PEGASUS_COMMON_LINKAGE XmlValidationError : public XmlException
 public:
 
     XmlValidationError(Uint32 lineNumber, const String& message);
-    XmlValidationError(Uint32 lineNumber, MessageLoaderParms& msgParms);     
+    XmlValidationError(Uint32 lineNumber, MessageLoaderParms& msgParms);
 };
 
 class PEGASUS_COMMON_LINKAGE XmlSemanticError : public XmlException
@@ -106,7 +101,7 @@ class PEGASUS_COMMON_LINKAGE XmlSemanticError : public XmlException
 public:
 
     XmlSemanticError(Uint32 lineNumber, const String& message);
-    XmlSemanticError(Uint32 lineNumber, MessageLoaderParms& msgParms);    
+    XmlSemanticError(Uint32 lineNumber, MessageLoaderParms& msgParms);
 };
 
 struct XmlAttribute
@@ -119,14 +114,14 @@ struct PEGASUS_COMMON_LINKAGE XmlEntry
 {
     enum CIMType
     {
-       XML_DECLARATION,
-       START_TAG, 
-       EMPTY_TAG, 
-       END_TAG, 
-       COMMENT,
-       CDATA,
-       DOCTYPE,
-       CONTENT
+        XML_DECLARATION,
+        START_TAG,
+        EMPTY_TAG,
+        END_TAG,
+        COMMENT,
+        CDATA,
+        DOCTYPE,
+        CONTENT
     };
 
     enum { MAX_ATTRIBUTES = 10 };
@@ -198,7 +193,7 @@ private:
 };
 
 PEGASUS_COMMON_LINKAGE void XmlAppendCString(
-    Buffer& out, 
+    Buffer& out,
     const char* str);
 
 PEGASUS_NAMESPACE_END
index afd917dda2e69ac0e12b68a810c647b9bbf268ef..a05b42de311630b80120ec8bd387114f7fba22e2 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By: Carol Ann Krug Graves, Hewlett-Packard Company
-//                  (carolann_graves@hp.com)
-//              Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com)
-//              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//              Sean Keenan, Hewlett-Packard Company (sean.keenan@hp.com)
-//              Josephine Eskaline Joyce, IBM (jojustin@in.ibm.com) for Bug#3103
-//
 //%/////////////////////////////////////////////////////////////////////////////
 #include <Pegasus/Common/Config.h>
 #include <errno.h>
@@ -45,7 +36,7 @@
 #include <cstdio>
 #include <cstdlib>
 #if defined(PEGASUS_OS_TYPE_UNIX) || defined(PEGASUS_OS_VMS)
-#include <errno.h>
+# include <errno.h>
 #endif
 #include "CIMName.h"
 #include "XmlReader.h"
@@ -59,9 +50,9 @@
 #include "System.h"
 #include "XmlConstants.h"
 #ifdef PEGASUS_PLATFORM_OS400_ISERIES_IBM
-#include "EBCDIC_OS400.h"
+# include "EBCDIC_OS400.h"
 #endif
-// l10n
+
 #include <Pegasus/Common/MessageLoader.h>
 #include <Pegasus/Common/AutoPtr.h>
 #include "CIMNameUnchecked.h"
@@ -83,40 +74,28 @@ static const Uint32 MESSAGE_SIZE = 128;
 //------------------------------------------------------------------------------
 
 void XmlReader::getXmlDeclaration(
-    XmlParser& parser, 
+    XmlParser& parser,
     const char*& xmlVersion,
     const char*& xmlEncoding)
 {
     XmlEntry entry;
 
     if (!parser.next(entry) ||
-       entry.type != XmlEntry::XML_DECLARATION ||
-       strcmp(entry.text, "xml") != 0)
+        entry.type != XmlEntry::XML_DECLARATION ||
+        strcmp(entry.text, "xml") != 0)
     {
-
-      // l10n
-
-      // throw XmlValidationError(parser.getLine(),
-      //   "Expected <?xml ... ?> style declaration");
-
-      MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_XML_STYLE",
-                                "Expected <?xml ... ?> style declaration");
-
-      throw XmlValidationError(parser.getLine(), mlParms);
-
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.EXPECTED_XML_STYLE",
+            "Expected <?xml ... ?> style declaration");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 
-    if (!entry.getAttributeValue("version", xmlVersion)) {
-
-      // l10n
-
-      // throw XmlValidationError(
-      //   parser.getLine(), "missing xml.version attribute");
-
-      MessageLoaderParms mlParms("Common.XmlReader.MISSING_XML_ATTRIBUTE",
-                                "missing xml.version attribute");
-
-      throw XmlValidationError(parser.getLine(), mlParms);
+    if (!entry.getAttributeValue("version", xmlVersion))
+    {
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.MISSING_XML_ATTRIBUTE",
+            "missing xml.version attribute");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 
     if (!entry.getAttributeValue("encoding", xmlEncoding))
@@ -153,25 +132,19 @@ Boolean XmlReader::testXmlDeclaration (
 //------------------------------------------------------------------------------
 
 void XmlReader::expectStartTag(
-    XmlParser& parser, 
+    XmlParser& parser,
     XmlEntry& entry,
     const char* tagName)
 {
     if (!parser.next(entry) ||
-       entry.type != XmlEntry::START_TAG ||
-       strcmp(entry.text, tagName) != 0)
+        entry.type != XmlEntry::START_TAG ||
+        strcmp(entry.text, tagName) != 0)
     {
-      // l10n
-
-      // char message[MESSAGE_SIZE];
-      // sprintf(message, "Expected open of %s element", tagName);
-      // throw XmlValidationError(parser.getLine(), message);
-
-      MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_OPEN",
-                                "Expected open of $0 element",
-                                tagName);
-
-      throw XmlValidationError(parser.getLine(), mlParms);
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.EXPECTED_OPEN",
+            "Expected open of $0 element",
+            tagName);
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 }
 
@@ -186,22 +159,14 @@ void XmlReader::expectEndTag(XmlParser& parser, const char* tagName)
     XmlEntry entry;
 
     if (!parser.next(entry) ||
-       entry.type != XmlEntry::END_TAG ||
-       strcmp(entry.text, tagName) != 0)
+        entry.type != XmlEntry::END_TAG ||
+        strcmp(entry.text, tagName) != 0)
     {
-
-      // l10n
-
-      // char message[MESSAGE_SIZE];
-      // sprintf(message, "Expected close of %s element, got %s instead",
-      //     tagName,entry.text);
-      // throw XmlValidationError(parser.getLine(), message);
-
-      MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_CLOSE",
-                                "Expected close of $0 element, got $1 instead",
-                                tagName,entry.text);
-
-      throw XmlValidationError(parser.getLine(), mlParms);
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.EXPECTED_CLOSE",
+            "Expected close of $0 element, got $1 instead",
+            tagName,entry.text);
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 }
 
@@ -212,27 +177,20 @@ void XmlReader::expectEndTag(XmlParser& parser, const char* tagName)
 //------------------------------------------------------------------------------
 
 void XmlReader::expectStartTagOrEmptyTag(
-    XmlParser& parser, 
+    XmlParser& parser,
     XmlEntry& entry,
     const char* tagName)
 {
     if (!parser.next(entry) ||
-       (entry.type != XmlEntry::START_TAG &&
-       entry.type != XmlEntry::EMPTY_TAG) ||
-       strcmp(entry.text, tagName) != 0)
+        (entry.type != XmlEntry::START_TAG &&
+        entry.type != XmlEntry::EMPTY_TAG) ||
+        strcmp(entry.text, tagName) != 0)
     {
-      // l10n
-      
-      // char message[MESSAGE_SIZE];
-      // sprintf(message, 
-      //   "Expected either open or open/close %s element", tagName);
-      // throw XmlValidationError(parser.getLine(), message);
-
-      MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_OPENCLOSE",
-                                "Expected either open or open/close $0 element",
-                                tagName);
-
-      throw XmlValidationError(parser.getLine(), mlParms);
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.EXPECTED_OPENCLOSE",
+            "Expected either open or open/close $0 element",
+            tagName);
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 }
 
@@ -243,23 +201,17 @@ void XmlReader::expectStartTagOrEmptyTag(
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::expectContentOrCData(
-    XmlParser& parser, 
+    XmlParser& parser,
     XmlEntry& entry)
 {
     if (!parser.next(entry) ||
-       (entry.type != XmlEntry::CONTENT &&
-       entry.type != XmlEntry::CDATA))
+        (entry.type != XmlEntry::CONTENT &&
+        entry.type != XmlEntry::CDATA))
     {
-      // l10n
-
-      // throw XmlValidationError(parser.getLine(),
-      //              "Expected content of CDATA");
-
-      MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_CDATA",
-                                "Expected content of CDATA");
-
-      throw XmlValidationError(parser.getLine(), mlParms);
-
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.EXPECTED_CDATA",
+            "Expected content of CDATA");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 
     return true;
@@ -272,16 +224,16 @@ Boolean XmlReader::expectContentOrCData(
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::testStartTag(
-    XmlParser& parser, 
+    XmlParser& parser,
     XmlEntry& entry,
     const char* tagName)
 {
     if (!parser.next(entry) ||
-       entry.type != XmlEntry::START_TAG ||
-       strcmp(entry.text, tagName) != 0)
+        entry.type != XmlEntry::START_TAG ||
+        strcmp(entry.text, tagName) != 0)
     {
-       parser.putBack(entry);
-       return false;
+        parser.putBack(entry);
+        return false;
     }
 
     return true;
@@ -298,11 +250,11 @@ Boolean XmlReader::testEndTag(XmlParser& parser, const char* tagName)
     XmlEntry entry;
 
     if (!parser.next(entry) ||
-       entry.type != XmlEntry::END_TAG ||
-       strcmp(entry.text, tagName) != 0)
+        entry.type != XmlEntry::END_TAG ||
+        strcmp(entry.text, tagName) != 0)
     {
-       parser.putBack(entry);
-       return false;
+        parser.putBack(entry);
+        return false;
     }
 
     return true;
@@ -315,17 +267,17 @@ Boolean XmlReader::testEndTag(XmlParser& parser, const char* tagName)
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::testStartTagOrEmptyTag(
-    XmlParser& parser, 
+    XmlParser& parser,
     XmlEntry& entry,
     const char* tagName)
 {
     if (!parser.next(entry) ||
        (entry.type != XmlEntry::START_TAG &&
         entry.type != XmlEntry::EMPTY_TAG) ||
-           strcmp(entry.text, tagName) != 0)
+        strcmp(entry.text, tagName) != 0)
     {
-           parser.putBack(entry);
-           return false;
+        parser.putBack(entry);
+        return false;
     }
 
     return true;
@@ -338,15 +290,15 @@ Boolean XmlReader::testStartTagOrEmptyTag(
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::testStartTagOrEmptyTag(
-    XmlParser& parser, 
+    XmlParser& parser,
     XmlEntry& entry)
 {
     if (!parser.next(entry) ||
-       (entry.type != XmlEntry::START_TAG &&
-        entry.type != XmlEntry::EMPTY_TAG))
+        (entry.type != XmlEntry::START_TAG &&
+         entry.type != XmlEntry::EMPTY_TAG))
     {
-       parser.putBack(entry);
-       return false;
+        parser.putBack(entry);
+        return false;
     }
 
     return true;
@@ -359,15 +311,15 @@ Boolean XmlReader::testStartTagOrEmptyTag(
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::testContentOrCData(
-    XmlParser& parser, 
+    XmlParser& parser,
     XmlEntry& entry)
 {
     if (!parser.next(entry) ||
-       (entry.type != XmlEntry::CONTENT &&
-       entry.type != XmlEntry::CDATA))
+        (entry.type != XmlEntry::CONTENT &&
+        entry.type != XmlEntry::CDATA))
     {
-       parser.putBack(entry);
-       return false;
+        parser.putBack(entry);
+        return false;
     }
 
     return true;
@@ -378,44 +330,34 @@ Boolean XmlReader::testContentOrCData(
 // getCimStartTag()
 //
 //     <!ELEMENT CIM (MESSAGE|DECLARATION)>
-//     <!ATTRLIST CIM 
+//     <!ATTRLIST CIM
 //         CIMVERSION CDATA #REQUIRED
 //         DTDVERSION CDATA #REQUIRED>
 //
 //------------------------------------------------------------------------------
 
 void XmlReader::getCimStartTag(
-    XmlParser& parser, 
+    XmlParser& parser,
     const char*& cimVersion,
     const char*& dtdVersion)
 {
     XmlEntry entry;
     XmlReader::expectStartTag(parser, entry, "CIM");
 
-    if (!entry.getAttributeValue("CIMVERSION", cimVersion)) {
-
-      // l10n
-
-      // throw XmlValidationError(
-      //   parser.getLine(), "missing CIM.CIMVERSION attribute");
-
-      MessageLoaderParms mlParms("Common.XmlReader.MISSING_CIMVERSION_ATTRIBUTE",
-                                "missing CIM.CIMVERSION attribute");
-
-      throw XmlValidationError(parser.getLine(), mlParms);
+    if (!entry.getAttributeValue("CIMVERSION", cimVersion))
+    {
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.MISSING_CIMVERSION_ATTRIBUTE",
+            "missing CIM.CIMVERSION attribute");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 
-    if (!entry.getAttributeValue("DTDVERSION", dtdVersion)){
-
-      // l10n
-      
-      // throw XmlValidationError(
-      //   parser.getLine(), "missing CIM.DTDVERSION attribute");
-      
-      MessageLoaderParms mlParms("Common.XmlReader.MISSING_DTDVERSION_ATTRIBUTE",
-                                "missing CIM.DTDVERSION attribute");
-      
-      throw XmlValidationError(parser.getLine(), mlParms);
+    if (!entry.getAttributeValue("DTDVERSION", dtdVersion))
+    {
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.MISSING_DTDVERSION_ATTRIBUTE",
+            "missing CIM.DTDVERSION attribute");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 }
 
@@ -428,7 +370,7 @@ void XmlReader::getCimStartTag(
 //------------------------------------------------------------------------------
 
 CIMName XmlReader::getCimNameAttribute(
-    Uint32 lineNumber, 
+    Uint32 lineNumber,
     const XmlEntry& entry,
     const char* elementName,
     Boolean acceptNull)
@@ -436,47 +378,36 @@ CIMName XmlReader::getCimNameAttribute(
     String name;
 
     if (!entry.getAttributeValue("NAME", name))
-      {
-
-       // l10n
-
-       // char buffer[MESSAGE_SIZE];
-       // sprintf(buffer, "missing %s.NAME attribute", elementName);
-       // throw XmlValidationError(lineNumber, buffer);
-
-       char buffer[MESSAGE_SIZE];
-       sprintf(buffer, "%s.NAME", elementName);
-       MessageLoaderParms mlParms("Common.XmlReader.MISSING_ATTRIBUTE",
-                                  "missing $0 attribute",
-                                  buffer);
+    {
+        char buffer[MESSAGE_SIZE];
+        sprintf(buffer, "%s.NAME", elementName);
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.MISSING_ATTRIBUTE",
+            "missing $0 attribute",
+            buffer);
 
-       throw XmlValidationError(lineNumber, mlParms);
+        throw XmlValidationError(lineNumber, mlParms);
     }
 
     if (acceptNull && name.size() == 0)
-       return CIMName ();
-    
+        return CIMName ();
+
     if (!CIMName::legal(name))
     {
 #ifdef PEGASUS_SNIA_INTEROP_TEST
     // In testing, replace illegal CIMName with this value to avoid the
-    // exception and let xml parsing continue.  THIS IS TEMP.    
+    // exception and let xml parsing continue.  THIS IS TEMP.
     name = "BADNAMESUBSTITUTEDBYPEGASUSCLIENT";
 #else
 
-    // l10n
-
-    // char buffer[MESSAGE_SIZE];
-    // sprintf(buffer, "Illegal value for %s.NAME attribute", elementName);
-    // throw XmlSemanticError(lineNumber, buffer);
-
     char buffer[MESSAGE_SIZE];
     sprintf(buffer, "%s.NAME", elementName);
-    
-    MessageLoaderParms mlParms("Common.XmlReader.ILLEGAL_VALUE_FOR_ATTRIBUTE",
-                              "Illegal value for $0 attribute",
-                              buffer);
-    
+
+    MessageLoaderParms mlParms(
+        "Common.XmlReader.ILLEGAL_VALUE_FOR_ATTRIBUTE",
+        "Illegal value for $0 attribute",
+        buffer);
+
     throw XmlSemanticError(lineNumber, mlParms);
 
 #endif
@@ -493,7 +424,7 @@ CIMName XmlReader::getCimNameAttribute(
 //------------------------------------------------------------------------------
 
 String XmlReader::getClassNameAttribute(
-    Uint32 lineNumber, 
+    Uint32 lineNumber,
     const XmlEntry& entry,
     const char* elementName)
 {
@@ -501,43 +432,27 @@ String XmlReader::getClassNameAttribute(
 
     if (!entry.getAttributeValue("CLASSNAME", name))
     {
+        char buffer[MESSAGE_SIZE];
+        sprintf(buffer, "%s.CLASSNAME", elementName);
 
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.MISSING_ATTRIBUTE",
+            "missing $0 attribute",
+            buffer);
 
-      // l10n
-
-      // char buffer[MESSAGE_SIZE];
-      // sprintf(buffer, "missing %s.CLASSNAME attribute", elementName);
-      // throw XmlValidationError(lineNumber, buffer);
-
-      char buffer[MESSAGE_SIZE];
-      sprintf(buffer, "%s.CLASSNAME", elementName);
-
-      MessageLoaderParms mlParms("Common.XmlReader.MISSING_ATTRIBUTE",
-                                "missing $0 attribute",
-                                buffer);
-
-      throw XmlValidationError(lineNumber, mlParms);
-
+        throw XmlValidationError(lineNumber, mlParms);
     }
 
     if (!CIMName::legal(name))
     {
-      // l10n
+        char buffer[MESSAGE_SIZE];
+        sprintf(buffer, "%s.CLASSNAME", elementName);
 
-      // char buffer[MESSAGE_SIZE];
-      // sprintf(buffer, 
-      //   "Illegal value for %s.CLASSNAME attribute", elementName);
-      // throw XmlSemanticError(lineNumber, buffer);
-
-      char buffer[MESSAGE_SIZE];
-      sprintf(buffer, "%s.CLASSNAME", elementName);
-      
-      MessageLoaderParms mlParms("Common.XmlReader.ILLEGAL_VALUE_FOR_ATTRIBUTE",
-                                "Illegal value for $0 attribute",
-                                buffer);
-      
-      throw XmlSemanticError(lineNumber, mlParms);
-      
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.ILLEGAL_VALUE_FOR_ATTRIBUTE",
+            "Illegal value for $0 attribute",
+            buffer);
+        throw XmlSemanticError(lineNumber, mlParms);
     }
 
     return name;
@@ -552,32 +467,25 @@ String XmlReader::getClassNameAttribute(
 //------------------------------------------------------------------------------
 
 CIMName XmlReader::getClassOriginAttribute(
-    Uint32 lineNumber, 
+    Uint32 lineNumber,
     const XmlEntry& entry,
     const char* tagName)
 {
     String name;
 
     if (!entry.getAttributeValue("CLASSORIGIN", name))
-       return CIMName();
+        return CIMName();
 
     if (!CIMName::legal(name))
     {
-      // l10n
+        char buffer[MESSAGE_SIZE];
+        sprintf(buffer, "%s.CLASSORIGIN", tagName);
 
-      // char buffer[MESSAGE_SIZE];
-      // sprintf(buffer, 
-      //    "Illegal value for %s.CLASSORIGIN attribute", tagName);
-      // throw XmlSemanticError(lineNumber, buffer);
-
-      char buffer[MESSAGE_SIZE];
-      sprintf(buffer, "%s.CLASSORIGIN", tagName);
-      
-      MessageLoaderParms mlParms("Common.XmlReader.ILLEGAL_VALUE_FOR_ATTRIBUTE",
-                                "Illegal value for $0 attribute",
-                                buffer);
-      
-      throw XmlSemanticError(lineNumber, mlParms);
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.ILLEGAL_VALUE_FOR_ATTRIBUTE",
+            "Illegal value for $0 attribute",
+            buffer);
+        throw XmlSemanticError(lineNumber, mlParms);
     }
 
     return name;
@@ -592,38 +500,28 @@ CIMName XmlReader::getClassOriginAttribute(
 //------------------------------------------------------------------------------
 
 String XmlReader::getEmbeddedObjectAttribute(
-    Uint32 lineNumber, 
+    Uint32 lineNumber,
     const XmlEntry& entry,
     const char* elementName)
 {
     String embeddedObject;
 
     if (!entry.getAttributeValue("EMBEDDEDOBJECT", embeddedObject))
-       return String();
+        return String();
 
     // The embeddedObject attribute, if present, must have the string
     // value "object" or "instance".
     if (!(String::equal(embeddedObject, "object") ||
-          String::equal(embeddedObject, "instance")
-          )
-        )
+          String::equal(embeddedObject, "instance")))
     {
-      // l10n
-
-      // char buffer[MESSAGE_SIZE];
-      // sprintf(buffer, 
-      //   "Illegal value for %s.EMBEDDEDOBJECT attribute", elementName);
-      // throw XmlSemanticError(lineNumber, buffer);
+        char buffer[MESSAGE_SIZE];
+        sprintf(buffer, "%s.EMBEDDEDOBJECT", elementName);
 
-      char buffer[MESSAGE_SIZE];
-      sprintf(buffer, "%s.EMBEDDEDOBJECT", elementName);
-      
-      MessageLoaderParms mlParms("Common.XmlReader.ILLEGAL_VALUE_FOR_ATTRIBUTE",
-                                "Illegal value for $0 attribute",
-                                buffer);
-      
-      throw XmlSemanticError(lineNumber, mlParms);
-      
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.ILLEGAL_VALUE_FOR_ATTRIBUTE",
+            "Illegal value for $0 attribute",
+            buffer);
+        throw XmlSemanticError(lineNumber, mlParms);
     }
 
     return embeddedObject;
@@ -638,37 +536,30 @@ String XmlReader::getEmbeddedObjectAttribute(
 //------------------------------------------------------------------------------
 
 CIMName XmlReader::getReferenceClassAttribute(
-    Uint32 lineNumber, 
+    Uint32 lineNumber,
     const XmlEntry& entry,
     const char* elementName)
 {
     String name;
 
     if (!entry.getAttributeValue("REFERENCECLASS", name))
-       return CIMName();
+        return CIMName();
 
     if (!CIMName::legal(name))
     {
 #ifdef PEGASUS_SNIA_INTEROP_TEST
-    name = "PEGASUS_SUBSTITUED_THIS_FOR_BAD_NAME";
-    return name;
-#endif 
-
-    // l10n
+        name = "PEGASUS_SUBSTITUED_THIS_FOR_BAD_NAME";
+        return name;
+#endif
 
-    // char buffer[MESSAGE_SIZE];
-    // sprintf(buffer, 
-    //     "Illegal value for %s.REFERENCECLASS attribute", elementName);
-    // throw XmlSemanticError(lineNumber, buffer);
+        char buffer[MESSAGE_SIZE];
+        sprintf(buffer, "%s.REFERENCECLASS", elementName);
 
-    char buffer[MESSAGE_SIZE];
-    sprintf(buffer, "%s.REFERENCECLASS", elementName);
-    
-    MessageLoaderParms mlParms("Common.XmlReader.ILLEGAL_VALUE_FOR_ATTRIBUTE",
-                              "Illegal value for $0 attribute",
-                              buffer);
-    
-    throw XmlSemanticError(lineNumber, mlParms);
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.ILLEGAL_VALUE_FOR_ATTRIBUTE",
+            "Illegal value for $0 attribute",
+            buffer);
+        throw XmlSemanticError(lineNumber, mlParms);
     }
 
     return name;
@@ -683,33 +574,25 @@ CIMName XmlReader::getReferenceClassAttribute(
 //------------------------------------------------------------------------------
 
 CIMName XmlReader::getSuperClassAttribute(
-    Uint32 lineNumber, 
+    Uint32 lineNumber,
     const XmlEntry& entry,
     const char* tagName)
 {
     String superClass;
 
     if (!entry.getAttributeValue("SUPERCLASS", superClass))
-       return CIMName();
+        return CIMName();
 
     if (!CIMName::legal(superClass))
     {
+        char buffer[MESSAGE_SIZE];
+        sprintf(buffer, "%s.SUPERCLASS", tagName);
 
-      // l10n
-
-      // char buffer[MESSAGE_SIZE];
-      // sprintf(
-      //   buffer, "Illegal value for %s.SUPERCLASS attribute", tagName);
-      // throw XmlSemanticError(lineNumber, buffer);
-      
-      char buffer[MESSAGE_SIZE];
-      sprintf(buffer, "%s.SUPERCLASS", tagName);
-      
-      MessageLoaderParms mlParms("Common.XmlReader.ILLEGAL_VALUE_FOR_ATTRIBUTE",
-                                "Illegal value for $0 attribute",
-                                buffer);
-      
-      throw XmlSemanticError(lineNumber, mlParms);
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.ILLEGAL_VALUE_FOR_ATTRIBUTE",
+            "Illegal value for $0 attribute",
+            buffer);
+        throw XmlSemanticError(lineNumber, mlParms);
     }
 
     return superClass;
@@ -734,8 +617,8 @@ CIMName XmlReader::getSuperClassAttribute(
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::getCimTypeAttribute(
-    Uint32 lineNumber, 
-    const XmlEntry& entry, 
+    Uint32 lineNumber,
+    const XmlEntry& entry,
     CIMType& cimType,  // Output parameter
     const char* tagName,
     const char* attributeName,
@@ -746,87 +629,74 @@ Boolean XmlReader::getCimTypeAttribute(
     if (!entry.getAttributeValue(attributeName, typeName))
     {
         if (required)
-       {
-
-         // l10n
-
-         // char message[MESSAGE_SIZE];
-         // sprintf(message, "missing %s.%s attribute", tagName, attributeName);
-         // throw XmlValidationError(lineNumber, message);
-
-         char message[MESSAGE_SIZE];
-         sprintf(message, "%s.%s", tagName, attributeName);
-
-         MessageLoaderParms mlParms("Common.XmlReader.MISSING_ATTRIBUTE",
-                                    "missing $0 attribute",
-                                    message);
-         
-         throw XmlValidationError(lineNumber, mlParms);
-         
-       }
-       else
-         {
-           return false;
-         }
+        {
+            char message[MESSAGE_SIZE];
+            sprintf(message, "%s.%s", tagName, attributeName);
+
+            MessageLoaderParms mlParms(
+                "Common.XmlReader.MISSING_ATTRIBUTE",
+                "missing $0 attribute",
+                message);
+            throw XmlValidationError(lineNumber, mlParms);
+        }
+        else
+        {
+            return false;
+        }
     }
 
     CIMType type = CIMTYPE_BOOLEAN;
     Boolean unrecognizedType = false;
 
     if (strcmp(typeName, "boolean") == 0)
-       type = CIMTYPE_BOOLEAN;
+        type = CIMTYPE_BOOLEAN;
     else if (strcmp(typeName, "string") == 0)
-       type = CIMTYPE_STRING;
+        type = CIMTYPE_STRING;
     else if (strcmp(typeName, "char16") == 0)
-       type = CIMTYPE_CHAR16;
+        type = CIMTYPE_CHAR16;
     else if (strcmp(typeName, "uint8") == 0)
-       type = CIMTYPE_UINT8;
+        type = CIMTYPE_UINT8;
     else if (strcmp(typeName, "sint8") == 0)
-       type = CIMTYPE_SINT8;
+        type = CIMTYPE_SINT8;
     else if (strcmp(typeName, "uint16") == 0)
-       type = CIMTYPE_UINT16;
+        type = CIMTYPE_UINT16;
     else if (strcmp(typeName, "sint16") == 0)
-       type = CIMTYPE_SINT16;
+        type = CIMTYPE_SINT16;
     else if (strcmp(typeName, "uint32") == 0)
-       type = CIMTYPE_UINT32;
+        type = CIMTYPE_UINT32;
     else if (strcmp(typeName, "sint32") == 0)
-       type = CIMTYPE_SINT32;
+        type = CIMTYPE_SINT32;
     else if (strcmp(typeName, "uint64") == 0)
-       type = CIMTYPE_UINT64;
+        type = CIMTYPE_UINT64;
     else if (strcmp(typeName, "sint64") == 0)
-       type = CIMTYPE_SINT64;
+        type = CIMTYPE_SINT64;
     else if (strcmp(typeName, "datetime") == 0)
-       type = CIMTYPE_DATETIME;
+        type = CIMTYPE_DATETIME;
     else if (strcmp(typeName, "real32") == 0)
-       type = CIMTYPE_REAL32;
+        type = CIMTYPE_REAL32;
     else if (strcmp(typeName, "real64") == 0)
-       type = CIMTYPE_REAL64;
+        type = CIMTYPE_REAL64;
     else if (strcmp(typeName, "reference") == 0)
-       type = CIMTYPE_REFERENCE;
+        type = CIMTYPE_REFERENCE;
 //  PEP 194:
 //  Note that "object" (ie. CIMTYPE_OBJECT) is not a real CIM datatype, just a
-//  Pegasus internal representation of an embedded object, so it won't be found here.
+//  Pegasus internal representation of an embedded object, so it won't be
+//  found here.
     else unrecognizedType = true;
 
     if (unrecognizedType ||
         ((type == CIMTYPE_REFERENCE) &&
          (strcmp(attributeName, "PARAMTYPE") != 0)))
     {
-      // l10n
+        char buffer[MESSAGE_SIZE];
+        sprintf(buffer, "%s.%s", tagName, attributeName);
 
-      // char message[MESSAGE_SIZE];
-      // sprintf(message, "Illegal value for %s.%s attribute", tagName,
-      //       attributeName);
-      // throw XmlSemanticError(lineNumber, message);
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.ILLEGAL_VALUE_FOR_ATTRIBUTE",
+            "Illegal value for $0 attribute",
+            buffer);
 
-      char buffer[MESSAGE_SIZE];
-      sprintf(buffer, "%s.%s", tagName, attributeName);
-      
-      MessageLoaderParms mlParms("Common.XmlReader.ILLEGAL_VALUE_FOR_ATTRIBUTE",
-                                "Illegal value for $0 attribute",
-                                buffer);
-      
-      throw XmlSemanticError(lineNumber, mlParms);
+        throw XmlSemanticError(lineNumber, mlParms);
     }
 
     cimType = type;
@@ -851,44 +721,31 @@ Boolean XmlReader::getCimBooleanAttribute(
 
     if (!entry.getAttributeValue(attributeName, tmp))
     {
-       if (!required)
-           return defaultValue;
+        if (!required)
+            return defaultValue;
 
-       // l10n
+        char buffer[62];
+        sprintf(buffer, "%s.%s", attributeName, tagName);
 
-       // char buffer[62];
-       // sprintf(buffer, "missing required %s.%s attribute", 
-       // attributeName, tagName);
-
-       // throw XmlValidationError(lineNumber, buffer);
-
-       char buffer[62];
-       sprintf(buffer, "%s.%s", attributeName, tagName);
-
-       MessageLoaderParms mlParms("Common.XmlReader.MISSING_REQUIRED_ATTRIBUTE",
-                                  "missing required $0 attribute",
-                                  buffer);
-       
-       throw XmlValidationError(lineNumber, mlParms);
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.MISSING_REQUIRED_ATTRIBUTE",
+            "missing required $0 attribute",
+            buffer);
+        throw XmlValidationError(lineNumber, mlParms);
     }
 
     if (strcmp(tmp, "true") == 0)
-       return true;
+        return true;
     else if (strcmp(tmp, "false") == 0)
-       return false;
-
-    // l10n
-
-    // char buffer[62];
-    // sprintf(buffer, "Invalid %s.%s attribute value", attributeName, tagName);
-    // throw XmlSemanticError(lineNumber, buffer);
+        return false;
 
     char buffer[62];
     sprintf(buffer, "%s.%s", attributeName, tagName);
 
-    MessageLoaderParms mlParms("Common.XmlReader.INVALID_ATTRIBUTE",
-                              "Invalid $0 attribute value",
-                              buffer);
+    MessageLoaderParms mlParms(
+        "Common.XmlReader.INVALID_ATTRIBUTE",
+        "Invalid $0 attribute value",
+        buffer);
 
     throw XmlSemanticError(lineNumber, mlParms);
 
@@ -899,8 +756,8 @@ Boolean XmlReader::getCimBooleanAttribute(
 //
 // SringToReal()
 //
-//     [ "+" | "-" ] *decimalDigit "." 1*decimalDigit 
-//         [ ( "e" | "E" ) [ "+" | "-" ] 1*decimalDigit ]
+//      [ "+" | "-" ] *decimalDigit "." 1*decimalDigit
+//          [ ( "e" | "E" ) [ "+" | "-" ] 1*decimalDigit ]
 //
 //------------------------------------------------------------------------------
 
@@ -912,58 +769,58 @@ Boolean XmlReader::stringToReal(const char* stringValue, Real64& x)
     const char* p = stringValue;
 
     if (!*p)
-       return false;
+        return false;
 
     // Skip optional sign:
 
     if (*p == '+' || *p  == '-')
-       p++;
+        p++;
 
     // Skip optional first set of digits:
 
     while (isdigit(*p))
-       p++;
+        p++;
 
     // Test required dot:
 
     if (*p++ != '.')
-       return false;
+        return false;
 
     // One or more digits required:
 
     if (!isdigit(*p++))
-       return false;
+        return false;
 
     while (isdigit(*p))
-       p++;
+        p++;
 
     // If there is an exponent now:
 
     if (*p)
     {
-       // Test exponent:
+        // Test exponent:
 
-       if (*p != 'e' && *p != 'E')
-           return false;
+        if (*p != 'e' && *p != 'E')
+            return false;
 
-       p++;
+        p++;
 
-       // Skip optional sign:
+        // Skip optional sign:
 
-       if (*p == '+' || *p  == '-')
-           p++;
+        if (*p == '+' || *p  == '-')
+            p++;
 
-       // One or more digits required:
+        // One or more digits required:
 
-       if (!isdigit(*p++))
-           return false;
+        if (!isdigit(*p++))
+            return false;
 
-       while (isdigit(*p))
-           p++;
+        while (isdigit(*p))
+            p++;
     }
 
     if (*p)
-       return false;
+        return false;
 
     //
     // Do the conversion
@@ -1001,7 +858,7 @@ String XmlReader::decodeURICharacters(String uriString)
 {
     Uint32 i;
 
-    Array<Uint8> utf8Chars; 
+    Array<Uint8> utf8Chars;
 
     for (i=0; i<uriString.size(); i++)
     {
@@ -1009,37 +866,28 @@ String XmlReader::decodeURICharacters(String uriString)
         {
             if (i+2 >= uriString.size())
             {
-             // l10n
-
-             // throw ParseError("Invalid URI encoding");
-
-             MessageLoaderParms mlParms("Common.XmlReader.INVALID_URI_ENCODING",
-                                        "Invalid URI encoding");
-
-             throw ParseError(MessageLoader::getMessage(mlParms));
-
+                MessageLoaderParms mlParms(
+                    "Common.XmlReader.INVALID_URI_ENCODING",
+                    "Invalid URI encoding");
+                throw ParseError(MessageLoader::getMessage(mlParms));
             }
 
             Uint8 digit1 = _xmlReader_hexCharToNumeric(char(uriString[++i]));
             Uint8 digit2 = _xmlReader_hexCharToNumeric(char(uriString[++i]));
             if ( (digit1 > 15) || (digit2 > 15) )
             {
-             // l10n
-
-             // throw ParseError("Invalid URI encoding");
-
-             MessageLoaderParms mlParms("Common.XmlReader.INVALID_URI_ENCODING",
-                                        "Invalid URI encoding");
-
-             throw ParseError(MessageLoader::getMessage(mlParms));
+                MessageLoaderParms mlParms(
+                    "Common.XmlReader.INVALID_URI_ENCODING",
+                    "Invalid URI encoding");
+                throw ParseError(MessageLoader::getMessage(mlParms));
             }
 
             Uint16 decodedChar = Uint16(digit1<<4) + Uint16(digit2);
-            utf8Chars.append((Uint8)decodedChar);                              
+            utf8Chars.append((Uint8)decodedChar);
         }
         else
         {
-            utf8Chars.append((Uint8)uriString[i]);     
+            utf8Chars.append((Uint8)uriString[i]);
         }
     }
 
@@ -1060,28 +908,28 @@ String XmlReader::decodeURICharacters(String uriString)
 //
 // stringToSignedInteger
 //
-//     [ "+" | "-" ] ( positiveDecimalDigit *decimalDigit | "0" )
+//      [ "+" | "-" ] ( positiveDecimalDigit *decimalDigit | "0" )
 //    or
 //      [ "+" | "-" ] ( "0x" | "0X" ) 1*hexDigit
 //
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::stringToSignedInteger(
-    const char* stringValue, 
+    const char* stringValue,
     Sint64& x)
 {
     x = 0;
     const char* p = stringValue;
 
     if (!p || !*p)
-       return false;
+        return false;
 
     // Skip optional sign:
 
     Boolean negative = *p == '-';
 
     if (negative || *p == '+')
-       p++;
+        p++;
 
     if (*p == '0')
     {
@@ -1137,7 +985,7 @@ Boolean XmlReader::stringToSignedInteger(
         else
         {
             // A decimal string that starts with '0' must be exactly "0".
-           return p[1] == '\0';
+            return p[1] == '\0';
         }
     }
 
@@ -1171,7 +1019,7 @@ Boolean XmlReader::stringToSignedInteger(
 
     // If we found a non-decimal digit, report an error
     if (*p)
-       return false;
+        return false;
 
     // Return the integer to positive, if necessary, checking for an
     // overflow error
@@ -1190,21 +1038,21 @@ Boolean XmlReader::stringToSignedInteger(
 //
 // stringToUnsignedInteger
 //
-//     ( positiveDecimalDigit *decimalDigit | "0" )
+//      ( positiveDecimalDigit *decimalDigit | "0" )
 //    or
 //      ( "0x" | "0X" ) 1*hexDigit
 //
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::stringToUnsignedInteger(
-    const char* stringValue, 
+    const char* stringValue,
     Uint64& x)
 {
     x = 0;
     const char* p = stringValue;
 
     if (!p || !*p)
-       return false;
+        return false;
 
     if (*p == '0')
     {
@@ -1247,7 +1095,7 @@ Boolean XmlReader::stringToUnsignedInteger(
         else
         {
             // A decimal string that starts with '0' must be exactly "0".
-           return p[1] == '\0';
+            return p[1] == '\0';
         }
     }
 
@@ -1274,7 +1122,7 @@ Boolean XmlReader::stringToUnsignedInteger(
 
     // If we found a non-decimal digit, report an error
     if (*p)
-       return false;
+        return false;
 
     return true;
 }
@@ -1285,14 +1133,14 @@ Boolean XmlReader::stringToUnsignedInteger(
 //
 // Return: CIMValue. If the string input is zero length creates a CIMValue
 //         with value defined by the type.  Else the value is inserted.
-//         
+//
 //         Note that this does not set the CIMValue Null if the string is empty.
 //
 //------------------------------------------------------------------------------
 
 CIMValue XmlReader::stringToValue(
-    Uint32 lineNumber, 
-    const char* valueString, 
+    Uint32 lineNumber,
+    const char* valueString,
     CIMType type)
 {
     // ATTN-B: accepting only UTF-8 for now! (affects string and char16):
@@ -1300,379 +1148,304 @@ CIMValue XmlReader::stringToValue(
     // Create value per type
     switch (type)
     {
-       case CIMTYPE_BOOLEAN:
-       {
-           if (System::strcasecmp(valueString, "TRUE") == 0)
-               return CIMValue(true);
-           else if (System::strcasecmp(valueString, "FALSE") == 0)
-               return CIMValue(false);
-           else {
-
-             // l10n
-
-             //  throw XmlSemanticError(
-             //             lineNumber, "Invalid boolean value");
-
-             MessageLoaderParms mlParms("Common.XmlReader.INVALID_BOOLEAN_VALUE",
-                                        "Invalid boolean value");
-             
-             throw XmlSemanticError(lineNumber, mlParms);
-             
-           }
-       }
+        case CIMTYPE_BOOLEAN:
+        {
+            if (System::strcasecmp(valueString, "TRUE") == 0)
+                return CIMValue(true);
+            else if (System::strcasecmp(valueString, "FALSE") == 0)
+                return CIMValue(false);
+            else
+            {
+                MessageLoaderParms mlParms(
+                    "Common.XmlReader.INVALID_BOOLEAN_VALUE",
+                    "Invalid boolean value");
+                throw XmlSemanticError(lineNumber, mlParms);
+            }
+        }
 
-       case CIMTYPE_STRING:
-       {
-           return CIMValue(String(valueString));
-       }
+        case CIMTYPE_STRING:
+        {
+            return CIMValue(String(valueString));
+        }
 
-       case CIMTYPE_CHAR16:
-       {
+        case CIMTYPE_CHAR16:
+        {
 
 // remove this test, utf-8 can be up to 6 bytes per char
 /*
-         if (strlen(valueString) != 1) {
-           // l10n
-
-           // throw XmlSemanticError(lineNumber, "Invalid char16 value");
-           
-           MessageLoaderParms mlParms("Common.XmlReader.INVALID_CHAR16_VALUE",
-                                      "Invalid char16 value");
-           
-           throw XmlSemanticError(lineNumber, mlParms);
-         }
+            if (strlen(valueString) != 1)
+            {
+                MessageLoaderParms mlParms(
+                    "Common.XmlReader.INVALID_CHAR16_VALUE",
+                    "Invalid char16 value");
+                throw XmlSemanticError(lineNumber, mlParms);
+            }
 */
-          // Converts UTF-8 to UTF-16
-          String tmp(valueString);
-          if (tmp.size() != 1)
-          {
-           // l10n
-
-           // throw XmlSemanticError(lineNumber, "Invalid char16 value");
-           
-           MessageLoaderParms mlParms("Common.XmlReader.INVALID_CHAR16_VALUE",
-                                      "Invalid char16 value");
-           
-           throw XmlSemanticError(lineNumber, mlParms);
-          }
-
-           return CIMValue(tmp[0]);
-       }
-
-       case CIMTYPE_UINT8:
-       case CIMTYPE_UINT16:
-       case CIMTYPE_UINT32:
-       case CIMTYPE_UINT64:
-       {
-           Uint64 x;
-
-           if (!stringToUnsignedInteger(valueString, x))
-           {
-
-             // l10n
-
-             // throw XmlSemanticError(
-             //   lineNumber, "Invalid unsigned integer value");
-
-             MessageLoaderParms mlParms("Common.XmlReader.INVALID_UI_VALUE",
-                                        "Invalid unsigned integer value");
-             
-             throw XmlSemanticError(lineNumber, mlParms);
-
-           }
-
-           switch (type)
-           {
-               case CIMTYPE_UINT8:
+            // Converts UTF-8 to UTF-16
+            String tmp(valueString);
+            if (tmp.size() != 1)
+            {
+                MessageLoaderParms mlParms(
+                    "Common.XmlReader.INVALID_CHAR16_VALUE",
+                    "Invalid char16 value");
+                throw XmlSemanticError(lineNumber, mlParms);
+            }
+
+            return CIMValue(tmp[0]);
+        }
+
+        case CIMTYPE_UINT8:
+        case CIMTYPE_UINT16:
+        case CIMTYPE_UINT32:
+        case CIMTYPE_UINT64:
+        {
+            Uint64 x;
+
+            if (!stringToUnsignedInteger(valueString, x))
+            {
+                MessageLoaderParms mlParms(
+                    "Common.XmlReader.INVALID_UI_VALUE",
+                    "Invalid unsigned integer value");
+                throw XmlSemanticError(lineNumber, mlParms);
+            }
+
+            switch (type)
+            {
+                case CIMTYPE_UINT8:
                 {
                     if (x >= (Uint64(1)<<8))
-                   {
-
-                     // l10n
-                     
-                     // throw XmlSemanticError(
-                     //   lineNumber, "Uint8 value out of range");
-                     
-                     MessageLoaderParms mlParms("Common.XmlReader.U8_VALUE_OUT_OF_RANGE",
-                                                "Uint8 value out of range");
-                     
-                     throw XmlSemanticError(lineNumber, mlParms);      
-                   }
-                   return CIMValue(Uint8(x));
+                    {
+                        MessageLoaderParms mlParms(
+                            "Common.XmlReader.U8_VALUE_OUT_OF_RANGE",
+                            "Uint8 value out of range");
+                        throw XmlSemanticError(lineNumber, mlParms);
+                    }
+                    return CIMValue(Uint8(x));
                 }
-               case CIMTYPE_UINT16:
+                case CIMTYPE_UINT16:
                 {
                     if (x >= (Uint64(1)<<16))
-                   {
-
-                     // l10n
-
-                     // throw XmlSemanticError(
-                     //             lineNumber, "Uint16 value out of range");
-
-                     MessageLoaderParms mlParms("Common.XmlReader.U16_VALUE_OUT_OF_RANGE",
-                                                "Uint16 value out of range");
-                     
-                     throw XmlSemanticError(lineNumber, mlParms);      
-
-                   }
-                   return CIMValue(Uint16(x));
+                    {
+                        MessageLoaderParms mlParms(
+                            "Common.XmlReader.U16_VALUE_OUT_OF_RANGE",
+                            "Uint16 value out of range");
+                        throw XmlSemanticError(lineNumber, mlParms);
+                    }
+                    return CIMValue(Uint16(x));
                 }
-               case CIMTYPE_UINT32:
+                case CIMTYPE_UINT32:
                 {
                     if (x >= (Uint64(1)<<32))
-                   {
-
-                     // l10n
-
-                     // throw XmlSemanticError(
-                     //   lineNumber, "Uint32 value out of range");
-
-                     MessageLoaderParms mlParms("Common.XmlReader.U32_VALUE_OUT_OF_RANGE",
-                                                "Uint32 value out of range");
-                     
-                     throw XmlSemanticError(lineNumber, mlParms);      
-                   }
-                   return CIMValue(Uint32(x));
+                    {
+                        MessageLoaderParms mlParms(
+                            "Common.XmlReader.U32_VALUE_OUT_OF_RANGE",
+                            "Uint32 value out of range");
+                        throw XmlSemanticError(lineNumber, mlParms);
+                    }
+                    return CIMValue(Uint32(x));
                 }
-               case CIMTYPE_UINT64: return CIMValue(Uint64(x));
-               default: break;
-           }
-       }
-
-       case CIMTYPE_SINT8:
-       case CIMTYPE_SINT16:
-       case CIMTYPE_SINT32:
-       case CIMTYPE_SINT64:
-       {
-           Sint64 x;
-
-           if (!stringToSignedInteger(valueString, x))
-           {
-
-             // l10n
-
-             // throw XmlSemanticError(
-             //   lineNumber, "Invalid signed integer value");
+                case CIMTYPE_UINT64: return CIMValue(Uint64(x));
+                default: break;
+            }
+        }
 
-             MessageLoaderParms mlParms("Common.XmlReader.INVALID_SI_VALUE",
-                                        "Invalid signed integer value");
-             
-             throw XmlSemanticError(lineNumber, mlParms);
+        case CIMTYPE_SINT8:
+        case CIMTYPE_SINT16:
+        case CIMTYPE_SINT32:
+        case CIMTYPE_SINT64:
+        {
+            Sint64 x;
 
-           }
+            if (!stringToSignedInteger(valueString, x))
+            {
+                MessageLoaderParms mlParms(
+                    "Common.XmlReader.INVALID_SI_VALUE",
+                    "Invalid signed integer value");
+                throw XmlSemanticError(lineNumber, mlParms);
+            }
 
-           switch (type)
-           {
-               case CIMTYPE_SINT8:
+            switch (type)
+            {
+                case CIMTYPE_SINT8:
                 {
-                    if(  (x >= (Sint64(1)<<7)) || (x < (-(Sint64(1)<<7))) )
-                   {
-
-                     // l10n
-
-                     // throw XmlSemanticError(
-                     //   lineNumber, "Sint8 value out of range");
-                     
-                     MessageLoaderParms mlParms("Common.XmlReader.S8_VALUE_OUT_OF_RANGE",
-                                                "Sint8 value out of range");
-                     
-                     throw XmlSemanticError(lineNumber, mlParms);      
-                   }
-                   return CIMValue(Sint8(x));
+                    if ((x >= (Sint64(1)<<7)) || (x < (-(Sint64(1)<<7))))
+                    {
+                        MessageLoaderParms mlParms(
+                            "Common.XmlReader.S8_VALUE_OUT_OF_RANGE",
+                            "Sint8 value out of range");
+                        throw XmlSemanticError(lineNumber, mlParms);
+                    }
+                    return CIMValue(Sint8(x));
                 }
-               case CIMTYPE_SINT16:
+                case CIMTYPE_SINT16:
                 {
-                    if(  (x >= (Sint64(1)<<15)) || (x < (-(Sint64(1)<<15))) )
-                   {
-
-                     // l10n
-
-                     // throw XmlSemanticError(
-                     //   lineNumber, "Sint16 value out of range");
-                     
-                     MessageLoaderParms mlParms("Common.XmlReader.S16_VALUE_OUT_OF_RANGE",
-                                                "Sint16 value out of range");
-                     
-                     throw XmlSemanticError(lineNumber, mlParms);      
-                   }
-                   return CIMValue(Sint16(x));
+                    if ((x >= (Sint64(1)<<15)) || (x < (-(Sint64(1)<<15))))
+                    {
+                        MessageLoaderParms mlParms(
+                            "Common.XmlReader.S16_VALUE_OUT_OF_RANGE",
+                            "Sint16 value out of range");
+                        throw XmlSemanticError(lineNumber, mlParms);
+                    }
+                    return CIMValue(Sint16(x));
                 }
-               case CIMTYPE_SINT32:
+                case CIMTYPE_SINT32:
                 {
-                    if(  (x >= (Sint64(1)<<31)) || (x < (-(Sint64(1)<<31))) )
-                   {
-
-                     // l10n
+                    if ((x >= (Sint64(1)<<31)) || (x < (-(Sint64(1)<<31))))
+                    {
+                        MessageLoaderParms mlParms(
+                            "Common.XmlReader.S32_VALUE_OUT_OF_RANGE",
+                            "Sint32 value out of range");
+                        throw XmlSemanticError(lineNumber, mlParms);
+                    }
+                    return CIMValue(Sint32(x));
+                }
+                case CIMTYPE_SINT64: return CIMValue(Sint64(x));
+                default: break;
+            }
+        }
 
-                     // throw XmlSemanticError(
-                     //   lineNumber, "Sint32 value out of range");
+        case CIMTYPE_DATETIME:
+        {
+            CIMDateTime tmp;
 
-                     MessageLoaderParms mlParms("Common.XmlReader.S32_VALUE_OUT_OF_RANGE",
-                                                "Sint32 value out of range");
-                     
-                     throw XmlSemanticError(lineNumber, mlParms);      
-                   }
-                   return CIMValue(Sint32(x));
-                }
-               case CIMTYPE_SINT64: return CIMValue(Sint64(x));
-               default: break;
-           }
-       }
-
-       case CIMTYPE_DATETIME:
-       {
-           CIMDateTime tmp;
-
-           try
-           {
-            // KS 20021002 - Exception if no datatime value. Test for
-            // zero length and leave the NULL value in the variable
-            // Bugzilla 137  Adds the following if line.
-            // Expect this to become permanent but test only for now
+            try
+            {
+                // KS 20021002 - Exception if no datetime value. Test for
+                // zero length and leave the NULL value in the variable
+                // Bugzilla 137  Adds the following if line.
+                // Expect this to become permanent but test only for now
 #ifdef PEGASUS_SNIA_INTEROP_TEST
-            if (strlen(valueString) != 0)
+                if (strlen(valueString) != 0)
 #endif
-                tmp.set(valueString);
-           }
-           catch (InvalidDateTimeFormatException&)
-           {
-
-             // l10n
-
-             // throw XmlSemanticError(lineNumber, "Invalid datetime value");
-
-             MessageLoaderParms mlParms("Common.XmlReader.INVALID_DATETIME_VALUE",
-                                        "Invalid datetime value");
-             
-             throw XmlSemanticError(lineNumber, mlParms);
-           }
-
-           return CIMValue(tmp);
-       }
-
-       case CIMTYPE_REAL32:
-       {
-           Real64 x;
-
-           if (!stringToReal(valueString, x)) {
-
-             // l10n
-
-             // throw XmlSemanticError(lineNumber, "Invalid real number value");
-
-             MessageLoaderParms mlParms("Common.XmlReader.INVALID_RN_VALUE",
-                                        "Invalid real number value");
-             
-             throw XmlSemanticError(lineNumber, mlParms);
-           }
-           return CIMValue(Real32(x));
-       }
+                    tmp.set(valueString);
+            }
+            catch (InvalidDateTimeFormatException&)
+            {
+                MessageLoaderParms mlParms(
+                    "Common.XmlReader.INVALID_DATETIME_VALUE",
+                    "Invalid datetime value");
+                throw XmlSemanticError(lineNumber, mlParms);
+            }
 
-       case CIMTYPE_REAL64:
-       {
-           Real64 x;
+            return CIMValue(tmp);
+        }
 
-           if (!stringToReal(valueString, x)) {
+        case CIMTYPE_REAL32:
+        {
+            Real64 x;
 
-             // l10n
+            if (!stringToReal(valueString, x))
+            {
+                MessageLoaderParms mlParms(
+                    "Common.XmlReader.INVALID_RN_VALUE",
+                    "Invalid real number value");
+                throw XmlSemanticError(lineNumber, mlParms);
+            }
+            return CIMValue(Real32(x));
+        }
 
-             // throw XmlSemanticError(lineNumber, "Invalid real number value");
+        case CIMTYPE_REAL64:
+        {
+            Real64 x;
 
-             MessageLoaderParms mlParms("Common.XmlReader.INVALID_RN_VALUE",
-                                        "Invalid real number value");
-             
-             throw XmlSemanticError(lineNumber, mlParms);
-           }
-           return CIMValue(x);
-       }
+            if (!stringToReal(valueString, x))
+            {
+                MessageLoaderParms mlParms(
+                    "Common.XmlReader.INVALID_RN_VALUE",
+                    "Invalid real number value");
+                throw XmlSemanticError(lineNumber, mlParms);
+            }
+            return CIMValue(x);
+        }
 
 //  PEP 194:
-//  Note that "object" (ie. CIMTYPE_OBJECT) is not a real CIM datatype, but just a
-//  Pegasus internal representation of an embedded object. However, this case is
-//  used when decoding string representations of embedded objects.
-    case CIMTYPE_OBJECT:
+//  Note that "object" (ie. CIMTYPE_OBJECT) is not a real CIM datatype, but
+//  just a Pegasus internal representation of an embedded object. However,
+//  this case is used when decoding string representations of embedded objects.
+        case CIMTYPE_OBJECT:
 #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
-    case CIMTYPE_INSTANCE:
+        case CIMTYPE_INSTANCE:
 #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
-    {
-        CIMObject x;
-
-        if (*valueString == '\0')
-        {
-            return CIMValue(type, false, 0);
-        }
-        else
         {
-            // Convert the non-NULL string to a CIMObject (containing either a
-            // CIMInstance or a CIMClass).
-                
-            // First we need to create a new "temporary" XmlParser that is
-            // just the value of the Embedded Object in String representation.
-            AutoArrayPtr<char> tmp_buffer(new char[strlen(valueString) + 1]);
-            strcpy(tmp_buffer.get(), valueString);
-            XmlParser tmp_parser(tmp_buffer.get());
-
-            // The next bit of logic constructs a CIMObject from the Embedded Object String.
-            // It is similar to the method XmlReader::getValueObjectElement().
-            CIMInstance cimInstance;
-            CIMClass cimClass;
-
-            if (XmlReader::getInstanceElement(tmp_parser, cimInstance))
-            {
-#ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
-                if(type == CIMTYPE_INSTANCE)
-                  return CIMValue(cimInstance);
-#endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
-                x = CIMObject(cimInstance);
-            }
-            else if (XmlReader::getClassElement(tmp_parser, cimClass))
+            CIMObject x;
+
+            if (*valueString == '\0')
             {
-                x = CIMObject(cimClass);
+                return CIMValue(type, false, 0);
             }
             else
             {
-                // l10n
-
-                // throw XmlValidationError(parser.getLine(),
-                //   "Expected INSTANCE or CLASS element");
+                // Convert the non-NULL string to a CIMObject (containing
+                // either a CIMInstance or a CIMClass).
+
+                // First we need to create a new "temporary" XmlParser that is
+                // just the value of the Embedded Object in String
+                // representation.
+                AutoArrayPtr<char> tmp_buffer(
+                    new char[strlen(valueString) + 1]);
+                strcpy(tmp_buffer.get(), valueString);
+                XmlParser tmp_parser(tmp_buffer.get());
+
+                // The next bit of logic constructs a CIMObject from the
+                // Embedded Object String.  It is similar to the method
+                // XmlReader::getValueObjectElement().
+                CIMInstance cimInstance;
+                CIMClass cimClass;
+
+                if (XmlReader::getInstanceElement(tmp_parser, cimInstance))
+                {
 #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
-                if(type == CIMTYPE_OBJECT)
+                    if (type == CIMTYPE_INSTANCE)
+                        return CIMValue(cimInstance);
+#endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
+                    x = CIMObject(cimInstance);
+                }
+                else if (XmlReader::getClassElement(tmp_parser, cimClass))
                 {
-                    MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_INSTANCE_OR_CLASS_ELEMENT",
-                        "Expected INSTANCE or CLASS element"); // change "element" to "embedded object"
-                    
-                    throw XmlValidationError(lineNumber, mlParms);
+                    x = CIMObject(cimClass);
                 }
                 else
                 {
-                    MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_INSTANCE_ELEMENT",
-                        "Expected INSTANCE element"); // change "element" to "embedded object"
-                    throw XmlValidationError(lineNumber, mlParms);
-                }
+#ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
+                    if (type == CIMTYPE_OBJECT)
+                    {
+                        // change "element" to "embedded object"
+                        MessageLoaderParms mlParms(
+                            "Common.XmlReader."
+                                "EXPECTED_INSTANCE_OR_CLASS_ELEMENT",
+                            "Expected INSTANCE or CLASS element");
+                        throw XmlValidationError(lineNumber, mlParms);
+                    }
+                    else
+                    {
+                        // change "element" to "embedded object"
+                        MessageLoaderParms mlParms(
+                            "Common.XmlReader.EXPECTED_INSTANCE_ELEMENT",
+                            "Expected INSTANCE element");
+                        throw XmlValidationError(lineNumber, mlParms);
+                    }
 #else
-                MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_INSTANCE_OR_CLASS_ELEMENT",
-                    "Expected INSTANCE or CLASS element"); // change "element" to "embedded object"
-                throw XmlValidationError(lineNumber, mlParms);
+                    // change "element" to "embedded object"
+                    MessageLoaderParms mlParms(
+                        "Common.XmlReader.EXPECTED_INSTANCE_OR_CLASS_ELEMENT",
+                        "Expected INSTANCE or CLASS element");
+                    throw XmlValidationError(lineNumber, mlParms);
 #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
+                }
+                // Ok, now we can delete the storage for the temporary
+                // XmlParser.
+                tmp_buffer.reset();
             }
-            // Ok, now we can delete the storage for the temporary XmlParser.
-            tmp_buffer.reset();
+            return CIMValue(x);
         }
-        return CIMValue(x);
-    }
 
-       default:
-           break;
+        default:
+            break;
     }
 
-    // l10n
-
-    // throw XmlSemanticError(lineNumber, "malformed XML");
-
-    MessageLoaderParms mlParms("Common.XmlReader.MALFORMED_XML",
-                              "malformed XML");
-    
+    MessageLoaderParms mlParms(
+        "Common.XmlReader.MALFORMED_XML",
+        "malformed XML");
     throw XmlSemanticError(lineNumber, mlParms);
 
     return false;
@@ -1691,12 +1464,12 @@ void XmlReader::skipElement(
 
     if (entry.type == XmlEntry::EMPTY_TAG)
     {
-       return;
+        return;
     }
 
     while (testStartTagOrEmptyTag(parser, entry))
     {
-        skipElement(parser, entry); 
+        skipElement(parser, entry);
     }
 
     if (testContentOrCData(parser, entry))
@@ -1719,8 +1492,8 @@ void XmlReader::skipElement(
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::getValueElement(
-    XmlParser& parser, 
-    CIMType type, 
+    XmlParser& parser,
+    CIMType type,
     CIMValue& value)
 {
     // Get VALUE start tag: Return false if no VALUE start Tag
@@ -1728,7 +1501,7 @@ Boolean XmlReader::getValueElement(
     XmlEntry entry;
     if (!testStartTagOrEmptyTag(parser, entry, "VALUE"))
     {
-           return false;
+        return false;
     }
 
     Boolean empty = entry.type == XmlEntry::EMPTY_TAG;
@@ -1752,7 +1525,7 @@ Boolean XmlReader::getValueElement(
     if (!empty)
 #endif
         value = stringToValue(parser.getLine(), valueString,type);
-    
+
     return true;
 }
 
@@ -1765,7 +1538,7 @@ Boolean XmlReader::getValueElement(
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::getStringValueElement(
-    XmlParser& parser, 
+    XmlParser& parser,
     String& str,
     Boolean required)
 {
@@ -1773,20 +1546,14 @@ Boolean XmlReader::getStringValueElement(
 
     if (!testStartTagOrEmptyTag(parser, entry, "VALUE"))
     {
-      if (required) {
-
-       // l10n
-
-       // throw XmlValidationError(parser.getLine(),"Expected VALUE element");
-
-       MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_VALUE_ELEMENT",
-                                  "Expected VALUE element");
-       
-       throw XmlValidationError(parser.getLine(), mlParms);
-       
-
-      }
-      return false;
+        if (required)
+        {
+            MessageLoaderParms mlParms(
+                "Common.XmlReader.EXPECTED_VALUE_ELEMENT",
+                "Expected VALUE element");
+            throw XmlValidationError(parser.getLine(), mlParms);
+        }
+        return false;
     }
 
     Boolean empty = entry.type == XmlEntry::EMPTY_TAG;
@@ -1795,10 +1562,10 @@ Boolean XmlReader::getStringValueElement(
 
     if (!empty)
     {
-       if (testContentOrCData(parser, entry))
-           valueString = entry.text;
+        if (testContentOrCData(parser, entry))
+            valueString = entry.text;
 
-       expectEndTag(parser, "VALUE");
+        expectEndTag(parser, "VALUE");
     }
 
     str = String(valueString);
@@ -1814,9 +1581,9 @@ Boolean XmlReader::getStringValueElement(
 //     PropertyValue is one of:
 //
 //
-//     <!ELEMENT VALUE.ARRAY (VALUE*)>
+//      <!ELEMENT VALUE.ARRAY (VALUE*)>
 //
-//     <!ELEMENT VALUE.REFERENCE (CLASSPATH|LOCALCLASSPATH|CLASSNAME|
+//      <!ELEMENT VALUE.REFERENCE (CLASSPATH|LOCALCLASSPATH|CLASSNAME|
 //         <!ELEMENT VALUE.ARRAY (VALUE*)>
 //
 //         <!ELEMENT VALUE.REFERENCE (CLASSPATH|LOCALCLASSPATH|CLASSNAME|
@@ -1826,7 +1593,7 @@ Boolean XmlReader::getStringValueElement(
 //
 //----------------------------------------------------------------------------
 Boolean XmlReader::getPropertyValue(
-    XmlParser& parser, 
+    XmlParser& parser,
     CIMValue& cimValue)
 {
     // Can not test for value type, so assume String
@@ -1835,7 +1602,7 @@ Boolean XmlReader::getPropertyValue(
     // Test for VALUE element
     if (XmlReader::getValueElement(parser, type, cimValue))
     {
-       return true;
+        return true;
     }
 
     // Test for VALUE.ARRAY element
@@ -1869,7 +1636,7 @@ Boolean XmlReader::getPropertyValue(
 
 template<class T>
 CIMValue StringArrayToValueAux(
-    Uint32 lineNumber, 
+    Uint32 lineNumber,
     const Array<const char*>& stringArray,
     CIMType type,
     T*)
@@ -1878,79 +1645,82 @@ CIMValue StringArrayToValueAux(
 
     for (Uint32 i = 0, n = stringArray.size(); i < n; i++)
     {
-       CIMValue value = XmlReader::stringToValue(
-           lineNumber, stringArray[i], type);
+        CIMValue value = XmlReader::stringToValue(
+            lineNumber, stringArray[i], type);
 
-       T x;
-       value.get(x);
-       array.append(x);
+        T x;
+        value.get(x);
+        array.append(x);
     }
 
     return CIMValue(array);
 }
 
 CIMValue XmlReader::stringArrayToValue(
-    Uint32 lineNumber, 
-    const Array<const char*>& array, 
+    Uint32 lineNumber,
+    const Array<const char*>& array,
     CIMType type)
 {
     switch (type)
     {
-       case CIMTYPE_BOOLEAN: 
-           return StringArrayToValueAux(lineNumber, array, type, (Boolean*)0);
+        case CIMTYPE_BOOLEAN:
+            return StringArrayToValueAux(lineNumber, array, type, (Boolean*)0);
 
-       case CIMTYPE_STRING:
-           return StringArrayToValueAux(lineNumber, array, type, (String*)0);
+        case CIMTYPE_STRING:
+            return StringArrayToValueAux(lineNumber, array, type, (String*)0);
 
-       case CIMTYPE_CHAR16:
-           return StringArrayToValueAux(lineNumber, array, type, (Char16*)0);
+        case CIMTYPE_CHAR16:
+            return StringArrayToValueAux(lineNumber, array, type, (Char16*)0);
 
-       case CIMTYPE_UINT8:
-           return StringArrayToValueAux(lineNumber, array, type, (Uint8*)0);
+        case CIMTYPE_UINT8:
+            return StringArrayToValueAux(lineNumber, array, type, (Uint8*)0);
 
-       case CIMTYPE_UINT16:
-           return StringArrayToValueAux(lineNumber, array, type, (Uint16*)0);
+        case CIMTYPE_UINT16:
+            return StringArrayToValueAux(lineNumber, array, type, (Uint16*)0);
 
-       case CIMTYPE_UINT32:
-           return StringArrayToValueAux(lineNumber, array, type, (Uint32*)0);
+        case CIMTYPE_UINT32:
+            return StringArrayToValueAux(lineNumber, array, type, (Uint32*)0);
 
-       case CIMTYPE_UINT64:
-           return StringArrayToValueAux(lineNumber, array, type, (Uint64*)0);
+        case CIMTYPE_UINT64:
+            return StringArrayToValueAux(lineNumber, array, type, (Uint64*)0);
 
-       case CIMTYPE_SINT8:
-           return StringArrayToValueAux(lineNumber, array, type, (Sint8*)0);
+        case CIMTYPE_SINT8:
+            return StringArrayToValueAux(lineNumber, array, type, (Sint8*)0);
 
-       case CIMTYPE_SINT16:
-           return StringArrayToValueAux(lineNumber, array, type, (Sint16*)0);
+        case CIMTYPE_SINT16:
+            return StringArrayToValueAux(lineNumber, array, type, (Sint16*)0);
 
-       case CIMTYPE_SINT32:
-           return StringArrayToValueAux(lineNumber, array, type, (Sint32*)0);
+        case CIMTYPE_SINT32:
+            return StringArrayToValueAux(lineNumber, array, type, (Sint32*)0);
 
-       case CIMTYPE_SINT64:
-           return StringArrayToValueAux(lineNumber, array, type, (Sint64*)0);
+        case CIMTYPE_SINT64:
+            return StringArrayToValueAux(lineNumber, array, type, (Sint64*)0);
 
-       case CIMTYPE_DATETIME:
-           return StringArrayToValueAux(lineNumber, array, type, (CIMDateTime*)0);
+        case CIMTYPE_DATETIME:
+            return StringArrayToValueAux(
+                lineNumber, array, type, (CIMDateTime*)0);
 
-       case CIMTYPE_REAL32:
-           return StringArrayToValueAux(lineNumber, array, type, (Real32*)0);
+        case CIMTYPE_REAL32:
+            return StringArrayToValueAux(lineNumber, array, type, (Real32*)0);
 
-       case CIMTYPE_REAL64:
-           return StringArrayToValueAux(lineNumber, array, type, (Real64*)0);
+        case CIMTYPE_REAL64:
+            return StringArrayToValueAux(lineNumber, array, type, (Real64*)0);
 
 //  PEP 194:
-//  Note that "object" (ie. CIMTYPE_OBJECT) is not a real CIM datatype, but just a
-//  Pegasus internal representation of an embedded object. However, this case is
-//  used when decoding string representations of embedded objects.
-    case CIMTYPE_OBJECT:
-           return StringArrayToValueAux(lineNumber, array, type, (CIMObject*)0);
+//  Note that "object" (ie. CIMTYPE_OBJECT) is not a real CIM datatype, but
+//  just a Pegasus internal representation of an embedded object. However,
+//  this case is used when decoding string representations of embedded objects.
+        case CIMTYPE_OBJECT:
+            return StringArrayToValueAux(
+                lineNumber, array, type, (CIMObject*)0);
 #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
-    case CIMTYPE_INSTANCE:
-           return StringArrayToValueAux(lineNumber, array, type, (CIMInstance*)0);
+        case CIMTYPE_INSTANCE:
+            return StringArrayToValueAux(
+                lineNumber, array, type, (CIMInstance*)0);
 #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
 
-       default:
-           break;
+        default:
+            break;
     }
 
     // Unreachable:
@@ -1968,8 +1738,8 @@ CIMValue XmlReader::stringArrayToValue(
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::getValueArrayElement(
-    XmlParser& parser, 
-    CIMType type, 
+    XmlParser& parser,
+    CIMType type,
     CIMValue& value)
 {
     // Clears any values from the Array. Assumes this is array CIMValue
@@ -1982,7 +1752,7 @@ Boolean XmlReader::getValueArrayElement(
 
     // If no VALUE.ARRAY start tag, return false
     if (!testStartTagOrEmptyTag(parser, entry, "VALUE.ARRAY"))
-       return false;
+        return false;
 
     if (entry.type != XmlEntry::EMPTY_TAG)
     {
@@ -2015,7 +1785,7 @@ Boolean XmlReader::getValueArrayElement(
 //
 // getFlavor()
 //
-//     <!ENTITY % QualifierFlavor 
+//     <!ENTITY % QualifierFlavor
 //         "OVERRIDABLE (true|false) 'true'
 //         TOSUBCLASS (true|false) 'true'
 //         TOINSTANCE (true|false)  'false'
@@ -2024,29 +1794,29 @@ Boolean XmlReader::getValueArrayElement(
 //------------------------------------------------------------------------------
 
 CIMFlavor XmlReader::getFlavor(
-    XmlEntry& entry, 
-    Uint32 lineNumber, 
+    XmlEntry& entry,
+    Uint32 lineNumber,
     const char* tagName)
 {
     // Get QUALIFIER.OVERRIDABLE
 
     Boolean overridable = getCimBooleanAttribute(
-       lineNumber, entry, tagName, "OVERRIDABLE", true, false);
+        lineNumber, entry, tagName, "OVERRIDABLE", true, false);
 
     // Get QUALIFIER.TOSUBCLASS
 
     Boolean toSubClass = getCimBooleanAttribute(
-       lineNumber, entry, tagName, "TOSUBCLASS", true, false);
+        lineNumber, entry, tagName, "TOSUBCLASS", true, false);
 
     // Get QUALIFIER.TOINSTANCE
 
     Boolean toInstance = getCimBooleanAttribute(
-       lineNumber, entry, tagName, "TOINSTANCE", false, false);
+        lineNumber, entry, tagName, "TOINSTANCE", false, false);
 
     // Get QUALIFIER.TRANSLATABLE
 
     Boolean translatable = getCimBooleanAttribute(
-       lineNumber, entry, tagName, "TRANSLATABLE", false, false);
+        lineNumber, entry, tagName, "TRANSLATABLE", false, false);
 
     // Start with CIMFlavor::NONE.  Defaults are specified in the
     // getCimBooleanAttribute() calls above.
@@ -2077,7 +1847,7 @@ CIMFlavor XmlReader::getFlavor(
 //
 //     DTD:
 //         <!ELEMENT SCOPE EMPTY>
-//         <!ATTLIST SCOPE 
+//         <!ATTLIST SCOPE
 //              CLASS (true|false) 'false'
 //              ASSOCIATION (true|false) 'false'
 //              REFERENCE (true|false) 'false'
@@ -2094,46 +1864,46 @@ CIMScope XmlReader::getOptionalScope(XmlParser& parser)
     CIMScope scope;
 
     if (!parser.next(entry))
-       return scope;    // No SCOPE element found; return the empty scope
+        return scope;    // No SCOPE element found; return the empty scope
 
     Boolean isEmptyTag = entry.type == XmlEntry::EMPTY_TAG;
 
-    if ((!isEmptyTag && 
-       entry.type != XmlEntry::START_TAG) ||
-       strcmp(entry.text, "SCOPE") != 0)
+    if ((!isEmptyTag &&
+        entry.type != XmlEntry::START_TAG) ||
+        strcmp(entry.text, "SCOPE") != 0)
     {
-       // No SCOPE element found; return the empty scope
-       parser.putBack(entry);
-       return scope;
+        // No SCOPE element found; return the empty scope
+        parser.putBack(entry);
+        return scope;
     }
 
     Uint32 line = parser.getLine();
 
     if (getCimBooleanAttribute(line, entry, "SCOPE", "CLASS", false, false))
-       scope.addScope (CIMScope::CLASS);
+        scope.addScope (CIMScope::CLASS);
 
     if (getCimBooleanAttribute(
-       line, entry, "SCOPE", "ASSOCIATION", false, false))
-       scope.addScope (CIMScope::ASSOCIATION);
+        line, entry, "SCOPE", "ASSOCIATION", false, false))
+        scope.addScope (CIMScope::ASSOCIATION);
 
     if (getCimBooleanAttribute(
-       line, entry, "SCOPE", "REFERENCE", false, false))
-       scope.addScope (CIMScope::REFERENCE);
+        line, entry, "SCOPE", "REFERENCE", false, false))
+        scope.addScope (CIMScope::REFERENCE);
 
     if (getCimBooleanAttribute(line, entry, "SCOPE", "PROPERTY", false, false))
-       scope.addScope (CIMScope::PROPERTY);
+        scope.addScope (CIMScope::PROPERTY);
 
     if (getCimBooleanAttribute(line, entry, "SCOPE", "METHOD", false, false))
-       scope.addScope (CIMScope::METHOD);
+        scope.addScope (CIMScope::METHOD);
 
     if (getCimBooleanAttribute(line, entry, "SCOPE", "PARAMETER", false, false))
-       scope.addScope (CIMScope::PARAMETER);
+        scope.addScope (CIMScope::PARAMETER);
 
     if (getCimBooleanAttribute(line, entry, "SCOPE", "INDICATION",false, false))
-       scope.addScope (CIMScope::INDICATION);
+        scope.addScope (CIMScope::INDICATION);
 
     if (!isEmptyTag)
-       expectEndTag(parser, "SCOPE");
+        expectEndTag(parser, "SCOPE");
 
     return scope;
 }
@@ -2152,14 +1922,14 @@ CIMScope XmlReader::getOptionalScope(XmlParser& parser)
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::getQualifierElement(
-    XmlParser& parser, 
+    XmlParser& parser,
     CIMQualifier& qualifier)
 {
     // Get QUALIFIER element:
 
     XmlEntry entry;
     if (!testStartTagOrEmptyTag(parser, entry, "QUALIFIER"))
-       return false;
+        return false;
 
     Boolean empty = entry.type == XmlEntry::EMPTY_TAG;
 
@@ -2175,7 +1945,7 @@ Boolean XmlReader::getQualifierElement(
     // Get QUALIFIER.PROPAGATED
 
     Boolean propagated = getCimBooleanAttribute(
-       parser.getLine(), entry, "QUALIFIER", "PROPAGATED", false, false);
+        parser.getLine(), entry, "QUALIFIER", "PROPAGATED", false, false);
 
     // Get flavor oriented attributes:
 
@@ -2192,7 +1962,7 @@ Boolean XmlReader::getQualifierElement(
     else
     {
         if (!getValueElement(parser, type, value) &&
-           !getValueArrayElement(parser, type, value))
+            !getValueArrayElement(parser, type, value))
         {
             value.setNullValue(type, false);
         }
@@ -2221,22 +1991,17 @@ void getQualifierElements(XmlParser& parser, CONTAINER& container)
 
     while (XmlReader::getQualifierElement(parser, qualifier))
     {
-       try
-       {
-           container.addQualifier(qualifier);
-       }
-       catch (AlreadyExistsException&)
-       {
-
-         // l10n
-         
-         // throw XmlSemanticError(parser.getLine(), "duplicate qualifier");
-
-         MessageLoaderParms mlParms("Common.XmlReader.DUPLICATE_QUALIFIER",
-                                    "duplicate qualifier");
-         
-         throw XmlSemanticError(parser.getLine(), mlParms);
-       }
+        try
+        {
+            container.addQualifier(qualifier);
+        }
+        catch (AlreadyExistsException&)
+        {
+            MessageLoaderParms mlParms(
+                "Common.XmlReader.DUPLICATE_QUALIFIER",
+                "duplicate qualifier");
+            throw XmlSemanticError(parser.getLine(), mlParms);
+        }
     }
 }
 
@@ -2259,7 +2024,7 @@ Boolean XmlReader::getPropertyElement(XmlParser& parser, CIMProperty& property)
     XmlEntry entry;
 
     if (!testStartTagOrEmptyTag(parser, entry, "PROPERTY"))
-       return false;
+        return false;
 
     Boolean empty = entry.type == XmlEntry::EMPTY_TAG;
 
@@ -2269,18 +2034,18 @@ Boolean XmlReader::getPropertyElement(XmlParser& parser, CIMProperty& property)
 
     // Get PROPERTY.CLASSORIGIN attribute:
 
-    CIMName classOrigin = 
-       getClassOriginAttribute(parser.getLine(), entry, "PROPERTY");
+    CIMName classOrigin =
+        getClassOriginAttribute(parser.getLine(), entry, "PROPERTY");
 
     // Get PROPERTY.PROPAGATED
 
     Boolean propagated = getCimBooleanAttribute(
-       parser.getLine(), entry, "PROPERTY", "PROPAGATED", false, false);
+        parser.getLine(), entry, "PROPERTY", "PROPAGATED", false, false);
 
     // Get PROPERTY.EMBEDDEDOBJECT attribute:
 
     String embeddedObject = getEmbeddedObjectAttribute(
-       parser.getLine(), entry, "PROPERTY");
+        parser.getLine(), entry, "PROPERTY");
 
     // Get PROPERTY.TYPE attribute:
 
@@ -2294,9 +2059,10 @@ Boolean XmlReader::getPropertyElement(XmlParser& parser, CIMProperty& property)
 
     if (!empty)
     {
-           // Get qualifiers. We need to do this before checking for the property as an
-        // embedded object, because we need to also check for the EmbeddedObject qualifier.
-           getQualifierElements(parser, property);
+        // Get qualifiers. We need to do this before checking for the
+        // property as an embedded object, because we need to also check
+        // for the EmbeddedObject qualifier.
+        getQualifierElements(parser, property);
     }
 
     Boolean embeddedObjectQualifierValue = false;
@@ -2310,36 +2076,41 @@ Boolean XmlReader::getPropertyElement(XmlParser& parser, CIMProperty& property)
     ix = property.findQualifier(CIMName("EmbeddedInstance"));
     if (ix != PEG_NOT_FOUND)
     {
-        property.getQualifier(ix).getValue().get(embeddedInstanceQualifierValue);
+        property.getQualifier(ix).getValue().get(
+            embeddedInstanceQualifierValue);
     }
 #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
-    // If the EMBEDDEDOBJECT attribute is present with value "object" 
+    // If the EMBEDDEDOBJECT attribute is present with value "object"
     // or the EmbeddedObject qualifier exists on this property with value "true"
     // then
     //     Convert the EmbeddedObject-encoded string into a CIMObject
 #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
     Boolean isEmbeddedObject = String::equal(embeddedObject, "object") ||
-      embeddedObjectQualifierValue;
+        embeddedObjectQualifierValue;
     Boolean isEmbeddedInstance = String::equal(embeddedObject, "instance") ||
-      embeddedInstanceQualifierValue.size() > 0;
+        embeddedInstanceQualifierValue.size() > 0;
     if (isEmbeddedObject || isEmbeddedInstance)
     {
-        // The EMBEDDEDOBJECT attribute is only valid on Properties of type string
+        // The EMBEDDEDOBJECT attribute is only valid on Properties of type
+        // string
         if (type == CIMTYPE_STRING)
         {
-            if(isEmbeddedObject)
-              type = CIMTYPE_OBJECT;
+            if (isEmbeddedObject)
+                type = CIMTYPE_OBJECT;
             else
-              type = CIMTYPE_INSTANCE;
+                type = CIMTYPE_INSTANCE;
             CIMValue new_value(type, false);
-            CIMProperty new_property = CIMProperty(name, new_value, 0, CIMName(), classOrigin, propagated);
-            
-            // Copy the qualifiers from the String property to the CIMObject property.
+            CIMProperty new_property = CIMProperty(
+                name, new_value, 0, CIMName(), classOrigin, propagated);
+
+            // Copy the qualifiers from the String property to the CIMObject
+            // property.
             for (Uint32 ix = 0; ix < property.getQualifierCount(); ++ix)
             {
-                // All properties are copied, including the EmbeddedObject qualifier.
-                // This way we don't have to keep track to know that the EmbeddedObject
-                // qualifier needs to be added back during the encode step.
+                // All properties are copied, including the EmbeddedObject
+                // qualifier.  This way we don't have to keep track to know
+                // that the EmbeddedObject qualifier needs to be added back
+                // during the encode step.
                 new_property.addQualifier(property.getQualifier(ix));
             }
 
@@ -2348,36 +2119,32 @@ Boolean XmlReader::getPropertyElement(XmlParser& parser, CIMProperty& property)
         }
         else
         {
-            // Error -- throw exception 
-            // (the EmbeddedObject attribute may be applied only to entities that have the type String)
-
-            // l10n
-
-            // throw XmlValidationError(parser.getLine(),
-            //   "expected string type");
-
-            MessageLoaderParms mlParms("Common.XmlReader.INVALID_EMBEDDEDOBJECT_TYPE",
-                             "The EMBEDDEDOBJECT attribute is only valid on string types.");
-
+            MessageLoaderParms mlParms(
+                "Common.XmlReader.INVALID_EMBEDDEDOBJECT_TYPE",
+                "The EMBEDDEDOBJECT attribute is only valid on string types.");
             throw XmlValidationError(parser.getLine(), mlParms);
         }
     }
 #else
     if (String::equal(embeddedObject, "object") || embeddedObjectQualifierValue)
     {
-        // The EMBEDDEDOBJECT attribute is only valid on Properties of type string
+        // The EMBEDDEDOBJECT attribute is only valid on Properties of type
+        // string
         if (type == CIMTYPE_STRING)
         {
             type = CIMTYPE_OBJECT;
             CIMValue new_value(type, false);
-            CIMProperty new_property = CIMProperty(name, new_value, 0, CIMName(), classOrigin, propagated);
-            
-            // Copy the qualifiers from the String property to the CIMObject property.
+            CIMProperty new_property = CIMProperty(
+                name, new_value, 0, CIMName(), classOrigin, propagated);
+
+            // Copy the qualifiers from the String property to the CIMObject
+            // property.
             for (Uint32 ix = 0; ix < property.getQualifierCount(); ++ix)
             {
-                // All properties are copied, including the EmbeddedObject qualifier.
-                // This way we don't have to keep track to know that the EmbeddedObject
-                // qualifier needs to be added back during the encode step.
+                // All properties are copied, including the EmbeddedObject
+                // qualifier.  This way we don't have to keep track to know
+                // that the EmbeddedObject qualifier needs to be added back
+                // during the encode step.
                 new_property.addQualifier(property.getQualifier(ix));
             }
 
@@ -2386,17 +2153,9 @@ Boolean XmlReader::getPropertyElement(XmlParser& parser, CIMProperty& property)
         }
         else
         {
-            // Error -- throw exception 
-            // (the EmbeddedObject attribute may be applied only to entities that have the type String)
-
-            // l10n
-
-            // throw XmlValidationError(parser.getLine(),
-            //   "expected string type");
-
-            MessageLoaderParms mlParms("Common.XmlReader.INVALID_EMBEDDEDOBJECT_TYPE",
-                             "The EMBEDDEDOBJECT attribute is only valid on string types.");
-
+            MessageLoaderParms mlParms(
+                "Common.XmlReader.INVALID_EMBEDDEDOBJECT_TYPE",
+                "The EMBEDDEDOBJECT attribute is only valid on string types.");
             throw XmlValidationError(parser.getLine(), mlParms);
         }
     }
@@ -2432,26 +2191,20 @@ Boolean XmlReader::getArraySizeAttribute(
     const char* tmp;
 
     if (!entry.getAttributeValue("ARRAYSIZE", tmp))
-       return false;
+        return false;
 
     Uint64 arraySize;
 
     if (!stringToUnsignedInteger(tmp, arraySize) || arraySize == 0)
     {
-      // l10n
-      
-      // char message[128];
-      // sprintf(message, "Illegal value for %s.%s", tagName, "ARRAYSIZE");
-      // throw XmlSemanticError(lineNumber, message);
+        char message[128];
+        sprintf(message, "%s.%s", tagName, "ARRAYSIZE");
 
-      char message[128];
-      sprintf(message, "%s.%s", tagName, "ARRAYSIZE");
-      
-      MessageLoaderParms mlParms("Common.XmlReader.ILLEGAL_VALUE",
-                                "Illegal value for $0",
-                                message);
-      
-      throw XmlSemanticError(lineNumber, mlParms);
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.ILLEGAL_VALUE",
+            "Illegal value for $0",
+            message);
+        throw XmlSemanticError(lineNumber, mlParms);
     }
 
     value = Uint32(arraySize);
@@ -2474,7 +2227,7 @@ Boolean XmlReader::getArraySizeAttribute(
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::getPropertyArrayElement(
-    XmlParser& parser, 
+    XmlParser& parser,
     CIMProperty& property)
 {
     // Get PROPERTY element:
@@ -2482,14 +2235,14 @@ Boolean XmlReader::getPropertyArrayElement(
     XmlEntry entry;
 
     if (!testStartTagOrEmptyTag(parser, entry, "PROPERTY.ARRAY"))
-       return false;
+        return false;
 
     Boolean empty = entry.type == XmlEntry::EMPTY_TAG;
 
     // Get PROPERTY.NAME attribute:
 
-    CIMName name = 
-       getCimNameAttribute(parser.getLine(), entry, "PROPERTY.ARRAY");
+    CIMName name =
+        getCimNameAttribute(parser.getLine(), entry, "PROPERTY.ARRAY");
 
     // Get PROPERTY.TYPE attribute:
 
@@ -2503,27 +2256,29 @@ Boolean XmlReader::getPropertyArrayElement(
 
     // Get PROPERTY.CLASSORIGIN attribute:
 
-    CIMName classOrigin = getClassOriginAttribute(parser.getLine(), entry, "PROPERTY.ARRAY");
+    CIMName classOrigin =
+        getClassOriginAttribute(parser.getLine(), entry, "PROPERTY.ARRAY");
 
     // Get PROPERTY.ARRAY.PROPAGATED
 
-    Boolean propagated = getCimBooleanAttribute(parser.getLine()
-                                                ,entry
-                                                ,"PROPERTY.ARRAY"
-                                                ,"PROPAGATED"
-                                                ,false
-                                                ,false);
+    Boolean propagated = getCimBooleanAttribute(
+        parser.getLine(),
+        entry,
+        "PROPERTY.ARRAY",
+        "PROPAGATED",
+        false,
+        false);
 
     // Get PROPERTY.EMBEDDEDOBJECT attribute:
 
-    String embeddedObject = getEmbeddedObjectAttribute(parser.getLine()
-                                                       ,entry
-                                                       ,"PROPERTY.ARRAY");
+    String embeddedObject = getEmbeddedObjectAttribute(
+        parser.getLine(), entry, "PROPERTY.ARRAY");
 
     // Create property:
 
     CIMValue value(type, true, arraySize);
-    property = CIMProperty(name, value, arraySize, CIMName(), classOrigin, propagated);
+    property = CIMProperty(
+        name, value, arraySize, CIMName(), classOrigin, propagated);
 
     if (!empty)
     {
@@ -2542,93 +2297,86 @@ Boolean XmlReader::getPropertyArrayElement(
     ix = property.findQualifier(CIMName("EmbeddedInstance"));
     if (ix != PEG_NOT_FOUND)
     {
-        property.getQualifier(ix).getValue().get(embeddedInstanceQualifierValue);
+        property.getQualifier(ix).getValue().get(
+            embeddedInstanceQualifierValue);
     }
 #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
-    // If the EMBEDDEDOBJECT attribute is present with value "object" 
+    // If the EMBEDDEDOBJECT attribute is present with value "object"
     // or the EmbeddedObject qualifier exists on this property with value "true"
     // then
     //     Convert the EmbeddedObject-encoded string into a CIMObject
 #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
     Boolean isEmbeddedObject = String::equal(embeddedObject, "object") ||
-      embeddedObjectQualifierValue;
+        embeddedObjectQualifierValue;
     Boolean isEmbeddedInstance = String::equal(embeddedObject, "instance") ||
-      embeddedInstanceQualifierValue.size() > 0;
+        embeddedInstanceQualifierValue.size() > 0;
     if (isEmbeddedObject || isEmbeddedInstance)
     {
-        // The EMBEDDEDOBJECT attribute is only valid on Properties of type string
+        // The EMBEDDEDOBJECT attribute is only valid on Properties of type
+        // string
         if (type == CIMTYPE_STRING)
         {
-            if(isEmbeddedObject)
-              type = CIMTYPE_OBJECT;
+            if (isEmbeddedObject)
+                type = CIMTYPE_OBJECT;
             else
-              type = CIMTYPE_INSTANCE;
+                type = CIMTYPE_INSTANCE;
             CIMValue new_value(type, true, arraySize);
-            CIMProperty new_property = CIMProperty(name, new_value, arraySize, CIMName(), classOrigin, propagated);
-            
-            // Copy the qualifiers from the String property to the CIMObject property.
+            CIMProperty new_property = CIMProperty(
+                name, new_value, arraySize, CIMName(), classOrigin, propagated);
+
+            // Copy the qualifiers from the String property to the CIMObject
+            // property.
             for (Uint32 ix = 0; ix < property.getQualifierCount(); ++ix)
             {
-                // All properties are copied, including the EmbeddedObject qualifier.
-                // This way we don't have to keep track to know that the EmbeddedObject
-                // qualifier needs to be added back during the encode step.
+                // All properties are copied, including the EmbeddedObject
+                // qualifier.  This way we don't have to keep track to know
+                // that the EmbeddedObject qualifier needs to be added back
+                // during the encode step.
                 new_property.addQualifier(property.getQualifier(ix));
             }
-            
+
             value = new_value;
             property = new_property;
         }
         else
         {
-            // Error -- throw exception 
-            // (the EmbeddedObject attribute may be applied only to entities that have the type String)
-
-            // l10n
-
-            // throw XmlValidationError(parser.getLine(),
-            //   "expected string type");
-
-            MessageLoaderParms mlParms("Common.XmlReader.INVALID_EMBEDDEDOBJECT_TYPE",
-                             "The EMBEDDEDOBJECT attribute is only valid on string types.");
-
+            MessageLoaderParms mlParms(
+                "Common.XmlReader.INVALID_EMBEDDEDOBJECT_TYPE",
+                "The EMBEDDEDOBJECT attribute is only valid on string types.");
             throw XmlValidationError(parser.getLine(), mlParms);
         }
     }
 #else
     if (String::equal(embeddedObject, "object") || embeddedObjectQualifierValue)
     {
-        // The EMBEDDEDOBJECT attribute is only valid on Properties of type string
+        // The EMBEDDEDOBJECT attribute is only valid on Properties of type
+        // string
         if (type == CIMTYPE_STRING)
         {
             type = CIMTYPE_OBJECT;
             CIMValue new_value(type, true, arraySize);
-            CIMProperty new_property = CIMProperty(name, new_value, arraySize, CIMName(), classOrigin, propagated);
-            
-            // Copy the qualifiers from the String property to the CIMObject property.
+            CIMProperty new_property = CIMProperty(
+                name, new_value, arraySize, CIMName(), classOrigin, propagated);
+
+            // Copy the qualifiers from the String property to the CIMObject
+            // property.
             for (Uint32 ix = 0; ix < property.getQualifierCount(); ++ix)
             {
-                // All properties are copied, including the EmbeddedObject qualifier.
-                // This way we don't have to keep track to know that the EmbeddedObject
-                // qualifier needs to be added back during the encode step.
+                // All properties are copied, including the EmbeddedObject
+                // qualifier.  This way we don't have to keep track to know
+                // that the EmbeddedObject qualifier needs to be added back
+                // during the encode step.
                 new_property.addQualifier(property.getQualifier(ix));
             }
-            
+
             value = new_value;
             property = new_property;
         }
         else
         {
-            // Error -- throw exception 
-            // (the EmbeddedObject attribute may be applied only to entities that have the type String)
-
-            // l10n
-
-            // throw XmlValidationError(parser.getLine(),
-            //   "expected string type");
-
-            MessageLoaderParms mlParms("Common.XmlReader.INVALID_EMBEDDEDOBJECT_TYPE",
-                             "The EMBEDDEDOBJECT attribute is only valid on string types.");
-
+            MessageLoaderParms mlParms(
+                "Common.XmlReader.INVALID_EMBEDDEDOBJECT_TYPE",
+                "The EMBEDDEDOBJECT attribute is only valid on string types.");
             throw XmlValidationError(parser.getLine(), mlParms);
         }
     }
@@ -2641,23 +2389,17 @@ Boolean XmlReader::getPropertyArrayElement(
         {
             if (arraySize && arraySize != value.getArraySize())
             {
-
-              // l10n
-
-              // throw XmlSemanticError(parser.getLine(),
-              //   "ARRAYSIZE attribute and value-array size are different");
-
-              MessageLoaderParms mlParms("Common.XmlReader.ARRAY_SIZE_DIFFERENT",
-                         "ARRAYSIZE attribute and value-array size are different");
-
-              throw XmlSemanticError(parser.getLine(), mlParms);
+                MessageLoaderParms mlParms(
+                    "Common.XmlReader.ARRAY_SIZE_DIFFERENT",
+                    "ARRAYSIZE attribute and value-array size are different");
+                throw XmlSemanticError(parser.getLine(), mlParms);
             }
 
             property.setValue(value);
         }
         expectEndTag(parser, "PROPERTY.ARRAY");
     }
-    
+
     return true;
 }
 
@@ -2676,19 +2418,19 @@ Boolean XmlReader::getHostElement(
     XmlEntry entry;
 
     if (!testStartTag(parser, entry, "HOST"))
-       return false;
+        return false;
 #ifdef PEGASUS_SNIA_INTEROP_TEST
     // Temp code to allow empty HOST field.
     // SNIA CIMOMs return empty field particularly on enumerateinstance.
     // Simply substitute a string for the empty.
-       if (!parser.next(entry))
-           throw XmlException(XmlException::UNCLOSED_TAGS, parser.getLine());
+    if (!parser.next(entry))
+        throw XmlException(XmlException::UNCLOSED_TAGS, parser.getLine());
 
-       if (entry.type == XmlEntry::CONTENT)
-           host = String(entry.text);
-       else
+    if (entry.type == XmlEntry::CONTENT)
+        host = String(entry.text);
+    else
     {
-           parser.putBack(entry);
+        parser.putBack(entry);
         host = "HOSTNAMEINSERTEDBYPEGASUSCLIENT";
     }
 
@@ -2696,17 +2438,10 @@ Boolean XmlReader::getHostElement(
 
     if (!parser.next(entry) || entry.type != XmlEntry::CONTENT)
     {
-
-      // l10n
-
-      // throw XmlValidationError(parser.getLine(),
-      //              "expected content of HOST element");
-
-      MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_CONTENT_ELEMENT",
-                                "expected content of HOST element");
-      
-      throw XmlValidationError(parser.getLine(), mlParms);
-       
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.EXPECTED_CONTENT_ELEMENT",
+            "expected content of HOST element");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 
     host = String(entry.text);
@@ -2718,7 +2453,7 @@ Boolean XmlReader::getHostElement(
 //------------------------------------------------------------------------------
 //
 // getNameSpaceElement()
-//     
+//
 //     <!ELEMENT NAMESPACE EMPTY>
 //     <!ATTLIST NAMESPACE %CIMName;>
 //
@@ -2731,15 +2466,15 @@ Boolean XmlReader::getNameSpaceElement(
     XmlEntry entry;
 
     if (!testStartTagOrEmptyTag(parser, entry, "NAMESPACE"))
-       return false;
+        return false;
 
     Boolean empty = entry.type == XmlEntry::EMPTY_TAG;
 
     nameSpaceComponent = getCimNameAttribute(
-       parser.getLine(), entry, "NAMESPACE");
+        parser.getLine(), entry, "NAMESPACE");
 
     if (!empty)
-       expectEndTag(parser, "NAMESPACE");
+        expectEndTag(parser, "NAMESPACE");
 
     return true;
 }
@@ -2747,7 +2482,7 @@ Boolean XmlReader::getNameSpaceElement(
 //------------------------------------------------------------------------------
 //
 // getLocalNameSpacePathElement()
-//     
+//
 //     <!ELEMENT LOCALNAMESPACEPATH (NAMESPACE+)>
 //
 //------------------------------------------------------------------------------
@@ -2759,33 +2494,25 @@ Boolean XmlReader::getLocalNameSpacePathElement(
     XmlEntry entry;
 
     if (!testStartTag(parser, entry, "LOCALNAMESPACEPATH"))
-       return false;
+        return false;
 
     CIMName nameSpaceComponent;
 
     while (getNameSpaceElement(parser, nameSpaceComponent))
     {
-       if (nameSpace.size())
-           nameSpace.append('/');
+        if (nameSpace.size())
+            nameSpace.append('/');
 
-       nameSpace.append(nameSpaceComponent.getString());
+        nameSpace.append(nameSpaceComponent.getString());
     }
 
     if (!nameSpace.size())
     {
-
-      // l10n
-
-      // throw XmlValidationError(parser.getLine(),
-      //   "Expected one or more NAMESPACE elements within "
-      //   "LOCALNAMESPACEPATH element");
-
-      MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_NAMESPACE_ELEMENTS",
-                                "Expected one or more NAMESPACE elements within LOCALNAMESPACEPATH element");
-      
-      throw XmlValidationError(parser.getLine(), mlParms);
-       
-
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.EXPECTED_NAMESPACE_ELEMENTS",
+            "Expected one or more NAMESPACE elements within "
+                "LOCALNAMESPACEPATH element");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 
     expectEndTag(parser, "LOCALNAMESPACEPATH");
@@ -2811,32 +2538,22 @@ Boolean XmlReader::getNameSpacePathElement(
     XmlEntry entry;
 
     if (!testStartTag(parser, entry, "NAMESPACEPATH"))
-       return false;
-
-    if (!getHostElement(parser, host)) {
-
-      // l10n
-
-      // throw XmlValidationError(parser.getLine(), "expected HOST element");
+        return false;
 
-      MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_HOST_ELEMENT",
-                                "expected HOST element");
-      
-      throw XmlValidationError(parser.getLine(), mlParms);
+    if (!getHostElement(parser, host))
+    {
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.EXPECTED_HOST_ELEMENT",
+            "expected HOST element");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 
     if (!getLocalNameSpacePathElement(parser, nameSpace))
     {
-
-      // l10n
-
-      // throw XmlValidationError(parser.getLine(), 
-      //   "expected LOCALNAMESPACEPATH element");
-
-      MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_LOCALNAMESPACEPATH_ELEMENT",
-                                "expected LOCALNAMESPACEPATH element");
-      
-      throw XmlValidationError(parser.getLine(), mlParms);
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.EXPECTED_LOCALNAMESPACEPATH_ELEMENT",
+            "expected LOCALNAMESPACEPATH element");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 
     expectEndTag(parser, "NAMESPACEPATH");
@@ -2862,29 +2579,23 @@ Boolean XmlReader::getClassNameElement(
 
     if (!testStartTagOrEmptyTag(parser, entry, "CLASSNAME"))
     {
-       if (required)
-       {
-
-         // l10n
-
-         // throw XmlValidationError(parser.getLine(),
-         // "expected CLASSNAME element");
-
-         MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_CLASSNAME_ELEMENT",
-                                    "expected CLASSNAME element");
-         
-         throw XmlValidationError(parser.getLine(), mlParms);
-       }
-       else
-           return false;
+        if (required)
+        {
+            MessageLoaderParms mlParms(
+                "Common.XmlReader.EXPECTED_CLASSNAME_ELEMENT",
+                "expected CLASSNAME element");
+            throw XmlValidationError(parser.getLine(), mlParms);
+        }
+        else
+            return false;
     }
     Boolean empty = entry.type == XmlEntry::EMPTY_TAG;
 
     className = getCimNameAttribute(
-       parser.getLine(), entry, "CLASSNAME", false);
+        parser.getLine(), entry, "CLASSNAME", false);
 
     if (!empty)
-       expectEndTag(parser, "CLASSNAME");
+        expectEndTag(parser, "CLASSNAME");
 
     return true;
 }
@@ -2898,38 +2609,30 @@ Boolean XmlReader::getClassNameElement(
 //------------------------------------------------------------------------------
 
 CIMKeyBinding::Type XmlReader::getValueTypeAttribute(
-    Uint32 lineNumber, 
+    Uint32 lineNumber,
     const XmlEntry& entry,
     const char* elementName)
 {
     String tmp;
 
     if (!entry.getAttributeValue("VALUETYPE", tmp))
-       return CIMKeyBinding::STRING;
+        return CIMKeyBinding::STRING;
 
     if (String::equal(tmp, "string"))
-       return CIMKeyBinding::STRING;
+        return CIMKeyBinding::STRING;
     else if (String::equal(tmp, "boolean"))
-       return CIMKeyBinding::BOOLEAN;
+        return CIMKeyBinding::BOOLEAN;
     else if (String::equal(tmp, "numeric"))
-       return CIMKeyBinding::NUMERIC;
-
-    // char buffer[MESSAGE_SIZE];
-
-    // sprintf(buffer, 
-    // "Illegal value for %s.VALUETYPE attribute; "
-    // "CIMValue must be one of \"string\", \"boolean\", or \"numeric\"",
-    // elementName);
-
-    // throw XmlSemanticError(lineNumber, buffer);
-
+        return CIMKeyBinding::NUMERIC;
 
     char buffer[MESSAGE_SIZE];
     sprintf(buffer, "%s.VALUETYPE", elementName);
-    
-    MessageLoaderParms mlParms("Common.XmlReader.ILLEGAL_VALUE_FOR_CIMVALUE_ATTRIBUTE",
-                              "Illegal value for $0 attribute; CIMValue must be one of \"string\", \"boolean\", or \"numeric\"", buffer);
-    
+
+    MessageLoaderParms mlParms(
+        "Common.XmlReader.ILLEGAL_VALUE_FOR_CIMVALUE_ATTRIBUTE",
+        "Illegal value for $0 attribute; CIMValue must be one of \"string\", "
+            "\"boolean\", or \"numeric\"",
+        buffer);
     throw XmlSemanticError(lineNumber, mlParms);
 
     return CIMKeyBinding::BOOLEAN;
@@ -2953,7 +2656,7 @@ Boolean XmlReader::getKeyValueElement(
     XmlEntry entry;
 
     if (!testStartTagOrEmptyTag(parser, entry, "KEYVALUE"))
-       return false;
+        return false;
 
     Boolean empty = entry.type == XmlEntry::EMPTY_TAG;
 
@@ -2963,15 +2666,15 @@ Boolean XmlReader::getKeyValueElement(
 
     if (!empty)
     {
-       if (!parser.next(entry))
-           throw XmlException(XmlException::UNCLOSED_TAGS, parser.getLine());
+        if (!parser.next(entry))
+            throw XmlException(XmlException::UNCLOSED_TAGS, parser.getLine());
 
-       if (entry.type == XmlEntry::CONTENT)
-           value = String(entry.text);
-       else
-           parser.putBack(entry);
+        if (entry.type == XmlEntry::CONTENT)
+            value = String(entry.text);
+        else
+            parser.putBack(entry);
 
-       expectEndTag(parser, "KEYVALUE");
+        expectEndTag(parser, "KEYVALUE");
     }
 
     return true;
@@ -2996,7 +2699,7 @@ Boolean XmlReader::getKeyBindingElement(
     XmlEntry entry;
 
     if (!testStartTag(parser, entry, "KEYBINDING"))
-       return false;
+        return false;
 
     name = getCimNameAttribute(parser.getLine(), entry, "KEYBINDING");
 
@@ -3006,16 +2709,10 @@ Boolean XmlReader::getKeyBindingElement(
 
         if (!getValueReferenceElement(parser, reference))
         {
-
-         // l10n
-
-         // throw XmlValidationError(parser.getLine(),
-         //          "Expected KEYVALUE or VALUE.REFERENCE element");
-
-         MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_KEYVALUE_OR_REFERENCE_ELEMENT",
-                                    "Expected KEYVALUE or VALUE.REFERENCE element");
-         
-         throw XmlValidationError(parser.getLine(), mlParms);
+            MessageLoaderParms mlParms(
+                "Common.XmlReader.EXPECTED_KEYVALUE_OR_REFERENCE_ELEMENT",
+                "Expected KEYVALUE or VALUE.REFERENCE element");
+            throw XmlValidationError(parser.getLine(), mlParms);
         }
 
         type = CIMKeyBinding::REFERENCE;
@@ -3050,7 +2747,7 @@ Boolean XmlReader::getInstanceNameElement(
     XmlEntry entry;
 
     if (!testStartTagOrEmptyTag(parser, entry, "INSTANCENAME"))
-       return false;
+        return false;
 
     Boolean empty = entry.type == XmlEntry::EMPTY_TAG;
 
@@ -3080,8 +2777,8 @@ Boolean XmlReader::getInstanceNameElement(
     }
     else
     {
-       while (getKeyBindingElement(parser, name, value, type))
-           keyBindings.append(CIMKeyBinding(name, value, type));
+        while (getKeyBindingElement(parser, name, value, type))
+            keyBindings.append(CIMKeyBinding(name, value, type));
     }
 
     expectEndTag(parser, "INSTANCENAME");
@@ -3097,7 +2794,7 @@ Boolean XmlReader::getInstanceNameElement(
     Array<CIMKeyBinding> keyBindings;
 
     if (!XmlReader::getInstanceNameElement(parser, className, keyBindings))
-       return false;
+        return false;
 
     instanceName.set(String(), CIMNamespaceName(), className, keyBindings);
     return true;
@@ -3118,24 +2815,17 @@ Boolean XmlReader::getInstancePathElement(
     XmlEntry entry;
 
     if (!testStartTag(parser, entry, "INSTANCEPATH"))
-       return false;
+        return false;
 
     String host;
     String nameSpace;
 
     if (!getNameSpacePathElement(parser, host, nameSpace))
     {
-
-      // l10n
-
-      // throw XmlValidationError(parser.getLine(),
-      //   "expected NAMESPACEPATH element");
-
-      MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_NAMESPACEPATH_ELEMENT",
-                                "expected NAMESPACEPATH element");
-      
-      throw XmlValidationError(parser.getLine(), mlParms);
-
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.EXPECTED_NAMESPACEPATH_ELEMENT",
+            "expected NAMESPACEPATH element");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 
     String className;
@@ -3143,18 +2833,10 @@ Boolean XmlReader::getInstancePathElement(
 
     if (!getInstanceNameElement(parser, className, keyBindings))
     {
-
-      // l10n
-
-      // throw XmlValidationError(parser.getLine(), 
-      //   "expected INSTANCENAME element");
-
-
-      MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_INSTANCENAME_ELEMENT",
-                                "expected INSTANCENAME element");
-      
-      throw XmlValidationError(parser.getLine(), mlParms);
-
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.EXPECTED_INSTANCENAME_ELEMENT",
+            "expected INSTANCENAME element");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 
     reference.set(host, nameSpace, className, keyBindings);
@@ -3178,23 +2860,16 @@ Boolean XmlReader::getLocalInstancePathElement(
     XmlEntry entry;
 
     if (!testStartTag(parser, entry, "LOCALINSTANCEPATH"))
-       return false;
+        return false;
 
     String nameSpace;
 
     if (!getLocalNameSpacePathElement(parser, nameSpace))
     {
-
-      // l10n
-
-      // throw XmlValidationError(parser.getLine(),
-      //   "expected LOCALNAMESPACEPATH element");
-
-      MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_LOCALNAMESPACEPATH_ELEMENT",
-                                "expected LOCALNAMESPACEPATH element");
-      
-      throw XmlValidationError(parser.getLine(), mlParms);
-
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.EXPECTED_LOCALNAMESPACEPATH_ELEMENT",
+            "expected LOCALNAMESPACEPATH element");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 
     String className;
@@ -3202,17 +2877,10 @@ Boolean XmlReader::getLocalInstancePathElement(
 
     if (!getInstanceNameElement(parser, className, keyBindings))
     {
-
-      // l10n
-
-      // throw XmlValidationError(parser.getLine(), 
-      //   "expected INSTANCENAME element");
-
-      MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_INSTANCENAME_ELEMENT",
-                                "expected INSTANCENAME element");
-      
-      throw XmlValidationError(parser.getLine(), mlParms);
-
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.EXPECTED_INSTANCENAME_ELEMENT",
+            "expected INSTANCENAME element");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 
     reference.set(String(), nameSpace, className, keyBindings);
@@ -3236,41 +2904,27 @@ Boolean XmlReader::getClassPathElement(
     XmlEntry entry;
 
     if (!testStartTag(parser, entry, "CLASSPATH"))
-       return false;
+        return false;
 
     String host;
     String nameSpace;
 
     if (!getNameSpacePathElement(parser, host, nameSpace))
     {
-
-      // l10n
-
-      // throw XmlValidationError(parser.getLine(),
-      //    "expected NAMESPACEPATH element");
-
-      MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_NAMESPACEPATH_ELEMENT",
-                                "expected NAMESPACEPATH element");
-      
-      throw XmlValidationError(parser.getLine(), mlParms);
-
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.EXPECTED_NAMESPACEPATH_ELEMENT",
+            "expected NAMESPACEPATH element");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 
     CIMName className;
 
     if (!getClassNameElement(parser, className))
     {
-
-      // l10n
-
-      // throw XmlValidationError(parser.getLine(), 
-      //   "expected CLASSNAME element");
-
-      MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_CLASSNAME_ELEMENT",
-                                "expected CLASSNAME element");
-      
-      throw XmlValidationError(parser.getLine(), mlParms);
-
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.EXPECTED_CLASSNAME_ELEMENT",
+            "expected CLASSNAME element");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 
     reference.set(host, nameSpace, className);
@@ -3294,40 +2948,26 @@ Boolean XmlReader::getLocalClassPathElement(
     XmlEntry entry;
 
     if (!testStartTag(parser, entry, "LOCALCLASSPATH"))
-       return false;
+        return false;
 
     String nameSpace;
 
     if (!getLocalNameSpacePathElement(parser, nameSpace))
     {
-
-      // l10n
-
-      // throw XmlValidationError(parser.getLine(),
-      //    "expected LOCALNAMESPACEPATH element");
-
-      MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_LOCALNAMESPACEPATH_ELEMENT",
-                                "expected LOCALNAMESPACEPATH element");
-      
-      throw XmlValidationError(parser.getLine(), mlParms);
-
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.EXPECTED_LOCALNAMESPACEPATH_ELEMENT",
+            "expected LOCALNAMESPACEPATH element");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 
     CIMName className;
 
     if (!getClassNameElement(parser, className))
     {
-
-      // l10n
-
-      // throw XmlValidationError(parser.getLine(), 
-      //   "expected CLASSNAME element");
-
-      MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_CLASSNAME_ELEMENT",
-                                "expected CLASSNAME element");
-      
-      throw XmlValidationError(parser.getLine(), mlParms);
-
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.EXPECTED_CLASSNAME_ELEMENT",
+            "expected CLASSNAME element");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 
     reference.set(String(), nameSpace, className);
@@ -3354,63 +2994,56 @@ Boolean XmlReader::getValueReferenceElement(
     XmlEntry entry;
 
     if (!testStartTag(parser, entry, "VALUE.REFERENCE"))
-       return false;
+        return false;
 
     if (!parser.next(entry))
-       throw XmlException(XmlException::UNCLOSED_TAGS, parser.getLine());
+        throw XmlException(XmlException::UNCLOSED_TAGS, parser.getLine());
 
-    if (entry.type != XmlEntry::START_TAG && 
-       entry.type != XmlEntry::EMPTY_TAG)
+    if (entry.type != XmlEntry::START_TAG &&
+        entry.type != XmlEntry::EMPTY_TAG)
     {
-
-      // l10n
-
-      // throw XmlValidationError(parser.getLine(), 
-      //   "Expected one of the following start tags: "
-      //    "CLASSPATH, LOCALCLASSPATH, CLASSNAME, INSTANCEPATH, "
-      //    "LOCALINSTANCEPATH, INSTANCENAME");
-
-      MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_START_TAGS",
-                                "Expected one of the following start tags: CLASSPATH, LOCALCLASSPATH, CLASSNAME, INSTANCEPATH, LOCALINSTANCEPATH, INSTANCENAME");
-      
-      throw XmlValidationError(parser.getLine(), mlParms);
-
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.EXPECTED_START_TAGS",
+            "Expected one of the following start tags: CLASSPATH, "
+                "LOCALCLASSPATH, CLASSNAME, INSTANCEPATH, LOCALINSTANCEPATH, "
+                "INSTANCENAME");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 
     if (strcmp(entry.text, "CLASSPATH") == 0)
     {
-       parser.putBack(entry);
-       getClassPathElement(parser, reference);
+        parser.putBack(entry);
+        getClassPathElement(parser, reference);
     }
     else if (strcmp(entry.text, "LOCALCLASSPATH") == 0)
     {
-       parser.putBack(entry);
-       getLocalClassPathElement(parser, reference);
+        parser.putBack(entry);
+        getLocalClassPathElement(parser, reference);
     }
     else if (strcmp(entry.text, "CLASSNAME") == 0)
     {
-       parser.putBack(entry);
-       CIMName className;
-       getClassNameElement(parser, className);
-       reference.set(String(), CIMNamespaceName(), className);
+        parser.putBack(entry);
+        CIMName className;
+        getClassNameElement(parser, className);
+        reference.set(String(), CIMNamespaceName(), className);
     }
     else if (strcmp(entry.text, "INSTANCEPATH") == 0)
     {
-       parser.putBack(entry);
-       getInstancePathElement(parser, reference);
+        parser.putBack(entry);
+        getInstancePathElement(parser, reference);
     }
     else if (strcmp(entry.text, "LOCALINSTANCEPATH") == 0)
     {
-       parser.putBack(entry);
-       getLocalInstancePathElement(parser, reference);
+        parser.putBack(entry);
+        getLocalInstancePathElement(parser, reference);
     }
     else if (strcmp(entry.text, "INSTANCENAME") == 0)
     {
-       parser.putBack(entry);
-       String className;
-       Array<CIMKeyBinding> keyBindings;
-       getInstanceNameElement(parser, className, keyBindings);
-       reference.set(String(), CIMNamespaceName(), className, keyBindings);
+        parser.putBack(entry);
+        String className;
+        Array<CIMKeyBinding> keyBindings;
+        getInstanceNameElement(parser, className, keyBindings);
+        reference.set(String(), CIMNamespaceName(), className, keyBindings);
     }
 
     expectEndTag(parser, "VALUE.REFERENCE");
@@ -3426,7 +3059,7 @@ Boolean XmlReader::getValueReferenceElement(
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::getValueReferenceArrayElement(
-    XmlParser& parser, 
+    XmlParser& parser,
     CIMValue& value)
 {
     XmlEntry entry;
@@ -3438,7 +3071,7 @@ Boolean XmlReader::getValueReferenceArrayElement(
     // Get VALUE.REFARRAY open tag:
 
     if (!testStartTagOrEmptyTag(parser, entry, "VALUE.REFARRAY"))
-       return false;
+        return false;
 
     if (entry.type != XmlEntry::EMPTY_TAG)
     {
@@ -3446,7 +3079,7 @@ Boolean XmlReader::getValueReferenceArrayElement(
 
         while (getValueReferenceElement(parser, reference))
         {
-           referenceArray.append(reference);
+            referenceArray.append(reference);
         }
 
         expectEndTag(parser, "VALUE.REFARRAY");
@@ -3470,53 +3103,53 @@ Boolean XmlReader::getValueReferenceArrayElement(
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::getPropertyReferenceElement(
-    XmlParser& parser, 
+    XmlParser& parser,
     CIMProperty& property)
 {
     XmlEntry entry;
 
     if (!testStartTagOrEmptyTag(parser, entry, "PROPERTY.REFERENCE"))
-       return false;
+        return false;
 
     Boolean empty = entry.type == XmlEntry::EMPTY_TAG;
 
     // Get PROPERTY.NAME attribute:
 
     CIMName name = getCimNameAttribute(
-       parser.getLine(), entry, "PROPERTY.REFERENCE");
+        parser.getLine(), entry, "PROPERTY.REFERENCE");
 
     // Get PROPERTY.REFERENCECLASS attribute:
 
     CIMName referenceClass = getReferenceClassAttribute(
-       parser.getLine(), entry, "PROPERTY.REFERENCE");
+        parser.getLine(), entry, "PROPERTY.REFERENCE");
 
     // Get PROPERTY.CLASSORIGIN attribute:
 
-    CIMName classOrigin = 
-       getClassOriginAttribute(parser.getLine(), entry, "PROPERTY.REFERENCE");
+    CIMName classOrigin =
+        getClassOriginAttribute(parser.getLine(), entry, "PROPERTY.REFERENCE");
 
     // Get PROPERTY.PROPAGATED
 
-    Boolean propagated = getCimBooleanAttribute(parser.getLine(), entry, 
-       "PROPERTY.REFERENCE", "PROPAGATED", false, false);
+    Boolean propagated = getCimBooleanAttribute(parser.getLine(), entry,
+        "PROPERTY.REFERENCE", "PROPAGATED", false, false);
 
     // Create property:
 
     CIMValue value = CIMValue(CIMTYPE_REFERENCE, false, 0);
 //    value.set(CIMObjectPath());
     property = CIMProperty(
-       name, value, 0, referenceClass, classOrigin, propagated);
+        name, value, 0, referenceClass, classOrigin, propagated);
 
     if (!empty)
     {
-       getQualifierElements(parser, property);
+        getQualifierElements(parser, property);
 
-       CIMObjectPath reference;
+        CIMObjectPath reference;
 
-       if (getValueReferenceElement(parser, reference))
-           property.setValue(reference);
+        if (getValueReferenceElement(parser, reference))
+            property.setValue(reference);
 
-       expectEndTag(parser, "PROPERTY.REFERENCE");
+        expectEndTag(parser, "PROPERTY.REFERENCE");
     }
 
     return true;
@@ -3534,25 +3167,20 @@ void GetPropertyElements(XmlParser& parser, CONTAINER& container)
     CIMProperty property;
 
     while (XmlReader::getPropertyElement(parser, property) ||
-       XmlReader::getPropertyArrayElement(parser, property) ||
-       XmlReader::getPropertyReferenceElement(parser, property))
+        XmlReader::getPropertyArrayElement(parser, property) ||
+        XmlReader::getPropertyReferenceElement(parser, property))
     {
-       try
-       {
-           container.addProperty(property);
-       }
-       catch (AlreadyExistsException&)
-       {
-
-         // l10n
-
-         // throw XmlSemanticError(parser.getLine(), "duplicate property");
-
-         MessageLoaderParms mlParms("Common.XmlReader.DUPLICATE_PROPERTY",
-                                    "duplicate property");
-         
-         throw XmlSemanticError(parser.getLine(), mlParms);
-       }
+        try
+        {
+            container.addProperty(property);
+        }
+        catch (AlreadyExistsException&)
+        {
+            MessageLoaderParms mlParms(
+                "Common.XmlReader.DUPLICATE_PROPERTY",
+                "duplicate property");
+            throw XmlSemanticError(parser.getLine(), mlParms);
+        }
     }
 }
 
@@ -3568,13 +3196,13 @@ void GetPropertyElements(XmlParser& parser, CONTAINER& container)
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::getParameterElement(
-    XmlParser& parser, 
+    XmlParser& parser,
     CIMParameter& parameter)
 {
     XmlEntry entry;
 
     if (!testStartTagOrEmptyTag(parser, entry, "PARAMETER"))
-       return false;
+        return false;
 
     Boolean empty = entry.type == XmlEntry::EMPTY_TAG;
 
@@ -3593,9 +3221,9 @@ Boolean XmlReader::getParameterElement(
 
     if (!empty)
     {
-       getQualifierElements(parser, parameter);
+        getQualifierElements(parser, parameter);
 
-       expectEndTag(parser, "PARAMETER");
+        expectEndTag(parser, "PARAMETER");
     }
 
     return true;
@@ -3614,20 +3242,20 @@ Boolean XmlReader::getParameterElement(
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::getParameterArrayElement(
-    XmlParser& parser, 
+    XmlParser& parser,
     CIMParameter& parameter)
 {
     XmlEntry entry;
 
     if (!testStartTagOrEmptyTag(parser, entry, "PARAMETER.ARRAY"))
-       return false;
+        return false;
 
     Boolean empty = entry.type == XmlEntry::EMPTY_TAG;
 
     // Get PARAMETER.ARRAY.NAME attribute:
 
     CIMName name = getCimNameAttribute(
-       parser.getLine(), entry, "PARAMETER.ARRAY");
+        parser.getLine(), entry, "PARAMETER.ARRAY");
 
     // Get PARAMETER.ARRAY.TYPE attribute:
 
@@ -3645,9 +3273,9 @@ Boolean XmlReader::getParameterArrayElement(
 
     if (!empty)
     {
-       getQualifierElements(parser, parameter);
+        getQualifierElements(parser, parameter);
 
-       expectEndTag(parser, "PARAMETER.ARRAY");
+        expectEndTag(parser, "PARAMETER.ARRAY");
     }
 
     return true;
@@ -3665,25 +3293,25 @@ Boolean XmlReader::getParameterArrayElement(
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::getParameterReferenceElement(
-    XmlParser& parser, 
+    XmlParser& parser,
     CIMParameter& parameter)
 {
     XmlEntry entry;
 
     if (!testStartTagOrEmptyTag(parser, entry, "PARAMETER.REFERENCE"))
-       return false;
+        return false;
 
     Boolean empty = entry.type == XmlEntry::EMPTY_TAG;
 
     // Get PARAMETER.NAME attribute:
 
     CIMName name = getCimNameAttribute(
-       parser.getLine(), entry, "PARAMETER.REFERENCE");
+        parser.getLine(), entry, "PARAMETER.REFERENCE");
 
     // Get PARAMETER.REFERENCECLASS attribute:
 
     CIMName referenceClass = getReferenceClassAttribute(
-       parser.getLine(), entry, "PARAMETER.REFERENCE");
+        parser.getLine(), entry, "PARAMETER.REFERENCE");
 
     // Create parameter:
 
@@ -3691,8 +3319,8 @@ Boolean XmlReader::getParameterReferenceElement(
 
     if (!empty)
     {
-       getQualifierElements(parser, parameter);
-       expectEndTag(parser, "PARAMETER.REFERENCE");
+        getQualifierElements(parser, parameter);
+        expectEndTag(parser, "PARAMETER.REFERENCE");
     }
 
     return true;
@@ -3711,41 +3339,41 @@ Boolean XmlReader::getParameterReferenceElement(
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::getParameterReferenceArrayElement(
-    XmlParser& parser, 
+    XmlParser& parser,
     CIMParameter& parameter)
 {
     XmlEntry entry;
 
     if (!testStartTagOrEmptyTag(parser, entry, "PARAMETER.REFARRAY"))
-       return false;
+        return false;
 
     Boolean empty = entry.type == XmlEntry::EMPTY_TAG;
 
     // Get PARAMETER.NAME attribute:
 
     CIMName name = getCimNameAttribute(
-       parser.getLine(), entry, "PARAMETER.REFARRAY");
+        parser.getLine(), entry, "PARAMETER.REFARRAY");
 
     // Get PARAMETER.REFERENCECLASS attribute:
 
     CIMName referenceClass = getReferenceClassAttribute(
-       parser.getLine(), entry, "PARAMETER.REFARRAY");
+        parser.getLine(), entry, "PARAMETER.REFARRAY");
 
     // Get PARAMETER.ARRAYSIZE attribute:
 
     Uint32 arraySize = 0;
-    getArraySizeAttribute(parser.getLine(), entry, "PARAMETER.REFARRAY",
-                         arraySize);
+    getArraySizeAttribute(
+        parser.getLine(), entry, "PARAMETER.REFARRAY", arraySize);
 
     // Create parameter:
 
-    parameter = CIMParameter(name, CIMTYPE_REFERENCE, true, arraySize,
-                            referenceClass);
+    parameter = CIMParameter(
+        name, CIMTYPE_REFERENCE, true, arraySize, referenceClass);
 
     if (!empty)
     {
-       getQualifierElements(parser, parameter);
-       expectEndTag(parser, "PARAMETER.REFARRAY");
+        getQualifierElements(parser, parameter);
+        expectEndTag(parser, "PARAMETER.REFARRAY");
     }
 
     return true;
@@ -3763,26 +3391,21 @@ void GetParameterElements(XmlParser& parser, CONTAINER& container)
     CIMParameter parameter;
 
     while (XmlReader::getParameterElement(parser, parameter) ||
-       XmlReader::getParameterArrayElement(parser, parameter) ||
-       XmlReader::getParameterReferenceElement(parser, parameter) ||
-       XmlReader::getParameterReferenceArrayElement(parser, parameter))
+        XmlReader::getParameterArrayElement(parser, parameter) ||
+        XmlReader::getParameterReferenceElement(parser, parameter) ||
+        XmlReader::getParameterReferenceArrayElement(parser, parameter))
     {
-       try
-       {
-           container.addParameter(parameter);
-       }
-       catch (AlreadyExistsException&)
-       {
-
-         // l10n
-
-         // throw XmlSemanticError(parser.getLine(), "duplicate parameter");
-
-         MessageLoaderParms mlParms("Common.XmlReader.DUPLICATE_PARAMETER",
-                                    "duplicate parameter");
-         
-         throw XmlSemanticError(parser.getLine(), mlParms);
-       }
+        try
+        {
+            container.addParameter(parameter);
+        }
+        catch (AlreadyExistsException&)
+        {
+            MessageLoaderParms mlParms(
+                "Common.XmlReader.DUPLICATE_PARAMETER",
+                "duplicate parameter");
+            throw XmlSemanticError(parser.getLine(), mlParms);
+        }
     }
 }
 
@@ -3791,30 +3414,30 @@ void GetParameterElements(XmlParser& parser, CONTAINER& container)
 // getQualifierDeclElement()
 //
 //     <!ELEMENT QUALIFIER.DECLARATION (SCOPE?,(VALUE|VALUE.ARRAY)?)>
-//     <!ATTLIST QUALIFIER.DECLARATION 
-//         %CIMName;               
+//     <!ATTLIST QUALIFIER.DECLARATION
+//         %CIMName;
 //         %CIMType; #REQUIRED
 //         ISARRAY (true|false) #IMPLIED
 //         %ArraySize;
 //         %QualifierFlavor;>
-//         
+//
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::getQualifierDeclElement(
-    XmlParser& parser, 
+    XmlParser& parser,
     CIMQualifierDecl& qualifierDecl)
 {
     XmlEntry entry;
 
     if (!testStartTagOrEmptyTag(parser, entry, "QUALIFIER.DECLARATION"))
-       return false;
+        return false;
 
     Boolean empty = entry.type == XmlEntry::EMPTY_TAG;
 
     // Get NAME attribute:
 
     CIMName name = getCimNameAttribute(
-       parser.getLine(), entry, "QUALIFIER.DECLARATION");
+        parser.getLine(), entry, "QUALIFIER.DECLARATION");
 
     // Get TYPE attribute:
 
@@ -3825,17 +3448,17 @@ Boolean XmlReader::getQualifierDeclElement(
 
     Boolean isArray = getCimBooleanAttribute(
         parser.getLine(), entry, "QUALIFIER.DECLARATION", "ISARRAY",
-        false, false); 
+        false, false);
 
     // Get ARRAYSIZE attribute:
 
     Uint32 arraySize = 0;
     Boolean gotArraySize = getArraySizeAttribute(parser.getLine(),
-       entry, "QUALIFIER.DECLARATION", arraySize);
+        entry, "QUALIFIER.DECLARATION", arraySize);
 
     // Get flavor oriented attributes:
 
-    CIMFlavor flavor = getFlavor (entry, parser.getLine (), 
+    CIMFlavor flavor = getFlavor (entry, parser.getLine (),
         "QUALIFIER.DECLARATION");
 
     // No need to look for interior elements if empty tag:
@@ -3846,76 +3469,57 @@ Boolean XmlReader::getQualifierDeclElement(
 
     if (!empty)
     {
-       // Get the option SCOPE element:
-
-       scope = getOptionalScope(parser);
-
-       // Get VALUE or VALUE.ARRAY element:
+        // Get the option SCOPE element:
 
-       if (getValueArrayElement(parser, type, value))
-       {
-           if (!isArray)
-           {
+        scope = getOptionalScope(parser);
 
-             // l10n
+        // Get VALUE or VALUE.ARRAY element:
 
-             // throw XmlSemanticError(parser.getLine(),
-             //    "VALUE.ARRAY element encountered without "
-             //    "ISARRAY attribute");
-
-             MessageLoaderParms mlParms("Common.XmlReader.ARRAY_WITHOUT_ISARRAY",
-                                        "VALUE.ARRAY element encountered without ISARRAY attribute");
-             
-             throw XmlSemanticError(parser.getLine(), mlParms);
-           }
-
-           if (arraySize && arraySize != value.getArraySize())
-           {
-
-             // l10n
-
-             // throw XmlSemanticError(parser.getLine(),
-             //   "VALUE.ARRAY size is not the same as "
-             //    "ARRAYSIZE attribute");
+        if (getValueArrayElement(parser, type, value))
+        {
+            if (!isArray)
+            {
+                MessageLoaderParms mlParms(
+                    "Common.XmlReader.ARRAY_WITHOUT_ISARRAY",
+                    "VALUE.ARRAY element encountered without ISARRAY "
+                        "attribute");
+                throw XmlSemanticError(parser.getLine(), mlParms);
+            }
 
-             MessageLoaderParms mlParms("Common.XmlReader.ARRAY_SIZE_NOT_SAME",
-                                        "VALUE.ARRAY size is not the same as ARRAYSIZE attribute");
-             
-             throw XmlSemanticError(parser.getLine(), mlParms);
-           }
+            if (arraySize && arraySize != value.getArraySize())
+            {
+                MessageLoaderParms mlParms(
+                    "Common.XmlReader.ARRAY_SIZE_NOT_SAME",
+                    "VALUE.ARRAY size is not the same as ARRAYSIZE attribute");
+                throw XmlSemanticError(parser.getLine(), mlParms);
+            }
 
             gotValue = true;
-       }
-       else if (getValueElement(parser, type, value))
-       {
-           if (isArray)
-           {
-
-             // l10n
-
-             // throw XmlSemanticError(parser.getLine(),
-             //    "ISARRAY attribute used but VALUE element encountered");
-
-             MessageLoaderParms mlParms("Common.XmlReader.ARRAY_ATTRIBUTE_DIFFERENT",
-                                        "ISARRAY attribute used but VALUE element encountered");
-             
-             throw XmlSemanticError(parser.getLine(), mlParms);
-           }
+        }
+        else if (getValueElement(parser, type, value))
+        {
+            if (isArray)
+            {
+                MessageLoaderParms mlParms(
+                    "Common.XmlReader.ARRAY_ATTRIBUTE_DIFFERENT",
+                    "ISARRAY attribute used but VALUE element encountered");
+                throw XmlSemanticError(parser.getLine(), mlParms);
+            }
 
             gotValue = true;
-       }
+        }
 
-       // Now get the closing tag:
+        // Now get the closing tag:
 
-       expectEndTag(parser, "QUALIFIER.DECLARATION");
+        expectEndTag(parser, "QUALIFIER.DECLARATION");
     }
 
     if (!gotValue)
     {
-       if (isArray)
-           value.setNullValue(type, true, arraySize);
-       else
-           value.setNullValue(type, false);
+        if (isArray)
+            value.setNullValue(type, true, arraySize);
+        else
+            value.setNullValue(type, false);
     }
 
     CIMQualifierDecl tmp(name, value, scope, flavor, arraySize);
@@ -3941,7 +3545,7 @@ Boolean XmlReader::getMethodElement(XmlParser& parser, CIMMethod& method)
     XmlEntry entry;
 
     if (!testStartTagOrEmptyTag(parser, entry, "METHOD"))
-       return false;
+        return false;
 
     Boolean empty = entry.type == XmlEntry::EMPTY_TAG;
 
@@ -3950,11 +3554,11 @@ Boolean XmlReader::getMethodElement(XmlParser& parser, CIMMethod& method)
     CIMType type;
     getCimTypeAttribute(parser.getLine(), entry, type, "PROPERTY");
 
-    CIMName classOrigin = 
-       getClassOriginAttribute(parser.getLine(), entry, "PROPERTY");
+    CIMName classOrigin =
+        getClassOriginAttribute(parser.getLine(), entry, "PROPERTY");
 
     Boolean propagated = getCimBooleanAttribute(
-       parser.getLine(), entry, "PROPERTY", "PROPAGATED", false, false);
+        parser.getLine(), entry, "PROPERTY", "PROPAGATED", false, false);
 
     method = CIMMethod(name, type, classOrigin, propagated);
 
@@ -3962,11 +3566,11 @@ Boolean XmlReader::getMethodElement(XmlParser& parser, CIMMethod& method)
     {
         // ATTN-RK-P2-20020219: Decoding algorithm must not depend on the
         // ordering of qualifiers and parameters.
-       getQualifierElements(parser, method);
+        getQualifierElements(parser, method);
 
-       GetParameterElements(parser, method);
+        GetParameterElements(parser, method);
 
-       expectEndTag(parser, "METHOD");
+        expectEndTag(parser, "METHOD");
     }
 
     return true;
@@ -3986,36 +3590,36 @@ Boolean XmlReader::getClassElement(XmlParser& parser, CIMClass& cimClass)
     XmlEntry entry;
 
     if (!testStartTagOrEmptyTag(parser, entry, "CLASS"))
-       return false;
+        return false;
 
     CIMName name = getCimNameAttribute(parser.getLine(), entry, "CLASS");
 
-    CIMName superClass = getSuperClassAttribute(parser.getLine(), entry,"CLASS");
+    CIMName superClass =
+        getSuperClassAttribute(parser.getLine(), entry,"CLASS");
 
     cimClass = CIMClass(name, superClass);
 
-       if(entry.type != XmlEntry::EMPTY_TAG)
-       {
+    if (entry.type != XmlEntry::EMPTY_TAG)
+    {
+        // Get QUALIFIER elements:
 
-    // Get QUALIFIER elements:
+        getQualifierElements(parser, cimClass);
 
-    getQualifierElements(parser, cimClass);
+        // Get PROPERTY elements:
 
-    // Get PROPERTY elements:
+        GetPropertyElements(parser, cimClass);
 
-    GetPropertyElements(parser, cimClass);
+        // Get METHOD elements:
 
-    // Get METHOD elements:
+        CIMMethod method;
 
-    CIMMethod method;
+        while (getMethodElement(parser, method))
+            cimClass.addMethod(method);
 
-    while (getMethodElement(parser, method))
-       cimClass.addMethod(method);     
+        // Get CLASS end tag:
 
-    // Get CLASS end tag:
-       
-       expectEndTag(parser, "CLASS");
-       }
+        expectEndTag(parser, "CLASS");
+    }
 
     return true;
 }
@@ -4031,18 +3635,18 @@ Boolean XmlReader::getClassElement(XmlParser& parser, CIMClass& cimClass)
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::getInstanceElement(
-    XmlParser& parser, 
+    XmlParser& parser,
     CIMInstance& cimInstance)
 {
     XmlEntry entry;
 
     if (!testStartTagOrEmptyTag(parser, entry, "INSTANCE"))
-       return false;
+        return false;
 
     Boolean empty = entry.type == XmlEntry::EMPTY_TAG;
 
     String className = getClassNameAttribute(
-       parser.getLine(), entry, "INSTANCE");
+        parser.getLine(), entry, "INSTANCE");
 
     cimInstance = CIMInstance(className);
 
@@ -4069,13 +3673,13 @@ Boolean XmlReader::getInstanceElement(
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::getNamedInstanceElement(
-    XmlParser& parser, 
+    XmlParser& parser,
     CIMInstance& namedInstance)
 {
     XmlEntry entry;
 
     if (!testStartTag(parser, entry, "VALUE.NAMEDINSTANCE"))
-       return false;
+        return false;
 
     CIMObjectPath instanceName;
 
@@ -4083,33 +3687,20 @@ Boolean XmlReader::getNamedInstanceElement(
 
     if (!getInstanceNameElement(parser, instanceName))
     {
-
-      // l10n
-
-      // throw XmlValidationError(parser.getLine(), 
-      //    "expected INSTANCENAME element");
-
-      MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_INSTANCENAME_ELEMENT",
-                                "expected INSTANCENAME element");
-      
-      throw XmlValidationError(parser.getLine(), mlParms);
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.EXPECTED_INSTANCENAME_ELEMENT",
+            "expected INSTANCENAME element");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 
     // Get INSTANCE elements:
 
     if (!getInstanceElement(parser, namedInstance))
     {
-
-      // l10n
-
-      // throw XmlValidationError(parser.getLine(),
-      //   "expected INSTANCE element");
-
-
-      MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_INSTANCE_ELEMENT",
-                                "expected INSTANCE element");
-      
-      throw XmlValidationError(parser.getLine(), mlParms);
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.EXPECTED_INSTANCE_ELEMENT",
+            "expected INSTANCE element");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 
     // Get VALUE.NAMEDINSTANCE end tag:
@@ -4131,16 +3722,10 @@ void XmlReader::getObject(XmlParser& parser, CIMClass& x)
 {
     if (!getClassElement(parser, x))
     {
-
-      // l10n
-
-      // throw XmlValidationError(parser.getLine(),
-      //   "expected CLASS element");
-
-      MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_CLASS_ELEMENT",
-                                "expected CLASS element");
-      
-      throw XmlValidationError(parser.getLine(), mlParms);
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.EXPECTED_CLASS_ELEMENT",
+            "expected CLASS element");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 }
 
@@ -4154,16 +3739,10 @@ void XmlReader::getObject(XmlParser& parser, CIMInstance& x)
 {
     if (!getInstanceElement(parser, x))
     {
-
-      // l10n
-      
-      // throw XmlValidationError(parser.getLine(),
-      //   "expected INSTANCE element");
-
-      MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_INSTANCE_ELEMENT",
-                                "expected INSTANCE element");
-      
-      throw XmlValidationError(parser.getLine(), mlParms);
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.EXPECTED_INSTANCE_ELEMENT",
+            "expected INSTANCE element");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 }
 
@@ -4177,16 +3756,10 @@ void XmlReader::getObject(XmlParser& parser, CIMQualifierDecl& x)
 {
     if (!getQualifierDeclElement(parser, x))
     {
-
-      // l10n
-
-      // throw XmlValidationError(parser.getLine(),
-      //   "expected QUALIFIER.DECLARATION element");
-
-      MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_QUALIFIER_DECLARATION_ELEMENT",
-                                "expected QUALIFIER.DECLARATION element");
-      
-      throw XmlValidationError(parser.getLine(), mlParms);
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.EXPECTED_QUALIFIER_DECLARATION_ELEMENT",
+            "expected QUALIFIER.DECLARATION element");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 }
 
@@ -4197,46 +3770,36 @@ void XmlReader::getObject(XmlParser& parser, CIMQualifierDecl& x)
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::getMessageStartTag(
-    XmlParser& parser, 
+    XmlParser& parser,
     String& id,
     String& protocolVersion)
 {
     XmlEntry entry;
 
     if (!testStartTag(parser, entry, "MESSAGE"))
-       return false;
+        return false;
 
     // Get MESSAGE.ID:
 
-    if (!entry.getAttributeValue("ID", id)) {
-
-      // l10n
-
-      // throw XmlValidationError(parser.getLine(), 
-      //   "Invalid or missing MESSAGE.ID attribute");
-
-      MessageLoaderParms mlParms("Common.XmlReader.INVALID_MISSING_MESSAGE_ID_ATTRIBUTE",
-                                "Invalid or missing MESSAGE.ID attribute");
-      
-      throw XmlValidationError(parser.getLine(), mlParms);
-    }      
+    if (!entry.getAttributeValue("ID", id))
+    {
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.INVALID_MISSING_MESSAGE_ID_ATTRIBUTE",
+            "Invalid or missing MESSAGE.ID attribute");
+        throw XmlValidationError(parser.getLine(), mlParms);
+    }
 
 
     // Get MESSAGE.PROTOCOLVERSION:
 
-    if (!entry.getAttributeValue("PROTOCOLVERSION", protocolVersion)) {
-
-      // l10n
-
-      // throw XmlValidationError(parser.getLine(),
-      //   "Invalid or missing MESSAGE.PROTOCOLVERSION attribute");
-
-      MessageLoaderParms mlParms("Common.XmlReader.INVALID_MISSING_PROTOCOLVERSION_ATTRIBUTE",
-                                "Invalid or missing MESSAGE.PROTOCOLVERSION attribute");
-      
-      throw XmlValidationError(parser.getLine(), mlParms);
+    if (!entry.getAttributeValue("PROTOCOLVERSION", protocolVersion))
+    {
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.INVALID_MISSING_PROTOCOLVERSION_ATTRIBUTE",
+            "Invalid or missing MESSAGE.PROTOCOLVERSION attribute");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
-    
+
     return true;
 }
 
@@ -4247,28 +3810,23 @@ Boolean XmlReader::getMessageStartTag(
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::getIMethodCallStartTag(
-    XmlParser& parser, 
+    XmlParser& parser,
     const char*& name)
 {
     XmlEntry entry;
 
     if (!testStartTag(parser, entry, "IMETHODCALL"))
-       return false;
+        return false;
 
     // Get IMETHODCALL.NAME attribute:
 
 
-    if (!entry.getAttributeValue("NAME", name)) {
-
-      // l10n
-
-      // throw XmlValidationError(parser.getLine(),
-      //   "Missing IMETHODCALL.NAME attribute");
-
-      MessageLoaderParms mlParms("Common.XmlReader.MISSING_IMETHODCALL_ATTRIBUTE",
-                                "Missing IMETHODCALL.NAME attribute");
-
-      throw XmlValidationError(parser.getLine(), mlParms);
+    if (!entry.getAttributeValue("NAME", name))
+    {
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.MISSING_IMETHODCALL_ATTRIBUTE",
+            "Missing IMETHODCALL.NAME attribute");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 
 
@@ -4282,30 +3840,25 @@ Boolean XmlReader::getIMethodCallStartTag(
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::getIMethodResponseStartTag(
-    XmlParser& parser, 
+    XmlParser& parser,
     const char*& name,
     Boolean& isEmptyTag)
 {
     XmlEntry entry;
 
     if (!testStartTagOrEmptyTag(parser, entry, "IMETHODRESPONSE"))
-       return false;
+        return false;
 
     isEmptyTag = (entry.type == XmlEntry::EMPTY_TAG);
 
     // Get IMETHODRESPONSE.NAME attribute:
 
-    if (!entry.getAttributeValue("NAME", name)) {
-
-      // l10n
-
-      // throw XmlValidationError(parser.getLine(),
-      //   "Missing IMETHODRESPONSE.NAME attribute");
-
-      MessageLoaderParms mlParms("Common.XmlReader.MISSING_IMETHODRESPONSE_ATTRIBUTE",
-                                "Missing IMETHODRESPONSE.NAME attribute");
-
-      throw XmlValidationError(parser.getLine(), mlParms);
+    if (!entry.getAttributeValue("NAME", name))
+    {
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.MISSING_IMETHODRESPONSE_ATTRIBUTE",
+            "Missing IMETHODRESPONSE.NAME attribute");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 
 
@@ -4319,30 +3872,25 @@ Boolean XmlReader::getIMethodResponseStartTag(
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::getIParamValueTag(
-    XmlParser& parser, 
+    XmlParser& parser,
     const char*& name,
     Boolean& isEmptyTag)
 {
     XmlEntry entry;
 
     if (!testStartTagOrEmptyTag(parser, entry, "IPARAMVALUE"))
-       return false;
+        return false;
 
     isEmptyTag = (entry.type == XmlEntry::EMPTY_TAG);
 
     // Get IPARAMVALUE.NAME attribute:
 
-    if (!entry.getAttributeValue("NAME", name)) {
-
-      // l10n
-
-      // throw XmlValidationError(parser.getLine(),
-      //   "Missing IPARAMVALUE.NAME attribute");
-
-      MessageLoaderParms mlParms("Common.XmlReader.MISSING_IPARAMVALUE_ATTRIBUTE",
-                                "Missing IPARAMVALUE.NAME attribute");
-
-      throw XmlValidationError(parser.getLine(), mlParms);
+    if (!entry.getAttributeValue("NAME", name))
+    {
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.MISSING_IPARAMVALUE_ATTRIBUTE",
+            "Missing IPARAMVALUE.NAME attribute");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 
     return true;
@@ -4355,7 +3903,7 @@ Boolean XmlReader::getIParamValueTag(
 //------------------------------------------------------------------------------
 
 void XmlReader::rejectNullIParamValue(
-    XmlParser& parser, 
+    XmlParser& parser,
     Boolean isEmptyTag,
     const char* paramName)
 {
@@ -4377,7 +3925,7 @@ void XmlReader::rejectNullIParamValue(
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::getBooleanValueElement(
-    XmlParser& parser, 
+    XmlParser& parser,
     Boolean& result,
     Boolean required)
 {
@@ -4385,39 +3933,28 @@ Boolean XmlReader::getBooleanValueElement(
 
     if (!testStartTag(parser, entry, "VALUE"))
     {
-       if (required)
-       {
-
-         // l10n
-
-         // throw XmlValidationError(parser.getLine(),
-         // "Expected VALUE element");
-
-         MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_VALUE_ELEMENT",
-                                    "Expected VALUE element");
-         
-         throw XmlValidationError(parser.getLine(), mlParms);
-       }
-       return false;
+        if (required)
+        {
+            MessageLoaderParms mlParms(
+                "Common.XmlReader.EXPECTED_VALUE_ELEMENT",
+                "Expected VALUE element");
+            throw XmlValidationError(parser.getLine(), mlParms);
+        }
+        return false;
     }
 
     expectContentOrCData(parser, entry);
 
     if (System::strcasecmp(entry.text, "TRUE") == 0)
-       result = true;
+        result = true;
     else if (System::strcasecmp(entry.text, "FALSE") == 0)
-       result = false;
-    else {
-
-      // l10n
-
-      // throw XmlSemanticError(parser.getLine(), 
-      //   "Invalid value for VALUE element: must be \"TRUE\" or \"FALSE\"");
-
-      MessageLoaderParms mlParms("Common.XmlReader.INVALID_VALUE_FOR_VALUE_ELEMENT",
-                                "Invalid value for VALUE element: must be \"TRUE\" or \"FALSE\"");
-      
-      throw XmlSemanticError(parser.getLine(), mlParms);
+        result = false;
+    else
+    {
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.INVALID_VALUE_FOR_VALUE_ELEMENT",
+            "Invalid value for VALUE element: must be \"TRUE\" or \"FALSE\"");
+        throw XmlSemanticError(parser.getLine(), mlParms);
     }
 
     expectEndTag(parser, "VALUE");
@@ -4430,14 +3967,14 @@ Boolean XmlReader::getBooleanValueElement(
 //     DMTF CR Pending
 //
 //     <!ELEMENT ERROR (INSTANCE*)>
-//     <!ATTLIST ERROR 
+//     <!ATTLIST ERROR
 //         CODE CDATA #REQUIRED
 //         DESCRIPTION CDATA #IMPLIED>
 //
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::getErrorElement(
-    XmlParser& parser, 
+    XmlParser& parser,
     CIMException& cimException,
     Boolean required)
 {
@@ -4445,19 +3982,14 @@ Boolean XmlReader::getErrorElement(
 
     if (!testStartTagOrEmptyTag(parser, entry, "ERROR"))
     {
-      if (required) {
-
-       // l10n
-
-       // throw XmlValidationError(parser.getLine(),"Expected ERROR element");
-       
-       MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_ERROR_ELEMENT",
-                                  "Expected ERROR element");
-       
-       throw XmlValidationError(parser.getLine(), mlParms);
-       
-      }
-      return false;
+        if (required)
+        {
+            MessageLoaderParms mlParms(
+                "Common.XmlReader.EXPECTED_ERROR_ELEMENT",
+                "Expected ERROR element");
+            throw XmlValidationError(parser.getLine(), mlParms);
+        }
+        return false;
     }
 
     Boolean empty = entry.type == XmlEntry::EMPTY_TAG;
@@ -4466,19 +3998,12 @@ Boolean XmlReader::getErrorElement(
 
     Uint32 tmpCode;
 
-    if (!entry.getAttributeValue("CODE", tmpCode)) {
-
-
-      // l10n
-
-      // throw XmlValidationError(
-      //       parser.getLine(), "missing ERROR.CODE attribute");
-
-      MessageLoaderParms mlParms("Common.XmlReader.MISSING_ERROR_CODE_ATTRIBUTE",
-                                "missing ERROR.CODE attribute");
-      
-      throw XmlValidationError(parser.getLine(), mlParms);
-
+    if (!entry.getAttributeValue("CODE", tmpCode))
+    {
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.MISSING_ERROR_CODE_ATTRIBUTE",
+            "missing ERROR.CODE attribute");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 
     // Get ERROR.DESCRIPTION:
@@ -4487,19 +4012,19 @@ Boolean XmlReader::getErrorElement(
 
     entry.getAttributeValue("DESCRIPTION", tmpDescription);
 
-    cimException = 
-       PEGASUS_CIM_EXCEPTION(CIMStatusCode(tmpCode), tmpDescription);
+    cimException =
+        PEGASUS_CIM_EXCEPTION(CIMStatusCode(tmpCode), tmpDescription);
 
     if (!empty)
     {
-       CIMInstance instance;
+        CIMInstance instance;
 
-       while (getInstanceElement(parser, instance))
-       {
-           cimException.addError(instance);
-       }
+        while (getInstanceElement(parser, instance))
+        {
+            cimException.addError(instance);
+        }
 
-       expectEndTag(parser, "ERROR");
+        expectEndTag(parser, "ERROR");
     }
 
     return true;
@@ -4513,38 +4038,31 @@ Boolean XmlReader::getErrorElement(
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::getValueObjectElement(
-    XmlParser& parser, 
+    XmlParser& parser,
     CIMObject& object)
 {
     XmlEntry entry;
 
     if (!testStartTag(parser, entry, "VALUE.OBJECT"))
-       return false;
+        return false;
 
     CIMInstance cimInstance;
     CIMClass cimClass;
 
     if (XmlReader::getInstanceElement(parser, cimInstance))
     {
-       object = CIMObject(cimInstance);
+        object = CIMObject(cimInstance);
     }
     else if (XmlReader::getClassElement(parser, cimClass))
     {
-       object = CIMObject(cimClass);
+        object = CIMObject(cimClass);
     }
     else
     {
-
-      // l10n
-
-      // throw XmlValidationError(parser.getLine(),
-      //   "Expected INSTANCE or CLASS element");
-
-      MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_INSTANCE_OR_CLASS_ELEMENT",
-                                "Expected INSTANCE or CLASS element");
-      
-      throw XmlValidationError(parser.getLine(), mlParms);
-
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.EXPECTED_INSTANCE_OR_CLASS_ELEMENT",
+            "Expected INSTANCE or CLASS element");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 
     expectEndTag(parser, "VALUE.OBJECT");
@@ -4560,71 +4078,53 @@ Boolean XmlReader::getValueObjectElement(
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::getValueObjectWithPathElement(
-    XmlParser& parser, 
+    XmlParser& parser,
     CIMObject& objectWithPath)
 {
     XmlEntry entry;
 
     if (!testStartTag(parser, entry, "VALUE.OBJECTWITHPATH"))
-       return false;
+        return false;
 
     CIMObjectPath reference;
     Boolean isInstance = false;
 
     if (XmlReader::getInstancePathElement(parser, reference))
-       isInstance = true;
+        isInstance = true;
     else if (!XmlReader::getClassPathElement(parser, reference))
     {
-
-      // l10n 485
-      
-      // throw XmlValidationError(parser.getLine(),
-      //    "Expected INSTANCEPATH or CLASSPATH element");
-
-      MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_INSTANCEPATH_OR_CLASSPATH_ELEMENT",
-                                "Expected INSTANCEPATH or CLASSPATH element");
-      
-      throw XmlValidationError(parser.getLine(), mlParms);
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.EXPECTED_INSTANCEPATH_OR_CLASSPATH_ELEMENT",
+            "Expected INSTANCEPATH or CLASSPATH element");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 
     if (isInstance)
     {
-       CIMInstance cimInstance;
-
-       if (!XmlReader::getInstanceElement(parser, cimInstance))
-       {
-
-         // l10n
+        CIMInstance cimInstance;
 
-         // throw XmlValidationError(parser.getLine(),
-         //               "Expected INSTANCE element");
-
-         MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_INSTANCE_ELEMENT",
-                                    "Expected INSTANCE element");
-         
-         throw XmlValidationError(parser.getLine(), mlParms);
-       }
-       objectWithPath = CIMObject (cimInstance);
+        if (!XmlReader::getInstanceElement(parser, cimInstance))
+        {
+            MessageLoaderParms mlParms(
+                "Common.XmlReader.EXPECTED_INSTANCE_ELEMENT",
+                "Expected INSTANCE element");
+            throw XmlValidationError(parser.getLine(), mlParms);
+        }
+        objectWithPath = CIMObject (cimInstance);
         objectWithPath.setPath (reference);
     }
     else
     {
-       CIMClass cimClass;
-
-       if (!XmlReader::getClassElement(parser, cimClass))
-       {
-
-         // l10n
-
-         // throw XmlValidationError(parser.getLine(),
-         // "Expected CLASS element");
+        CIMClass cimClass;
 
-         MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_CLASS_ELEMENT",
-                                    "Expected CLASS element");
-         
-         throw XmlValidationError(parser.getLine(), mlParms);
-       }
-       objectWithPath = CIMObject (cimClass);
+        if (!XmlReader::getClassElement(parser, cimClass))
+        {
+            MessageLoaderParms mlParms(
+                "Common.XmlReader.EXPECTED_CLASS_ELEMENT",
+                "Expected CLASS element");
+            throw XmlValidationError(parser.getLine(), mlParms);
+        }
+        objectWithPath = CIMObject (cimClass);
         objectWithPath.setPath (reference);
     }
 
@@ -4642,77 +4142,54 @@ Boolean XmlReader::getValueObjectWithPathElement(
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::getValueObjectWithLocalPathElement(
-    XmlParser& parser, 
+    XmlParser& parser,
     CIMObject& objectWithPath)
 {
     XmlEntry entry;
 
     if (!testStartTag(parser, entry, "VALUE.OBJECTWITHLOCALPATH"))
-       return false;
+        return false;
 
     CIMObjectPath reference;
     Boolean isInstance = false;
 
     if (XmlReader::getLocalInstancePathElement(parser, reference))
-       isInstance = true;
+        isInstance = true;
     else if (!XmlReader::getLocalClassPathElement(parser, reference))
     {
-
-      // l10n
-
-      // throw XmlValidationError(parser.getLine(),
-      //   "Expected LOCALINSTANCEPATH or LOCALCLASSPATH element");
-
-      //l10n updated
-      MessageLoaderParms mlParms("Common.XmlConstants.MISSING_ELEMENT_LOCALPATH",
-                                                                                                               MISSING_ELEMENT_LOCALPATH);
-      
-      throw XmlValidationError(parser.getLine(), mlParms);
-
+        MessageLoaderParms mlParms(
+            "Common.XmlConstants.MISSING_ELEMENT_LOCALPATH",
+            MISSING_ELEMENT_LOCALPATH);
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 
     if (isInstance)
     {
-       CIMInstance cimInstance;
-
-       if (!XmlReader::getInstanceElement(parser, cimInstance))
-       {
-
-         // l10n
-
-         // throw XmlValidationError(parser.getLine(),
-         //               "Expected INSTANCE element");
-
-         MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_INSTANCE_ELEMENT",
-                                    "Expected INSTANCE element");
-         
-         throw XmlValidationError(parser.getLine(), mlParms);
+        CIMInstance cimInstance;
 
-       }
-       objectWithPath = CIMObject (cimInstance);
-       objectWithPath.setPath (reference);
+        if (!XmlReader::getInstanceElement(parser, cimInstance))
+        {
+            MessageLoaderParms mlParms(
+                "Common.XmlReader.EXPECTED_INSTANCE_ELEMENT",
+                "Expected INSTANCE element");
+            throw XmlValidationError(parser.getLine(), mlParms);
+        }
+        objectWithPath = CIMObject (cimInstance);
+        objectWithPath.setPath (reference);
     }
     else
     {
-       CIMClass cimClass;
-
-       if (!XmlReader::getClassElement(parser, cimClass))
-       {
-
-         // l10n
+        CIMClass cimClass;
 
-         // throw XmlValidationError(parser.getLine(),
-         // "Expected CLASS element");
-
-         MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_CLASS_ELEMENT",
-                                    "Expected CLASS element");
-         
-         throw XmlValidationError(parser.getLine(), mlParms);
-
-
-       }
-       objectWithPath = CIMObject (cimClass);
-       objectWithPath.setPath (reference);
+        if (!XmlReader::getClassElement(parser, cimClass))
+        {
+            MessageLoaderParms mlParms(
+                "Common.XmlReader.EXPECTED_CLASS_ELEMENT",
+                "Expected CLASS element");
+            throw XmlValidationError(parser.getLine(), mlParms);
+        }
+        objectWithPath = CIMObject (cimClass);
+        objectWithPath.setPath (reference);
     }
 
     expectEndTag(parser, "VALUE.OBJECTWITHLOCALPATH");
@@ -4729,7 +4206,7 @@ Boolean XmlReader::getValueObjectWithLocalPathElement(
 //------------------------------------------------------------------------------
 
 void XmlReader::getObjectArray(
-    XmlParser& parser, 
+    XmlParser& parser,
     Array<CIMObject>& objectArray)
 {
     CIMObject object;
@@ -4764,31 +4241,24 @@ void XmlReader::getObjectArray(
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::getObjectNameElement(
-    XmlParser& parser, 
+    XmlParser& parser,
     CIMObjectPath& objectName)
 {
     CIMName className;
 
     if (getClassNameElement(parser, className, false))
     {
-       objectName.set(String(), CIMNamespaceName(), className);
-       return true;
+        objectName.set(String(), CIMNamespaceName(), className);
+        return true;
     }
     else if (getInstanceNameElement(parser, objectName))
-       return true;
+        return true;
     else
     {
-
-      // l10n
-
-      // throw XmlValidationError(parser.getLine(),
-      //   "expected CLASSNAME or INSTANCENAME element");
-
-      MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_CLASSNAME_OR_INSTANCENAME_ELEMENT",
-                                "Expected CLASSNAME or INSTANCENAME element");
-      
-      throw XmlValidationError(parser.getLine(), mlParms);
-      
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.EXPECTED_CLASSNAME_OR_INSTANCENAME_ELEMENT",
+            "Expected CLASSNAME or INSTANCENAME element");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 
     PEGASUS_UNREACHABLE( return false; )
@@ -4801,39 +4271,33 @@ Boolean XmlReader::getObjectNameElement(
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::getObjectPathElement(
-    XmlParser& parser, 
+    XmlParser& parser,
     CIMObjectPath& objectPath)
 {
     XmlEntry entry;
 
     if (!testStartTag(parser, entry, "OBJECTPATH"))
-       return false;
+        return false;
 
     if (getClassPathElement(parser, objectPath))
     {
-       expectEndTag(parser, "OBJECTPATH");
-       return true;
+        expectEndTag(parser, "OBJECTPATH");
+        return true;
     }
     else if (getInstancePathElement(parser, objectPath))
     {
-       expectEndTag(parser, "OBJECTPATH");
-       return true;
+        expectEndTag(parser, "OBJECTPATH");
+        return true;
     }
     else
     {
-
-      // l10n
-
-      // throw XmlValidationError(parser.getLine(),
-      //   "expected INSTANCEPATH or CLASSPATH element");
-
-      MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_INSTANCEPATH_OR_CLASSPATH_ELEMENT",
-                                "expected INSTANCEPATH or CLASSPATH element");
-      
-      throw XmlValidationError(parser.getLine(), mlParms);
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.EXPECTED_INSTANCEPATH_OR_CLASSPATH_ELEMENT",
+            "expected INSTANCEPATH or CLASSPATH element");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 
-    PEGASUS_UNREACHABLE ( return false; )
+    PEGASUS_UNREACHABLE(return false;)
 }
 
 //------------------------------------------------------------------------------
@@ -4843,29 +4307,24 @@ Boolean XmlReader::getObjectPathElement(
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::getEMethodCallStartTag(
-    XmlParser& parser, 
+    XmlParser& parser,
     const char*& name)
 {
     XmlEntry entry;
 
     if (!testStartTag(parser, entry, "EXPMETHODCALL"))
-       return false;
+        return false;
 
     // Get EXPMETHODCALL.NAME attribute:
 
 
-      if (!entry.getAttributeValue("NAME", name)) {
-
-       // l10n
-
-       // throw XmlValidationError(parser.getLine(),
-       // "Missing EXPMETHODCALL.NAME attribute");
-
-       MessageLoaderParms mlParms("Common.XmlReader.MISSING_EXPMETHODCALL_ATTRIBUTE",
-                                  "Missing EXPMETHODCALL.NAME attribute");
-       
-       throw XmlValidationError(parser.getLine(), mlParms);
-      }
+    if (!entry.getAttributeValue("NAME", name))
+    {
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.MISSING_EXPMETHODCALL_ATTRIBUTE",
+            "Missing EXPMETHODCALL.NAME attribute");
+        throw XmlValidationError(parser.getLine(), mlParms);
+    }
 
     return true;
 }
@@ -4877,31 +4336,27 @@ Boolean XmlReader::getEMethodCallStartTag(
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::getEMethodResponseStartTag(
-    XmlParser& parser, 
+    XmlParser& parser,
     const char*& name,
     Boolean& isEmptyTag)
 {
     XmlEntry entry;
 
     if (!testStartTagOrEmptyTag(parser, entry, "EXPMETHODRESPONSE"))
-       return false;
+        return false;
 
     isEmptyTag = (entry.type == XmlEntry::EMPTY_TAG);
 
     // Get EXPMETHODRESPONSE.NAME attribute:
 
 
-      if (!entry.getAttributeValue("NAME", name)) {
-       // l10n
-       
-       // throw XmlValidationError(
-       //   parser.getLine(), "Missing EXPMETHODRESPONSE.NAME attribute");
-       
-       MessageLoaderParms mlParms("Common.XmlReader.MISSING_EXPMETHODRESPONSE_ATTRIBUTE",
-                                  "Missing EXPMETHODRESPONSE.NAME attribute");
-       
-       throw XmlValidationError(parser.getLine(), mlParms);
-      }
+    if (!entry.getAttributeValue("NAME", name))
+    {
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.MISSING_EXPMETHODRESPONSE_ATTRIBUTE",
+            "Missing EXPMETHODRESPONSE.NAME attribute");
+        throw XmlValidationError(parser.getLine(), mlParms);
+    }
 
     return true;
 }
@@ -4913,28 +4368,23 @@ Boolean XmlReader::getEMethodResponseStartTag(
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::getEParamValueTag(
-    XmlParser& parser, 
+    XmlParser& parser,
     const char*& name)
 {
     XmlEntry entry;
 
     if (!testStartTag(parser, entry, "EXPPARAMVALUE"))
-       return false;
+        return false;
 
     // Get EXPPARAMVALUE.NAME attribute:
 
 
-    if (!entry.getAttributeValue("NAME", name)) {
-
-      // l10n
-
-      // throw XmlValidationError(parser.getLine(),
-      //   "Missing EXPPARAMVALUE.NAME attribute");
-
-      MessageLoaderParms mlParms("Common.XmlReader.MISSING_EXPPARAMVALUE_ATTRIBUTE",
-                                "Missing EXPPARAMVALUE.NAME attribute");
-
-      throw XmlValidationError(parser.getLine(), mlParms);
+    if (!entry.getAttributeValue("NAME", name))
+    {
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.MISSING_EXPPARAMVALUE_ATTRIBUTE",
+            "Missing EXPPARAMVALUE.NAME attribute");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 
 
@@ -4949,28 +4399,23 @@ Boolean XmlReader::getEParamValueTag(
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::getMethodCallStartTag(
-    XmlParser& parser, 
+    XmlParser& parser,
     const char*& name)
 {
     XmlEntry entry;
 
     if (!testStartTag(parser, entry, "METHODCALL"))
-       return false;
+        return false;
 
     // Get METHODCALL.NAME attribute:
 
 
-    if (!entry.getAttributeValue("NAME", name)) {
-
-      // l10n
-
-      // throw XmlValidationError(parser.getLine(),
-      //              "Missing METHODCALL.NAME attribute");
-
-      MessageLoaderParms mlParms("Common.XmlReader.MISSING_METHODCALL_ATTRIBUTE",
-                                "Missing METHODCALL.NAME attribute");
-
-      throw XmlValidationError(parser.getLine(), mlParms);
+    if (!entry.getAttributeValue("NAME", name))
+    {
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.MISSING_METHODCALL_ATTRIBUTE",
+            "Missing METHODCALL.NAME attribute");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 
 
@@ -4984,31 +4429,26 @@ Boolean XmlReader::getMethodCallStartTag(
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::getMethodResponseStartTag(
-    XmlParser& parser, 
+    XmlParser& parser,
     const char*& name,
     Boolean& isEmptyTag)
 {
     XmlEntry entry;
 
     if (!testStartTagOrEmptyTag(parser, entry, "METHODRESPONSE"))
-       return false;
+        return false;
 
     isEmptyTag = (entry.type == XmlEntry::EMPTY_TAG);
 
     // Get METHODRESPONSE.NAME attribute:
 
 
-    if (!entry.getAttributeValue("NAME", name)) {
-
-      // l10n
-
-      // throw XmlValidationError(parser.getLine(),
-      //   "Missing METHODRESPONSE.NAME attribute");
-
-      MessageLoaderParms mlParms("Common.XmlReader.MISSING_METHODRESPONSE_ATTRIBUTE",
-                                "Missing METHODRESPONSE.NAME attribute");
-
-      throw XmlValidationError(parser.getLine(), mlParms);
+    if (!entry.getAttributeValue("NAME", name))
+    {
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.MISSING_METHODRESPONSE_ATTRIBUTE",
+            "Missing METHODRESPONSE.NAME attribute");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
 
     return true;
@@ -5027,7 +4467,7 @@ Boolean XmlReader::getMethodResponseStartTag(
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::getParamValueElement(
-    XmlParser& parser, 
+    XmlParser& parser,
     CIMParamValue& paramValue)
 {
     XmlEntry entry;
@@ -5036,29 +4476,24 @@ Boolean XmlReader::getParamValueElement(
     CIMValue value;
 
     if (!testStartTagOrEmptyTag(parser, entry, "PARAMVALUE"))
-       return false;
+        return false;
 
     Boolean empty = entry.type == XmlEntry::EMPTY_TAG;
 
     // Get PARAMVALUE.NAME attribute:
 
-    if (!entry.getAttributeValue("NAME", name)) {
-
-      // l10n
-
-      // throw XmlValidationError(parser.getLine(),
-      //   "Missing PARAMVALUE.NAME attribute");
-
-      MessageLoaderParms mlParms("Common.XmlReader.MISSING_PARAMVALUE_ATTRIBUTE",
-                                "Missing PARAMVALUE.NAME attribute");
-
-      throw XmlValidationError(parser.getLine(), mlParms);
+    if (!entry.getAttributeValue("NAME", name))
+    {
+        MessageLoaderParms mlParms(
+            "Common.XmlReader.MISSING_PARAMVALUE_ATTRIBUTE",
+            "Missing PARAMVALUE.NAME attribute");
+        throw XmlValidationError(parser.getLine(), mlParms);
     }
-    
+
     // Get PROPERTY.EMBEDDEDOBJECT
 
     String embeddedObject = getEmbeddedObjectAttribute(
-       parser.getLine(), entry, "PARAMVALUE");
+        parser.getLine(), entry, "PARAMVALUE");
 
     // Get PARAMVALUE.PARAMTYPE attribute:
 
@@ -5075,17 +4510,17 @@ Boolean XmlReader::getParamValueElement(
         if ( (type == CIMTYPE_REFERENCE) || !gotType )
         {
             CIMObjectPath reference;
-               if (XmlReader::getValueReferenceElement(parser, reference))
-               {
-                   value.set(reference);
-                   type = CIMTYPE_REFERENCE;
+            if (XmlReader::getValueReferenceElement(parser, reference))
+            {
+                value.set(reference);
+                type = CIMTYPE_REFERENCE;
                 gotType = true;
-               }
+            }
             else if (XmlReader::getValueReferenceArrayElement(parser, value))
-               {
-                   type = CIMTYPE_REFERENCE;
+            {
+                type = CIMTYPE_REFERENCE;
                 gotType = true;
-               }
+            }
             // If type==reference but no VALUE.REFERENCE found, use null value
         }
 
@@ -5094,52 +4529,50 @@ Boolean XmlReader::getParamValueElement(
         {
             CIMType effectiveType;
             if (!gotType)
-               {
-               // If we don't know what type the value is, read it as a String
-                       effectiveType = CIMTYPE_STRING;
-               }
+            {
+                // If we don't know what type the value is, read it as a String
+                effectiveType = CIMTYPE_STRING;
+            }
             else
-               {
-                       effectiveType = type;
-               }
+            {
+                effectiveType = type;
+            }
 
-            // If the EMBEDDEDOBJECT attribute is present with value "object" 
+            // If the EMBEDDEDOBJECT attribute is present with value "object"
             // then
             //     Convert the EmbeddedObject-encoded string into a CIMObject
 #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
             Boolean isEmbeddedObject = String::equal(embeddedObject, "object");
-            Boolean isEmbeddedInstance = String::equal(embeddedObject, "instance");
-            if(isEmbeddedObject || isEmbeddedInstance) 
+            Boolean isEmbeddedInstance =
+                String::equal(embeddedObject, "instance");
+            if (isEmbeddedObject || isEmbeddedInstance)
             {
-                // The EMBEDDEDOBJECT attribute is only valid on Parameters of type string
+                // The EMBEDDEDOBJECT attribute is only valid on Parameters
+                // of type string
                 // The type must have been specified.
                 if (gotType && (type == CIMTYPE_STRING))
                 {
-                  if(isEmbeddedObject)
-                    effectiveType = CIMTYPE_OBJECT; // Used below by getValueElement() or getValueArrayElement()
+                  if (isEmbeddedObject)
+                      // Used below by getValueElement() or
+                      // getValueArrayElement()
+                      effectiveType = CIMTYPE_OBJECT;
                   else
-                    effectiveType = CIMTYPE_INSTANCE;
+                      effectiveType = CIMTYPE_INSTANCE;
                 }
                 else
                 {
-                    // Error -- throw exception 
-                    // (the EmbeddedObject attribute may be applied only to entities that have the type String)
-
-                    // l10n
-
-                    // throw XmlValidationError(parser.getLine(),
-                    //   "expected string type");
-
-                    MessageLoaderParms mlParms("Common.XmlReader.INVALID_EMBEDDEDOBJECT_TYPE",
-                                     "The EMBEDDEDOBJECT attribute is only valid on string types.");
-
+                    MessageLoaderParms mlParms(
+                        "Common.XmlReader.INVALID_EMBEDDEDOBJECT_TYPE",
+                        "The EMBEDDEDOBJECT attribute is only valid on "
+                            "string types.");
                     throw XmlValidationError(parser.getLine(), mlParms);
                 }
             }
 #else
-            if (String::equal(embeddedObject, "object")) 
+            if (String::equal(embeddedObject, "object"))
             {
-                // The EMBEDDEDOBJECT attribute is only valid on Parameters of type string
+                // The EMBEDDEDOBJECT attribute is only valid on Parameters
+                // of type string
                 // The type must have been specified.
                 if (gotType && (type == CIMTYPE_STRING))
                 {
@@ -5148,35 +4581,26 @@ Boolean XmlReader::getParamValueElement(
                 }
                 else
                 {
-                    // Error -- throw exception 
-                    // (the EmbeddedObject attribute may be applied only to entities that have the type String)
-
-                    // l10n
-
-                    // throw XmlValidationError(parser.getLine(),
-                    //   "expected string type");
-
-                    MessageLoaderParms mlParms("Common.XmlReader.INVALID_EMBEDDEDOBJECT_TYPE",
-                                     "The EMBEDDEDOBJECT attribute is only valid on string types.");
-
+                    MessageLoaderParms mlParms(
+                        "Common.XmlReader.INVALID_EMBEDDEDOBJECT_TYPE",
+                        "The EMBEDDEDOBJECT attribute is only valid on "
+                            "string types.");
                     throw XmlValidationError(parser.getLine(), mlParms);
                 }
             }
 #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
-                
-            if ( !XmlReader::getValueArrayElement(parser, effectiveType, value) &&
-                 !XmlReader::getValueElement(parser, effectiveType, value) )
+
+            if (!XmlReader::getValueArrayElement(parser, effectiveType, value)
+                && !XmlReader::getValueElement(parser, effectiveType, value))
             {
                 gotType = false; // Can't distinguish array and non-array types
                 value.clear();   // Isn't necessary; should already be cleared
             }
-
         }
 
         expectEndTag(parser, "PARAMVALUE");
     }
 
-    
     paramValue = CIMParamValue(name, value, gotType);
 
     return true;
@@ -5194,7 +4618,7 @@ Boolean XmlReader::getParamValueElement(
 //------------------------------------------------------------------------------
 
 Boolean XmlReader::getReturnValueElement(
-    XmlParser& parser, 
+    XmlParser& parser,
     CIMValue& returnValue)
 {
     XmlEntry entry;
@@ -5202,12 +4626,12 @@ Boolean XmlReader::getReturnValueElement(
     CIMValue value;
 
     if (!testStartTag(parser, entry, "RETURNVALUE"))
-       return false;
+        return false;
 
     // Get PROPERTY.EMBEDDEDOBJECT
 
     String embeddedObject = getEmbeddedObjectAttribute(
-       parser.getLine(), entry, "RETURNVALUE");
+        parser.getLine(), entry, "RETURNVALUE");
 
     // Get RETURNVALUE.PARAMTYPE attribute:
     // NOTE: Array type return values are not allowed (2/20/02)
@@ -5227,16 +4651,10 @@ Boolean XmlReader::getReturnValueElement(
         }
         else if (type == CIMTYPE_REFERENCE)
         {
-
-         // l10n
-
-         // throw XmlValidationError(parser.getLine(),
-         //   "expected VALUE.REFERENCE element");
-
-         MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_VALUE_REFERENCE_ELEMENT",
-                                    "expected VALUE.REFERENCE element");
-         
-         throw XmlValidationError(parser.getLine(), mlParms);
+            MessageLoaderParms mlParms(
+                "Common.XmlReader.EXPECTED_VALUE_REFERENCE_ELEMENT",
+                "expected VALUE.REFERENCE element");
+            throw XmlValidationError(parser.getLine(), mlParms);
         }
     }
 
@@ -5251,33 +4669,27 @@ Boolean XmlReader::getReturnValueElement(
 #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
         Boolean isEmbeddedObject = String::equal(embeddedObject, "object");
         Boolean isEmbeddedInstance = String::equal(embeddedObject, "instance");
-        if(isEmbeddedObject || isEmbeddedInstance) 
+        if (isEmbeddedObject || isEmbeddedInstance)
         {
             if (gotType && (type == CIMTYPE_STRING))
             {
-                if(isEmbeddedObject)
-                  type = CIMTYPE_OBJECT; // Used below by getValueElement() or getValueArrayElement()
+                if (isEmbeddedObject)
+                    // Used below by getValueElement() or getValueArrayElement()
+                    type = CIMTYPE_OBJECT;
                 else
                   type = CIMTYPE_INSTANCE;
             }
             else
             {
-                // Error -- throw exception 
-                // (the EmbeddedObject attribute may be applied only to entities that have the type String)
-                
-                // l10n
-
-                // throw XmlValidationError(parser.getLine(),
-                //   "expected string type");
-
-                MessageLoaderParms mlParms("Common.XmlReader.INVALID_EMBEDDEDOBJECT_TYPE",
-                                 "The EMBEDDEDOBJECT attribute is only valid on string types.");
-
+                MessageLoaderParms mlParms(
+                    "Common.XmlReader.INVALID_EMBEDDEDOBJECT_TYPE",
+                    "The EMBEDDEDOBJECT attribute is only valid on string "
+                        "types.");
                 throw XmlValidationError(parser.getLine(), mlParms);
             }
         }
 #else
-        if (String::equal(embeddedObject, "object")) 
+        if (String::equal(embeddedObject, "object"))
         {
             if (gotType && (type == CIMTYPE_STRING))
             {
@@ -5285,33 +4697,20 @@ Boolean XmlReader::getReturnValueElement(
             }
             else
             {
-                // Error -- throw exception 
-                // (the EmbeddedObject attribute may be applied only to entities that have the type String)
-                
-                // l10n
-
-                // throw XmlValidationError(parser.getLine(),
-                //   "expected string type");
-
-                MessageLoaderParms mlParms("Common.XmlReader.INVALID_EMBEDDEDOBJECT_TYPE",
-                                 "The EMBEDDEDOBJECT attribute is only valid on string types.");
-
+                MessageLoaderParms mlParms(
+                    "Common.XmlReader.INVALID_EMBEDDEDOBJECT_TYPE",
+                    "The EMBEDDEDOBJECT attribute is only valid on string "
+                        "types.");
                 throw XmlValidationError(parser.getLine(), mlParms);
             }
         }
 #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
         if ( !XmlReader::getValueElement(parser, type, returnValue) )
         {
-
-               // l10n
-
-               // throw XmlValidationError(parser.getLine(),
-               //   "expected VALUE element");
-
-               MessageLoaderParms mlParms("Common.XmlReader.EXPECTED_VALUE_ELEMENT",
-                                    "expected VALUE element");
-         
-               throw XmlValidationError(parser.getLine(), mlParms);
+            MessageLoaderParms mlParms(
+                "Common.XmlReader.EXPECTED_VALUE_ELEMENT",
+                "expected VALUE element");
+            throw XmlValidationError(parser.getLine(), mlParms);
         }
     }
 
index 00c56748db40b4177dfc4fcb70df23f477b2b5ad..948cd7f3fbcf1aee96d31ec5f7867da168dd1702 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By: Carol Ann Krug Graves, Hewlett-Packard Company
-//                  (carolann_graves@hp.com)
-//              Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com)
-//              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_XmlReader_h
@@ -67,289 +60,289 @@ class PEGASUS_COMMON_LINKAGE XmlReader
 public:
 
     static void getXmlDeclaration(
-       XmlParser& parser, 
-       const char*& xmlVersion,
-       const char*& xmlEncoding);
+        XmlParser& parser,
+        const char*& xmlVersion,
+        const char*& xmlEncoding);
 
-    static Boolean testXmlDeclaration (
-       XmlParser& parser,
-       XmlEntry& entry);
+    static Boolean testXmlDeclaration(
+        XmlParser& parser,
+        XmlEntry& entry);
 
     static void expectStartTag(
-       XmlParser& parser, 
-       XmlEntry& entry,
-       const char* tagName);
+        XmlParser& parser,
+        XmlEntry& entry,
+        const char* tagName);
 
     static void expectEndTag(
-       XmlParser& parser, 
-       const char* tagName);
+        XmlParser& parser,
+        const char* tagName);
 
     static void expectStartTagOrEmptyTag(
-       XmlParser& parser, 
-       XmlEntry& entry,
-       const char* tagName);
+        XmlParser& parser,
+        XmlEntry& entry,
+        const char* tagName);
 
     static void skipElement(
-       XmlParser& parser,
-       XmlEntry& entry);
+        XmlParser& parser,
+        XmlEntry& entry);
 
     static Boolean expectContentOrCData(
-       XmlParser& parser, 
-       XmlEntry& entry);
+        XmlParser& parser,
+        XmlEntry& entry);
 
     static Boolean testStartTag(
-       XmlParser& parser, 
-       XmlEntry& entry,
-       const char* tagName);
+        XmlParser& parser,
+        XmlEntry& entry,
+        const char* tagName);
 
     static Boolean testEndTag(
-       XmlParser& parser, 
-       const char* tagName);
+        XmlParser& parser,
+        const char* tagName);
 
     static Boolean testStartTagOrEmptyTag(
-       XmlParser& parser, 
-       XmlEntry& entry,
-       const char* tagName);
+        XmlParser& parser,
+        XmlEntry& entry,
+        const char* tagName);
 
     static Boolean testStartTagOrEmptyTag(
-       XmlParser& parser, 
-       XmlEntry& entry);
+        XmlParser& parser,
+        XmlEntry& entry);
 
     static Boolean testContentOrCData(
-       XmlParser& parser, 
-       XmlEntry& entry);
+        XmlParser& parser,
+        XmlEntry& entry);
 
     static void getCimStartTag(
-       XmlParser& parser, 
-       const char*& cimVersion,
-       const char*& dtdVersion);
+        XmlParser& parser,
+        const char*& cimVersion,
+        const char*& dtdVersion);
 
     static CIMName getCimNameAttribute(
-       Uint32 lineNumber, 
-       const XmlEntry& entry,
-       const char* elementName,
-       Boolean acceptNull = false);
+        Uint32 lineNumber,
+        const XmlEntry& entry,
+        const char* elementName,
+        Boolean acceptNull = false);
 
     static String getClassNameAttribute(
-       Uint32 lineNumber, 
-       const XmlEntry& entry,
-       const char* elementName);
+        Uint32 lineNumber,
+        const XmlEntry& entry,
+        const char* elementName);
 
     static CIMName getClassOriginAttribute(
-       Uint32 lineNumber, 
-       const XmlEntry& entry,
-       const char* tagName);
+        Uint32 lineNumber,
+        const XmlEntry& entry,
+        const char* tagName);
 
     static String getEmbeddedObjectAttribute(
-       Uint32 lineNumber, 
-       const XmlEntry& entry,
-       const char* tagName);
+        Uint32 lineNumber,
+        const XmlEntry& entry,
+        const char* tagName);
 
     static CIMName getReferenceClassAttribute(
-       Uint32 lineNumber, 
-       const XmlEntry& entry,
-       const char* elementName);
+        Uint32 lineNumber,
+        const XmlEntry& entry,
+        const char* elementName);
 
     static CIMName getSuperClassAttribute(
-       Uint32 lineNumber, 
-       const XmlEntry& entry,
-       const char* tagName);
+        Uint32 lineNumber,
+        const XmlEntry& entry,
+        const char* tagName);
 
     static Boolean getCimTypeAttribute(
-       Uint32 lineNumber, 
-       const XmlEntry& entry, 
+        Uint32 lineNumber,
+        const XmlEntry& entry,
         CIMType& cimType,  // Output parameter
-       const char* tagName,
-       const char* attributeName = "TYPE",
-       Boolean required = true);
+        const char* tagName,
+        const char* attributeName = "TYPE",
+        Boolean required = true);
 
     static Boolean getCimBooleanAttribute(
-       Uint32 lineNumber,
-       const XmlEntry& entry,
-       const char* tagName,
-       const char* attributeName,
-       Boolean defaultValue,
-       Boolean required);
+        Uint32 lineNumber,
+        const XmlEntry& entry,
+        const char* tagName,
+        const char* attributeName,
+        Boolean defaultValue,
+        Boolean required);
 
     static String decodeURICharacters(String uriString);
 
     static Boolean stringToReal(
-       const char* stringValue, 
-       Real64& x);
+        const char* stringValue,
+        Real64& x);
 
     static Boolean stringToSignedInteger(
-       const char* stringValue, 
-       Sint64& x);
+        const char* stringValue,
+        Sint64& x);
 
     static Boolean stringToUnsignedInteger(
-       const char* stringValue, 
-       Uint64& x);
+        const char* stringValue,
+        Uint64& x);
 
     static CIMValue stringToValue(
-       Uint32 lineNumber, 
-       const char* valueString, 
-       CIMType type);
+        Uint32 lineNumber,
+        const char* valueString,
+        CIMType type);
 
     /* getValueElement - Gets the CIMType and CIMValue for a single
         XML Value element.  It expects <VALUE> as the start tag.
-        @return Returns True if the value element exists 
+        @return Returns True if the value element exists
     */
     static Boolean getValueElement(
-       XmlParser& parser, 
-       CIMType type, 
-       CIMValue& value);
+        XmlParser& parser,
+        CIMType type,
+        CIMValue& value);
 
     static Boolean getStringValueElement(
-       XmlParser& parser, 
-       String& str, 
-       Boolean required);
+        XmlParser& parser,
+        String& str,
+        Boolean required);
 
     static CIMValue stringArrayToValue(
-       Uint32 lineNumber, 
-       const Array<const char*>& array, 
-       CIMType type);
+        Uint32 lineNumber,
+        const Array<const char*>& array,
+        CIMType type);
 
     static Boolean getValueArrayElement(
-       XmlParser& parser, 
-       CIMType type, 
-       CIMValue& value);
+        XmlParser& parser,
+        CIMType type,
+        CIMValue& value);
 
     static CIMFlavor getFlavor(
-       XmlEntry& entry, 
-       Uint32 lineNumber, 
-       const char* tagName);
+        XmlEntry& entry,
+        Uint32 lineNumber,
+        const char* tagName);
 
     static CIMScope getOptionalScope(
-       XmlParser& parser);
+        XmlParser& parser);
 
     static Boolean getQualifierElement(
-       XmlParser& parser, 
-       CIMQualifier& qualifier);
+        XmlParser& parser,
+        CIMQualifier& qualifier);
 
     static Boolean getPropertyElement(
-       XmlParser& parser, 
-       CIMProperty& property);
+        XmlParser& parser,
+        CIMProperty& property);
 
     static Boolean getArraySizeAttribute(
-       Uint32 lineNumber,
-       const XmlEntry& entry,
-       const char* tagName,
-       Uint32& value);
+        Uint32 lineNumber,
+        const XmlEntry& entry,
+        const char* tagName,
+        Uint32& value);
 
     static Boolean getPropertyArrayElement(
-       XmlParser& parser, 
-       CIMProperty& property);
+        XmlParser& parser,
+        CIMProperty& property);
 
     static Boolean getHostElement(
-       XmlParser& parser,
-       String& host);
+        XmlParser& parser,
+        String& host);
 
     static Boolean getNameSpaceElement(
-       XmlParser& parser,
-       CIMName& nameSpaceComponent);
+        XmlParser& parser,
+        CIMName& nameSpaceComponent);
 
     static Boolean getLocalNameSpacePathElement(
-       XmlParser& parser,
-       String& nameSpace);
+        XmlParser& parser,
+        String& nameSpace);
 
     static Boolean getNameSpacePathElement(
-       XmlParser& parser,
-       String& host,
-       String& nameSpace);
+        XmlParser& parser,
+        String& host,
+        String& nameSpace);
 
     static Boolean getClassNameElement(
-       XmlParser& parser,
-       CIMName& className,
-       Boolean required = false);
+        XmlParser& parser,
+        CIMName& className,
+        Boolean required = false);
 
     static CIMKeyBinding::Type getValueTypeAttribute(
-       Uint32 lineNumber, 
-       const XmlEntry& entry,
-       const char* elementName);
+        Uint32 lineNumber,
+        const XmlEntry& entry,
+        const char* elementName);
 
     static Boolean getKeyValueElement(
-       XmlParser& parser,
-       CIMKeyBinding::Type& type,
-       String& value);
+        XmlParser& parser,
+        CIMKeyBinding::Type& type,
+        String& value);
 
     static Boolean getKeyBindingElement(
-       XmlParser& parser,
-       CIMName& name,
-       String& value,
-       CIMKeyBinding::Type& type);
+        XmlParser& parser,
+        CIMName& name,
+        String& value,
+        CIMKeyBinding::Type& type);
 
     static Boolean getInstanceNameElement(
-       XmlParser& parser,
-       String& className,
-       Array<CIMKeyBinding>& keyBindings);
+        XmlParser& parser,
+        String& className,
+        Array<CIMKeyBinding>& keyBindings);
 
     static Boolean getInstanceNameElement(
-       XmlParser& parser,
-       CIMObjectPath& instanceName);
+        XmlParser& parser,
+        CIMObjectPath& instanceName);
 
     static Boolean getInstancePathElement(
-       XmlParser& parser,
-       CIMObjectPath& reference);
+        XmlParser& parser,
+        CIMObjectPath& reference);
 
     static Boolean getLocalInstancePathElement(
-       XmlParser& parser,
-       CIMObjectPath& reference);
+        XmlParser& parser,
+        CIMObjectPath& reference);
 
     static Boolean getClassPathElement(
-       XmlParser& parser,
-       CIMObjectPath& reference);
+        XmlParser& parser,
+        CIMObjectPath& reference);
 
     static Boolean getLocalClassPathElement(
-       XmlParser& parser,
-       CIMObjectPath& reference);
+        XmlParser& parser,
+        CIMObjectPath& reference);
 
     static Boolean getValueReferenceElement(
-       XmlParser& parser,
-       CIMObjectPath& reference);
+        XmlParser& parser,
+        CIMObjectPath& reference);
 
     static Boolean getValueReferenceArrayElement(
-       XmlParser& parser, 
-       CIMValue& value);
+        XmlParser& parser,
+        CIMValue& value);
 
     static Boolean getPropertyReferenceElement(
-       XmlParser& parser, 
-       CIMProperty& property);
+        XmlParser& parser,
+        CIMProperty& property);
 
     static Boolean getParameterElement(
-       XmlParser& parser, 
-       CIMParameter& parameter);
+        XmlParser& parser,
+        CIMParameter& parameter);
 
     static Boolean getParameterArrayElement(
-       XmlParser& parser, 
-       CIMParameter& parameter);
+        XmlParser& parser,
+        CIMParameter& parameter);
 
     static Boolean getParameterReferenceElement(
-       XmlParser& parser, 
-       CIMParameter& parameter);
+        XmlParser& parser,
+        CIMParameter& parameter);
 
     static Boolean getParameterReferenceArrayElement(
-       XmlParser& parser, 
-       CIMParameter& parameter);
+        XmlParser& parser,
+        CIMParameter& parameter);
 
     static Boolean getQualifierDeclElement(
-       XmlParser& parser, 
-       CIMQualifierDecl& qualifierDecl);
+        XmlParser& parser,
+        CIMQualifierDecl& qualifierDecl);
 
     static Boolean getMethodElement(
-       XmlParser& parser, 
-       CIMMethod& method);
+        XmlParser& parser,
+        CIMMethod& method);
 
     static Boolean getClassElement(
-       XmlParser& parser, 
-       CIMClass& cimClass);
+        XmlParser& parser,
+        CIMClass& cimClass);
 
     static Boolean getInstanceElement(
-       XmlParser& parser, 
-       CIMInstance& cimInstance);
+        XmlParser& parser,
+        CIMInstance& cimInstance);
 
     static Boolean getNamedInstanceElement(
-       XmlParser& parser, 
-       CIMInstance& namedInstance);
+        XmlParser& parser,
+        CIMInstance& namedInstance);
 
     static void getObject(XmlParser& parser, CIMClass& x);
 
@@ -358,13 +351,13 @@ public:
     static void getObject(XmlParser& parser, CIMQualifierDecl& x);
 
     static Boolean getMessageStartTag(
-       XmlParser& parser, 
-       String& id,
-       String& protocolVersion);
+        XmlParser& parser,
+        String& id,
+        String& protocolVersion);
 
     static Boolean getIMethodCallStartTag(
-       XmlParser& parser, 
-       const char*& name);
+        XmlParser& parser,
+        const char*& name);
 
     static Boolean getIMethodResponseStartTag(
         XmlParser& parser,
@@ -372,9 +365,9 @@ public:
         Boolean& isEmptyTag);
 
     static Boolean getIParamValueTag(
-       XmlParser& parser, 
-       const char*& name,
-       Boolean& isEmptyTag);
+        XmlParser& parser,
+        const char*& name,
+        Boolean& isEmptyTag);
 
     static void rejectNullIParamValue(
         XmlParser& parser,
@@ -382,46 +375,46 @@ public:
         const char* paramName);
 
     static Boolean getPropertyValue(
-       XmlParser& parser, 
-       CIMValue& cimValue);
+        XmlParser& parser,
+        CIMValue& cimValue);
 
     static Boolean getBooleanValueElement(
-       XmlParser& parser, 
-       Boolean& result,
-       Boolean required = false);
+        XmlParser& parser,
+        Boolean& result,
+        Boolean required = false);
 
     static Boolean getErrorElement(
-       XmlParser& parser, 
-       CIMException& cimException,
-       Boolean required = false);
+        XmlParser& parser,
+        CIMException& cimException,
+        Boolean required = false);
 
     static Boolean getValueObjectElement(
-       XmlParser& parser, 
-       CIMObject& object);
+        XmlParser& parser,
+        CIMObject& object);
 
     static Boolean getValueObjectWithPathElement(
-       XmlParser& parser, 
-       CIMObject& objectWithPath);
+        XmlParser& parser,
+        CIMObject& objectWithPath);
 
     static Boolean getValueObjectWithLocalPathElement(
-       XmlParser& parser, 
-       CIMObject& objectWithPath);
+        XmlParser& parser,
+        CIMObject& objectWithPath);
 
     static void getObjectArray(
-       XmlParser& parser, 
-       Array<CIMObject>& objectArray);
+        XmlParser& parser,
+        Array<CIMObject>& objectArray);
 
     static Boolean getObjectNameElement(
-       XmlParser& parser, 
-       CIMObjectPath& objectName);
+        XmlParser& parser,
+        CIMObjectPath& objectName);
 
     static Boolean getObjectPathElement(
-       XmlParser& parser, 
-       CIMObjectPath& objectPath);
+        XmlParser& parser,
+        CIMObjectPath& objectPath);
 
     static Boolean getEMethodCallStartTag(
-       XmlParser& parser, 
-       const char*& name);
+        XmlParser& parser,
+        const char*& name);
 
     static Boolean getEMethodResponseStartTag(
         XmlParser& parser,
@@ -429,12 +422,12 @@ public:
         Boolean& isEmptyTag);
 
     static Boolean getEParamValueTag(
-       XmlParser& parser, 
-       const char*& name);
+        XmlParser& parser,
+        const char*& name);
 
     static Boolean getMethodCallStartTag(
-       XmlParser& parser, 
-       const char*& name);
+        XmlParser& parser,
+        const char*& name);
 
     static Boolean getMethodResponseStartTag(
         XmlParser& parser,
@@ -442,17 +435,17 @@ public:
         Boolean& isEmptyTag);
 
     static Boolean getParamValueElement(
-       XmlParser& parser, 
-       CIMParamValue& paramValue);
+        XmlParser& parser,
+        CIMParamValue& paramValue);
 
     static Boolean getReturnValueElement(
-       XmlParser& parser, 
-       CIMValue& returnValue);
+        XmlParser& parser,
+        CIMValue& returnValue);
 
 private:
 
-    XmlReader() 
-    { 
+    XmlReader()
+    {
 
     }
 };
index 8664c2b59e87654f7343696e5d74ec9ac8ac4e6c..f2eb87df083c736670a15951575e8bf11592b692 100644 (file)
 //
 //==============================================================================
 //
-// Author: Adrian Schuur schuur@de-ibm.com
-//
-// Modified By: David Dillard, VERITAS Software Corp.
-//                  (david.dillard@veritas.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include "XmlWriter.h"
 
 PEGASUS_NAMESPACE_BEGIN
 
-void XmlStreamer::encode(Buffer& out, const CIMClass& cls) {
-   XmlWriter::appendClassElement(out, cls);
+void XmlStreamer::encode(Buffer& out, const CIMClass& cls)
+{
+    XmlWriter::appendClassElement(out, cls);
 }
 
-void XmlStreamer::encode(Buffer& out, const CIMInstance& inst) {
-   XmlWriter::appendInstanceElement(out, inst);
+void XmlStreamer::encode(Buffer& out, const CIMInstance& inst)
+{
+    XmlWriter::appendInstanceElement(out, inst);
 }
 
-void XmlStreamer::encode(Buffer& out, const CIMQualifierDecl& qual) {
-   XmlWriter::appendQualifierDeclElement(out, qual);
+void XmlStreamer::encode(Buffer& out, const CIMQualifierDecl& qual)
+{
+    XmlWriter::appendQualifierDeclElement(out, qual);
 }
 
-void XmlStreamer::decode(const Buffer& in, unsigned int pos, CIMClass& cls) {
+void XmlStreamer::decode(
+    const Buffer& in,
+    unsigned int pos,
+    CIMClass& cls)
+{
     XmlParser parser(((char*)in.getData())+pos);
     XmlReader::getObject(parser, cls);
 }
 
-void XmlStreamer::decode(const Buffer& in, unsigned int pos, CIMInstance& inst) {
-   XmlParser parser(((char*)in.getData())+pos);
-   XmlReader::getObject(parser, inst);
+void XmlStreamer::decode(
+    const Buffer& in,
+    unsigned int pos,
+    CIMInstance& inst)
+{
+    XmlParser parser(((char*)in.getData())+pos);
+    XmlReader::getObject(parser, inst);
 }
 
-void XmlStreamer::decode(const Buffer& in, unsigned int pos, CIMQualifierDecl& qual) {
-   XmlParser parser(((char*)in.getData())+pos);
-   XmlReader::getObject(parser, qual);
+void XmlStreamer::decode(
+    const Buffer& in,
+    unsigned int pos,
+    CIMQualifierDecl& qual)
+{
+    XmlParser parser(((char*)in.getData())+pos);
+    XmlReader::getObject(parser, qual);
 }
 
 PEGASUS_NAMESPACE_END
index fab80fd0a63be4b40f4486731ee14e2ed57a768c..60dba44e56c0f1c552224e790375cdc2709cfc9a 100644 (file)
 //
 //==============================================================================
 //
-// Author: Adrian Schuur (schuur@de.ibm.com) PEP 164
-//
-// Modified By: David Dillard, VERITAS Software Corp.
-//                  (david.dillard@veritas.com)
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef XmlStreamer_h
 
 PEGASUS_NAMESPACE_BEGIN
 
-class PEGASUS_COMMON_LINKAGE XmlStreamer : public ObjectStreamer {
-
+class PEGASUS_COMMON_LINKAGE XmlStreamer : public ObjectStreamer
+{
 public:
 
-   XmlStreamer() {}
-
-   ~XmlStreamer() {}
+    XmlStreamer() {}
 
-   void encode(Buffer& out, const CIMClass& cls);
-   void encode(Buffer& out, const CIMInstance& inst);
-   void encode(Buffer& out, const CIMQualifierDecl& qual);
+    ~XmlStreamer() {}
 
-   void decode(const Buffer& in, unsigned int pos, CIMClass& cls);
-   void decode(const Buffer& in, unsigned int pos, CIMInstance& inst);
-   void decode(const Buffer& in, unsigned int pos, CIMQualifierDecl& qual);
+    void encode(Buffer& out, const CIMClass& cls);
+    void encode(Buffer& out, const CIMInstance& inst);
+    void encode(Buffer& out, const CIMQualifierDecl& qual);
 
+    void decode(const Buffer& in, unsigned int pos, CIMClass& cls);
+    void decode(const Buffer& in, unsigned int pos, CIMInstance& inst);
+    void decode(const Buffer& in, unsigned int pos, CIMQualifierDecl& qual);
 };
 
 PEGASUS_NAMESPACE_END
index f12df194149f924f2e33358c59370fe60f43ea4f..255e06c568776c2a963d4627669dd02c6c52307d 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By: Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com)
-//              Nag Boranna, Hewlett-Packard Company (nagaraja_boranna@hp.com)
-//              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//              Carol Ann Krug Graves, Hewlett-Packard Company
-//                  (carolann_graves@hp.com)
-//              Amit K Arora, IBM (amita@in.ibm.com) for PEP#101
-//         Brian G. Campbell, EMC (campbell_brian@emc.com) - PEP140/phase1
-//              Willis White (whiwill@us.ibm.com) PEP 127 and 128
-//         Brian G. Campbell, EMC (campbell_brian@emc.com) - PEP140/phase2
-//              Dave Sudlik, IBM (dsudlik@us.ibm.com)
-//              David Dillard, Symantec Corp. (david_dillard@symantec.com)
-//              Vijay Eli, vijayeli@in.ibm.com, fix for #2571
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include <Pegasus/Common/Config.h>
@@ -86,13 +71,13 @@ PEGASUS_NAMESPACE_BEGIN
 // messages can be very large. This overwriting shortcut allows us to NOT have
 // to repackage a large message later.
 
-#define OUTPUT_CONTENTLENGTH                                                      \
-{                                                                                 \
-    char contentLengthP[11];                                                      \
-    int n = sprintf(contentLengthP,"%.10u", contentLength);                       \
-    out << STRLIT("content-length: ");                                    \
-    out.append(contentLengthP, n);                                        \
-    out << STRLIT("\r\n");                                                \
+#define OUTPUT_CONTENTLENGTH                                               \
+{                                                                          \
+    char contentLengthP[11];                                               \
+    int n = sprintf(contentLengthP,"%.10u", contentLength);                \
+    out << STRLIT("content-length: ");                                     \
+    out.append(contentLengthP, n);                                         \
+    out << STRLIT("\r\n");                                                 \
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -295,14 +280,12 @@ Buffer& operator<<(Buffer& out, const CIMName& name)
 }
 
 
-// l10n
 Buffer& operator<<(Buffer& out, const AcceptLanguageList& al)
 {
     XmlWriter::append(out, LanguageParser::buildAcceptLanguageHeader(al));
     return out;
 }
 
-// l10n
 Buffer& operator<<(Buffer& out, const ContentLanguageList& cl)
 {
     XmlWriter::append(out, LanguageParser::buildContentLanguageHeader(cl));
@@ -345,10 +328,11 @@ static void _xmlWritter_appendChar(Buffer& out, const Char16& c)
     Uint8 *strtgt = (Uint8 *)str;
     Uint8 *endtgt = (Uint8 *)&str[5];
 
-    UTF16toUTF8(&strsrc,
-               endsrc,
-               &strtgt,
-               endtgt);
+    UTF16toUTF8(
+        &strsrc,
+        endsrc,
+        &strtgt,
+        endtgt);
 
     out.append(str, UTF_8_COUNT_TRAIL_BYTES(str[0]) + 1);
 }
@@ -420,10 +404,11 @@ void _xmlWritter_appendSurrogatePair(Buffer& out, Uint16 high, Uint16 low)
     Uint8 *strtgt = (Uint8 *)str;
     Uint8 *endtgt = (Uint8 *)&str[5];
 
-    UTF16toUTF8(&strsrc,
-               endsrc,
-               &strtgt,
-               endtgt);
+    UTF16toUTF8(
+        &strsrc,
+        endsrc,
+        &strtgt,
+        endtgt);
 
     Uint32 number1 = UTF_8_COUNT_TRAIL_BYTES(str[0]) + 1;
     out.append(str,number1);
@@ -486,9 +471,9 @@ void XmlWriter::append(Buffer& out, Real32 x)
 void XmlWriter::append(Buffer& out, Real64 x)
 {
     char buffer[128];
-    // %.16e gives '[-]m.dddddddddddddddde+/-xx', which seems compatible with the format
-    // given in the CIM/XML spec, and the precision required by the CIM 2.2 spec
-    // (8 byte IEEE floating point)
+    // %.16e gives '[-]m.dddddddddddddddde+/-xx', which seems compatible
+    // with the format given in the CIM/XML spec, and the precision required
+    // by the CIM 2.2 spec (8 byte IEEE floating point)
     sprintf(buffer, "%.16e", x);
     append(out, buffer);
 }
@@ -508,54 +493,54 @@ void XmlWriter::append(Buffer& out, const String& str)
 
     while (n >= 8 && ((p[0]|p[1]|p[2]|p[3]|p[4]|p[5]|p[6]|p[7]) & 0xFF80) == 0)
     {
-       out.append(p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7]);
-       p += 8;
-       n -= 8;
+        out.append(p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7]);
+        p += 8;
+        n -= 8;
     }
 
     while (n >= 4 && ((p[0]|p[1]|p[2]|p[3]) & 0xFF80) == 0)
     {
-       out.append(p[0], p[1], p[2], p[3]);
-       p += 4;
-       n -= 4;
+        out.append(p[0], p[1], p[2], p[3]);
+        p += 4;
+        n -= 4;
     }
 
     while (n--)
     {
-       Uint16 c = *p++;
+        Uint16 c = *p++;
 
-       // Special processing for UTF8 case:
+        // Special processing for UTF8 case:
 
-       if (c < 128)
-       {
-           out.append(c);
-           continue;
-       }
+        if (c < 128)
+        {
+            out.append(c);
+            continue;
+        }
 
-       // Hanlde UTF8 case (if reached).
+        // Handle UTF8 case (if reached).
 
-       if(((c >= FIRST_HIGH_SURROGATE) && (c <= LAST_HIGH_SURROGATE)) ||
-          ((c >= FIRST_LOW_SURROGATE) && (c <= LAST_LOW_SURROGATE)))
-       {
-           Char16 highSurrogate = p[-1];
-           Char16 lowSurrogate = p[0];
-           p++;
-           n--;
+        if (((c >= FIRST_HIGH_SURROGATE) && (c <= LAST_HIGH_SURROGATE)) ||
+            ((c >= FIRST_LOW_SURROGATE) && (c <= LAST_LOW_SURROGATE)))
+        {
+            Char16 highSurrogate = p[-1];
+            Char16 lowSurrogate = p[0];
+            p++;
+            n--;
 
-           _xmlWritter_appendSurrogatePair(
-               out, Uint16(highSurrogate),Uint16(lowSurrogate));
-       }
-       else
-       {
-           _xmlWritter_appendChar(out, c);
-       }
+            _xmlWritter_appendSurrogatePair(
+                out, Uint16(highSurrogate),Uint16(lowSurrogate));
+        }
+        else
+        {
+            _xmlWritter_appendChar(out, c);
+        }
     }
 }
 
 void XmlWriter::append(Buffer& out, const Indentor& x)
 {
     for (Uint32 i = 0; i < 4 * x.getLevel(); i++)
-       out.append(' ');
+        out.append(' ');
 }
 
 void XmlWriter::appendSpecial(Buffer& out, const Char16& x)
@@ -571,7 +556,7 @@ void XmlWriter::appendSpecial(Buffer& out, char x)
 void XmlWriter::appendSpecial(Buffer& out, const char* str)
 {
     while (*str)
-       _appendSpecialChar7(out, *str++);
+        _appendSpecialChar7(out, *str++);
 }
 
 void XmlWriter::appendSpecial(Buffer& out, const String& str)
@@ -594,7 +579,7 @@ void XmlWriter::appendSpecial(Buffer& out, const String& str)
     {
         if (c < 128)
         {
-           if (_isSpecialChar7[c])
+            if (_isSpecialChar7[c])
             {
                 // Write the character reference for the special character
                 out.append(
@@ -616,7 +601,7 @@ void XmlWriter::appendSpecial(Buffer& out, const String& str)
         }
         else
         {
-           // Handle UTF8 case
+            // Handle UTF8 case
 
             if ((((c >= FIRST_HIGH_SURROGATE) && (c <= LAST_HIGH_SURROGATE)) ||
                  ((c >= FIRST_LOW_SURROGATE) && (c <= LAST_LOW_SURROGATE))) &&
@@ -716,13 +701,14 @@ String XmlWriter::encodeURICharacters(const String& uriString)
     {
         Uint16 c = uriString[i];
 
-        if(((c >= FIRST_HIGH_SURROGATE) && (c <= LAST_HIGH_SURROGATE)) ||
-           ((c >= FIRST_LOW_SURROGATE) && (c <= LAST_LOW_SURROGATE)))
+        if (((c >= FIRST_HIGH_SURROGATE) && (c <= LAST_HIGH_SURROGATE)) ||
+            ((c >= FIRST_LOW_SURROGATE) && (c <= LAST_LOW_SURROGATE)))
         {
             Char16 highSurrogate = uriString[i];
             Char16 lowSurrogate = uriString[++i];
 
-            _xmlWritter_appendSurrogatePair(utf8, Uint16(highSurrogate),Uint16(lowSurrogate));
+            _xmlWritter_appendSurrogatePair(
+                utf8, Uint16(highSurrogate),Uint16(lowSurrogate));
         }
         else
         {
@@ -827,14 +813,15 @@ void XmlWriter::appendInstanceNameElement(
     for (Uint32 i = 0, n = keyBindings.size(); i < n; i++)
     {
         out << STRLIT("<KEYBINDING NAME=\"");
-       out << keyBindings[i].getName() << STRLIT("\">\n");
+        out << keyBindings[i].getName() << STRLIT("\">\n");
 
         if (keyBindings[i].getType() == CIMKeyBinding::REFERENCE)
         {
             CIMObjectPath ref = keyBindings[i].getValue();
             appendValueReferenceElement(out, ref, true);
         }
-        else {
+        else
+        {
             out << STRLIT("<KEYVALUE VALUETYPE=\"");
             out << keyBindingTypeToString(keyBindings[i].getType());
             out << STRLIT("\">");
@@ -1192,9 +1179,9 @@ void XmlWriter::appendValueElement(
 
             case CIMTYPE_STRING:
             {
-               const String* data;
-               Uint32 size;
-               value._get(data, size);
+                const String* data;
+                Uint32 size;
+                value._get(data, size);
                 _xmlWritter_appendValueArray(out, data, size);
                 break;
             }
@@ -1928,26 +1915,27 @@ void XmlWriter::appendMethodCallHeader(
     OUTPUT_CONTENTLENGTH;
     if (acceptLanguages.size() > 0)
     {
-       out << STRLIT("Accept-Language: ") << acceptLanguages << STRLIT("\r\n");
+        out << STRLIT("Accept-Language: ") << acceptLanguages << STRLIT("\r\n");
     }
     if (contentLanguages.size() > 0)
     {
-       out << STRLIT("Content-Language: ") << contentLanguages << STRLIT("\r\n");
+        out << STRLIT("Content-Language: ") << contentLanguages <<
+            STRLIT("\r\n");
     }
 
 #ifdef PEGASUS_DEBUG
-               // backdoor environment variable to turn OFF client requesting transfer
-               // encoding. The default is on. to turn off, set this variable to zero.
-               // This should be removed when stable. This should only be turned off in
-               // a debugging/testing environment.
+    // backdoor environment variable to turn OFF client requesting transfer
+    // encoding. The default is on. to turn off, set this variable to zero.
+    // This should be removed when stable. This should only be turned off in
+    // a debugging/testing environment.
 
-               static const char *clientTransferEncodingOff =
-                       getenv("PEGASUS_HTTP_TRANSFER_ENCODING_REQUEST");
+    static const char *clientTransferEncodingOff =
+        getenv("PEGASUS_HTTP_TRANSFER_ENCODING_REQUEST");
 
-               if (!clientTransferEncodingOff || *clientTransferEncodingOff != '0')
+    if (!clientTransferEncodingOff || *clientTransferEncodingOff != '0')
 #endif
 
-                       out << STRLIT("TE: chunked, trailers\r\n");
+    out << STRLIT("TE: chunked, trailers\r\n");
 
     if (httpMethod == HTTP_METHOD_M_POST)
     {
@@ -1957,15 +1945,16 @@ void XmlWriter::appendMethodCallHeader(
         out << nn << STRLIT("-CIMMethod: ")
             << encodeURICharacters(cimMethod.getString()) << STRLIT("\r\n");
         out << nn << STRLIT("-CIMObject: ") << encodeURICharacters(cimObject)
-           << STRLIT("\r\n");
+            << STRLIT("\r\n");
     }
     else
     {
         out << STRLIT("CIMOperation: MethodCall\r\n");
-        out << STRLIT("CIMMethod: ") << encodeURICharacters(cimMethod.getString())
+        out << STRLIT("CIMMethod: ")
+            << encodeURICharacters(cimMethod.getString())
             << STRLIT("\r\n");
         out << STRLIT("CIMObject: ") << encodeURICharacters(cimObject)
-           << STRLIT("\r\n");
+            << STRLIT("\r\n");
     }
 
     if (authenticationHeader.size())
@@ -2000,7 +1989,8 @@ void XmlWriter::appendMethodResponseHeader(
 
      if (contentLanguages.size() > 0)
      {
-         out << STRLIT("Content-Language: ") << contentLanguages << STRLIT("\r\n");
+         out << STRLIT("Content-Language: ") << contentLanguages <<
+             STRLIT("\r\n");
      }
      if (httpMethod == HTTP_METHOD_M_POST)
      {
@@ -2117,8 +2107,8 @@ void XmlWriter::appendOKResponseHeader(
     // is usually intended to have content.  But, for Kerberos this
     // may not always be the case so we need to indicate that there
     // is no content
-               Uint32 contentLength = 0;
-               OUTPUT_CONTENTLENGTH;
+    Uint32 contentLength = 0;
+    OUTPUT_CONTENTLENGTH;
     out << content << STRLIT("\r\n");
     out << STRLIT("\r\n");
 
@@ -2343,7 +2333,7 @@ void XmlWriter::_appendErrorElement(
     {
         out << STRLIT(" DESCRIPTION=\"");
         appendSpecial(out, description);
-       out.append('"');
+        out.append('"');
     }
 
     if (cimException.getErrorCount())
@@ -2378,8 +2368,8 @@ void XmlWriter::appendReturnValueElement(
 
     CIMType type = value.getType();
     // If the property type is CIMObject, then
-    //   encode the property in CIM-XML as a string with the EMBEDDEDOBJECT attribute
-    //   (there is not currently a CIM-XML "object" datatype)
+    //   encode the property in CIM-XML as a string with the EMBEDDEDOBJECT
+    //   attribute (there is not currently a CIM-XML "object" datatype)
     // else
     //   output the real type
     if (type == CIMTYPE_OBJECT)
@@ -2397,7 +2387,7 @@ void XmlWriter::appendReturnValueElement(
     else
     {
         out << STRLIT(" PARAMTYPE=\"") << cimTypeToString (type);
-       out.append('"');
+        out.append('"');
     }
 
     out << STRLIT(">\n");
@@ -2521,13 +2511,13 @@ void XmlWriter::appendObjectNameIParameter(
     //
     if (objectName.getKeyBindings ().size () == 0)
     {
-       XmlWriter::appendClassNameIParameter(
-           out, name, objectName.getClassName());
+        XmlWriter::appendClassNameIParameter(
+            out, name, objectName.getClassName());
     }
     else
     {
-       XmlWriter::appendInstanceNameIParameter(
-           out, name, objectName);
+        XmlWriter::appendInstanceNameIParameter(
+            out, name, objectName);
     }
 }
 
@@ -2716,15 +2706,15 @@ Buffer XmlWriter::formatSimpleMethodReqMessage(
     _appendMessageElementEnd(out);
 
     appendMethodCallHeader(
-       tmp,
-       host,
-       methodName,
-       localObjectPath.toString(),
+        tmp,
+        host,
+        methodName,
+        localObjectPath.toString(),
         authenticationHeader,
         httpMethod,
         httpAcceptLanguages,
         httpContentLanguages,
-       out.size());
+        out.size());
     tmp << out;
 
     return tmp;
@@ -2737,40 +2727,39 @@ Buffer XmlWriter::formatSimpleMethodRspMessage(
     HttpMethod httpMethod,
     const ContentLanguageList& httpContentLanguages,
     const Buffer& body,
-               Uint64 serverResponseTime,
-               Boolean isFirst,
-               Boolean isLast)
+    Uint64 serverResponseTime,
+    Boolean isFirst,
+    Boolean isLast)
 {
-       Buffer out;
+    Buffer out;
 
-       if (isFirst == true)
-       {
-               // NOTE: temporarily put zero for content length. the http code
-               // will later decide to fill in the length or remove it altogether
-               appendMethodResponseHeader(out, httpMethod, httpContentLanguages, 0,
-                                                                                                                        serverResponseTime);
-               _appendMessageElementBegin(out, messageId);
-               _appendSimpleRspElementBegin(out);
-               _appendMethodResponseElementBegin(out, methodName);
-       }
+    if (isFirst == true)
+    {
+        // NOTE: temporarily put zero for content length. the http code
+        // will later decide to fill in the length or remove it altogether
+        appendMethodResponseHeader(
+            out, httpMethod, httpContentLanguages, 0, serverResponseTime);
+        _appendMessageElementBegin(out, messageId);
+        _appendSimpleRspElementBegin(out);
+        _appendMethodResponseElementBegin(out, methodName);
+    }
 
-       if (body.size() != 0)
-       {
-               out << body;
-       }
+    if (body.size() != 0)
+    {
+        out << body;
+    }
 
-       if (isLast == true)
-       {
-               _appendMethodResponseElementEnd(out);
-               _appendSimpleRspElementEnd(out);
-               _appendMessageElementEnd(out);
-       }
+    if (isLast == true)
+    {
+        _appendMethodResponseElementEnd(out);
+        _appendSimpleRspElementEnd(out);
+        _appendMessageElementEnd(out);
+    }
 
-       return out;
+    return out;
 }
 
 
-
 //------------------------------------------------------------------------------
 //
 // XmlWriter::formatSimpleMethodErrorRspMessage()
@@ -2794,11 +2783,11 @@ Buffer XmlWriter::formatSimpleMethodErrorRspMessage(
     _appendSimpleRspElementEnd(out);
     _appendMessageElementEnd(out);
 
-// l10n
-    appendMethodResponseHeader(tmp,
-       httpMethod,
-       cimException.getContentLanguages(),
-       out.size());
+    appendMethodResponseHeader(
+        tmp,
+        httpMethod,
+        cimException.getContentLanguages(),
+        out.size());
     tmp << out;
 
     return tmp;
@@ -2834,15 +2823,15 @@ Buffer XmlWriter::formatSimpleIMethodReqMessage(
     _appendMessageElementEnd(out);
 
     appendMethodCallHeader(
-       tmp,
-       host,
-       iMethodName,
-       nameSpace.getString(),
+        tmp,
+        host,
+        iMethodName,
+        nameSpace.getString(),
         authenticationHeader,
         httpMethod,
         httpAcceptLanguages,
         httpContentLanguages,
-       out.size());
+        out.size());
     tmp << out;
 
     return tmp;
@@ -2866,38 +2855,39 @@ Buffer XmlWriter::formatSimpleIMethodRspMessage(
 {
     Buffer out;
 
-               if (isFirst == true)
-               {
-                       // NOTE: temporarily put zero for content length. the http code
-                       // will later decide to fill in the length or remove it altogether
-                       appendMethodResponseHeader(out, httpMethod, httpContentLanguages, 0,
-                                                                                                                                serverResponseTime);
-                       _appendMessageElementBegin(out, messageId);
-                       _appendSimpleRspElementBegin(out);
-                       _appendIMethodResponseElementBegin(out, iMethodName);
-
-                       // output the start of the return tag. Test if there is response data by:
-                       // 1. there is data on the first chunk OR
-                       // 2. there is no data on the first chunk but isLast is false implying
-                       //    there is more non-empty data to come. If all subsequent chunks
-                       //    are empty, then this generates and empty response.
-                       if (body.size() != 0 || isLast == false)
-                               _appendIReturnValueElementBegin(out);
-               }
+    if (isFirst == true)
+    {
+        // NOTE: temporarily put zero for content length. the http code
+        // will later decide to fill in the length or remove it altogether
+        appendMethodResponseHeader(
+            out, httpMethod, httpContentLanguages, 0, serverResponseTime);
+        _appendMessageElementBegin(out, messageId);
+        _appendSimpleRspElementBegin(out);
+        _appendIMethodResponseElementBegin(out, iMethodName);
+
+        // output the start of the return tag. Test if there is response data
+        // by:
+        // 1. there is data on the first chunk OR
+        // 2. there is no data on the first chunk but isLast is false implying
+        //    there is more non-empty data to come. If all subsequent chunks
+        //    are empty, then this generates and empty response.
+        if (body.size() != 0 || isLast == false)
+            _appendIReturnValueElementBegin(out);
+    }
 
     if (body.size() != 0)
     {
-                       out << body;
+        out << body;
     }
 
-               if (isLast == true)
-               {
-                       if (body.size() != 0 || isFirst == false)
-                               _appendIReturnValueElementEnd(out);
-                       _appendIMethodResponseElementEnd(out);
-                       _appendSimpleRspElementEnd(out);
-                       _appendMessageElementEnd(out);
-               }
+    if (isLast == true)
+    {
+        if (body.size() != 0 || isFirst == false)
+            _appendIReturnValueElementEnd(out);
+        _appendIMethodResponseElementEnd(out);
+        _appendSimpleRspElementEnd(out);
+        _appendMessageElementEnd(out);
+    }
 
     return out;
 }
@@ -2926,11 +2916,10 @@ Buffer XmlWriter::formatSimpleIMethodErrorRspMessage(
     _appendSimpleRspElementEnd(out);
     _appendMessageElementEnd(out);
 
-// l10n
     appendMethodResponseHeader(tmp,
-        httpMethod,
-        cimException.getContentLanguages(),
-        out.size());
+        httpMethod,
+        cimException.getContentLanguages(),
+        out.size());
     tmp << out;
 
     return tmp;
@@ -2977,31 +2966,33 @@ void XmlWriter::appendEMethodRequestHeader(
 
     if (acceptLanguages.size() > 0)
     {
-       out << STRLIT("Accept-Language: ") << acceptLanguages << STRLIT("\r\n");
+        out << STRLIT("Accept-Language: ") << acceptLanguages << STRLIT("\r\n");
     }
     if (contentLanguages.size() > 0)
     {
-       out << STRLIT("Content-Language: ") << contentLanguages << STRLIT("\r\n");
+        out << STRLIT("Content-Language: ") << contentLanguages <<
+            STRLIT("\r\n");
     }
 
 #ifdef PEGASUS_DEBUG
-               // backdoor environment variable to turn OFF client requesting transfer
-               // encoding. The default is on. to turn off, set this variable to zero.
-               // This should be removed when stable. This should only be turned off in
-               // a debugging/testing environment.
-
-               static const char *clientTransferEncodingOff =
-                       getenv("PEGASUS_HTTP_TRANSFER_ENCODING_REQUEST");
-               if (!clientTransferEncodingOff || *clientTransferEncodingOff != '0')
+    // backdoor environment variable to turn OFF client requesting transfer
+    // encoding. The default is on. to turn off, set this variable to zero.
+    // This should be removed when stable. This should only be turned off in
+    // a debugging/testing environment.
+
+    static const char *clientTransferEncodingOff =
+        getenv("PEGASUS_HTTP_TRANSFER_ENCODING_REQUEST");
+    if (!clientTransferEncodingOff || *clientTransferEncodingOff != '0')
 #endif
-                       out << STRLIT("TE: chunked, trailers\r\n");
+    out << STRLIT("TE: chunked, trailers\r\n");
 
     if (httpMethod == HTTP_METHOD_M_POST)
     {
-       out << STRLIT("Man: http://www.dmtf.org/cim/mapping/http/v1.0; ns=");
+        out << STRLIT("Man: http://www.dmtf.org/cim/mapping/http/v1.0; ns=");
         out << nn << STRLIT("\r\n");
         out << nn << STRLIT("-CIMExport: MethodRequest\r\n");
-        out << nn << STRLIT("-CIMExportMethod: ") << cimMethod << STRLIT("\r\n");
+        out << nn << STRLIT("-CIMExportMethod: ") << cimMethod <<
+            STRLIT("\r\n");
     }
     else
     {
@@ -3039,7 +3030,8 @@ void XmlWriter::appendEMethodResponseHeader(
 
     if (contentLanguages.size() > 0)
     {
-       out << STRLIT("Content-Language: ") << contentLanguages << STRLIT("\r\n");
+        out << STRLIT("Content-Language: ") << contentLanguages <<
+            STRLIT("\r\n");
     }
     if (httpMethod == HTTP_METHOD_M_POST)
     {
@@ -3220,7 +3212,7 @@ Buffer XmlWriter::formatSimpleEMethodReqMessage(
         authenticationHeader,
         httpAcceptLanguages,
         httpContentLanguages,
-       out.size());
+        out.size());
     tmp << out;
 
     return tmp;
@@ -3251,9 +3243,9 @@ Buffer XmlWriter::formatSimpleEMethodRspMessage(
     _appendMessageElementEnd(out);
 
     appendEMethodResponseHeader(tmp,
-       httpMethod,
-       httpContentLanguages,
-       out.size());
+        httpMethod,
+        httpContentLanguages,
+        out.size());
     tmp << out;
 
     return tmp;
@@ -3282,11 +3274,11 @@ Buffer XmlWriter::formatSimpleEMethodErrorRspMessage(
     _appendSimpleExportRspElementEnd(out);
     _appendMessageElementEnd(out);
 
-// l10n
-    appendEMethodResponseHeader(tmp,
-        httpMethod,
-        cimException.getContentLanguages(),
-                out.size());
+    appendEMethodResponseHeader(
+        tmp,
+        httpMethod,
+        cimException.getContentLanguages(),
+        out.size());
     tmp << out;
 
     return tmp;
@@ -3305,14 +3297,14 @@ void _xmlWritter_printAttributes(
 {
     for (Uint32 i = 0; i < attributeCount; i++)
     {
-       os << attributes[i].name << "=";
+        os << attributes[i].name << "=";
 
-       os << '"';
-       _xmlWritter_appendSpecial(os, attributes[i].value);
-       os << '"';
+        os << '"';
+        _xmlWritter_appendSpecial(os, attributes[i].value);
+        os << '"';
 
-       if (i + 1 != attributeCount)
-           os << ' ';
+        if (i + 1 != attributeCount)
+            os << ' ';
     }
 }
 
@@ -3322,12 +3314,15 @@ void _xmlWritter_printAttributes(
 //
 //------------------------------------------------------------------------------
 
-void _xmlWritter_indent(PEGASUS_STD(ostream)& os, Uint32 level, Uint32 indentChars)
+void _xmlWritter_indent(
+    PEGASUS_STD(ostream)& os,
+    Uint32 level,
+    Uint32 indentChars)
 {
     Uint32 n = level * indentChars;
 
     for (Uint32 i = 0; i < n; i++)
-       os << ' ';
+        os << ' ';
 }
 
 //------------------------------------------------------------------------------
@@ -3349,89 +3344,90 @@ void XmlWriter::indentedPrint(
 
     while (parser.next(entry))
     {
-       switch (entry.type)
-       {
-           case XmlEntry::XML_DECLARATION:
-           {
-               _xmlWritter_indent(os, stack.size(), indentChars);
-
-               os << "<?" << entry.text << " ";
-               _xmlWritter_printAttributes(os, entry.attributes, entry.attributeCount);
-               os << "?>";
-               break;
-           }
-
-           case XmlEntry::START_TAG:
-           {
-               _xmlWritter_indent(os, stack.size(), indentChars);
-
-               os << "<" << entry.text;
-
-               if (entry.attributeCount)
-                   os << ' ';
-
-               _xmlWritter_printAttributes(os, entry.attributes, entry.attributeCount);
-               os << ">";
-               stack.push(entry.text);
-               break;
-           }
-
-           case XmlEntry::EMPTY_TAG:
-           {
-               _xmlWritter_indent(os, stack.size(), indentChars);
-
-               os << "<" << entry.text << " ";
-               _xmlWritter_printAttributes(os, entry.attributes, entry.attributeCount);
-               os << "/>";
-               break;
-           }
-
-           case XmlEntry::END_TAG:
-           {
-               if (!stack.isEmpty() && strcmp(stack.top(), entry.text) == 0)
-                   stack.pop();
-
-               _xmlWritter_indent(os, stack.size(), indentChars);
-
-               os << "</" << entry.text << ">";
-               break;
-           }
-
-           case XmlEntry::COMMENT:
-           {
-
-               _xmlWritter_indent(os, stack.size(), indentChars);
-               os << "<!--";
-               _xmlWritter_appendSpecial(os, entry.text);
-               os << "-->";
-               break;
-           }
-
-           case XmlEntry::CONTENT:
-           {
-               _xmlWritter_indent(os, stack.size(), indentChars);
-               _xmlWritter_appendSpecial(os, entry.text);
-               break;
-           }
-
-           case XmlEntry::CDATA:
-           {
-               _xmlWritter_indent(os, stack.size(), indentChars);
-               os << "<![CDATA[" << entry.text << "]]>";
-               break;
-           }
-
-           case XmlEntry::DOCTYPE:
-           {
-               _xmlWritter_indent(os, stack.size(), indentChars);
-               os << "<!DOCTYPE...>";
-               break;
-           }
-       }
-
-       os << PEGASUS_STD(endl);
-    }
+        switch (entry.type)
+        {
+            case XmlEntry::XML_DECLARATION:
+            {
+                _xmlWritter_indent(os, stack.size(), indentChars);
+
+                os << "<?" << entry.text << " ";
+                _xmlWritter_printAttributes(
+                    os, entry.attributes, entry.attributeCount);
+                os << "?>";
+                break;
+            }
+
+            case XmlEntry::START_TAG:
+            {
+                _xmlWritter_indent(os, stack.size(), indentChars);
+
+                os << "<" << entry.text;
+
+                if (entry.attributeCount)
+                    os << ' ';
+
+                _xmlWritter_printAttributes(
+                    os, entry.attributes, entry.attributeCount);
+                os << ">";
+                stack.push(entry.text);
+                break;
+            }
+
+            case XmlEntry::EMPTY_TAG:
+            {
+                _xmlWritter_indent(os, stack.size(), indentChars);
+
+                os << "<" << entry.text << " ";
+                _xmlWritter_printAttributes(
+                    os, entry.attributes, entry.attributeCount);
+                os << "/>";
+                break;
+            }
+
+            case XmlEntry::END_TAG:
+            {
+                if (!stack.isEmpty() && strcmp(stack.top(), entry.text) == 0)
+                    stack.pop();
 
+                _xmlWritter_indent(os, stack.size(), indentChars);
+
+                os << "</" << entry.text << ">";
+                break;
+            }
+
+            case XmlEntry::COMMENT:
+            {
+                _xmlWritter_indent(os, stack.size(), indentChars);
+                os << "<!--";
+                _xmlWritter_appendSpecial(os, entry.text);
+                os << "-->";
+                break;
+            }
+
+            case XmlEntry::CONTENT:
+            {
+                _xmlWritter_indent(os, stack.size(), indentChars);
+                _xmlWritter_appendSpecial(os, entry.text);
+                break;
+            }
+
+            case XmlEntry::CDATA:
+            {
+                _xmlWritter_indent(os, stack.size(), indentChars);
+                os << "<![CDATA[" << entry.text << "]]>";
+                break;
+            }
+
+            case XmlEntry::DOCTYPE:
+            {
+                _xmlWritter_indent(os, stack.size(), indentChars);
+                os << "<!DOCTYPE...>";
+                break;
+            }
+        }
+
+        os << PEGASUS_STD(endl);
+    }
 }
 
 //------------------------------------------------------------------------------
index 41f528025c1047c053d23e236928be080d7af1fb..8ecf3c712e3af82759d880f4759f46b568a31ec2 100644 (file)
 //
 //==============================================================================
 //
-// Author: Mike Brasher (mbrasher@bmc.com)
-//
-// Modified By:
-//         Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com)
-//         Nag Boranna, Hewlett-Packard Company (nagaraja_boranna@hp.com)
-//         Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
-//         Carol Ann Krug Graves, Hewlett-Packard Company
-//             (carolann_graves@hp.com)
-//         Brian G. Campbell, EMC (campbell_brian@emc.com) - PEP140/phase1
-//         Willis White (whiwill@us.ibm.com) PEP 127 and 128
-//         Brian G. Campbell, EMC (campbell_brian@emc.com) - PEP140/phase2
-//         David Dillard, Symantec Corp. (david_dillard@symantec.com)
-//              Vijay Eli, vijayeli@in.ibm.com, fix for #2571
-//
 //%/////////////////////////////////////////////////////////////////////////////
 
 #ifndef Pegasus_XmlWriter_h
@@ -371,7 +357,8 @@ public:
         const AcceptLanguageList& httpAcceptLanguages,
         const ContentLanguageList& httpContentLanguages);
 
-    //PEP 128 - sending serverResponseTime (WBEMServerResponseTime) in respons header
+    // PEP 128 - sending serverResponseTime (WBEMServerResponseTime) in
+    // response header
     static Buffer formatSimpleMethodRspMessage(
         const CIMName& methodName,
         const String& messageId,
@@ -399,7 +386,8 @@ public:
         const ContentLanguageList& httpContentLanguages,
         const Buffer& body);
 
-    //PEP 128 - sending serverResponseTime (WBEMServerResponseTime) in respons header
+    // PEP 128 - sending serverResponseTime (WBEMServerResponseTime) in
+    // response header
     static Buffer formatSimpleIMethodRspMessage(
         const CIMName& iMethodName,
         const String& messageId,