1 /*------------------------------------------------------------------------------
 2 Name:      PublishKey.cpp
 3 Project:   xmlBlaster.org
 4 Copyright: xmlBlaster.org, see xmlBlaster-LICENSE file
 5 ------------------------------------------------------------------------------*/
 6 
 7 #include <client/key/PublishKey.h>
 8 #include <util/Global.h>
 9 
10 using namespace std;
11 using namespace org::xmlBlaster::util;
12 using namespace org::xmlBlaster::util::key;
13 
14 namespace org { namespace xmlBlaster { namespace client { namespace key {
15 
16 PublishKey::PublishKey(Global& global, const string& oid, const string& mime, const string& mimeExt) 
17    : MsgKeyBase(global)
18 {
19    if (!oid.empty()) setOid(oid);
20    if (!mime.empty()) setContentMime(mime);
21    if (!mimeExt.empty()) setContentMimeExtended(mimeExt);
22 }
23 
24 PublishKey::PublishKey(Global& global, const MsgKeyData& data) 
25    : MsgKeyBase(global, data)
26 {
27 }
28 
29 PublishKey::PublishKey(const PublishKey& key)
30    : MsgKeyBase(key)
31 {
32 }
33 
34 PublishKey& PublishKey::operator =(const PublishKey& key)
35 {
36    msgKeyData_ = key.msgKeyData_;
37    return *this;
38 }
39 
40 void PublishKey::setDomain(const string& domain)
41 {
42    msgKeyData_.setDomain(domain);
43 }
44 
45 void PublishKey::setOid(const string& oid)
46 {
47    msgKeyData_.setOid(oid);
48 }
49 
50 void PublishKey::setContentMime(const string& contentMime)
51 {
52    msgKeyData_.setContentMime(contentMime);
53 }
54 
55 void PublishKey::setContentMimeExtended(const string& contentMimeExtended)
56 {
57    msgKeyData_.setContentMimeExtended(contentMimeExtended);
58 }
59 
60 void PublishKey::setClientTags(const string& tags)
61 {
62    msgKeyData_.setClientTags(tags);
63 }
64 
65 }}}} // namespace


syntax highlighted by Code2HTML, v. 0.9.1