source: SMSSender/lib/datatypes/src/interfaces/iaccount_tasks.h @ 218:a3ba967e8dc4

Last change on this file since 218:a3ba967e8dc4 was 218:a3ba967e8dc4, checked in by Sämy Zehnder <saemy.zehnder@…>, 7 years ago
  • Added some forgotten IMPL macros.
  • Fixed some crashes because of not initialized variables.
  • Switched datatypes library into a shared one. Seems like this fixes #59.
File size: 2.3 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 IACCOUNT_TASKS_H_
19#define IACCOUNT_TASKS_H_
20
21#include <QSet>
22#include <QString>
23
24#include "datatypes_global.h"
25
26#include "scontact.h"
27#include "stask.h"
28
29class IAccount;
30
31const QString ACCOUNT_NAMESPACE_PREFIX = "account_";
32
33const uint UID_ACCOUNT_INIT  = 100;
34const uint UID_ACCOUNT_LOGIN = 200;
35const uint UID_SEND_SMS      = 300;
36
37class DATATYPES_SHARED_EXPORT IAccountTask : public SThreadedTask {
38    Q_OBJECT
39
40public:
41    IAccountTask(uint UID, IAccount* account);
42    virtual ~IAccountTask() {}
43
44public:
45    IAccount* account() const;
46
47private:
48    IAccount* account_; // No ownership
49};
50Q_DECLARE_INTERFACE(IAccountTask, "ch.gorrion.smssender.IAccountTask/1.0")
51
52
53class DATATYPES_SHARED_EXPORT IAccountInitTask : public IAccountTask {
54    Q_OBJECT
55
56public:
57    IAccountInitTask(IAccount* account);
58    virtual ~IAccountInitTask() {}
59};
60Q_DECLARE_INTERFACE(IAccountInitTask, "ch.gorrion.smssender.IAccountInitTask/1.0")
61
62
63class DATATYPES_SHARED_EXPORT IAccountLoginTask : public IAccountTask {
64    Q_OBJECT
65
66public:
67    IAccountLoginTask(IAccount* account);
68    virtual ~IAccountLoginTask() {}
69};
70Q_DECLARE_INTERFACE(IAccountLoginTask, "ch.gorrion.smssender.IAccountLoginTask/1.0")
71
72
73class DATATYPES_SHARED_EXPORT ISMSSendTask : public IAccountTask {
74    Q_OBJECT
75
76public:
77    ISMSSendTask(IAccount* account);
78    virtual ~ISMSSendTask() {}
79
80public:
81    virtual QString        message() const =0;
82    virtual QSet<SContact> recipients() const =0;
83};
84Q_DECLARE_INTERFACE(ISMSSendTask, "ch.gorrion.smssender.ISMSSendTask/1.0")
85
86#endif /* IACCOUNT_TASKS_H_ */
Note: See TracBrowser for help on using the repository browser.