summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2007-01-24 15:19:19 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2007-01-24 15:19:19 +0000
commitab5967b2b95955accb3aad59f65e1eae6c6bd7ef (patch)
tree8a4e29a8478c5f177740f0e57830318e8cd94b9a
parent138df419579f4a02b63f1055a436bc721b02ca2f (diff)
s/internal/external/ with respect to services
-rw-r--r--hcid/dbus-database.c2
-rw-r--r--hcid/dbus-service.c22
-rw-r--r--hcid/dbus-service.h2
3 files changed, 13 insertions, 13 deletions
diff --git a/hcid/dbus-database.c b/hcid/dbus-database.c
index 423d117b..fbd79c91 100644
--- a/hcid/dbus-database.c
+++ b/hcid/dbus-database.c
@@ -312,7 +312,7 @@ static DBusHandlerResult unregister_service(DBusConnection *conn,
if (!service)
return error_service_does_not_exist(conn, msg);
- if (!service->internal || strcmp(sender, service->bus_name))
+ if (!service->external || strcmp(sender, service->bus_name))
return error_not_authorized(conn, msg);
if (service_unregister(service) < 0)
diff --git a/hcid/dbus-service.c b/hcid/dbus-service.c
index e277e604..c6cc99f0 100644
--- a/hcid/dbus-service.c
+++ b/hcid/dbus-service.c
@@ -396,7 +396,7 @@ static DBusHandlerResult start(DBusConnection *conn,
{
struct service *service = data;
- if (service->internal || service->pid)
+ if (service->external || service->pid)
return error_failed(conn, msg, EALREADY);
if (service_start(service, conn) < 0)
@@ -412,7 +412,7 @@ static DBusHandlerResult stop(DBusConnection *conn,
{
struct service *service = data;
- if (service->internal || !service->bus_name)
+ if (service->external || !service->bus_name)
return error_failed(conn, msg, EPERM);
stop_service(service, FALSE);
@@ -433,7 +433,7 @@ static DBusHandlerResult is_running(DBusConnection *conn,
if (!reply)
return DBUS_HANDLER_RESULT_NEED_MEMORY;
- running = (service->internal || service->bus_name) ? TRUE : FALSE;
+ running = (service->external || service->bus_name) ? TRUE : FALSE;
dbus_message_append_args(reply,
DBUS_TYPE_BOOLEAN, &running,
@@ -720,7 +720,7 @@ static struct service *create_service(const char *file)
return NULL;
}
- service->internal = FALSE;
+ service->external = FALSE;
keyfile = g_key_file_new();
@@ -886,28 +886,28 @@ int init_services(const char *path)
return 0;
}
-static struct service *create_internal_service(const char *ident,
+static struct service *create_external_service(const char *ident,
const char *name, const char *description)
{
struct service *service;
service = g_try_new0(struct service, 1);
if (!service) {
- error("OOM while allocating new internal service");
+ error("OOM while allocating new external service");
return NULL;
}
- service->filename = g_strdup("internal.service");
+ service->filename = g_strdup("external.service");
service->name = g_strdup(name);
service->descr = g_strdup(description);
service->ident = g_strdup(ident);
- service->internal = TRUE;
+ service->external = TRUE;
return service;
}
-static void internal_service_exit(const char *name, struct service *service)
+static void external_service_exit(const char *name, struct service *service)
{
DBusConnection *conn = get_dbus_connection();
DBusMessage *signal;
@@ -943,7 +943,7 @@ int service_register(const char *bus_name, const char *ident,
if (!conn)
return -1;
- service = create_internal_service(ident, name, description);
+ service = create_external_service(ident, name, description);
if (!service)
return -1;
@@ -954,7 +954,7 @@ int service_register(const char *bus_name, const char *ident,
return -1;
}
- name_listener_add(conn, bus_name, (name_cb_t) internal_service_exit, service);
+ name_listener_add(conn, bus_name, (name_cb_t) external_service_exit, service);
msg = dbus_message_new_signal(service->object_path,
SERVICE_INTERFACE, "Started");
diff --git a/hcid/dbus-service.h b/hcid/dbus-service.h
index 68a53b2c..948537c6 100644
--- a/hcid/dbus-service.h
+++ b/hcid/dbus-service.h
@@ -46,7 +46,7 @@ struct service {
gboolean autostart;
/* Services without a *.service file */
- gboolean internal;
+ gboolean external;
GSList *trusted_devices;
};