forked from enlightenment/efl
30df128be5
Summary: Applications can: void method_callback(void* data, const Eldbus_Service_Interface* iface, const Eldbus_Message* message); struct { ... } data_struct; Eldbus_Method methods[] = { "method1", ELDBUS_ARGS("b", "bool"), ELDBUS_ARGS("b", "bool"), ELDBUS_METHOD_FLAG_HAS_DATA , (Eldbus_Method_Cb)&method_callback, &data_struct }; And method_callback will be called with data parameter pointing to data_struct global object. Also, Eldbus-cxx supports registering an interface passing a lambda or function object as method. For example: edb::service_interface iface = edb::service_interface_register (c, path, interface , es::method("SendStringAndBool" , [expected_string, expected_bool] (std::string const& n, bool b , bool* out) { std::cout << "Running SendStringAndBool" << std::endl; ck_assert(n == expected_string); ck_assert(b == expected_bool); *out = b; return n; } , es::ins<std::string, bool>("string", "bool") , es::outs<std::string, bool>("string", "bool") ) ); When a request for "SendStringAndBool" with the proper signature is called, executes the lambda and replies with the return value and its bool* out parameter value. Reviewers: cedric, woohyun, raster CC: savio, cedric Differential Revision: https://phab.enlightenment.org/D1052 |
||
---|---|---|
.. | ||
ecore | ||
ecore_audio | ||
ecore_avahi | ||
ecore_cocoa | ||
ecore_con | ||
ecore_drm | ||
ecore_evas | ||
ecore_fb | ||
ecore_file | ||
ecore_imf | ||
ecore_imf_evas | ||
ecore_input | ||
ecore_input_evas | ||
ecore_ipc | ||
ecore_psl1ght | ||
ecore_sdl | ||
ecore_wayland | ||
ecore_win32 | ||
ecore_wince | ||
ecore_x | ||
edje | ||
eet | ||
eeze | ||
efl | ||
efreet | ||
eina | ||
eio | ||
eldbus | ||
embryo | ||
emotion | ||
eo | ||
eolian | ||
eolian_cxx | ||
ephysics | ||
escape | ||
ethumb | ||
ethumb_client | ||
evas | ||
evil | ||
.gitignore |