Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * | 2 * |
| 3 * D-Bus++ - C++ bindings for D-Bus | 3 * D-Bus++ - C++ bindings for D-Bus |
| 4 * | 4 * |
| 5 * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> | 5 * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> |
| 6 * | 6 * |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 45 public: | 45 public: |
| 46 | 46 |
| 47 virtual ~Object(); | 47 virtual ~Object(); |
| 48 | 48 |
| 49 inline const DBus::Path &path() const; | 49 inline const DBus::Path &path() const; |
| 50 | 50 |
| 51 inline const std::string &service() const; | 51 inline const std::string &service() const; |
| 52 | 52 |
| 53 inline Connection &conn(); | 53 inline Connection &conn(); |
| 54 | 54 |
| 55 protected: | |
| 56 virtual void register_obj() = 0; | |
|
Jason Glasgow
2011/02/07 20:00:48
As discussed, exposing register_obj() does not rea
| |
| 57 virtual void unregister_obj() = 0; | |
| 58 virtual bool is_registered() = 0; | |
| 59 | |
| 55 private: | 60 private: |
| 56 | 61 |
| 57 DXXAPILOCAL virtual bool handle_message(const Message &) = 0; | 62 DXXAPILOCAL virtual bool handle_message(const Message &) = 0; |
| 58 DXXAPILOCAL virtual void register_obj() = 0; | |
| 59 DXXAPILOCAL virtual void unregister_obj() = 0; | |
| 60 | 63 |
| 61 private: | 64 private: |
| 62 | 65 |
| 63 Connection _conn; | 66 Connection _conn; |
| 64 DBus::Path _path; | 67 DBus::Path _path; |
| 65 std::string _service; | 68 std::string _service; |
| 66 }; | 69 }; |
| 67 | 70 |
| 68 /* | 71 /* |
| 69 */ | 72 */ |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 144 }; | 147 }; |
| 145 | 148 |
| 146 void return_later(const Tag *tag); | 149 void return_later(const Tag *tag); |
| 147 | 150 |
| 148 void return_now(Continuation *ret); | 151 void return_now(Continuation *ret); |
| 149 | 152 |
| 150 void return_error(Continuation *ret, const Error error); | 153 void return_error(Continuation *ret, const Error error); |
| 151 | 154 |
| 152 Continuation *find_continuation(const Tag *tag); | 155 Continuation *find_continuation(const Tag *tag); |
| 153 | 156 |
| 157 virtual void register_obj(); | |
| 158 virtual void unregister_obj(); | |
| 159 virtual bool is_registered(); | |
| 160 | |
| 154 private: | 161 private: |
| 155 | 162 |
| 156 void _emit_signal(SignalMessage &); | 163 void _emit_signal(SignalMessage &); |
| 157 | 164 |
| 158 bool handle_message(const Message &); | 165 bool handle_message(const Message &); |
| 159 | 166 |
| 160 void register_obj(); | |
| 161 void unregister_obj(); | |
| 162 | |
| 163 typedef std::map<const Tag *, Continuation *> ContinuationMap; | 167 typedef std::map<const Tag *, Continuation *> ContinuationMap; |
| 164 ContinuationMap _continuations; | 168 ContinuationMap _continuations; |
| 165 | 169 |
| 166 friend struct Private; | 170 friend struct Private; |
| 167 }; | 171 }; |
| 168 | 172 |
| 169 const ObjectAdaptor *ObjectAdaptor::object() const | 173 const ObjectAdaptor *ObjectAdaptor::object() const |
| 170 { | 174 { |
| 171 return this; | 175 return this; |
| 172 } | 176 } |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 199 inline const ObjectProxy *object() const; | 203 inline const ObjectProxy *object() const; |
| 200 | 204 |
| 201 private: | 205 private: |
| 202 | 206 |
| 203 Message _invoke_method(CallMessage &); | 207 Message _invoke_method(CallMessage &); |
| 204 | 208 |
| 205 bool _invoke_method_noreply(CallMessage &call); | 209 bool _invoke_method_noreply(CallMessage &call); |
| 206 | 210 |
| 207 bool handle_message(const Message &); | 211 bool handle_message(const Message &); |
| 208 | 212 |
| 209 » void register_obj(); | 213 protected: |
| 210 » void unregister_obj(); | 214 » virtual void register_obj(); |
| 215 » virtual void unregister_obj(); | |
| 216 » virtual bool is_registered(); | |
| 211 | 217 |
| 212 private: | 218 private: |
| 213 | 219 |
| 214 MessageSlot _filtered; | 220 MessageSlot _filtered; |
| 215 }; | 221 }; |
| 216 | 222 |
| 217 const ObjectProxy *ObjectProxy::object() const | 223 const ObjectProxy *ObjectProxy::object() const |
| 218 { | 224 { |
| 219 return this; | 225 return this; |
| 220 } | 226 } |
| 221 | 227 |
| 222 } /* namespace DBus */ | 228 } /* namespace DBus */ |
| 223 | 229 |
| 224 #endif//__DBUSXX_OBJECT_H | 230 #endif//__DBUSXX_OBJECT_H |
| OLD | NEW |