github.com/olivere/camlistore@v0.0.0-20140121221811-1b7ac2da0199/clients/android/src/org/camlistore/IUploadService.aidl (about)

     1  /*
     2  Copyright 2011 Google Inc.
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8       http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  
    17  package org.camlistore;
    18  
    19  import org.camlistore.IStatusCallback;
    20  import android.os.ParcelFileDescriptor;
    21  import android.net.Uri;
    22  import java.util.List;
    23  
    24  interface IUploadService {
    25      void registerCallback(IStatusCallback cb);
    26      void unregisterCallback(IStatusCallback cb);
    27  
    28      int queueSize();
    29      boolean isUploading();
    30  
    31      // Returns true if thread was running and we requested it be stopped.
    32      boolean pause();
    33  
    34      // Returns true if upload wasn't already in progress and new upload
    35      // thread was started.
    36      boolean resume();
    37  
    38      // Enqueues a new file to be uploaded (a file:// or content:// URI).  Does disk I/O,
    39      // so should be called from an AsyncTask.
    40      // Returns false if server not configured.
    41      boolean enqueueUpload(in Uri uri);
    42      int enqueueUploadList(in List<Uri> uri);
    43  
    44      // Stop stop uploads, clear queues.
    45      void stopEverything();
    46      
    47      // For the SettingsActivity
    48      void setBackgroundWatchersEnabled(boolean enabled);
    49  }