NTESSessionUtil.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. //
  2. // NTESSessionUtil.h
  3. // NIMDemo
  4. //
  5. // Created by ght on 15-1-27.
  6. // Copyright (c) 2015年 Netease. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <AVFoundation/AVFoundation.h>
  10. // 最近会话本地扩展标记类型
  11. typedef NS_ENUM(NSInteger, NTESRecentSessionMarkType){
  12. // @ 标记
  13. NTESRecentSessionMarkTypeAt,
  14. // 置顶标记
  15. NTESRecentSessionMarkTypeTop,
  16. };
  17. @interface NTESSessionUtil : NSObject
  18. + (CGSize)getImageSizeWithImageOriginSize:(CGSize)originSize
  19. minSize:(CGSize)imageMinSize
  20. maxSize:(CGSize)imageMaxSize;
  21. + (NSString *)showNick:(NSString*)uid inSession:(NIMSession*)session;
  22. //接收时间格式化
  23. + (NSString*)showTime:(NSTimeInterval) msglastTime showDetail:(BOOL)showDetail;
  24. + (void)sessionWithInputURL:(NSURL*)inputURL
  25. outputURL:(NSURL*)outputURL
  26. blockHandler:(void (^)(AVAssetExportSession*))handler;
  27. + (NSDictionary *)dictByJsonData:(NSData *)data;
  28. + (NSDictionary *)dictByJsonString:(NSString *)jsonString;
  29. + (BOOL)canMessageBeForwarded:(NIMMessage *)message;
  30. + (BOOL)canMessageBeRevoked:(NIMMessage *)message;
  31. + (NSString *)tipOnMessageRevoked:(NIMRevokeMessageNotification *)notificaton;
  32. + (void)addRecentSessionMark:(NIMSession *)session type:(NTESRecentSessionMarkType)type;
  33. + (void)removeRecentSessionMark:(NIMSession *)session type:(NTESRecentSessionMarkType)type;
  34. + (BOOL)recentSessionIsMark:(NIMRecentSession *)recent type:(NTESRecentSessionMarkType)type;
  35. + (NSString *)onlineState:(NSString *)userId detail:(BOOL)detail;
  36. + (NSString *)formatAutoLoginMessage:(NSError *)error;
  37. @end