Main Page   Modules   Data Structures   File List   Data Fields   Related Pages  

dbus-server-protected.h

00001 /* -*- mode: C; c-file-style: "gnu" -*- */
00002 /* dbus-server-protected.h Used by subclasses of DBusServer object (internal to D-BUS implementation)
00003  *
00004  * Copyright (C) 2002  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 #ifndef DBUS_SERVER_PROTECTED_H
00024 #define DBUS_SERVER_PROTECTED_H
00025 
00026 #include <dbus/dbus-internals.h>
00027 #include <dbus/dbus-server.h>
00028 #include <dbus/dbus-timeout.h>
00029 #include <dbus/dbus-watch.h>
00030 #include <dbus/dbus-resources.h>
00031 #include <dbus/dbus-dataslot.h>
00032 
00033 DBUS_BEGIN_DECLS;
00034 
00035 typedef struct DBusServerVTable DBusServerVTable;
00036 
00037 struct DBusServerVTable
00038 {
00039   void        (* finalize)      (DBusServer *server);
00042   void        (* disconnect)    (DBusServer *server);
00044 };
00045 
00046 struct DBusServer
00047 {
00048   int refcount;                               
00049   const DBusServerVTable *vtable;             
00050   DBusWatchList *watches;                     
00051   DBusTimeoutList *timeouts;                  
00053   char *address;                              
00055   int max_connections;                        
00057   DBusDataSlotList slot_list;   
00059   DBusNewConnectionFunction  new_connection_function;
00061   void *new_connection_data;
00063   DBusFreeFunction new_connection_free_data_function;
00068   char **auth_mechanisms; 
00070   unsigned int disconnected : 1;              
00071 };
00072 
00073 dbus_bool_t _dbus_server_init_base      (DBusServer             *server,
00074                                          const DBusServerVTable *vtable,
00075                                          const DBusString       *address);
00076 void        _dbus_server_finalize_base  (DBusServer             *server);
00077 dbus_bool_t _dbus_server_add_watch      (DBusServer             *server,
00078                                          DBusWatch              *watch);
00079 void        _dbus_server_remove_watch   (DBusServer             *server,
00080                                          DBusWatch              *watch);
00081 void        _dbus_server_toggle_watch   (DBusServer             *server,
00082                                          DBusWatch              *watch,
00083                                          dbus_bool_t             enabled);
00084 dbus_bool_t _dbus_server_add_timeout    (DBusServer             *server,
00085                                          DBusTimeout            *timeout);
00086 void        _dbus_server_remove_timeout (DBusServer             *server,
00087                                          DBusTimeout            *timeout);
00088 void        _dbus_server_toggle_timeout (DBusServer             *server,
00089                                          DBusTimeout            *timeout,
00090                                          dbus_bool_t             enabled);
00091 
00092 
00093 
00094 DBUS_END_DECLS;
00095 
00096 #endif /* DBUS_SERVER_PROTECTED_H */

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