summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2015-04-26 16:25:31 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-04-26 17:20:23 +0200
commit1649ad765cde363a675a92dda86629b3a3a08438 (patch)
treea872a170490df29915dd25236817ccafdad348be
parenta0111289ba0b4cf61b474b31c0a4ac1c73020a8b (diff)
downloadefl-devs/cedric/ecore_con_ssh.tar.gz
ecore_con: first initial addition of Ecore_Con_Ssh object.devs/cedric/ecore_con_ssh
-rw-r--r--src/Makefile_Ecore_Con.am11
-rw-r--r--src/lib/ecore_con/Ecore_Con_Ssh.h65
-rw-r--r--src/lib/ecore_con/ecore_con_ssh.c139
-rw-r--r--src/lib/ecore_con/efl_network_ssh_channel_base.eo40
-rw-r--r--src/lib/ecore_con/efl_network_ssh_channel_interactive_session.eo33
-rw-r--r--src/lib/ecore_con/efl_network_ssh_client.eo64
6 files changed, 349 insertions, 3 deletions
diff --git a/src/Makefile_Ecore_Con.am b/src/Makefile_Ecore_Con.am
index a443e671bb..e9aef332fb 100644
--- a/src/Makefile_Ecore_Con.am
+++ b/src/Makefile_Ecore_Con.am
@@ -6,7 +6,10 @@ ecore_con_eolian_files = \
lib/ecore_con/ecore_con_client.eo \
lib/ecore_con/ecore_con_server.eo \
lib/ecore_con/ecore_con_connector.eo \
- lib/ecore_con/ecore_con_url.eo
+ lib/ecore_con/ecore_con_url.eo \
+ lib/ecore_con/efl_network_ssh_client.eo \
+ lib/ecore_con/efl_network_ssh_channel_base.eo \
+ lib/ecore_con/efl_network_ssh_channel_interactive_session.eo
ecore_con_eolian_c = $(ecore_con_eolian_files:%.eo=%.eo.c)
ecore_con_eolian_h = $(ecore_con_eolian_files:%.eo=%.eo.h) \
@@ -34,7 +37,8 @@ dist_installed_ecoreconmainheaders_DATA = \
lib/ecore_con/Ecore_Con.h \
lib/ecore_con/Ecore_Con_Legacy.h \
lib/ecore_con/Ecore_Con_Eo.h \
-lib/ecore_con/Ecore_Con_Eet.h
+lib/ecore_con/Ecore_Con_Eet.h \
+lib/ecore_con/Ecore_Con_Ssh.h
nodist_installed_ecoreconmainheaders_DATA = \
$(ecore_con_eolian_h)
@@ -46,7 +50,8 @@ lib/ecore_con/ecore_con_eet.c \
lib/ecore_con/ecore_con_socks.c \
lib/ecore_con/ecore_con_ssl.c \
lib/ecore_con/ecore_con_url.c \
-lib/ecore_con/ecore_con_private.h
+lib/ecore_con/ecore_con_private.h \
+lib/ecore_con/ecore_con_ssh.c
if HAVE_WINDOWS
lib_ecore_con_libecore_con_la_SOURCES += lib/ecore_con/ecore_con_local_win32.c
diff --git a/src/lib/ecore_con/Ecore_Con_Ssh.h b/src/lib/ecore_con/Ecore_Con_Ssh.h
new file mode 100644
index 0000000000..31a7139c96
--- /dev/null
+++ b/src/lib/ecore_con/Ecore_Con_Ssh.h
@@ -0,0 +1,65 @@
+#ifndef _ECORE_CON_SSH_H
+#define _ECORE_CON_SSH_H
+
+#include <time.h>
+#include <libgen.h>
+#ifdef _WIN32
+# include <ws2tcpip.h>
+#else
+# include <netdb.h>
+#endif
+#include <Eina.h>
+#include <Eo.h>
+
+#ifdef EAPI
+# undef EAPI
+#endif
+
+#ifdef _WIN32
+# ifdef EFL_ECORE_CON_BUILD
+# ifdef DLL_EXPORT
+# define EAPI __declspec(dllexport)
+# else
+# define EAPI
+# endif
+# else
+# define EAPI __declspec(dllimport)
+# endif
+#else
+# ifdef __GNUC__
+# if __GNUC__ >= 4
+# define EAPI __attribute__ ((visibility("default")))
+# else
+# define EAPI
+# endif
+# else
+# define EAPI
+# endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct _Efl_Network_Ssh_Request Efl_Network_Ssh_Request;
+typedef Eo Efl_Network_Ssh_Channel_Interactive_Session;
+
+#ifndef EFL_NOLEGACY_API_SUPPORT
+# include "efl_network_ssh_client.eo.legacy.h"
+# include "efl_network_ssh_channel_base.eo.legacy.h"
+# include "efl_network_ssh_channel_interactive_session.eo.legacy.h"
+#endif
+#ifdef EFL_EO_API_SUPPORT
+# include "efl_network_ssh_client.eo.h"
+# include "efl_network_ssh_channel_base.eo.h"
+# include "efl_network_ssh_channel_interactive_session.eo.h"
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#undef EAPI
+#define EAPI
+
+#endif
diff --git a/src/lib/ecore_con/ecore_con_ssh.c b/src/lib/ecore_con/ecore_con_ssh.c
new file mode 100644
index 0000000000..6e5d5c3587
--- /dev/null
+++ b/src/lib/ecore_con/ecore_con_ssh.c
@@ -0,0 +1,139 @@
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <Eina.h>
+#include <Eo.h>
+#include <Ecore_Con.h>
+#include <Ecore_Con_Ssh.h>
+
+typedef struct _Efl_Network_Ssh_Client_Data Efl_Network_Ssh_Client_Data;
+struct _Efl_Network_Ssh_Client_Data
+{
+};
+
+typedef struct _Efl_Network_Ssh_Channel_Base_Data Efl_Network_Ssh_Channel_Base_Data;
+struct _Efl_Network_Ssh_Channel_Base_Data
+{
+};
+
+typedef struct _Efl_Network_Ssh_Channel_Interactive_Session_Data Efl_Network_Ssh_Channel_Interactive_Session_Data;
+struct _Efl_Network_Ssh_Channel_Interactive_Session_Data
+{
+};
+
+
+
+static void
+_efl_network_ssh_client_user_set(Eo *obj, Efl_Network_Ssh_Client_Data *pd, const char *user)
+{
+}
+
+static const char *
+_efl_network_ssh_client_user_get(Eo *obj, Efl_Network_Ssh_Client_Data *pd)
+{
+}
+
+static void
+_efl_network_ssh_client_passwd_set(Eo *obj, Efl_Network_Ssh_Client_Data *pd, const char *passwd)
+{
+}
+
+static const char *
+_efl_network_ssh_client_passwd_get(Eo *obj, Efl_Network_Ssh_Client_Data *pd)
+{
+}
+
+static Eina_Iterator *
+_efl_network_ssh_client_keys_list(Eo *obj, Efl_Network_Ssh_Client_Data *pd)
+{
+}
+
+static Eina_Bool
+_efl_network_ssh_client_key_add(Eo *obj, Efl_Network_Ssh_Client_Data *pd, const char *path)
+{
+}
+
+static Eina_Bool
+_efl_network_ssh_client_key_del(Eo *obj, Efl_Network_Ssh_Client_Data *pd, const char *path)
+{
+}
+
+static Eina_Bool
+_efl_network_ssh_client_hostkey(Eo *obj, Efl_Network_Ssh_Client_Data *pd, Eina_Bool validate)
+{
+}
+
+static Efl_Network_Ssh_Channel_Interactive_Session *
+_efl_network_ssh_client_interactive_session_new(Eo *obj, Efl_Network_Ssh_Client_Data *pd)
+{
+}
+
+static void
+_efl_network_ssh_client_eo_base_constructor(Eo *obj, Efl_Network_Ssh_Client_Data *pd)
+{
+}
+
+static Eo *
+_efl_network_ssh_client_eo_base_finalize(Eo *obj, Efl_Network_Ssh_Client_Data *pd)
+{
+}
+
+static void
+_efl_network_ssh_client_eo_base_destructor(Eo *obj, Efl_Network_Ssh_Client_Data *pd)
+{
+}
+
+static int
+_efl_network_ssh_client_ecore_con_base_send(Eo *obj, Efl_Network_Ssh_Client_Data *pd, const void *data, int size)
+{
+}
+
+static void
+_efl_network_ssh_client_ecore_con_base_flush(Eo *obj, Efl_Network_Ssh_Client_Data *pd)
+{
+}
+
+static Eina_Bool
+_efl_network_ssh_channel_base_data_send(Eo *obj, Efl_Network_Ssh_Channel_Base_Data *pd, const void *data, size_t size)
+{
+}
+
+static Eina_Bool
+_efl_network_ssh_channel_base_binbuf_send(Eo *obj, Efl_Network_Ssh_Channel_Base_Data *pd, const Eina_Binbuf *data)
+{
+}
+
+static Eina_Bool
+_efl_network_ssh_channel_base_data_ext_send(Eo *obj, Efl_Network_Ssh_Channel_Base_Data *pd, unsigned int type, const void *data, size_t size)
+{
+}
+
+static Eina_Bool
+_efl_network_ssh_channel_base_binbuf_ext_send(Eo *obj, Efl_Network_Ssh_Channel_Base_Data *pd, unsigned int type, const Eina_Binbuf *data)
+{
+}
+
+static Efl_Network_Ssh_Request *
+_efl_network_ssh_channel_interactive_session_pty_req(Eo *obj, Efl_Network_Ssh_Channel_Interactive_Session_Data *pd, const char *term, const char *modes, unsigned int columns, unsigned int rows, unsigned int width, unsigned int height)
+{
+}
+
+static void
+_efl_network_ssh_channel_interactive_session_env_req(Eo *obj, Efl_Network_Ssh_Channel_Interactive_Session_Data *pd, const char *name, const char *value)
+{
+}
+
+static Efl_Network_Ssh_Request *
+_efl_network_ssh_channel_interactive_session_shell_req(Eo *obj, Efl_Network_Ssh_Channel_Interactive_Session_Data *pd)
+{
+}
+
+static Efl_Network_Ssh_Request *
+_efl_network_ssh_channel_interactive_session_exec_req(Eo *obj, Efl_Network_Ssh_Channel_Interactive_Session_Data *pd, const char *command)
+{
+}
+
+#include "efl_network_ssh_client.eo.c"
+#include "efl_network_ssh_channel_base.eo.c"
+#include "efl_network_ssh_channel_interactive_session.eo.c"
diff --git a/src/lib/ecore_con/efl_network_ssh_channel_base.eo b/src/lib/ecore_con/efl_network_ssh_channel_base.eo
new file mode 100644
index 0000000000..089ba0fde6
--- /dev/null
+++ b/src/lib/ecore_con/efl_network_ssh_channel_base.eo
@@ -0,0 +1,40 @@
+class Efl.Network.Ssh.Channel.Base
+{
+ eo_prefix: efl_network_ssh_channel;
+ legacy_prefix: ecore_con_ssh_channel;
+ methods {
+ data_send {
+ params {
+ const(void)* data;
+ size_t size;
+ }
+ return: bool;
+ }
+ binbuf_send {
+ params {
+ const(Eina_Binbuf)* data;
+ }
+ return: bool;
+ }
+ data_ext_send {
+ params {
+ uint type;
+ const(void)* data;
+ size_t size;
+ }
+ return: bool;
+ }
+ binbuf_ext_send {
+ params {
+ uint type;
+ const(Eina_Binbuf)* data;
+ }
+ return: bool;
+ }
+ }
+ events {
+ data,received;
+ data,error;
+ request,reply;
+ }
+}
diff --git a/src/lib/ecore_con/efl_network_ssh_channel_interactive_session.eo b/src/lib/ecore_con/efl_network_ssh_channel_interactive_session.eo
new file mode 100644
index 0000000000..3467e6eda7
--- /dev/null
+++ b/src/lib/ecore_con/efl_network_ssh_channel_interactive_session.eo
@@ -0,0 +1,33 @@
+class Efl.Network.Ssh.Channel.Interactive_Session (Efl.Network.Ssh.Channel.Base)
+{
+ eo_prefix: efl_network_ssh_channel_interactive_session;
+ legacy_prefix: ecore_con_ssh_channel_interactive_session;
+ methods {
+ pty_req {
+ params {
+ const(char)* term;
+ const(char)* modes;
+ uint columns;
+ uint rows;
+ uint width;
+ uint height;
+ }
+ return: Efl_Network_Ssh_Request *;
+ }
+ env_req {
+ params {
+ const(char)* name;
+ const(char)* value;
+ }
+ }
+ shell_req {
+ return: Efl_Network_Ssh_Request *;
+ }
+ exec_req {
+ params {
+ const(char)* command;
+ }
+ return: Efl_Network_Ssh_Request *;
+ }
+ }
+}
diff --git a/src/lib/ecore_con/efl_network_ssh_client.eo b/src/lib/ecore_con/efl_network_ssh_client.eo
new file mode 100644
index 0000000000..6be12ec36f
--- /dev/null
+++ b/src/lib/ecore_con/efl_network_ssh_client.eo
@@ -0,0 +1,64 @@
+class Efl.Network.Ssh.Client (Ecore.Con.Connector)
+{
+ eo_prefix: efl_network_ssh_client;
+ legacy_prefix: ecore_con_ssh_client;
+ properties {
+ user {
+ set {
+ }
+ get {
+ }
+ values {
+ const(char)* user;
+ }
+ }
+ passwd {
+ set {
+ }
+ get {
+ }
+ values {
+ const(char)* passwd;
+ }
+ }
+ }
+ methods {
+ keys_list {
+ return: free(own(iterator<const(char)*> *), eina_iterator_free);
+ }
+ key_add {
+ params {
+ const(char)* path @nonull;
+ }
+ return: bool;
+ }
+ key_del {
+ params {
+ const(char)* path @nonull;
+ }
+ return: bool;
+ }
+ hostkey {
+ params {
+ bool validate;
+ }
+ return: bool;
+ }
+ interactive_session_new {
+ return: Efl_Network_Ssh_Channel_Interactive_Session *;
+ }
+ }
+ implements {
+ Eo.Base.constructor;
+ Eo.Base.finalize;
+ Eo.Base.destructor;
+ Ecore.Con.Base.send;
+ Ecore.Con.Base.flush;
+ }
+ events {
+ hostkey,known;
+ hostkey,unknown;
+ auth,passwd;
+ auth,keys;
+ }
+}