source: SMSSender/common/business/imanagers.h @ 316:16f8e7f93ca4

separation-frontend-backend
Last change on this file since 316:16f8e7f93ca4 was 316:16f8e7f93ca4, checked in by Sämy Zehnder <saemy.zehnder@…>, 8 years ago
  • Adds the copyright header to each file and updates the development period.
File size: 9.2 KB
Line 
1/*
2  smssender - A frontend for fast and easy SMS sending over different gateways.
3  Copyright (C) 2007-2014, gorrión. See http://smssender.gorrion.ch
4
5  This program is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  GNU General Public License for more details.
14
15  You should have received a copy of the GNU General Public License
16  along with this program.  If not, see <http://www.gnu.org/licenses/>.
17*/
18#ifndef IMANAGERSFACTORY_H_
19#define IMANAGERSFACTORY_H_
20
21// #include <QDir>
22// #include <QHash>
23// #include <QList>
24// #include <QLocale>
25// #include <QNetworkProxy>
26// #include <QSet>
27// #include <QString>
28//
29// #include "common/domain/sdatatypes.h"
30// #include "common/domain/stask.h"
31// #include "common/exceptions/eexception.h"
32// #include "common/global.h"
33//
34// class IAccount;
35// class IAccountManager;
36// class IAccountInitManager;
37// class IContactManager;
38// class IGateway;
39// class IGuiManager;
40// class IGroupManager;
41// class ISendingDialog;
42// class ISettingsManager;
43// class ISMSSendTask;
44//
45// class SContact;
46// class ErrorAccount;
47// class SGroup;
48// class SNumber;
49//
50// class COMMON_EXPORT IAccountManager : public QObject {
51//     Q_OBJECT
52//
53// public:
54//     virtual void readAccountsFromStorage() =0;
55//
56//     virtual IAccount*       account(int accountId) const =0;
57//     virtual QSet<IAccount*> accounts() const =0;
58//     virtual QSet<IAccount*> erroneousAccounts() const =0;
59//
60//     virtual void            saveAccount(IAccount* account) =0;
61//     virtual void            removeAccount(int accountId) =0;
62//
63// signals:
64//     void accountAdded(IAccount* account);
65//     void accountDataChanged(IAccount* account, int property);
66//     void accountRemoved(IAccount* account);
67//     void accountInitStateChanged(IAccount* account);
68//     void accountLoginStateChanged(IAccount *account);
69//
70// public:
71//     virtual ~IAccountManager() {}
72// };
73// Q_DECLARE_INTERFACE(IAccountManager, "ch.gorrion.smssender.IAccountManager/1.0")
74//
75//
76// class COMMON_EXPORT IAccountInitManager : public QObject {
77//     Q_OBJECT
78//
79// public:
80//     /**
81//      * Starts the initialization process of the given account and connects
82//      * the signals to it.
83//      * If the account is already initialized, nothing happens.
84//      * If the account is already initializing, we only connect to the signals, if not already done.
85//      *
86//      * @param account The to be initialized account
87//      */
88//     virtual void initAccount(IAccount* account) =0;
89//
90//     /**
91//      * Starts the initialization process of the given accounts.
92//      *
93//      * @param accounts The to be initialized accounts
94//      */
95//     virtual void initAccounts(const QSet<IAccount*> &accounts) =0;
96//
97// signals:
98//     void accountInitStateChanged(IAccount* account); // Called when a account gets initialized or un-initialized
99//     void accountInitFinished(IAccount* account, STask::Result result);
100//     void accountInitFailed(IAccount* account, const EException &exception);
101//
102// public:
103//     virtual ~IAccountInitManager() {}
104// };
105// Q_DECLARE_INTERFACE(IAccountInitManager, "ch.gorrion.smssender.IAccountInitManager/1.0")
106//
107//
108// class COMMON_EXPORT IContactManager : public QObject {
109//     Q_OBJECT
110//
111// public:
112//     virtual bool           hasContact(int contactId) const =0;
113//     virtual SContact       contact(int contactId) const =0;
114//     virtual SContact       contactByNumber(const SNumber &number) const =0;
115//     virtual QSet<SContact> contacts() const =0;
116//
117//     virtual void           saveContact(SContact &contact) =0;
118//     virtual void           removeContact(int contactId) =0;
119//
120//
121// signals:
122//     void contactAdded(const SContact &contact);
123//     void contactUpdated(const SContact &contact);
124//     void contactRemoved(const SContact &contact);
125//
126// public:
127//     virtual ~IContactManager() {}
128// };
129// Q_DECLARE_INTERFACE(IContactManager, "ch.gorrion.smssender.IContactManager/1.0")
130//
131//
132// template <class Gateway>
133// class COMMON_EXPORT IGatewayManager {
134// public:
135//     virtual Gateway* gateway(const QString &gatewayName) const =0;
136//     virtual QSet<Gateway*> gateways() const =0;
137//
138//     virtual void registerGateway(Gateway *gateway) =0;
139//
140// public:
141//     virtual ~IGatewayManager() {}
142// };
143// //Q_DECLARE_INTERFACE(IGatewayManager<G>, "ch.gorrion.smssender.IGatewayManager/1.0")
144//
145//
146// class COMMON_EXPORT IGroupManager : public QObject {
147//     Q_OBJECT
148//
149// public:
150//     virtual bool         hasGroup(int groupId) const =0;
151//     virtual SGroup       group(int groupId) const =0;
152//     virtual QSet<SGroup> groups() const =0;
153//
154//     virtual void         saveGroup(SGroup &group) =0;
155//     virtual void         removeGroup(int groupId) =0;
156//
157// signals:
158//     void groupAdded(const SGroup &group);
159//     void groupUpdated(const SGroup &group);
160//     void groupRemoved(const SGroup &group);
161//
162// public:
163//     virtual ~IGroupManager() {}
164// };
165// Q_DECLARE_INTERFACE(IGroupManager, "ch.gorrion.smssender.IGroupManager/1.0")
166//
167//
168// /*class QMenu;
169// class QMenuBar;
170//
171// class CORE_SHARED_EXPORT IGuiManager : public QObject {
172//     Q_OBJECT
173//
174// public:
175//     enum Menu {
176//         File,
177//         Edit,
178//         Help
179//     };
180//
181// public:
182//     virtual ISendingDialog* createNewSendingDialog(QWidget* parent, ISMSSendTask* smsSendTask) =0;
183//     virtual int             execDialog(IDialogWrapper* dialogWrapper) =0;
184//     virtual int             execDialog(QMessageBox* msgBox) =0;
185//     virtual int             execErrorDialog(const QString &message, const EException &exception) =0;
186//
187//     virtual void            addMenuAction(IGuiManager::Menu menu, QAction* action) =0;
188//
189//     virtual void            setMainMenu(IGuiManager::Menu menu, QMenu* mainMenu, QAction* actionBefore) =0;
190//
191// signals:
192//     void sendingDialogCreated(ISendingDialog* sendingDialog);
193//
194// public:
195//     virtual ~IGuiManager() {}
196// };
197// Q_DECLARE_INTERFACE(IGuiManager, "ch.gorrion.smssender.IGuiManager/1.0")*/
198//
199//
200// class COMMON_EXPORT ISettingsManager : public QObject {
201//     Q_OBJECT
202//
203// public:
204//     enum Setting {
205//         Locale,
206//
207//         CheckForUpdates,
208//         AddSuffix,
209//         SMSSuffix,
210//         ActiveAccountId,
211//         ShowSentConfirmation,
212//
213//         ProxyEnabled,
214//         ProxyType,
215//         ProxyHost,
216//         ProxyPort,
217//         ProxyAuthEnabled,
218//         ProxyUsername,
219//         ProxyPassword,
220//
221//         ShortcutNewMessage,
222//         ShortcutClearMessageText,
223//         ShortcutCleanRecipients,
224//         ShortcutSend
225//     };
226//
227// public:
228//     virtual const QDir     getLocalePath() const =0;
229//     virtual QLocale        getLocale() =0;
230//     virtual QList<QLocale> getLocales() =0;
231//
232//     virtual bool    getCheckForUpdates() =0;
233//     virtual bool    getAddSuffix() =0;
234//     virtual QString getActiveAccountId() =0;
235//     virtual bool    getShowSentConfirmation() =0;
236//
237//     virtual bool    isProxyEnabled() =0;
238//     virtual QNetworkProxy::ProxyType getProxyType() =0;
239//     virtual QString getProxyHost() =0;
240//     virtual int     getProxyPort() =0;
241//     virtual bool    isProxyAuthEnabled() =0;
242//     virtual QString getProxyUsername() =0;
243//     virtual QString getProxyPassword() =0;
244//
245// /*    virtual QKeySequence getNewMessageShortCut() =0;
246//     virtual QKeySequence getClearMessageTextShortCut() =0;
247//     virtual QKeySequence getClearRecipientsShortCut() =0;
248//     virtual QKeySequence getSendShortCut() =0;*/
249//
250//     virtual QString getUpdateUrl() =0;
251//
252//     virtual QString getSMSSuffix() =0;
253//
254//
255//     virtual void setLocale(const QLocale &locale) =0;
256//
257//     virtual void setCheckForUpdates(bool checkForUpdates) =0;
258//     virtual void setAddSuffix(bool addSuffix) =0;
259//     virtual void setActiveAccountId(const QString &accountId) =0;
260//     virtual void setShowSentConfirmation(bool showSentConfirmation) =0;
261//
262//     virtual void setProxyEnabled(bool enabled) =0;
263//     virtual void setProxyType(QNetworkProxy::ProxyType type) =0;
264//     virtual void setProxyHost(const QString &host) =0;
265//     virtual void setProxyPort(int port) =0;
266//     virtual void setProxyAuthEnabled(bool enabled) =0;
267//     virtual void setProxyUsername(const QString &username) =0;
268//     virtual void setProxyPassword(const QString &password) =0;
269//
270// /*    virtual void setNewMessageShortCut(const QKeySequence &shortcut) =0;
271//     virtual void setClearMessageTextShortCut(const QKeySequence &shortcut) =0;
272//     virtual void setClearRecipientsShortCut(const QKeySequence &shortcut) =0;
273//     virtual void setSendShortCut(const QKeySequence &shortcut) =0;*/
274//
275//     virtual void setSMSSuffix(const QString &smsSuffix) =0;
276//
277// signals:
278//     void settingChanged(Setting setting);
279//
280// public:
281//     virtual ~ISettingsManager() {}
282// };
283// Q_DECLARE_INTERFACE(ISettingsManager, "ch.gorrion.smssender.ISettingsManager/1.0")
284
285#endif /* IMANAGERSFACTORY_H_ */
Note: See TracBrowser for help on using the repository browser.