• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2008-2010 Marc Blank
3  * Licensed to The Android Open Source Project.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 package com.android.emailcommon.service;
19 
20 import com.android.emailcommon.provider.HostAuth;
21 import com.android.emailcommon.service.IEmailServiceCallback;
22 import com.android.emailcommon.service.SearchParams;
23 import android.os.Bundle;
24 
25 interface IEmailService {
validate(in HostAuth hostauth)26     Bundle validate(in HostAuth hostauth);
27 
startSync(long mailboxId, boolean userRequest)28     oneway void startSync(long mailboxId, boolean userRequest);
stopSync(long mailboxId)29     oneway void stopSync(long mailboxId);
30 
loadMore(long messageId)31     oneway void loadMore(long messageId);
loadAttachment(long attachmentId, boolean background)32     oneway void loadAttachment(long attachmentId, boolean background);
33 
updateFolderList(long accountId)34     oneway void updateFolderList(long accountId);
35 
createFolder(long accountId, String name)36     boolean createFolder(long accountId, String name);
deleteFolder(long accountId, String name)37     boolean deleteFolder(long accountId, String name);
renameFolder(long accountId, String oldName, String newName)38     boolean renameFolder(long accountId, String oldName, String newName);
39 
40     // Must not be oneway; unless an exception is thrown, the caller is guaranteed that the callback
41     // has been registered
setCallback(IEmailServiceCallback cb)42     void setCallback(IEmailServiceCallback cb);
43 
setLogging(int on)44     oneway void setLogging(int on);
45 
hostChanged(long accountId)46     oneway void hostChanged(long accountId);
47 
autoDiscover(String userName, String password)48     Bundle autoDiscover(String userName, String password);
49 
sendMeetingResponse(long messageId, int response)50     oneway void sendMeetingResponse(long messageId, int response);
51 
52     // Must not be oneway; unless an exception is thrown, the caller is guaranteed that the action
53     // has been completed
deleteAccountPIMData(long accountId)54     void deleteAccountPIMData(long accountId);
55 
getApiLevel()56     int getApiLevel();
57 
58     // API level 2
searchMessages(long accountId, in SearchParams params, long destMailboxId)59     int searchMessages(long accountId, in SearchParams params, long destMailboxId);
60 }
61