Main Page   Modules   Data Structures   File List   Data Fields   Related Pages  

services.h

00001 /* -*- mode: C; c-file-style: "gnu" -*- */
00002 /* services.h  Service management
00003  *
00004  * Copyright (C) 2003  Red Hat, Inc.
00005  *
00006  * Licensed under the Academic Free License version 1.2
00007  * 
00008  * This program is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2 of the License, or
00011  * (at your option) any later version.
00012  *
00013  * This program is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  * 
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program; if not, write to the Free Software
00020  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021  *
00022  */
00023 
00024 #ifndef BUS_SERVICES_H
00025 #define BUS_SERVICES_H
00026 
00027 #include <dbus/dbus.h>
00028 #include <dbus/dbus-string.h>
00029 #include "connection.h"
00030 #include "bus.h"
00031 
00032 typedef void (* BusServiceForeachFunction) (BusService       *service,
00033                                             void             *data);
00034 
00035 BusRegistry* bus_registry_new             (BusContext                  *context);
00036 void         bus_registry_ref             (BusRegistry                 *registry);
00037 void         bus_registry_unref           (BusRegistry                 *registry);
00038 BusService*  bus_registry_lookup          (BusRegistry                 *registry,
00039                                            const DBusString            *service_name);
00040 BusService*  bus_registry_ensure          (BusRegistry                 *registry,
00041                                            const DBusString            *service_name,
00042                                            DBusConnection              *owner_if_created,
00043                                            BusTransaction              *transaction,
00044                                            DBusError                   *error);
00045 void         bus_registry_foreach         (BusRegistry                 *registry,
00046                                            BusServiceForeachFunction    function,
00047                                            void                        *data);
00048 dbus_bool_t  bus_registry_list_services   (BusRegistry                 *registry,
00049                                            char                      ***listp,
00050                                            int                         *array_len);
00051 dbus_bool_t  bus_registry_acquire_service (BusRegistry                 *registry,
00052                                            DBusConnection              *connection,
00053                                            const DBusString            *service_name,
00054                                            dbus_uint32_t                flags,
00055                                            dbus_uint32_t               *result,
00056                                            BusTransaction              *transaction,
00057                                            DBusError                   *error);
00058 
00059 void            bus_service_ref                      (BusService     *service);
00060 void            bus_service_unref                    (BusService     *service);
00061 dbus_bool_t     bus_service_add_owner                (BusService     *service,
00062                                                       DBusConnection *owner,
00063                                                       BusTransaction *transaction,
00064                                                       DBusError      *error);
00065 dbus_bool_t     bus_service_remove_owner             (BusService     *service,
00066                                                       DBusConnection *owner,
00067                                                       BusTransaction *transaction,
00068                                                       DBusError      *error);
00069 dbus_bool_t     bus_service_has_owner                (BusService     *service,
00070                                                       DBusConnection *owner);
00071 DBusConnection* bus_service_get_primary_owner        (BusService     *service);
00072 void            bus_service_set_prohibit_replacement (BusService     *service,
00073                                                       dbus_bool_t     prohibit_replacement);
00074 dbus_bool_t     bus_service_get_prohibit_replacement (BusService     *service);
00075 const char*     bus_service_get_name                 (BusService     *service);
00076 
00077 
00078 #endif /* BUS_SERVICES_H */

Generated on Wed Oct 22 14:05:06 2003 for D-BUS by doxygen1.3-rc3