SubscriberRecord.ice
Go to the documentation of this file.
1// **********************************************************************
2//
3// Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved.
4//
5// This copy of Ice is licensed to you under the terms described in the
6// ICE_LICENSE file included in this distribution.
7//
8// **********************************************************************
9
10#pragma once
11
12[[ "ice-prefix", "cpp:header-ext:h" ]]
13
14#include <Ice/Identity.ice>
15#include <IceStorm/IceStorm.ice>
16
17 module IceStorm
18{
19
20 /**
21 *
22 * The key for persistent subscribers, or topics.
23 *
24 * If the subscriber identity is empty then the record is used as a
25 * place holder for the creation of a topic, otherwise the record
26 * holds a subscription record.
27 *
28 **/
29 struct SubscriberRecordKey
30 {
31 // The topic identity.
32 Ice::Identity topic;
33
34 // The identity of the subscriber. If this is empty then the key
35 // is a placeholder for a topic.
36 Ice::Identity id;
37 }
38
39 /**
40 *
41 * Used to store persistent information for persistent subscribers.
42 *
43 **/
44 struct SubscriberRecord
45
46 {
47 string topicName; // The name of the topic.
48
49 Ice::Identity id; // The subscriber identity.
50
51 // Is this a link record, or a subscriber record?
52 bool link;
53
54 Object* obj; // The subscriber object.
55
56 // We could simulate a union here with a class object.
57
58 // Persistent subscriber data.
59 QoS theQoS; // The QoS.
60
61 // Link subscriber data.
62 int cost; // The cost.
63 Topic* theTopic; // The linked topic.
64 }
65
66 sequence<SubscriberRecord>
68
69} // End module IceStorm
::std::vector<::IceStorm::SubscriberRecord > SubscriberRecordSeq
Used to store persistent information for persistent subscribers.
::IceStorm::TopicPrx theTopic