2014-02-25 12:24:32 -08:00
|
|
|
|
|
|
|
### Library
|
|
|
|
|
2014-06-02 06:54:06 -07:00
|
|
|
if HAVE_CXX11
|
2014-05-02 15:52:47 -07:00
|
|
|
installed_einacxxmainheadersdir = $(includedir)/eina-cxx-@VMAJ@
|
2014-02-25 12:24:32 -08:00
|
|
|
dist_installed_einacxxmainheaders_DATA = \
|
2014-02-26 07:16:40 -08:00
|
|
|
bindings/eina_cxx/Eina.hh
|
2014-02-25 12:24:32 -08:00
|
|
|
|
2014-05-02 15:52:47 -07:00
|
|
|
installed_einacxxheadersdir = $(includedir)/eina-cxx-@VMAJ@/eina-cxx
|
2014-02-25 12:24:32 -08:00
|
|
|
dist_installed_einacxxheaders_DATA = \
|
2014-02-26 07:16:40 -08:00
|
|
|
bindings/eina_cxx/eina_accessor.hh \
|
2014-07-17 10:07:09 -07:00
|
|
|
bindings/eina_cxx/eina_array.hh \
|
2014-02-26 07:16:40 -08:00
|
|
|
bindings/eina_cxx/eina_clone_allocators.hh \
|
|
|
|
bindings/eina_cxx/eina_error.hh \
|
2014-07-17 10:07:09 -07:00
|
|
|
bindings/eina_cxx/eina_eo_base_fwd.hh \
|
eldbus-cxx: Implementation of eldbus C++ API
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
2014-07-03 00:28:22 -07:00
|
|
|
bindings/eina_cxx/eina_fold.hh \
|
2014-02-26 07:16:40 -08:00
|
|
|
bindings/eina_cxx/eina_inarray.hh \
|
|
|
|
bindings/eina_cxx/eina_inlist.hh \
|
2014-05-02 15:52:47 -07:00
|
|
|
bindings/eina_cxx/eina_integer_sequence.hh \
|
2014-02-26 07:16:40 -08:00
|
|
|
bindings/eina_cxx/eina_iterator.hh \
|
|
|
|
bindings/eina_cxx/eina_lists_auxiliary.hh \
|
2014-07-17 10:07:09 -07:00
|
|
|
bindings/eina_cxx/eina_list.hh \
|
2014-03-10 18:07:17 -07:00
|
|
|
bindings/eina_cxx/eina_log.hh \
|
2014-05-02 15:52:47 -07:00
|
|
|
bindings/eina_cxx/eina_optional.hh \
|
2014-02-26 07:16:40 -08:00
|
|
|
bindings/eina_cxx/eina_ptrarray.hh \
|
|
|
|
bindings/eina_cxx/eina_ptrlist.hh \
|
2014-03-10 18:07:17 -07:00
|
|
|
bindings/eina_cxx/eina_range_types.hh \
|
2014-02-26 07:16:40 -08:00
|
|
|
bindings/eina_cxx/eina_ref.hh \
|
|
|
|
bindings/eina_cxx/eina_stringshare.hh \
|
|
|
|
bindings/eina_cxx/eina_thread.hh \
|
eldbus-cxx: Implementation of eldbus C++ API
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
2014-07-03 00:28:22 -07:00
|
|
|
bindings/eina_cxx/eina_tuple.hh \
|
|
|
|
bindings/eina_cxx/eina_tuple_unwrap.hh \
|
2014-02-26 07:16:40 -08:00
|
|
|
bindings/eina_cxx/eina_type_traits.hh \
|
|
|
|
bindings/eina_cxx/eina_value.hh
|
2014-02-25 12:24:32 -08:00
|
|
|
|
|
|
|
### Unit tests
|
|
|
|
|
|
|
|
if EFL_ENABLE_TESTS
|
|
|
|
|
|
|
|
check_PROGRAMS += tests/eina_cxx/eina_cxx_suite
|
|
|
|
TESTS += tests/eina_cxx/eina_cxx_suite
|
|
|
|
|
|
|
|
tests_eina_cxx_eina_cxx_suite_SOURCES = \
|
|
|
|
tests/eina_cxx/eina_cxx_suite.cc \
|
|
|
|
tests/eina_cxx/eina_cxx_test_inlist.cc \
|
2014-03-09 20:25:20 -07:00
|
|
|
tests/eina_cxx/eina_cxx_test_log.cc \
|
2014-02-25 12:24:32 -08:00
|
|
|
tests/eina_cxx/eina_cxx_test_inarray.cc \
|
|
|
|
tests/eina_cxx/eina_cxx_test_iterator.cc \
|
|
|
|
tests/eina_cxx/eina_cxx_test_ptrarray.cc \
|
|
|
|
tests/eina_cxx/eina_cxx_test_ptrlist.cc \
|
|
|
|
tests/eina_cxx/eina_cxx_test_stringshare.cc \
|
|
|
|
tests/eina_cxx/eina_cxx_test_error.cc \
|
|
|
|
tests/eina_cxx/eina_cxx_test_accessor.cc \
|
|
|
|
tests/eina_cxx/eina_cxx_test_thread.cc \
|
2014-05-02 15:52:47 -07:00
|
|
|
tests/eina_cxx/eina_cxx_test_optional.cc \
|
2014-03-06 21:19:10 -08:00
|
|
|
tests/eina_cxx/eina_cxx_test_value.cc
|
2014-02-25 12:24:32 -08:00
|
|
|
|
|
|
|
tests_eina_cxx_eina_cxx_suite_CXXFLAGS = -I$(top_builddir)/src/lib/efl \
|
|
|
|
-DTESTS_WD=\"`pwd`\" \
|
|
|
|
-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/eina_cxx\" \
|
2014-07-02 08:09:20 -07:00
|
|
|
-DPACKAGE_BUILD_DIR=\"$(abs_top_builddir)/src/tests/eina_cxx\" \
|
2014-05-04 03:19:39 -07:00
|
|
|
-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/eina_cxx\" \
|
2014-02-25 12:24:32 -08:00
|
|
|
@CHECK_CFLAGS@ \
|
2014-07-11 16:19:30 -07:00
|
|
|
@EO_CFLAGS@ \
|
|
|
|
@EO_CXX_CFLAGS@ \
|
2014-05-04 03:19:39 -07:00
|
|
|
@EINA_CXX_CFLAGS@
|
2014-07-11 16:19:30 -07:00
|
|
|
tests_eina_cxx_eina_cxx_suite_LDADD = @CHECK_LIBS@ @USE_EINA_LIBS@ @USE_EO_LIBS@
|
|
|
|
tests_eina_cxx_eina_cxx_suite_DEPENDENCIES = @USE_EINA_INTERNAL_LIBS@ @USE_EO_INTERNAL_LIBS@
|
2014-02-25 12:24:32 -08:00
|
|
|
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|