add more spacing
[personal-kdebase.git] / workspace / ksmserver / client.h
blobffaca5bfc5e6e6b4145a9357ce7656de9f1893c2
1 /*****************************************************************
2 ksmserver - the KDE session management server
4 Copyright 2000 Matthias Ettrich <ettrich@kde.org>
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to deal
8 in the Software without restriction, including without limitation the rights
9 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
20 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 ******************************************************************/
25 #ifndef CLIENT_H
26 #define CLIENT_H
28 // needed to avoid clash with INT8 defined in X11/Xmd.h on solaris
29 #define QT_CLEAN_NAMESPACE 1
31 #include <kapplication.h>
32 #include <kworkspace.h>
34 #include "server.h"
37 class KSMClient
39 public:
40 KSMClient( SmsConn );
41 ~KSMClient();
43 void registerClient( const char* previousId = 0 );
44 SmsConn connection() const { return smsConn; }
46 void resetState();
47 uint saveYourselfDone : 1;
48 uint pendingInteraction : 1;
49 uint waitForPhase2 : 1;
50 uint wasPhase2 : 1;
52 QList<SmProp*> properties;
53 SmProp* property( const char* name ) const;
55 QString program() const;
56 QStringList restartCommand() const;
57 QStringList discardCommand() const;
58 int restartStyleHint() const;
59 QString userId() const;
60 const char* clientId() { return id ? id : ""; }
62 private:
63 const char* id;
64 SmsConn smsConn;
66 #endif