Main Page   Modules   Data Structures   File List   Data Fields   Related Pages  

bus.h

00001 /* -*- mode: C; c-file-style: "gnu" -*- */
00002 /* bus.h  message bus context object
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_BUS_H
00025 #define BUS_BUS_H
00026 
00027 #include <config.h>
00028 
00029 #include <dbus/dbus.h>
00030 #include <dbus/dbus-string.h>
00031 #include <dbus/dbus-mainloop.h>
00032 #include <dbus/dbus-userdb.h>
00033 
00034 typedef struct BusActivation    BusActivation;
00035 typedef struct BusConnections   BusConnections;
00036 typedef struct BusContext       BusContext;
00037 typedef struct BusPolicy        BusPolicy;
00038 typedef struct BusClientPolicy  BusClientPolicy;
00039 typedef struct BusPolicyRule    BusPolicyRule;
00040 typedef struct BusRegistry      BusRegistry;
00041 typedef struct BusService       BusService;
00042 typedef struct BusTransaction   BusTransaction;
00043 
00044 
00045 typedef struct
00046 {
00047   long max_incoming_bytes;          
00048   long max_outgoing_bytes;          
00049   long max_message_size;            
00050   int activation_timeout;           
00051   int auth_timeout;                 
00052   int max_completed_connections;    
00053   int max_incomplete_connections;   
00054   int max_connections_per_user;     
00055   int max_pending_activations;      
00056   int max_services_per_connection;  
00057 } BusLimits;
00058 
00059 BusContext*       bus_context_new                             (const DBusString *config_file,
00060                                                                dbus_bool_t       force_fork,
00061                                                                int               print_addr_fd,
00062                                                                int               print_pid_fd,
00063                                                                DBusError        *error);
00064 void              bus_context_shutdown                        (BusContext       *context);
00065 void              bus_context_ref                             (BusContext       *context);
00066 void              bus_context_unref                           (BusContext       *context);
00067 const char*       bus_context_get_type                        (BusContext       *context);
00068 const char*       bus_context_get_address                     (BusContext       *context);
00069 BusRegistry*      bus_context_get_registry                    (BusContext       *context);
00070 BusConnections*   bus_context_get_connections                 (BusContext       *context);
00071 BusActivation*    bus_context_get_activation                  (BusContext       *context);
00072 DBusLoop*         bus_context_get_loop                        (BusContext       *context);
00073 DBusUserDatabase* bus_context_get_user_database               (BusContext       *context);
00074 dbus_bool_t       bus_context_allow_user                      (BusContext       *context,
00075                                                                unsigned long     uid);
00076 BusClientPolicy*  bus_context_create_client_policy            (BusContext       *context,
00077                                                                DBusConnection   *connection,
00078                                                                DBusError        *error);
00079 
00080 int               bus_context_get_activation_timeout          (BusContext       *context);
00081 int               bus_context_get_auth_timeout                (BusContext       *context);
00082 int               bus_context_get_max_completed_connections   (BusContext       *context);
00083 int               bus_context_get_max_incomplete_connections  (BusContext       *context);
00084 int               bus_context_get_max_connections_per_user    (BusContext       *context);
00085 int               bus_context_get_max_pending_activations     (BusContext       *context);
00086 int               bus_context_get_max_services_per_connection (BusContext       *context);
00087 dbus_bool_t       bus_context_check_security_policy           (BusContext       *context,
00088                                                                DBusConnection   *sender,
00089                                                                DBusConnection   *recipient,
00090                                                                DBusMessage      *message,
00091                                                                DBusError        *error);
00092 
00093 #endif /* BUS_BUS_H */

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