12c67f1f8b869454ed24c0ac3c813aca26d2f3978Marc Blank/* 22c67f1f8b869454ed24c0ac3c813aca26d2f3978Marc Blank * Copyright (C) 2008-2009 Marc Blank 32c67f1f8b869454ed24c0ac3c813aca26d2f3978Marc Blank * Licensed to The Android Open Source Project. 42c67f1f8b869454ed24c0ac3c813aca26d2f3978Marc Blank * 52c67f1f8b869454ed24c0ac3c813aca26d2f3978Marc Blank * Licensed under the Apache License, Version 2.0 (the "License"); 62c67f1f8b869454ed24c0ac3c813aca26d2f3978Marc Blank * you may not use this file except in compliance with the License. 72c67f1f8b869454ed24c0ac3c813aca26d2f3978Marc Blank * You may obtain a copy of the License at 82c67f1f8b869454ed24c0ac3c813aca26d2f3978Marc Blank * 92c67f1f8b869454ed24c0ac3c813aca26d2f3978Marc Blank * http://www.apache.org/licenses/LICENSE-2.0 102c67f1f8b869454ed24c0ac3c813aca26d2f3978Marc Blank * 112c67f1f8b869454ed24c0ac3c813aca26d2f3978Marc Blank * Unless required by applicable law or agreed to in writing, software 122c67f1f8b869454ed24c0ac3c813aca26d2f3978Marc Blank * distributed under the License is distributed on an "AS IS" BASIS, 132c67f1f8b869454ed24c0ac3c813aca26d2f3978Marc Blank * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 142c67f1f8b869454ed24c0ac3c813aca26d2f3978Marc Blank * See the License for the specific language governing permissions and 152c67f1f8b869454ed24c0ac3c813aca26d2f3978Marc Blank * limitations under the License. 162c67f1f8b869454ed24c0ac3c813aca26d2f3978Marc Blank */ 172c67f1f8b869454ed24c0ac3c813aca26d2f3978Marc Blank 180d4fc55861ed4393aa82f124f2865695ef564641Marc Blankpackage com.android.emailcommon.service; 192c67f1f8b869454ed24c0ac3c813aca26d2f3978Marc Blank 2017250429db16553b59d5df5e358f71406dd2b322Andrew Stadleroneway interface IEmailServiceCallback { 21c449cba5101f083d4cef8acd9972bc05598bad44Marc Blank /* 22c449cba5101f083d4cef8acd9972bc05598bad44Marc Blank * Ordinary results: 23ea69fc40d75f5fcf38872f836cdea9fb3aa9c991Andrew Stadler * statuscode = 1, progress = 0: "starting" 24ea69fc40d75f5fcf38872f836cdea9fb3aa9c991Andrew Stadler * statuscode = 0, progress = n/a: "finished" 25c449cba5101f083d4cef8acd9972bc05598bad44Marc Blank * 26c449cba5101f083d4cef8acd9972bc05598bad44Marc Blank * If there is an error, it must be reported as follows: 27ea69fc40d75f5fcf38872f836cdea9fb3aa9c991Andrew Stadler * statuscode = err, progress = n/a: "stopping due to error" 28c449cba5101f083d4cef8acd9972bc05598bad44Marc Blank * 29c449cba5101f083d4cef8acd9972bc05598bad44Marc Blank * *Optionally* a callback can also include intermediate values from 1..99 e.g. 30ea69fc40d75f5fcf38872f836cdea9fb3aa9c991Andrew Stadler * statuscode = 1, progress = 0: "starting" 31ea69fc40d75f5fcf38872f836cdea9fb3aa9c991Andrew Stadler * statuscode = 1, progress = 30: "working" 32ea69fc40d75f5fcf38872f836cdea9fb3aa9c991Andrew Stadler * statuscode = 1, progress = 60: "working" 33ea69fc40d75f5fcf38872f836cdea9fb3aa9c991Andrew Stadler * statuscode = 0, progress = n/a: "finished" 34c449cba5101f083d4cef8acd9972bc05598bad44Marc Blank */ 35c449cba5101f083d4cef8acd9972bc05598bad44Marc Blank 36c449cba5101f083d4cef8acd9972bc05598bad44Marc Blank /** 37c449cba5101f083d4cef8acd9972bc05598bad44Marc Blank * Callback to indicate that a particular attachment is being synced 38c449cba5101f083d4cef8acd9972bc05598bad44Marc Blank * messageId = the message that owns the attachment 39c449cba5101f083d4cef8acd9972bc05598bad44Marc Blank * attachmentId = the attachment being synced 40ea69fc40d75f5fcf38872f836cdea9fb3aa9c991Andrew Stadler * statusCode = 0 for OK, 1 for progress, other codes for error 41ea69fc40d75f5fcf38872f836cdea9fb3aa9c991Andrew Stadler * progress = 0 for "start", 1..100 for optional progress reports 42c449cba5101f083d4cef8acd9972bc05598bad44Marc Blank */ 43c449cba5101f083d4cef8acd9972bc05598bad44Marc Blank void loadAttachmentStatus(long messageId, long attachmentId, int statusCode, int progress); 44ea69fc40d75f5fcf38872f836cdea9fb3aa9c991Andrew Stadler} 45