source: SMSSender/gateways/Post/src/business/gateway.cpp @ 315:e6c8bb244ecd

separation-frontend-backend
Last change on this file since 315:e6c8bb244ecd was 315:e6c8bb244ecd, checked in by Sämy Zehnder <saemy.zehnder@…>, 5 years ago
  • Separates the frontend from the backend code.
  • At this point the schoolnet gateway is converted only.
  • Removes bc & da prefixes from the filenames.
File size: 1.9 KB
Line 
1/*
2  Swiss Post gateway plugin - The smssender plugin for the Swiss Post platform.
3  Copyright (C) 2011-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#include "gateway.h"
19
20#include "business/account.h"
21#include "ui/settingswidget.h"
22
23namespace Post {
24
25QString Gateway::name() const {
26    return "Post";
27}
28
29QImage Gateway::icon() const {
30    return QImage(":/images/Post.ico");
31}
32
33QList<int> Gateway::validRecipientCountryCodes() const {
34    QList<int> result;
35    result.append(41); // CH
36    return result;
37}
38QList<QChar> Gateway::doublePriceChars() const {
39    // Got them from URL_SENDSMS -> function left_char(fld) { ... }
40
41    QList<QChar> dpc;
42    dpc.append('|');
43    dpc.append('^');
44    dpc.append('{');
45    dpc.append('}');
46    dpc.append('[');
47    dpc.append(']');
48    dpc.append('~');
49    dpc.append(QChar(0x20AC)); // €
50    dpc.append('\\');
51    return dpc;
52}
53QList<QChar> Gateway::disAllowedChars() const {
54    return QList<QChar>(); // TODO: Check this
55}
56
57
58IAccount* Gateway::createAccountInstance() {
59    return new Account(this);
60}
61
62IAccountSettingsWidget* Gateway::createAccountSettingsWidget(QWidget *parent) const {
63    return new UI::SettingsWidget(parent);
64}
65
66::Persistence::IStorageHelper *Gateway::createStorageHelper(Persistence::IMainStorage *storage) {
67    Q_UNUSED(storage);
68    return NULL;
69}
70
71} // namespace Post
Note: See TracBrowser for help on using the repository browser.