1 martin 1.12 //%LICENSE////////////////////////////////////////////////////////////////
|
2 martin 1.13 //
|
3 martin 1.12 // 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 martin 1.13 //
|
10 martin 1.12 // 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 martin 1.13 //
|
17 martin 1.12 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
|
19 martin 1.13 //
|
20 martin 1.12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
21 martin 1.13 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
22 martin 1.12 // 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 martin 1.13 //
|
28 martin 1.12 //////////////////////////////////////////////////////////////////////////
|
29 schuur 1.1 //
30 //%/////////////////////////////////////////////////////////////////////////////
31
32 #ifndef BinaryStreamer_h
33 #define BinaryStreamer_h
34
|
35 mike 1.10 #include <Pegasus/Common/Config.h>
|
36 jim.wunderlich 1.7 #include <Pegasus/Common/ObjectStreamer.h>
37 #include <Pegasus/Common/CIMProperty.h>
38 #include <Pegasus/Common/CIMQualifier.h>
39 #include <Pegasus/Common/CIMMethod.h>
40 #include <Pegasus/Common/CIMFlavor.h>
41 #include <Pegasus/Common/CIMScope.h>
42
43 #define BINREP_MARKER 0x11
|
44 schuur 1.1
45 PEGASUS_NAMESPACE_BEGIN
46
|
47 kumpf 1.11 class PEGASUS_COMMON_LINKAGE BinaryStreamer : public ObjectStreamer
|
48 jim.wunderlich 1.7 {
49 public:
50
51 BinaryStreamer() { }
52
53 ~BinaryStreamer() { }
54
|
55 mike 1.10 PEGASUS_HIDDEN_LINKAGE
|
56 mike 1.8 void encode(Buffer& out, const CIMClass& x);
|
57 jim.wunderlich 1.7
|
58 mike 1.10 PEGASUS_HIDDEN_LINKAGE
|
59 mike 1.8 void encode(Buffer& out, const CIMInstance& x);
|
60 jim.wunderlich 1.7
|
61 mike 1.10 PEGASUS_HIDDEN_LINKAGE
|
62 mike 1.8 void encode(Buffer& out, const CIMQualifierDecl& x);
|
63 jim.wunderlich 1.7
|
64 mike 1.10 PEGASUS_HIDDEN_LINKAGE
|
65 mike 1.8 void decode(const Buffer& in, unsigned int pos, CIMClass& x);
|
66 jim.wunderlich 1.7
|
67 mike 1.10 PEGASUS_HIDDEN_LINKAGE
|
68 mike 1.8 void decode(const Buffer& in, unsigned int pos, CIMInstance& x);
|
69 jim.wunderlich 1.7
|
70 mike 1.10 PEGASUS_HIDDEN_LINKAGE
|
71 mike 1.8 void decode(const Buffer& in, unsigned int pos, CIMQualifierDecl& x);
|
72 schuur 1.1
73 public:
74
|
75 mike 1.10 PEGASUS_HIDDEN_LINKAGE
|
76 jim.wunderlich 1.7 static void _unpackQualifier(
|
77 kumpf 1.11 const Buffer& in, Uint32& pos, CIMQualifier& x);
|
78 schuur 1.1
|
79 mike 1.10 PEGASUS_HIDDEN_LINKAGE
|
80 mike 1.8 static void _packQualifier(Buffer& out, const CIMQualifier& x);
|
81 schuur 1.1
|
82 mike 1.10 PEGASUS_HIDDEN_LINKAGE
|
83 jim.wunderlich 1.7 static void _unpackProperty(
|
84 kumpf 1.11 const Buffer& in, Uint32& pos, CIMProperty& x);
|
85 david.dillard 1.5
|
86 mike 1.10 PEGASUS_HIDDEN_LINKAGE
|
87 jim.wunderlich 1.7 static void _unpackMethod(
|
88 kumpf 1.11 const Buffer& in, Uint32& pos, CIMMethod& x);
|
89 schuur 1.1
90 private:
91
|
92 mike 1.10 PEGASUS_HIDDEN_LINKAGE
|
93 mike 1.8 static void _packName(Buffer& out, const CIMName& x);
|
94 jim.wunderlich 1.7
|
95 mike 1.10 PEGASUS_HIDDEN_LINKAGE
|
96 mike 1.8 static void _unpackName(const Buffer& in, Uint32& pos, CIMName& x);
|
97 jim.wunderlich 1.7
|
98 mike 1.10 PEGASUS_HIDDEN_LINKAGE
|
99 mike 1.8 static void _packValue(Buffer& out, const CIMValue& x);
|
100 schuur 1.1
|
101 mike 1.10 PEGASUS_HIDDEN_LINKAGE
|
102 mike 1.8 static void _unpackValue(const Buffer& in, Uint32& pos, CIMValue& x);
|
103 jim.wunderlich 1.7
|
104 mike 1.10 PEGASUS_HIDDEN_LINKAGE
|
105 mike 1.8 static void _packProperty(Buffer& out, const CIMProperty& x);
|
106 jim.wunderlich 1.7
|
107 mike 1.10 PEGASUS_HIDDEN_LINKAGE
|
108 mike 1.8 static void _packParameter(Buffer& out, const CIMParameter& x);
|
109 jim.wunderlich 1.7
|
110 mike 1.10 PEGASUS_HIDDEN_LINKAGE
|
111 jim.wunderlich 1.7 static void _unpackParameter(
|
112 kumpf 1.11 const Buffer& in, Uint32& pos, CIMParameter& x);
|
113 jim.wunderlich 1.7
|
114 mike 1.10 PEGASUS_HIDDEN_LINKAGE
|
115 mike 1.8 static void _packParameters(Buffer& out, CIMMethodRep* rep);
|
116 jim.wunderlich 1.7
|
117 mike 1.10 PEGASUS_HIDDEN_LINKAGE
|
118 jim.wunderlich 1.7 static void _unpackParameters(
|
119 kumpf 1.11 const Buffer& in, Uint32& pos, CIMMethod& x);
|
120 jim.wunderlich 1.7
|
121 mike 1.10 PEGASUS_HIDDEN_LINKAGE
|
122 mike 1.8 static void _packMethod(Buffer& out, const CIMMethod& x);
|
123 jim.wunderlich 1.7
|
124 mike 1.10 PEGASUS_HIDDEN_LINKAGE
|
125 mike 1.8 static void _packObjectPath(Buffer& out, const CIMObjectPath& x);
|
126 jim.wunderlich 1.7
|
127 mike 1.10 PEGASUS_HIDDEN_LINKAGE
|
128 jim.wunderlich 1.7 static void _unpackObjectPath(
|
129 kumpf 1.11 const Buffer& in, Uint32& pos, CIMObjectPath& x);
|
130 jim.wunderlich 1.7
|
131 mike 1.10 PEGASUS_HIDDEN_LINKAGE
|
132 mike 1.8 static void _packProperties(Buffer& out, CIMObjectRep* rep);
|
133 schuur 1.1
|
134 mike 1.10 PEGASUS_HIDDEN_LINKAGE
|
135 mike 1.8 static void _packMethods(Buffer& out, CIMClassRep* rep);
|
136 schuur 1.1
|
137 mike 1.10 PEGASUS_HIDDEN_LINKAGE
|
138 mike 1.8 static void _packScope(Buffer& out, const CIMScope& x);
|
139 schuur 1.1
|
140 mike 1.10 PEGASUS_HIDDEN_LINKAGE
|
141 jim.wunderlich 1.7 static void _unpackScope(
|
142 kumpf 1.11 const Buffer& in, Uint32& pos, CIMScope& x);
|
143 schuur 1.1
|
144 mike 1.10 PEGASUS_HIDDEN_LINKAGE
|
145 mike 1.8 static void _packFlavor(Buffer& out, const CIMFlavor& x);
|
146 schuur 1.1
|
147 mike 1.10 PEGASUS_HIDDEN_LINKAGE
|
148 jim.wunderlich 1.7 static void _unpackFlavor(
|
149 kumpf 1.11 const Buffer& in, Uint32& pos, CIMFlavor& x);
|
150 schuur 1.1
|
151 mike 1.10 PEGASUS_HIDDEN_LINKAGE
|
152 mike 1.8 static void _packType(Buffer& out, const CIMType& x);
|
153 schuur 1.1
|
154 mike 1.10 PEGASUS_HIDDEN_LINKAGE
|
155 jim.wunderlich 1.7 static void _unpackType(
|
156 kumpf 1.11 const Buffer& in, Uint32& pos, CIMType& x);
|
157 schuur 1.1 };
158
|
159 mike 1.10 class PEGASUS_COMMON_LINKAGE BinException : public Exception
|
160 jim.wunderlich 1.7 {
161 public:
162 BinException(const String& message) : Exception(message) { }
|
163 schuur 1.1 };
164
165 PEGASUS_NAMESPACE_END
166
167 #endif
|