summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2018-04-30 03:40:16 -0700
committerapache <apache@e5-web1.enlightenment.org>2018-04-30 03:40:16 -0700
commit0fe8bd499910050aaf4ab36599ca10a33d086f6f (patch)
treee2259ad95d6b558e0c57e5c5664f9436fc110bd5 /pages
parent70b850294e36c63107f7ec4cd647222e0e7cffe6 (diff)
Wiki page io.md changed with summary [Adapt to new efl_add / efl_add_ref API] by Xavi Artigas
Diffstat (limited to 'pages')
-rw-r--r--pages/develop/guides/c/core/io.md.txt20
1 files changed, 10 insertions, 10 deletions
diff --git a/pages/develop/guides/c/core/io.md.txt b/pages/develop/guides/c/core/io.md.txt
index ed23942b3..7304fcdce 100644
--- a/pages/develop/guides/c/core/io.md.txt
+++ b/pages/develop/guides/c/core/io.md.txt
@@ -105,11 +105,11 @@ Here's an example from the EFL examples repository: [reference/c/core/src/core_i
105 Eina_Slice content = EINA_SLICE_STR("### This is a sample string for the file io test ###"); 105 Eina_Slice content = EINA_SLICE_STR("### This is a sample string for the file io test ###");
106 Efl_Io_File *file; 106 Efl_Io_File *file;
107 107
108 file = efl_add(EFL_IO_FILE_CLASS, NULL, 108 file = efl_add_ref(EFL_IO_FILE_CLASS, NULL,
109 efl_file_set(efl_added, filename, NULL), 109 efl_file_set(efl_added, filename, NULL),
110 efl_io_file_flags_set(efl_added, O_WRONLY | O_CREAT), 110 efl_io_file_flags_set(efl_added, O_WRONLY | O_CREAT),
111 efl_io_file_mode_set(efl_added, 0644), 111 efl_io_file_mode_set(efl_added, 0644),
112 efl_io_closer_close_on_destructor_set(efl_added, EINA_TRUE)); 112 efl_io_closer_close_on_destructor_set(efl_added, EINA_TRUE));
113 113
114 if (efl_io_writer_write(file, &content, NULL) != EINA_ERROR_NO_ERROR) 114 if (efl_io_writer_write(file, &content, NULL) != EINA_ERROR_NO_ERROR)
115 fprintf(stderr, " Failed to write test file\n"); 115 fprintf(stderr, " Failed to write test file\n");
@@ -120,7 +120,7 @@ Here's an example from the EFL examples repository: [reference/c/core/src/core_i
120 free(string); 120 free(string);
121 } 121 }
122 122
123 efl_del(file); 123 efl_unref(file);
124``` 124```
125 125
126### ``Efl.Io.Queue`` ### 126### ``Efl.Io.Queue`` ###
@@ -148,15 +148,15 @@ The most representative methods of the ``Efl.Io.Queue`` are:
148Example: 148Example:
149```c 149```c
150Eo *send_queue; 150Eo *send_queue;
151send_queue = efl_add(EFL_IO_QUEUE_CLASS, NULL, 151send_queue = efl_add_ref(EFL_IO_QUEUE_CLASS, NULL,
152 efl_name_set(efl_added, "send_queue"), 152 efl_name_set(efl_added, "send_queue"),
153 efl_io_queue_limit_set(efl_added, buffer_limit)); 153 efl_io_queue_limit_set(efl_added, buffer_limit));
154efl_io_writer_write(send_queue, &slice, NULL); 154efl_io_writer_write(send_queue, &slice, NULL);
155efl_io_queue_eos_mark(send_queue); 155efl_io_queue_eos_mark(send_queue);
156[...] 156[...]
157efl_io_reader_read(send_queue, &slice); 157efl_io_reader_read(send_queue, &slice);
158efl_io_closer_close(send_queue); 158efl_io_closer_close(send_queue);
159efl_del(send_queue); 159efl_unref(send_queue);
160``` 160```
161 161
162More usage examples can be found in the EFL examples repository: [reference/c/net/src/net_io.c](https://git.enlightenment.org/tools/examples.git/tree/reference/c/net/src/net_io.c) 162More usage examples can be found in the EFL examples repository: [reference/c/net/src/net_io.c](https://git.enlightenment.org/tools/examples.git/tree/reference/c/net/src/net_io.c)