"Fossies" - the Fresh Open Source Software Archive

Member "netxms-3.8.166/src/server/include/zeromq.h" (23 Feb 2021, 1271 Bytes) of package /linux/misc/netxms-3.8.166.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "zeromq.h" see the Fossies "Dox" file reference documentation.

    1 #ifndef __zeromq__h__
    2 #define __zeromq__h__
    3 
    4 #include <zmq.h>
    5 
    6 #define ZMQ_DCI_ID_INVALID (-1)
    7 #define ZMQ_DCI_ID_ANY (0)
    8 
    9 namespace zmq {
   10    enum SubscriptionType {
   11       EVENT,
   12       DATA
   13    };
   14 
   15    class Subscription
   16    {
   17       private:
   18          UINT32 objectId;
   19          bool ignoreItems;
   20          IntegerArray<UINT32> *items;
   21 
   22       public:
   23          Subscription(UINT32 objectId, UINT32 dciId = ZMQ_DCI_ID_INVALID);
   24          ~Subscription();
   25          UINT32 getObjectId() { return objectId; }
   26          IntegerArray<UINT32> *getItems() { return items; }
   27          bool isIgnoreItems() { return ignoreItems; }
   28          void addItem(UINT32 dciId);
   29          bool removeItem(UINT32 dciId);
   30          bool match(UINT32 dciId);
   31    };
   32 }
   33 
   34 void StartZMQConnector();
   35 void StopZMQConnector();
   36 void ZmqPublishEvent(const Event *event);
   37 void ZmqPublishData(UINT32 objectId, UINT32 dciId, const TCHAR *dciName, const TCHAR *value);
   38 bool ZmqSubscribeEvent(UINT32 objectId, UINT32 eventCode, UINT32 dciId);
   39 bool ZmqUnsubscribeEvent(UINT32 objectId, UINT32 eventCode, UINT32 dciId);
   40 bool ZmqSubscribeData(UINT32 objectId, UINT32 dciId = 0);
   41 bool ZmqUnsubscribeData(UINT32 objectId, UINT32 dciId = 0);
   42 void ZmqFillSubscriptionListMessage(NXCPMessage *msg, zmq::SubscriptionType);
   43 
   44 #endif