File indexing completed on 2024-04-28 05:35:30
0001 /* 0002 ksmserver - the KDE session management server 0003 0004 SPDX-FileCopyrightText: 2000 Matthias Ettrich <ettrich@kde.org> 0005 0006 SPDX-License-Identifier: MIT 0007 */ 0008 0009 #pragma once 0010 0011 // needed to avoid clash with INT8 defined in X11/Xmd.h on solaris 0012 #define QT_CLEAN_NAMESPACE 1 0013 0014 #include <kworkspace.h> 0015 0016 #include "server.h" 0017 0018 class KSMClient 0019 { 0020 public: 0021 explicit KSMClient(SmsConn); 0022 ~KSMClient(); 0023 0024 void registerClient(const char *previousId = nullptr); 0025 SmsConn connection() const 0026 { 0027 return smsConn; 0028 } 0029 0030 void resetState(); 0031 uint saveYourselfDone : 1; 0032 uint pendingInteraction : 1; 0033 uint waitForPhase2 : 1; 0034 uint wasPhase2 : 1; 0035 0036 QList<SmProp *> properties; 0037 SmProp *property(const char *name) const; 0038 0039 QString program() const; 0040 QStringList restartCommand() const; 0041 QStringList discardCommand() const; 0042 int restartStyleHint() const; 0043 QString userId() const; 0044 const char *clientId() 0045 { 0046 return id ? id : ""; 0047 } 0048 0049 private: 0050 const char *id; 0051 SmsConn smsConn; 0052 };