xref: /glogg/src/externalcom.h (revision 557fb9d8925f3772c017d921d356ab742ec51021)
123abd45aSNicolas Bonnefon /*
2*557fb9d8SNicolas Bonnefon  * Copyright (C) 2014 Nicolas Bonnefon and other contributors
323abd45aSNicolas Bonnefon  *
423abd45aSNicolas Bonnefon  * This file is part of glogg.
523abd45aSNicolas Bonnefon  *
623abd45aSNicolas Bonnefon  * glogg is free software: you can redistribute it and/or modify
723abd45aSNicolas Bonnefon  * it under the terms of the GNU General Public License as published by
823abd45aSNicolas Bonnefon  * the Free Software Foundation, either version 3 of the License, or
923abd45aSNicolas Bonnefon  * (at your option) any later version.
1023abd45aSNicolas Bonnefon  *
1123abd45aSNicolas Bonnefon  * glogg is distributed in the hope that it will be useful,
1223abd45aSNicolas Bonnefon  * but WITHOUT ANY WARRANTY; without even the implied warranty of
1323abd45aSNicolas Bonnefon  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1423abd45aSNicolas Bonnefon  * GNU General Public License for more details.
1523abd45aSNicolas Bonnefon  *
1623abd45aSNicolas Bonnefon  * You should have received a copy of the GNU General Public License
1723abd45aSNicolas Bonnefon  * along with glogg.  If not, see <http://www.gnu.org/licenses/>.
1823abd45aSNicolas Bonnefon  */
1923abd45aSNicolas Bonnefon 
2023abd45aSNicolas Bonnefon #ifndef EXTERNALCOM_H
2123abd45aSNicolas Bonnefon #define EXTERNALCOM_H
2223abd45aSNicolas Bonnefon 
23*557fb9d8SNicolas Bonnefon #include <string>
2423abd45aSNicolas Bonnefon 
25*557fb9d8SNicolas Bonnefon #include <QObject>
26*557fb9d8SNicolas Bonnefon 
27*557fb9d8SNicolas Bonnefon class CantCreateExternalErr {};
28*557fb9d8SNicolas Bonnefon 
29*557fb9d8SNicolas Bonnefon class ExternalInstance
30*557fb9d8SNicolas Bonnefon {
31*557fb9d8SNicolas Bonnefon   public:
32*557fb9d8SNicolas Bonnefon     ExternalInstance() {}
33*557fb9d8SNicolas Bonnefon     virtual ~ExternalInstance() {}
34*557fb9d8SNicolas Bonnefon 
35*557fb9d8SNicolas Bonnefon     virtual void loadFile( const std::string& file_name ) const = 0;
3623abd45aSNicolas Bonnefon };
3723abd45aSNicolas Bonnefon 
38*557fb9d8SNicolas Bonnefon class ExternalCommunicator : public QObject
39*557fb9d8SNicolas Bonnefon {
40*557fb9d8SNicolas Bonnefon   Q_OBJECT
41*557fb9d8SNicolas Bonnefon 
4223abd45aSNicolas Bonnefon   public:
43*557fb9d8SNicolas Bonnefon     ExternalCommunicator() : QObject() {}
4423abd45aSNicolas Bonnefon 
45*557fb9d8SNicolas Bonnefon     virtual ExternalInstance* otherInstance() const = 0;
4623abd45aSNicolas Bonnefon 
47*557fb9d8SNicolas Bonnefon   signals:
48*557fb9d8SNicolas Bonnefon     void loadFile( const std::string& file_name );
4923abd45aSNicolas Bonnefon };
5023abd45aSNicolas Bonnefon 
5123abd45aSNicolas Bonnefon #endif
52