1363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang/*
2363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang * Copyright (C) 2010 The Android Open Source Project
3363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang *
4363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang * Licensed under the Apache License, Version 2.0 (the "License");
5363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang * you may not use this file except in compliance with the License.
6363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang * You may obtain a copy of the License at
7363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang *
8363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang *      http://www.apache.org/licenses/LICENSE-2.0
9363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang *
10363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang * Unless required by applicable law or agreed to in writing, software
11363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang * distributed under the License is distributed on an "AS IS" BASIS,
12363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang * See the License for the specific language governing permissions and
14363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang * limitations under the License.
15363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang */
16363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang
17363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wangpackage android.net.sip;
18363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang
19363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang/**
2002b1d685cc287d7c53141872b3d80be4ee5dd59eScott Main * Listener for SIP registration events.
21363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang */
22363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wangpublic interface SipRegistrationListener {
23363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang    /**
24363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang     * Called when a registration request is sent.
25363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang     *
26363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang     * @param localProfileUri the URI string of the SIP profile to register with
27363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang     */
28363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang    void onRegistering(String localProfileUri);
29363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang
30363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang    /**
31286bb5a00bdb9f0cb0815aef441ec72f231c84eaHung-ying Tyan     * Called when the registration succeeded.
32363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang     *
33363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang     * @param localProfileUri the URI string of the SIP profile to register with
34286bb5a00bdb9f0cb0815aef441ec72f231c84eaHung-ying Tyan     * @param expiryTime duration in seconds before the registration expires
35363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang     */
36363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang    void onRegistrationDone(String localProfileUri, long expiryTime);
37363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang
38363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang    /**
39286bb5a00bdb9f0cb0815aef441ec72f231c84eaHung-ying Tyan     * Called when the registration failed.
40363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang     *
41363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang     * @param localProfileUri the URI string of the SIP profile to register with
4299bf4e45c4566172189735b34b368b76660ca57aHung-ying Tyan     * @param errorCode error code of this error
43363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang     * @param errorMessage error message
4497963794af1e18674dd111e3ad344d90b16c922cHung-ying Tyan     * @see SipErrorCode
45363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang     */
4697963794af1e18674dd111e3ad344d90b16c922cHung-ying Tyan    void onRegistrationFailed(String localProfileUri, int errorCode,
47363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang            String errorMessage);
48363c2ab82cca4f095e9e0c8465e28f6d27a24bf8Chung-yih Wang}
49