![]() |
TO COMPLETE
Functions | |
DBusMessage * | create_method_msg (struct EasyDbus_core *core, struct EasyDbus_method *method) |
Create DBusMessage for method. | |
EasyDbus_method * | easydbus_method_build_skeleton (DBusMessage *msg) |
Build EasyDbus_method object from DBusMessage. |
DBusMessage* create_method_msg | ( | struct EasyDbus_core * | core, | |
struct EasyDbus_method * | method | |||
) | [inline] |
Create DBusMessage for method.
For internal use only.
core | pointer to EasyDbus_core object. | |
method | pointer to EasyDbus_method object. |
pointer to DBusMessage.
Definition at line 334 of file method.c.
References add_elems_to_msg(), EasyDbus_method::args, EasyDbus_method::destination, EasyDbus_method::first, EasyDbus_method::interface, EasyDbus_method::name, and EasyDbus_method::path.
Referenced by easydbus_method_send_async(), easydbus_method_send_async_with_notify(), and easydbus_method_send_blocking().
00336 { 00337 00338 /* create msg */ 00339 DBusMessage *msg = 00340 dbus_message_new_method_call (method->destination, 00341 method->path, 00342 method->interface, 00343 method->name); 00344 00345 if (msg == NULL) 00346 return msg; 00347 00348 /* add method data if there are */ 00349 if (method->args) 00350 add_elems_to_msg (msg, method->first); 00351 00352 return msg; 00353 }
EasyDbus_method* easydbus_method_build_skeleton | ( | DBusMessage * | msg | ) | [read] |
Build EasyDbus_method object from DBusMessage.
For internal use only.
msg | DBusMessage used for create EasyDbus_method object. |
pointer to a new EasyDbus_method object.
Definition at line 205 of file method.c.
References easydbus_build_skeleton_data(), EASYDBUS_ET_METHOD, easydbus_method_create_skeleton(), easydbus_method_free_skeleton(), and EasyDbusDebug.
Referenced by easydbus_verify_match_and_prepare_reply(), and easydbus_watch_method_blocking().
00206 { 00207 struct EasyDbus_method *method = NULL; 00208 00209 EasyDbusDebug ("Build Method Struct"); 00210 00211 method = 00212 easydbus_method_create_skeleton ( 00213 // destination 00214 (char *) dbus_message_get_destination (msg), 00215 // path 00216 (char *) dbus_message_get_path (msg), 00217 // interface 00218 (char *) dbus_message_get_interface (msg), 00219 // method 00220 (char *) dbus_message_get_member (msg)); 00221 00222 if (method == NULL) 00223 return NULL; 00224 00225 if (easydbus_build_skeleton_data (msg, EASYDBUS_ET_METHOD, method)) 00226 goto out_of_memory_error; 00227 00228 EasyDbusDebug ("Created method object"); 00229 00230 return method; 00231 00232 out_of_memory_error: 00233 if (method != NULL) 00234 easydbus_method_free_skeleton (method); 00235 return NULL; 00236 }