do builddoc.sh - view http://nossl.ub0r.de/~f/websms/doc/ for results
[andGMXsms.git] / src / de / ub0r / android / andGMXsms / ConnectorSpecs.java
blobac8eded3755efb2448dc459f4c10f8db6047523f
1 /*
2 * Copyright (C) 2010 Felix Bechstein
3 *
4 * This file is part of AndGMXsms.
5 *
6 * This program is free software; you can redistribute it and/or modify it under
7 * the terms of the GNU General Public License as published by the Free Software
8 * Foundation; either version 3 of the License, or (at your option) any later
9 * version.
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14 * details.
16 * You should have received a copy of the GNU General Public License along with
17 * this program; If not, see <http://www.gnu.org/licenses/>.
20 package de.ub0r.android.andGMXsms;
22 import android.content.Context;
23 import android.content.Intent;
25 /**
26 * ConnectorSpecs presents all necessary informations to use a connector.
28 * @author flx
30 public interface ConnectorSpecs {
32 /** Prefs: enable connector. */
33 String PREFS_ENABLED = "enable_";
35 /** Feature: none. */
36 short FEATURE_NONE = 0;
37 /** Feature: multiple recipients. */
38 short FEATURE_MULTIRECIPIENTS = 1;
39 /** Feature: flash sms. */
40 short FEATURE_FLASHSMS = 2;
41 /** Feature: send later. */
42 short FEATURE_SENDLATER = 4;
43 /** Feature: custom sender. */
44 short FEATURE_CUSTOMSENDER = 8;
46 /**
47 * Init ConnectorSpecs' context.
49 * @param c
50 * context
52 void init(final Context c);
54 /**
55 * Get a fresh Connector.
57 * @param c
58 * context
59 * @return Connector
61 Connector getConnector(final Context c);
63 /**
64 * @return true if connector is enabled
66 boolean isEnabled();
68 /**
69 * Set Account's balance.
71 * @param b
72 * balance
74 void setBalance(final String b);
76 /**
77 * Get Conector's account balance. This does not run any update!
79 * @return balance
81 String getBalance();
83 /**
84 * @return connector's author
86 String getAuthor();
88 /**
89 * @return prefix for preferences
91 String getPrefsPrefix();
93 /**
94 * @return connector's preference intent
96 Intent getPreferencesIntent();
98 /**
99 * @return connector's preference title
101 String getPreferencesTitle();
104 * @param shortName
105 * get short name?
106 * @return conector's name
108 String getName(final boolean shortName);
111 * @return supported feature
113 short getFeatures();