00001
00002
00003
00004
00005
00006
00007 #ifndef CLIENT_H
00008 #define CLIENT_H
00009
00010
00011 #define QT_CLEAN_NAMESPACE 1
00012 #include <tqobject.h>
00013 #include <tqstring.h>
00014 #include <tqstringlist.h>
00015 #include <tqsocketnotifier.h>
00016 #include <tqptrlist.h>
00017 #include <tqvaluelist.h>
00018 #include <tqcstring.h>
00019 #include <tqdict.h>
00020 #include <tqptrqueue.h>
00021 #include <tqptrdict.h>
00022 #include <kapplication.h>
00023 #include <tqtimer.h>
00024 #include <dcopobject.h>
00025
00026 #include "server2.h"
00027
00028 class KSMListener;
00029 class KSMConnection;
00030 class KSMClient
00031 {
00032 public:
00033 KSMClient( SmsConn );
00034 ~KSMClient();
00035
00036 void registerClient( const char* previousId = 0 );
00037 SmsConn connection() const { return smsConn; }
00038
00039 void resetState();
00040 uint saveYourselfDone : 1;
00041 uint pendingInteraction : 1;
00042 uint waitForPhase2 : 1;
00043 uint wasPhase2 : 1;
00044
00045 TQPtrList<SmProp> properties;
00046 SmProp* property( const char* name ) const;
00047
00048 TQString program() const;
00049 TQStringList restartCommand() const;
00050 TQStringList discardCommand() const;
00051 int restartStyleHint() const;
00052 TQString userId() const;
00053 const char* clientId() { return id ? id : ""; }
00054
00055 private:
00056 const char* id;
00057 SmsConn smsConn;
00058 };
00059
00060 #endif