110 lines
2.9 KiB
C++
110 lines
2.9 KiB
C++
//----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (C) 2007 Intel Corporation
|
|
//
|
|
// File: EndpointReference.h
|
|
//
|
|
// Contents: C++ representation of an EndpointReference type
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
#ifndef __ENDPOINT_REF_H
|
|
#define __ENDPOINT_REF_H
|
|
|
|
#include <map>
|
|
#include "Serializable.h"
|
|
#include "Deserializable.h"
|
|
|
|
using namespace std;
|
|
|
|
namespace CimClassNamespace
|
|
{
|
|
#define NameValuePairs map<string, string>
|
|
|
|
class DateTime: public Serializable, public DeSerializable
|
|
{
|
|
|
|
private:
|
|
void ClearValues();
|
|
void SetValue(const XMLElement& elem);
|
|
public:
|
|
|
|
static const string DATETIME_ELEMENT_NAME;
|
|
static const string DATETIME_NAMESPACE;
|
|
static const string DATETIME_PREFIX;
|
|
|
|
string dateTime;
|
|
void SerializeMembers(XMLElement& node) const;
|
|
DateTime & operator=(const string & dateTime);
|
|
operator const string();
|
|
DateTime(const string& name = DATETIME_ELEMENT_NAME,
|
|
const string& ns = DATETIME_NAMESPACE,
|
|
const string& pref = DATETIME_PREFIX);
|
|
|
|
string ManipulateOutputXML(const string outputXML, const string mofClassName, const string elementName);
|
|
};
|
|
|
|
class SelectorSet : public Serializable, public DeSerializable
|
|
{
|
|
private:
|
|
NameValuePairs Selectors;
|
|
void SetValue(const XMLElement& elem);
|
|
void ClearValues();
|
|
public:
|
|
SelectorSet();
|
|
virtual ~SelectorSet();
|
|
NameValuePairs GetSelectors() const;
|
|
void SetSelectors(const NameValuePairs& sel);
|
|
void SerializeMembers(XMLElement& elem) const;
|
|
};
|
|
|
|
class ReferenceParameters : public Serializable, public DeSerializable
|
|
{
|
|
private:
|
|
string uri;
|
|
SelectorSet Selectors;
|
|
void SetValue(const XMLElement& elem);
|
|
void ClearValues();
|
|
public:
|
|
ReferenceParameters();
|
|
virtual ~ReferenceParameters();
|
|
void SerializeMembers(XMLElement& elem) const;
|
|
NameValuePairs GetSelectors() const;
|
|
void SetSelectors(const NameValuePairs &sel);
|
|
void SetUri(const string& uri);
|
|
string GetUri() const;
|
|
};
|
|
|
|
class EndpointReference : public Serializable, public DeSerializable
|
|
{
|
|
private:
|
|
string eprName;
|
|
string add;
|
|
ReferenceParameters ref;
|
|
void SetValue(const XMLElement& elem);
|
|
void ClearValues();
|
|
public:
|
|
EndpointReference(const string& name = "EndpointReference",
|
|
const string& ns = "http://schemas.xmlsoap.org/ws/2004/08/addressing",
|
|
const string& pref = "wsa");
|
|
virtual ~EndpointReference();
|
|
string GetEPRName() const;
|
|
void SetName(const string &name);
|
|
void SetAddress(const string &add);
|
|
string GetAddress() const;
|
|
void SerializeMembers(XMLElement& elem) const;
|
|
NameValuePairs GetSelectors() const;
|
|
string GetResourceURI() const;
|
|
void SetResourceUri(const string& uri);
|
|
void SetSelectors(const NameValuePairs &sel);
|
|
bool CompareResourceURI(const string &uri) const;
|
|
};
|
|
|
|
class ResourceCreated : public EndpointReference
|
|
{
|
|
public:
|
|
ResourceCreated();
|
|
virtual ~ResourceCreated();
|
|
};
|
|
} //CimClassNamespace
|
|
#endif
|