DropboxModel.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. //
  2. // DropboxModel.h
  3. // PDF Reader
  4. //
  5. // Created by HuFeng on 13-3-27.
  6. // Copyright (c) 2013年 zhangjie. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. static NSString* kUpdateUserName = @"updateUserName";
  10. @protocol DropboxModelDelegate <NSObject>
  11. @optional
  12. - (void)updateAccountInfo:(NSString *)userName;
  13. - (void)cancelUpLoadProgressBar;
  14. - (void)updateUploadProgressBar:(float)value
  15. withMessage:(NSString *)message
  16. leftFilesString:(NSString *)filesString;
  17. @end
  18. @class DBOAuthResult;
  19. @interface DropboxModel : NSObject
  20. {
  21. // id <DropboxModelDelegate> objectDelegate;
  22. NSString *_appKey;
  23. NSString *_appSecret;
  24. NSString *_root;
  25. NSArray *_filePathArray;
  26. NSString *_currentUploadPath;
  27. float _progressValue;
  28. NSString *_userName;
  29. NSString *_syncDate;
  30. }
  31. @property (assign) id <DropboxModelDelegate> objectDelegate;
  32. @property (nonatomic,retain) NSArray *filePathArray;
  33. @property (nonatomic,retain) NSString *currentUploadPath;
  34. @property (nonatomic,retain) NSString *userName;
  35. @property (nonatomic,retain) NSString *syncDate;
  36. @property (nonatomic,retain) NSString *userEmail;
  37. + (DropboxModel *)shared;
  38. - (void)handleAppleEvent:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent;
  39. - (void)handleAuthResult:(DBOAuthResult * _Nullable)authResult;
  40. // 上传文件到 Dropbox 根目录
  41. - (BOOL)uploadFile:(NSArray *)filePathArray;
  42. - (void)cancleUploadFile;
  43. - (void)unlinkAll;
  44. - (BOOL)isLinked;
  45. - (void)linkServer;
  46. @end