source: SMSSender/gateways/SwisscomXtraZone/src/business/BCAccount.h @ 43:10dd65d71f7f

3.0
Last change on this file since 43:10dd65d71f7f was 43:10dd65d71f7f, checked in by Sämy Zehnder <saemy.zehnder@…>, 12 years ago
  • Did a lot of work...
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 <AbstractLoginAccount.h>
12#include <persistence/istorage.h>
13
14#include <HttpHelper.h>
15
16namespace SwisscomXtraZone {
17
18class BCAccount: public AbstractLoginAccount {
19    Q_OBJECT
20
21public:
22    explicit BCAccount(IStorage* storage);
23    virtual ~BCAccount();
24
25    /* ILoginAccount */
26    virtual ILoginGateway*   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;
33protected:
34    /* AbstractAccount */
35    virtual void             doInitialize();
36
37    /* AbstractLoginAccount */
38    virtual void             doLogin();
39    virtual void             doLogout();
40    virtual bool             stillLoggedIn();
41
42private:
43    HttpHelper*     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.