annotate Resources/Archives/MessageWithDestination.cpp @ 604:489f6a375277

parameter for better security
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 18 Oct 2013 10:32:55 +0200
parents e5402c368b21
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
139
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 #include "../Core/IDynamicObject.h"
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2
140
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
3 #include "../Core/OrthancException.h"
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
4
141
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 140
diff changeset
5 #include <stdint.h>
140
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
6 #include <memory>
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
7 #include <map>
139
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 #include <gtest/gtest.h>
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 #include <string>
140
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
10 #include <boost/thread.hpp>
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
11 #include <boost/date_time/posix_time/posix_time_types.hpp>
139
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 namespace Orthanc
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 {
140
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
15 class SharedMessageQueue
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
16 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
17 private:
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
18 typedef std::list<IDynamicObject*> Queue;
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
19
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
20 unsigned int maxSize_;
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
21 Queue queue_;
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
22 boost::mutex mutex_;
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
23 boost::condition_variable elementAvailable_;
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
24
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
25 public:
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
26 SharedMessageQueue(unsigned int maxSize = 0)
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
27 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
28 maxSize_ = maxSize;
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
29 }
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
30
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
31 ~SharedMessageQueue()
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
32 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
33 for (Queue::iterator it = queue_.begin(); it != queue_.end(); it++)
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
34 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
35 delete *it;
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
36 }
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
37 }
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
38
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
39 void Enqueue(IDynamicObject* message)
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
40 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
41 boost::mutex::scoped_lock lock(mutex_);
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
42
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
43 if (maxSize_ != 0 && queue_.size() > maxSize_)
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
44 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
45 // Too many elements in the queue: First remove the oldest
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
46 delete queue_.front();
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
47 queue_.pop_front();
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
48 }
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
49
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
50 queue_.push_back(message);
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
51 elementAvailable_.notify_one();
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
52 }
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
53
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
54 IDynamicObject* Dequeue(int32_t timeout)
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
55 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
56 boost::mutex::scoped_lock lock(mutex_);
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
57
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
58 // Wait for a message to arrive in the FIFO queue
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
59 while (queue_.empty())
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
60 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
61 if (timeout == 0)
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
62 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
63 elementAvailable_.wait(lock);
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
64 }
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
65 else
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
66 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
67 bool success = elementAvailable_.timed_wait
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
68 (lock, boost::posix_time::milliseconds(timeout));
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
69 if (!success)
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
70 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
71 throw OrthancException(ErrorCode_Timeout);
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
72 }
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
73 }
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
74 }
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
75
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
76 std::auto_ptr<IDynamicObject> message(queue_.front());
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
77 queue_.pop_front();
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
78
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
79 return message.release();
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
80 }
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
81
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
82 IDynamicObject* Dequeue()
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
83 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
84 return Dequeue(0);
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
85 }
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
86 };
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
87
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
88
139
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 /**
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 * This class represents a message that is to be sent to some destination.
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 **/
140
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
92 class MessageToDispatch : public boost::noncopyable
139
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93 {
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 private:
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 IDynamicObject* message_;
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 std::string destination_;
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98 public:
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 /**
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100 * Create a new message with a destination.
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 * \param message The content of the message (takes the ownership)
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 * \param destination The destination of the message
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103 **/
140
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
104 MessageToDispatch(IDynamicObject* message,
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
105 const char* destination)
139
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106 {
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107 message_ = message;
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 destination_ = destination;
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109 }
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110
140
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
111 ~MessageToDispatch()
139
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112 {
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113 if (message_)
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 {
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115 delete message_;
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 }
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117 }
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118 };
140
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
119
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
120
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
121 class IDestinationContext : public IDynamicObject
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
122 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
123 public:
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
124 virtual void Handle(const IDynamicObject& message) = 0;
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
125 };
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
126
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
127
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
128 class IDestinationContextFactory : public IDynamicObject
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
129 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
130 public:
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
131 virtual IDestinationContext* Construct(const char* destination) = 0;
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
132 };
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
133
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
134
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
135 class MessageDispatcher
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
136 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
137 private:
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
138 typedef std::map<std::string, IDestinationContext*> ActiveContexts;
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
139
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
140 std::auto_ptr<IDestinationContextFactory> factory_;
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
141 ActiveContexts activeContexts_;
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
142 SharedMessageQueue queue_;
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
143
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
144 public:
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
145 MessageDispatcher(IDestinationContextFactory* factory) // takes the ownership
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
146 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
147 factory_.reset(factory);
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
148 }
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
149
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
150 ~MessageDispatcher()
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
151 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
152 for (ActiveContexts::iterator it = activeContexts_.begin();
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
153 it != activeContexts_.end(); it++)
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
154 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
155 delete it->second;
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
156 }
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
157 }
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
158 };
139
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159 }
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163 #include "../Core/DicomFormat/DicomString.h"
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
164
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
165 using namespace Orthanc;
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
166
140
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
167 TEST(MessageToDispatch, A)
139
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
168 {
140
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
169 MessageToDispatch a(new DicomString("coucou"), "pukkaj");
139
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
170 }
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
171