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 */
16package com.android.contacts.list;
17
18import android.net.Uri;
19
20/**
21 * Action callbacks that can be sent by a contact list.
22 */
23public 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     */
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     */
36    void onViewContactAction(Uri contactLookupUri);
37
38    /**
39     * Creates a new contact.
40     */
41    void onCreateNewContactAction();
42
43    /**
44     * Opens the specified contact for editing.
45     */
46    void onEditContactAction(Uri contactLookupUri);
47
48    /**
49     * Initiates the contact deletion process.
50     */
51    void onDeleteContactAction(Uri contactUri);
52
53    /**
54     * Adds the specified contact to favorites
55     */
56    void onAddToFavoritesAction(Uri contactUri);
57
58    /**
59     * Removes the specified contact from favorites.
60     */
61    void onRemoveFromFavoritesAction(Uri contactUri);
62
63    /**
64     * Places a call to the specified contact.
65     */
66    void onCallContactAction(Uri contactUri);
67
68    /**
69     * Initiates a text message to the specified contact.
70     */
71    void onSmsContactAction(Uri contactUri);
72
73    /**
74     * Closes the contact browser.
75     */
76    void onFinishAction();
77
78    /**
79     * Invoked if the requested selected contact is not found in the list.
80     */
81    void onInvalidSelection();
82}
83