source: SMSSender/gateways/common/business/baseaccount_tasks.h @ 319:1ec456878bcb

separation-frontend-backend
Last change on this file since 319:1ec456878bcb was 319:1ec456878bcb, checked in by Sämy Zehnder <saemy.zehnder@…>, 8 years ago
  • Adjusts header guards to follow common pattern based on the filename.
File size: 2.4 KB
Line 
1/*
2 smssender - A frontend for fast and easy SMS sending over different gateways.
3 Copyright (C) 2007-2012, 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 GATEWAYS_COMMON_BASEACCOUNT_TASKS_H
19#define GATEWAYS_COMMON_BASEACCOUNT_TASKS_H
20
21#include <QSet>
22#include <QString>
23
24#include "common/business/iaccount_tasks.h"
25#include "common/domain/sdatatypes.h"
26#include "gateways/common/global.h"
27
28class AbstractAccount;
29
30class GATEWAYS_COMMON_EXPORT BaseAccountInitTask : public IAccountInitTask {
31    Q_OBJECT
32    Q_INTERFACES(IAccountInitTask)
33
34public:
35    BaseAccountInitTask(IAccount* account);
36
37public: /* STask */
38    QString title() const;
39    QString details() const;
40
41protected: /* SThreadedTask */
42    void doTheWork();
43
44protected:
45    virtual void doInitialize() =0;
46};
47
48
49class GATEWAYS_COMMON_EXPORT BaseAccountLoginTask : public IAccountLoginTask {
50    Q_OBJECT
51    Q_INTERFACES(IAccountLoginTask)
52
53public:
54    BaseAccountLoginTask(IAccount *account);
55
56public: /* STask */
57    QString title() const;
58    QString details() const;
59
60public:
61    //AbstractAccount* account() const;
62
63protected: /* SThreadedTask */
64    void doTheWork();
65
66protected:
67    virtual void doLogin() =0;
68};
69
70
71class GATEWAYS_COMMON_EXPORT BaseSMSSendTask : public ISMSSendTask {
72    Q_OBJECT
73    Q_INTERFACES(ISMSSendTask)
74
75public:
76    BaseSMSSendTask(IAccount* account, const QString& message, const QSet<const SContact *> &recipients);
77
78public: /* STask */
79    QString title() const;
80    QString details() const;
81
82protected: /* SThreadedTask */
83    void doTheWork();
84
85protected:
86    virtual void doSendSMS() =0;
87
88    QString message() const;
89    QSet<const SContact*> recipients() const;
90
91private:
92    QString        message_;
93    QSet<const SContact*> recipients_;
94};
95
96#endif // GATEWAYS_COMMON_BASEACCOUNT_TASKS_H
Note: See TracBrowser for help on using the repository browser.