File indexing completed on 2024-03-24 04:22:54
0001 /******************************************************************** 0002 KolorServer - color server based on the X Color Management Specification 0003 This file is part of the KDE project. 0004 0005 Copyright (C) 2012 Casian Andrei <skeletk13@gmail.com> 0006 0007 Redistribution and use in source and binary forms, with or without 0008 modification, are permitted provided that the following conditions 0009 are met: 0010 0011 1. Redistributions of source code must retain the above copyright 0012 notice, this list of conditions and the following disclaimer. 0013 2. Redistributions in binary form must reproduce the above copyright 0014 notice, this list of conditions and the following disclaimer in the 0015 documentation and/or other materials provided with the distribution. 0016 0017 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 0018 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 0019 OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 0020 IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 0021 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 0022 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 0023 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 0024 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 0025 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 0026 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 0027 *********************************************************************/ 0028 0029 #ifndef KOLOR_SERVER_H_ 0030 #define KOLOR_SERVER_H_ 0031 0032 #include <KDEDModule> 0033 0034 #include <QDBusAbstractAdaptor> 0035 #include <QDBusConnection> 0036 #include <QDBusMessage> 0037 #include <QDBusMetaType> 0038 0039 0040 namespace KolorServer 0041 { 0042 0043 class Server : public KDEDModule 0044 { 0045 Q_OBJECT 0046 0047 public: 0048 Server(QObject *parent, const QList<QVariant> &); 0049 virtual ~Server(); 0050 }; 0051 0052 /* 0053 * D-Bus 0054 */ 0055 class ServerDBusAdaptor : public QDBusAbstractAdaptor 0056 { 0057 Q_OBJECT 0058 Q_CLASSINFO("D-Bus Interface", "org.kde.KolorServer") 0059 0060 public: 0061 explicit ServerDBusAdaptor(Server *server); 0062 0063 public slots: 0064 Q_NOREPLY void getVersionInfo(const QDBusMessage &message); 0065 Q_NOREPLY void getOutputCluts(const QDBusMessage &message); 0066 Q_NOREPLY void getRegionCluts(const QDBusMessage &message); 0067 0068 signals: 0069 void outputClutsChanged(); 0070 void regionClutsChanged(); 0071 0072 private: 0073 Server *m_server; 0074 }; 0075 0076 0077 } // KolorServer namespace 0078 0079 #endif // KOLOR_SERVER_H_