1 /* 2 * Copyright (C) 2007 Esmertec AG. 3 * Copyright (C) 2007 The Android Open Source Project 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18 package com.android.im; 19 20 import com.android.im.IContactList; 21 import com.android.im.engine.Contact; 22 import com.android.im.engine.ImErrorInfo; 23 24 oneway interface IContactListListener { 25 /** 26 * Called when: 27 * <ul> 28 * <li> a contact list has been created, deleted, renamed or loaded, or 29 * <li> a contact has been added to or removed from a list, or 30 * <li> a contact has been blocked or unblocked 31 * </ul> 32 * 33 * @see com.android.im.engine.ContactListListener#onContactChange(int, ContactList, Contact) 34 */ 35 void onContactChange(int type, IContactList list, in Contact contact); 36 37 /** 38 * Called when all the contact lists have been loaded from server. 39 * 40 * @see com.android.im.engine.ContactListListener#onAllContactListsLoaded() 41 */ 42 void onAllContactListsLoaded(); 43 44 /** 45 * Called when one or more contacts' presence information has updated. 46 * 47 * @see com.android.im.engine.ContactListListener#onContactsPresenceUpdate(Contact[]) 48 */ 49 void onContactsPresenceUpdate(in Contact[] contacts); 50 51 /** 52 * Called when a previous contact related request has failed. 53 * 54 * @see com.android.im.engine.ContactListListener#onContactError(int, ImErrorInfo, String, Contact) 55 */ 56 void onContactError(int errorType, in ImErrorInfo error, String listName, in Contact contact); 57 } 58