1 /**
2 * Wrap the XML key for a subscribe() invocation.
3 * <p>
4 * See QueryKeySaxFactory for a syntax description of the allowed xml structure
5 * </p>
6 * @see org.xmlBlaster.util.key.QueryKeySaxFactory
7 * @see <a href="http://www.xmlBlaster.org/xmlBlaster/doc/requirements/interface.subscribe.html" target="others">the interface.subscribe requirement</a>
8 *
9 * @author <a href="mailto:xmlBlaster@marcelruff.info">Marcel Ruff</a>
10 * @author <a href="mailto:laghi@swissinfo.org">Michele Laghi</a>
11 */
12
13 #ifndef _CLIENT_KEY_PUBLISHKEY_H
14 #define _CLIENT_KEY_PUBLISHKEY_H
15
16 #include <client/key/MsgKeyBase.h>
17
18 namespace org { namespace xmlBlaster { namespace client { namespace key {
19
20 class Dll_Export PublishKey : public MsgKeyBase
21 {
22 public:
23
24 /**
25 * Minimal constructor.
26 */
27 PublishKey(org::xmlBlaster::util::Global& global, const std::string& oid="", const std::string& mime="", const std::string& mimeExt="");
28
29 PublishKey(org::xmlBlaster::util::Global& global, const org::xmlBlaster::util::key::MsgKeyData& data);
30
31 PublishKey(const PublishKey& key);
32
33 PublishKey& operator =(const PublishKey& key);
34
35 /**
36 * Set the domain for this message, can be used for a simple grouping of
37 * messages to their master node with xmlBlaster clusters.
38 * @param The domain, any chosen std::string in your problem domain, e.g. "RUGBY" or "RADAR_TRACK"
39 * defaults to "" where the local xmlBlaster instance is the master of the message.
40 * @see <a href="http://www.xmlblaster.org/xmlBlaster/doc/requirements/cluster.html">The cluster requirement</a>
41 */
42 void setDomain(const std::string& domain);
43
44
45 void setOid(const std::string& oid);
46
47 /**
48 * Set mime type (syntax) of the message content.
49 * @return The MIME type, for example "text/xml" in <key oid='' contentMime='text/xml'><br />
50 * default is "text/plain" if not set
51 * @see <a href="ftp://ftp.std.com/customers3/src/mail/istd::map-3.3/RFC1521.TXT">RFC1521 - MIME (Multipurpose Internet Mail Extensions)</a>
52 */
53 void setContentMime(const std::string& contentMime);
54
55 /**
56 * Some further specifying information of the content.
57 * <p />
58 * For example the application version number the document in the content.<br />
59 * You may use this attribute for you own purposes.
60 * @param The MIME-extended info, for example<br />
61 * "Version 1.1" in <key oid='' contentMime='text/xml' contentMimeExtended='Version 1.1'><br />
62 * or "" (empty std::string) if not known
63 */
64 void setContentMimeExtended(const std::string& contentMimeExtended);
65
66 /**
67 * Set client specific meta informations.
68 * <p />
69 * May be used to integrate your application tags, for example:
70 * <p />
71 * <pre>
72 *<key oid='4711' contentMime='text/xml'>
73 * <AGENT id='192.168.124.20' subId='1' type='generic'>
74 * <DRIVER id='FileProof' pollingFreq='10'>
75 * </DRIVER>
76 * </AGENT>
77 *</key>
78 * </pre>
79 * @param str Your tags in ASCII XML syntax
80 */
81 void setClientTags(const std::string& tags);
82
83 };
84
85 }}}} // namespace
86
87 #endif
syntax highlighted by Code2HTML, v. 0.9.1