|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vodafone360.people.engine.contactsync.BaseSyncProcessor com.vodafone360.people.engine.contactsync.FetchNativeContacts
public class FetchNativeContacts
Processor handling retrieval of contacts from the native database. These contacts will be synced to the People server if necessary.
Field Summary | |
---|---|
private NativeImporter |
mNativeImporter
The NativeImporter instance that will take care of fetching contacts from the native address book. |
Fields inherited from class com.vodafone360.people.engine.contactsync.BaseSyncProcessor |
---|
mCallback, mDb, mFailureList |
Constructor Summary | |
---|---|
protected |
FetchNativeContacts(IContactSyncCallback callback,
DatabaseHelper db,
Context context,
ContentResolver cr)
Processor constructor. |
Method Summary | |
---|---|
protected void |
doCancel()
Can be called anytime when the processor is active, to cancel the sync. |
protected void |
doStart()
Implemented by all contact sync processors to initiate the sync. |
void |
onTimeoutEvent()
Can be overriden by processors which are interested in timeout events. |
void |
processCommsResponse(ResponseQueue.Response resp)
Called when a comms response is received from the server. |
void |
setProgress(java.lang.String contactName,
int progress,
int processed,
int total)
Helper function to report progress to the engine. |
Methods inherited from class com.vodafone360.people.engine.contactsync.BaseSyncProcessor |
---|
cancel, complete, getEngine, markDbChanged, onComplete, setReqId, setSyncStatus, setTimeout, start |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private NativeImporter mNativeImporter
Constructor Detail |
---|
protected FetchNativeContacts(IContactSyncCallback callback, DatabaseHelper db, Context context, ContentResolver cr)
callback
- Provides access to contact sync engine callback functionsdb
- Provides access to People databasecontext
- Context needed for accessing native databasecr
- ContentResolver used throughout people serviceMethod Detail |
---|
protected void doStart()
BaseSyncProcessor
IContactSyncCallback.onProcessorComplete(ServiceStatus, String, Object)
method when the sync is finished (the usual way to do this is by calling
BaseSyncProcessor.complete(ServiceStatus)
).
doStart
in class BaseSyncProcessor
protected void doCancel()
BaseSyncProcessor
BaseSyncProcessor.cancel()
will take care of this.
doCancel
in class BaseSyncProcessor
public void processCommsResponse(ResponseQueue.Response resp)
BaseSyncProcessor
processCommsResponse
in class BaseSyncProcessor
resp
- The response datapublic void onTimeoutEvent()
BaseSyncProcessor
onTimeoutEvent
in class BaseSyncProcessor
public void setProgress(java.lang.String contactName, int progress, int processed, int total)
contactName
- the name of the last contactprogress
- the progression as a percentageprocessed
- the number of processed contactstotla
- the total count of contacts to process
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
JavaDoc