• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2018 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 
17 package android.telephony.ims.aidl;
18 
19 import android.net.Uri;
20 import android.telephony.ims.RcsEventQueryParams;
21 import android.telephony.ims.RcsEventQueryResultDescriptor;
22 import android.telephony.ims.RcsFileTransferCreationParams;
23 import android.telephony.ims.RcsIncomingMessageCreationParams;
24 import android.telephony.ims.RcsMessageSnippet;
25 import android.telephony.ims.RcsMessageQueryParams;
26 import android.telephony.ims.RcsMessageQueryResultParcelable;
27 import android.telephony.ims.RcsOutgoingMessageCreationParams;
28 import android.telephony.ims.RcsParticipantQueryParams;
29 import android.telephony.ims.RcsParticipantQueryResultParcelable;
30 import android.telephony.ims.RcsQueryContinuationToken;
31 import android.telephony.ims.RcsThreadQueryParams;
32 import android.telephony.ims.RcsThreadQueryResultParcelable;
33 
34 /**
35  * RPC definition between RCS storage APIs and phone process.
36  * {@hide}
37  */
38 interface IRcs {
39     /////////////////////////
40     // RcsMessageStore APIs
41     /////////////////////////
getRcsThreads(in RcsThreadQueryParams queryParams, String callingPackage)42     RcsThreadQueryResultParcelable getRcsThreads(in RcsThreadQueryParams queryParams, String callingPackage);
43 
getRcsThreadsWithToken( in RcsQueryContinuationToken continuationToken, String callingPackage)44     RcsThreadQueryResultParcelable getRcsThreadsWithToken(
45         in RcsQueryContinuationToken continuationToken, String callingPackage);
46 
getParticipants(in RcsParticipantQueryParams queryParams, String callingPackage)47     RcsParticipantQueryResultParcelable getParticipants(in RcsParticipantQueryParams queryParams, String callingPackage);
48 
getParticipantsWithToken( in RcsQueryContinuationToken continuationToken, String callingPackage)49     RcsParticipantQueryResultParcelable getParticipantsWithToken(
50         in RcsQueryContinuationToken continuationToken, String callingPackage);
51 
getMessages(in RcsMessageQueryParams queryParams, String callingPackage)52     RcsMessageQueryResultParcelable getMessages(in RcsMessageQueryParams queryParams, String callingPackage);
53 
getMessagesWithToken( in RcsQueryContinuationToken continuationToken, String callingPackage)54     RcsMessageQueryResultParcelable getMessagesWithToken(
55         in RcsQueryContinuationToken continuationToken, String callingPackage);
56 
getEvents(in RcsEventQueryParams queryParams, String callingPackage)57     RcsEventQueryResultDescriptor getEvents(in RcsEventQueryParams queryParams, String callingPackage);
58 
getEventsWithToken( in RcsQueryContinuationToken continuationToken, String callingPackage)59     RcsEventQueryResultDescriptor getEventsWithToken(
60         in RcsQueryContinuationToken continuationToken, String callingPackage);
61 
62     // returns true if the thread was successfully deleted
deleteThread(int threadId, int threadType, String callingPackage)63     boolean deleteThread(int threadId, int threadType, String callingPackage);
64 
65     // Creates an Rcs1To1Thread and returns its row ID
createRcs1To1Thread(int participantId, String callingPackage)66     int createRcs1To1Thread(int participantId, String callingPackage);
67 
68     // Creates an RcsGroupThread and returns its row ID
createGroupThread(in int[] participantIds, String groupName, in Uri groupIcon, String callingPackage)69     int createGroupThread(in int[] participantIds, String groupName, in Uri groupIcon, String callingPackage);
70 
71     /////////////////////////
72     // RcsThread APIs
73     /////////////////////////
74 
75     // Creates a new RcsIncomingMessage on the given thread and returns its row ID
addIncomingMessage(int rcsThreadId, in RcsIncomingMessageCreationParams rcsIncomingMessageCreationParams, String callingPackage)76     int addIncomingMessage(int rcsThreadId,
77             in RcsIncomingMessageCreationParams rcsIncomingMessageCreationParams, String callingPackage);
78 
79     // Creates a new RcsOutgoingMessage on the given thread and returns its row ID
addOutgoingMessage(int rcsThreadId, in RcsOutgoingMessageCreationParams rcsOutgoingMessageCreationParams, String callingPackage)80     int addOutgoingMessage(int rcsThreadId,
81             in RcsOutgoingMessageCreationParams rcsOutgoingMessageCreationParams, String callingPackage);
82 
83     // TODO: modify RcsProvider URI's to allow deleting a message without specifying its thread
deleteMessage(int rcsMessageId, boolean isIncoming, int rcsThreadId, boolean isGroup, String callingPackage)84     void deleteMessage(int rcsMessageId, boolean isIncoming, int rcsThreadId, boolean isGroup, String callingPackage);
85 
getMessageSnippet(int rcsThreadId, String callingPackage)86     RcsMessageSnippet getMessageSnippet(int rcsThreadId, String callingPackage);
87 
88     /////////////////////////
89     // Rcs1To1Thread APIs
90     /////////////////////////
set1To1ThreadFallbackThreadId(int rcsThreadId, long fallbackId, String callingPackage)91     void set1To1ThreadFallbackThreadId(int rcsThreadId, long fallbackId, String callingPackage);
92 
get1To1ThreadFallbackThreadId(int rcsThreadId, String callingPackage)93     long get1To1ThreadFallbackThreadId(int rcsThreadId, String callingPackage);
94 
get1To1ThreadOtherParticipantId(int rcsThreadId, String callingPackage)95     int get1To1ThreadOtherParticipantId(int rcsThreadId, String callingPackage);
96 
97     /////////////////////////
98     // RcsGroupThread APIs
99     /////////////////////////
setGroupThreadName(int rcsThreadId, String groupName, String callingPackage)100     void setGroupThreadName(int rcsThreadId, String groupName, String callingPackage);
101 
getGroupThreadName(int rcsThreadId, String callingPackage)102     String getGroupThreadName(int rcsThreadId, String callingPackage);
103 
setGroupThreadIcon(int rcsThreadId, in Uri groupIcon, String callingPackage)104     void setGroupThreadIcon(int rcsThreadId, in Uri groupIcon, String callingPackage);
105 
getGroupThreadIcon(int rcsThreadId, String callingPackage)106     Uri getGroupThreadIcon(int rcsThreadId, String callingPackage);
107 
setGroupThreadOwner(int rcsThreadId, int participantId, String callingPackage)108     void setGroupThreadOwner(int rcsThreadId, int participantId, String callingPackage);
109 
getGroupThreadOwner(int rcsThreadId, String callingPackage)110     int getGroupThreadOwner(int rcsThreadId, String callingPackage);
111 
setGroupThreadConferenceUri(int rcsThreadId, in Uri conferenceUri, String callingPackage)112     void setGroupThreadConferenceUri(int rcsThreadId, in Uri conferenceUri, String callingPackage);
113 
getGroupThreadConferenceUri(int rcsThreadId, String callingPackage)114     Uri getGroupThreadConferenceUri(int rcsThreadId, String callingPackage);
115 
addParticipantToGroupThread(int rcsThreadId, int participantId, String callingPackage)116     void addParticipantToGroupThread(int rcsThreadId, int participantId, String callingPackage);
117 
removeParticipantFromGroupThread(int rcsThreadId, int participantId, String callingPackage)118     void removeParticipantFromGroupThread(int rcsThreadId, int participantId, String callingPackage);
119 
120     /////////////////////////
121     // RcsParticipant APIs
122     /////////////////////////
123 
124     // Creates a new RcsParticipant and returns its rowId
createRcsParticipant(String canonicalAddress, String alias, String callingPackage)125     int createRcsParticipant(String canonicalAddress, String alias, String callingPackage);
126 
getRcsParticipantCanonicalAddress(int participantId, String callingPackage)127     String getRcsParticipantCanonicalAddress(int participantId, String callingPackage);
128 
getRcsParticipantAlias(int participantId, String callingPackage)129     String getRcsParticipantAlias(int participantId, String callingPackage);
130 
setRcsParticipantAlias(int id, String alias, String callingPackage)131     void setRcsParticipantAlias(int id, String alias, String callingPackage);
132 
getRcsParticipantContactId(int participantId, String callingPackage)133     String getRcsParticipantContactId(int participantId, String callingPackage);
134 
setRcsParticipantContactId(int participantId, String contactId, String callingPackage)135     void setRcsParticipantContactId(int participantId, String contactId, String callingPackage);
136 
137     /////////////////////////
138     // RcsMessage APIs
139     /////////////////////////
setMessageSubId(int messageId, boolean isIncoming, int subId, String callingPackage)140     void setMessageSubId(int messageId, boolean isIncoming, int subId, String callingPackage);
141 
getMessageSubId(int messageId, boolean isIncoming, String callingPackage)142     int getMessageSubId(int messageId, boolean isIncoming, String callingPackage);
143 
setMessageStatus(int messageId, boolean isIncoming, int status, String callingPackage)144     void setMessageStatus(int messageId, boolean isIncoming, int status, String callingPackage);
145 
getMessageStatus(int messageId, boolean isIncoming, String callingPackage)146     int getMessageStatus(int messageId, boolean isIncoming, String callingPackage);
147 
setMessageOriginationTimestamp(int messageId, boolean isIncoming, long originationTimestamp, String callingPackage)148     void setMessageOriginationTimestamp(int messageId, boolean isIncoming, long originationTimestamp, String callingPackage);
149 
getMessageOriginationTimestamp(int messageId, boolean isIncoming, String callingPackage)150     long getMessageOriginationTimestamp(int messageId, boolean isIncoming, String callingPackage);
151 
setGlobalMessageIdForMessage(int messageId, boolean isIncoming, String globalId, String callingPackage)152     void setGlobalMessageIdForMessage(int messageId, boolean isIncoming, String globalId, String callingPackage);
153 
getGlobalMessageIdForMessage(int messageId, boolean isIncoming, String callingPackage)154     String getGlobalMessageIdForMessage(int messageId, boolean isIncoming, String callingPackage);
155 
setMessageArrivalTimestamp(int messageId, boolean isIncoming, long arrivalTimestamp, String callingPackage)156     void setMessageArrivalTimestamp(int messageId, boolean isIncoming, long arrivalTimestamp, String callingPackage);
157 
getMessageArrivalTimestamp(int messageId, boolean isIncoming, String callingPackage)158     long getMessageArrivalTimestamp(int messageId, boolean isIncoming, String callingPackage);
159 
setMessageSeenTimestamp(int messageId, boolean isIncoming, long seenTimestamp, String callingPackage)160     void setMessageSeenTimestamp(int messageId, boolean isIncoming, long seenTimestamp, String callingPackage);
161 
getMessageSeenTimestamp(int messageId, boolean isIncoming, String callingPackage)162     long getMessageSeenTimestamp(int messageId, boolean isIncoming, String callingPackage);
163 
setTextForMessage(int messageId, boolean isIncoming, String text, String callingPackage)164     void setTextForMessage(int messageId, boolean isIncoming, String text, String callingPackage);
165 
getTextForMessage(int messageId, boolean isIncoming, String callingPackage)166     String getTextForMessage(int messageId, boolean isIncoming, String callingPackage);
167 
setLatitudeForMessage(int messageId, boolean isIncoming, double latitude, String callingPackage)168     void setLatitudeForMessage(int messageId, boolean isIncoming, double latitude, String callingPackage);
169 
getLatitudeForMessage(int messageId, boolean isIncoming, String callingPackage)170     double getLatitudeForMessage(int messageId, boolean isIncoming, String callingPackage);
171 
setLongitudeForMessage(int messageId, boolean isIncoming, double longitude, String callingPackage)172     void setLongitudeForMessage(int messageId, boolean isIncoming, double longitude, String callingPackage);
173 
getLongitudeForMessage(int messageId, boolean isIncoming, String callingPackage)174     double getLongitudeForMessage(int messageId, boolean isIncoming, String callingPackage);
175 
176     // Returns the ID's of the file transfers attached to the given message
getFileTransfersAttachedToMessage(int messageId, boolean isIncoming, String callingPackage)177     int[] getFileTransfersAttachedToMessage(int messageId, boolean isIncoming, String callingPackage);
178 
getSenderParticipant(int messageId, String callingPackage)179     int getSenderParticipant(int messageId, String callingPackage);
180 
181     /////////////////////////
182     // RcsOutgoingMessageDelivery APIs
183     /////////////////////////
184 
185     // Returns the participant ID's that this message is intended to be delivered to
getMessageRecipients(int messageId, String callingPackage)186     int[] getMessageRecipients(int messageId, String callingPackage);
187 
getOutgoingDeliveryDeliveredTimestamp(int messageId, int participantId, String callingPackage)188     long getOutgoingDeliveryDeliveredTimestamp(int messageId, int participantId, String callingPackage);
189 
setOutgoingDeliveryDeliveredTimestamp(int messageId, int participantId, long deliveredTimestamp, String callingPackage)190     void setOutgoingDeliveryDeliveredTimestamp(int messageId, int participantId, long deliveredTimestamp, String callingPackage);
191 
getOutgoingDeliverySeenTimestamp(int messageId, int participantId, String callingPackage)192     long getOutgoingDeliverySeenTimestamp(int messageId, int participantId, String callingPackage);
193 
setOutgoingDeliverySeenTimestamp(int messageId, int participantId, long seenTimestamp, String callingPackage)194     void setOutgoingDeliverySeenTimestamp(int messageId, int participantId, long seenTimestamp, String callingPackage);
195 
getOutgoingDeliveryStatus(int messageId, int participantId, String callingPackage)196     int getOutgoingDeliveryStatus(int messageId, int participantId, String callingPackage);
197 
setOutgoingDeliveryStatus(int messageId, int participantId, int status, String callingPackage)198     void setOutgoingDeliveryStatus(int messageId, int participantId, int status, String callingPackage);
199 
200     /////////////////////////
201     // RcsFileTransferPart APIs
202     /////////////////////////
203 
204     // Performs the initial write to storage and returns the row ID.
storeFileTransfer(int messageId, boolean isIncoming, in RcsFileTransferCreationParams fileTransferCreationParams, String callingPackage)205     int storeFileTransfer(int messageId, boolean isIncoming,
206             in RcsFileTransferCreationParams fileTransferCreationParams, String callingPackage);
207 
deleteFileTransfer(int partId, String callingPackage)208     void deleteFileTransfer(int partId, String callingPackage);
209 
setFileTransferSessionId(int partId, String sessionId, String callingPackage)210     void setFileTransferSessionId(int partId, String sessionId, String callingPackage);
211 
getFileTransferSessionId(int partId, String callingPackage)212     String getFileTransferSessionId(int partId, String callingPackage);
213 
setFileTransferContentUri(int partId, in Uri contentUri, String callingPackage)214     void setFileTransferContentUri(int partId, in Uri contentUri, String callingPackage);
215 
getFileTransferContentUri(int partId, String callingPackage)216     Uri getFileTransferContentUri(int partId, String callingPackage);
217 
setFileTransferContentType(int partId, String contentType, String callingPackage)218     void setFileTransferContentType(int partId, String contentType, String callingPackage);
219 
getFileTransferContentType(int partId, String callingPackage)220     String getFileTransferContentType(int partId, String callingPackage);
221 
setFileTransferFileSize(int partId, long fileSize, String callingPackage)222     void setFileTransferFileSize(int partId, long fileSize, String callingPackage);
223 
getFileTransferFileSize(int partId, String callingPackage)224     long getFileTransferFileSize(int partId, String callingPackage);
225 
setFileTransferTransferOffset(int partId, long transferOffset, String callingPackage)226     void setFileTransferTransferOffset(int partId, long transferOffset, String callingPackage);
227 
getFileTransferTransferOffset(int partId, String callingPackage)228     long getFileTransferTransferOffset(int partId, String callingPackage);
229 
setFileTransferStatus(int partId, int transferStatus, String callingPackage)230     void setFileTransferStatus(int partId, int transferStatus, String callingPackage);
231 
getFileTransferStatus(int partId, String callingPackage)232     int getFileTransferStatus(int partId, String callingPackage);
233 
setFileTransferWidth(int partId, int width, String callingPackage)234     void setFileTransferWidth(int partId, int width, String callingPackage);
235 
getFileTransferWidth(int partId, String callingPackage)236     int getFileTransferWidth(int partId, String callingPackage);
237 
setFileTransferHeight(int partId, int height, String callingPackage)238     void setFileTransferHeight(int partId, int height, String callingPackage);
239 
getFileTransferHeight(int partId, String callingPackage)240     int getFileTransferHeight(int partId, String callingPackage);
241 
setFileTransferLength(int partId, long length, String callingPackage)242     void setFileTransferLength(int partId, long length, String callingPackage);
243 
getFileTransferLength(int partId, String callingPackage)244     long getFileTransferLength(int partId, String callingPackage);
245 
setFileTransferPreviewUri(int partId, in Uri uri, String callingPackage)246     void setFileTransferPreviewUri(int partId, in Uri uri, String callingPackage);
247 
getFileTransferPreviewUri(int partId, String callingPackage)248     Uri getFileTransferPreviewUri(int partId, String callingPackage);
249 
setFileTransferPreviewType(int partId, String type, String callingPackage)250     void setFileTransferPreviewType(int partId, String type, String callingPackage);
251 
getFileTransferPreviewType(int partId, String callingPackage)252     String getFileTransferPreviewType(int partId, String callingPackage);
253 
254     /////////////////////////
255     // RcsEvent APIs
256     /////////////////////////
createGroupThreadNameChangedEvent(long timestamp, int threadId, int originationParticipantId, String newName, String callingPackage)257     int createGroupThreadNameChangedEvent(long timestamp, int threadId, int originationParticipantId, String newName, String callingPackage);
258 
createGroupThreadIconChangedEvent(long timestamp, int threadId, int originationParticipantId, in Uri newIcon, String callingPackage)259     int createGroupThreadIconChangedEvent(long timestamp, int threadId, int originationParticipantId, in Uri newIcon, String callingPackage);
260 
createGroupThreadParticipantJoinedEvent(long timestamp, int threadId, int originationParticipantId, int participantId, String callingPackage)261     int createGroupThreadParticipantJoinedEvent(long timestamp, int threadId, int originationParticipantId, int participantId, String callingPackage);
262 
createGroupThreadParticipantLeftEvent(long timestamp, int threadId, int originationParticipantId, int participantId, String callingPackage)263     int createGroupThreadParticipantLeftEvent(long timestamp, int threadId, int originationParticipantId, int participantId, String callingPackage);
264 
createParticipantAliasChangedEvent(long timestamp, int participantId, String newAlias, String callingPackage)265     int createParticipantAliasChangedEvent(long timestamp, int participantId, String newAlias, String callingPackage);
266 }