00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef __DBUSXX_SERVER_H
00026 #define __DBUSXX_SERVER_H
00027
00028 #include <list>
00029
00030 #include "api.h"
00031 #include "error.h"
00032 #include "connection.h"
00033 #include "util.h"
00034 #include "dispatcher.h"
00035
00036 namespace DBus {
00037
00038 class Server;
00039
00040 typedef std::list<Server> ServerList;
00041
00042 class DXXAPI Server
00043 {
00044 public:
00045
00046 Server(const char *address);
00047
00048 Dispatcher *setup(Dispatcher *);
00049
00050 virtual ~Server();
00051
00052 bool listening() const;
00053
00054 bool operator == (const Server &) const;
00055
00056 void disconnect();
00057
00058 void enable_auth(bool);
00059
00060 void enable_anon(bool);
00061
00062 struct Private;
00063
00064 protected:
00065
00066 Server(const Server &s)
00067 {}
00068
00069 virtual void on_new_connection(Connection &c) = 0;
00070
00071 virtual bool on_user_auth(unsigned long uid);
00072
00073 void detach_connection(Connection &c);
00074
00075 private:
00076
00077 RefPtrI<Private> _pvt;
00078 };
00079
00080 }
00081
00082 #endif//__DBUSXX_SERVER_H