3.0
Last change
on this file since 71:415b45c71663 was
71:415b45c71663,
checked in by Sämy Zehnder <saemy.zehnder@…>, 12 years ago
|
- Reorganized all the libraries. libinterfaces and libgateways are removed now and libdatatypes contains now all these files.
|
File size:
1.3 KB
|
Line | |
---|
1 | /* |
---|
2 | * BCAccount.h |
---|
3 | * |
---|
4 | * Created on: Jul 9, 2009 |
---|
5 | * Author: saemy |
---|
6 | */ |
---|
7 | |
---|
8 | #ifndef SWISSCOMXTRAZONE_BCACCOUNT_H_ |
---|
9 | #define SWISSCOMXTRAZONE_BCACCOUNT_H_ |
---|
10 | |
---|
11 | #include <abstract/abstractloginaccount.h> |
---|
12 | #include <persistence/istorage.h> |
---|
13 | |
---|
14 | #include <shttphelper.h> |
---|
15 | |
---|
16 | namespace SwisscomXtraZone { |
---|
17 | |
---|
18 | class BCAccount: public AbstractLoginAccount { |
---|
19 | Q_OBJECT |
---|
20 | |
---|
21 | public: |
---|
22 | explicit BCAccount(IStorage* storage); |
---|
23 | virtual ~BCAccount(); |
---|
24 | |
---|
25 | /* ILoginAccount */ |
---|
26 | virtual AbstractLoginGateway* gateway() const; |
---|
27 | |
---|
28 | /* IAccount */ |
---|
29 | virtual void sendSMS(const QString& message, const QSet<IContact*>& recipients); |
---|
30 | virtual void cancelSMSSending(); |
---|
31 | |
---|
32 | virtual IAccount* getClonedInstance() const; |
---|
33 | protected: |
---|
34 | /* AbstractAccount */ |
---|
35 | virtual void doInitialize(); |
---|
36 | |
---|
37 | /* AbstractLoginAccount */ |
---|
38 | virtual void doLogin(); |
---|
39 | virtual void doLogout(); |
---|
40 | virtual bool stillLoggedIn(); |
---|
41 | |
---|
42 | private: |
---|
43 | SHttpHelper* httpHelper_; |
---|
44 | |
---|
45 | const int MAX_MOBILE; |
---|
46 | |
---|
47 | QString lastHtml_; |
---|
48 | |
---|
49 | void _doPost(const QMap<QString, QString>& posts); |
---|
50 | void _parseMainPage(); |
---|
51 | void _removeRecipients(); |
---|
52 | void _addRecipient(const IContact* recipient); |
---|
53 | void _sendSMS(const QString& text); |
---|
54 | |
---|
55 | Q_DISABLE_COPY(BCAccount); |
---|
56 | }; |
---|
57 | |
---|
58 | } |
---|
59 | |
---|
60 | #endif /* SWISSCOMXTRAZONE_BCACCOUNT_H_ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.