198cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang/*
298cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang * Copyright (C) 2010 The Android Open Source Project
398cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang *
498cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang * Licensed under the Apache License, Version 2.0 (the "License");
598cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang * you may not use this file except in compliance with the License.
698cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang * You may obtain a copy of the License at
798cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang *
898cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang *      http://www.apache.org/licenses/LICENSE-2.0
998cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang *
1098cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang * Unless required by applicable law or agreed to in writing, software
1198cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang * distributed under the License is distributed on an "AS IS" BASIS,
1298cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1398cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang * See the License for the specific language governing permissions and
1498cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang * limitations under the License.
1598cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang */
1698cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang
1798cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wangpackage android.net.sip;
1898cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang
1998cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang/**
2016b441b4ad92c6a5cbc6f27cb3705eaaaaee20c1Scott Main * Listener for SIP registration events.
2198cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang */
2298cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wangpublic interface SipRegistrationListener {
2398cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang    /**
2498cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang     * Called when a registration request is sent.
2598cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang     *
2698cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang     * @param localProfileUri the URI string of the SIP profile to register with
2798cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang     */
2898cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang    void onRegistering(String localProfileUri);
2998cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang
3098cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang    /**
31901503e1cf8b6cfac1540a22c325eb5cdd879429Hung-ying Tyan     * Called when the registration succeeded.
3298cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang     *
3398cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang     * @param localProfileUri the URI string of the SIP profile to register with
34901503e1cf8b6cfac1540a22c325eb5cdd879429Hung-ying Tyan     * @param expiryTime duration in seconds before the registration expires
3598cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang     */
3698cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang    void onRegistrationDone(String localProfileUri, long expiryTime);
3798cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang
3898cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang    /**
39901503e1cf8b6cfac1540a22c325eb5cdd879429Hung-ying Tyan     * Called when the registration failed.
4098cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang     *
4198cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang     * @param localProfileUri the URI string of the SIP profile to register with
421ab079168ccc185408a8691c6b804021d79f7376Hung-ying Tyan     * @param errorCode error code of this error
4398cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang     * @param errorMessage error message
44a0171082cfc4b860a82dcf5ebbd498b253f1032fHung-ying Tyan     * @see SipErrorCode
4598cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang     */
46a0171082cfc4b860a82dcf5ebbd498b253f1032fHung-ying Tyan    void onRegistrationFailed(String localProfileUri, int errorCode,
4798cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang            String errorMessage);
4898cee0ce2354234e72bafb836864ec10a490ea4dChung-yih Wang}
49