Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: src/shared/Communication.h

Issue 11430025: Shut down the engine when the last tab is closed (Closed)
Patch Set: Created Aug. 7, 2013, 2:57 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 #ifndef COMMUNICATION_H 1 #ifndef COMMUNICATION_H
2 #define COMMUNICATION_H 2 #define COMMUNICATION_H
3 3
4 #include <memory> 4 #include <memory>
5 #include <sstream> 5 #include <sstream>
6 #include <stdexcept> 6 #include <stdexcept>
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 #include <Windows.h> 10 #include <Windows.h>
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 public: 164 public:
165 PipeConnectionError(); 165 PipeConnectionError();
166 }; 166 };
167 167
168 class PipeBusyError : public std::runtime_error 168 class PipeBusyError : public std::runtime_error
169 { 169 {
170 public: 170 public:
171 PipeBusyError(); 171 PipeBusyError();
172 }; 172 };
173 173
174 class PipeDisconnectedError : public std::runtime_error
175 {
176 public:
177 PipeDisconnectedError();
178 };
179
174 class Pipe 180 class Pipe
175 { 181 {
176 public: 182 public:
177 enum Mode {MODE_CREATE, MODE_CONNECT}; 183 enum Mode {MODE_CREATE, MODE_CONNECT};
178 184
179 Pipe(const std::wstring& name, Mode mode); 185 Pipe(const std::wstring& name, Mode mode);
180 ~Pipe(); 186 ~Pipe();
181 187
182 InputBuffer ReadMessage(); 188 InputBuffer ReadMessage();
183 void WriteMessage(OutputBuffer& message); 189 void WriteMessage(OutputBuffer& message);
184 190
185 protected: 191 protected:
186 HANDLE pipe; 192 HANDLE pipe;
187 }; 193 };
188 } 194 }
189 195
190 #endif 196 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld