2009-06-16 19:03:45 +00:00
|
|
|
/*
|
2010-08-24 04:56:45 +00:00
|
|
|
* Copyright (C) 2008-2010 Marc Blank
|
2009-06-16 19:03:45 +00:00
|
|
|
* Licensed to 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.
|
|
|
|
*/
|
|
|
|
|
2011-02-09 01:50:30 +00:00
|
|
|
package com.android.emailcommon.service;
|
|
|
|
|
2014-07-02 20:29:58 +00:00
|
|
|
import com.android.emailcommon.service.HostAuthCompat;
|
2011-02-09 01:50:30 +00:00
|
|
|
import com.android.emailcommon.service.IEmailServiceCallback;
|
2011-06-02 19:06:22 +00:00
|
|
|
import com.android.emailcommon.service.SearchParams;
|
2014-02-26 02:07:07 +00:00
|
|
|
|
2009-12-18 17:18:55 +00:00
|
|
|
import android.os.Bundle;
|
2009-06-16 19:03:45 +00:00
|
|
|
|
2009-07-07 16:39:11 +00:00
|
|
|
interface IEmailService {
|
2014-01-29 23:24:06 +00:00
|
|
|
// Core email operations.
|
2014-06-12 17:59:57 +00:00
|
|
|
// Many of these functions return status codes. The valid status codes are defined in
|
|
|
|
// EmailServiceStatus.java
|
2014-02-26 16:57:53 +00:00
|
|
|
oneway void loadAttachment(IEmailServiceCallback cb, long accountId, long attachmentId,
|
|
|
|
boolean background);
|
2009-06-16 19:03:45 +00:00
|
|
|
|
2014-06-12 17:59:57 +00:00
|
|
|
void updateFolderList(long accountId);
|
|
|
|
|
|
|
|
// TODO: For Eas, sync() will also sync the outbox. We should make IMAP and POP work the same
|
|
|
|
// way and get rid of sendMail().
|
|
|
|
void sendMail(long accountId);
|
2014-05-22 20:21:55 +00:00
|
|
|
|
2014-06-12 17:59:57 +00:00
|
|
|
int sync(long accountId, inout Bundle syncExtras);
|
2014-02-26 02:07:07 +00:00
|
|
|
|
2014-02-25 01:34:37 +00:00
|
|
|
// Push-related functionality.
|
|
|
|
|
|
|
|
// Notify the service that the push configuration has changed for an account.
|
|
|
|
void pushModify(long accountId);
|
|
|
|
|
2014-01-29 23:24:06 +00:00
|
|
|
// Other email operations.
|
2014-07-02 20:29:58 +00:00
|
|
|
Bundle validate(in HostAuthCompat hostauth);
|
2014-05-22 20:21:55 +00:00
|
|
|
|
2014-01-29 23:24:06 +00:00
|
|
|
int searchMessages(long accountId, in SearchParams params, long destMailboxId);
|
2009-09-27 02:02:49 +00:00
|
|
|
|
2014-01-29 23:24:06 +00:00
|
|
|
// PIM functionality (not strictly EAS specific).
|
|
|
|
oneway void sendMeetingResponse(long messageId, int response);
|
2009-12-18 17:18:55 +00:00
|
|
|
|
2014-01-29 23:24:06 +00:00
|
|
|
// Specific to EAS protocol.
|
2014-07-02 20:29:58 +00:00
|
|
|
// TODO: this passes a HostAuth back in the bundle. We should be using a HostAuthCom for that.
|
2009-12-18 17:18:55 +00:00
|
|
|
Bundle autoDiscover(String userName, String password);
|
2010-01-25 20:38:32 +00:00
|
|
|
|
2014-01-29 23:24:06 +00:00
|
|
|
// Service control operations (i.e. does not generate a client-server message).
|
2014-06-12 17:59:57 +00:00
|
|
|
// TODO: We should store the logging flags in the contentProvider, and this call should just
|
|
|
|
// trigger the service to reload the flags.
|
|
|
|
oneway void setLogging(int flags);
|
2014-05-21 20:41:37 +00:00
|
|
|
|
2014-07-10 22:08:29 +00:00
|
|
|
void deleteExternalAccountPIMData(String emailAddress);
|
|
|
|
|
|
|
|
int getApiVersion();
|
2011-06-14 01:48:05 +00:00
|
|
|
}
|