efl/src/Makefile_Ecore_Con.am

247 lines
8.0 KiB
Plaintext
Raw Normal View History

### Library
ecore_con_eolian_files = \
lib/ecore_con/efl_net_socket.eo \
lib/ecore_con/efl_net_socket_simple.eo \
lib/ecore_con/efl_net_socket_fd.eo \
lib/ecore_con/efl_net_socket_tcp.eo \
lib/ecore_con/efl_net_socket_udp.eo \
lib/ecore_con/efl_net_dialer.eo \
lib/ecore_con/efl_net_dialer_simple.eo \
lib/ecore_con/efl_net_dialer_tcp.eo \
lib/ecore_con/efl_net_dialer_udp.eo \
lib/ecore_con/efl_net_dialer_http.eo \
lib/ecore_con/efl_net_dialer_websocket.eo \
lib/ecore_con/efl_net_server.eo \
lib/ecore_con/efl_net_server_simple.eo \
lib/ecore_con/efl_net_server_fd.eo \
lib/ecore_con/efl_net_server_tcp.eo \
lib/ecore_con/efl_net_server_udp.eo \
lib/ecore_con/efl_net_server_udp_client.eo \
lib/ecore_con/efl_net_socket_ssl.eo \
lib/ecore_con/efl_net_ssl_context.eo \
lib/ecore_con/efl_net_dialer_ssl.eo \
lib/ecore_con/efl_net_server_ssl.eo \
efl_net_session and efl_net_control for ConnMan These are objects to allow control of networking devices (efl_net_control) as well as an application to request for connectivity (efl_net_session). They are loosely based on ConnMan.org, which we already use in Enlightenment Window Manager via DBus access with Eldbus. However they do not map 1:1 as the goal was to expose a viable subset of controls but in a simple and general way, thus nome strings were converted to enums, some arrays of strings were converted to bitwise flags, some names were made more general, such as "service" was turned into "access point" so it doesn't generate confusion with other "network services" (ie: http server), or "favorite" that was renamed to "remembered". Some behavior are slightly different (yet able to be implemented on top), such as "Service.MoveBefore" and "MoveAfter" were converted to a numeric "priority", calculated from service's list index, changing the priority will reoder the list and thus generate the MoveBefore and MoveAfter DBus commands. ConnMan was chosen not only because we already use it, but because its DBus API is sane and simple, with the server doing almost all that we need. This is visible in the efl_net_session, which is completely done in the server and do not require any extra work on our side -- aside from talking DBus and converting to Eo, which is a major work :-D NOTE: ConnMan doesn't use FreeDesktop.Org DBus interfaces such as Properties and ObjectManager, thus we cannot use eldbus_model_object. There are two examples added: - efl_net_session_example: monitors the connection available for an application and try to connect. You need a connman compiled with session_policy_local and a configuration file explained in https://github.com/aldebaran/connman/blob/master/doc/session-policy-format.txt to get a connection if nothing is connected. Otherwise it will just monitor the connectivity state. - efl_net_control_example: monitors, plays the agent and configure the network details. It can enable/disable technologies, connect to access points (services) and configure them. It's quite extensive as allows testing all of ConnMan's DBus API except P2P (Peers).
2016-09-15 17:43:19 -07:00
lib/ecore_con/efl_net_control_access_point.eo \
lib/ecore_con/efl_net_control_technology.eo \
lib/ecore_con/efl_net_control.eo \
lib/ecore_con/efl_net_session.eo \
lib/ecore_con/efl_net_ip_address.eo \
lib/ecore_con/ecore_con_eet_base.eo \
lib/ecore_con/ecore_con_eet_server_obj.eo \
lib/ecore_con/ecore_con_eet_client_obj.eo
if HAVE_WINDOWS
else
ecore_con_eolian_files += \
lib/ecore_con/efl_net_socket_unix.eo \
lib/ecore_con/efl_net_dialer_unix.eo \
lib/ecore_con/efl_net_server_unix.eo
endif
ecore_con_eolian_type_files = \
lib/ecore_con/efl_net_types.eot \
lib/ecore_con/efl_net_http_types.eot \
lib/ecore_con/efl_net_ssl_types.eot
ecore_con_eolian_c = $(ecore_con_eolian_files:%.eo=%.eo.c)
ecore_con_eolian_h = $(ecore_con_eolian_files:%.eo=%.eo.h) \
$(ecore_con_eolian_type_files:%.eot=%.eot.h) \
$(ecore_con_eolian_files:%.eo=%.eo.legacy.h)
2014-08-22 05:14:59 -07:00
2014-08-22 03:11:41 -07:00
BUILT_SOURCES += \
$(ecore_con_eolian_c) \
$(ecore_con_eolian_h)
2014-08-22 03:11:41 -07:00
ecoreconeolianfilesdir = $(datadir)/eolian/include/ecore-@VMAJ@
ecoreconeolianfiles_DATA = \
$(ecore_con_eolian_files) \
$(ecore_con_eolian_type_files)
2014-08-22 03:11:41 -07:00
EXTRA_DIST2 += \
2014-08-22 03:11:41 -07:00
${ecoreconeolianfiles_DATA}
lib_LTLIBRARIES += lib/ecore_con/libecore_con.la
installed_ecoreconmainheadersdir = $(includedir)/ecore-con-@VMAJ@
dist_installed_ecoreconmainheaders_DATA = \
lib/ecore_con/Ecore_Con.h \
2014-08-22 03:11:41 -07:00
lib/ecore_con/Ecore_Con_Eo.h \
2015-06-22 23:17:45 -07:00
lib/ecore_con/Ecore_Con_Eet.h \
lib/ecore_con/Ecore_Con_Eet_Legacy.h \
lib/ecore_con/Ecore_Con_Eet_Eo.h
2014-08-22 03:11:41 -07:00
nodist_installed_ecoreconmainheaders_DATA = \
$(ecore_con_eolian_h)
2014-08-22 03:11:41 -07:00
lib_ecore_con_libecore_con_la_SOURCES = \
lib/ecore_con/ecore_con_alloc.c \
lib/ecore_con/ecore_con.c \
ecore_con - move libproxy to a slave binary with stdin/out msging so here's the ugly problem. libproxy. yes. we've discussed memory usage (e.g. it may have to execute javascript and pull in lots of deps etc.) but we dlopene'd on the fly. ok... but this didn't solve another issue i hit: libproxy was causing enlightenment to abort(). some internal bit of libproxy was raising a c++ exception. this wasn't caught. this causes an abort(). takes down your entire desktop. FANTASTIC. this is bad. i wouldnt' expect a library we depend on to be THIS anti-social but libproxy seemingly is. it SHOULd catch its error sand just propagate back to us so we can handle gracefully. there reall is no way around this - isolate libproxy. it's even worse that libproxy can load arbitrary modules that come from anywhere sho who knows what issues this can cause. isolation is the best solution i can think of. so this makes an elf+net_proxy_helper we spawn the first time we need a proxy lookup. we re-use that binary again and again until it exits (it should exit after 10 seconds of being idle with no requests coming in/pending). it'll respawn again later if needed. this involves now the efl net threads having to marshall back to mainloop to do the spawn and to write to the proxy process (reading is done by async exe data events and the data is passed down a thread queue to the waitng efl net thread). if the exe dies with pending requests unanswered then it's respawned again and the req's are re-sent to it... just in case. it has a limit on how often it'll respawn quickly. this seems to work in my limited testing. this ALSO now isolates memory usage of libproxy to another slave process AND this process will die taking its memory with it once it's been idle for long enough. that;s also another good solution to keeping libproxy impact at bay.
2017-01-08 05:57:54 -08:00
lib/ecore_con/ecore_con_proxy_helper.c \
lib/ecore_con/ecore_con_legacy.c \
lib/ecore_con/ecore_con_eet.c \
lib/ecore_con/ecore_con_socks.c \
lib/ecore_con/ecore_con_url.c \
lib/ecore_con/ecore_con_url_curl.c \
lib/ecore_con/ecore_con_url_curl.h \
static_libs/http-parser/http_parser.c \
static_libs/http-parser/http_parser.h \
lib/ecore_con/ecore_con_private.h \
lib/ecore_con/efl_net_socket.c \
lib/ecore_con/efl_net_socket_simple.c \
lib/ecore_con/efl_net_socket_fd.c \
lib/ecore_con/efl_net_socket_tcp.c \
lib/ecore_con/efl_net_socket_udp.c \
lib/ecore_con/efl_net_dialer.c \
lib/ecore_con/efl_net_dialer_simple.c \
lib/ecore_con/efl_net_dialer_tcp.c \
lib/ecore_con/efl_net_dialer_udp.c \
lib/ecore_con/efl_net_dialer_http.c \
lib/ecore_con/efl_net_dialer_websocket.c \
lib/ecore_con/efl_net_server.c \
lib/ecore_con/efl_net_server_simple.c \
lib/ecore_con/efl_net_server_fd.c \
lib/ecore_con/efl_net_server_tcp.c \
lib/ecore_con/efl_net_server_udp.c \
lib/ecore_con/efl_net_server_udp_client.c \
lib/ecore_con/efl_net_socket_ssl.c \
lib/ecore_con/efl_net_ssl_context.c \
lib/ecore_con/efl_net_dialer_ssl.c \
lib/ecore_con/efl_net_server_ssl.c \
lib/ecore_con/ecore_con_local.c \
lib/ecore_con/efl_net_ip_address.c
if EFL_NET_CONTROL_BACKEND_CONNMAN
lib_ecore_con_libecore_con_la_SOURCES += \
efl_net_session and efl_net_control for ConnMan These are objects to allow control of networking devices (efl_net_control) as well as an application to request for connectivity (efl_net_session). They are loosely based on ConnMan.org, which we already use in Enlightenment Window Manager via DBus access with Eldbus. However they do not map 1:1 as the goal was to expose a viable subset of controls but in a simple and general way, thus nome strings were converted to enums, some arrays of strings were converted to bitwise flags, some names were made more general, such as "service" was turned into "access point" so it doesn't generate confusion with other "network services" (ie: http server), or "favorite" that was renamed to "remembered". Some behavior are slightly different (yet able to be implemented on top), such as "Service.MoveBefore" and "MoveAfter" were converted to a numeric "priority", calculated from service's list index, changing the priority will reoder the list and thus generate the MoveBefore and MoveAfter DBus commands. ConnMan was chosen not only because we already use it, but because its DBus API is sane and simple, with the server doing almost all that we need. This is visible in the efl_net_session, which is completely done in the server and do not require any extra work on our side -- aside from talking DBus and converting to Eo, which is a major work :-D NOTE: ConnMan doesn't use FreeDesktop.Org DBus interfaces such as Properties and ObjectManager, thus we cannot use eldbus_model_object. There are two examples added: - efl_net_session_example: monitors the connection available for an application and try to connect. You need a connman compiled with session_policy_local and a configuration file explained in https://github.com/aldebaran/connman/blob/master/doc/session-policy-format.txt to get a connection if nothing is connected. Otherwise it will just monitor the connectivity state. - efl_net_control_example: monitors, plays the agent and configure the network details. It can enable/disable technologies, connect to access points (services) and configure them. It's quite extensive as allows testing all of ConnMan's DBus API except P2P (Peers).
2016-09-15 17:43:19 -07:00
lib/ecore_con/efl_net-connman.h \
lib/ecore_con/efl_net-connman.c \
lib/ecore_con/efl_net_control_access_point-connman.c \
lib/ecore_con/efl_net_control_technology-connman.c \
lib/ecore_con/efl_net_control-connman.c \
lib/ecore_con/efl_net_session-connman.c
endif
if EFL_NET_CONTROL_BACKEND_NONE
lib_ecore_con_libecore_con_la_SOURCES += \
lib/ecore_con/efl_net_control_access_point-none.c \
lib/ecore_con/efl_net_control_technology-none.c \
lib/ecore_con/efl_net_control-none.c \
lib/ecore_con/efl_net_session-none.c
endif
# these are included rather than compiled out
# so the structures can be embedded into the
# object Private Data and allows functions to
# be all static
EXTRA_DIST2 += \
lib/ecore_con/efl_net_ssl_conn-openssl.c \
lib/ecore_con/efl_net_ssl_conn-gnutls.c \
lib/ecore_con/efl_net_ssl_conn-none.c \
lib/ecore_con/efl_net_ssl_ctx-openssl.c \
lib/ecore_con/efl_net_ssl_ctx-gnutls.c \
lib/ecore_con/efl_net_ssl_ctx-none.c
if HAVE_WINDOWS
#lib_ecore_con_libecore_con_la_SOURCES += lib/ecore_con/ecore_con_local_win32.c
else
lib_ecore_con_libecore_con_la_SOURCES += \
lib/ecore_con/efl_net_socket_unix.c \
lib/ecore_con/efl_net_dialer_unix.c \
lib/ecore_con/efl_net_server_unix.c
endif
ecore_con - move libproxy to a slave binary with stdin/out msging so here's the ugly problem. libproxy. yes. we've discussed memory usage (e.g. it may have to execute javascript and pull in lots of deps etc.) but we dlopene'd on the fly. ok... but this didn't solve another issue i hit: libproxy was causing enlightenment to abort(). some internal bit of libproxy was raising a c++ exception. this wasn't caught. this causes an abort(). takes down your entire desktop. FANTASTIC. this is bad. i wouldnt' expect a library we depend on to be THIS anti-social but libproxy seemingly is. it SHOULd catch its error sand just propagate back to us so we can handle gracefully. there reall is no way around this - isolate libproxy. it's even worse that libproxy can load arbitrary modules that come from anywhere sho who knows what issues this can cause. isolation is the best solution i can think of. so this makes an elf+net_proxy_helper we spawn the first time we need a proxy lookup. we re-use that binary again and again until it exits (it should exit after 10 seconds of being idle with no requests coming in/pending). it'll respawn again later if needed. this involves now the efl net threads having to marshall back to mainloop to do the spawn and to write to the proxy process (reading is done by async exe data events and the data is passed down a thread queue to the waitng efl net thread). if the exe dies with pending requests unanswered then it's respawned again and the req's are re-sent to it... just in case. it has a limit on how often it'll respawn quickly. this seems to work in my limited testing. this ALSO now isolates memory usage of libproxy to another slave process AND this process will die taking its memory with it once it's been idle for long enough. that;s also another good solution to keeping libproxy impact at bay.
2017-01-08 05:57:54 -08:00
lib_ecore_con_libecore_con_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
-DPACKAGE_DATA_DIR=\"$(datadir)/ecore\" \
-DPACKAGE_BUILD_DIR=\"$(abs_top_builddir)\" \
@ECORE_CON_CFLAGS@
lib_ecore_con_libecore_con_la_LIBADD = @ECORE_CON_LIBS@ @EVIL_LIBS@
lib_ecore_con_libecore_con_la_DEPENDENCIES = @ECORE_CON_INTERNAL_LIBS@
lib_ecore_con_libecore_con_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
lib_ecore_con_libecore_con_la_CPPFLAGS += -I$(top_srcdir)/src/static_libs/http-parser
EXTRA_DIST2 += \
tests/ecore_con/server.key \
tests/ecore_con/server.pem \
static_libs/http-parser/AUTHORS \
static_libs/http-parser/CONTRIBUTIONS \
static_libs/http-parser/README.md \
static_libs/http-parser/test.c \
static_libs/http-parser/contrib/parsertrace.c \
static_libs/http-parser/contrib/url_parser.c
ecore_con - move libproxy to a slave binary with stdin/out msging so here's the ugly problem. libproxy. yes. we've discussed memory usage (e.g. it may have to execute javascript and pull in lots of deps etc.) but we dlopene'd on the fly. ok... but this didn't solve another issue i hit: libproxy was causing enlightenment to abort(). some internal bit of libproxy was raising a c++ exception. this wasn't caught. this causes an abort(). takes down your entire desktop. FANTASTIC. this is bad. i wouldnt' expect a library we depend on to be THIS anti-social but libproxy seemingly is. it SHOULd catch its error sand just propagate back to us so we can handle gracefully. there reall is no way around this - isolate libproxy. it's even worse that libproxy can load arbitrary modules that come from anywhere sho who knows what issues this can cause. isolation is the best solution i can think of. so this makes an elf+net_proxy_helper we spawn the first time we need a proxy lookup. we re-use that binary again and again until it exits (it should exit after 10 seconds of being idle with no requests coming in/pending). it'll respawn again later if needed. this involves now the efl net threads having to marshall back to mainloop to do the spawn and to write to the proxy process (reading is done by async exe data events and the data is passed down a thread queue to the waitng efl net thread). if the exe dies with pending requests unanswered then it's respawned again and the req's are re-sent to it... just in case. it has a limit on how often it'll respawn quickly. this seems to work in my limited testing. this ALSO now isolates memory usage of libproxy to another slave process AND this process will die taking its memory with it once it's been idle for long enough. that;s also another good solution to keeping libproxy impact at bay.
2017-01-08 05:57:54 -08:00
### Binary
proxyhelperdir = \
$(libdir)/ecore_con/utils/$(MODULE_ARCH)
proxyhelper_PROGRAMS = bin/ecore_con/efl_net_proxy_helper
bin_ecore_con_efl_net_proxy_helper_SOURCES = \
bin/ecore_con/efl_net_proxy_helper.c
bin_ecore_con_efl_net_proxy_helper_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
-DPACKAGE_DATA_DIR=\"$(datadir)/ecore\" \
@EINA_CFLAGS@
bin_ecore_con_efl_net_proxy_helper_LDADD = @USE_EINA_LIBS@
bin_ecore_con_efl_net_proxy_helper_DEPEDNENCIES = @USE_EINA_INTERNAL_LIBS@
### Unit tests
if EFL_ENABLE_TESTS
check_PROGRAMS += tests/ecore_con/ecore_con_suite
TESTS += tests/ecore_con/ecore_con_suite
tests_ecore_con_ecore_con_suite_SOURCES = \
tests/ecore_con/ecore_con_suite.c \
tests/ecore_con/ecore_con_test_ecore_con.c \
tests/ecore_con/ecore_con_test_ecore_con_url.c \
tests/ecore_con/ecore_con_test_ecore_con_eet.c \
tests/ecore_con/ecore_con_test_efl_net_ip_address.c \
tests/ecore_con/ecore_con_suite.h
tests_ecore_con_ecore_con_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/ecore_con\" \
-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/ecore_con\" \
@CHECK_CFLAGS@ \
@ECORE_CFLAGS@ \
@ECORE_CON_CFLAGS@
tests_ecore_con_ecore_con_suite_LDADD = \
@CHECK_LIBS@ \
@USE_ECORE_LIBS@ \
@USE_ECORE_CON_LIBS@
tests_ecore_con_ecore_con_suite_DEPENDENCIES = \
@USE_ECORE_INTERNAL_LIBS@ \
@USE_ECORE_CON_INTERNAL_LIBS@
endif
if HAVE_ELUA
ecore_con_eolian_lua = $(ecore_con_eolian_files:%.eo=%.eo.lua)
generated_ecore_con_lua_all = $(ecore_con_eolian_lua)
GENERATED_LUA_BINDINGS += $(generated_ecore_con_lua_all)
installed_ecoreconluadir = $(datadir)/elua/modules/ecore_con
nodist_installed_ecoreconlua_DATA = $(generated_ecore_con_lua_all)
endif
if HAVE_JS
generated_ecore_con_js_bindings = $(ecore_con_eolian_files:%.eo=%.eo.js.cc)
GENERATED_JS_BINDINGS += $(generated_ecore_con_js_bindings)
endif