parent
df0ea7a123
commit
6aa85b1cf9
|
@ -423,8 +423,8 @@ _generated_cb(struct _Ethumbd *ed, Eina_Bool success, const char *thumb_path, co
|
|||
DBG("thumbnail ready at: \"%s:%s\"\n", thumb_path, thumb_key);
|
||||
|
||||
if (ed->queue.table[i].used)
|
||||
_ethumb_dbus_generated_signal(ed, &ed->processing->id, thumb_path,
|
||||
thumb_key, success);
|
||||
_ethumb_dbus_generated_signal
|
||||
(ed, &ed->processing->id, thumb_path, thumb_key, success);
|
||||
eina_stringshare_del(ed->processing->file);
|
||||
eina_stringshare_del(ed->processing->key);
|
||||
eina_stringshare_del(ed->processing->thumb);
|
||||
|
@ -584,9 +584,9 @@ _process_setup(struct _Ethumbd *ed)
|
|||
static void
|
||||
_process_file(struct _Ethumbd *ed)
|
||||
{
|
||||
_ethumbd_child_write_op_generate(ed, ed->queue.current, ed->processing->file,
|
||||
ed->processing->key, ed->processing->thumb,
|
||||
ed->processing->thumb_key);
|
||||
_ethumbd_child_write_op_generate
|
||||
(ed, ed->queue.current, ed->processing->file,
|
||||
ed->processing->key, ed->processing->thumb, ed->processing->thumb_key);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -825,8 +825,8 @@ _name_owner_changed_cb(void *data, DBusMessage *msg)
|
|||
static void
|
||||
_ethumb_dbus_add_name_owner_changed_cb(struct _Ethumbd *ed)
|
||||
{
|
||||
ed->name_owner_changed_handler = e_dbus_signal_handler_add(
|
||||
ed->conn, fdo_bus_name, fdo_path, fdo_interface, "NameOwnerChanged",
|
||||
ed->name_owner_changed_handler = e_dbus_signal_handler_add
|
||||
(ed->conn, fdo_bus_name, fdo_path, fdo_interface, "NameOwnerChanged",
|
||||
_name_owner_changed_cb, ed);
|
||||
}
|
||||
|
||||
|
@ -882,7 +882,7 @@ end_new:
|
|||
static struct _Ethumb_DBus_Method_Table _ethumb_dbus_methods[] =
|
||||
{
|
||||
{"new", "", "o", _ethumb_dbus_ethumb_new_cb},
|
||||
{ }
|
||||
{NULL, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
static const char *
|
||||
|
@ -918,8 +918,8 @@ _ethumb_dbus_append_bytearray(DBusMessageIter *iter, const char *string)
|
|||
string = "";
|
||||
|
||||
dbus_message_iter_open_container(iter, DBUS_TYPE_ARRAY, "y", &viter);
|
||||
dbus_message_iter_append_fixed_array(&viter, DBUS_TYPE_BYTE, &string,
|
||||
strlen(string) + 1);
|
||||
dbus_message_iter_append_fixed_array
|
||||
(&viter, DBUS_TYPE_BYTE, &string, strlen(string) + 1);
|
||||
dbus_message_iter_close_container(iter, &viter);
|
||||
}
|
||||
|
||||
|
@ -1101,7 +1101,7 @@ _ethumb_dbus_delete_cb(E_DBus_Object *object, DBusMessage *msg)
|
|||
}
|
||||
|
||||
static int
|
||||
_ethumb_dbus_fdo_set(struct _Ethumb_Object *eobject, DBusMessageIter *iter, struct _Ethumb_Request *request)
|
||||
_ethumb_dbus_fdo_set(struct _Ethumb_Object *eobject __UNUSED__, DBusMessageIter *iter, struct _Ethumb_Request *request __UNUSED__)
|
||||
{
|
||||
int type;
|
||||
dbus_int32_t fdo;
|
||||
|
@ -1120,7 +1120,7 @@ _ethumb_dbus_fdo_set(struct _Ethumb_Object *eobject, DBusMessageIter *iter, stru
|
|||
}
|
||||
|
||||
static int
|
||||
_ethumb_dbus_size_set(struct _Ethumb_Object *eobject, DBusMessageIter *iter, struct _Ethumb_Request *request)
|
||||
_ethumb_dbus_size_set(struct _Ethumb_Object *eobject __UNUSED__, DBusMessageIter *iter, struct _Ethumb_Request *request)
|
||||
{
|
||||
DBusMessageIter oiter;
|
||||
int type;
|
||||
|
@ -1146,7 +1146,7 @@ _ethumb_dbus_size_set(struct _Ethumb_Object *eobject, DBusMessageIter *iter, str
|
|||
}
|
||||
|
||||
static int
|
||||
_ethumb_dbus_format_set(struct _Ethumb_Object *eobject, DBusMessageIter *iter, struct _Ethumb_Request *request)
|
||||
_ethumb_dbus_format_set(struct _Ethumb_Object *eobject __UNUSED__, DBusMessageIter *iter, struct _Ethumb_Request *request)
|
||||
{
|
||||
int type;
|
||||
dbus_int32_t format;
|
||||
|
@ -1167,7 +1167,7 @@ _ethumb_dbus_format_set(struct _Ethumb_Object *eobject, DBusMessageIter *iter, s
|
|||
}
|
||||
|
||||
static int
|
||||
_ethumb_dbus_aspect_set(struct _Ethumb_Object *eobject, DBusMessageIter *iter, struct _Ethumb_Request *request)
|
||||
_ethumb_dbus_aspect_set(struct _Ethumb_Object *eobject __UNUSED__, DBusMessageIter *iter, struct _Ethumb_Request *request)
|
||||
{
|
||||
int type;
|
||||
dbus_int32_t aspect;
|
||||
|
@ -1188,7 +1188,7 @@ _ethumb_dbus_aspect_set(struct _Ethumb_Object *eobject, DBusMessageIter *iter, s
|
|||
}
|
||||
|
||||
static int
|
||||
_ethumb_dbus_crop_set(struct _Ethumb_Object *eobject, DBusMessageIter *iter, struct _Ethumb_Request *request)
|
||||
_ethumb_dbus_crop_set(struct _Ethumb_Object *eobject __UNUSED__, DBusMessageIter *iter, struct _Ethumb_Request *request)
|
||||
{
|
||||
DBusMessageIter oiter;
|
||||
int type;
|
||||
|
@ -1214,7 +1214,7 @@ _ethumb_dbus_crop_set(struct _Ethumb_Object *eobject, DBusMessageIter *iter, str
|
|||
}
|
||||
|
||||
static int
|
||||
_ethumb_dbus_quality_set(struct _Ethumb_Object *eobject, DBusMessageIter *iter, struct _Ethumb_Request *request)
|
||||
_ethumb_dbus_quality_set(struct _Ethumb_Object *eobject __UNUSED__, DBusMessageIter *iter, struct _Ethumb_Request *request)
|
||||
{
|
||||
int type;
|
||||
dbus_int32_t quality;
|
||||
|
@ -1236,7 +1236,7 @@ _ethumb_dbus_quality_set(struct _Ethumb_Object *eobject, DBusMessageIter *iter,
|
|||
|
||||
|
||||
static int
|
||||
_ethumb_dbus_compress_set(struct _Ethumb_Object *eobject, DBusMessageIter *iter, struct _Ethumb_Request *request)
|
||||
_ethumb_dbus_compress_set(struct _Ethumb_Object *eobject __UNUSED__, DBusMessageIter *iter, struct _Ethumb_Request *request)
|
||||
{
|
||||
int type;
|
||||
dbus_int32_t compress;
|
||||
|
@ -1257,7 +1257,7 @@ _ethumb_dbus_compress_set(struct _Ethumb_Object *eobject, DBusMessageIter *iter,
|
|||
}
|
||||
|
||||
static int
|
||||
_ethumb_dbus_frame_set(struct _Ethumb_Object *eobject, DBusMessageIter *iter, struct _Ethumb_Request *request)
|
||||
_ethumb_dbus_frame_set(struct _Ethumb_Object *eobject __UNUSED__, DBusMessageIter *iter, struct _Ethumb_Request *request)
|
||||
{
|
||||
DBusMessageIter oiter;
|
||||
int type;
|
||||
|
@ -1286,7 +1286,7 @@ _ethumb_dbus_frame_set(struct _Ethumb_Object *eobject, DBusMessageIter *iter, st
|
|||
}
|
||||
|
||||
static int
|
||||
_ethumb_dbus_directory_set(struct _Ethumb_Object *eobject, DBusMessageIter *iter, struct _Ethumb_Request *request)
|
||||
_ethumb_dbus_directory_set(struct _Ethumb_Object *eobject __UNUSED__, DBusMessageIter *iter, struct _Ethumb_Request *request)
|
||||
{
|
||||
int type;
|
||||
const char *directory;
|
||||
|
@ -1307,7 +1307,7 @@ _ethumb_dbus_directory_set(struct _Ethumb_Object *eobject, DBusMessageIter *iter
|
|||
}
|
||||
|
||||
static int
|
||||
_ethumb_dbus_category_set(struct _Ethumb_Object *eobject, DBusMessageIter *iter, struct _Ethumb_Request *request)
|
||||
_ethumb_dbus_category_set(struct _Ethumb_Object *eobject __UNUSED__, DBusMessageIter *iter, struct _Ethumb_Request *request)
|
||||
{
|
||||
int type;
|
||||
const char *category;
|
||||
|
@ -1328,7 +1328,7 @@ _ethumb_dbus_category_set(struct _Ethumb_Object *eobject, DBusMessageIter *iter,
|
|||
}
|
||||
|
||||
static int
|
||||
_ethumb_dbus_video_time_set(struct _Ethumb_Object *eobject, DBusMessageIter *iter, struct _Ethumb_Request *request)
|
||||
_ethumb_dbus_video_time_set(struct _Ethumb_Object *eobject __UNUSED__, DBusMessageIter *iter, struct _Ethumb_Request *request)
|
||||
{
|
||||
int type;
|
||||
double video_time;
|
||||
|
@ -1349,7 +1349,7 @@ _ethumb_dbus_video_time_set(struct _Ethumb_Object *eobject, DBusMessageIter *ite
|
|||
}
|
||||
|
||||
static int
|
||||
_ethumb_dbus_video_start_set(struct _Ethumb_Object *eobject, DBusMessageIter *iter, struct _Ethumb_Request *request)
|
||||
_ethumb_dbus_video_start_set(struct _Ethumb_Object *eobject __UNUSED__, DBusMessageIter *iter, struct _Ethumb_Request *request)
|
||||
{
|
||||
int type;
|
||||
double video_start;
|
||||
|
@ -1370,7 +1370,7 @@ _ethumb_dbus_video_start_set(struct _Ethumb_Object *eobject, DBusMessageIter *it
|
|||
}
|
||||
|
||||
static int
|
||||
_ethumb_dbus_video_interval_set(struct _Ethumb_Object *eobject, DBusMessageIter *iter, struct _Ethumb_Request *request)
|
||||
_ethumb_dbus_video_interval_set(struct _Ethumb_Object *eobject __UNUSED__, DBusMessageIter *iter, struct _Ethumb_Request *request)
|
||||
{
|
||||
int type;
|
||||
double video_interval;
|
||||
|
@ -1391,7 +1391,7 @@ _ethumb_dbus_video_interval_set(struct _Ethumb_Object *eobject, DBusMessageIter
|
|||
}
|
||||
|
||||
static int
|
||||
_ethumb_dbus_video_ntimes_set(struct _Ethumb_Object *eobject, DBusMessageIter *iter, struct _Ethumb_Request *request)
|
||||
_ethumb_dbus_video_ntimes_set(struct _Ethumb_Object *eobject __UNUSED__, DBusMessageIter *iter, struct _Ethumb_Request *request)
|
||||
{
|
||||
int type;
|
||||
int video_ntimes;
|
||||
|
@ -1412,7 +1412,7 @@ _ethumb_dbus_video_ntimes_set(struct _Ethumb_Object *eobject, DBusMessageIter *i
|
|||
}
|
||||
|
||||
static int
|
||||
_ethumb_dbus_video_fps_set(struct _Ethumb_Object *eobject, DBusMessageIter *iter, struct _Ethumb_Request *request)
|
||||
_ethumb_dbus_video_fps_set(struct _Ethumb_Object *eobject __UNUSED__, DBusMessageIter *iter, struct _Ethumb_Request *request)
|
||||
{
|
||||
int type;
|
||||
int video_fps;
|
||||
|
@ -1433,7 +1433,7 @@ _ethumb_dbus_video_fps_set(struct _Ethumb_Object *eobject, DBusMessageIter *iter
|
|||
}
|
||||
|
||||
static int
|
||||
_ethumb_dbus_document_page_set(struct _Ethumb_Object *eobject, DBusMessageIter *iter, struct _Ethumb_Request *request)
|
||||
_ethumb_dbus_document_page_set(struct _Ethumb_Object *eobject __UNUSED__, DBusMessageIter *iter, struct _Ethumb_Request *request)
|
||||
{
|
||||
int type;
|
||||
dbus_int32_t document_page;
|
||||
|
@ -1576,8 +1576,8 @@ _ethumb_dbus_generated_signal(struct _Ethumbd *ed, int *id, const char *thumb_pa
|
|||
|
||||
current = ed->queue.current;
|
||||
opath = ed->queue.table[current].path;
|
||||
signal = dbus_message_new_signal(opath, _ethumb_dbus_objects_interface,
|
||||
"generated");
|
||||
signal = dbus_message_new_signal
|
||||
(opath, _ethumb_dbus_objects_interface, "generated");
|
||||
|
||||
dbus_message_iter_init_append(signal, &iter);
|
||||
dbus_message_iter_append_basic(&iter, DBUS_TYPE_INT32, &id32);
|
||||
|
@ -1589,20 +1589,18 @@ _ethumb_dbus_generated_signal(struct _Ethumbd *ed, int *id, const char *thumb_pa
|
|||
dbus_message_unref(signal);
|
||||
}
|
||||
|
||||
static struct _Ethumb_DBus_Method_Table _ethumb_dbus_objects_methods[] =
|
||||
{
|
||||
static struct _Ethumb_DBus_Method_Table _ethumb_dbus_objects_methods[] = {
|
||||
{"queue_add", "iayayayay", "i", _ethumb_dbus_queue_add_cb},
|
||||
{"queue_remove", "i", "b", _ethumb_dbus_queue_remove_cb},
|
||||
{"clear_queue", "", "", _ethumb_dbus_queue_clear_cb},
|
||||
{"ethumb_setup", "a{sv}", "b", _ethumb_dbus_ethumb_setup_cb},
|
||||
{"delete", "", "", _ethumb_dbus_delete_cb},
|
||||
{ }
|
||||
{NULL, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
static struct _Ethumb_DBus_Signal_Table _ethumb_dbus_objects_signals[] =
|
||||
{
|
||||
static struct _Ethumb_DBus_Signal_Table _ethumb_dbus_objects_signals[] = {
|
||||
{"generated", "xayayb"},
|
||||
{ }
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
static int
|
||||
|
@ -1627,7 +1625,7 @@ _ethumb_dbus_interface_elements_add(E_DBus_Interface *iface, struct _Ethumb_DBus
|
|||
}
|
||||
|
||||
static void
|
||||
_ethumb_dbus_request_name_cb(void *data, DBusMessage *msg, DBusError *err)
|
||||
_ethumb_dbus_request_name_cb(void *data, DBusMessage *msg __UNUSED__, DBusError *err)
|
||||
{
|
||||
E_DBus_Object *dbus_object;
|
||||
struct _Ethumbd *ed = data;
|
||||
|
@ -1686,9 +1684,8 @@ _ethumb_dbus_request_name_cb(void *data, DBusMessage *msg, DBusError *err)
|
|||
static int
|
||||
_ethumb_dbus_setup(struct _Ethumbd *ed)
|
||||
{
|
||||
|
||||
e_dbus_request_name(ed->conn, _ethumb_dbus_bus_name, 0,
|
||||
_ethumb_dbus_request_name_cb, ed);
|
||||
e_dbus_request_name
|
||||
(ed->conn, _ethumb_dbus_bus_name, 0, _ethumb_dbus_request_name_cb, ed);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -1745,8 +1742,8 @@ _ethumbd_spawn(struct _Ethumbd *ed)
|
|||
close(pchild[1]);
|
||||
ed->pipeout = pparent[1];
|
||||
ed->pipein = pchild[0];
|
||||
ed->fd_handler = ecore_main_fd_handler_add(
|
||||
ed->pipein, ECORE_FD_READ | ECORE_FD_ERROR,
|
||||
ed->fd_handler = ecore_main_fd_handler_add
|
||||
(ed->pipein, ECORE_FD_READ | ECORE_FD_ERROR,
|
||||
_ethumbd_fd_handler, ed, NULL, NULL);
|
||||
return 1;
|
||||
}
|
||||
|
@ -1758,10 +1755,11 @@ main(int argc, char *argv[])
|
|||
Eina_Bool quit_option = 0;
|
||||
int exit_value = 0;
|
||||
int arg_index;
|
||||
struct _Ethumbd ed = {0};
|
||||
struct _Ethumbd ed;
|
||||
int child;
|
||||
double timeout = -1;
|
||||
|
||||
memset(&ed, 0, sizeof(ed));
|
||||
ecore_init();
|
||||
eina_stringshare_init();
|
||||
|
||||
|
|
Loading…
Reference in New Issue