Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Side by Side Diff: third_party/mtpd/mtpd_server/mtpd_server.h

Issue 11184028: Pull in mtpd from CrOS and add files to build it on Linux. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/mtpd/mtpd.gyp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 /*
2 * This file was automatically generated by dbusxx-xml2cpp; DO NOT EDIT!
3 * The source for dbusxx-xml2cpp is here:
4 * http://git.chromium.org/gitweb/?p=chromiumos/third_party/dbus-cplusplus.git
5 */
6 #ifndef __dbusxx________out_Debug_gen_mtpd_server_mtpd_server_h__ADAPTOR_MARSHAL L_H
7 #define __dbusxx________out_Debug_gen_mtpd_server_mtpd_server_h__ADAPTOR_MARSHAL L_H
8 #include <dbus-c++/dbus.h>
9 #include <cassert>
10
11 namespace org {
12 namespace chromium {
13
14 class Mtpd_adaptor
15 : public ::DBus::InterfaceAdaptor
16 {
17 public:
18 Mtpd_adaptor()
19 : ::DBus::InterfaceAdaptor("org.chromium.Mtpd")
20 {
21 register_method(Mtpd_adaptor, EnumerateStorage, _EnumerateStorage_stub);
22 register_method(Mtpd_adaptor, GetStorageInfo, _GetStorageInfo_stub);
23 register_method(Mtpd_adaptor, OpenStorage, _OpenStorage_stub);
24 register_method(Mtpd_adaptor, CloseStorage, _CloseStorage_stub);
25 register_method(Mtpd_adaptor, ReadDirectoryByPath, _ReadDirectoryByPath_ stub);
26 register_method(Mtpd_adaptor, ReadDirectoryById, _ReadDirectoryById_stub );
27 register_method(Mtpd_adaptor, ReadFileByPath, _ReadFileByPath_stub);
28 register_method(Mtpd_adaptor, ReadFileById, _ReadFileById_stub);
29 register_method(Mtpd_adaptor, GetFileInfoByPath, _GetFileInfoByPath_stub );
30 register_method(Mtpd_adaptor, GetFileInfoById, _GetFileInfoById_stub);
31 register_method(Mtpd_adaptor, IsAlive, _IsAlive_stub);
32 }
33 const ::DBus::IntrospectedInterface *introspect() const
34 {
35 static const ::DBus::IntrospectedArgument EnumerateStorage_args[] =
36 {
37 { "storageList", "as", false },
38 { 0, 0, 0 }
39 };
40 static const ::DBus::IntrospectedArgument GetStorageInfo_args[] =
41 {
42 { "storageName", "s", true },
43 { "storageInfo", "ay", false },
44 { 0, 0, 0 }
45 };
46 static const ::DBus::IntrospectedArgument OpenStorage_args[] =
47 {
48 { "storageName", "s", true },
49 { "mode", "s", true },
50 { "handle", "s", false },
51 { 0, 0, 0 }
52 };
53 static const ::DBus::IntrospectedArgument CloseStorage_args[] =
54 {
55 { "handle", "s", true },
56 { 0, 0, 0 }
57 };
58 static const ::DBus::IntrospectedArgument ReadDirectoryByPath_args[] =
59 {
60 { "handle", "s", true },
61 { "filePath", "s", true },
62 { "results", "ay", false },
63 { 0, 0, 0 }
64 };
65 static const ::DBus::IntrospectedArgument ReadDirectoryById_args[] =
66 {
67 { "handle", "s", true },
68 { "fileId", "u", true },
69 { "results", "ay", false },
70 { 0, 0, 0 }
71 };
72 static const ::DBus::IntrospectedArgument ReadFileByPath_args[] =
73 {
74 { "handle", "s", true },
75 { "filePath", "s", true },
76 { "data", "ay", false },
77 { 0, 0, 0 }
78 };
79 static const ::DBus::IntrospectedArgument ReadFileById_args[] =
80 {
81 { "handle", "s", true },
82 { "fileId", "u", true },
83 { "data", "ay", false },
84 { 0, 0, 0 }
85 };
86 static const ::DBus::IntrospectedArgument GetFileInfoByPath_args[] =
87 {
88 { "handle", "s", true },
89 { "filePath", "s", true },
90 { "info", "ay", false },
91 { 0, 0, 0 }
92 };
93 static const ::DBus::IntrospectedArgument GetFileInfoById_args[] =
94 {
95 { "handle", "s", true },
96 { "fileId", "u", true },
97 { "info", "ay", false },
98 { 0, 0, 0 }
99 };
100 static const ::DBus::IntrospectedArgument IsAlive_args[] =
101 {
102 { "result", "b", false },
103 { 0, 0, 0 }
104 };
105 static const ::DBus::IntrospectedArgument MTPStorageAttached_args[] =
106 {
107 { "storageName", "s", false },
108 { 0, 0, 0 }
109 };
110 static const ::DBus::IntrospectedArgument MTPStorageDetached_args[] =
111 {
112 { "storageName", "s", false },
113 { 0, 0, 0 }
114 };
115 static const ::DBus::IntrospectedMethod Mtpd_adaptor_methods[] =
116 {
117 { "EnumerateStorage", EnumerateStorage_args },
118 { "GetStorageInfo", GetStorageInfo_args },
119 { "OpenStorage", OpenStorage_args },
120 { "CloseStorage", CloseStorage_args },
121 { "ReadDirectoryByPath", ReadDirectoryByPath_args },
122 { "ReadDirectoryById", ReadDirectoryById_args },
123 { "ReadFileByPath", ReadFileByPath_args },
124 { "ReadFileById", ReadFileById_args },
125 { "GetFileInfoByPath", GetFileInfoByPath_args },
126 { "GetFileInfoById", GetFileInfoById_args },
127 { "IsAlive", IsAlive_args },
128 { 0, 0 }
129 };
130 static const ::DBus::IntrospectedMethod Mtpd_adaptor_signals[] =
131 {
132 { "MTPStorageAttached", MTPStorageAttached_args },
133 { "MTPStorageDetached", MTPStorageDetached_args },
134 { 0, 0 }
135 };
136 static const ::DBus::IntrospectedProperty Mtpd_adaptor_properties[] =
137 {
138 { 0, 0, 0, 0 }
139 };
140 static const ::DBus::IntrospectedInterface Mtpd_adaptor_interface =
141 {
142 "org.chromium.Mtpd",
143 Mtpd_adaptor_methods,
144 Mtpd_adaptor_signals,
145 Mtpd_adaptor_properties
146 };
147 return &Mtpd_adaptor_interface;
148 }
149 /* Properties exposed by this interface.
150 * Use property() and property(value) to
151 * get and set a particular property.
152 */
153 /* Methods exported by this interface.
154 * You will have to implement them in your ObjectAdaptor.
155 */
156 virtual std::vector< std::string > EnumerateStorage(::DBus::Error &error) = 0;
157 virtual std::vector< uint8_t > GetStorageInfo(const std::string& storageName , ::DBus::Error &error) = 0;
158 virtual std::string OpenStorage(const std::string& storageName, const std::s tring& mode, ::DBus::Error &error) = 0;
159 virtual void CloseStorage(const std::string& handle, ::DBus::Error &error) = 0;
160 virtual std::vector< uint8_t > ReadDirectoryByPath(const std::string& handle , const std::string& filePath, ::DBus::Error &error) = 0;
161 virtual std::vector< uint8_t > ReadDirectoryById(const std::string& handle, const uint32_t& fileId, ::DBus::Error &error) = 0;
162 virtual std::vector< uint8_t > ReadFileByPath(const std::string& handle, con st std::string& filePath, ::DBus::Error &error) = 0;
163 virtual std::vector< uint8_t > ReadFileById(const std::string& handle, const uint32_t& fileId, ::DBus::Error &error) = 0;
164 virtual std::vector< uint8_t > GetFileInfoByPath(const std::string& handle, const std::string& filePath, ::DBus::Error &error) = 0;
165 virtual std::vector< uint8_t > GetFileInfoById(const std::string& handle, co nst uint32_t& fileId, ::DBus::Error &error) = 0;
166 virtual bool IsAlive(::DBus::Error &error) = 0;
167 /* signal emitters for this interface */
168 void MTPStorageAttached(const std::string &storageName)
169 {
170 ::DBus::SignalMessage __sig("MTPStorageAttached");
171 ::DBus::MessageIter __wi = __sig.writer();
172 __wi << storageName;
173 emit_signal(__sig);
174 }
175 void MTPStorageDetached(const std::string &storageName)
176 {
177 ::DBus::SignalMessage __sig("MTPStorageDetached");
178 ::DBus::MessageIter __wi = __sig.writer();
179 __wi << storageName;
180 emit_signal(__sig);
181 }
182 private:
183 /* unmarshallers (to unpack the DBus message before calling the actual
184 * interface method)
185 */
186 ::DBus::Message _EnumerateStorage_stub(const ::DBus::CallMessage &__call)
187 {
188 ::DBus::Error __error;
189 std::vector< std::string > __argout;
190 __argout = EnumerateStorage(__error);
191 if (__error.is_set())
192 return ::DBus::ErrorMessage(__call, __error.name(), __error.message( ));
193 ::DBus::ReturnMessage __reply(__call);
194 ::DBus::MessageIter __wi = __reply.writer();
195 __wi << __argout;
196 return __reply;
197 }
198 ::DBus::Message _GetStorageInfo_stub(const ::DBus::CallMessage &__call)
199 {
200 ::DBus::Error __error;
201 ::DBus::MessageIter __ri = __call.reader();
202 std::string storageName; __ri >> storageName;
203 std::vector< uint8_t > __argout;
204 __argout = GetStorageInfo(storageName, __error);
205 if (__error.is_set())
206 return ::DBus::ErrorMessage(__call, __error.name(), __error.message( ));
207 ::DBus::ReturnMessage __reply(__call);
208 ::DBus::MessageIter __wi = __reply.writer();
209 __wi << __argout;
210 return __reply;
211 }
212 ::DBus::Message _OpenStorage_stub(const ::DBus::CallMessage &__call)
213 {
214 ::DBus::Error __error;
215 ::DBus::MessageIter __ri = __call.reader();
216 std::string storageName; __ri >> storageName;
217 std::string mode; __ri >> mode;
218 std::string __argout;
219 __argout = OpenStorage(storageName, mode, __error);
220 if (__error.is_set())
221 return ::DBus::ErrorMessage(__call, __error.name(), __error.message( ));
222 ::DBus::ReturnMessage __reply(__call);
223 ::DBus::MessageIter __wi = __reply.writer();
224 __wi << __argout;
225 return __reply;
226 }
227 ::DBus::Message _CloseStorage_stub(const ::DBus::CallMessage &__call)
228 {
229 ::DBus::Error __error;
230 ::DBus::MessageIter __ri = __call.reader();
231 std::string handle; __ri >> handle;
232 CloseStorage(handle, __error);
233 if (__error.is_set())
234 return ::DBus::ErrorMessage(__call, __error.name(), __error.message( ));
235 ::DBus::ReturnMessage __reply(__call);
236 return __reply;
237 }
238 ::DBus::Message _ReadDirectoryByPath_stub(const ::DBus::CallMessage &__call)
239 {
240 ::DBus::Error __error;
241 ::DBus::MessageIter __ri = __call.reader();
242 std::string handle; __ri >> handle;
243 std::string filePath; __ri >> filePath;
244 std::vector< uint8_t > __argout;
245 __argout = ReadDirectoryByPath(handle, filePath, __error);
246 if (__error.is_set())
247 return ::DBus::ErrorMessage(__call, __error.name(), __error.message( ));
248 ::DBus::ReturnMessage __reply(__call);
249 ::DBus::MessageIter __wi = __reply.writer();
250 __wi << __argout;
251 return __reply;
252 }
253 ::DBus::Message _ReadDirectoryById_stub(const ::DBus::CallMessage &__call)
254 {
255 ::DBus::Error __error;
256 ::DBus::MessageIter __ri = __call.reader();
257 std::string handle; __ri >> handle;
258 uint32_t fileId; __ri >> fileId;
259 std::vector< uint8_t > __argout;
260 __argout = ReadDirectoryById(handle, fileId, __error);
261 if (__error.is_set())
262 return ::DBus::ErrorMessage(__call, __error.name(), __error.message( ));
263 ::DBus::ReturnMessage __reply(__call);
264 ::DBus::MessageIter __wi = __reply.writer();
265 __wi << __argout;
266 return __reply;
267 }
268 ::DBus::Message _ReadFileByPath_stub(const ::DBus::CallMessage &__call)
269 {
270 ::DBus::Error __error;
271 ::DBus::MessageIter __ri = __call.reader();
272 std::string handle; __ri >> handle;
273 std::string filePath; __ri >> filePath;
274 std::vector< uint8_t > __argout;
275 __argout = ReadFileByPath(handle, filePath, __error);
276 if (__error.is_set())
277 return ::DBus::ErrorMessage(__call, __error.name(), __error.message( ));
278 ::DBus::ReturnMessage __reply(__call);
279 ::DBus::MessageIter __wi = __reply.writer();
280 __wi << __argout;
281 return __reply;
282 }
283 ::DBus::Message _ReadFileById_stub(const ::DBus::CallMessage &__call)
284 {
285 ::DBus::Error __error;
286 ::DBus::MessageIter __ri = __call.reader();
287 std::string handle; __ri >> handle;
288 uint32_t fileId; __ri >> fileId;
289 std::vector< uint8_t > __argout;
290 __argout = ReadFileById(handle, fileId, __error);
291 if (__error.is_set())
292 return ::DBus::ErrorMessage(__call, __error.name(), __error.message( ));
293 ::DBus::ReturnMessage __reply(__call);
294 ::DBus::MessageIter __wi = __reply.writer();
295 __wi << __argout;
296 return __reply;
297 }
298 ::DBus::Message _GetFileInfoByPath_stub(const ::DBus::CallMessage &__call)
299 {
300 ::DBus::Error __error;
301 ::DBus::MessageIter __ri = __call.reader();
302 std::string handle; __ri >> handle;
303 std::string filePath; __ri >> filePath;
304 std::vector< uint8_t > __argout;
305 __argout = GetFileInfoByPath(handle, filePath, __error);
306 if (__error.is_set())
307 return ::DBus::ErrorMessage(__call, __error.name(), __error.message( ));
308 ::DBus::ReturnMessage __reply(__call);
309 ::DBus::MessageIter __wi = __reply.writer();
310 __wi << __argout;
311 return __reply;
312 }
313 ::DBus::Message _GetFileInfoById_stub(const ::DBus::CallMessage &__call)
314 {
315 ::DBus::Error __error;
316 ::DBus::MessageIter __ri = __call.reader();
317 std::string handle; __ri >> handle;
318 uint32_t fileId; __ri >> fileId;
319 std::vector< uint8_t > __argout;
320 __argout = GetFileInfoById(handle, fileId, __error);
321 if (__error.is_set())
322 return ::DBus::ErrorMessage(__call, __error.name(), __error.message( ));
323 ::DBus::ReturnMessage __reply(__call);
324 ::DBus::MessageIter __wi = __reply.writer();
325 __wi << __argout;
326 return __reply;
327 }
328 ::DBus::Message _IsAlive_stub(const ::DBus::CallMessage &__call)
329 {
330 ::DBus::Error __error;
331 bool __argout;
332 __argout = IsAlive(__error);
333 if (__error.is_set())
334 return ::DBus::ErrorMessage(__call, __error.name(), __error.message( ));
335 ::DBus::ReturnMessage __reply(__call);
336 ::DBus::MessageIter __wi = __reply.writer();
337 __wi << __argout;
338 return __reply;
339 }
340 };
341 }}
342 #endif // __dbusxx________out_Debug_gen_mtpd_server_mtpd_server_h__ADAPTOR_MARS HALL_H
OLDNEW
« no previous file with comments | « third_party/mtpd/mtpd.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698