epoc32/include/stdapis/dbus-1.0/dbus/dbus-server.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     1 /* -*- mode: C; c-file-style: "gnu" -*- */
     2 /* dbus-server.h DBusServer object
     3  *
     4  * Copyright (C) 2002, 2003  Red Hat Inc.
     5  * Portion Copyright © 2008 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
     6  * Licensed under the Academic Free License version 2.1
     7  * 
     8  * This program is free software; you can redistribute it and/or modify
     9  * it under the terms of the GNU General Public License as published by
    10  * the Free Software Foundation; either version 2 of the License, or
    11  * (at your option) any later version.
    12  *
    13  * This program is distributed in the hope that it will be useful,
    14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16  * GNU General Public License for more details.
    17  * 
    18  * You should have received a copy of the GNU General Public License
    19  * along with this program; if not, write to the Free Software
    20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    21  *
    22  */
    23 #if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION)
    24 #error "Only <dbus/dbus.h> can be included directly, this file may disappear or change contents."
    25 #endif
    26 
    27 #ifndef DBUS_SERVER_H
    28 #define DBUS_SERVER_H
    29 
    30 #include <dbus/dbus-errors.h>
    31 #include <dbus/dbus-message.h>
    32 #include <dbus/dbus-connection.h>
    33 #include <dbus/dbus-protocol.h>
    34 
    35 DBUS_BEGIN_DECLS
    36 
    37 /**
    38  * @addtogroup DBusServer
    39  * @{
    40  */
    41 
    42 typedef struct DBusServer DBusServer;
    43 
    44 /** Called when a new connection to the server is available. Must reference and save the new
    45  * connection, or close the new connection. Set with dbus_server_set_new_connection_function().
    46  */
    47 typedef void (* DBusNewConnectionFunction) (DBusServer     *server,
    48                                             DBusConnection *new_connection,
    49                                             void           *data);
    50 
    51 #ifdef __SYMBIAN32__
    52 IMPORT_C
    53 #endif
    54 DBusServer* dbus_server_listen           (const char     *address,
    55                                           DBusError      *error);
    56 #ifdef __SYMBIAN32__
    57 IMPORT_C
    58 #endif
    59 DBusServer* dbus_server_ref              (DBusServer     *server);
    60 #ifdef __SYMBIAN32__
    61 IMPORT_C
    62 #endif
    63 void        dbus_server_unref            (DBusServer     *server);
    64 #ifdef __SYMBIAN32__
    65 IMPORT_C
    66 #endif
    67 void        dbus_server_disconnect       (DBusServer     *server);
    68 #ifdef __SYMBIAN32__
    69 IMPORT_C
    70 #endif
    71 dbus_bool_t dbus_server_get_is_connected (DBusServer     *server);
    72 #ifdef __SYMBIAN32__
    73 IMPORT_C
    74 #endif
    75 char*       dbus_server_get_address      (DBusServer     *server);
    76 #ifdef __SYMBIAN32__
    77 IMPORT_C
    78 #endif
    79 void        dbus_server_set_new_connection_function (DBusServer                *server,
    80                                                      DBusNewConnectionFunction  function,
    81                                                      void                      *data,
    82                                                      DBusFreeFunction           free_data_function);
    83 #ifdef __SYMBIAN32__
    84 IMPORT_C
    85 #endif
    86 dbus_bool_t dbus_server_set_watch_functions         (DBusServer                *server,
    87                                                      DBusAddWatchFunction       add_function,
    88                                                      DBusRemoveWatchFunction    remove_function,
    89                                                      DBusWatchToggledFunction   toggled_function,
    90                                                      void                      *data,
    91                                                      DBusFreeFunction           free_data_function);
    92 #ifdef __SYMBIAN32__
    93 IMPORT_C
    94 #endif
    95 dbus_bool_t dbus_server_set_timeout_functions       (DBusServer                *server,
    96                                                      DBusAddTimeoutFunction     add_function,
    97                                                      DBusRemoveTimeoutFunction  remove_function,
    98                                                      DBusTimeoutToggledFunction toggled_function,
    99                                                      void                      *data,
   100                                                      DBusFreeFunction           free_data_function);
   101 #ifdef __SYMBIAN32__
   102 IMPORT_C
   103 #endif
   104 dbus_bool_t dbus_server_set_auth_mechanisms         (DBusServer                *server,
   105                                                      const char               **mechanisms);
   106 
   107 #ifdef __SYMBIAN32__
   108 IMPORT_C
   109 #endif
   110 dbus_bool_t dbus_server_allocate_data_slot (dbus_int32_t     *slot_p);
   111 #ifdef __SYMBIAN32__
   112 IMPORT_C
   113 #endif
   114 void        dbus_server_free_data_slot     (dbus_int32_t     *slot_p);
   115 #ifdef __SYMBIAN32__
   116 IMPORT_C
   117 #endif
   118 dbus_bool_t dbus_server_set_data           (DBusServer       *server,
   119                                             int               slot,
   120                                             void             *data,
   121                                             DBusFreeFunction  free_data_func);
   122 #ifdef __SYMBIAN32__
   123 IMPORT_C
   124 #endif
   125 void*       dbus_server_get_data           (DBusServer       *server,
   126                                             int               slot);
   127 
   128 /** @} */
   129 
   130 DBUS_END_DECLS
   131 
   132 #endif /* DBUS_SERVER_H */