ShareAppService.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // ShareAppService.h
  3. // ShareExtension
  4. //
  5. // Created by Tom Lee on 2020/10/7.
  6. // Copyright © 2020 WildFireChat. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <UIKit/UIKit.h>
  10. #import "SharedConversation.h"
  11. NS_ASSUME_NONNULL_BEGIN
  12. @interface ShareAppService : NSObject
  13. + (ShareAppService *)sharedAppService;
  14. - (void)sendLinkMessage:(SharedConversation *)conversation link:(NSString *)link title:(NSString *)title thumbnailLink:(NSString *)thumbnailLink success:(void(^)(NSDictionary *dict))successBlock error:(void(^)(NSString *message))errorBlock;
  15. - (void)sendTextMessage:(SharedConversation *)conversation text:(NSString *)text success:(void(^)(NSDictionary *dict))successBlock error:(void(^)(NSString *message))errorBlock;
  16. - (void)sendImageMessage:(SharedConversation *)conversation mediaUrl:(NSString *)mediaUrl thubnail:(UIImage *)thubnail success:(void(^)(NSDictionary *dict))successBlock error:(void(^)(NSString *message))errorBlock;
  17. - (void)sendFileMessage:(SharedConversation *)conversation mediaUrl:(NSString *)mediaUrl fileName:(NSString *)fileName size:(long long)size success:(void(^)(NSDictionary *dict))successBlock error:(void(^)(NSString *message))errorBlock;
  18. - (void)uploadFiles:(NSString *)file
  19. mediaType:(int)mediaType
  20. fullImage:(BOOL)fullImage
  21. progress:(void(^)(int sentcount, int total))progressBlock
  22. success:(void(^)(NSString *url))successBlock
  23. error:(void(^)(NSString *errorMsg))errorBlock;
  24. - (void)uploadData:(NSData *)data
  25. mediaType:(int)mediaType
  26. progress:(void(^)(int sentcount, int total))progressBlock
  27. success:(void(^)(NSString *url))successBlock
  28. error:(void(^)(NSString *errorMsg))errorBlock;
  29. - (BOOL)isLogin;
  30. @end
  31. NS_ASSUME_NONNULL_END