File indexing completed on 2024-04-28 04:36:30

0001 /*
0002     SPDX-FileCopyrightText: 2013 Milian Wolff <mail@milianw.de>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006 
0007 #ifndef I_SESSIONLOCK_H
0008 #define I_SESSIONLOCK_H
0009 
0010 #include "interfacesexport.h"
0011 #include <QSharedPointer>
0012 
0013 namespace KDevelop {
0014 
0015 /**
0016  * This class ensures that a given session is properly locked and no other
0017  * KDevplatform process may use this session.
0018  */
0019 class KDEVPLATFORMINTERFACES_EXPORT ISessionLock
0020 {
0021 public:
0022     /**
0023      * Use this shared pointer to pass around the session lock.
0024      */
0025     using Ptr = QSharedPointer<ISessionLock>;
0026 
0027     virtual ~ISessionLock();
0028 
0029     /**
0030      * @return the unique session ID.
0031      */
0032     virtual QString id() = 0;
0033 };
0034 
0035 }
0036 
0037 #endif // I_SESSIONLOCK_H