sl@0: /* -*- mode: C; c-file-style: "gnu" -*- */ sl@0: /* dbus-server.h DBusServer object sl@0: * sl@0: * Copyright (C) 2002, 2003 Red Hat Inc. sl@0: * Portion Copyright © 2008 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. sl@0: * Licensed under the Academic Free License version 2.1 sl@0: * sl@0: * This program is free software; you can redistribute it and/or modify sl@0: * it under the terms of the GNU General Public License as published by sl@0: * the Free Software Foundation; either version 2 of the License, or sl@0: * (at your option) any later version. sl@0: * sl@0: * This program is distributed in the hope that it will be useful, sl@0: * but WITHOUT ANY WARRANTY; without even the implied warranty of sl@0: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the sl@0: * GNU General Public License for more details. sl@0: * sl@0: * You should have received a copy of the GNU General Public License sl@0: * along with this program; if not, write to the Free Software sl@0: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA sl@0: * sl@0: */ sl@0: #if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) sl@0: #error "Only can be included directly, this file may disappear or change contents." sl@0: #endif sl@0: sl@0: #ifndef DBUS_SERVER_H sl@0: #define DBUS_SERVER_H sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: DBUS_BEGIN_DECLS sl@0: sl@0: /** sl@0: * @addtogroup DBusServer sl@0: * @{ sl@0: */ sl@0: sl@0: typedef struct DBusServer DBusServer; sl@0: sl@0: /** Called when a new connection to the server is available. Must reference and save the new sl@0: * connection, or close the new connection. Set with dbus_server_set_new_connection_function(). sl@0: */ sl@0: typedef void (* DBusNewConnectionFunction) (DBusServer *server, sl@0: DBusConnection *new_connection, sl@0: void *data); sl@0: sl@0: #ifdef __SYMBIAN32__ sl@0: IMPORT_C sl@0: #endif sl@0: DBusServer* dbus_server_listen (const char *address, sl@0: DBusError *error); sl@0: #ifdef __SYMBIAN32__ sl@0: IMPORT_C sl@0: #endif sl@0: DBusServer* dbus_server_ref (DBusServer *server); sl@0: #ifdef __SYMBIAN32__ sl@0: IMPORT_C sl@0: #endif sl@0: void dbus_server_unref (DBusServer *server); sl@0: #ifdef __SYMBIAN32__ sl@0: IMPORT_C sl@0: #endif sl@0: void dbus_server_disconnect (DBusServer *server); sl@0: #ifdef __SYMBIAN32__ sl@0: IMPORT_C sl@0: #endif sl@0: dbus_bool_t dbus_server_get_is_connected (DBusServer *server); sl@0: #ifdef __SYMBIAN32__ sl@0: IMPORT_C sl@0: #endif sl@0: char* dbus_server_get_address (DBusServer *server); sl@0: #ifdef __SYMBIAN32__ sl@0: IMPORT_C sl@0: #endif sl@0: void dbus_server_set_new_connection_function (DBusServer *server, sl@0: DBusNewConnectionFunction function, sl@0: void *data, sl@0: DBusFreeFunction free_data_function); sl@0: #ifdef __SYMBIAN32__ sl@0: IMPORT_C sl@0: #endif sl@0: dbus_bool_t dbus_server_set_watch_functions (DBusServer *server, sl@0: DBusAddWatchFunction add_function, sl@0: DBusRemoveWatchFunction remove_function, sl@0: DBusWatchToggledFunction toggled_function, sl@0: void *data, sl@0: DBusFreeFunction free_data_function); sl@0: #ifdef __SYMBIAN32__ sl@0: IMPORT_C sl@0: #endif sl@0: dbus_bool_t dbus_server_set_timeout_functions (DBusServer *server, sl@0: DBusAddTimeoutFunction add_function, sl@0: DBusRemoveTimeoutFunction remove_function, sl@0: DBusTimeoutToggledFunction toggled_function, sl@0: void *data, sl@0: DBusFreeFunction free_data_function); sl@0: #ifdef __SYMBIAN32__ sl@0: IMPORT_C sl@0: #endif sl@0: dbus_bool_t dbus_server_set_auth_mechanisms (DBusServer *server, sl@0: const char **mechanisms); sl@0: sl@0: #ifdef __SYMBIAN32__ sl@0: IMPORT_C sl@0: #endif sl@0: dbus_bool_t dbus_server_allocate_data_slot (dbus_int32_t *slot_p); sl@0: #ifdef __SYMBIAN32__ sl@0: IMPORT_C sl@0: #endif sl@0: void dbus_server_free_data_slot (dbus_int32_t *slot_p); sl@0: #ifdef __SYMBIAN32__ sl@0: IMPORT_C sl@0: #endif sl@0: dbus_bool_t dbus_server_set_data (DBusServer *server, sl@0: int slot, sl@0: void *data, sl@0: DBusFreeFunction free_data_func); sl@0: #ifdef __SYMBIAN32__ sl@0: IMPORT_C sl@0: #endif sl@0: void* dbus_server_get_data (DBusServer *server, sl@0: int slot); sl@0: sl@0: /** @} */ sl@0: sl@0: DBUS_END_DECLS sl@0: sl@0: #endif /* DBUS_SERVER_H */