github.com/olivere/camlistore@v0.0.0-20140121221811-1b7ac2da0199/clients/ios-objc/photobackup/LACamliClient/LACamliClient.h (about)

     1  //
     2  //  LACamliClient.h
     3  //
     4  //  Created by Nick O'Neill on 1/10/13.
     5  //  Copyright (c) 2013 The Camlistore Authors. All rights reserved.
     6  //
     7  
     8  #import <Foundation/Foundation.h>
     9  
    10  @class LACamliFile,LACamliUploadOperation;
    11  
    12  @protocol LACamliStatusDelegate <NSObject>
    13  
    14  @optional
    15  - (void)updatedStatus:(NSString *)status;
    16  - (void)addedUploadOperation:(LACamliUploadOperation *)op;
    17  - (void)finishedUploadOperation:(LACamliUploadOperation *)op;
    18  - (void)uploadProgress:(float)pct forOperation:(LACamliUploadOperation *)op;
    19  @end
    20  
    21  @interface LACamliClient : NSObject <NSURLSessionDelegate>
    22  
    23  extern NSString *const CamliNotificationUploadStart;
    24  extern NSString *const CamliNotificationUploadProgress;
    25  extern NSString *const CamliNotificationUploadEnd;
    26  
    27  @property NSURLSessionConfiguration *sessionConfig;
    28  @property id delegate;
    29  
    30  @property NSURL *serverURL;
    31  @property NSString *username;
    32  @property NSString *password;
    33  
    34  @property NSString *blobRootComponent;
    35  @property NSOperationQueue *uploadQueue;
    36  @property NSUInteger totalUploads;
    37  
    38  @property NSMutableArray *uploadedBlobRefs;
    39  @property UIBackgroundTaskIdentifier backgroundID;
    40  
    41  @property BOOL isAuthorized;
    42  @property BOOL authorizing;
    43  
    44  - (id)initWithServer:(NSURL *)server username:(NSString *)username andPassword:(NSString *)password;
    45  - (BOOL)readyToUpload;
    46  - (void)discoveryWithUsername:(NSString *)user andPassword:(NSString *)pass;
    47  
    48  - (BOOL)fileAlreadyUploaded:(LACamliFile *)file;
    49  - (void)addFile:(LACamliFile *)file withCompletion:(void (^)())completion;
    50  
    51  - (NSURL *)statUrl;
    52  - (NSURL *)uploadUrl;
    53  
    54  @end