1 /*
2  * Copyright (C) 2010 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 com.android.contacts.list;
17 
18 import android.net.Uri;
19 
20 /**
21  * Action callbacks that can be sent by a contact list.
22  */
23 public interface OnContactBrowserActionListener  {
24 
25     /**
26      * Notification of selection change, invoked when the selection of activated
27      * item(s) is change by either a user action or some other event, e.g. sync.
28      */
onSelectionChange()29     void onSelectionChange();
30 
31     /**
32      * Opens the specified contact for viewing.
33      *
34      * @param contactLookupUri The lookup-uri of the Contact that should be opened
35      */
onViewContactAction(Uri contactLookupUri)36     void onViewContactAction(Uri contactLookupUri);
37 
38     /**
39      * Initiates the contact deletion process.
40      */
onDeleteContactAction(Uri contactUri)41     void onDeleteContactAction(Uri contactUri);
42 
43     /**
44      * Closes the contact browser.
45      */
onFinishAction()46     void onFinishAction();
47 
48     /**
49      * Invoked if the requested selected contact is not found in the list.
50      */
onInvalidSelection()51     void onInvalidSelection();
52 }
53