summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--legacy/ecore/ecore.c.in2
-rw-r--r--legacy/ecore/src/lib/ecore/ecore_list.c126
-rw-r--r--legacy/ecore/src/lib/ecore_con/ecore_con.c2
-rw-r--r--legacy/ecore/src/lib/ecore_ipc/ecore_ipc.c111
4 files changed, 153 insertions, 88 deletions
diff --git a/legacy/ecore/ecore.c.in b/legacy/ecore/ecore.c.in
index da05ce4c26..30b2931792 100644
--- a/legacy/ecore/ecore.c.in
+++ b/legacy/ecore/ecore.c.in
@@ -327,7 +327,7 @@ state.
327/** 327/**
328@defgroup Ecore_Data_List_Creation_Group List Creation/Destruction Functions 328@defgroup Ecore_Data_List_Creation_Group List Creation/Destruction Functions
329 329
330Functions that create, initialize and destory Ecore_Lists. 330Functions that create, initialize and destroy Ecore_Lists.
331*/ 331*/
332 332
333/** 333/**
diff --git a/legacy/ecore/src/lib/ecore/ecore_list.c b/legacy/ecore/src/lib/ecore/ecore_list.c
index db6a07a6d5..7603f94ebd 100644
--- a/legacy/ecore/src/lib/ecore/ecore_list.c
+++ b/legacy/ecore/src/lib/ecore/ecore_list.c
@@ -1063,8 +1063,16 @@ int ecore_list_node_destroy(Ecore_List_Node * node, Ecore_Free_Cb free_func)
1063} 1063}
1064 1064
1065/** 1065/**
1066 * @brief Create and initialize a new list. 1066 * @defgroup Ecore_Data_DList_Creation_Group Doubly Linked List Creation/Destruction Functions
1067 * @return Returns a new initialized list on success, NULL on failure. 1067 *
1068 * Functions used to create, initialize and destroy @c Ecore_DLists.
1069 */
1070
1071/**
1072 * Creates and initialises a new doubly linked list.
1073 * @return A new initialised doubly linked list on success, @c NULL
1074 * on failure.
1075 * @ingroup Ecore_Data_DList_Creation_Group
1068 */ 1076 */
1069Ecore_DList *ecore_dlist_new() 1077Ecore_DList *ecore_dlist_new()
1070{ 1078{
@@ -1083,9 +1091,10 @@ Ecore_DList *ecore_dlist_new()
1083} 1091}
1084 1092
1085/** 1093/**
1086 * @brief Initialize a list to some sane starting values. 1094 * Initialises a list to some sane starting values.
1087 * @param list: the list to initialize 1095 * @param list The doubly linked list to initialise.
1088 * @return Returns FALSE if an error occurs, TRUE if successful 1096 * @return @c TRUE if successful, @c FALSE if an error occurs.
1097 * @ingroup Ecore_Data_DList_Creation_Group
1089 */ 1098 */
1090int ecore_dlist_init(Ecore_DList *list) 1099int ecore_dlist_init(Ecore_DList *list)
1091{ 1100{
@@ -1099,10 +1108,9 @@ int ecore_dlist_init(Ecore_DList *list)
1099} 1108}
1100 1109
1101/** 1110/**
1102 * @brief Free a list and all of it's nodes. 1111 * Frees a doubly linked list and all of its nodes.
1103 * @param list: the list to be freed 1112 * @param list The doubly linked list to be freed.
1104 * 1113 * @ingroup Ecore_Data_DList_Creation_Group
1105 * @return Returns no value
1106 */ 1114 */
1107void ecore_dlist_destroy(Ecore_DList * list) 1115void ecore_dlist_destroy(Ecore_DList * list)
1108{ 1116{
@@ -1124,10 +1132,12 @@ void ecore_dlist_destroy(Ecore_DList * list)
1124} 1132}
1125 1133
1126/** 1134/**
1127 * @brief Set the function for freeing data 1135 * Sets the function used for freeing data stored in a doubly linked list.
1128 * @param list: the list that will use this function when nodes are destroyed. 1136 * @param list The doubly linked list that will use this function when
1129 * @param free_func: the function that will free the key data 1137 * nodes are destroyed.
1130 * @return Returns TRUE on success, FALSE on failure. 1138 * @param free_func The function that will free the key data
1139 * @return @c TRUE on success, @c FALSE on failure.
1140 * @ingroup Ecore_Data_DList_Creation_Group
1131 */ 1141 */
1132int ecore_dlist_set_free_cb(Ecore_DList * list, Ecore_Free_Cb free_func) 1142int ecore_dlist_set_free_cb(Ecore_DList * list, Ecore_Free_Cb free_func)
1133{ 1143{
@@ -1137,10 +1147,9 @@ int ecore_dlist_set_free_cb(Ecore_DList * list, Ecore_Free_Cb free_func)
1137} 1147}
1138 1148
1139/** 1149/**
1140 * @brief Checks the list for any nodes. 1150 * Returns whether there is anything in the given doubly linked list.
1141 * @param list: the list to check for nodes 1151 * @param list The given doubly linked list.
1142 * 1152 * @return @c TRUE if there are nodes, @c FALSE otherwise.
1143 * @return Returns TRUE if no nodes in list, FALSE if the list contains nodes
1144 */ 1153 */
1145int ecore_dlist_is_empty(Ecore_DList * list) 1154int ecore_dlist_is_empty(Ecore_DList * list)
1146{ 1155{
@@ -1150,9 +1159,9 @@ int ecore_dlist_is_empty(Ecore_DList * list)
1150} 1159}
1151 1160
1152/** 1161/**
1153 * @brief Returns the number of the current node 1162 * Retrieves the index of the current node of the given doubly linked list.
1154 * @param list: the list to return the number of the current node 1163 * @param list The given doubly linked list.
1155 * @return Returns the number of the current node in the list. 1164 * @return The index of the current node.
1156 */ 1165 */
1157inline int ecore_dlist_index(Ecore_DList * list) 1166inline int ecore_dlist_index(Ecore_DList * list)
1158{ 1167{
@@ -1162,10 +1171,17 @@ inline int ecore_dlist_index(Ecore_DList * list)
1162} 1171}
1163 1172
1164/** 1173/**
1165 * Append data to the list. 1174 * @defgroup Ecore_Data_DList_Add_Item_Group Doubly Linked List Adding Functions
1166 * @param list The list to append @a data 1175 *
1167 * @param data The data to append to @a list 1176 * Functions that are used to add nodes to an Ecore_DList.
1168 * @return FALSE if an error occurs, TRUE if appended successfully 1177 */
1178
1179/**
1180 * Appends data to the given doubly linked list.
1181 * @param list The given doubly linked list.
1182 * @param data The data to append.
1183 * @return @c TRUE if the data is successfully appended, @c FALSE otherwise.
1184 * @ingroup Ecore_Data_DList_Add_Item_Group
1169 */ 1185 */
1170int ecore_dlist_append(Ecore_DList * list, void *data) 1186int ecore_dlist_append(Ecore_DList * list, void *data)
1171{ 1187{
@@ -1192,10 +1208,11 @@ int ecore_dlist_append(Ecore_DList * list, void *data)
1192} 1208}
1193 1209
1194/** 1210/**
1195 * Prepend data to the beginning of the list 1211 * Adds data to the very beginning of the given doubly linked list.
1196 * @param list The list to prepend @a data 1212 * @param list The given doubly linked list.
1197 * @param data The data to prepend to @a list 1213 * @param data The data to prepend.
1198 * @return FALSE if an error occurs, TRUE if prepended successfully 1214 * @return @c TRUE if the data is successfully prepended, @c FALSE otherwise.
1215 * @ingroup Ecore_Data_DList_Add_Item_Group
1199 */ 1216 */
1200int ecore_dlist_prepend(Ecore_DList * list, void *data) 1217int ecore_dlist_prepend(Ecore_DList * list, void *data)
1201{ 1218{
@@ -1221,10 +1238,11 @@ int ecore_dlist_prepend(Ecore_DList * list, void *data)
1221} 1238}
1222 1239
1223/** 1240/**
1224 * Insert data at the current point in the list. 1241 * Inserts data at the current point in the given doubly linked list.
1225 * @param list The list to hold the inserted @a data. 1242 * @param list The given doubly linked list.
1226 * @param data The data to insert into @a list. 1243 * @param data The data to be inserted.
1227 * @return Returns FALSE on an error, TRUE on success 1244 * @return @c TRUE on success, @c FALSE otherwise.
1245 * @ingroup Ecore_Data_DList_Add_Item_Group
1228 */ 1246 */
1229int ecore_dlist_insert(Ecore_DList * list, void *data) 1247int ecore_dlist_insert(Ecore_DList * list, void *data)
1230{ 1248{
@@ -1264,9 +1282,16 @@ int ecore_dlist_insert(Ecore_DList * list, void *data)
1264} 1282}
1265 1283
1266/** 1284/**
1267 * @brief Remove the current item from the list. 1285 * @defgroup Ecore_Data_DList_Remove_Item_Group Doubly Linked List Removing Functions
1268 * @param list: the list to remove the current item 1286 *
1269 * @return Returns a pointer to the removed data on success, NULL on failure. 1287 * Functions that remove nodes from an @c Ecore_DList.
1288 */
1289
1290/**
1291 * Removes the current item from the given doubly linked list.
1292 * @param list The given doubly linked list.
1293 * @return A pointer to the removed data on success, @c NULL otherwise.
1294 * @ingroup Ecore_Data_DList_Remove_Item_Group
1270 */ 1295 */
1271void *ecore_dlist_remove(Ecore_DList * list) 1296void *ecore_dlist_remove(Ecore_DList * list)
1272{ 1297{
@@ -1291,9 +1316,10 @@ void *ecore_dlist_remove(Ecore_DList * list)
1291} 1316}
1292 1317
1293/** 1318/**
1294 * @brief Remove the first item from the list. 1319 * Removes the first item from the given doubly linked list.
1295 * @param list: the list to remove the current item 1320 * @param list The given doubly linked list.
1296 * @return Returns a pointer to the removed data on success, NULL on failure. 1321 * @return A pointer to the removed data on success, @c NULL on failure.
1322 * @ingroup Ecore_Data_DList_Remove_Item_Group
1297 */ 1323 */
1298void *ecore_dlist_remove_first(Ecore_DList * list) 1324void *ecore_dlist_remove_first(Ecore_DList * list)
1299{ 1325{
@@ -1309,10 +1335,11 @@ void *ecore_dlist_remove_first(Ecore_DList * list)
1309} 1335}
1310 1336
1311/** 1337/**
1312 * @brief Remove and free the data at the current position 1338 * Removes and frees the data at the current position in the given doubly
1313 * @param list: the list to remove the data from 1339 * linked list.
1314 * 1340 * @param list The given doubly linked list.
1315 * @return Returns TRUE on success, FALSE on error 1341 * @return @c TRUE on success, @c FALSE otherwise.
1342 * @ingroup Ecore_Data_DList_Remove_Item_Group
1316 */ 1343 */
1317int ecore_dlist_remove_destroy(Ecore_DList *list) 1344int ecore_dlist_remove_destroy(Ecore_DList *list)
1318{ 1345{
@@ -1336,9 +1363,10 @@ static void *_ecore_dlist_remove_first(Ecore_DList *list)
1336} 1363}
1337 1364
1338/** 1365/**
1339 * @brief Remove the last item from the list 1366 * Removes the last item from the given doubly linked list.
1340 * @param list: the list to remove the last node from 1367 * @param list The given doubly linked list.
1341 * @return Returns a pointer to the removed data on success, NULL on failure. 1368 * @return A pointer to the removed data on success, @c NULL otherwise.
1369 * @ingroup Ecore_Data_DList_Remove_Item_Group
1342 */ 1370 */
1343void *ecore_dlist_remove_last(Ecore_DList * list) 1371void *ecore_dlist_remove_last(Ecore_DList * list)
1344{ 1372{
@@ -1354,10 +1382,10 @@ void *ecore_dlist_remove_last(Ecore_DList * list)
1354} 1382}
1355 1383
1356/** 1384/**
1357 * @brief Move the current item to the index number 1385 * Moves the current item to the index number in the given doubly linked list.
1358 * @param list: the list to move the current item 1386 * @param list The given doubly linked list.
1359 * @param index: the position to move the current item 1387 * @param index The position to move the current item
1360 * @return Returns node at specified index on success, NULL on error 1388 * @return The node at specified index on success, @c NULL on error.
1361 */ 1389 */
1362void *ecore_dlist_goto_index(Ecore_DList * list, int index) 1390void *ecore_dlist_goto_index(Ecore_DList * list, int index)
1363{ 1391{
diff --git a/legacy/ecore/src/lib/ecore_con/ecore_con.c b/legacy/ecore/src/lib/ecore_con/ecore_con.c
index 2985a48057..3b1b077de0 100644
--- a/legacy/ecore/src/lib/ecore_con/ecore_con.c
+++ b/legacy/ecore/src/lib/ecore_con/ecore_con.c
@@ -325,7 +325,7 @@ ecore_con_server_add(Ecore_Con_Type compl_type,
325 * It is used to generate the socket name when the socket 325 * It is used to generate the socket name when the socket
326 * is a Unix socket. It is used as the hostname when 326 * is a Unix socket. It is used as the hostname when
327 * connecting with a TCP socket. 327 * connecting with a TCP socket.
328 * @param port Number to identify socket to connect to. Used when 328 * @param port Number to identify the socket to connect to. Used when
329 * generating the socket name for a Unix socket, or as the 329 * generating the socket name for a Unix socket, or as the
330 * TCP port when connecting to a TCP socket. 330 * TCP port when connecting to a TCP socket.
331 * @param data Data to associate with the created Ecore_Con_Server 331 * @param data Data to associate with the created Ecore_Con_Server
diff --git a/legacy/ecore/src/lib/ecore_ipc/ecore_ipc.c b/legacy/ecore/src/lib/ecore_ipc/ecore_ipc.c
index b3d10ca052..87bfa24054 100644
--- a/legacy/ecore/src/lib/ecore_ipc/ecore_ipc.c
+++ b/legacy/ecore/src/lib/ecore_ipc/ecore_ipc.c
@@ -191,9 +191,9 @@ int ECORE_IPC_EVENT_SERVER_DATA = 0;
191static int init_count = 0; 191static int init_count = 0;
192static Ecore_Ipc_Server *servers = NULL; 192static Ecore_Ipc_Server *servers = NULL;
193/** 193/**
194 * To be documented. 194 * Initialises the Ecore IPC library.
195 * 195 * @return Number of times the library has been initialised without
196 * FIXME: To be fixed. 196 * being shut down.
197 */ 197 */
198int 198int
199ecore_ipc_init(void) 199ecore_ipc_init(void)
@@ -220,9 +220,9 @@ ecore_ipc_init(void)
220} 220}
221 221
222/** 222/**
223 * To be documented. 223 * Shuts down the Ecore IPC library.
224 * 224 * @return Number of times the library has been initialised without being
225 * FIXME: To be fixed. 225 * shut down.
226 */ 226 */
227int 227int
228ecore_ipc_shutdown(void) 228ecore_ipc_shutdown(void)
@@ -238,9 +238,17 @@ ecore_ipc_shutdown(void)
238} 238}
239 239
240/** 240/**
241 * To be documented. 241 * Creates an IPC server that listens for connections.
242 * 242 *
243 * FIXME: To be fixed. 243 * For more details about the @p compl_type, @p name and @p port
244 * parameters, see the @ref ecore_con_server_add documentation.
245 *
246 * @param compl_type The connection type.
247 * @param name Name to associate with the socket used for connection.
248 * @param port Number to identify with socket used for connection.
249 * @param data Data to associate with the IPC server.
250 * @return New IPC server. If there is an error, @c NULL is returned.
251 * @todo Need to add protocol type parameter to this function.
244 */ 252 */
245Ecore_Ipc_Server * 253Ecore_Ipc_Server *
246ecore_ipc_server_add(Ecore_Ipc_Type compl_type, char *name, int port, const void *data) 254ecore_ipc_server_add(Ecore_Ipc_Type compl_type, char *name, int port, const void *data)
@@ -283,9 +291,20 @@ ecore_ipc_server_add(Ecore_Ipc_Type compl_type, char *name, int port, const void
283} 291}
284 292
285/** 293/**
286 * To be documented. 294 * Creates an IPC server object to represent the IPC server listening
295 * on the given port.
296 *
297 * For more details about the @p compl_type, @p name and @p port
298 * parameters, see the @ref ecore_con_server_connect documentation.
287 * 299 *
288 * FIXME: To be fixed. 300 * @param compl_type The IPC connection type.
301 * @param name Name used to determine which socket to use for the
302 * IPC connection.
303 * @param port Number used to identify the socket to use for the
304 * IPC connection.
305 * @param data Data to associate with the server.
306 * @return A new IPC server. @c NULL is returned on error.
307 * @todo Need to add protocol type parameter.
289 */ 308 */
290Ecore_Ipc_Server * 309Ecore_Ipc_Server *
291ecore_ipc_server_connect(Ecore_Ipc_Type compl_type, char *name, int port, const void *data) 310ecore_ipc_server_connect(Ecore_Ipc_Type compl_type, char *name, int port, const void *data)
@@ -328,9 +347,9 @@ ecore_ipc_server_connect(Ecore_Ipc_Type compl_type, char *name, int port, const
328} 347}
329 348
330/** 349/**
331 * To be documented. 350 * Closes the connection and frees the given IPC server.
332 * 351 * @param svr The given IPC server.
333 * FIXME: To be fixed. 352 * @return The data associated with the server when it was created.
334 */ 353 */
335void * 354void *
336ecore_ipc_server_del(Ecore_Ipc_Server *svr) 355ecore_ipc_server_del(Ecore_Ipc_Server *svr)
@@ -354,9 +373,9 @@ ecore_ipc_server_del(Ecore_Ipc_Server *svr)
354} 373}
355 374
356/** 375/**
357 * To be documented. 376 * Retrieves the data associated with the given IPC server.
358 * 377 * @param svr The given IPC server.
359 * FIXME: To be fixed. 378 * @return The associated data.
360 */ 379 */
361void * 380void *
362ecore_ipc_server_data_get(Ecore_Ipc_Server *svr) 381ecore_ipc_server_data_get(Ecore_Ipc_Server *svr)
@@ -371,9 +390,9 @@ ecore_ipc_server_data_get(Ecore_Ipc_Server *svr)
371} 390}
372 391
373/** 392/**
374 * To be documented. 393 * Retrieves whether the given IPC server is currently connected.
375 * 394 * @param svr The given IPC server.
376 * FIXME: To be fixed. 395 * @return @c 1 if the server is connected. @c 0 otherwise.
377 */ 396 */
378int 397int
379ecore_ipc_server_connected_get(Ecore_Ipc_Server *svr) 398ecore_ipc_server_connected_get(Ecore_Ipc_Server *svr)
@@ -420,9 +439,17 @@ ecore_ipc_server_connected_get(Ecore_Ipc_Server *svr)
420 } 439 }
421 440
422/** 441/**
423 * To be documented. 442 * Sends a message to the given IPC server.
424 * 443 * @param svr The given IPC server.
425 * FIXME: To be fixed. 444 * @param major Major opcode of the message.
445 * @param minor Minor opcode of the message.
446 * @param ref Message reference number.
447 * @param ref_to
448 * @param response
449 * @param data The data to send as part of the message.
450 * @param size Length of the data, in bytes, to send.
451 * @return Number of bytes sent. @c 0 is returned if there is an error.
452 * @todo This function needs to become an IPC message.
426 */ 453 */
427int 454int
428ecore_ipc_server_send(Ecore_Ipc_Server *svr, int major, int minor, int ref, int ref_to, int response, void *data, int size) 455ecore_ipc_server_send(Ecore_Ipc_Server *svr, int major, int minor, int ref, int ref_to, int response, void *data, int size)
@@ -499,9 +526,18 @@ ecore_ipc_server_send(Ecore_Ipc_Server *svr, int major, int minor, int ref, int
499 } 526 }
500 527
501/** 528/**
502 * To be documented. 529 * Sends a message to the given IPC client.
503 * 530 * @param cl The given IPC client.
504 * FIXME: To be fixed. 531 * @param major Major opcode of the message.
532 * @param minor Minor opcode of the message.
533 * @param ref Reference number of the message.
534 * @param ref_to
535 * @param response
536 * @param data The data to send as part of the message.
537 * @param size Length of the data, in bytes, to send.
538 * @return The number of bytes sent. @c 0 will be returned if there is
539 * an error.
540 * @todo This function needs to become an IPC message.
505 */ 541 */
506int 542int
507ecore_ipc_client_send(Ecore_Ipc_Client *cl, int major, int minor, int ref, int ref_to, int response, void *data, int size) 543ecore_ipc_client_send(Ecore_Ipc_Client *cl, int major, int minor, int ref, int ref_to, int response, void *data, int size)
@@ -546,9 +582,9 @@ ecore_ipc_client_send(Ecore_Ipc_Client *cl, int major, int minor, int ref, int r
546} 582}
547 583
548/** 584/**
549 * To be documented. 585 * Retrieves the IPC server that the given IPC client is connected to.
550 * 586 * @param cl The given IPC client.
551 * FIXME: To be fixed. 587 * @return The IPC server the IPC client is connected to.
552 */ 588 */
553Ecore_Ipc_Server * 589Ecore_Ipc_Server *
554ecore_ipc_client_server_get(Ecore_Ipc_Client *cl) 590ecore_ipc_client_server_get(Ecore_Ipc_Client *cl)
@@ -563,9 +599,10 @@ ecore_ipc_client_server_get(Ecore_Ipc_Client *cl)
563} 599}
564 600
565/** 601/**
566 * To be documented. 602 * Closes the connection and frees memory allocated to the given IPC
567 * 603 * client.
568 * FIXME: To be fixed. 604 * @param cl The given client.
605 * @return Data associated with the client.
569 */ 606 */
570void * 607void *
571ecore_ipc_client_del(Ecore_Ipc_Client *cl) 608ecore_ipc_client_del(Ecore_Ipc_Client *cl)
@@ -590,9 +627,9 @@ ecore_ipc_client_del(Ecore_Ipc_Client *cl)
590} 627}
591 628
592/** 629/**
593 * To be documented. 630 * Sets the IPC data associated with the given IPC client to @p data.
594 * 631 * @param cl The given IPC client.
595 * FIXME: To be fixed. 632 * @param data The data to associate with the IPC client.
596 */ 633 */
597void 634void
598ecore_ipc_client_data_set(Ecore_Ipc_Client *cl, const void *data) 635ecore_ipc_client_data_set(Ecore_Ipc_Client *cl, const void *data)
@@ -607,9 +644,9 @@ ecore_ipc_client_data_set(Ecore_Ipc_Client *cl, const void *data)
607} 644}
608 645
609/** 646/**
610 * To be documented. 647 * Retrieves the data that has been associated with the given IPC client.
611 * 648 * @param cl The given client.
612 * FIXME: To be fixed. 649 * @return The data associated with the IPC client.
613 */ 650 */
614void * 651void *
615ecore_ipc_client_data_get(Ecore_Ipc_Client *cl) 652ecore_ipc_client_data_get(Ecore_Ipc_Client *cl)