1 karl 1.9 //%2006////////////////////////////////////////////////////////////////////////
|
2 schuur 1.1 //
|
3 karl 1.4 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
4 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
5 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
|
6 schuur 1.1 // IBM Corp.; EMC Corporation, The Open Group.
|
7 karl 1.4 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
8 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
|
9 karl 1.6 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 // EMC Corporation; VERITAS Software Corporation; The Open Group.
|
11 karl 1.9 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
12 // EMC Corporation; Symantec Corporation; The Open Group.
|
13 schuur 1.1 //
14 // Permission is hereby granted, free of charge, to any person obtaining a copy
15 // of this software and associated documentation files (the "Software"), to
16 // deal in the Software without restriction, including without limitation the
17 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
18 // sell copies of the Software, and to permit persons to whom the Software is
19 // furnished to do so, subject to the following conditions:
|
20 karl 1.4 //
|
21 schuur 1.1 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
22 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
23 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
24 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
25 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
26 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
27 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 //
30 //==============================================================================
31 //
32 // Author: Adrian Schuur (schuur@de.ibm.com) - PEP 164
33 //
|
34 jim.wunderlich 1.7 // Modified By:
35 // David Dillard, VERITAS Software Corp. (david.dillard@veritas.com)
36 // Mike Brasher (mike-brasher@austin.rr.com)
|
37 schuur 1.1 //
38 //%/////////////////////////////////////////////////////////////////////////////
39
40 #ifndef BinaryStreamer_h
41 #define BinaryStreamer_h
42
|
43 jim.wunderlich 1.7 #include <Pegasus/Common/ObjectStreamer.h>
44 #include <Pegasus/Common/CIMProperty.h>
45 #include <Pegasus/Common/CIMQualifier.h>
46 #include <Pegasus/Common/CIMMethod.h>
47 #include <Pegasus/Common/CIMFlavor.h>
48 #include <Pegasus/Common/CIMScope.h>
49
50 #define BINREP_MARKER 0x11
|
51 schuur 1.1
52 PEGASUS_NAMESPACE_BEGIN
53
|
54 jim.wunderlich 1.7 class PEGASUS_COMMON_LINKAGE BinaryStreamer : public ObjectStreamer
55 {
56 public:
57
58 BinaryStreamer() { }
59
60 ~BinaryStreamer() { }
61
|
62 mike 1.8 void encode(Buffer& out, const CIMClass& x);
|
63 jim.wunderlich 1.7
|
64 mike 1.8 void encode(Buffer& out, const CIMInstance& x);
|
65 jim.wunderlich 1.7
|
66 mike 1.8 void encode(Buffer& out, const CIMQualifierDecl& x);
|
67 jim.wunderlich 1.7
|
68 mike 1.8 void decode(const Buffer& in, unsigned int pos, CIMClass& x);
|
69 jim.wunderlich 1.7
|
70 mike 1.8 void decode(const Buffer& in, unsigned int pos, CIMInstance& x);
|
71 jim.wunderlich 1.7
|
72 mike 1.8 void decode(const Buffer& in, unsigned int pos, CIMQualifierDecl& x);
|
73 schuur 1.1
74 public:
75
|
76 jim.wunderlich 1.7 static void _unpackQualifier(
|
77 mike 1.8 const Buffer& in, Uint32& pos, CIMQualifier& x);
|
78 schuur 1.1
|
79 mike 1.8 static void _packQualifier(Buffer& out, const CIMQualifier& x);
|
80 schuur 1.1
|
81 jim.wunderlich 1.7 static void _unpackProperty(
|
82 mike 1.8 const Buffer& in, Uint32& pos, CIMProperty& x);
|
83 david.dillard 1.5
|
84 jim.wunderlich 1.7 static void _unpackMethod(
|
85 mike 1.8 const Buffer& in, Uint32& pos, CIMMethod& x);
|
86 schuur 1.1
87 private:
88
|
89 mike 1.8 static void _packName(Buffer& out, const CIMName& x);
|
90 jim.wunderlich 1.7
|
91 mike 1.8 static void _unpackName(const Buffer& in, Uint32& pos, CIMName& x);
|
92 jim.wunderlich 1.7
93
|
94 mike 1.8 static void _packValue(Buffer& out, const CIMValue& x);
|
95 schuur 1.1
|
96 mike 1.8 static void _unpackValue(const Buffer& in, Uint32& pos, CIMValue& x);
|
97 jim.wunderlich 1.7
|
98 mike 1.8 static void _packProperty(Buffer& out, const CIMProperty& x);
|
99 jim.wunderlich 1.7
|
100 mike 1.8 static void _packParameter(Buffer& out, const CIMParameter& x);
|
101 jim.wunderlich 1.7
102 static void _unpackParameter(
|
103 mike 1.8 const Buffer& in, Uint32& pos, CIMParameter& x);
|
104 jim.wunderlich 1.7
|
105 mike 1.8 static void _packParameters(Buffer& out, CIMMethodRep* rep);
|
106 jim.wunderlich 1.7
107 static void _unpackParameters(
|
108 mike 1.8 const Buffer& in, Uint32& pos, CIMMethod& x);
|
109 jim.wunderlich 1.7
|
110 mike 1.8 static void _packMethod(Buffer& out, const CIMMethod& x);
|
111 jim.wunderlich 1.7
|
112 mike 1.8 static void _packObjectPath(Buffer& out, const CIMObjectPath& x);
|
113 jim.wunderlich 1.7
114 static void _unpackObjectPath(
|
115 mike 1.8 const Buffer& in, Uint32& pos, CIMObjectPath& x);
|
116 jim.wunderlich 1.7
|
117 mike 1.8 static void _packProperties(Buffer& out, CIMObjectRep* rep);
|
118 schuur 1.1
|
119 mike 1.8 static void _packMethods(Buffer& out, CIMClassRep* rep);
|
120 schuur 1.1
|
121 mike 1.8 static void _packScope(Buffer& out, const CIMScope& x);
|
122 schuur 1.1
|
123 jim.wunderlich 1.7 static void _unpackScope(
|
124 mike 1.8 const Buffer& in, Uint32& pos, CIMScope& x);
|
125 schuur 1.1
|
126 mike 1.8 static void _packFlavor(Buffer& out, const CIMFlavor& x);
|
127 schuur 1.1
|
128 jim.wunderlich 1.7 static void _unpackFlavor(
|
129 mike 1.8 const Buffer& in, Uint32& pos, CIMFlavor& x);
|
130 schuur 1.1
|
131 mike 1.8 static void _packType(Buffer& out, const CIMType& x);
|
132 schuur 1.1
|
133 jim.wunderlich 1.7 static void _unpackType(
|
134 mike 1.8 const Buffer& in, Uint32& pos, CIMType& x);
|
135 schuur 1.1 };
136
|
137 jim.wunderlich 1.7 class BinException : public Exception
138 {
139 public:
140 BinException(const String& message) : Exception(message) { }
|
141 schuur 1.1 };
142
143 PEGASUS_NAMESPACE_END
144
145 #endif
|