The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2008 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | package android.im; |
| 17 | |
| 18 | /** |
| 19 | * @hide |
| 20 | */ |
| 21 | interface IImPlugin { |
| 22 | /** |
| 23 | * Notify the plugin the front door activity is created. This gives the plugin a chance to |
| 24 | * start its own servics, etc. |
| 25 | */ |
| 26 | void onStart(); |
| 27 | |
| 28 | /** |
| 29 | * Notify the plugin the front door activity is stopping. |
| 30 | */ |
| 31 | void onStop(); |
| 32 | |
| 33 | /** |
| 34 | * Sign in to the service for the account passed in. |
| 35 | * |
| 36 | * @param account the account id for the accont to be signed into. |
| 37 | */ |
| 38 | void signIn(long account); |
| 39 | |
| 40 | /** |
| 41 | * Sign out of the service for the account passed in. |
| 42 | * |
| 43 | * @param account the account id for the accont to be signed out of. |
| 44 | */ |
| 45 | void signOut(long account); |
| 46 | |
| 47 | /** |
| 48 | * Returns the package name used to load the resources for the given provider name. |
| 49 | * |
| 50 | * @return The package name to load the resourcs for the given provider. |
| 51 | */ |
| 52 | String getResourcePackageNameForProvider(String providerName); |
| 53 | |
| 54 | /** |
| 55 | * Returns a map of branding resources for the given provider. The keys are defined |
| 56 | * in {@link android.im.BrandingResourceIDs}. The values are the resource identifiers generated |
| 57 | * by the aapt tool. |
| 58 | * |
| 59 | * @return The map of branding resources for the given provider. |
| 60 | */ |
| 61 | Map getResourceMapForProvider(String providerName); |
| 62 | |
| 63 | /* |
| 64 | * Returns a list of supported IM providers. |
| 65 | * |
| 66 | * @return a List of supported providers. |
| 67 | */ |
| 68 | List getSupportedProviders(); |
| 69 | } |