summaryrefslogtreecommitdiff
path: root/src/lib/ecore_con
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2015-06-19 15:18:38 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2015-06-19 15:18:38 +0100
commit69b9f0044b4a397f2748695210192a75d813820d (patch)
treec644fef1075d1adca43460f7fe1bde90e0b6c78b /src/lib/ecore_con
parent9f8f6c2b535165336125491f55a2bfd107dcd52d (diff)
ecore_con_base: converted docs
Diffstat (limited to 'src/lib/ecore_con')
-rw-r--r--src/lib/ecore_con/ecore_con_base.eo169
1 files changed, 80 insertions, 89 deletions
diff --git a/src/lib/ecore_con/ecore_con_base.eo b/src/lib/ecore_con/ecore_con_base.eo
index 10ffeba71d..7dcb1cfd32 100644
--- a/src/lib/ecore_con/ecore_con_base.eo
+++ b/src/lib/ecore_con/ecore_con_base.eo
@@ -4,40 +4,36 @@ abstract Ecore.Con.Base (Eo.Base) {
4 data: null; 4 data: null;
5 methods { 5 methods {
6 @property ip { 6 @property ip {
7 /*@ 7 [[Control the IP address of a server that has been connected to.
8 * Control the IP address of a server that has been connected to. 8
9 * 9 The param is a pointer to an internal string that contains the IP
10 * The param is a pointer to an internal string that contains the IP address of 10 address of the connected server in the form "XXX.YYY.ZZZ.AAA" IP
11 * the connected server in the form "XXX.YYY.ZZZ.AAA" IP notation. 11 notation. This string should not be modified or trusted to stay
12 * This string should not be modified or trusted to stay valid after 12 valid after deletion for the svr object. If no IP is known
13 * deletion for the @p svr object. If no IP is known @c NULL is 13 null is returned.
14 * returned. 14 ]]
15 */
16 get { 15 get {
17 legacy: null; 16 legacy: null;
18 } 17 }
19 values { 18 values {
20 ip: const(char)*; /*@ The IP address */ 19 ip: const(char)*; [[The IP address]]
21 } 20 }
22 } 21 }
23 @property uptime { 22 @property uptime {
24 /*@ 23 [[Check how long the object has been connected
25 * @brief Check how long the object has been connected 24
26 * 25 This function is used to find out how long a client has been
27 * This function is used to find out how long a client has been connected for. 26 connected for.
28 */ 27 ]]
29 get { 28 get {
30 legacy: null; 29 legacy: null;
31 } 30 }
32 values { 31 values {
33 uptime: double; /*@ The total time, in seconds, that the object has been connected. */ 32 uptime: double; [[The total time, in seconds, that the object has been connected.]]
34 } 33 }
35 } 34 }
36 @property port { 35 @property port {
37 /*@ 36 [[Return the port that the obj is connected to]]
38 * @brief Return the port that the obj is connected to
39 *
40 */
41 set { 37 set {
42 legacy: null; 38 legacy: null;
43 } 39 }
@@ -45,50 +41,54 @@ abstract Ecore.Con.Base (Eo.Base) {
45 legacy: null; 41 legacy: null;
46 } 42 }
47 values { 43 values {
48 port: int; /*@ The The port that obj is connected to, or -1 on error. */ 44 port: int; [[The The port that obj is connected to, or -1 on error.]]
49 } 45 }
50 } 46 }
51 @property fd { 47 @property fd {
52 /*@ 48 [[Get the fd that the server is connected to
53 * Get the fd that the server is connected to 49
54 * 50 This function returns the fd which is used by the underlying server
55 * This function returns the fd which is used by the underlying server connection. 51 connection. It should not be tampered with unless you REALLY know
56 * It should not be tampered with unless you REALLY know what you are doing. 52 what you are doing.
57 * @note This function is only valid for servers created with ecore_con_server_connect() 53
58 * @warning Seriously. Don't use this unless you know what you are doing. 54 Note: This function is only valid for servers created with
59 * @since 1.1 55 @ecore_con_server_connect.
60 */ 56
57 Warning: Seriously. Don't use this unless you know what you are doing.
58
59 @since 1.1
60 ]]
61 get { 61 get {
62 legacy: null; 62 legacy: null;
63 } 63 }
64 values { 64 values {
65 fd: int; /*@ The fd, or -1 on failure. */ 65 fd: int; [[The fd, or -1 on failure.]]
66 } 66 }
67 } 67 }
68 @property connected { 68 @property connected {
69 /*@ 69 [[Returns whether the client is still connected]]
70 * Returns whether the client is still connected
71 */
72 get { 70 get {
73 legacy: null; 71 legacy: null;
74 } 72 }
75 values { 73 values {
76 connected: bool; /*@ Returns True if connected, False otherwise. */ 74 connected: bool; [[Returns true if connected, false otherwise.]]
77 } 75 }
78 } 76 }
79 @property timeout { 77 @property timeout {
80 /*@ 78 [[Control the default time after which an inactive client will be
81 * Control the default time after which an inactive client will be disconnected 79 disconnected.
82 * 80
83 * This function is used by the server to set the default idle timeout on 81 This function is used by the server to set the default idle timeout
84 * clients. If the any of the clients becomes idle for a time higher than this 82 on clients. If the any of the clients becomes idle for a time higher
85 * value, it will be disconnected. A value of < 1 disables the idle timeout. 83 than this value, it will be disconnected. A value of < 1 disables
86 * 84 the idle timeout.
87 * This timeout is not affected by the one set by 85
88 * ecore_con_client_timeout_set(). A client will be disconnected whenever the 86 This timeout is not affected by the one set by
89 * client or the server timeout is reached. That means, the lower timeout value 87 @ecore_con_client_timeout_set. A client will be disconnected
90 * will be used for that client if ecore_con_client_timeout_set() is used on it. 88 whenever the client or the server timeout is reached. That means,
91 */ 89 the lower timeout value will be used for that client if
90 @ecore_con_client_timeout_set is used on it.
91 ]]
92 set { 92 set {
93 legacy: null; 93 legacy: null;
94 } 94 }
@@ -96,62 +96,53 @@ abstract Ecore.Con.Base (Eo.Base) {
96 legacy: null; 96 legacy: null;
97 } 97 }
98 values { 98 values {
99 timeout: double; /*@ The timeout, in seconds, to disconnect after. */ 99 timeout: double; [[The timeout, in seconds, to disconnect after.]]
100 } 100 }
101 } 101 }
102 flush { 102 flush {
103 /*@ 103 [[Flushes all pending data to the given server.
104 * Flushes all pending data to the given server. 104
105 * 105 This function will block until all data is sent to the server.
106 * This function will block until all data is sent to the server. 106 ]]
107 */
108 legacy: null; 107 legacy: null;
109 } 108 }
110 send { 109 send {
111 /*@ 110 [[Sends the given data to the given server.
112 * Sends the given data to the given server. 111
113 * 112 This function will send the given data to the server as soon as the
114 * This function will send the given data to the server as soon as the program 113 program is back to the main loop. Thus, this function returns
115 * is back to the main loop. Thus, this function returns immediately 114 immediately (non-blocking). If the data needs to be sent now, call
116 * (non-blocking). If the data needs to be sent @b now, call 115 @ecore_con_server_flush after this one.
117 * ecore_con_server_flush() after this one. 116
118 * 117 See also @ecore_con_client_send and @ecore_con_server_flush.
119 * @see ecore_con_client_send() 118 ]]
120 * @see ecore_con_server_flush()
121 */
122 legacy: null; 119 legacy: null;
123 120
124 params { 121 params {
125 data: const(void)*; /*@ The given data */ 122 data: const(void)*; [[The given data]]
126 size: int; /*@ Length of the data, in bytes. */ 123 size: int; [[Length of the data, in bytes.]]
127 } 124 }
128 return: int; /*@ The number of bytes sent. @c 0 will be returned if there is an error. */ 125 return: int; [[The number of bytes sent. 0 will be returned if there
126 is an error.]]
129 } 127 }
130 lookup @class { 128 lookup @class {
131 /*@ 129 [[Do an asynchronous DNS lookup.
132 * Do an asynchronous DNS lookup. 130
133 * 131 This function performs a DNS lookup on the hostname specified by name,
134 * @param name IP address or server name to translate. 132 then calls done_cb with the result and the data given as parameter.
135 * @param done_cb Callback to notify when done. 133 The result will be given to the done_cb as follows:
136 * @param data User data to be given to done_cb. 134
137 * @return @c EINA_TRUE if the request did not fail to be set up, @c EINA_FALSE 135 canonname - the canonical name of the address, ip - the resolved ip
138 * if it failed. 136 address, addr - a pointer to the socket address, addrlen - the length
139 * 137 of the socket address, in bytes, data - the data pointer given as
140 * This function performs a DNS lookup on the hostname specified by @p name, 138 arameter to @ecore_con_lookup.
141 * then calls @p done_cb with the result and the @p data given as parameter. 139 ]]
142 * The result will be given to the @p done_cb as follows:
143 * @li @c canonname - the canonical name of the address
144 * @li @c ip - the resolved ip address
145 * @li @c addr - a pointer to the socket address
146 * @li @c addrlen - the length of the socket address, in bytes
147 * @li @c data - the data pointer given as parameter to ecore_con_lookup()
148 */
149 params { 140 params {
150 name: const(char)* @nonull; /*@ Hostname to lookup. */ 141 name: const(char)* @nonull; [[IP address or server name to translate.]]
151 done_cb: Ecore_Con_Dns_Cb; /*@ The callback to be called wehn lookup is done. */ 142 done_cb: Ecore_Con_Dns_Cb; [[Callback to notify when done.]]
152 data: const(void)*; /*@ User data for the callback. */ 143 data: const(void)*; [[User data to be given to done_cb.]]
153 } 144 }
154 return: bool; 145 return: bool; [[true if the request did not fail to be set up, false otherwise.]]
155 } 146 }
156 } 147 }
157 implements { 148 implements {