* If the eet file handle is not valid nothing will be done.
*
* @since 1.0.0
- *
+ *
* @see eet_clearcache()
*/
EAPI Eet_Error
/**
* @ingroup Eet_Cipher_Group
- * @brief Close and release all resource used by an Eet_Key.
+ * @brief Close and release all resource used by an Eet_Key.
* A reference counter prevent it from being freed until all file
* using it are also closed.
*
/**
* @typedef Eet_Data_Descriptor_Class
- *
- * Callback protoype for Eet_Dump
+ *
+ * Callback protoype for Eet_Dump
*
* @param data To passe to the callback
- * @param str The string to dump
+ * @param str The string to dump
*
*/
typedef void (*Eet_Dump_Callback)(void *data, const char *str);
const void *user_data)
{
Eet_Connection *conn;
-
+
if ((!eet_read_cb) || (!eet_write_cb)) return NULL;
-
+
conn = calloc(1, sizeof (Eet_Connection));
if (!conn) return NULL;
conn->eet_read_cb = eet_read_cb;
do
{
size_t copy_size;
-
+
if (conn->size == 0)
{
const int *msg;
size_t packet_size;
-
+
if (size < (sizeof(int) * 2)) break;
msg = data;
/* Not a partial receive, go the quick way. */
if (!conn->eet_read_cb(data, packet_size, conn->user_data))
break;
-
+
data = (void *)((char *)data + packet_size);
size -= packet_size;
conn->received = 0;
if (conn->allocated < conn->size)
{
void *tmp;
-
+
tmp = realloc(conn->buffer, conn->size);
if (!tmp) break;
conn->buffer = tmp;
(conn->size - conn->received >=
size) ? size : conn->size - conn->received;
memcpy((char *)conn->buffer + conn->received, data, copy_size);
-
+
conn->received += copy_size;
data = (void *)((char *)data + copy_size);
size -= copy_size;
-
+
if (conn->received == conn->size)
{
size_t data_size;
-
+
data_size = conn->size;
conn->size = 0;
conn->received = 0;
}
}
while (size > 0);
-
+
return size;
}
int *size_ret);
static int
-eet_data_get_value(const Eet_Dictionary *ed,
- const void *src,
+eet_data_get_value(const Eet_Dictionary *ed,
+ const void *src,
const void *src_end,
void *dst);
}
static int
-eet_data_get_value(const Eet_Dictionary *ed,
- const void *src,
+eet_data_get_value(const Eet_Dictionary *ed,
+ const void *src,
const void *src_end,
- void *dst)
+ void *dst)
{
const Eina_Value_Type *eina_type;
void *tmp;
}
static void *
-eet_data_put_value(Eet_Dictionary *ed,
- const void *src,
- int *size_ret)
+eet_data_put_value(Eet_Dictionary *ed,
+ const void *src,
+ int *size_ret)
{
const Eina_Value *value = *(Eina_Value **)src;
const Eina_Value_Type *value_type;
ede->counter_name = counter_name;
if (subtype)
- INF("Adding '%s' of size %i to '%s' at offset %i.",
+ INF("Adding '%s' of size %i to '%s' at offset %i.",
subtype->name, subtype->size,
edd->name, offset);
eet_data_read_cipher_buffer(Eet_File *ef,
Eet_Data_Descriptor *edd,
const char *name,
- const char *cipher_key,
+ const char *cipher_key,
char* buffer,
int buffer_size)
{
memcpy(data, data_ret, subtype->size);
free(data_ret);
}
- else
+ else
{
ptr = data;
*ptr = (void *)data_ret;
if (ef->mode == EET_FILE_MODE_READ)
eet_cache_add(ef, &eet_readers, &eet_readers_num, &eet_readers_alloc);
-
+
done:
UNLOCK_CACHE;
return ef;
*
* @param syspath The /sys/ path with or without the /sys/
* @return A integer with the sysnum or -1 on failure
- *
+ *
* @since 1.12
*/
EAPI int eeze_udev_syspath_get_sysnum(const char *syspath);
_mountinfo = open("/proc/self/mountinfo", O_RDONLY, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
if (_mountinfo < 0) goto error;
if (fcntl(_mountinfo, F_SETFL, O_NONBLOCK) < 0) goto error;
-
+
_mountinfo_fdh = ecore_main_fd_handler_file_add(_mountinfo, ECORE_FD_ERROR, _eeze_mount_fdh, NULL, NULL, NULL);
if (!_mountinfo_fdh) goto error;
_fstab_mon = ecore_file_monitor_add("/etc/fstab", _eeze_mount_tab_watcher, NULL);
return ret;
}
-EAPI int
+EAPI int
eeze_udev_syspath_get_sysnum(const char *syspath)
{
_udev_device *device;