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