Alexandre Savard | f7f9e0b | 2012-10-15 17:24:07 -0400 | [diff] [blame] | 1 | /** |
| 2 | * Copyright (C) 2004-2012 Savoir-Faire Linux Inc. |
| 3 | * |
| 4 | * Author: Alexandre Savard <alexandre.savard@savoirfairelinux.com> |
| 5 | * |
| 6 | * This program is free software: you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation, either version 3 of the License, or |
| 9 | * (at your option) any later version. |
| 10 | * If you own a pjsip commercial license you can also redistribute it |
| 11 | * and/or modify it under the terms of the GNU Lesser General Public License |
| 12 | * as an android library. |
| 13 | * |
| 14 | * This program is distributed in the hope that it will be useful, |
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | * GNU General Public License for more details. |
| 18 | * |
| 19 | * You should have received a copy of the GNU General Public License |
| 20 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 21 | */ |
alision | f76de3b | 2013-04-16 15:35:22 -0400 | [diff] [blame] | 22 | package com.savoirfairelinux.sflphone.account; |
Alexandre Savard | f7f9e0b | 2012-10-15 17:24:07 -0400 | [diff] [blame] | 23 | |
Alexandre Savard | 6883811 | 2012-10-30 11:34:43 -0400 | [diff] [blame] | 24 | import java.util.ArrayList; |
Alexandre Savard | 833616f | 2012-10-30 16:02:30 -0400 | [diff] [blame] | 25 | import java.util.HashMap; |
Alexandre Savard | f7f9e0b | 2012-10-15 17:24:07 -0400 | [diff] [blame] | 26 | |
alision | 55c36cb | 2013-06-14 14:57:38 -0400 | [diff] [blame^] | 27 | import android.provider.MediaStore; |
| 28 | import android.provider.MediaStore.Audio.Media; |
| 29 | |
Alexandre Savard | f7f9e0b | 2012-10-15 17:24:07 -0400 | [diff] [blame] | 30 | public interface AccountDetail { |
| 31 | |
| 32 | public static class PreferenceEntry |
| 33 | { |
| 34 | public String mKey; |
| 35 | public int mLabelId; |
Alexandre Savard | 20d0de0 | 2012-10-16 14:05:44 -0400 | [diff] [blame] | 36 | public boolean isTwoState; |
Alexandre Savard | 6883811 | 2012-10-30 11:34:43 -0400 | [diff] [blame] | 37 | public String mValue; |
Alexandre Savard | f7f9e0b | 2012-10-15 17:24:07 -0400 | [diff] [blame] | 38 | |
| 39 | public PreferenceEntry(String key, int labelId) |
| 40 | { |
| 41 | mKey = key; |
| 42 | mLabelId = labelId; |
Alexandre Savard | 20d0de0 | 2012-10-16 14:05:44 -0400 | [diff] [blame] | 43 | isTwoState = false; |
Alexandre Savard | 6883811 | 2012-10-30 11:34:43 -0400 | [diff] [blame] | 44 | mValue = ""; |
alision | 55c36cb | 2013-06-14 14:57:38 -0400 | [diff] [blame^] | 45 | |
Alexandre Savard | 20d0de0 | 2012-10-16 14:05:44 -0400 | [diff] [blame] | 46 | } |
| 47 | |
| 48 | public PreferenceEntry(String key, int labelId, boolean twoState) |
| 49 | { |
| 50 | mKey = key; |
| 51 | mLabelId = labelId; |
| 52 | isTwoState = twoState; |
Alexandre Savard | 6883811 | 2012-10-30 11:34:43 -0400 | [diff] [blame] | 53 | mValue = ""; |
| 54 | } |
| 55 | |
| 56 | public PreferenceEntry(String key, int labelId, boolean twoState, String value) |
| 57 | { |
| 58 | mKey = key; |
| 59 | mLabelId = labelId; |
| 60 | isTwoState = twoState; |
| 61 | mValue = value; |
Alexandre Savard | f7f9e0b | 2012-10-15 17:24:07 -0400 | [diff] [blame] | 62 | } |
| 63 | } |
| 64 | |
alision | d9e2944 | 2013-04-17 16:10:18 -0400 | [diff] [blame] | 65 | public static final String TAG = "PreferenceHashMap"; |
| 66 | |
Alexandre Savard | 6883811 | 2012-10-30 11:34:43 -0400 | [diff] [blame] | 67 | public ArrayList<PreferenceEntry> getDetailValues(); |
Alexandre Savard | f7f9e0b | 2012-10-15 17:24:07 -0400 | [diff] [blame] | 68 | |
Alexandre Savard | 6883811 | 2012-10-30 11:34:43 -0400 | [diff] [blame] | 69 | public ArrayList<String> getValuesOnly(); |
| 70 | |
Alexandre Savard | 833616f | 2012-10-30 16:02:30 -0400 | [diff] [blame] | 71 | public HashMap<String, String> getDetailsHashMap(); |
| 72 | |
Alexandre Savard | 6883811 | 2012-10-30 11:34:43 -0400 | [diff] [blame] | 73 | public String getDetailString(String key); |
| 74 | |
Alexandre Savard | 833616f | 2012-10-30 16:02:30 -0400 | [diff] [blame] | 75 | public void setDetailString(int position, String newValue); |
| 76 | |
Alexandre Savard | 6883811 | 2012-10-30 11:34:43 -0400 | [diff] [blame] | 77 | public boolean getDetailBoolean(); |
Alexandre Savard | f7f9e0b | 2012-10-15 17:24:07 -0400 | [diff] [blame] | 78 | } |
| 79 | |