1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
  
     | 
    
      /*
 * Copyright (c) 2016 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.android.ims.internal.uce.presence;
import com.android.ims.internal.uce.presence.IPresenceListener;
import com.android.ims.internal.uce.presence.PresCapInfo;
import com.android.ims.internal.uce.presence.PresServiceInfo;
import com.android.ims.internal.uce.common.UceLong;
import com.android.ims.internal.uce.common.StatusCode;
/** IPresenceService
{@hide} */
interface IPresenceService
{
    /**
     * Gets the version of the Presence service implementation.
     * The verion information is received in getVersionCb callback.
     * @param presenceServiceHdl returned in createPresenceService().
     * @return StatusCode, status of the request placed.
     */
    @UnsupportedAppUsage
    StatusCode getVersion(int presenceServiceHdl);
    /**
     * Adds a listener to the Presence service.
     * @param presenceServiceHdl returned in createPresenceService().
     * @param presenceServiceListener IPresenceListener Object.
     * @param presenceServiceListenerHdl wrapper for client's listener handle to be stored.
     *
     * The service will fill UceLong.mUceLong with presenceListenerHandle.
     *
     * @return StatusCode, status of the request placed
     */
    @UnsupportedAppUsage
    StatusCode addListener(int presenceServiceHdl, IPresenceListener presenceServiceListener,
                           inout UceLong presenceServiceListenerHdl);
    /**
     * Removes a listener from the Presence service.
     * @param presenceServiceHdl returned in createPresenceService().
     * @param presenceServiceListenerHdl provided in createPresenceService() or Addlistener().
     * @return StatusCode, status of the request placed.
     */
    @UnsupportedAppUsage
    StatusCode removeListener(int presenceServiceHdl, in UceLong presenceServiceListenerHdl);
    /**
     * Re-enables the Presence service if it is in the Blocked state due to receiving a SIP
     * response 489 Bad event.
     * The application must call this API before calling any presence API after receiving a SIP
     * response 489 Bad event.
     * The status of this request is notified in cmdStatus callback.
     *
     * @param presenceServiceHdl returned in createPresenceService().
     * @param userData, userData provided by client to identify the request/API call, it
     *                  is returned in the cmdStatus() callback for client to match response
     *                  with original request.
     * @return StatusCode, status of the request placed.
     */
    @UnsupportedAppUsage
    StatusCode reenableService(int presenceServiceHdl, int userData);
    /**
     * Sends a request to publish current device capabilities.
     * The network response is notifed in sipResponseReceived() callback.
     * @param presenceServiceHdl returned in createPresenceService().
     * @param myCapInfo PresCapInfo object.
     * @param userData, userData provided by client to identify the request/API call, it
     *                  is returned in the cmdStatus() callback for client to match response
     *                  with original request.
     * @return StatusCode, status of the request placed.
     */
    @UnsupportedAppUsage
    StatusCode publishMyCap(int presenceServiceHdl, in PresCapInfo myCapInfo , int userData);
    /**
     * Retrieves the capability information for a single contact. Clients receive the requested
     * information via the listener callback function capInfoReceived() callback.
     *
     * @param presenceServiceHdl returned in createPresenceService().
     * @param remoteUri remote contact URI
     * @param userData, userData provided by client to identify the request/API call, it
     *                  is returned in the cmdStatus() callback for client to match response
     *                  with original request.
     * @return StatusCode, status of the request placed.
     */
    @UnsupportedAppUsage
    StatusCode getContactCap(int presenceServiceHdl , String remoteUri, int userData);
    /**
     * Retrieves the capability information for a list of contacts. Clients receive the requested
     * information via the listener callback function listCapInfoReceived() callback.
     *
     * @param presenceServiceHdl returned in createPresenceService().
     * @param remoteUriList list of remote contact URI's.
     * @param userData, userData provided by client to identify the request/API call, it
     *                  is returned in the cmdStatus() callback for client to match response
     *                  with original request.
     * @return StatusCode, status of the request placed.
     */
    @UnsupportedAppUsage
    StatusCode getContactListCap(int presenceServiceHdl, in String[] remoteUriList, int userData);
    /**
     * Sets the mapping between a new feature tag and the corresponding service tuple information
     * to be included in the published document.
     * The staus of this call is received in cmdStatus callback.
     *
     * @param presenceServiceHdl returned in createPresenceService().
     * @param featureTag to be supported
     * @param PresServiceInfo service information describing the featureTag.
     * @param userData, userData provided by client to identify the request/API call, it
     *                  is returned in the cmdStatus() callback for client to match response
     *                  with original request.
     * @return StatusCode, status of the request placed.
     */
    @UnsupportedAppUsage
    StatusCode  setNewFeatureTag(int presenceServiceHdl, String featureTag,
                                 in PresServiceInfo serviceInfo, int userData);
}
 
     |