(file) Return to BinaryStreamer.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Repository

  1 thilo.boehm 1.1 //%LICENSE////////////////////////////////////////////////////////////////
  2                 //
  3                 // Licensed to The Open Group (TOG) under one or more contributor license
  4                 // agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
  5                 // this work for additional information regarding copyright ownership.
  6                 // Each contributor licenses this file to you under the OpenPegasus Open
  7                 // Source License; you may not use this file except in compliance with the
  8                 // License.
  9                 //
 10                 // Permission is hereby granted, free of charge, to any person obtaining a
 11                 // copy of this software and associated documentation files (the "Software"),
 12                 // to deal in the Software without restriction, including without limitation
 13                 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
 14                 // and/or sell copies of the Software, and to permit persons to whom the
 15                 // Software is furnished to do so, subject to the following conditions:
 16                 //
 17                 // The above copyright notice and this permission notice shall be included
 18                 // in all copies or substantial portions of the Software.
 19                 //
 20                 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 21                 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 22 thilo.boehm 1.1 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 23                 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 24                 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 25                 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 26                 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 27                 //
 28                 //////////////////////////////////////////////////////////////////////////
 29                 //
 30                 //%/////////////////////////////////////////////////////////////////////////////
 31                 
 32                 #ifndef BinaryStreamer_h
 33                 #define BinaryStreamer_h
 34                 
 35                 #include <Pegasus/Common/Config.h>
 36                 #include <Pegasus/Common/CIMProperty.h>
 37                 #include <Pegasus/Common/CIMQualifier.h>
 38                 #include <Pegasus/Common/CIMMethod.h>
 39                 #include <Pegasus/Common/CIMFlavor.h>
 40                 #include <Pegasus/Common/CIMScope.h>
 41                 
 42 thilo.boehm 1.2 #include <Pegasus/Repository/Linkage.h>
 43                 #include <Pegasus/Repository/ObjectStreamer.h>
 44                 
 45 thilo.boehm 1.1 #define BINREP_MARKER 0x11
 46                 
 47                 PEGASUS_NAMESPACE_BEGIN
 48                 
 49 thilo.boehm 1.2 class PEGASUS_REPOSITORY_LINKAGE BinaryStreamer : public ObjectStreamer
 50 thilo.boehm 1.1 {
 51                 public:
 52                 
 53                     BinaryStreamer() { }
 54                 
 55                     ~BinaryStreamer() { }
 56                 
 57                     PEGASUS_HIDDEN_LINKAGE
 58                     void encode(Buffer& out, const CIMClass& x);
 59                 
 60                     PEGASUS_HIDDEN_LINKAGE
 61                     void encode(Buffer& out, const CIMInstance& x);
 62                 
 63                     PEGASUS_HIDDEN_LINKAGE
 64                     void encode(Buffer& out, const CIMQualifierDecl& x);
 65                 
 66                     PEGASUS_HIDDEN_LINKAGE
 67                     void decode(const Buffer& in, unsigned int pos, CIMClass& x);
 68                 
 69                     PEGASUS_HIDDEN_LINKAGE
 70                     void decode(const Buffer& in, unsigned int pos, CIMInstance& x);
 71 thilo.boehm 1.1 
 72                     PEGASUS_HIDDEN_LINKAGE
 73                     void decode(const Buffer& in, unsigned int pos, CIMQualifierDecl& x);
 74                 
 75                 public:
 76                 
 77                     PEGASUS_HIDDEN_LINKAGE
 78                     static void _unpackQualifier(
 79                         const Buffer& in, Uint32& pos, CIMQualifier& x);
 80                 
 81                     PEGASUS_HIDDEN_LINKAGE
 82                     static void _packQualifier(Buffer& out, const CIMQualifier& x);
 83                 
 84                     PEGASUS_HIDDEN_LINKAGE
 85                     static void _unpackProperty(
 86                         const Buffer& in, Uint32& pos, CIMProperty& x);
 87                 
 88                     PEGASUS_HIDDEN_LINKAGE
 89                     static void _unpackMethod(
 90                         const Buffer& in, Uint32& pos, CIMMethod& x);
 91                 
 92 thilo.boehm 1.1 private:
 93                 
 94                     PEGASUS_HIDDEN_LINKAGE
 95                     static void _packName(Buffer& out, const CIMName& x);
 96                 
 97                     PEGASUS_HIDDEN_LINKAGE
 98                     static void _unpackName(const Buffer& in, Uint32& pos, CIMName& x);
 99                 
100                     PEGASUS_HIDDEN_LINKAGE
101                     static void _packValue(Buffer& out, const CIMValue& x);
102                 
103                     PEGASUS_HIDDEN_LINKAGE
104                     static void _unpackValue(const Buffer& in, Uint32& pos, CIMValue& x);
105                 
106                     PEGASUS_HIDDEN_LINKAGE
107                     static void _packProperty(Buffer& out, const CIMProperty& x);
108                 
109                     PEGASUS_HIDDEN_LINKAGE
110                     static void _packParameter(Buffer& out, const CIMParameter& x);
111                 
112                     PEGASUS_HIDDEN_LINKAGE
113 thilo.boehm 1.1     static void _unpackParameter(
114                         const Buffer& in, Uint32& pos, CIMParameter& x);
115                 
116                     PEGASUS_HIDDEN_LINKAGE
117                     static void _packParameters(Buffer& out, CIMMethodRep* rep);
118                 
119                     PEGASUS_HIDDEN_LINKAGE
120                     static void _unpackParameters(
121                         const Buffer& in, Uint32& pos, CIMMethod& x);
122                 
123                     PEGASUS_HIDDEN_LINKAGE
124                     static void _packMethod(Buffer& out, const CIMMethod& x);
125                 
126                     PEGASUS_HIDDEN_LINKAGE
127                     static void _packObjectPath(Buffer& out, const CIMObjectPath& x);
128                 
129                     PEGASUS_HIDDEN_LINKAGE
130                     static void _unpackObjectPath(
131                         const Buffer& in, Uint32& pos, CIMObjectPath& x);
132                 
133                     PEGASUS_HIDDEN_LINKAGE
134 thilo.boehm 1.1     static void _packProperties(Buffer& out, CIMObjectRep* rep);
135                 
136                     PEGASUS_HIDDEN_LINKAGE
137                     static void _packMethods(Buffer& out, CIMClassRep* rep);
138                 
139                     PEGASUS_HIDDEN_LINKAGE
140                     static void _packScope(Buffer& out, const CIMScope& x);
141                 
142                     PEGASUS_HIDDEN_LINKAGE
143                     static void _unpackScope(
144                         const Buffer& in, Uint32& pos, CIMScope& x);
145                 
146                     PEGASUS_HIDDEN_LINKAGE
147                     static void _packFlavor(Buffer& out, const CIMFlavor& x);
148                 
149                     PEGASUS_HIDDEN_LINKAGE
150                     static void _unpackFlavor(
151                         const Buffer& in, Uint32& pos, CIMFlavor& x);
152                 
153                     PEGASUS_HIDDEN_LINKAGE
154                     static void _packType(Buffer& out, const CIMType& x);
155 thilo.boehm 1.1 
156                     PEGASUS_HIDDEN_LINKAGE
157                     static void _unpackType(
158                         const Buffer& in, Uint32& pos, CIMType& x);
159                 };
160                 
161 thilo.boehm 1.2 class PEGASUS_REPOSITORY_LINKAGE BinException : public Exception
162 thilo.boehm 1.1 {
163                 public:
164                     BinException(const String& message) : Exception(message) { }
165                 };
166                 
167                 PEGASUS_NAMESPACE_END
168                 
169                 #endif

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2