Back to project page uppidy-android-sdk.
The source code is released under:
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCT...
If you think the Android project uppidy-android-sdk listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/** * Copyright (C) Uppidy Inc, 2012//from w w w . j a v a 2 s . c o m */ package com.uppidy.android.sdk.backup; import com.uppidy.android.sdk.api.ApiSync; /** * @author Vyacheslav Mukhortov * Interface class for message providers used by {@link BackupService} to retrieve the messages to be backed up */ public interface MessageProvider { /** * Iterator method, returns {@link ApiSync} object containing the next portion of {@link ApiMessage}s * and {@link ApiContact}s to be backed up. * Implementor may return {@link ApiSync} with an empty list of messages or null to indicate * that there is nothing to backup. * It seems a good idea to return a limited number of messages, especially MMS. * @return - {@link ApiSync} object to be backed up */ public ApiSync getNextSyncBundle(); /** * Must return the container id used by Uppidy server to keep messages of the type provided by this {@link MessageProvider}. * @return String - Uppidy container ID */ public String getContainerId(); /** * This method will be called by {@link BackupService} if and only if the last {@link ApiSync} object retrieved from * {@code getNextSyncBundle()} is successfully backed up. * Implementor must remember the messages backed up (remove them from database or mark as backed up) and * do not return those messages on subsequent {@code getNextSyncBundle()} calls. * @param sync - ApiSync object being backed up */ public void backupDone( ApiSync sync ); }