pvAccessCPP  7.1.2
requester.h
1 /* requester.h */
2 /*
3  * Copyright information and license terms for this software can be
4  * found in the file LICENSE that is included with the distribution
5  */
6 /**
7  * @author mrk
8  */
9 #ifndef REQUESTER_H
10 #define REQUESTER_H
11 #include <string>
12 
13 #ifdef epicsExportSharedSymbols
14 # define requesterEpicsExportSharedSymbols
15 # undef epicsExportSharedSymbols
16 #endif
17 
18 #include <pv/pvType.h>
19 #include <pv/sharedPtr.h>
20 
21 #ifdef requesterEpicsExportSharedSymbols
22 # define epicsExportSharedSymbols
23 # undef requesterEpicsExportSharedSymbols
24 #endif
25 
26 
27 #include <shareLib.h>
28 
29 namespace epics { namespace pvAccess {
30 
31 class Requester;
32 typedef std::tr1::shared_ptr<Requester> RequesterPtr;
33 
34 enum MessageType {
35  infoMessage,warningMessage,errorMessage,fatalErrorMessage
36 };
37 #define MESSAGE_TYPE_COUNT 4
38 
39 epicsShareExtern std::string getMessageTypeName(MessageType messageType);
40 
41 /** @brief Callback class for passing messages to a requester.
42  */
43 class epicsShareClass Requester {
44 public:
45  POINTER_DEFINITIONS(Requester);
46  virtual ~Requester(){}
47  /**
48  * The requester must have a name.
49  * @return The requester's name.
50  */
51  virtual std::string getRequesterName() = 0;
52  /** Push notification
53  */
54  virtual void message(std::string const & message,MessageType messageType = errorMessage);
55 };
56 
57 }}
58 namespace epics { namespace pvData {
59 using ::epics::pvAccess::Requester;
60 using ::epics::pvAccess::RequesterPtr;
61 using ::epics::pvAccess::MessageType;
62 using ::epics::pvAccess::getMessageTypeName;
63 using ::epics::pvAccess::infoMessage;
64 using ::epics::pvAccess::warningMessage;
65 using ::epics::pvAccess::errorMessage;
66 using ::epics::pvAccess::fatalErrorMessage;
67 }}
68 #endif /* REQUESTER_H */
Copyright - See the COPYRIGHT that is included with this distribution.
Callback class for passing messages to a requester.
Definition: requester.h:43
void epicsShareFunc deserializeFromBuffer(Serializable *S, ByteBuffer &in)