diff --git a/nativeplugins/wf-uni-wfc-client/README.md b/nativeplugins/wf-uni-wfc-client/README.md new file mode 100644 index 00000000..6fe0a103 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/README.md @@ -0,0 +1,21 @@ +# 野火IM插件使用说明 +有2种插件的使用方法,一种是基于野火提供的Demo直接进行二次开发;另外一种是把野火插件放到现有项目中。 + +## 使用野火demo +野火UniApp平台的demo地址:[https://gitee.com/wfchat/uni-chat](https://gitee.com/wfchat/uni-chat)。按照说明配置地址就可以直接运行,再根据产品需求进行二次开发。 + +## 现有项目使用 +### 集成步骤: +1. 添加野火插件到项目中。 +2. 把野火UniApp平台的demo中的[wfc](https://gitee.com/wfchat/uni-chat/tree/main/wfc)目录和配置文件[config.js](https://gitee.com/wfchat/uni-chat/blob/main/config.js)拷贝到现有工程中。 +3. 配置```config.js```中的IM服务和应用服务地址。 +4. 调用接口类[wfc.js](https://gitee.com/wfchat/uni-chat/blob/main/wfc/client/wfc.js)来使用野火插件。 + +### 使用说明 +所有的IM业务需要确保调用过connect之后才可以进行,connect需要用户token,需要在用户登陆时为用户换取token再调用connect。具体操作可以参考[野火demo](https://gitee.com/wfchat/uni-chat)。 + +## 源码地址 +源码在[https://gitee.com/wfchat/uni-wfc-client](https://gitee.com/wfchat/uni-wfc-client)。 + +## 技术支持 +如果遇到问题,可以去[插件源码工程](https://gitee.com/wfchat/uni-wfc-client)或者[demo源码工程](https://gitee.com/wfchat/uni-chat)提issue,也可以去[野火论坛](https://bbs.wildfirechat.cn)发帖子问题,我们会尽快回复。谢谢大家的支持。 diff --git a/nativeplugins/wf-uni-wfc-client/android/client-release.aar b/nativeplugins/wf-uni-wfc-client/android/client-release.aar new file mode 100644 index 00000000..93011715 Binary files /dev/null and b/nativeplugins/wf-uni-wfc-client/android/client-release.aar differ diff --git a/nativeplugins/wf-uni-wfc-client/android/mars-core-release.aar b/nativeplugins/wf-uni-wfc-client/android/mars-core-release.aar new file mode 100644 index 00000000..f8d7ed2b Binary files /dev/null and b/nativeplugins/wf-uni-wfc-client/android/mars-core-release.aar differ diff --git a/nativeplugins/wf-uni-wfc-client/android/uni-client-module-release.aar b/nativeplugins/wf-uni-wfc-client/android/uni-client-module-release.aar new file mode 100644 index 00000000..74e5c741 Binary files /dev/null and b/nativeplugins/wf-uni-wfc-client/android/uni-client-module-release.aar differ diff --git a/nativeplugins/wf-uni-wfc-client/ios/Bugly.framework/Bugly b/nativeplugins/wf-uni-wfc-client/ios/Bugly.framework/Bugly new file mode 100644 index 00000000..c3ae3e20 Binary files /dev/null and b/nativeplugins/wf-uni-wfc-client/ios/Bugly.framework/Bugly differ diff --git a/nativeplugins/wf-uni-wfc-client/ios/Bugly.framework/Headers/Bugly.h b/nativeplugins/wf-uni-wfc-client/ios/Bugly.framework/Headers/Bugly.h new file mode 100644 index 00000000..74c143e7 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/Bugly.framework/Headers/Bugly.h @@ -0,0 +1,163 @@ +// +// Bugly.h +// +// Version: 2.6(1) +// +// Copyright (c) 2017年 Tencent. All rights reserved. +// + +#import + +#import "BuglyConfig.h" +#import "BuglyLog.h" + +BLY_START_NONNULL + +@interface Bugly : NSObject + +/** + * 初始化Bugly,使用默认BuglyConfigs + * + * @param appId 注册Bugly分配的应用唯一标识 + */ ++ (void)startWithAppId:(NSString * BLY_NULLABLE)appId; + +/** + * 使用指定配置初始化Bugly + * + * @param appId 注册Bugly分配的应用唯一标识 + * @param config 传入配置的 BuglyConfig + */ ++ (void)startWithAppId:(NSString * BLY_NULLABLE)appId + config:(BuglyConfig * BLY_NULLABLE)config; + +/** + * 使用指定配置初始化Bugly + * + * @param appId 注册Bugly分配的应用唯一标识 + * @param development 是否开发设备 + * @param config 传入配置的 BuglyConfig + */ ++ (void)startWithAppId:(NSString * BLY_NULLABLE)appId + developmentDevice:(BOOL)development + config:(BuglyConfig * BLY_NULLABLE)config; + +/** + * 设置用户标识 + * + * @param userId 用户标识 + */ ++ (void)setUserIdentifier:(NSString *)userId; + +/** + * 更新版本信息 + * + * @param version 应用版本信息 + */ ++ (void)updateAppVersion:(NSString *)version; + +/** + * 设置关键数据,随崩溃信息上报 + * + * @param value KEY + * @param key VALUE + */ ++ (void)setUserValue:(NSString *)value + forKey:(NSString *)key; + +/** + * 获取USER ID + * + * @return USER ID + */ ++ (NSString *)buglyUserIdentifier; + +/** + * 获取关键数据 + * + * @return 关键数据 + */ ++ (NSDictionary * BLY_NULLABLE)allUserValues; + +/** + * 设置标签 + * + * @param tag 标签ID,可在网站生成 + */ ++ (void)setTag:(NSUInteger)tag; + +/** + * 获取当前设置标签 + * + * @return 当前标签ID + */ ++ (NSUInteger)currentTag; + +/** + * 获取设备ID + * + * @return 设备ID + */ ++ (NSString *)buglyDeviceId; + +/** + * 上报自定义Objective-C异常 + * + * @param exception 异常信息 + */ ++ (void)reportException:(NSException *)exception; + +/** + * 上报错误 + * + * @param error 错误信息 + */ ++ (void)reportError:(NSError *)error; + +/** + * @brief 上报自定义错误 + * + * @param category 类型(Cocoa=3,CSharp=4,JS=5,Lua=6) + * @param aName 名称 + * @param aReason 错误原因 + * @param aStackArray 堆栈 + * @param info 附加数据 + * @param terminate 上报后是否退出应用进程 + */ ++ (void)reportExceptionWithCategory:(NSUInteger)category + name:(NSString *)aName + reason:(NSString *)aReason + callStack:(NSArray *)aStackArray + extraInfo:(NSDictionary *)info + terminateApp:(BOOL)terminate; + +/** + * SDK 版本信息 + * + * @return SDK版本号 + */ ++ (NSString *)sdkVersion; + +/** + * APP 版本信息 + * + * @return SDK版本号 + */ ++ (NSString *)appVersion; + +/** + * App 是否发生了连续闪退 + * 如果 启动SDK 且 5秒内 闪退,且次数达到 3次 则判定为连续闪退 + * + * @return 是否连续闪退 + */ ++ (BOOL)isAppCrashedOnStartUpExceedTheLimit; + +/** + * 关闭bugly监控 + */ ++ (void)closeCrashReport; + +BLY_END_NONNULL + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/Bugly.framework/Headers/BuglyConfig.h b/nativeplugins/wf-uni-wfc-client/ios/Bugly.framework/Headers/BuglyConfig.h new file mode 100644 index 00000000..16e253b5 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/Bugly.framework/Headers/BuglyConfig.h @@ -0,0 +1,149 @@ +// +// BuglyConfig.h +// Bugly +// +// Copyright (c) 2016年 Tencent. All rights reserved. +// + +#pragma once + +#define BLY_UNAVAILABLE(x) __attribute__((unavailable(x))) + +#if __has_feature(nullability) +#define BLY_NONNULL __nonnull +#define BLY_NULLABLE __nullable +#define BLY_START_NONNULL _Pragma("clang assume_nonnull begin") +#define BLY_END_NONNULL _Pragma("clang assume_nonnull end") +#else +#define BLY_NONNULL +#define BLY_NULLABLE +#define BLY_START_NONNULL +#define BLY_END_NONNULL +#endif + +#import + +#import "BuglyLog.h" + +BLY_START_NONNULL + +@protocol BuglyDelegate + +@optional +/** + * 发生异常时回调 + * + * @param exception 异常信息 + * + * @return 返回需上报记录,随异常上报一起上报 + */ +- (NSString * BLY_NULLABLE)attachmentForException:(NSException * BLY_NULLABLE)exception; + +/** + * 发生sigkill时回调 + * + * @param exception 异常信息 + * + * @return 返回需上报记录,随sigkill异常上报一起上报,返回值由app开发者决定 + */ +- (NSString * BLY_NULLABLE)attachmentForSigkill; + +/** + * 策略激活时回调 + * + * @param tacticInfo + * + * @return app是否弹框展示 + */ +- (BOOL) h5AlertForTactic:(NSDictionary *)tacticInfo; + +@end + +@interface BuglyConfig : NSObject + +/** + * SDK Debug信息开关, 默认关闭 + */ +@property (nonatomic, assign) BOOL debugMode; + +/** + * 设置自定义渠道标识 + */ +@property (nonatomic, copy) NSString *channel; + +/** + * 设置自定义版本号 + */ +@property (nonatomic, copy) NSString *version; + +/** + * 设置自定义设备唯一标识 + */ +@property (nonatomic, copy) NSString *deviceIdentifier; + +/** + * 卡顿监控开关,默认关闭 + */ +@property (nonatomic) BOOL blockMonitorEnable; + +/** + * 卡顿监控判断间隔,单位为秒 + */ +@property (nonatomic) NSTimeInterval blockMonitorTimeout; + +/** + * 设置 App Groups Id (如有使用 Bugly iOS Extension SDK,请设置该值) + */ +@property (nonatomic, copy) NSString *applicationGroupIdentifier; + +/** + * 进程内还原开关,默认开启 + */ +@property (nonatomic) BOOL symbolicateInProcessEnable; + +/** + * 非正常退出事件记录开关,默认关闭 + */ +@property (nonatomic) BOOL unexpectedTerminatingDetectionEnable; + +/** + * 页面信息记录开关,默认开启 + */ +@property (nonatomic) BOOL viewControllerTrackingEnable; + +/** + * Bugly Delegate + */ +@property (nonatomic, assign) id delegate; + +/** + * 控制自定义日志上报,默认值为BuglyLogLevelSilent,即关闭日志记录功能。 + * 如果设置为BuglyLogLevelWarn,则在崩溃时会上报Warn、Error接口打印的日志 + */ +@property (nonatomic, assign) BuglyLogLevel reportLogLevel; + +/** + * 崩溃数据过滤器,如果崩溃堆栈的模块名包含过滤器中设置的关键字,则崩溃数据不会进行上报 + * 例如,过滤崩溃堆栈中包含搜狗输入法的数据,可以添加过滤器关键字SogouInputIPhone.dylib等 + */ +@property (nonatomic, copy) NSArray *excludeModuleFilter; + +/** + * 控制台日志上报开关,默认开启 + */ +@property (nonatomic, assign) BOOL consolelogEnable; + +/** + * 崩溃退出超时,如果监听到崩溃后,App一直没有退出,则到达超时时间后会自动abort进程退出 + * 默认值 5s, 单位 秒 + * 当赋值为0时,则不会自动abort进程退出 + */ +@property (nonatomic, assign) NSUInteger crashAbortTimeout; + +/** + * 设置自定义联网、crash上报域名 + */ +@property (nonatomic, copy) NSString *crashServerUrl; + +@end +BLY_END_NONNULL diff --git a/nativeplugins/wf-uni-wfc-client/ios/Bugly.framework/Headers/BuglyLog.h b/nativeplugins/wf-uni-wfc-client/ios/Bugly.framework/Headers/BuglyLog.h new file mode 100644 index 00000000..2768e14c --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/Bugly.framework/Headers/BuglyLog.h @@ -0,0 +1,78 @@ +// +// BuglyLog.h +// Bugly +// +// Copyright (c) 2017年 Tencent. All rights reserved. +// + +#import + +// Log level for Bugly Log +typedef NS_ENUM(NSUInteger, BuglyLogLevel) { + BuglyLogLevelSilent = 0, + BuglyLogLevelError = 1, + BuglyLogLevelWarn = 2, + BuglyLogLevelInfo = 3, + BuglyLogLevelDebug = 4, + BuglyLogLevelVerbose = 5, +}; +#pragma mark - + +OBJC_EXTERN void BLYLog(BuglyLogLevel level, NSString *format, ...) NS_FORMAT_FUNCTION(2, 3); + +OBJC_EXTERN void BLYLogv(BuglyLogLevel level, NSString *format, va_list args) NS_FORMAT_FUNCTION(2, 0); + +#pragma mark - +#define BUGLY_LOG_MACRO(_level, fmt, ...) [BuglyLog level:_level tag:nil log:fmt, ##__VA_ARGS__] + +#define BLYLogError(fmt, ...) BUGLY_LOG_MACRO(BuglyLogLevelError, fmt, ##__VA_ARGS__) +#define BLYLogWarn(fmt, ...) BUGLY_LOG_MACRO(BuglyLogLevelWarn, fmt, ##__VA_ARGS__) +#define BLYLogInfo(fmt, ...) BUGLY_LOG_MACRO(BuglyLogLevelInfo, fmt, ##__VA_ARGS__) +#define BLYLogDebug(fmt, ...) BUGLY_LOG_MACRO(BuglyLogLevelDebug, fmt, ##__VA_ARGS__) +#define BLYLogVerbose(fmt, ...) BUGLY_LOG_MACRO(BuglyLogLevelVerbose, fmt, ##__VA_ARGS__) + +#pragma mark - Interface +@interface BuglyLog : NSObject + +/** + * @brief 初始化日志模块 + * + * @param level 设置默认日志级别,默认BLYLogLevelSilent + * + * @param printConsole 是否打印到控制台,默认NO + */ ++ (void)initLogger:(BuglyLogLevel) level consolePrint:(BOOL)printConsole; + +/** + * @brief 打印BLYLogLevelInfo日志 + * + * @param format 日志内容 总日志大小限制为:字符串长度30k,条数200 + */ ++ (void)log:(NSString *)format, ... NS_FORMAT_FUNCTION(1, 2); + +/** + * @brief 打印日志 + * + * @param level 日志级别 + * @param message 日志内容 总日志大小限制为:字符串长度30k,条数200 + */ ++ (void)level:(BuglyLogLevel) level logs:(NSString *)message; + +/** + * @brief 打印日志 + * + * @param level 日志级别 + * @param format 日志内容 总日志大小限制为:字符串长度30k,条数200 + */ ++ (void)level:(BuglyLogLevel) level log:(NSString *)format, ... NS_FORMAT_FUNCTION(2, 3); + +/** + * @brief 打印日志 + * + * @param level 日志级别 + * @param tag 日志模块分类 + * @param format 日志内容 总日志大小限制为:字符串长度30k,条数200 + */ ++ (void)level:(BuglyLogLevel) level tag:(NSString *) tag log:(NSString *)format, ... NS_FORMAT_FUNCTION(3, 4); + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/Bugly.framework/Modules/module.modulemap b/nativeplugins/wf-uni-wfc-client/ios/Bugly.framework/Modules/module.modulemap new file mode 100644 index 00000000..c5367052 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/Bugly.framework/Modules/module.modulemap @@ -0,0 +1,12 @@ +framework module Bugly { + umbrella header "Bugly.h" + + export * + module * { export * } + + link framework "Foundation" + link framework "Security" + link framework "SystemConfiguration" + link "c++" + link "z" +} diff --git a/nativeplugins/wf-uni-wfc-client/ios/Bugly.framework/PrivacyInfo.xcprivacy b/nativeplugins/wf-uni-wfc-client/ios/Bugly.framework/PrivacyInfo.xcprivacy new file mode 100644 index 00000000..78568c62 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/Bugly.framework/PrivacyInfo.xcprivacy @@ -0,0 +1,41 @@ + + + + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryFileTimestamp + NSPrivacyAccessedAPITypeReasons + + C617.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategorySystemBootTime + NSPrivacyAccessedAPITypeReasons + + 35F9.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryDiskSpace + NSPrivacyAccessedAPITypeReasons + + E174.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryUserDefaults + NSPrivacyAccessedAPITypeReasons + + CA92.1 + + + + + diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/Info.plist b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/Info.plist new file mode 100644 index 00000000..0ae058ff --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/Info.plist @@ -0,0 +1,44 @@ + + + + + AvailableLibraries + + + BinaryPath + WFChatClient.framework/WFChatClient + LibraryIdentifier + ios-arm64 + LibraryPath + WFChatClient.framework + SupportedArchitectures + + arm64 + + SupportedPlatform + ios + + + BinaryPath + WFChatClient.framework/WFChatClient + LibraryIdentifier + ios-arm64_x86_64-simulator + LibraryPath + WFChatClient.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/Common.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/Common.h new file mode 100644 index 00000000..6ccc7127 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/Common.h @@ -0,0 +1,177 @@ +// +// Common.h +// WFChatClient +// +// Created by heavyrain on 2017/11/8. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#ifndef Common_h +#define Common_h + + +/* + * 说明:1000以下为系统保留类型,自定义消息请使用1000以上数值。 + * 系统消息类型中100以下为常用基本类型消息。100-199位群组消息类型。400-499为VoIP消息类型. + */ +//基本消息类型 +//未知类型的消息 +#define MESSAGE_CONTENT_TYPE_UNKNOWN 0 +//文本消息 +#define MESSAGE_CONTENT_TYPE_TEXT 1 +//语音消息 +#define MESSAGE_CONTENT_TYPE_SOUND 2 +//图片消息 +#define MESSAGE_CONTENT_TYPE_IMAGE 3 +//位置消息 +#define MESSAGE_CONTENT_TYPE_LOCATION 4 +//文件消息 +#define MESSAGE_CONTENT_TYPE_FILE 5 +//视频消息 +#define MESSAGE_CONTENT_TYPE_VIDEO 6 +//动态表情消息 +#define MESSAGE_CONTENT_TYPE_STICKER 7 +//链接消息 +#define MESSAGE_CONTENT_TYPE_LINK 8 +//存储不计数文本消息 +#define MESSAGE_CONTENT_TYPE_P_TEXT 9 +//名片消息 +#define MESSAGE_CONTENT_TYPE_CARD 10 +//组合消息 +#define MESSAGE_CONTENT_TYPE_COMPOSITE_MESSAGE 11 +//富通知消息 +#define MESSAGE_CONTENT_TYPE_RICH_NOTIFICATION 12 +//文章消息 +#define MESSAGE_CONTENT_TYPE_ARTICLES 13 +//流式文本正在生成消息 +#define MESSAGE_CONTENT_TYPE_STREAMING_TEXT_GENERATING 14 +//流式文本消息 +#define MESSAGE_CONTENT_TYPE_STREAMING_TEXT_GENERATED 15 + +//消息未能送达消息 +#define MESSAGE_CONTENT_NOT_DELIVERED 16 + +//Dumy1 +#define MESSAGE_CONTENT_TYPE_DUMY1 21 + +//Dumy2 +#define MESSAGE_CONTENT_TYPE_DUMY2 22 + +//Ptt sound +#define MESSAGE_CONTENT_TYPE_PTT_VOICE 23 + +//Dumy3 +#define MESSAGE_CONTENT_TYPE_DUMY3 24 + +//同步标记未读 +#define MESSAGE_CONTENT_TYPE_MARK_UNREAD_SYNC 31 + +#define MESSAGE_CONTENT_TYPE_CREATE_SECRET_CHAT 40 +#define MESSAGE_CONTENT_TYPE_ACCEPT_SECRET_CHAT 41 +#define MESSAGE_CONTENT_TYPE_DESTROY_SECRET_CHAT 42 +#define MESSAGE_CONTENT_TYPE_SECRET_CHAT_MESSAGE 43 +#define MESSAGE_CONTENT_TYPE_BURN_MSG_READED 46 +#define MESSAGE_CONTENT_TYPE_BURN_MSG_PLAYED 47 + +//频道进出消息 +#define MESSAGE_CONTENT_TYPE_ENTER_CHANNEL_CHAT 71 +#define MESSAGE_CONTENT_TYPE_LEAVE_CHANNEL_CHAT 72 +#define MESSAGE_CONTENT_TYPE_CHANNEL_MENU_EVENT 73 + +//撤回消息 +#define MESSAGE_CONTENT_TYPE_RECALL 80 +//删除消息,请勿直接发送此消息,此消息是服务器端删除时的同步消息 +#define MESSAGE_CONTENT_TYPE_DELETE 81 + +//提醒消息 +#define MESSAGE_CONTENT_TYPE_TIP 90 + +//正在输入消息 +#define MESSAGE_CONTENT_TYPE_TYPING 91 + +//以上是打招呼的内容 +#define MESSAGE_FRIEND_GREETING 92 +//您已经添加XXX为好友了,可以愉快地聊天了 +#define MESSAGE_FRIEND_ADDED_NOTIFICATION 93 + +//PC 端请求登录 +#define MESSAGE_PC_LOGIN_REQUSET 94 + + + +//通知消息类型 +//创建群的通知消息 +#define MESSAGE_CONTENT_TYPE_CREATE_GROUP 104 +//加群的通知消息 +#define MESSAGE_CONTENT_TYPE_ADD_GROUP_MEMBER 105 +//踢出群成员的通知消息 +#define MESSAGE_CONTENT_TYPE_KICKOF_GROUP_MEMBER 106 +//退群的通知消息 +#define MESSAGE_CONTENT_TYPE_QUIT_GROUP 107 +//解散群的通知消息 +#define MESSAGE_CONTENT_TYPE_DISMISS_GROUP 108 +//转让群主的通知消息 +#define MESSAGE_CONTENT_TYPE_TRANSFER_GROUP_OWNER 109 +//修改群名称的通知消息 +#define MESSAGE_CONTENT_TYPE_CHANGE_GROUP_NAME 110 +//修改群昵称的通知消息 +#define MESSAGE_CONTENT_TYPE_MODIFY_GROUP_ALIAS 111 +//修改群头像的通知消息 +#define MESSAGE_CONTENT_TYPE_CHANGE_GROUP_PORTRAIT 112 +//修改群全局禁言的通知消息 +#define MESSAGE_CONTENT_TYPE_CHANGE_MUTE 113 +//修改群加入权限的通知消息 +#define MESSAGE_CONTENT_TYPE_CHANGE_JOINTYPE 114 +//修改群群成员私聊的通知消息 +#define MESSAGE_CONTENT_TYPE_CHANGE_PRIVATECHAT 115 +//修改群是否可搜索的通知消息 +#define MESSAGE_CONTENT_TYPE_CHANGE_SEARCHABLE 116 +//修改群管理的通知消息 +#define MESSAGE_CONTENT_TYPE_SET_MANAGER 117 +//禁言/取消禁言群成员的通知消息 +#define MESSAGE_CONTENT_TYPE_MUTE_MEMBER 118 +//允许/取消允许群成员发言的通知消息 +#define MESSAGE_CONTENT_TYPE_ALLOW_MEMBER 119 + +//踢出群成员的可见通知消息 +#define MESSAGE_CONTENT_TYPE_KICKOF_GROUP_MEMBER_VISIBLE_NOTIFICATION 120 +//退群的可见通知消息 +#define MESSAGE_CONTENT_TYPE_QUIT_GROUP_VISIBLE_NOTIFICATION 121 +//修改群组Extra通知消息 +#define MESSAGE_CONTENT_TYPE_MODIFY_GROUP_EXTRA 122 +//修改群组成员Extra通知消息 +#define MESSAGE_CONTENT_TYPE_MODIFY_GROUP_MEMBER_EXTRA 123 +//修改群组设置通知消息 +#define MESSAGE_CONTENT_TYPE_MODIFY_GROUP_SETTINGS 124 + +//VoIP开始消息 +#define VOIP_CONTENT_TYPE_START 400 +//VoIP结束消息 +#define VOIP_CONTENT_TYPE_END 402 + +#define VOIP_CONTENT_TYPE_ACCEPT 401 +#define VOIP_CONTENT_TYPE_SIGNAL 403 +#define VOIP_CONTENT_TYPE_MODIFY 404 +#define VOIP_CONTENT_TYPE_ACCEPT_T 405 +#define VOIP_CONTENT_TYPE_ADD_PARTICIPANT 406 +#define VOIP_CONTENT_MUTE_VIDEO 407 + +#define VOIP_CONTENT_CONFERENCE_INVITE 408 +#define VOIP_CONTENT_CONFERENCE_CHANGE_MODE 410 +#define VOIP_CONTENT_CONFERENCE_KICKOFF_MEMBER 411 +#define VOIP_CONTENT_CONFERENCE_COMMAND 412 + +#define VOIP_CONTENT_MULTI_CALL_ONGOING 416 +#define VOIP_CONTENT_JOIN_CALL_REQUEST 417 + +#define VOIP_CONTENT_PTT_INVITE 420 + +#define MESSAGE_CONTENT_TYPE_FEED 501 +#define MESSAGE_CONTENT_TYPE_COMMENT 502 + +#define THINGS_CONTENT_TYPE_DATA 601 +#define THINGS_CONTENT_TYPE_LOST_EVENT 602 + + + +#endif /* Common_h */ diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCAddGroupeMemberNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCAddGroupeMemberNotificationContent.h new file mode 100644 index 00000000..f0505967 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCAddGroupeMemberNotificationContent.h @@ -0,0 +1,31 @@ +// +// WFCCAddGroupeMemberNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/20. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 群组加人的通知消息 + */ +@interface WFCCAddGroupeMemberNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 邀请者ID + */ +@property (nonatomic, strong)NSString *invitor; + +/** + 被邀请者ID列表 + */ +@property (nonatomic, strong)NSArray *invitees; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCArticlesMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCArticlesMessageContent.h new file mode 100644 index 00000000..ebab29f6 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCArticlesMessageContent.h @@ -0,0 +1,29 @@ +// +// WFCCArticlesMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + +@class WFCCLinkMessageContent; +@interface WFCCArticle : NSObject +@property (nonatomic, strong)NSString *articleId; +@property (nonatomic, strong)NSString *cover; +@property (nonatomic, strong)NSString *title; +@property (nonatomic, strong)NSString *digest; +@property (nonatomic, strong)NSString *url; +@property (nonatomic, assign)BOOL readReport; +@end + +/** + 富通知消息 + */ +@interface WFCCArticlesMessageContent : WFCCMessageContent +@property (nonatomic, strong)WFCCArticle *topArticle; +@property (nonatomic, strong)NSArray *subArticles; + +- (NSArray *)toLinkMessageContent; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCCallAddParticipantMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCCallAddParticipantMessageContent.h new file mode 100644 index 00000000..72b09dcc --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCCallAddParticipantMessageContent.h @@ -0,0 +1,23 @@ +// +// WFCCCallAddParticipantMessageContent.h +// WFAVEngineKit +// +// Created by heavyrain on 17/9/27. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import +#import + +@interface WFCCCallAddParticipantMessageContent : WFCCNotificationMessageContent +@property(nonatomic, strong)NSString *callId; +@property(nonatomic, strong)NSString *initiator; +@property(nonatomic, strong)NSString *pin; +@property(nonatomic, strong)NSArray *participants; +//[{"userId":"xxxx","acceptTime":13123123123,"joinTime":13123123123,"videoMuted":false}] +@property(nonatomic, strong)NSArray *existParticipants; +@property(nonatomic, assign)BOOL audioOnly; +@property(nonatomic, assign)BOOL autoAnswer; +//指定对方clientId +@property(nonatomic, strong)NSString *clientId; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCCallByeMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCCallByeMessageContent.h new file mode 100644 index 00000000..5295cbc3 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCCallByeMessageContent.h @@ -0,0 +1,14 @@ +// +// WFCCCallByeMessageContent.h +// WFAVEngineKit +// +// Created by heavyrain on 17/9/27. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import +@interface WFCCCallByeMessageContent : WFCCMessageContent +@property(nonatomic, strong)NSString *callId; +@property(nonatomic, assign)int/*WFAVCallEndReason*/ endReason; +@property(nonatomic, assign)long long inviteMsgUid; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCCallStartMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCCallStartMessageContent.h new file mode 100644 index 00000000..f22d3c8f --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCCallStartMessageContent.h @@ -0,0 +1,59 @@ +// +// WFCCTextMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + +/** + 电话总结消息 + */ +@interface WFCCCallStartMessageContent : WFCCMessageContent + + +/** + CallId + */ +@property (nonatomic, strong)NSString *callId; +/** + 对端用户Id + */ +@property (nonatomic, strong)NSArray *targetIds; +/** + * 开始时间 + */ +@property (nonatomic, assign)long long connectTime; +/** + * 结束时间 + */ +@property (nonatomic, assign)long long endTime; +/* 结束原因 +WFAVCallEndReason + 0: kWFAVCallEndReasonUnknown, + 1: kWFAVCallEndReasonBusy, + 2: kWFAVCallEndReasonSignalError, + 3: kWFAVCallEndReasonHangup, + 4: kWFAVCallEndReasonMediaError, + 5: kWFAVCallEndReasonRemoteHangup, + 6: kWFAVCallEndReasonOpenCameraFailure, + 7: kWFAVCallEndReasonTimeout, + 8: kWFAVCallEndReasonAcceptByOtherClient + */ +@property (nonatomic, assign)int status; + +/* + 0 未知;1 音视频免费版;2 音视频高级版 + */ +@property (nonatomic, assign)int type; + +/* + * 是否仅音频 + */ +@property (nonatomic, assign, getter=isAudioOnly)BOOL audioOnly; + +@property (nonatomic, strong)NSString *pin; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCCardMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCCardMessageContent.h new file mode 100644 index 00000000..831fe84f --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCCardMessageContent.h @@ -0,0 +1,62 @@ +// +// WFCCTextMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + + +typedef NS_ENUM(NSInteger, WFCCCardType) { + CardType_User = 0, + CardType_Group = 1, + CardType_Channel = 3 +}; + +/** + 名片消息 + */ +@interface WFCCCardMessageContent : WFCCMessageContent + +/** + 构造方法 + + @param targetId 目标Id + @param type 类型,0 用户,1 群组, 3 频道。 + @param fromUser 分享用户。 + @return 名片消息 + */ ++ (instancetype)cardWithTarget:(NSString *)targetId type:(WFCCCardType)type from:(NSString *)fromUser; + +/** + 名片类型 + */ +@property (nonatomic, assign)WFCCCardType type; + +/** + 用户ID + */ +@property (nonatomic, strong)NSString *targetId; + +/** + 用户号 + */ +@property (nonatomic, strong)NSString *name; + +/** + 用户昵称 + */ +@property (nonatomic, strong)NSString *displayName; + +/** + 用户头像 + */ +@property (nonatomic, strong)NSString *portrait; + +/** +分享的用户ID + */ +@property (nonatomic, strong)NSString *fromUser; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCChangeGroupNameNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCChangeGroupNameNotificationContent.h new file mode 100644 index 00000000..341cd998 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCChangeGroupNameNotificationContent.h @@ -0,0 +1,31 @@ +// +// WFCCChangeGroupNameNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/20. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 修改群名的通知消息 + */ +@interface WFCCChangeGroupNameNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 操作者ID + */ +@property (nonatomic, strong)NSString *operateUser; + +/** + 群名 + */ +@property (nonatomic, strong)NSString *name; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCChangeGroupPortraitNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCChangeGroupPortraitNotificationContent.h new file mode 100644 index 00000000..f0ab69c0 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCChangeGroupPortraitNotificationContent.h @@ -0,0 +1,26 @@ +// +// WFCCChangeGroupNameNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/20. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 修改群头像的通知消息 + */ +@interface WFCCChangeGroupPortraitNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 操作者ID + */ +@property (nonatomic, strong)NSString *operateUser; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCChannelInfo.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCChannelInfo.h new file mode 100644 index 00000000..6164c963 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCChannelInfo.h @@ -0,0 +1,28 @@ +// +// WFCCChatroomInfo.h +// WFChatClient +// +// Created by heavyrain lee on 2018/8/24. +// Copyright © 2018 WildFireChat. All rights reserved. +// + +#import +#import "WFCCChannelMenu.h" +#import "WFCCJsonSerializer.h" + +@interface WFCCChannelInfo : WFCCJsonSerializer +@property(nonatomic, strong)NSString *channelId; +@property(nonatomic, strong)NSString *name; +@property(nonatomic, strong)NSString *portrait; +@property(nonatomic, strong)NSString *owner; +@property(nonatomic, strong)NSString *desc; +@property(nonatomic, strong)NSString *extra; +@property(nonatomic, strong)NSString *secret; +@property(nonatomic, strong)NSString *callback; + +//https://docs.wildfirechat.net/base_knowledge/channel.html##频道状态 +@property(nonatomic, assign)int status; +@property(nonatomic, assign)long long updateDt; + +@property(nonatomic, strong)NSArray *menus; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCChannelMenu.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCChannelMenu.h new file mode 100644 index 00000000..83168422 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCChannelMenu.h @@ -0,0 +1,29 @@ +// +// WFCCChannelMenu.h +// WFChatClient +// +// Created by Rain on 2022/8/11. +// Copyright © 2022 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" + +NS_ASSUME_NONNULL_BEGIN + + +@interface WFCCChannelMenu : WFCCJsonSerializer +@property(nonatomic, strong)NSString *menuId; +@property(nonatomic, strong)NSString *type; +@property(nonatomic, strong)NSString *name; +@property(nonatomic, strong)NSString *key; +@property(nonatomic, strong)NSString *url; +@property(nonatomic, strong)NSString *mediaId; +@property(nonatomic, strong)NSString *articleId; +@property(nonatomic, strong)NSString *appId; +@property(nonatomic, strong)NSString *appPage; +@property(nonatomic, assign)NSString *extra; +@property(nonatomic, strong)NSArray *subMenus; +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCChannelMenuEventMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCChannelMenuEventMessageContent.h new file mode 100644 index 00000000..66921556 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCChannelMenuEventMessageContent.h @@ -0,0 +1,14 @@ +// +// WFCCChannelMenuEventMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + +@class WFCCChannelMenu; +@interface WFCCChannelMenuEventMessageContent : WFCCMessageContent +@property (nonatomic, strong)WFCCChannelMenu *menu; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCChatroomInfo.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCChatroomInfo.h new file mode 100644 index 00000000..56ef53b2 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCChatroomInfo.h @@ -0,0 +1,24 @@ +// +// WFCCChatroomInfo.h +// WFChatClient +// +// Created by heavyrain lee on 2018/8/24. +// Copyright © 2018 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" + +@interface WFCCChatroomInfo : WFCCJsonSerializer +@property(nonatomic, strong)NSString *chatroomId; +@property(nonatomic, strong)NSString *title; +@property(nonatomic, strong)NSString *desc; +@property(nonatomic, strong)NSString *portrait; +@property(nonatomic, strong)NSString *extra; + +//0 normal; 1 not started; 2 end +@property(nonatomic, assign)int state; +@property(nonatomic, assign)int memberCount; +@property(nonatomic, assign)long long createDt; +@property(nonatomic, assign)long long updateDt; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCChatroomMemberInfo.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCChatroomMemberInfo.h new file mode 100644 index 00000000..0ebd239c --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCChatroomMemberInfo.h @@ -0,0 +1,15 @@ +// +// WFCCChatroomInfo.h +// WFChatClient +// +// Created by heavyrain lee on 2018/8/24. +// Copyright © 2018 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" + +@interface WFCCChatroomMemberInfo : WFCCJsonSerializer +@property(nonatomic, assign)int memberCount; +@property(nonatomic, strong)NSArray *members; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCCompositeMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCCompositeMessageContent.h new file mode 100644 index 00000000..a405844d --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCCompositeMessageContent.h @@ -0,0 +1,20 @@ +// +// WFCCCompositeMessageContent.h +// WFChatClient +// +// Created by Tom Lee on 2020/10/4. +// Copyright © 2020 WildFireChat. All rights reserved. +// + +#import "WFCCMediaMessageContent.h" +@class WFCCMessage; + +NS_ASSUME_NONNULL_BEGIN + +@interface WFCCCompositeMessageContent : WFCCMediaMessageContent +@property (nonatomic, strong)NSString *title; +@property (nonatomic, strong)NSArray *messages; +@property(nonatomic, assign)BOOL loaded; +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCConferenceInviteMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCConferenceInviteMessageContent.h new file mode 100644 index 00000000..822353db --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCConferenceInviteMessageContent.h @@ -0,0 +1,69 @@ +// +// WFCCConferenceInviteMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + +/** + 电话总结消息 + */ +@interface WFCCConferenceInviteMessageContent : WFCCMessageContent + + +/** + CallId + */ +@property (nonatomic, strong)NSString *callId; + +/** + 会议主持人 +*/ +@property (nonatomic, strong)NSString *host; +/** + 会议标题 + */ +@property (nonatomic, strong)NSString *title; + +/** + 会议描述 + */ +@property (nonatomic, strong)NSString *desc; +/** + 会议开始时间 + */ +@property (nonatomic, assign)long long startTime; + +/* + 是否音频会议 + */ +@property (nonatomic, assign, getter=isAudioOnly)BOOL audioOnly; + +/* + 会议PIN +*/ +@property (nonatomic, strong)NSString *pin; + +/* + 会议密码 +*/ +@property (nonatomic, strong)NSString *password; + +/* + 是否是会议观众 +*/ +@property (nonatomic, assign)BOOL audience; + +/* + 是否是高级会议模式 +*/ +@property (nonatomic, assign)BOOL advanced; + +/* + 呼叫附加信息 +*/ +@property (nonatomic, strong)NSString *callExtra; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCConversation.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCConversation.h new file mode 100644 index 00000000..a4f5372c --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCConversation.h @@ -0,0 +1,79 @@ +// +// WFCCConversation.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" +#import "WFCCProtocol.h" +/** + 会话类型 + + - Single_Type: 单聊 + - Group_Type: 群组 + - Chatroom_Type: 聊天室 + - Channel_Type: 频道 + - Things_Type: 物联网 + - SecretChat_Type: 密聊 + */ +typedef NS_ENUM(NSInteger, WFCCConversationType) { + Single_Type, + Group_Type, + Chatroom_Type, + Channel_Type, + Things_Type, + SecretChat_Type, +}; + +/** + 会话 + */ +@interface WFCCConversation : WFCCJsonSerializer + +/** + 构造方法 + + @param type 会话类型 + @param target 目标会话ID + @param line 默认传0 + @return 会话 + */ ++(instancetype)conversationWithType:(WFCCConversationType)type + target:(NSString *)target + line:(int)line; + +/** + 构造方法 + + @param target 目标会话ID + @return 单聊会话 + */ ++(instancetype)singleConversation:(NSString *)target; + +/** + 构造方法 + + @param target 目标会话ID + @return 群组会话 + */ ++(instancetype)groupConversation:(NSString *)target; + +/** + 会话类型 + */ +@property (nonatomic, assign)WFCCConversationType type; + +/** + 目标会话ID,单聊为对方用户ID,群聊为群ID + */ +@property (nonatomic, strong)NSString *target; + +/** + 默认为0 + */ +@property (nonatomic, assign)int line; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCConversationInfo.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCConversationInfo.h new file mode 100644 index 00000000..e058f01e --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCConversationInfo.h @@ -0,0 +1,57 @@ +// +// WFCCConversationInfo.h +// WFChatClient +// +// Created by heavyrain on 2017/8/29. +// Copyright © 2017年 wildfire chat. All rights reserved. +// + +#import +#import "WFCCConversation.h" +#import "WFCCMessage.h" +#import "WFCCUnreadCount.h" +#import "WFCCJsonSerializer.h" + +/** + 会话信息 + */ +@interface WFCCConversationInfo : WFCCJsonSerializer + +/** + 会话 + */ +@property (nonatomic, strong)WFCCConversation *conversation; + +/** + 最后一条消息 + */ +@property (nonatomic, strong)WFCCMessage *lastMessage; + +/** + 草稿 + */ +@property (nonatomic, strong)NSString *draft; + +/** + 最后一条消息的时间戳 + */ +@property (nonatomic, assign)long long timestamp; + +/** + 未读数 + */ +@property (nonatomic, strong)WFCCUnreadCount *unreadCount; + +/** + 是否置顶 + */ +@property (nonatomic, assign)int isTop; + +/** + 是否设置了免打扰 + */ +@property (nonatomic, assign)BOOL isSilent; + +@end + + diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCConversationSearchInfo.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCConversationSearchInfo.h new file mode 100644 index 00000000..ec9e885e --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCConversationSearchInfo.h @@ -0,0 +1,42 @@ +// +// WFCCConversationSearchInfo.h +// WFChatClient +// +// Created by heavyrain on 2017/10/22. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import +#import "WFCCConversation.h" +#import "WFCCMessage.h" +#import "WFCCJsonSerializer.h" +/** + 会话搜索信息 + */ +@interface WFCCConversationSearchInfo : WFCCJsonSerializer + +/** + 会话 + */ +@property (nonatomic, strong)WFCCConversation *conversation; + +/** + 命中的消息 + */ +@property (nonatomic, strong)WFCCMessage *marchedMessage; + +/** + 命中数量 + */ +@property (nonatomic, assign)int marchedCount; + +/** + 搜索关键字 + */ +@property (nonatomic, strong)NSString *keyword; + +/** + 会话时间 + */ +@property (nonatomic, assign)int64_t timestamp; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCCreateGroupNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCCreateGroupNotificationContent.h new file mode 100644 index 00000000..6adfe2b4 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCCreateGroupNotificationContent.h @@ -0,0 +1,31 @@ +// +// WFCCCreateGroupNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/19. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 建群的通知消息 + */ +@interface WFCCCreateGroupNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 创建者ID + */ +@property (nonatomic, strong)NSString *creator; + +/** + 群名 + */ +@property (nonatomic, strong)NSString *groupName; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCDeleteMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCDeleteMessageContent.h new file mode 100644 index 00000000..34b73b8a --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCDeleteMessageContent.h @@ -0,0 +1,25 @@ +// +// WFCCDeleteMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + +/** + 文本消息 + */ +@interface WFCCDeleteMessageContent : WFCCMessageContent + +/** + 被删除消息的Uid + */ +@property (nonatomic, assign)long long messageUid; + +/** + 撤回用户Id + */ +@property (nonatomic, strong)NSString *operatorId; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCDeliveryReport.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCDeliveryReport.h new file mode 100644 index 00000000..52446303 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCDeliveryReport.h @@ -0,0 +1,22 @@ +// +// WFCCConversation.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" +/** + 会话 + */ +@interface WFCCDeliveryReport : WFCCJsonSerializer + ++(instancetype)delivered:(NSString *)userId + timestamp:(long long)timestamp; + +@property (nonatomic, strong)NSString *userId; +@property (nonatomic, assign)long long timestamp; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCDictionary.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCDictionary.h new file mode 100644 index 00000000..3c758bc7 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCDictionary.h @@ -0,0 +1,21 @@ +// +// WFCCDictionary.h +// WFChatClient +// +// Created by Rain on 26/5/2025. +// Copyright © 2025 WildFireChat. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface WFCCDictionary : NSObject ++ (WFCCDictionary *)fromData:(NSData *)data error:(NSError **)error; ++ (WFCCDictionary *)fromString:(NSString *)str error:(NSError **)error; ++ (WFCCDictionary *)fromDictionary:(NSDictionary *)dictionary; + +- (id)objectForKeyedSubscript:(id)key; +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCDismissGroupNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCDismissGroupNotificationContent.h new file mode 100644 index 00000000..97803499 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCDismissGroupNotificationContent.h @@ -0,0 +1,26 @@ +// +// WFCCDismissGroupNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/20. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 群解散的通知消息 + */ +@interface WFCCDismissGroupNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 操作者ID + */ +@property (nonatomic, strong)NSString *operateUser; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCDomainInfo.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCDomainInfo.h new file mode 100644 index 00000000..8ca2d465 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCDomainInfo.h @@ -0,0 +1,56 @@ +// +// WFCCDomainInfo.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" + +/** + 域信息 + */ +@interface WFCCDomainInfo : WFCCJsonSerializer + +/** + 域ID + */ +@property (nonatomic, strong)NSString *domainId; + +/** + 域的名称 + */ +@property (nonatomic, strong)NSString *name; + +/** + 域的描述 + */ +@property (nonatomic, strong)NSString *desc; + +/** + 域的邮件地址 + */ +@property (nonatomic, strong)NSString *email; + +/** + 域的电话 + */ +@property (nonatomic, strong)NSString *tel; + +/** + 域的地址 + */ +@property (nonatomic, strong)NSString *address; + +/** + 群的额外信息 + */ +@property (nonatomic, strong)NSString *extra; + +/** + 域的最后更新日期 + */ +@property (nonatomic, assign)long long updateDt; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCEnterChannelChatMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCEnterChannelChatMessageContent.h new file mode 100644 index 00000000..74e85b6b --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCEnterChannelChatMessageContent.h @@ -0,0 +1,17 @@ +// +// WFCCEnterChannelChatMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + + +/** + 进入频道会话消息 + */ +@interface WFCCEnterChannelChatMessageContent : WFCCMessageContent + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCEnums.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCEnums.h new file mode 100644 index 00000000..e4612ebc --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCEnums.h @@ -0,0 +1,141 @@ +// +// WFCCEnums.h +// WFChatClient +// +// Created by Heavyrian Lee on 2020/6/25. +// Copyright © 2020 WildFireChat. All rights reserved. +// + +#ifndef WFCCEnums_h +#define WFCCEnums_h + +typedef NS_ENUM(NSInteger, WFCCErrorCode) { + //0~255 server error + ERROR_CODE_SUCCESS = 0, // //"success"), + ERROR_CODE_SECRECT_KEY_MISMATCH = 1, //"secrect key mismatch"), + ERROR_CODE_INVALID_DATA = 2, //"invalid data"), + ERROR_CODE_NODE_NOT_EXIST = 3, //"node not exist"), + ERROR_CODE_SERVER_ERROR = 4, //"server error"), + ERROR_CODE_NOT_MODIFIED = 5, //"not modified"), + + //Auth error + ERROR_CODE_TOKEN_ERROR = 6, //"token error"), + ERROR_CODE_USER_FORBIDDEN = 8, //"user forbidden"), + + //Message error + ERROR_CODE_NOT_IN_GROUP = 9, //"not in group"), + ERROR_CODE_INVALID_MESSAGE = 10, //"invalid message"), + + //Group error + ERROR_CODE_GROUP_ALREADY_EXIST = 11, //"group aleady exist"), + + + //user error + ERROR_CODE_PASSWORD_INCORRECT = 15, //"password incorrect"), + + //user error + ERROR_CODE_FRIEND_ALREADY_REQUEST = 16, //"already send request"), + ERROR_CODE_FRIEND_REQUEST_BLOCKED = 18, //"friend request blocked"), + ERROR_CODE_FRIEND_REQUEST_EXPIRED = 19, //"friend request expired"), + + ERROR_CODE_NOT_IN_CHATROOM = 20, //"not in chatroom"), + + ERROR_CODE_NOT_IN_CHANNEL = 21, //"not in channel"), + + ERROR_CODE_NOT_LICENSED = 22, //"not licensed"), + ERROR_CODE_ALREADY_FRIENDS = 23, //"already friends"), + + ERROR_CODE_GROUP_EXCEED_MAX_MEMBER_COUNT = 240, //"group exceed max member count"), + ERROR_CODE_GROUP_MUTED = 241, //"group is muted"), + ERROR_CODE_SENSITIVE_MATCHED = 242, //"sensitive matched"), + ERROR_CODE_SIGN_EXPIRED = 243, //"sign expired"), + ERROR_CODE_AUTH_FAILURE = 244, //"auth failure"), + ERROR_CODE_CLIENT_COUNT_OUT_OF_LIMIT = 245, //"client count out of limit"), + ERROR_CODE_IN_BLACK_LIST = 246, //"user in balck list"), + ERROR_CODE_FORBIDDEN_SEND_MSG = 247, //"forbidden send msg globally"), + ERROR_CODE_NOT_RIGHT = 248, //"no right to operate"), + ERROR_CODE_TIMEOUT = 249, //"timeout"), + ERROR_CODE_OVER_FREQUENCY = 250, //"over frequency"), + ERROR_CODE_INVALID_PARAMETER = 251, //"Invalid parameter"), + ERROR_CODE_NOT_EXIST = 253, //"not exist"), + ERROR_CODE_NOT_IMPLEMENT = 254, //"not implement"), + + //负值为mars返回错误 + ERROR_CODE_Local_TaskTimeout = -1, + ERROR_CODE_Local_TaskRetry = -2, + ERROR_CODE_Local_StartTaskFail = -3, + ERROR_CODE_Local_AntiAvalanche = -4, + ERROR_CODE_Local_ChannelSelect = -5, + ERROR_CODE_Local_NoNet = -6, + ERROR_CODE_Local_Cancel = -7, + ERROR_CODE_Local_Clear = -8, + ERROR_CODE_Local_Reset = -9, + ERROR_CODE_Local_TaskParam = -12, + ERROR_CODE_Local_CgiFrequcencyLimit = -13, + ERROR_CODE_Local_ChannelID = -14, + + ERROR_CODE_Long_FirstPkgTimeout = -500, + ERROR_CODE_Long_PkgPkgTimeout = -501, + ERROR_CODE_Long_ReadWriteTimeout = -502, + ERROR_CODE_Long_TaskTimeout = -503, + + ERROR_CODE_Socket_NetworkChange = -10086, + ERROR_CODE_Socket_MakeSocketPrepared = -10087, + ERROR_CODE_Socket_WritenWithNonBlock = -10088, + ERROR_CODE_Socket_ReadOnce = -10089, + ERROR_CODE_Socket_RecvErr = -10091, + ERROR_CODE_Socket_SendErr = -10092, + ERROR_CODE_Socket_NoopTimeout = -10093, + ERROR_CODE_Socket_NoopAlarmTooLate = -10094, + ERROR_CODE_Http_SplitHttpHeadAndBody = -10194, + ERROR_CODE_Http_ParseStatusLine = -10195, + ERROR_CODE_Net_MsgXPHandleBufferErr = -10504, + ERROR_CODE_Dns_MakeSocketPrepared = -10606, + + //proto error code + ERROR_CODE_Proto_CorruptData = -100001, + ERROR_CODE_Proto_InvalideParameter = -100002, + //消息内容超过最大值,最大值为200KB,建议不超过15KB。 + ERROR_CODE_Proto_Content_Exceed_Max_Size = -100003, + //媒体内容超过最大值,最大值为100MB + ERROR_CODE_Proto_Media_Exceed_Max_Size = -100004, +}; + + +/** + 添加好友来源 + + - FriendSource_Unknown: 未知 + - FriendSource_Search: 搜索 + - FriendSource_Group: 群组,targetId为群主ID + - FriendSource_QrCode: 二维码,targetId为分享二维码的用户Id + - FriendSource_Card: 用户名片,targetId为分享名片的用户Id + - FriendSource_Org: 组织通讯录查看 + */ +typedef NS_ENUM(NSInteger, WFCCFriendSourceType) { + FriendSource_Unknown, + FriendSource_Search, + FriendSource_Group, + FriendSource_QrCode, + FriendSource_Card, + FriendSource_Org +}; + +/** + 群成员来源 + + - GroupMemberSource_Unknown: 搜索 + - GroupMemberSource_Search: 搜索 + - GroupMemberSource_Invite: 邀请,targetId为邀请人的用户id + - GroupMemberSource_QrCode: 二维码,targetId为分享群二维码的用户id + - GroupMemberSource_Card: 群名片,targetId为分享群名片的用户Id + */ +typedef NS_ENUM(NSInteger, WFCCGroupMemberSourceType) { + GroupMemberSource_Unknown, + GroupMemberSource_Search, + GroupMemberSource_Invite, + GroupMemberSource_QrCode, + GroupMemberSource_Card, +}; + +#endif /* WFCCEnums_h */ diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCFileMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCFileMessageContent.h new file mode 100644 index 00000000..2234767b --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCFileMessageContent.h @@ -0,0 +1,33 @@ +// +// WFCCSoundMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/9. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMediaMessageContent.h" + +/** + 语音消息 + */ +@interface WFCCFileMessageContent : WFCCMediaMessageContent + +/** + 构造方法 + + @param filePath 文件路径 + @return 语音消息 + */ ++ (instancetype)fileMessageContentFromPath:(NSString *)filePath; + +/** + 文件名 + */ +@property (nonatomic, strong)NSString *name; + +/** + 文件名 + */ +@property (nonatomic, assign)NSUInteger size; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCFileRecord.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCFileRecord.h new file mode 100644 index 00000000..1fdbc089 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCFileRecord.h @@ -0,0 +1,26 @@ +// +// WFCCFileRecord.h +// WFChatClient +// +// Created by dali on 2020/8/2. +// Copyright © 2020 WildFireChat. All rights reserved. +// + +#import +#import "WFCCConversation.h" +#import "WFCCJsonSerializer.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface WFCCFileRecord : WFCCJsonSerializer +@property (nonatomic, strong)WFCCConversation *conversation; +@property (nonatomic, assign)long long messageUid; +@property (nonatomic, strong)NSString *userId; +@property (nonatomic, strong)NSString *name; +@property (nonatomic, strong)NSString *url; +@property (nonatomic, assign)int size; +@property (nonatomic, assign)int downloadCount; +@property (nonatomic, assign)long long timestamp; +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCFriend.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCFriend.h new file mode 100644 index 00000000..1a23ee32 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCFriend.h @@ -0,0 +1,36 @@ +// +// WFCCFriend.h +// WFChatClient +// +// Created by heavyrain on 2021/5/16. +// Copyright © 2021 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface WFCCFriend : WFCCJsonSerializer +/* + 好友ID + */ +@property(nonatomic, strong)NSString *userId; + +/* + 好友昵称 + */ +@property(nonatomic, strong)NSString *alias; + +/* + 扩展信息,添加方式等 + */ +@property(nonatomic, strong)NSString *extra; + +/* + 添加好友时间 + */ +@property(nonatomic, assign)long long timestamp; +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCFriendAddedMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCFriendAddedMessageContent.h new file mode 100644 index 00000000..75316d2a --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCFriendAddedMessageContent.h @@ -0,0 +1,16 @@ +// +// WFCCFriendAddedMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/19. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 好友添加成功的通知。一般可以显示为你已添加XXX为好友了,可以开始聊天了。本消息和WFCCFriendGreetingMessageContent为后添加的,之前服务器端是直接发送了2个tip消息,这样就没有办法做多语言化了。但现在还不能直接使用这两个消息,因为有历史兼容问题,可以先加上这两个功能,等您的应用的SDK都更新支持这两个消息以后,再在服务器端加上。 + */ +@interface WFCCFriendAddedMessageContent : WFCCNotificationMessageContent + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCFriendGreetingMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCFriendGreetingMessageContent.h new file mode 100644 index 00000000..42cb0b7e --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCFriendGreetingMessageContent.h @@ -0,0 +1,16 @@ +// +// WFCCFriendGreetingMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/19. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** +好友打招呼的提示。一般可以显示为以上是打招呼信息。更多信息请阅读WFCCFriendAddedMessageContent的注释 +*/ +@interface WFCCFriendGreetingMessageContent : WFCCNotificationMessageContent + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCFriendRequest.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCFriendRequest.h new file mode 100644 index 00000000..882d8376 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCFriendRequest.h @@ -0,0 +1,51 @@ +// +// WFCCFriendRequest.h +// WFChatClient +// +// Created by heavyrain on 2017/10/17. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" +/** + 好友请求 + */ +@interface WFCCFriendRequest : WFCCJsonSerializer + +/** + 方向 + */ +@property(nonatomic, assign)int direction; + +/** + ID + */ +@property(nonatomic, strong)NSString *target; + +/** + 请求说明 + */ +@property(nonatomic, strong)NSString *reason; + +/** + 请求扩展信息 + */ +@property(nonatomic, strong)NSString *extra; + +/** + 接受状态 + */ +@property(nonatomic, assign)int status; + +/** + 已读 + */ +@property(nonatomic, assign)int readStatus; + +/** + 发起时间 + */ +@property(nonatomic, assign)long long timestamp; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCGroupInfo.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCGroupInfo.h new file mode 100644 index 00000000..b772a936 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCGroupInfo.h @@ -0,0 +1,125 @@ +// +// WFCCGroupInfo.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" +/** + 群类型 + + - GroupType_Normal: 管理员和群主才能加人和退群,修改群信息。 + - GroupType_Free: 所有人都能加人、退群和修改群信息 + - GroupType_Restricted: 带有群管理功能 + - GroupType_Organization: 组织群,只能通过API操作,群主和管理员可以禁言、撤回等操作 + */ +typedef NS_ENUM(NSInteger, WFCCGroupType) { + GroupType_Normal = 0, + GroupType_Free = 1, + GroupType_Restricted = 2, + GroupType_Organization = 3, +} ; + +/** + 群信息 + */ +@interface WFCCGroupInfo : WFCCJsonSerializer + +/** + 群类型 + */ +@property (nonatomic, assign)WFCCGroupType type; + +/** + 群ID + */ +@property (nonatomic, strong)NSString *target; + +/** + 群名 + */ +@property (nonatomic, strong)NSString *name; + +/** + 群头像 + */ +@property (nonatomic, strong)NSString *portrait; + +/** + 成员数 + */ +@property (nonatomic, assign)NSUInteger memberCount; + +/** + 群主 + */ +@property (nonatomic, strong)NSString *owner; + +/** + 扩展信息 + */ +@property (nonatomic, strong)NSString *extra; + +/** + 群备注 + */ +@property (nonatomic, strong)NSString *remark; + +/** + 群禁言状态,0 关闭群禁言;1 开启群禁言 + */ +@property (nonatomic, assign)int mute; + +/** + 加群申请状态,0 不限制加入(用户可以自己加群或被普通群成员拉入);1 普通群成员可以拉人进群;2 只有群管理才能拉人 + */ +@property (nonatomic, assign)int joinType; + +/** + 群成员私聊状态,0 允许私聊;1 不允许私聊 + */ +@property (nonatomic, assign)int privateChat; + +/** + 群搜索状态,0 群可以被搜索到;1 群不会被搜索到 + */ +@property (nonatomic, assign)int searchable; + +/** + 群成员是否可以加载加入之前的历史消息,0不可以;1可以 + */ +@property (nonatomic, assign)int historyMessage; + +/** + 群的最大成员数,可以通过server api来修改 + */ +@property (nonatomic, assign)int maxMemberCount; + +/** + 群成员私聊状态,0 普通群组;1 超级群组。超级群组不支持服务器端删除。 + */ +@property (nonatomic, assign)int superGroup; + +/** + 是否被解散,0 没有解散;1 已经被解散。在2024.3.30日以后的IM服务支持群组标记删除,默认为关,需要IM服务打开群组标记删除的开关。 + */ +@property (nonatomic, assign)int deleted; + +/** + 群的最后更新日期 + */ +@property (nonatomic, assign)long long updateDt; + +/** + 群成员的最后更新日期,一般是没有什么作用,唯一的作用就是当用户退出群组后,再获取群组信息,memberDt会为负数。 + */ +@property (nonatomic, assign)long long memberDt; + +/** + 群显示名称,如果有群备注返回群备注,没有群备注返回群名称 + */ +@property (nonatomic, strong, readonly)NSString *displayName; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCGroupJoinTypeNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCGroupJoinTypeNotificationContent.h new file mode 100644 index 00000000..35896206 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCGroupJoinTypeNotificationContent.h @@ -0,0 +1,31 @@ +// +// WFCCCreateGroupNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/19. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 建群的通知消息 + */ +@interface WFCCGroupJoinTypeNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 操作者ID + */ +@property (nonatomic, strong)NSString *operatorId; + +/** + 操作 + */ +@property (nonatomic, strong)NSString *type; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCGroupMember.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCGroupMember.h new file mode 100644 index 00000000..3e774f1c --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCGroupMember.h @@ -0,0 +1,66 @@ +// +// WFCCGroupMember.h +// WFChatClient +// +// Created by heavyrain on 2017/10/30. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" + +/** + 群成员类型 + + - Member_Type_Normal: 普通成员 + - Member_Type_Manager: 管理员 + - Member_Type_Owner: 群主 + - Member_Type_Muted: 被禁言 + - Member_Type_Deleted: 已删除成员,仅在群成员变动回调中存在。 + - Member_Type_Allowed: 被允许发言 + */ +typedef NS_ENUM(NSInteger, WFCCGroupMemberType) { + Member_Type_Normal = 0, + Member_Type_Manager, + Member_Type_Owner, + Member_Type_Muted, + Member_Type_Deleted, + Member_Type_Allowed = 5 +} ; + +/** + 群成员信息 + */ +@interface WFCCGroupMember : WFCCJsonSerializer + +/** + 群ID + */ +@property(nonatomic, strong)NSString *groupId; + +/** + 群成员ID + */ +@property(nonatomic, strong)NSString *memberId; + +/** + 群昵称 + */ +@property(nonatomic, strong)NSString *alias; + +/** + 群成员扩展信息 + */ +@property(nonatomic, strong)NSString *extra; + +/** + 群成员类型 + */ +@property(nonatomic, assign)WFCCGroupMemberType type; + +/** + 群成员加入时间戳 +*/ +@property(nonatomic, assign)long long createTime; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCGroupMemberAllowNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCGroupMemberAllowNotificationContent.h new file mode 100644 index 00000000..63b52e37 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCGroupMemberAllowNotificationContent.h @@ -0,0 +1,35 @@ +// +// WFCCCreateGroupNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/19. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 群成员禁言的通知消息 + */ +@interface WFCCGroupMemberAllowNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 操作者ID + */ +@property (nonatomic, strong)NSString *creator; + +/** + 操作 + */ +@property (nonatomic, strong)NSString *type; + +/** + 被禁言/取消禁言者ID列表 + */ +@property (nonatomic, strong)NSArray *targetIds; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCGroupMemberMuteNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCGroupMemberMuteNotificationContent.h new file mode 100644 index 00000000..def006ec --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCGroupMemberMuteNotificationContent.h @@ -0,0 +1,35 @@ +// +// WFCCCreateGroupNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/19. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 群成员禁言的通知消息 + */ +@interface WFCCGroupMemberMuteNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 操作者ID + */ +@property (nonatomic, strong)NSString *creator; + +/** + 操作 + */ +@property (nonatomic, strong)NSString *type; + +/** + 被禁言/取消禁言者ID列表 + */ +@property (nonatomic, strong)NSArray *targetIds; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCGroupMuteNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCGroupMuteNotificationContent.h new file mode 100644 index 00000000..71a4633c --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCGroupMuteNotificationContent.h @@ -0,0 +1,31 @@ +// +// WFCCCreateGroupNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/19. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 建群的通知消息 + */ +@interface WFCCGroupMuteNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 创建者ID + */ +@property (nonatomic, strong)NSString *creator; + +/** + 操作 + */ +@property (nonatomic, strong)NSString *type; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCGroupPrivateChatNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCGroupPrivateChatNotificationContent.h new file mode 100644 index 00000000..1b6d4fe3 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCGroupPrivateChatNotificationContent.h @@ -0,0 +1,31 @@ +// +// WFCCCreateGroupNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/19. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 建群的通知消息 + */ +@interface WFCCGroupPrivateChatNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 操作者ID + */ +@property (nonatomic, strong)NSString *operatorId; + +/** + 操作 + */ +@property (nonatomic, strong)NSString *type; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCGroupSearchInfo.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCGroupSearchInfo.h new file mode 100644 index 00000000..fd13458d --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCGroupSearchInfo.h @@ -0,0 +1,53 @@ +// +// WFCCGroupSearchInfo.h +// WFChatClient +// +// Created by heavyrain on 2017/10/22. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import +#import "WFCCGroupInfo.h" +#import "WFCCJsonSerializer.h" + +/** + 搜索群组匹配类型mask + + - GroupSearchMarchTypeMask_Group_Name: 匹配群组名称 + - GroupSearchMarchTypeMask_Member_Name: 匹配群成员昵称 + - GroupSearchMarchTypeMask_Member_Alias: 匹配群成员群昵称 + - GroupSearchMarchTypeMask_Group_Remark: 匹配群组remark + */ +typedef NS_ENUM(NSInteger, WFCCGroupSearchMarchTypeMask) { + GroupSearchMarchTypeMask_Group_Name = 0x01, + GroupSearchMarchTypeMask_Member_Name = 0x02, + GroupSearchMarchTypeMask_Member_Alias = 0x04, + GroupSearchMarchTypeMask_Group_Remark = 0x08 +}; + +/** + 群组搜索信息 + */ +@interface WFCCGroupSearchInfo : WFCCJsonSerializer + +/** + 命中的群组 + */ +@property (nonatomic, strong)WFCCGroupInfo *groupInfo; + +/** + 命中的类型,请参考WFCCGroupSearchMarchTypeMask + */ +@property (nonatomic, assign)int marchType; + +/** + 命中群成员名称 + */ +@property (nonatomic, strong)NSArray *marchedMemberNames; + +/** + 搜索的关键字 + */ +@property (nonatomic, strong)NSString *keyword; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCGroupSetManagerNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCGroupSetManagerNotificationContent.h new file mode 100644 index 00000000..3187cfd4 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCGroupSetManagerNotificationContent.h @@ -0,0 +1,35 @@ +// +// WFCCCreateGroupNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/19. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 设置/取消群管理员通知消息 + */ +@interface WFCCGroupSetManagerNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 操作者ID + */ +@property (nonatomic, strong)NSString *operatorId; + +/** + 操作,0取消管理员,1设置为管理员。 + */ +@property (nonatomic, strong)NSString *type; + +/** + Member ID + */ +@property (nonatomic, strong)NSArray *memberIds; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCGroupSettingsNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCGroupSettingsNotificationContent.h new file mode 100644 index 00000000..cfa1c08e --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCGroupSettingsNotificationContent.h @@ -0,0 +1,36 @@ +// +// WFCCGroupSettingsNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/19. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 建群的通知消息 + */ +@interface WFCCGroupSettingsNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 操作者ID + */ +@property (nonatomic, strong)NSString *operatorId; + +/** + 修改设置类型。7为修改是否查看历史消息;8为修改群最大成员数,9为修改是否为超级群 + */ +@property (nonatomic, assign)int type; + +/** + 修改后的数据 + */ +@property (nonatomic, assign)int value; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCIMService.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCIMService.h new file mode 100644 index 00000000..31083a87 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCIMService.h @@ -0,0 +1,2862 @@ +// +// WFCCIMService.h +// WFChatClient +// +// Created by heavyrain on 2017/11/5. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import +#import "WFCCMessage.h" +#import "WFCCGroupInfo.h" +#import "WFCCConversationInfo.h" +#import "WFCCUserInfo.h" +#import "WFCCFriendRequest.h" +#import "WFCCConversationSearchInfo.h" +#import "WFCCGroupMember.h" +#import "WFCCGroupSearchInfo.h" +#import "WFCCChatroomInfo.h" +#import "WFCCChatroomMemberInfo.h" +#import "WFCCUnreadCount.h" +#import "WFCCChannelInfo.h" +#import "WFCCPCOnlineInfo.h" +#import "WFCCFileRecord.h" +#import "WFCCFriend.h" +#import "WFCCSecretChatInfo.h" +#import "WFCCNetworkService.h" +#import "WFCCDomainInfo.h" + +#pragma mark - 频道通知定义 +//发送消息状态通知 +extern NSString *kSendingMessageStatusUpdated; +extern NSString *kUploadMediaMessageProgresse; +extern NSString *kConnectionStatusChanged; +extern NSString *kReceiveMessages; +extern NSString *kRecallMessages; +extern NSString *kDeleteMessages; +extern NSString *kMessageDelivered; +extern NSString *kMessageReaded; +extern NSString *kMessageUpdated; + +#pragma mark - 枚举值定义 +/** + 修改个人信息的内容 + + - Modify_DisplayName: 修改显示名 + - Modify_Portrait: 修改头像 + - Modify_Gender: 修改性别 + - Modify_Mobile: 修改手机号 + - Modify_Email: 修改邮箱 + - Modify_Address: 修改地址 + - Modify_Company: 修改公司信息 + - Modify_Social: 修改社交信息 + - Modify_Extra: 修改扩展信息 + */ +typedef NS_ENUM(NSInteger, ModifyMyInfoType) { + Modify_DisplayName = 0, + Modify_Portrait = 1, + Modify_Gender = 2, + Modify_Mobile = 3, + Modify_Email = 4, + Modify_Address = 5, + Modify_Company = 6, + Modify_Social = 7, + Modify_Extra = 8 +}; + +typedef NS_ENUM(NSInteger, ModifyGroupInfoType) { + Modify_Group_Name = 0, + Modify_Group_Portrait = 1, + Modify_Group_Extra = 2, + Modify_Group_Mute = 3, + Modify_Group_JoinType = 4, + Modify_Group_PrivateChat = 5, + Modify_Group_Searchable = 6, + Modify_Group_History_Message = 7, + Modify_Group_Max_Member_Count = 8 +}; + + +typedef NS_ENUM(NSInteger, ModifyChannelInfoType) { + Modify_Channel_Name = 0, + Modify_Channel_Portrait = 1, + Modify_Channel_Desc = 2, + Modify_Channel_Extra = 3, + Modify_Channel_Secret = 4, + Modify_Channel_Callback = 5 +}; + +/** + 个人设置Scope + + @discussion 用户设置,1000以内被系统保留。应用不应该直接使用系统预制的范围。应用可以使用1000以上的值。 + */ +typedef NS_ENUM(NSInteger, UserSettingScope) { + //不能直接使用,调用setConversation:silent:方法会使用到此值。 + UserSettingScope_Conversation_Silent = 1, + //不能直接使用 + UserSettingScope_Global_Silent = 2, + + //不能直接使用,调用setConversation:top:方法会使用到此值。 + UserSettingScope_Conversation_Top = 3, + //不能直接使用 + UserSettingScope_Hidden_Notification_Detail = 4, + //不能直接使用 + UserSettingScope_Group_Hide_Nickname = 5, + //不能直接使用 + UserSettingScope_Favourite_Group = 6, + + //不能直接使用,协议栈内会使用此值 + UserSettingScope_Conversation_Sync = 7, + //不能直接使用,协议栈内会使用此值 + UserSettingScope_My_Channel = 8, + //不能直接使用,协议栈内会使用此值 + UserSettingScope_Listened_Channel = 9, + + //不能直接使用,协议栈内会使用此值 + UserSettingScope_PC_Online = 10, + //不能直接使用,协议栈内会使用此值 + UserSettingScope_Conversation_Readed = 11, + //不能直接使用,协议栈内会使用此值 + UserSettingScope_WebOnline = 12, + //不能直接使用,协议栈内会使用此值 + UserSettingScope_DisableRecipt = 13, + //不能直接使用 + UserSettingScope_Favourite_User = 14, + //不能直接使用 + UserSettingScope_Mute_When_PC_Online = 15, + //不能直接使用 + UserSettingScope_Lines_Readed = 16, + //不能直接使用 + UserSettingScope_No_Disturbing = 17, + //不能直接使用,协议栈内会使用此值 + UserSettingScope_Conversation_Clear_Message = 18, + //不能直接使用,协议栈内会使用此值 + UserSettingScope_Conversation_Draft = 19, + //不能直接使用,协议栈内会使用此值 + UserSettingScope_Disable_Sync_Draft = 20, + //不能直接使用,协议栈内会使用此值 + UserSettingScope_Voip_Silent = 21, + //不能直接使用,协议栈内会使用此值 + UserSettingScope_PTT_Reserved = 22, + //不能直接使用,协议栈内会使用此值 + UserSettingScope_Custom_State = 23, + //不能直接使用,协议栈内会使用此值 + UserSettingScope_Disable_Secret_Chat = 24, + //不能直接使用,协议栈内会使用此值 + UserSettingScope_Ptt_Silent = 25, + //不能直接使用,协议栈内会使用此值 + UserSettingScope_Group_Remark = 26, + //不能直接使用,协议栈内会使用此值 + UserSettingScope_Privacy_Searchable = 27, + //不能直接使用,协议栈内会使用此值 + UserSettingScope_AddFriend_NoVerify = 28, + + //自定义用户设置,请使用1000以上的key + UserSettingScope_Custom_Begin = 1000 +} ; + + +/** + 搜索用户类型 + + - SearchUserType_General: 模糊搜索diaplayName,精确匹配name或电话或用户ID + - SearchUserType_Name_Mobile: 精确匹配name或电话 + - SearchUserType_Name: 精确匹配name + - SearchUserType_Mobile: 精确匹配电话 + - SearchUserType_UserId: 精确匹配用户ID + - SearchUserType_Name_Mobile_UserId: 精确匹配name或电话或用户ID + */ +typedef NS_ENUM(NSInteger, WFCCSearchUserType) { + SearchUserType_General, + SearchUserType_Name_Mobile, + SearchUserType_Name, + SearchUserType_Mobile, + SearchUserType_UserId, + SearchUserType_Name_Mobile_UserId +}; + +/** + 搜索用户的用户类型 + + - UserSearchUserType_All: 搜索普通用户和机器人 + - UserSearchUserType_Only_User: 只搜索普通用户 + - UserSearchUserType_Only_Robot: 只搜索机器人 + */ +typedef NS_ENUM(NSInteger, WFCCUserSearchUserType) { + UserSearchUserType_All, + UserSearchUserType_Only_User, + UserSearchUserType_Only_Robot +}; + +/** + 禁止搜索当前用户的掩码。 + + - DisableSearch_DisplayName_Mask: 第1位是是否禁止搜索昵称 + - DisableSearch_Name_Mask: 第2位是否禁止搜索账户 + - DisableSearch_Mobile_Mask: 第3位是否禁止搜索电话号码 + - DisableSearch_UserId_Mask: 第4位是否禁止搜索用户ID + */ +typedef NS_ENUM(NSInteger, WFCCDisableSearchMask) { + DisableSearch_DisplayName_Mask = 1, + DisableSearch_Name_Mask = 2, + DisableSearch_Mobile_Mask = 4, + DisableSearch_UserId_Mask = 8, +}; + + +typedef NS_ENUM(NSInteger, WFCCPlatformType) { + PlatformType_UNSET = 0, + PlatformType_iOS = 1, + PlatformType_Android = 2, + PlatformType_Windows = 3, + PlatformType_OSX = 4, + PlatformType_WEB = 5, + PlatformType_WX = 6, + PlatformType_Linux = 7, + PlatformType_iPad = 8, + //Android pad + PlatformType_APad = 9, + PlatformType_Harmony = 10, + PlatformType_HarmonyPad = 11, + PlatformType_HarmonyPC = 12 +} ; + +typedef NS_ENUM(NSInteger, WFCCFileRecordOrder) { + FileRecordOrder_TIME_DESC = 0, + FileRecordOrder_TIME_ASC = 1, + FileRecordOrder_SIZE_DESC = 2, + FileRecordOrder_SIZE_ASC = 3, +} ; + +#pragma mark - 用户源 +/* + * ChatClient内置支持用户信息托管,但对于很多应用来说都已经拥有自己的用户信息。此时可以实现用户源并设置到IMServer中去。这样ChatClient会从源中读取信息,从而ChatUIKit不用修改代码。 + * 对于好友关系,由于页面简单。如果客户有自己的好友关系,建议客户自己修改相关UI。 + * 对于群组建议使用我们的托管。 + */ +@protocol WFCCUserSource +- (WFCCUserInfo *)getUserInfo:(NSString *)userId + refresh:(BOOL)refresh; + +- (WFCCUserInfo *)getUserInfo:(NSString *)userId inGroup:(NSString *)groupId refresh:(BOOL)refresh; + +- (NSArray *)getUserInfos:(NSArray *)userIds inGroup:(NSString *)groupId; + +- (void)getUserInfo:(NSString *)userId + refresh:(BOOL)refresh + success:(void(^)(WFCCUserInfo *userInfo))successBlock + error:(void(^)(int errorCode))errorBlock; + +- (void)getUserInfo:(NSString *)userId + groupId:(NSString *)groupId + refresh:(BOOL)refresh + success:(void(^)(WFCCUserInfo *userInfo))successBlock + error:(void(^)(int errorCode))errorBlock; + +- (void)getUserInfos:(NSArray *)userIds + groupId:(NSString *)groupId + success:(void(^)(NSArray *userInfos))successBlock + error:(void(^)(int errorCode))errorBlock; + +- (void)searchUser:(NSString *)keyword + searchType:(WFCCSearchUserType)searchType + page:(int)page + success:(void(^)(NSArray *machedUsers))successBlock + error:(void(^)(int errorCode))errorBlock; + +- (void)searchUser:(NSString *)keyword + domain:(NSString *)domainId + searchType:(WFCCSearchUserType)searchType + page:(int)page + success:(void(^)(NSArray *machedUsers))successBlock + error:(void(^)(int errorCode))errorBlock; + +- (void)searchUser:(NSString *)keyword + domain:(NSString *)domainId + searchType:(WFCCSearchUserType)searchType + userType:(WFCCUserSearchUserType)userType + page:(int)page + success:(void(^)(NSArray *machedUsers))successBlock + error:(void(^)(int errorCode))errorBlock; + + +-(void)modifyMyInfo:(NSDictionary *)values + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; +@end + +@protocol ReceiveMessageFilter; +@class WFCCUserOnlineState; +@class WFCCUserCustomState; +@class UIImage; +#pragma mark - IM服务 + +/** + IM服务 + */ +@interface WFCCIMService : NSObject + +/** + IM服务单例 + + @return IM服务单例 + */ ++ (WFCCIMService*)sharedWFCIMService; + + +/* + 使用raw消息。当client用于uniapp时,messagePayload没有必要decode为messagecontent,使用raw消息,收发消息都是WFCCRawMessageContent。不要调用这个函数,仅仅当client用在uniapp时。 + */ +- (void)useRawMessage; + + +/** + 外部用户源 + */ +@property(nonatomic, weak)id userSource; + + +/** + 默认图片,当图片消息或者其他类型需要缩略图消息没有缩略图时,使用次默认图片 + */ +@property(nonatomic, strong)UIImage *defaultThumbnailImage; + +#pragma mark - 会话相关 +/** + 获取会话信息 + + @param conversationTypes 会话类型 + @param lines 默认传 @[@(0)] + @return 会话信息 + */ +- (NSArray *)getConversationInfos:(NSArray *)conversationTypes + lines:(NSArray *)lines; + +/** + 获取会话信息 + + @param conversation 会话 + @return 会话信息 + */ +- (WFCCConversationInfo *)getConversationInfo:(WFCCConversation *)conversation; + +/** + 搜索会话 + + @param keyword 关键词 + @param conversationTypes 会话类型 + @param lines 默认传 @[@(0)] + @return 会话搜索结果信息 + */ +- (NSArray *)searchConversation:(NSString *)keyword inConversation:(NSArray *)conversationTypes lines:(NSArray *)lines; + +/** + 搜索会话 + + @param keyword 关键词 + @param conversationTypes 会话类型 + @param lines 默认传 @[@(0)] + @param startTime 开始时间,如果不限制开始时间请使用0 + @param endTime 结束时间,如果不限制开始时间请使用0 + @param desc 是否逆序 + @param limit limit + @param offset offset + @return 会话搜索结果信息 + */ +- (NSArray *)searchConversation:(NSString *)keyword inConversation:(NSArray *)conversationTypes lines:(NSArray *)lines startTime:(int64_t)startTime endTime:(int64_t)endTime desc:(BOOL)desc limit:(int)limit offset:(int)offset; + +/** + 搜索会话 + + @param keyword 关键词 + @param conversationTypes 会话类型 + @param lines 默认传 @[@(0)] + @param cntTypes 消息内容类型 + @param startTime 开始时间,如果不限制开始时间请使用0 + @param endTime 结束时间,如果不限制开始时间请使用0 + @param desc 是否逆序 + @param limit limit + @param offset offset + @param onlyMentionedMsg 是否只搜索提醒消息 + @return 会话搜索结果信息 + */ +- (NSArray *)searchConversation:(NSString *)keyword + inConversation:(NSArray *)conversationTypes + lines:(NSArray *)lines + cntTypes:(NSArray *)cntTypes + startTime:(int64_t)startTime + endTime:(int64_t)endTime + desc:(BOOL)desc + limit:(int)limit + offset:(int)offset + onlyMentionedMsg:(BOOL)onlyMentionedMsg; + +/** + 删除会话 + + @param conversation 会话 + @param clearMessage 是否删除会话中的消息 + */ +- (void)removeConversation:(WFCCConversation *)conversation + clearMessage:(BOOL)clearMessage; + +/** + 设置或取消会话置顶 + + @param conversation 会话 + @param top 置顶优先级 + */ +- (void)setConversation:(WFCCConversation *)conversation + top:(int)top + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 设置会话免打扰 + + @param conversation 会话 + @param silent 是否免打扰 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)setConversation:(WFCCConversation *)conversation + silent:(BOOL)silent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取会话是否免打扰状态 + + @param conversation 会话 + @return 会话是否免打扰 + */ +- (BOOL)isConversationSilent:(WFCCConversation *)conversation; +/** + 设置会话草稿 + + @param conversation 会话 + @param draft 草稿 + */ +- (void)setConversation:(WFCCConversation *)conversation + draft:(NSString *)draft; + +/** + 更新会话的时间 + + @param conversation 会话 + @param timestamp 时间戳 + */ +- (void)setConversation:(WFCCConversation *)conversation + timestamp:(long long)timestamp; + +/** + 获取会话列表第一条未读消息Id + + @param conversation 会话 + + @return 会话中最早一条未读消息Id + */ +- (long)getFirstUnreadMessageId:(WFCCConversation *)conversation; + +/** + 清除远端会话消息,仅专业版支持。 + + @param conversation 会话 + @param successBlock 删除成功 + @param errorBlock 删除失败 + */ +- (void)clearRemoteConversationMessage:(WFCCConversation *)conversation + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +#pragma mark - 未读数相关 +/** + 获取指定类型会话的未读数 + + @param conversationTypes 会话类型 + @param lines 默认传 @[@(0)] + @return 未读数 + */ +- (WFCCUnreadCount *)getUnreadCount:(NSArray *)conversationTypes + lines:(NSArray *)lines; + +/** + 获取某个会话的未读数 + + @param conversation 会话 + @return 未读数 + */ +- (WFCCUnreadCount *)getUnreadCount:(WFCCConversation *)conversation; + +/** + 清空会话未读数。 + + @param conversation 会话 + */ +- (void)clearUnreadStatus:(WFCCConversation *)conversation; + +/** +清空会话未读数 + +@param conversationTypes 会话类型 +@param lines 线路 +*/ +- (void)clearUnreadStatus:(NSArray *)conversationTypes + lines:(NSArray *)lines; + +/** + 清空所有会话的未读数。仅清理本地消息的未读数,没有同步到其他端,如果多端使用,请避免使用此方法 + */ +- (void)clearAllUnreadStatus DEPRECATED_MSG_ATTRIBUTE("use clearUnreadStatus:lines: instead"); + +/** + 清空消息未读。 + + @param messageId 消息ID + @discuss 这个函数只能清除本地的状态,不能同步到服务器或者其他端。建议一般情况下不要用这个接口。 + */ +- (void)clearMessageUnreadStatus:(long)messageId; + +/** + 清空某条消息之前(包含)所有消息的未读状态。 + + @param messageId 消息ID + @param conversation 消息所属会话 + */ +- (void)clearMessageUnreadStatusBefore:(long)messageId conversation:(WFCCConversation *)conversation; + +/** + 设置会话的最后一条接收消息为未读状态。 + + @param conversation 会话 + @param sync 是否同步到其它客户端 + @return YES设置成功,NO消息不存在或已经存在未读。 + */ +- (BOOL)markAsUnRead:(WFCCConversation *)conversation syncToOtherClient:(BOOL)sync; + +/** + 设置媒体消息已播放(已经放开限制,所有消息都可以设置为已读状态) + + @param messageId 消息ID + */ +- (void)setMediaMessagePlayed:(long)messageId; + +/** + 设置消息的本地附加信息,注意信息不在多端之间同步。 + + @param messageId 消息ID + @param extra 附加信息 + + @return YES更新成功,NO消息不存在 + */ +- (BOOL)setMessage:(long)messageId localExtra:(NSString *)extra; +/** +获取会话内已读状态 + +@param conversation 会话 +@return 会话的每个用户的已读时间 +*/ +- (NSMutableDictionary *)getConversationRead:(WFCCConversation *)conversation; + +/** +获取会话内已送达状态 + +@param conversation 会话 +@return 会话的每个用户的已送达时间 +*/ +- (NSMutableDictionary *)getMessageDelivery:(WFCCConversation *)conversation; + +#pragma mark - 消息相关 +/** + 获取消息 + @discuss 获取从fromIndex起count条旧的消息。如果想要获取比fromIndex新的消息,count传负值。 + + @param conversation 会话 + @param contentTypes 消息类型 + @param fromIndex 起始index + @param count 总数 + @return 消息实体 + */ +- (NSArray *)getMessages:(WFCCConversation *)conversation + contentTypes:(NSArray *)contentTypes + from:(NSUInteger)fromIndex + count:(NSInteger)count + withUser:(NSString *)user DEPRECATED_MSG_ATTRIBUTE("use v2 API instead"); + +/** + 获取消息 + @discuss 获取从fromIndex起count条旧的消息。如果想要获取比fromIndex新的消息,count传负值。 + + @param conversation 会话 + @param contentTypes 消息类型 + @param fromIndex 起始index + @param count 总数 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getMessagesV2:(WFCCConversation *)conversation + contentTypes:(NSArray *)contentTypes + from:(NSUInteger)fromIndex + count:(NSInteger)count + withUser:(NSString *)user + success:(void(^)(NSArray *messages))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取提醒消息 + @discuss 获取从fromIndex起count条旧的消息。如果想要获取比fromIndex新的消息,count传负值。 + + @param conversation 会话 + @param fromIndex 起始index + @param count 总数 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getMentionedMessages:(WFCCConversation *)conversation + from:(NSUInteger)fromIndex + count:(NSInteger)count + success:(void(^)(NSArray *messages))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取消息 + @discuss 获取从fromIndex起count条旧的消息。如果想要获取比fromIndex新的消息,count传负值。 + + @param conversation 会话 + @param messageStatus 消息状态WFCCMessageStatus + @param fromIndex 起始index + @param count 总数 + @return 消息实体 + */ +- (NSArray *)getMessages:(WFCCConversation *)conversation + messageStatus:(NSArray *)messageStatus + from:(NSUInteger)fromIndex + count:(NSInteger)count + withUser:(NSString *)user DEPRECATED_MSG_ATTRIBUTE("use v2 API instead"); + +/** + 获取消息 + @discuss 获取从fromIndex起count条旧的消息。如果想要获取比fromIndex新的消息,count传负值。 + + @param conversation 会话 + @param messageStatus 消息状态WFCCMessageStatus + @param fromIndex 起始index + @param count 总数 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getMessagesV2:(WFCCConversation *)conversation + messageStatus:(NSArray *)messageStatus + from:(NSUInteger)fromIndex + count:(NSInteger)count + withUser:(NSString *)user + success:(void(^)(NSArray *messages))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取某类会话信息 + + @param conversationTypes 会话类型 + @param lines 默认传 @[@(0)] + @param contentTypes 消息类型 + @param fromIndex 起始index + @param count 总数 + @return 消息实体 + */ +- (NSArray *)getMessages:(NSArray *)conversationTypes + lines:(NSArray *)lines + contentTypes:(NSArray *)contentTypes + from:(NSUInteger)fromIndex + count:(NSInteger)count + withUser:(NSString *)user DEPRECATED_MSG_ATTRIBUTE("use v2 API instead"); + +/** + 获取某类会话信息 + + @param conversationTypes 会话类型 + @param lines 默认传 @[@(0)] + @param contentTypes 消息类型 + @param fromIndex 起始index + @param count 总数 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getMessagesV2:(NSArray *)conversationTypes + lines:(NSArray *)lines + contentTypes:(NSArray *)contentTypes + from:(NSUInteger)fromIndex + count:(NSInteger)count + withUser:(NSString *)user + success:(void(^)(NSArray *messages))successBlock + error:(void(^)(int error_code))errorBlock; +/** + 获取某类会话信息 + + @param conversationTypes 会话类型 + @param lines 默认传 @[@(0)] + @param messageStatus 消息状态 + @param fromIndex 起始index + @param count 总数 + @param user 对话用户 + @return 消息实体 + */ +- (NSArray *)getMessages:(NSArray *)conversationTypes + lines:(NSArray *)lines + messageStatus:(NSArray *)messageStatus + from:(NSUInteger)fromIndex + count:(NSInteger)count + withUser:(NSString *)user DEPRECATED_MSG_ATTRIBUTE("use v2 API instead"); + +/** + 获取某类会话信息 + + @param conversationTypes 会话类型 + @param lines 默认传 @[@(0)] + @param messageStatus 消息状态 + @param fromIndex 起始index + @param count 总数 + @param user 对话用户 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getMessagesV2:(NSArray *)conversationTypes + lines:(NSArray *)lines + messageStatus:(NSArray *)messageStatus + from:(NSUInteger)fromIndex + count:(NSInteger)count + withUser:(NSString *)user + success:(void(^)(NSArray *messages))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取消息 + @discuss 获取从fromTime起count条旧的消息。如果想要获取比fromIndex新的消息,count传负值。 + + @param conversation 会话 + @param contentTypes 消息类型 + @param fromTime 起始index + @param count 总数 + @return 消息实体 + */ +- (NSArray *)getMessages:(WFCCConversation *)conversation + contentTypes:(NSArray *)contentTypes + fromTime:(NSUInteger)fromTime + count:(NSInteger)count + withUser:(NSString *)user DEPRECATED_MSG_ATTRIBUTE("use v2 API instead"); + +/** + 获取消息 + @discuss 获取从fromTime起count条旧的消息。如果想要获取比fromIndex新的消息,count传负值。 + + @param conversation 会话 + @param contentTypes 消息类型 + @param fromTime 起始index + @param count 总数 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getMessagesV2:(WFCCConversation *)conversation + contentTypes:(NSArray *)contentTypes + fromTime:(NSUInteger)fromTime + count:(NSInteger)count + withUser:(NSString *)user + success:(void(^)(NSArray *messages))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取用户会话消息 + @discuss 获取从fromIndex起count条旧的消息。如果想要获取比fromIndex新的消息,count传负值。 + + @param userId 用户ID + @param conversation 会话 + @param contentTypes 消息类型 + @param fromIndex 起始index + @param count 总数 + @return 消息实体 + */ +- (NSArray *)getUserMessages:(NSString *)userId + conversation:(WFCCConversation *)conversation + contentTypes:(NSArray *)contentTypes + from:(NSUInteger)fromIndex + count:(NSInteger)count DEPRECATED_MSG_ATTRIBUTE("use v2 API instead"); + +/** + 获取用户会话消息 + @discuss 获取从fromIndex起count条旧的消息。如果想要获取比fromIndex新的消息,count传负值。 + + @param userId 用户ID + @param conversation 会话 + @param contentTypes 消息类型 + @param fromIndex 起始index + @param count 总数 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getUserMessagesV2:(NSString *)userId + conversation:(WFCCConversation *)conversation + contentTypes:(NSArray *)contentTypes + from:(NSUInteger)fromIndex + count:(NSInteger)count + success:(void(^)(NSArray *messages))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取用户某类会话信息 + + @param userId 用户ID + @param conversationTypes 会话类型 + @param lines 默认传 @[@(0)] + @param contentTypes 消息类型 + @param fromIndex 起始index + @param count 总数 + @return 消息实体 + */ +- (NSArray *)getUserMessages:(NSString *)userId + conversationTypes:(NSArray *)conversationTypes + lines:(NSArray *)lines + contentTypes:(NSArray *)contentTypes + from:(NSUInteger)fromIndex + count:(NSInteger)count DEPRECATED_MSG_ATTRIBUTE("use v2 API instead"); + +/** + 获取用户某类会话信息 + + @param userId 用户ID + @param conversationTypes 会话类型 + @param lines 默认传 @[@(0)] + @param contentTypes 消息类型 + @param fromIndex 起始index + @param count 总数 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getUserMessagesV2:(NSString *)userId + conversationTypes:(NSArray *)conversationTypes + lines:(NSArray *)lines + contentTypes:(NSArray *)contentTypes + from:(NSUInteger)fromIndex + count:(NSInteger)count + success:(void(^)(NSArray *messages))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取服务器消息 + @discussion 获取得到的消息数目有可能少于指定的count数,如果count不为0就意味着还有更多的消息可以获取,只有获取到的消息数为0才表示没有更多的消息了。 + + @param conversation 会话 + @param beforeMessageUid 起始index + @param count 总数 + @param successBlock 返回消息 + @param errorBlock 返回错误码 + */ +- (void)getRemoteMessages:(WFCCConversation *)conversation + before:(long long)beforeMessageUid + count:(NSUInteger)count + contentTypes:(NSArray *)contentTypes + success:(void(^)(NSArray *messages))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取一条远端消息,消息不会存储在数据库中 + + @param messageUid 消息ID + @param successBlock 返回消息 + @param errorBlock 返回错误码 + */ +- (void)getRemoteMessage:(long long)messageUid + success:(void(^)(WFCCMessage *message))successBlock + error:(void(^)(int error_code))errorBlock; +/** + 获取消息 + + @param messageId 消息ID + @return 消息实体 + */ +- (WFCCMessage *)getMessage:(long)messageId; + +/** + 获取消息 + + @param messageUid 消息UID + @return 消息实体 + */ +- (WFCCMessage *)getMessageByUid:(long long)messageUid; + +/** + 搜索消息 + + @param conversation 会话,如果为空将搜索所有会话 + @param keyword 关键词 + @param desc order + @param limit limit + @param offset offset + @param withUser 用户ID + @return 命中的消息 + */ +- (NSArray *)searchMessage:(WFCCConversation *)conversation + keyword:(NSString *)keyword + order:(BOOL)desc + limit:(int)limit + offset:(int)offset + withUser:(NSString *)withUser; + +/** + 搜索消息 + + @param conversation 会话,如果为空将搜索所有会话 + @param keyword 关键词 + @param contentTypes 过滤的消息类型 + @param desc order + @param offset offset + @param limit limit + @param withUser 用户ID + @return 命中的消息 + */ +- (NSArray *)searchMessage:(WFCCConversation *)conversation + keyword:(NSString *)keyword + contentTypes:(NSArray *)contentTypes + order:(BOOL)desc + limit:(int)limit + offset:(int)offset + withUser:(NSString *)withUser; + +/** + 搜索消息 + + @param conversation 会话,如果为空将搜索所有会话 + @param keyword 关键词 + @param contentTypes 过滤的消息类型 + @param startTime 消息的开始时间,单位为毫秒,如果不需要开始时间请用0。 + @param endTime 消息的结束时间,单位为毫秒,如果不需要结束时间请用0.。 + @param desc order + @param offset offset + @param limit limit + @param withUser 用户ID + @return 命中的消息 + */ +- (NSArray *)searchMessage:(WFCCConversation *)conversation + keyword:(NSString *)keyword + contentTypes:(NSArray *)contentTypes + startTime:(int64_t)startTime + endTime:(int64_t)endTime + order:(BOOL)desc + limit:(int)limit + offset:(int)offset + withUser:(NSString *)withUser; + +/** + 搜索提醒消息 + + @param conversation 会话,如果为空将搜索所有会话 + @param keyword 关键词 + @param desc order + @param offset offset + @param limit limit + @return 命中的消息 + */ +- (NSArray *)searchMentionedMessages:(WFCCConversation *)conversation + keyword:(NSString *)keyword + order:(BOOL)desc + limit:(int)limit + offset:(int)offset; + +/** + 获取某类会话信息 + + @param conversationTypes 会话类型 + @param lines 默认传 @[@(0)] + @param contentTypes 消息类型 + @param keyword 关键字 + @param fromIndex 起始index + @param count 总数 + @param withUser 用户ID + @return 消息实体 + */ +- (NSArray *)searchMessage:(NSArray *)conversationTypes + lines:(NSArray *)lines + contentTypes:(NSArray *)contentTypes + keyword:(NSString *)keyword + from:(NSUInteger)fromIndex + count:(NSInteger)count + withUser:(NSString *)withUser; + +/** + 获取某类会话提醒信息 + + @param conversationTypes 会话类型 + @param lines 默认传 @[@(0)] + @param keyword 关键字 + @param desc order + @param offset offset + @param limit limit + @return 消息实体 + */ +- (NSArray *)searchMentionedMessage:(NSArray *)conversationTypes + lines:(NSArray *)lines + keyword:(NSString *)keyword + order:(BOOL)desc + limit:(int)limit + offset:(int)offset; +/** + 发送消息 + + @param conversation 会话 + @param content 消息内容 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + @return 消息实体 + */ +- (WFCCMessage *)send:(WFCCConversation *)conversation + content:(WFCCMessageContent *)content + success:(void(^)(long long messageUid, long long timestamp))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 发送媒体消息 + + @param conversation 会话 + @param content 消息内容 + @param successBlock 成功的回调 + @param progressBlock 上传进度的回调,注意仅当媒体内容大于300K才会有回调 + @param errorBlock 失败的回调 + @return 消息实体 + */ +- (WFCCMessage *)sendMedia:(WFCCConversation *)conversation + content:(WFCCMessageContent *)content + success:(void(^)(long long messageUid, long long timestamp))successBlock + progress:(void(^)(long uploaded, long total))progressBlock + error:(void(^)(int error_code))errorBlock; + +/** + 发送消息 + + @param conversation 会话 + @param content 消息内容 + @param expireDuration 消息的有效期,0不限期,单位秒 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + @return 消息实体 + */ +- (WFCCMessage *)send:(WFCCConversation *)conversation + content:(WFCCMessageContent *)content + expireDuration:(int)expireDuration + success:(void(^)(long long messageUid, long long timestamp))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 发送消息 + + @param conversation 会话 + @param content 消息内容 + @param toUsers 在会话中只发给该用户,如果为空则发到会话中 + @param expireDuration 消息的有效期,0不限期,单位秒 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + @return 消息实体 + */ +- (WFCCMessage *)send:(WFCCConversation *)conversation + content:(WFCCMessageContent *)content + toUsers:(NSArray *)toUsers + expireDuration:(int)expireDuration + success:(void(^)(long long messageUid, long long timestamp))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 发送媒体消息 + + @param conversation 会话 + @param content 消息内容 + @param expireDuration 消息的有效期,0不限期,单位秒 + @param successBlock 成功的回调 + @param progressBlock 上传进度的回调,注意仅当媒体内容大于300K才会有回调 + @param errorBlock 失败的回调 + @return 消息实体 + */ +- (WFCCMessage *)sendMedia:(WFCCConversation *)conversation + content:(WFCCMessageContent *)content + expireDuration:(int)expireDuration + success:(void(^)(long long messageUid, long long timestamp))successBlock + progress:(void(^)(long uploaded, long total))progressBlock + error:(void(^)(int error_code))errorBlock; + + +/** + 发送媒体消息 + + @param conversation 会话 + @param content 消息内容 + @param toUsers 在会话中只发给该用户,如果为空则发到会话中 + @param expireDuration 消息的有效期,0不限期,单位秒 + @param successBlock 成功的回调 + @param progressBlock 上传进度的回调,注意仅当媒体内容大于300K才会有回调 + @param errorBlock 失败的回调 + @return 消息实体 + */ +- (WFCCMessage *)sendMedia:(WFCCConversation *)conversation + content:(WFCCMessageContent *)content + toUsers:(NSArray *)toUsers + expireDuration:(int)expireDuration + success:(void(^)(long long messageUid, long long timestamp))successBlock + progress:(void(^)(long uploaded, long total))progressBlock + error:(void(^)(int error_code))errorBlock; + +/** + 发送媒体消息 + + @param conversation 会话 + @param content 消息内容 + @param toUsers 在会话中只发给该用户,如果为空则发到会话中 + @param expireDuration 消息的有效期,0不限期,单位秒 + @param successBlock 成功的回调 + @param progressBlock 上传进度的回调,注意仅当媒体内容大于300K才会有回调 + @param mediaUploadedBlock 上传成功的回调 + @param errorBlock 失败的回调 + @return 消息实体 + */ +- (WFCCMessage *)sendMedia:(WFCCConversation *)conversation + content:(WFCCMessageContent *)content + toUsers:(NSArray *)toUsers + expireDuration:(int)expireDuration + success:(void(^)(long long messageUid, long long timestamp))successBlock + progress:(void(^)(long uploaded, long total))progressBlock + mediaUploaded:(void(^)(NSString *remoteUrl))mediaUploadedBlock + error:(void(^)(int error_code))errorBlock; + +/** + 发送已保存消息,消息状态必须是发送中或者发送失败 + + @param message 已经存储在本地待发送的消息 + @param expireDuration 消息的有效期,0不限期,单位秒 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + @return 协议栈是否可以发送 + */ +- (BOOL)sendSavedMessage:(WFCCMessage *)message + expireDuration:(int)expireDuration + success:(void(^)(long long messageUid, long long timestamp))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 取消发送消息,只有发送媒体类消息才可以取消 + + @param messageId 消息Id + @return 是否取消成功 + */ +- (BOOL)cancelSendingMessage:(long)messageId; +/** + 撤回消息 + + @param message 待撤回的消息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + @discuss 服务器不检查可撤回时间,应用逻辑来处理。 + */ +- (void)recall:(WFCCMessage *)message + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 上传媒体(图片、语音、文件等)数据 + + @param fileName 文件名,可为空 + @param mediaData 媒体信息 + @param mediaType 媒体类型 + @param successBlock 成功的回调 + @param progressBlock 上传进度的回调,注意仅当媒体内容大于300K才会有回调 + @param errorBlock 失败的回调 + */ +- (void)uploadMedia:(NSString *)fileName + mediaData:(NSData *)mediaData + mediaType:(WFCCMediaType)mediaType + success:(void(^)(NSString *remoteUrl))successBlock + progress:(void(^)(long uploaded, long total))progressBlock + error:(void(^)(int error_code))errorBlock; + +/** + 上传媒体(图片、语音、文件等)文件 + + @param filePath 文件名,可为空 + @param mediaType 媒体类型 + @param successBlock 成功的回调 + @param progressBlock 上传进度的回调,注意仅当媒体内容大于300K才会有回调 + @param errorBlock 失败的回调 + */ +- (void)uploadMediaFile:(NSString *)filePath + mediaType:(WFCCMediaType)mediaType + success:(void(^)(NSString *remoteUrl))successBlock + progress:(void(^)(long uploaded, long total))progressBlock + error:(void(^)(int error_code))errorBlock; + +/** + 同步上传媒体(图片、语音、文件等),成功或者失败之后才会返回 + + @param fileName 文件名,可为空 + @param mediaData 媒体信息 + @param mediaType 媒体类型 + @param successBlock 成功的回调 + @param progressBlock 上传进度的回调,注意仅当媒体内容大于300K才会有回调 + @param errorBlock 失败的回调 + + @return 是否上传成功 + */ +- (BOOL)syncUploadMedia:(NSString *)fileName + mediaData:(NSData *)mediaData + mediaType:(WFCCMediaType)mediaType + success:(void(^)(NSString *remoteUrl))successBlock + progress:(void(^)(long uploaded, long total))progressBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取上传接口,用来上传大文件。只有专业版才支持,使用前先调用isSupportBigFilesUpload检查是否支持 + + @param fileName 文件名 + @param mediaType 媒体类型 + @param contentType Http的ContentType header,为空时默认为"application/octet-stream" + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getUploadUrl:(NSString *)fileName + mediaType:(WFCCMediaType)mediaType + contentType:(NSString *)contentType + success:(void(^)(NSString *uploadUrl, NSString *downloadUrl, NSString *backupUploadUrl, int type))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 是否支持大文件上传 + + @return YES支持大文件上传,调用getUploadUrl:getUploadUrl:success:error:方法获取到上传url,然后再在应用层上传。 + */ +- (BOOL)isSupportBigFilesUpload; + +/** + 删除本地消息 + + @param messageId 消息ID + @return 是否删除成功 + */ +- (BOOL)deleteMessage:(long)messageId; + + +/** + 批量删除本地消息 + + @param messageUids 消息UID列表 + @return 是否删除成功 + */ +- (BOOL)batchDeleteMessages:(NSArray *)messageUids; + +/** + 删除远端消息,仅专业版支持。 + + @param messageUid 消息UID + @param successBlock 删除成功 + @param errorBlock 删除失败 + */ +- (void)deleteRemoteMessage:(long long)messageUid + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 更新远端消息,仅专业版支持。 + + @discussion 客户端仅能更新自己发送的消息,更新的消息类型不能变,更新的消息类型是服务配置允许更新的内容。Server API更新则没有限制。 + + @param messageUid 消息UID + @param content 更新消息内容 + @param distribute 是否分发到其他客户端 + @param updateLocal 是否更新本地消息内容 + @param successBlock 删除成功 + @param errorBlock 删除失败 + */ +- (void)updateRemoteMessage:(long long)messageUid + content:(WFCCMessageContent *)content + distribute:(BOOL)distribute + updateLocal:(BOOL)updateLocal + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 删除会话中的消息 + + @param conversation 会话 + */ +- (void)clearMessages:(WFCCConversation *)conversation; + +/** + 删除会话中的before之前的旧消息。 + + @param conversation 会话,如果conversation为nil,则清除所有会话的消息。 + @param before 时间点,单位是毫秒 + */ +- (void)clearMessages:(WFCCConversation *)conversation before:(int64_t)before; + +/** + 删除会话中的消息,只保留最近指定条数的消息。 + + @param conversation 会话,如果conversation为nil,则清除所有会话的消息。 + @param keepCount 保留的条数 + */ +- (void)clearMessages:(WFCCConversation *)conversation keepLatest:(int)keepCount; + +/** + 删除指定用户指定时间段的消息 + + @param userId 指定用户 + @param start 消息开始时间,如果为0忽略开始时间 + @param end 消息结束时间,如果为0忽略结束时间 + */ +- (void)clearMessages:(NSString *)userId start:(int64_t)start end:(int64_t)end; + +/** + 删除所有消息。 + + @param removeConversation 是否同时删除会话信息 + */ +- (void)clearAllMessages:(BOOL)removeConversation; + +/** + 注册自定义消息类型 + + @param contentClass 自定义消息 + */ +- (void)registerMessageContent:(Class)contentClass; + +/** + 注册自定义消息flag。此方法仅供给uniapp使用。 + + @param contentType 自定义消息类型 + @param contentFlag 自定义消息flag + */ +- (void)registerMessageFlag:(int)contentType flag:(int)contentFlag; + +/** + 消息解码 + + @param payload 消息Payload + @return 消息内容 + */ +- (WFCCMessageContent *)messageContentFromPayload:(WFCCMessagePayload *)payload; + + +/** + 插入消息 + + @param conversation 会话 + @param content 消息内容 + @param status 消息状态,注意消息状态会影响消息方向 + @param serverTime 时间,0为当前时间 + @return 消息实体 + */ +- (WFCCMessage *)insert:(WFCCConversation *)conversation + sender:(NSString *)sender + content:(WFCCMessageContent *)content + status:(WFCCMessageStatus)status + notify:(BOOL)notify + toUsers:(NSArray *)toUsers + serverTime:(long long)serverTime; + +/** + 更新消息内容。只更新本地消息内容,无法更新服务器和远端。不支持聊天室消息,因为聊天室消息本地不存储。 + + @param messageId 消息ID + @param content 消息内容 + */ +- (void)updateMessage:(long)messageId + content:(WFCCMessageContent *)content; + +/** + 更新消息内容及时间。只更新本地消息内容,无法更新服务器和远端。不支持聊天室消息,因为聊天室消息本地不存储。 + + @param messageId 消息ID + @param content 消息内容 + @param timestamp 消息时间戳 + */ +- (void)updateMessage:(long)messageId + content:(WFCCMessageContent *)content + timestamp:(long long)timestamp; + +/** +更新消息状态,需要确保状态跟消息的方向相对应。一般情况下协议栈会自动处理好,不建议客户手动操作状态。。只更新本地消息内容,无法更新服务器和远端。 + +@param messageId 消息ID +@param status 消息状态 + +@return YES 更新成功。NO 消息不存在,或者状态与消息方向不匹配 +*/ +- (BOOL)updateMessage:(long)messageId status:(WFCCMessageStatus)status; + +/** + 插入消息。只插入到本地,无法更新服务器和远端。 + + @param message 待插入的消息 + @return 插入消息的id + */ +- (long)insertMessage:(WFCCMessage *)message; + +/** + 获取会话的消息数 + + @param conversation 会话。 + @return 会话的消息数。 + */ +- (int)getMessageCount:(WFCCConversation *)conversation; + +/** + 获取会话消息数量 + + @param conversationTypes 会话类型 + @param lines 默认传 @[@(0)] + @return 会话信息 + */ +- (int)getConversationMessageCount:(NSArray *)conversationTypes + lines:(NSArray *)lines; +#pragma mark - 用户相关 +/** + 获取用户信息 + @discussion refresh 为true会导致一次网络同步,代价特别大,应该尽量避免使用true,仅当在进入此人的单聊会话中时或者此人的用户信息页面使用一次true。 + + @param userId 用户ID + @param refresh 是否强制从服务器更新,如果本地没有或者强制,会从服务器刷新,然后发出通知kUserInfoUpdated。 + @return 本地的用户信息,可能为空 + */ +- (WFCCUserInfo *)getUserInfo:(NSString *)userId + refresh:(BOOL)refresh; + +/** + 获取用户信息 + @discussion 获取用户信息,如果在群中有群昵称也一并返回 + @discussion refresh 为true会导致一次网络同步,代价特别大,应该尽量避免使用true,仅当在进入此人的单聊会话中时或者此人的用户信息页面使用一次true。 + + @param userId 用户ID + @param groupId 群组ID + @param refresh 是否强制从服务器更新,如果本地没有或者强制,会从服务器刷新,然后发出通知kUserInfoUpdated。 + @return 本地的用户信息,可能为空 + */ +- (WFCCUserInfo *)getUserInfo:(NSString *)userId inGroup:(NSString *)groupId refresh:(BOOL)refresh; + +/** + 批量获取用户信息 + + @param userIds 用户ID列表 + @param groupId 群组ID + @return 本地的用户信息列表。本地不存在的用户会返回只有id的用户信息,同时会拉取。 + */ +- (NSArray *)getUserInfos:(NSArray *)userIds inGroup:(NSString *)groupId; + +/** + 搜索用户 + + @param keyword 关键词 + @param searchType 搜索类型 + @param page page + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)searchUser:(NSString *)keyword + searchType:(WFCCSearchUserType)searchType + page:(int)page + success:(void(^)(NSArray *machedUsers))successBlock + error:(void(^)(int errorCode))errorBlock; + +/** + 搜索用户 + + @param keyword 关键词 + @param domainId 域ID + @param searchType 搜索类型 + @param page page + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)searchUser:(NSString *)keyword + domain:(NSString *)domainId + searchType:(WFCCSearchUserType)searchType + page:(int)page + success:(void(^)(NSArray *machedUsers))successBlock + error:(void(^)(int errorCode))errorBlock; + +/** + 搜索用户 + + @param keyword 关键词 + @param domainId 域ID + @param searchType 搜索类型 + @param userType 用户类型 + @param page page + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)searchUser:(NSString *)keyword + domain:(NSString *)domainId + searchType:(WFCCSearchUserType)searchType + userType:(WFCCUserSearchUserType)userType + page:(int)page + success:(void(^)(NSArray *machedUsers))successBlock + error:(void(^)(int errorCode))errorBlock; + +/** + 获取用户信息 + @discussion refresh 为true会导致一次网络同步,代价特别大,应该尽量避免使用true,仅当在进入此人的单聊会话中时或者此人的用户信息页面使用true + + @param userId 用户ID + @param refresh 是否强制从服务器更新,如果本地没有或者强制,会从服务器刷新,然后发出通知kUserInfoUpdated。 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getUserInfo:(NSString *)userId + refresh:(BOOL)refresh + success:(void(^)(WFCCUserInfo *userInfo))successBlock + error:(void(^)(int errorCode))errorBlock; + +/** + 获取用户信息 + @discussion refresh 为true会导致一次网络同步,代价特别大,应该尽量避免使用true,仅当在进入此人的单聊会话中时或者此人的用户信息页面使用true + + @param userId 用户ID + @param groupId 群组ID,可以为nil + @param refresh 是否强制从服务器更新,如果本地没有或者强制,会从服务器刷新,然后发出通知kUserInfoUpdated。 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getUserInfo:(NSString *)userId + groupId:(NSString *)groupId + refresh:(BOOL)refresh + success:(void(^)(WFCCUserInfo *userInfo))successBlock + error:(void(^)(int errorCode))errorBlock; + +/** + 批量获取用户信息 + @discussion 当本地有部分或者全部不存在时,会从服务器加载这些缺失的用户信息。 + + @param userIds 用户ID列表 + @param groupId 群组ID,可以为nil + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getUserInfos:(NSArray *)userIds + groupId:(NSString *)groupId + success:(void(^)(NSArray *userInfo))successBlock + error:(void(^)(int errorCode))errorBlock; +#pragma mark - 好友相关 +/** + 查询用户和当前用户是否是好友关系 + + @param userId 用户ID + @return 是否是好友 + */ +- (BOOL)isMyFriend:(NSString *)userId; + +/** + 获取当前用户的好友列表 + + @param refresh 是否强制从服务器更新,如果不刷新则从本地缓存中读取 + @return 好友列表的用户ID + */ +- (NSArray *)getMyFriendList:(BOOL)refresh; + +/** + 获取当前用户的好友列表 + + @param refresh 是否强制从服务器更新,如果不刷新则从本地缓存中读取 + @return 好友列表 + */ +- (NSArray *)getFriendList:(BOOL)refresh; + +/** + 搜索好友 + @param keyword 关键词 + @return 好友用户信息 + */ +- (NSArray *)searchFriends:(NSString *)keyword; + +/** + 搜索群组 + @param keyword 关键词 + @return 群组搜索结果 + */ +- (NSArray *)searchGroups:(NSString *)keyword; + +/** + 获取收到的好友请求 + + @return 好友请求 + */ +- (NSArray *)getIncommingFriendRequest; + +/** + 获取发出的好友请求 + + @return 好友请求 + */ +- (NSArray *)getOutgoingFriendRequest; + +/** + 获取所有的好友请求 + + @return 好友请求 + */ +- (NSArray *)getAllFriendRequest; + +/** + 获取某一条好友请求记录 + @param uerId 对方用户ID + @param direction 0 发送的好友请求;1 收到的好友请求。 + + @return 好友请求 + */ +- (WFCCFriendRequest *)getFriendRequest:(NSString *)uerId direction:(int)direction; + +/** + 清理好友请求 + @param direction 好友请求的方向,0发送;1收到。 + @param beforeTime 清理时间之前的请求,单位是毫秒。如果清理所有用0 + + @return 返回true表示清理成功,返回false表示没有符合条件的请求 + */ +- (BOOL)clearFriendRequest:(int)direction beforeTime:(int64_t)beforeTime; + +/** + 删除好友请求 + @param direction 好友请求的方向,0发送;1收到。 + @param userId 用户ID + + @return 返回true表示删除成功,返回false表示找到请求 + */ +- (BOOL)deleteFriendRequest:(NSString *)userId direction:(int)direction; + +/** + 从服务器更新好友请求 + */ +- (void)loadFriendRequestFromRemote; + +/** + 获取未读的好友请求数 + + @return 未读的好友请求数 + */ +- (int)getUnreadFriendRequestStatus; + +/** + 清除好友请求的未读数 + */ +- (void)clearUnreadFriendRequestStatus; + +/** + 删除好友 + + @param userId 用户ID + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)deleteFriend:(NSString *)userId + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 发送好友请求 + + @param userId 用户ID + @param reason 请求说明 + @param extra 扩展信息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)sendFriendRequest:(NSString *)userId + reason:(NSString *)reason + extra:(NSString *)extra + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 处理好友请求 + + @param userId 用户ID + @param accpet 是否接受 + @param extra 附加信息,如果接受,附加信息会添加到好友附加信息中 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)handleFriendRequest:(NSString *)userId + accept:(BOOL)accpet + extra:(NSString *)extra + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +- (NSString *)getFriendAlias:(NSString *)friendId; + +- (void)setFriend:(NSString *)friendId + alias:(NSString *)alias + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +- (NSString *)getFriendExtra:(NSString *)friendId; +/** + 查询用户是否被加入黑名单 + + @param userId 用户ID + @return 是否被加入黑名单 + */ +- (BOOL)isBlackListed:(NSString *)userId; + +/** + 获取当前用户的黑名单列表 + + @param refresh 是否强制从服务器更新,如果不刷新则从本地缓存中读取 + @return 黑名单列表的用户ID + */ +- (NSArray *)getBlackList:(BOOL)refresh; + +/** + 设置黑名单 + + @param userId 用户ID + @param isBlackListed YES 加入黑名单; NO 取消黑名单 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)setBlackList:(NSString *)userId + isBlackListed:(BOOL)isBlackListed + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +#pragma mark - 群相关 +/** + 获取群成员信息 + @discussion refresh 为true会导致一次网络同步,代价特别大,应该尽量避免使用true,仅当在进入此人的群聊会话详情中时使用一次true。 + + @param groupId 群ID + @param refresh 是否强制从服务器更新,如果不刷新则从本地缓存中读取 + @return 群成员信息列表 + */ +- (NSArray *)getGroupMembers:(NSString *)groupId + forceUpdate:(BOOL)refresh; + +/** + 根据成员类型获取群成员信息 + + @param groupId 群ID + @param memberType 群成员类型 + @return 群成员信息列表 + */ +- (NSArray *)getGroupMembers:(NSString *)groupId + type:(WFCCGroupMemberType)memberType; + +/** + 获取指定数目群成员信息 + + @param groupId 群ID + @param count 群成员类型个数 + @return 群成员信息列表 + */ +- (NSArray *)getGroupMembers:(NSString *)groupId + count:(int)count; +/** + 获取群成员信息 + @discussion refresh 为true会导致一次网络同步,代价特别大,应该尽量避免使用true,仅当在进入此人的群聊会话详情中时使用一次true。 + + @param groupId 群ID + @param refresh 是否强制从服务器更新,如果不刷新则从本地缓存中读取 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getGroupMembers:(NSString *)groupId + refresh:(BOOL)refresh + success:(void(^)(NSString *groupId, NSArray *))successBlock + error:(void(^)(int errorCode))errorBlock; + +/** + 获取群信息 + @discussion refresh 为true会导致一次网络同步,代价特别大,应该尽量避免使用true,仅当在进入此人的群聊会话中时使用一次true。 + + @param groupId 群ID + @param refresh 是否强制从服务器更新,如果不刷新则从本地缓存中读取 + @return 群信息 + */ +- (WFCCGroupInfo *)getGroupInfo:(NSString *)groupId + refresh:(BOOL)refresh; + +/** + 批量获取群信息 + @discussion refresh 为true会导致一次网络同步,代价特别大,应该尽量避免使用true,仅当在进入此人的群聊会话中时使用一次true。 + + @param groupIds 群ID列表 + @param refresh 是否强制从服务器更新,如果不刷新则从本地缓存中读取 + @return 群信息 + */ +- (NSArray *)getGroupInfos:(NSArray *)groupIds + refresh:(BOOL)refresh; +/** + 获取群信息 + @discussion refresh 为true会导致一次网络同步,代价特别大,应该尽量避免使用true,仅当在进入此人的群聊会话中时使用一次true。 + + @param groupId 群ID + @param refresh 是否强制从服务器更新,如果不刷新则从本地缓存中读取 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getGroupInfo:(NSString *)groupId + refresh:(BOOL)refresh + success:(void(^)(WFCCGroupInfo *groupInfo))successBlock + error:(void(^)(int errorCode))errorBlock; +/** + 获取群成员信息 + + @param groupId 群ID + @param memberId 群成员ID + @return 群成员信息 + */ +- (WFCCGroupMember *)getGroupMember:(NSString *)groupId + memberId:(NSString *)memberId; + +/** + 创建群 + + @param groupId 群ID + @param groupName 群名称 + @param groupPortrait 群头像 + @param groupMembers 群成员 + @param notifyLines 默认传 @[@(0)] + @param notifyContent 通知消息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)createGroup:(NSString *)groupId + name:(NSString *)groupName + portrait:(NSString *)groupPortrait + type:(WFCCGroupType)type + groupExtra:(NSString *)groupExtra + members:(NSArray *)groupMembers + memberExtra:(NSString *)memberExtra + notifyLines:(NSArray *)notifyLines + notifyContent:(WFCCMessageContent *)notifyContent + success:(void(^)(NSString *groupId))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 添加群成员 + + @param members 成员的用户ID列表 + @param groupId 群ID + @param notifyLines 默认传 @[@(0)] + @param notifyContent 通知消息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)addMembers:(NSArray *)members + toGroup:(NSString *)groupId + memberExtra:(NSString *)memberExtra + notifyLines:(NSArray *)notifyLines + notifyContent:(WFCCMessageContent *)notifyContent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 踢出群成员 + + @param members 成员的用户ID列表 + @param groupId 群ID + @param notifyLines 默认传 @[@(0)] + @param notifyContent 通知消息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)kickoffMembers:(NSArray *)members + fromGroup:(NSString *)groupId + notifyLines:(NSArray *)notifyLines + notifyContent:(WFCCMessageContent *)notifyContent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 退群 + + @param groupId 群ID + @param notifyLines 默认传 @[@(0)] + @param notifyContent 通知消息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)quitGroup:(NSString *)groupId + notifyLines:(NSArray *)notifyLines + notifyContent:(WFCCMessageContent *)notifyContent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 退群 + + @param groupId 群ID + @param keepMessage 是否保留消息 + @param notifyLines 默认传 @[@(0)] + @param notifyContent 通知消息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)quitGroup:(NSString *)groupId + keepMessage:(BOOL)keepMessage + notifyLines:(NSArray *)notifyLines + notifyContent:(WFCCMessageContent *)notifyContent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 解散群 + + @param groupId 群ID + @param notifyLines 默认传 @[@(0)] + @param notifyContent 通知消息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)dismissGroup:(NSString *)groupId + notifyLines:(NSArray *)notifyLines + notifyContent:(WFCCMessageContent *)notifyContent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 修改群信息 + + @param groupId 群ID + @param type 要修改的群属性 + @param newValue 要修改的群属性值 + @param notifyLines 默认传 @[@(0)] + @param notifyContent 通知消息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)modifyGroupInfo:(NSString *)groupId + type:(ModifyGroupInfoType)type + newValue:(NSString *)newValue + notifyLines:(NSArray *)notifyLines + notifyContent:(WFCCMessageContent *)notifyContent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 修改自己的群昵称 + + @param groupId 群ID + @param newAlias 昵称 + @param notifyLines 默认传 @[@(0)] + @param notifyContent 通知消息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)modifyGroupAlias:(NSString *)groupId + alias:(NSString *)newAlias + notifyLines:(NSArray *)notifyLines + notifyContent:(WFCCMessageContent *)notifyContent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 修改群成员的昵称,群主可以修改所有人,群管理员可以修改普通成员的群昵称 + + @param groupId 群ID + @param newAlias 昵称 + @param notifyLines 默认传 @[@(0)] + @param notifyContent 通知消息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)modifyGroupMemberAlias:(NSString *)groupId + memberId:(NSString *)memberId + alias:(NSString *)newAlias + notifyLines:(NSArray *)notifyLines + notifyContent:(WFCCMessageContent *)notifyContent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 修改自己的群成员附加信息 + + @param groupId 群ID + @param extra 附加信息 + @param notifyLines 默认传 @[@(0)] + @param notifyContent 通知消息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)modifyGroupMemberExtra:(NSString *)groupId + extra:(NSString *)extra + notifyLines:(NSArray *)notifyLines + notifyContent:(WFCCMessageContent *)notifyContent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 修改群成员的附加信息,群主可以修改所有人,群管理员可以修改普通成员的附加信息 + + @param groupId 群ID + @param extra 附加信息 + @param notifyLines 默认传 @[@(0)] + @param notifyContent 通知消息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)modifyGroupMemberExtra:(NSString *)groupId + memberId:(NSString *)memberId + extra:(NSString *)extra + notifyLines:(NSArray *)notifyLines + notifyContent:(WFCCMessageContent *)notifyContent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; +/** + 转移群主 + + @param groupId 群ID + @param newOwner 群主的用户ID + @param notifyLines 默认传 @[@(0)] + @param notifyContent 通知消息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)transferGroup:(NSString *)groupId + to:(NSString *)newOwner + notifyLines:(NSArray *)notifyLines + notifyContent:(WFCCMessageContent *)notifyContent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 设置群管理 + + @param groupId 群ID + @param isSet 设置或取消 + @param memberIds 成员ID + @param notifyLines 默认传 @[@(0)] + @param notifyContent 通知消息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)setGroupManager:(NSString *)groupId + isSet:(BOOL)isSet + memberIds:(NSArray *)memberIds + notifyLines:(NSArray *)notifyLines + notifyContent:(WFCCMessageContent *)notifyContent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 设置群成员禁言,仅专业版支持 + + @param groupId 群ID + @param isSet 设置或取消 + @param memberIds 成员ID + @param notifyLines 默认传 @[@(0)] + @param notifyContent 通知消息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)muteGroupMember:(NSString *)groupId + isSet:(BOOL)isSet + memberIds:(NSArray *)memberIds + notifyLines:(NSArray *)notifyLines + notifyContent:(WFCCMessageContent *)notifyContent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 设置群成员允许名单,当设置群全局禁言时,仅群主/群管理/运行名单成员可以发言,仅专业版支持 + + @param groupId 群ID + @param isSet 设置或取消 + @param memberIds 成员ID + @param notifyLines 默认传 @[@(0)] + @param notifyContent 通知消息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)allowGroupMember:(NSString *)groupId + isSet:(BOOL)isSet + memberIds:(NSArray *)memberIds + notifyLines:(NSArray *)notifyLines + notifyContent:(WFCCMessageContent *)notifyContent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取群备注 + + @param groupId 群ID + @return 群备注 + */ +- (NSString *)getGroupRemark:(NSString *)groupId; + +/** + 设置群备注 + + @param groupId 群ID + @param remark 群备注 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)setGroup:(NSString *)groupId + remark:(NSString *)remark + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; +/** + 获取当前用户收藏的群组 + + @return 当前用户收藏的群组ID + */ +- (NSArray *)getFavGroups; + +/** + 是否是当前用户收藏的群组 + + @return 是否是当前用户收藏的群组 + */ +- (BOOL)isFavGroup:(NSString *)groupId; + +/** + 设置群组收藏状态 + + @param groupId 群组ID + @param fav 是否收藏 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)setFavGroup:(NSString *)groupId fav:(BOOL)fav success:(void(^)(void))successBlock error:(void(^)(int errorCode))errorBlock; +#pragma mark - 个人设置相关 +/** + 获取个人设置 + + @param scope 设置项的scope + @param key 设置项的key + @return 设置值 + */ +- (NSString *)getUserSetting:(UserSettingScope)scope + key:(NSString *)key; + +/** + 获取个人一类设置 + + @param scope 设置项的scope + @return scope对应的所有设置值 + */ +- (NSDictionary *)getUserSettings:(UserSettingScope)scope; + +/** + 设置个人设置项 + + @param scope 设置项的scope + @param key 设置项的key + @param value 值 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)setUserSetting:(UserSettingScope)scope + key:(NSString *)key + value:(NSString *)value + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 修改个人信息 + + @param values 信息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + @discuss 性别属性是int类型,修改时需要转为字符串类型 + */ +-(void)modifyMyInfo:(NSDictionary *)values + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + + + +/** +是否全局静音 + +@return YES,当前用户全局静音;NO,没有全局静音 +*/ +- (BOOL)isGlobalSilent; + +/** +修改全局静音状态 + +@param silent 是否静音 +@param successBlock 成功的回调 +@param errorBlock 失败的回调 +*/ +- (void)setGlobalSilent:(BOOL)silent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** +是否实时音视频通知面打扰。服务器端2021.9.20后支持分别设置通知免打扰和实时音视频免打扰 + +@return YES,当前用户音视频不通知;NO,当前用户音视频通知 +*/ +- (BOOL)isVoipNotificationSilent; + +/** +修改实时音视频通知面打扰。服务器端2021.9.20后支持分别设置通知免打扰和实时音视频免打扰 + +@param silent 是否静音 +@param successBlock 成功的回调 +@param errorBlock 失败的回调 +*/ +- (void)setVoipNotificationSilent:(BOOL)silent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** +是否开启草稿同步 + +@return YES,同步;NO,不同步 +*/ +- (BOOL)isEnableSyncDraft; + +/** +修改是否开启草稿同步 + +@param enable 是否同步 +@param successBlock 成功的回调 +@param errorBlock 失败的回调 +*/ +- (void)setEnableSyncDraft:(BOOL)enable + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** +获取免打扰时间 + + @param resultBlock 免打扰时间回调,时间为UTC 0点开始的分钟数,需要转换成当地时间。 + @param errorBlock 不存在时调用,error_code为-1 +*/ +- (void)getNoDisturbingTimes:(void(^)(int startMins, int endMins))resultBlock + error:(void(^)(int error_code))errorBlock; + +/** +修改免打扰时间 + +@param startMins 起始时间,一天中的分钟数,时间为UTC,需要转换成当地时间。 +@param endMins 结束时间,一天中的分钟数。可以小于startMins,如果小于表示隔夜。 +@param successBlock 成功的回调 +@param errorBlock 失败的回调 +*/ +- (void)setNoDisturbingTimes:(int)startMins + endMins:(int)endMins + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** +取消免打扰时间 + +@param successBlock 成功的回调 +@param errorBlock 失败的回调 +*/ +- (void)clearNoDisturbingTimes:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 当前时间是否是免打扰 + */ +- (BOOL)isNoDisturbing; + +/** +是否隐藏推送详情 + +@return YES,隐藏推送详情,提示“您收到一条消息”;NO,推送显示消息摘要 +*/ +- (BOOL)isHiddenNotificationDetail; + +/** +修改全局静音状态 + +@param hidden 是否静音 +@param successBlock 成功的回调 +@param errorBlock 失败的回调 +*/ +- (void)setHiddenNotificationDetail:(BOOL)hidden + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** +是否隐藏群组会话中群成员昵称显示 + +@return YES,群组会话中不显示群成员昵称;NO,显示 +*/ +- (BOOL)isHiddenGroupMemberName:(NSString *)groupId; + +/** +修改隐藏群组会话中群成员昵称显示状态 + +@param hidden 是否隐藏 +@param successBlock 成功的回调 +@param errorBlock 失败的回调 +*/ +- (void)setHiddenGroupMemberName:(BOOL)hidden + group:(NSString *)groupId + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取当前用户的所有群组,注意这个方法的代价比较大,不建议高频使用 + + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +-(void)getMyGroups:(void(^)(NSArray *groupIds))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取某个用户的共同群组,注意这个方法的代价比较大,不建议高频使用 + + @param userId 用户ID + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getCommonGroups:(NSString *)userId + success:(void(^)(NSArray *groupIds))successBlock + error:(void(^)(int error_code))errorBlock; + +/** +当前用户是否启用消息回执功能,仅专业版有效 + +@return YES,开启消息回执功能;NO,关闭个人的消息回执功能。 +@disscussion 仅当服务器开启这个功能才有效 +*/ +- (BOOL)isUserEnableReceipt; +/** +修改当前用户是否启用消息回执功能,仅专业版有效 + +@param enable 是否开启 +@param successBlock 成功的回调 +@param errorBlock 失败的回调 + @disscussion 仅当服务器开启这个功能才有效 +*/ +- (void)setUserEnableReceipt:(BOOL)enable + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取当前用户星标用户 + + @return 当前用户星标用户 + */ +- (NSArray *)getFavUsers; + +/** + 是否是星标用户 + + @return 是否是星标用户 + */ +- (BOOL)isFavUser:(NSString *)userId; + +/** + 设置星标用户 + + @param userId 用户ID + @param fav 是否星标 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)setFavUser:(NSString *)userId fav:(BOOL)fav success:(void(^)(void))successBlock error:(void(^)(int errorCode))errorBlock; +#pragma mark - 聊天室相关 +- (void)joinChatroom:(NSString *)chatroomId + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +- (void)quitChatroom:(NSString *)chatroomId + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +- (void)getChatroomInfo:(NSString *)chatroomId + upateDt:(long long)updateDt + success:(void(^)(WFCCChatroomInfo *chatroomInfo))successBlock + error:(void(^)(int error_code))errorBlock; + +- (void)getChatroomMemberInfo:(NSString *)chatroomId + maxCount:(int)maxCount + success:(void(^)(WFCCChatroomMemberInfo *memberInfo))successBlock + error:(void(^)(int error_code))errorBlock; + +- (NSString *)getJoinedChatroomId; + +#pragma mark - 频道相关 +- (void)createChannel:(NSString *)channelName + portrait:(NSString *)channelPortrait + desc:(NSString *)desc + extra:(NSString *)extra + success:(void(^)(WFCCChannelInfo *channelInfo))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取频道信息 + + @param channelId 频道ID + @param refresh 是否强制从服务器更新,如果不刷新则从本地缓存中读取 + @return 群信息 + */ +- (WFCCChannelInfo *)getChannelInfo:(NSString *)channelId + refresh:(BOOL)refresh; + +/** + 修改频道信息 + + @param channelId 群ID + @param type 要修改的群属性 + @param newValue 要修改的群属性值 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)modifyChannelInfo:(NSString *)channelId + type:(ModifyChannelInfoType)type + newValue:(NSString *)newValue + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 搜索频道 + + @param keyword 关键词 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)searchChannel:(NSString *)keyword success:(void(^)(NSArray *machedChannels))successBlock error:(void(^)(int errorCode))errorBlock; + +/** + 是否收听频道 + + @param channelId 频道ID + @return YES,收听;NO,未收听 + */ +- (BOOL)isListenedChannel:(NSString *)channelId; + +/** + 收听或者取消收听频道 + + @param channelId 频道ID + @param listen 是否收听 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)listenChannel:(NSString *)channelId listen:(BOOL)listen success:(void(^)(void))successBlock error:(void(^)(int errorCode))errorBlock; + +/** + 获取当前用户创建的频道 + + @return 当前用户创建的频道ID + */ +- (NSArray *)getMyChannels; + +/** + 获取当前用户收听的频道 + + @return 当前用户收听的频道ID + */ +- (NSArray *)getListenedChannels DEPRECATED_MSG_ATTRIBUTE("use getRemoteListenedChannels: instead"); + +/** + 获取当前用户收听的频道 + + @param successBlock 成功返回关注的频道id列表 + @param errorBlock 失败 + */ +- (void)getRemoteListenedChannels:(void(^)(NSArray *))successBlock error:(void(^)(int errorCode))errorBlock; + +/** + 销毁频道 + + @param channelId 频道ID + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)destoryChannel:(NSString *)channelId + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + + +#pragma mark - Mesh 接口 +/** + 获取域信息 + + @param domainId 域ID + @param refresh 是否从服务器刷新 + + @return 域信息 + */ +- (WFCCDomainInfo *)getDomainInfo:(NSString *)domainId refresh:(BOOL)refresh; +/** + 获取所有的域 + + @param successBlock 成功回调 + @param errorBlock 错误回调 + */ +- (void)getRemoteDomains:(void (^)(NSArray *))successBlock error:(void (^)(int))errorBlock; + +#pragma mark - Secret Chat 接口 +/** + 发起密聊 + + @param userId 对方用户ID + @param successBlock 成功的回调,回调返回密聊ID + @param errorBlock 失败的回调 + */ +- (void)createSecretChat:(NSString *)userId + success:(void(^)(NSString *targetId, int line))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 销毁密聊 + + @param targetId 密聊ID + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)destroySecretChat:(NSString *)targetId + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取密聊用户ID + + @param targetId 密聊ID + @return 密聊对方用户ID + */ +- (WFCCSecretChatInfo *)getSecretChatInfo:(NSString *)targetId; + +/** + 解密密聊会话中加密的媒体数据 + + @param targetId 密聊会话 + @param encryptData 密聊中的加密过的媒体数据,需要下载下来本地保存。 + + @return 解密过的数据,注意只放到内存中,不要保存。 + */ +- (NSData *)decodeSecretChat:(NSString *)targetId mediaData:(NSData *)encryptData; + +/** + 设置密聊会话阅后即焚时间 + + @param targetId 密聊会话 + @param millisecond 时间 + */ +- (void)setSecretChat:(NSString *)targetId burnTime:(int)millisecond; + + +/** + 当前系统是否支持密聊。 + + @return t是否支持密聊 + */ +- (BOOL)isEnableSecretChat; + +/** +当前用户是否启用密聊 + +@return YES,开启密聊功能;NO,关闭密聊功能。 +@disscussion 仅影响密聊的创建,已经创建的密聊不受影响 +*/ +- (BOOL)isUserEnableSecretChat; +/** +修改当前用户是否启用密聊功能 + +@param enable 是否开启 +@param successBlock 成功的回调 +@param errorBlock 失败的回调 +@disscussion 仅影响密聊的创建,已经创建的密聊不受影响 +*/ +- (void)setUserEnableSecretChat:(BOOL)enable + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** +当前用户是否开启添加好友需要验证,默认为开启 + +@return YES,需要验证;NO,不需验证 +*/ +- (BOOL)isAddFriendNeedVerify; +/** +修改当前用户是否开启添加好友需要验证功能 + +@param enable 是否开启 +@param successBlock 成功的回调 +@param errorBlock 失败的回调 +*/ +- (void)setAddFriendNeedVerify:(BOOL)enable + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; +#pragma mark - 其它接口 +/** +获取PC在线信息 + +@return PC端在线状态 +*/ +- (NSArray *)getPCOnlineInfos; + +/** +踢掉PC或者Web + +@param pcClientId PC或Web端的clientId +@param successBlock 成功的回调 +@param errorBlock 失败的回调 +*/ +- (void)kickoffPCClient:(NSString *)pcClientId + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + PC/Web在线时,是否停止通知 + + @return 是否停止通知 + */ +- (BOOL)isMuteNotificationWhenPcOnline; + +/** + 设置PC/Web在线时,手机是否默认静音。缺省值为YES,只有在IM服务配置server.mobile_default_silent_when_pc_online 为false时,才需要调用此函数设置为NO,此时静音状态意义翻转。其它请求千万不要调用此函数,否则会引起状态错乱。 + 设置当PC在线时是否通知的方法是 muteNotificationWhenPcOnline:success:error + + @param defaultSilent 缺省值是否为静音。 + */ +- (void)setDefaultSilentWhenPcOnline:(BOOL)defaultSilent; + +/** + 设置PC/Web在线时,是否发送通知 + + @param isMute 是否通知 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)muteNotificationWhenPcOnline:(BOOL)isMute + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取会话文件。conversation不为空时,获取该会话内的文件记录;当conversation为空时,获取用户收到的所有文件记录。 + + @param conversation 会话 + @param fromUser 该用户发送的文件,如果为空返回所有文件 + @param messageUid 起始记录的UID + @param order 文件列表排序 + @param count count + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getConversationFiles:(WFCCConversation *)conversation + fromUser:(NSString *)fromUser + beforeMessageUid:(long long)messageUid + order:(WFCCFileRecordOrder)order + count:(int)count + success:(void(^)(NSArray *files))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取当前用户发送的文件。 + + @param beforeMessageUid 起始记录的UID + @param order 文件列表排序 + @param count count + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getMyFiles:(long long)beforeMessageUid + order:(WFCCFileRecordOrder)order + count:(int)count + success:(void(^)(NSArray *files))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 删除文件记录。发送者可以删除,另外如果在群里,群主和管理员也可以删除。 + + @param messageUid 起始记录的UID + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)deleteFileRecord:(long long)messageUid + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 搜索文件。conversation不为空时,搜索该会话内的文件记录;当conversation为空时,搜索用户收到的所有文件记录。 + + @param keyword 关键字 + @param conversation 会话 + @param fromUser 该用户发送的文件,如果为空返回所有文件 + @param messageUid 起始记录的UID + @param order 文件列表排序 + @param count count + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)searchFiles:(NSString *)keyword + conversation:(WFCCConversation *)conversation + fromUser:(NSString *)fromUser + beforeMessageUid:(long long)messageUid + order:(WFCCFileRecordOrder)order + count:(int)count + success:(void(^)(NSArray *files))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 搜索当前用户发送的文件。 + + @param keyword 关键字 + @param beforeMessageUid 起始记录的UID + @param order 文件列表排序 + @param count count + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)searchMyFiles:(NSString *)keyword + beforeMessageUid:(long long)beforeMessageUid + order:(WFCCFileRecordOrder)order + count:(int)count + success:(void(^)(NSArray *files))successBlock + error:(void(^)(int error_code))errorBlock; + +/** +获取媒体文件授权访问地址 + +@param messageUid 消息Uid +@param mediaType 媒体类型 +@param mediaPath 媒体Path +@param successBlock 成功的回调,backupAuthorizedUrl仅当支持双网环境才有意义 +@param errorBlock 失败的回调 +*/ +- (void)getAuthorizedMediaUrl:(long long)messageUid + mediaType:(WFCCMediaType)mediaType + mediaPath:(NSString *)mediaPath + success:(void(^)(NSString *authorizedUrl, NSString *backupAuthorizedUrl))successBlock + error:(void(^)(int error_code))errorBlock; + + +/** +获取应用的auth code,用于应用的免密登录 + */ +- (void)getAuthCode:(NSString *)applicationId + type:(int)type + host:(NSString *)host + success:(void(^)(NSString *authCode))successBlock + error:(void(^)(int error_code))errorBlock; + +/** +config应用 + */ +- (void)configApplication:(NSString *)applicationId + type:(int)type + timestamp:(int64_t)timestamp + nonce:(NSString *)nonce + signature:(NSString *)signature + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; +/** +amr文件转成wav数据 + +@param amrPath amr文件路径 +@return wav数据 +*/ +- (NSData *)getWavData:(NSString *)amrPath; + +/** + 获取图片缩略图参数 + + @return 图片缩略图参数 + */ +- (NSString *)imageThumbPara; + + +/** + 开启数据库事务。注意:该方法仅仅在做数据迁移时使用,其它情况不要使用;另外开启成功后一定要注意commit,需要配对使用. + + @return 是否开启成功。 + */ +- (BOOL)beginTransaction; + +/** +提交数据库事务。注意:该方法仅仅在做数据迁移时使用,其它情况不要使用;需要跟beginTransaction配对使用 + +*/ +- (BOOL)commitTransaction; + +/** +回滚数据库事务。注意:该方法仅仅在做数据迁移时使用,其它情况不要使用;需要跟beginTransaction配对使用 + +*/ +- (BOOL)rollbackTransaction; + +/** + 是否是商业版IM服务。 + */ +- (BOOL)isCommercialServer; + +/** +是否支持已阅读报告 +*/ +- (BOOL)isReceiptEnabled; + +/** +群组是否支持已阅读报告 +*/ +- (BOOL)isGroupReceiptEnabled; + +/* + 是否应用关闭草稿同步功能 + */ +- (BOOL)isGlobalDisableSyncDraft; + +/* + 是否应用开启了Mesh功能 + */ +- (BOOL)isMeshEnabled; + +/* + 获取用户的在线状态 + */ +- (WFCCUserOnlineState *)getUserOnlineState:(NSString *)userId; + +- (WFCCUserCustomState *)getMyCustomState; + +- (void)setMyCustomState:(WFCCUserCustomState *)state + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +- (void)watchOnlineState:(WFCCConversationType)conversationType + targets:(NSArray *)targets + duration:(int)watchDuration + success:(void(^)(NSArray *states))successBlock + error:(void(^)(int error_code))errorBlock; + +- (void)unwatchOnlineState:(WFCCConversationType)conversationType + targets:(NSArray *)targets + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +- (BOOL)isEnableUserOnlineState; + +/* + 音视频会议相关 + */ +- (void)sendConferenceRequest:(long long)sessionId + room:(NSString *)roomId + request:(NSString *)request + data:(NSString *)data + success:(void(^)(NSString *authorizedUrl))successBlock + error:(void(^)(int error_code))errorBlock; + +- (void)sendConferenceRequest:(long long)sessionId + room:(NSString *)roomId + request:(NSString *)request + advanced:(BOOL)advanced + data:(NSString *)data + success:(void(^)(NSString *authorizedUrl))successBlock + error:(void(^)(int error_code))errorBlock; + +- (void)requireLock:(NSString *)lockId + duration:(NSUInteger)duration + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +- (void)releaseLock:(NSString *)lockId + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +- (void)postMomentsRequest:(NSString *)path data:(NSData *)data success:(void(^)(NSData *responseData))successBlock error:(void(^)(int error_code))errorBlock; +//内部调用,请勿使用 +- (void)putUseOnlineStates:(NSArray *)states; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCImageMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCImageMessageContent.h new file mode 100644 index 00000000..0f8f998f --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCImageMessageContent.h @@ -0,0 +1,53 @@ +// +// WFCCImageMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/2. +// Copyright © 2017年 wildfire chat. All rights reserved. +// + +#import "WFCCMediaMessageContent.h" +#import + +/** + 图片消息 + */ +@interface WFCCImageMessageContent : WFCCMediaMessageContent + +/** + 构造方法,会把Image存储到path中。 + + @param image 图片 + @param path 图片存储路径 + + @return 图片消息 + */ ++ (instancetype)contentFrom:(UIImage *)image cachePath:(NSString *)path; + +/** + 构造方法,会把Image存储到path中。 + + @param image 图片 + @param path 图片存储路径 + @param fullImage 是否发送原图 + + @return 图片消息 + */ ++ (instancetype)contentFrom:(UIImage *)image cachePath:(NSString *)path fullImage:(BOOL)fullImage; + +/** + 缩略图,自动生成 + */ +@property (nonatomic, strong)UIImage *thumbnail; + +/** + 图片尺寸 + */ +@property (nonatomic, assign)CGSize size; + +/** + 图片缩略图参数 + */ +@property (nonatomic, strong)NSString *thumbParameter; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCJoinCallRequestMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCJoinCallRequestMessageContent.h new file mode 100644 index 00000000..3fad1dcd --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCJoinCallRequestMessageContent.h @@ -0,0 +1,17 @@ +// +// WFCCJoinCallRequestMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + +/** + 通话正在进行消息 + */ +@interface WFCCJoinCallRequestMessageContent : WFCCMessageContent +@property (nonatomic, strong)NSString *callId; +@property (nonatomic, strong)NSString *clientId; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCJsonSerializer.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCJsonSerializer.h new file mode 100644 index 00000000..388dcaba --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCJsonSerializer.h @@ -0,0 +1,22 @@ +// +// WFCCJsonSerializer.h +// WFChatClient +// +// Created by Rain on 2022/5/31. +// Copyright © 2022 WildFireChat. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface WFCCJsonSerializer : NSObject +//子类需要实现此方法 +- (id)toJsonObj; + +//子类不要实现此方法 +- (NSString *)toJsonStr; +- (void)setDict:(NSMutableDictionary *)dict key:(NSString *)key longlongValue:(long long)longValue; +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCKickoffGroupMemberNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCKickoffGroupMemberNotificationContent.h new file mode 100644 index 00000000..78e3d2f6 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCKickoffGroupMemberNotificationContent.h @@ -0,0 +1,31 @@ +// +// WFCCKickoffGroupMemberNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/20. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 群组踢人的通知消息 + */ +@interface WFCCKickoffGroupMemberNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 操作者ID + */ +@property (nonatomic, strong)NSString *operateUser; + +/** + 被踢成员的ID列表 + */ +@property (nonatomic, strong)NSArray *kickedMembers; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCKickoffGroupMemberVisibleNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCKickoffGroupMemberVisibleNotificationContent.h new file mode 100644 index 00000000..620230f0 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCKickoffGroupMemberVisibleNotificationContent.h @@ -0,0 +1,31 @@ +// +// WFCCKickoffGroupMemberNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/20. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 群组踢人的通知消息 + */ +@interface WFCCKickoffGroupMemberVisibleNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 操作者ID + */ +@property (nonatomic, strong)NSString *operateUser; + +/** + 被踢成员的ID列表 + */ +@property (nonatomic, strong)NSArray *kickedMembers; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCLeaveChannelChatMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCLeaveChannelChatMessageContent.h new file mode 100644 index 00000000..b4784d5b --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCLeaveChannelChatMessageContent.h @@ -0,0 +1,17 @@ +// +// WFCCLeaveChannelChatMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + + +/** + 进入频道会话消息 + */ +@interface WFCCLeaveChannelChatMessageContent : WFCCMessageContent + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCLinkMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCLinkMessageContent.h new file mode 100644 index 00000000..5c162235 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCLinkMessageContent.h @@ -0,0 +1,36 @@ +// +// WFCCLinkMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + +/** + 链接消息 + */ +@interface WFCCLinkMessageContent : WFCCMessageContent + +/** + 链接标题 + */ +@property (nonatomic, strong)NSString *title; + +/** + 内容摘要 + */ +@property (nonatomic, strong)NSString *contentDigest; + +/** + 链接地址 + */ +@property (nonatomic, strong)NSString *url; + +/** + 链接图片地址 + */ +@property (nonatomic, strong)NSString *thumbnailUrl; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCLocationMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCLocationMessageContent.h new file mode 100644 index 00000000..26451cd3 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCLocationMessageContent.h @@ -0,0 +1,45 @@ +// +// WFCCTextMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" +#import +#import + +/** + 位置消息 + */ +@interface WFCCLocationMessageContent : WFCCMessageContent + +/** + 构造消息 + + @param coordinate 坐标值 + @param title 位置信息 + @param thumbnail 缩略图 + @return 位置消息 + */ ++ (instancetype)contentWith:(CLLocationCoordinate2D) coordinate + title:(NSString *)title + thumbnail:(UIImage *)thumbnail; + +/** + 位置坐标 + */ +@property (nonatomic, assign)CLLocationCoordinate2D coordinate; + +/** + 位置信息 + */ +@property (nonatomic, strong)NSString *title; + +/** + 缩略图 + */ +@property (nonatomic, strong)UIImage *thumbnail; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCMediaMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCMediaMessageContent.h new file mode 100644 index 00000000..9b419bc9 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCMediaMessageContent.h @@ -0,0 +1,25 @@ +// +// WFCCMediaMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/6. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + +/** + 媒体消息 + */ +@interface WFCCMediaMessageContent : WFCCMessageContent + +/** + 媒体内容的本地存储路径 + */ +@property (nonatomic, strong)NSString *localPath; + +/** + 媒体内容的服务器路径 + */ +@property (nonatomic, strong)NSString *remoteUrl; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCMessage.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCMessage.h new file mode 100644 index 00000000..0c60ddd9 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCMessage.h @@ -0,0 +1,103 @@ +// +// WFCCMessage.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import +#import "WFCCConversation.h" +#import "WFCCMessageContent.h" +#import "WFCCJsonSerializer.h" +#import "WFCCProtocol.h" +/** + 消息方向 + + - MessageDirection_Send: 发送 + - MessageDirection_Receive: 接收 + */ +typedef NS_ENUM(NSInteger, WFCCMessageDirection) { + MessageDirection_Send, + MessageDirection_Receive +}; + +/** + 消息状态 + + - Message_Status_Sending: 发送中 + - Message_Status_Sent: 发送成功 + - Message_Status_Send_Failure: 发送失败 + - Message_Status_Unread: 未读 + - Message_Status_Readed: 已读 + - Message_Status_Played: 已播放(媒体消息) + */ +typedef NS_ENUM(NSInteger, WFCCMessageStatus) { + Message_Status_Sending, + Message_Status_Sent, + Message_Status_Send_Failure, + Message_Status_Mentioned, + Message_Status_AllMentioned, + Message_Status_Unread, + Message_Status_Readed, + Message_Status_Played +}; + +/** + 消息实体 + */ +@interface WFCCMessage : WFCCJsonSerializer + +/** + 消息ID,当前用户本地唯一 + */ +@property (nonatomic, assign)long messageId; + +/** + 消息UID,所有用户全局唯一 + */ +@property (nonatomic, assign)long long messageUid; + +/** + 消息所属的会话 + */ +@property (nonatomic, strong)WFCCConversation *conversation; + +/** + 消息发送者的用户ID + */ +@property (nonatomic, strong)NSString * fromUser; + +/** + 消息在会话中定向发送给该用户的 + */ +@property (nonatomic, strong)NSArray *toUsers; + +/** + 消息内容 + */ +@property (nonatomic, strong)WFCCMessageContent *content; + +/** + 消息方向 + */ +@property (nonatomic, assign)WFCCMessageDirection direction; + +/** + 消息状态 + */ +@property (nonatomic, assign)WFCCMessageStatus status; + +/** + 消息的发送时间 + */ +@property (nonatomic, assign)long long serverTime; + +/** + 消息本地附加信息 + */ +@property (nonatomic, strong)NSString * localExtra; + +- (NSString *)digest; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCMessageContent.h new file mode 100644 index 00000000..242fd434 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCMessageContent.h @@ -0,0 +1,193 @@ +// +// WFCCMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/15. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" +/** + 媒体类型 + + - Media_Type_GENERAL: 一般 + - Media_Type_IMAGE: 图片 + - Media_Type_VOICE: 语音 + - Media_Type_VIDEO: 视频 + - Media_Type_File: 文件 + - Media_Type_PORTRAIT: 头像 + - Media_Type_FAVORITE: 收藏 + - Media_Type_STICKER:动态表情 + - Media_Type_MOMENTS:朋友圈 + */ +typedef NS_ENUM(NSInteger, WFCCMediaType) { + Media_Type_GENERAL = 0, + Media_Type_IMAGE = 1, + Media_Type_VOICE = 2, + Media_Type_VIDEO = 3, + Media_Type_FILE = 4, + Media_Type_PORTRAIT = 5, + Media_Type_FAVORITE = 6, + Media_Type_STICKER = 7, + Media_Type_MOMENTS = 8 +}; + + +/** + 消息存储类型 + + - NOT_PERSIST: 本地不存储 + - PERSIST: 本地存储 + - PERSIST_AND_COUNT: 本地存储,并计入未读计数 + - TRANSPARENT: 透传消息,不多端同步,如果对端不在线,消息会丢弃 + */ +typedef NS_ENUM(NSInteger, WFCCPersistFlag) { + WFCCPersistFlag_NOT_PERSIST = 0, + WFCCPersistFlag_PERSIST = 1, + WFCCPersistFlag_PERSIST_AND_COUNT = 3, + WFCCPersistFlag_TRANSPARENT = 4, +}; + +/** + 普通消息的持久化内容 + */ +@interface WFCCMessagePayload : WFCCJsonSerializer + +/** + 消息类型 + */ +@property (nonatomic, assign)int contentType; + +/** + 搜索内容 + */ +@property (nonatomic, strong)NSString *searchableContent; + +/** + 推送内容 +*/ +@property (nonatomic, strong)NSString *pushContent; +/** + 推送数据 +*/ +@property (nonatomic, strong)NSString *pushData; + +/** + 内容 + */ +@property (nonatomic, strong)NSString *content; + +/** + 内容流 + */ +@property (nonatomic, strong)NSData *binaryContent; + +/** + 只存储在客户端本地的内容 + */ +@property (nonatomic, strong)NSString *localContent; + +/** + 提醒类型,1,提醒部分对象(mentinedTarget)。2,提醒全部。其他不提醒 + */ +@property (nonatomic, assign)int mentionedType; + +/** + 提醒对象,mentionedType 1时有效 + */ +@property (nonatomic, strong)NSArray *mentionedTargets; + +/** + 附加信息 + */ +@property (nonatomic, strong)NSString *extra; + +/** + 本地信息,用于消息未从服务器下载下来。 + */ +@property (nonatomic, assign)BOOL notLoaded; +@end + +/** + 媒体消息的持久化内容 + */ +@interface WFCCMediaMessagePayload : WFCCMessagePayload + +/** + 媒体类型 + */ +@property (nonatomic, assign)WFCCMediaType mediaType; + +/** + 媒体内容的服务器URL + */ +@property (nonatomic, strong)NSString *remoteMediaUrl; + +/** + 媒体内容的本地URL,发送消息时不会携带,用于缓存加速显示 + */ +@property (nonatomic, strong)NSString *localMediaPath; + +@end + +@class WFCCMessage; +@class WFCCDictionary; +/** + 消息协议,所有消息(包括自定义消息均需要实现此协议) + */ +@protocol WFCCMessageContent + +/** + 消息编码 + + @return 消息的持久化内容 + */ +- (WFCCMessagePayload *)encode; + +/** + 消息解码 + + @param payload 消息的持久化内容 + */ +- (void)decode:(WFCCMessagePayload *)payload; + +/** + 消息类型,必须全局唯一。1000及以下为系统内置类型,自定义消息需要使用1000以上。 + + @return 消息类型的唯一值 + */ ++ (int)getContentType; + +/** + 消息的存储策略 + + @return 存储策略 + */ ++ (int)getContentFlags; + +/** + 消息的简短信息 + + @return 消息的简短信息,主要用于通知提示和会话列表等需要简略信息的地方。 + */ +- (NSString *)digest:(WFCCMessage *)message; +@end + +/** + 消息内容,自定义消息可以继承此类 + */ +@interface WFCCMessageContent : NSObject + +/** + 附加信息 + */ +@property (nonatomic, strong)NSString *extra; + +/** + 本地信息,用于消息未从服务器下载下来。 + */ +@property (nonatomic, assign)BOOL notLoaded; + +- (NSArray *)getArray:(WFCCDictionary *)dict ofKey:(NSString *)key; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCModifyGroupAliasNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCModifyGroupAliasNotificationContent.h new file mode 100644 index 00000000..d645b490 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCModifyGroupAliasNotificationContent.h @@ -0,0 +1,36 @@ +// +// WFCCModifyGroupAliasNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/20. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 群成员修改群昵称的通知消息 + */ +@interface WFCCModifyGroupAliasNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 操作者用户ID + */ +@property (nonatomic, strong)NSString *operateUser; + +/** + 群昵称 + */ +@property (nonatomic, strong)NSString *alias; + +/** + 被修改昵称的用户,如果为空为修改operator的群昵称。 + */ +@property (nonatomic, strong)NSString *memberId; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCModifyGroupExtraNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCModifyGroupExtraNotificationContent.h new file mode 100644 index 00000000..9023b929 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCModifyGroupExtraNotificationContent.h @@ -0,0 +1,30 @@ +// +// WFCCModifyGroupExtraNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/20. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 群成员修改群附加信息的通知消息 + */ +@interface WFCCModifyGroupExtraNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 操作者用户ID + */ +@property (nonatomic, strong)NSString *operateUser; + +/** + 群成员附加信息 + */ +@property (nonatomic, strong)NSString *groupExtra; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCModifyGroupMemberExtraNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCModifyGroupMemberExtraNotificationContent.h new file mode 100644 index 00000000..0f55321b --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCModifyGroupMemberExtraNotificationContent.h @@ -0,0 +1,36 @@ +// +// WFCCModifyGroupMemberExtraNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/20. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 群成员修改群附加信息的通知消息 + */ +@interface WFCCModifyGroupMemberExtraNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 操作者用户ID + */ +@property (nonatomic, strong)NSString *operateUser; + +/** + 群成员附加信息 + */ +@property (nonatomic, strong)NSString *groupMemberExtra; + +/** + 被修改昵称的用户,如果为空为修改operator的群昵称。 + */ +@property (nonatomic, strong)NSString *memberId; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCMultiCallOngoingMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCMultiCallOngoingMessageContent.h new file mode 100644 index 00000000..647fdb59 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCMultiCallOngoingMessageContent.h @@ -0,0 +1,20 @@ +// +// WFCCMultiCallOngoingMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + +/** + 通话正在进行消息 + */ +@interface WFCCMultiCallOngoingMessageContent : WFCCMessageContent +@property (nonatomic, strong)NSString *callId; +@property (nonatomic, strong)NSString *initiator; +@property (nonatomic, assign)BOOL audioOnly; +@property (nonatomic, strong)NSArray *targetIds; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCNetworkService.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCNetworkService.h new file mode 100644 index 00000000..d4700d78 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCNetworkService.h @@ -0,0 +1,519 @@ +// +// WFCCNetworkService.h +// WFChatClient +// +// Created by heavyrain on 2017/11/5. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#ifndef WFCCNetworkService_h +#define WFCCNetworkService_h + +#import +#import "WFCCMessage.h" +#import "WFCCReadReport.h" +#import "WFCCDeliveryReport.h" + +extern const NSString *SDKVERSION; +#pragma mark - 通知定义 +//群组信息更新通知 +extern NSString *kGroupInfoUpdated; +//群组成员更新通知 +extern NSString *kGroupMemberUpdated; +//用户信息更新通知 +extern NSString *kUserInfoUpdated; +//好友列表更新通知 +extern NSString *kFriendListUpdated; +//好友请求信息更新通知 +extern NSString *kFriendRequestUpdated; +//设置更新通知 +extern NSString *kSettingUpdated; +//频道信息更新通知 +extern NSString *kChannelInfoUpdated; +//用户在线状态更新通知 +extern NSString *kUserOnlineStateUpdated; +//密聊状态更新通知 +extern NSString *kSecretChatStateUpdated; +//密聊消息阅后即焚开始计时 +extern NSString *kSecretMessageStartBurning; +//密聊消息阅后即焚完成 +extern NSString *kSecretMessageBurned; +//域信息更新通知 +extern NSString *kDomainInfoUpdated; + +#pragma mark - 枚举值定义 +/** + 连接状态 + + - kConnectionStatusTimeInconsistent 服务器和客户端时间相差太大 + - kConnectionStatusNotLicensed 专业版IM服务没有授权或者授权过期,社区版不会有此状态 + - kConnectionStatusKickedoff 多端登录被迫下线。 + - kConnectionStatusSecretKeyMismatch 密钥错误 + - kConnectionStatusTokenIncorrect Token错误 + - kConnectionStatusServerDown 服务器关闭 + - kConnectionStatusRejected: 被拒绝 + - kConnectionStatusLogout: 退出登录 + - kConnectionStatusUnconnected: 未连接 + - kConnectionStatusConnecting: 连接中 + - kConnectionStatusConnected: 已连接 + - kConnectionStatusReceiving: 正在与服务同步数据中 + */ +typedef NS_ENUM(NSInteger, ConnectionStatus) { + kConnectionStatusTimeInconsistent = -9, + kConnectionStatusNotLicensed = -8, + //错误码kConnectionStatusKickedoff是IM服务2021.9.15之后的版本才支持,并且打开服务器端开关server.client_support_kickoff_event + kConnectionStatusKickedoff = -7, + kConnectionStatusSecretKeyMismatch = -6, + kConnectionStatusTokenIncorrect = -5, + kConnectionStatusServerDown = -4, + kConnectionStatusRejected = -3, + kConnectionStatusLogout = -2, + kConnectionStatusUnconnected = -1, + kConnectionStatusConnecting = 0, + kConnectionStatusConnected = 1, + kConnectionStatusReceiving = 2 +}; + + +/** + 在双网环境中,获取当前连接的网络类型。仅当长连接建立时是准确的。如果长连接未建立,此值为上一次长连接建立时的值 + + - kConnectedNetworkType_Main 连接到主网络 + - kConnectedNetworkType_Backup 连接到备网络 + - kConnectedNetworkType_Unknown 未知 + + */ +typedef NS_ENUM(NSInteger, ConnectedNetworkType) { + kConnectedNetworkType_Main = 1, + kConnectedNetworkType_Unknown = 0, + kConnectedNetworkType_Backup = -1, +}; + +/** +平台枚举值 + + //Platform_Android = 2, + //Platform_Windows = 3, + //Platform_OSX = 4, + //Platform_WEB = 5, + //Platform_WX = 6, + //Platform_Linux = 7, + //Platform_iPad = 8, + //Platform_APad = 9, +*/ +#define Platform_iOS 1 +#define Platform_iPad 8 + + +#pragma mark - 连接状态&消息监听 +/** + 连接状态的监听 + */ +@protocol ConnectionStatusDelegate + +/** + 连接状态变化的回调 + + @param status 连接状态 + */ +- (void)onConnectionStatusChanged:(ConnectionStatus)status; + +@end + +/** + 连接状态的监听 + */ +@protocol ConnectToServerDelegate + +/** + 开始连接到服务器的回调 + + @param host 服务Host + @param ip 服务ip + @param port 服务端口 + */ +- (void)onConnectToServer:(NSString *)host ip:(NSString *)ip port:(int)port; + +/** + 成功连接到服务器的回调 + + @param host 服务Host + @param ip 服务ip + @param port 服务端口 + @param mainNw 是否是主网 + */ +- (void)onConnected:(NSString *)host ip:(NSString *)ip port:(int)port mainNw:(BOOL)mainNw; + +@end + +/** + 网络流量使用监听 + */ +@protocol TrafficDataDelegate + +/** + 网络产生流量的回调 + + @param send 发送的字节数 + @param recv 收到的字节数 + */ +- (void)onTrafficData:(int64_t)send recv:(int64_t)recv; + +@end + +/** + 消息接收的监听 + */ +@protocol ReceiveMessageDelegate + +/** + 接收消息的回调 + + @param messages 收到的消息 + @param hasMore 是否还有待接受的消息,UI可以根据此参数决定刷新的时机 + */ +- (void)onReceiveMessage:(NSArray *)messages hasMore:(BOOL)hasMore; + +@optional +- (void)onRecallMessage:(long long)messageUid; +- (void)onDeleteMessage:(long long)messageUid; + +/** +消息已送达到目标用户的回调 + +@param delivereds 送达报告 +*/ + +- (void)onMessageDelivered:(NSArray *)delivereds; + +/** +消息已读的监听 +*/ +- (void)onMessageReaded:(NSArray *)readeds; +@end + +/** + 接收消息前的拦截Filter + */ +@protocol ReceiveMessageFilter + +/** + 是否拦截收到的消息 + + @param message 消息 + @return 是否拦截,如果拦截该消息,则ReceiveMessageDelegate回调不会再收到此消息 + */ +- (BOOL)onReceiveMessage:(WFCCMessage *)message; +@end + +/** + 会议事件的监听 + */ +@protocol ConferenceEventDelegate + +/** + 会议事件的回调 + + @param event 事件 + */ +- (void)onConferenceEvent:(NSString *)event; +@end + +@class WFCCUserOnlineState; +/** + 在线事件的监听 + */ +@protocol OnlineEventDelegate + +/** + 在线事件的回调 + + @param events 事件 + */ +- (void)onOnlineEvent:(NSArray *)events; +@end + +@class WFCCUserInfo; +@class WFCCGroupInfo; +/** + 默认头像提供者 + */ +@protocol WFCCDefaultPortraitProvider +/** + 获取用户的默认头像链接 + + @param userInfo 用户信息 + @return 返回此用户的默认头像 + */ +- (NSString *)userDefaultPortrait:(WFCCUserInfo *)userInfo; + +/** + 获取群组的默认头像链接 + + @param groupInfo 群组信息 + @param memberInfos 群成员用户信息,只用前9名,可以只传入9名成员 + @return 返回此用户的默认头像 + */ +- (NSString *)groupDefaultPortrait:(WFCCGroupInfo *)groupInfo memberInfos:(NSArray *)memberInfos; +@end + +/** + 链接地址转换器,用于双网环境下媒体资源和头像等在不同网络下的转换 + */ +@protocol WFCCUrlRedirector +- (NSString *)redirect:(NSString *)originalUrl; +@end + + +#pragma mark - 连接服务 +/** + 连接服务 + */ +@interface WFCCNetworkService : NSObject + +/** + 连接服务单例 + + @return 连接服务单例 + */ ++ (WFCCNetworkService *)sharedInstance; + +/** + 连接状态监听 + */ +@property(nonatomic, weak) id connectionStatusDelegate; + +/** + 连接到服务监听 + */ +@property(nonatomic, weak) id connectToServerDelegate; + +/** + 网络流量监听 + */ +@property(nonatomic, weak) id trafficDataDelegate; + +/** + 消息接收监听 + */ +@property(nonatomic, weak) id receiveMessageDelegate; + +/** +会议事件监听 +*/ +@property(nonatomic, weak) id conferenceEventDelegate; + +/** +在线事件监听 +*/ +@property(nonatomic, weak) id onlineEventDelegate; + +/** + 默认头像提供者 + */ +@property(nonatomic, weak)id defaultPortraitProvider; + +/** + 双网地址转换器 + */ +@property(nonatomic, strong)id urlRedirector; + +/** + 当前是否处于登录状态 + */ +@property(nonatomic, assign, getter=isLogined, readonly)BOOL logined; + +/** + 当前的连接状态 + */ +@property(nonatomic, assign, readonly)ConnectionStatus currentConnectionStatus; + +/** + 当前登录的用户ID + */ +@property (nonatomic, strong, readonly)NSString *userId; + +/** + 服务器时间与本地时间的差值 + */ +@property(nonatomic, assign, readonly)long long serverDeltaTime; + +/** + 当前服务是否连接到了主网络 + */ +@property (nonatomic, assign, readonly)BOOL connectedToMainNetwork; + +/** + 发送日志命令 + */ +@property (nonatomic, strong)NSString *sendLogCommand; + +/** + 开启Log + */ ++ (void)startLog; + +/** + 停止Log + */ ++ (void)stopLog; + +/** +获取日志文件路径 +*/ ++ (NSArray *)getLogFilesPath; + +/* + 使用国密加密。注意必须和服务器同时配置,否则无法连接。 + */ +- (void)useSM4; + +/* + 使用AES256加密。注意必须和服务器同时配置,否则无法连接。 + */ +- (void)useAES256; + +/* + 使用TCP的短连接。需要专业版IM服务支持。 + */ +- (void)useTcpShortLink; + +/* + 是否使用TCP的短连接。需要专业版IM服务支持。 + */ +- (BOOL)isTcpShortLink; + +/* + 不使用FTS搜索。仅在connect之前调用有效。 + */ +- (void)noUseFts; +/** + 设置Lite模式。 + Lite模式下,协议栈不存储数据库,不同步所有信息,只能收发消息,接收消息只接收连接以后发送的消息。 + 此函数只能在connect之前调用。 + + @param isLiteMode 是否Lite模式 + */ +- (void)setLiteMode:(BOOL)isLiteMode; + +/** + 设置心跳时间,默认为270秒,可以设置为30-300之间的秒数。 + */ +- (void)setHeartBeatInterval:(int)second; + +/** + 获取客户端id + + @return 客户端ID + */ +- (NSString *)getClientId; + +/** + 连接服务器,需要注意token跟clientId是强依赖的,一定要调用getClientId获取到clientId,然后用这个clientId获取token,这样connect才能成功,如果随便使用一个clientId获取到的token将无法链接成功。另外不能多次connect,如果需要切换用户请先disconnect,然后3秒钟之后再connect(如果是用户手动登录可以不用等,因为用户操作很难3秒完成,如果程序自动切换请等3秒) + + @param userId 用户Id + @param token 密码 + + @return 返回上一次活动时间。如果间隔时间较长,可以加个第一次登录的等待提示界面,在等待时同步所有的用户信息/群组信息/频道信息等。 + */ +- (int64_t)connect:(NSString *)userId token:(NSString *)token; + +/** + 断开连接 + + @param disablePush 是否停止推送,clearSession为YES时无意义。如果为true,session会变成disable状态,token会失效,必须重新获取token才能登录。 + @param clearSession 是否清除Session信息,如果清除本地历史消息将全部清除,且token失效无法再次登录,必须重新获取token才能进行登录。 + */ +- (void)disconnect:(BOOL)disablePush clearSession:(BOOL)clearSession; + +/** + 设置服务器地址信息。host可以是IP,可以是域名。如果IM服务是专业版IM服务,需要设置为IM服务绑定的地址。 + + @param host 服务器地址 + */ +- (void)setServerAddress:(NSString *)host; + +/** + 设置当前设备的device token + + @param token 苹果APNs Device Token + */ +- (void)setDeviceToken:(NSString *)token; + +/** + 设置当前设备的device token,可以指定推送类型,用来对接个推、极光等第三方推送。 + + @param token 苹果APNs Device Token + @param pushType 推送类型 + */ +- (void)setDeviceToken:(NSString *)token pushType:(int)pushType; + +/** + 设置当前设备的Voip device token + + @param token 苹果APNs Device Token + */ +- (void)setVoipDeviceToken:(NSString *)token; + +/** + 添加消息拦截Filter + + @param filter 消息拦截Filter + */ +- (void)addReceiveMessageFilter:(id)filter; + +/** + 移除消息拦截Filter + + @param filter 消息拦截Filter + */ +- (void)removeReceiveMessageFilter:(id)filter; + +/** + 应用已经login且在后台的情况下,强制进行连接,确保后台连接5秒钟,用于voip推送后台刷新等场景。 + 应用在前台情况下,此方法无效。 + */ +- (void)forceConnect:(NSUInteger)second; + +- (void)cancelForceConnect; + +/* + 设置备选服务地址,仅专业版支持,一般用于政企单位内外网两种网络环境。请参考:https://docs.wildfirechat.cn/blogs/政企内外双网解决方案.html + */ +- (void)setBackupAddressStrategy:(int)strategy; +- (void)setBackupAddress:(NSString *)host port:(int)port; +- (ConnectedNetworkType)getConnectedNetworkType; + +/* + 设置协议栈短连接User agent。 + + @param userAgent User agent + */ +- (void)setProtoUserAgent:(NSString *)userAgent; + +/* + 添加协议栈短连接自定义header,value为空时清除该header。 + + @param header header + @param value value + */ +- (void)addHttpHeader:(NSString *)header value:(NSString *)value; + +/* + 设置代理,注意只能支持socks5代理,http代理无法支持,只有专业版支持次功能。 + + @param host 代理服务域名,host和ip至少要有一个有效值。 + @param ip 代理服务IP地址,host和ip至少要有一个有效值。 + @param port 代理服务端口 + @param username 账户 + @param password 密码 + */ +- (void)setProxyInfo:(NSString *)host ip:(NSString *)ip port:(int)port username:(NSString *)username password:(NSString *)password; + +/** + 获取协议栈版本 + */ +- (NSString *)getProtoRevision; +@end + +#endif diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCNotDeliveredMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCNotDeliveredMessageContent.h new file mode 100644 index 00000000..7ef1aaab --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCNotDeliveredMessageContent.h @@ -0,0 +1,59 @@ +// +// WFCCNotDeliveredMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + + +/** + 没有送达消息 + */ +@interface WFCCNotDeliveredMessageContent : WFCCNotificationMessageContent +/** + 请求的类型,1是发送消息,2撤回消息,3 + */ +@property(nonatomic, assign)int type; +/** + 发送的消息ID + */ +@property(nonatomic, assign)int64_t messageUid; + +/** + 是全部失败,还是部分失败 + */ +@property(nonatomic, assign)BOOL allFailure; + +/** + 当部分失败时,失败的用户id列表 + */ +@property(nonatomic, strong)NSArray *userIds; + +/** + 归属IM服务请求桥接服务出现的错误,有可能是桥接服务没有配置,或者不可用。 + */ +@property(nonatomic, assign)int localImErrorCode; + +/** + 归属桥接服务出现的错误 + */ +@property(nonatomic, assign)int localBridgeErrorCode; + +/** + 远端桥接服务出现的错误 + */ +@property(nonatomic, assign)int remoteBridgeErrorCode; + +/** + 远端IM服务出现的错误 + */ +@property(nonatomic, assign)int remoteServerErrorCode; + +/** + 错误提示信息 + */ +@property(nonatomic, strong)NSString* errorMessage; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCNotificationMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCNotificationMessageContent.h new file mode 100644 index 00000000..d65b33b1 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCNotificationMessageContent.h @@ -0,0 +1,31 @@ +// +// WFCCNotificationMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/19. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + + +@class WFCCMessage; +/** + 通知消息的协议 + */ +@protocol WFCCNotificationMessageContent + +/** + 获取通知的提示内容 + + @return 提示内容 + */ +- (NSString *)formatNotification:(WFCCMessage *)message; +@end + +/** + 通知消息 + */ +@interface WFCCNotificationMessageContent : WFCCMessageContent + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCPCLoginRequestMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCPCLoginRequestMessageContent.h new file mode 100644 index 00000000..6fa6975f --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCPCLoginRequestMessageContent.h @@ -0,0 +1,27 @@ +// +// WFCCPCLoginRequestMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/19. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" +#import "WFCCIMService.h" + +/** + 建群的通知消息 + */ +@interface WFCCPCLoginRequestMessageContent : WFCCMessageContent + +/** + PC登录SessionID + */ +@property (nonatomic, strong)NSString *sessionId; + +/** + PC登录类型 + */ +@property (nonatomic, assign)WFCCPlatformType platform; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCPCOnlineInfo.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCPCOnlineInfo.h new file mode 100644 index 00000000..4e0448c3 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCPCOnlineInfo.h @@ -0,0 +1,40 @@ +// +// WFCCPCOnlineInfo.h +// WFChatClient +// +// Created by Tom Lee on 2020/4/6. +// Copyright © 2020 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + PC在线类型 + + - PC_Online: PC客户端在线 + - Web_Online: Web客户端在线 + - WX_Online: WX小程序客户端在线 + - Pad_Online: Pad客户端在线 + */ +typedef NS_ENUM(NSInteger, WFCCPCOnlineType) { + PC_Online, + Web_Online, + WX_Online, + Pad_Online +}; + + +@interface WFCCPCOnlineInfo : WFCCJsonSerializer ++ (instancetype)infoFromStr:(NSString *)strInfo withType:(WFCCPCOnlineType)type; +@property(nonatomic, assign)WFCCPCOnlineType type; +@property(nonatomic, assign)BOOL isOnline; +@property(nonatomic, assign)int/*WFCCPlatformType*/ platform; +@property(nonatomic, strong)NSString *clientId; +@property(nonatomic, strong)NSString *clientName; +@property(nonatomic, assign)long long timestamp; +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCPTTSoundMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCPTTSoundMessageContent.h new file mode 100644 index 00000000..8e9615c9 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCPTTSoundMessageContent.h @@ -0,0 +1,39 @@ +// +// WFCCPTTSoundMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/9. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCSoundMessageContent.h" + +/** + 语音消息 + */ +@interface WFCCPTTSoundMessageContent : WFCCSoundMessageContent + +/** + 构造方法 + + @param wavPath 文件路径 + @param amrPath 转化为amr的存储路径 + @param duration 时间 + @return 语音消息 + */ ++ (instancetype)soundMessageContentForWav:(NSString *)wavPath + destinationAmrPath:(NSString *)amrPath + duration:(long)duration; + + +/** + 构造方法 + + @param amrPath amr的存储路径 + @param duration 时间 + @return 语音消息 + */ ++ (instancetype)soundMessageContentForAmr:(NSString *)amrPath + duration:(long)duration; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCPTextMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCPTextMessageContent.h new file mode 100644 index 00000000..b7cd90d5 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCPTextMessageContent.h @@ -0,0 +1,16 @@ +// +// WFCCPTextMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCTextMessageContent.h" + +/** + 存储文本消息,与普通文本消息的区别是,普通文本消息存储切计未读数,本消息只存储不计数。 + */ +@interface WFCCPTextMessageContent : WFCCTextMessageContent + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCProtocol.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCProtocol.h new file mode 100644 index 00000000..0e617f05 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCProtocol.h @@ -0,0 +1,18 @@ +// +// WFCCProtocol.h +// WFChatClient +// +// Created by Rain on 2022/9/20. +// Copyright © 2022 WildFireChat. All rights reserved. +// + +#ifndef WFCCProtocol_h +#define WFCCProtocol_h + +@protocol WFCCDuplicatable + +- (instancetype)duplicate; + +@end + +#endif /* WFCCProtocol_h */ diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCQuitGroupNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCQuitGroupNotificationContent.h new file mode 100644 index 00000000..92dbf1af --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCQuitGroupNotificationContent.h @@ -0,0 +1,30 @@ +// +// WFCCQuitGroupNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/20. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 退群的通知消息 + */ +@interface WFCCQuitGroupNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 退群成员的ID + */ +@property (nonatomic, strong)NSString *quitMember; + +/** + 退群成员的ID + */ +@property (nonatomic, assign)BOOL keepMessage; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCQuitGroupVisibleNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCQuitGroupVisibleNotificationContent.h new file mode 100644 index 00000000..0f4cc945 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCQuitGroupVisibleNotificationContent.h @@ -0,0 +1,25 @@ +// +// WFCCQuitGroupNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/20. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 退群的通知消息 + */ +@interface WFCCQuitGroupVisibleNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 退群成员的ID + */ +@property (nonatomic, strong)NSString *quitMember; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCQuoteInfo.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCQuoteInfo.h new file mode 100644 index 00000000..8864ee74 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCQuoteInfo.h @@ -0,0 +1,25 @@ +// +// WFCCQuoteInfo.h +// WFChatClient +// +// Created by dali on 2020/10/4. +// Copyright © 2020 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" + +NS_ASSUME_NONNULL_BEGIN +@class WFCCMessage; +@interface WFCCQuoteInfo : WFCCJsonSerializer +- (instancetype)initWithMessage:(WFCCMessage *)message; +@property (nonatomic, assign)long long messageUid; +@property (nonatomic, strong)NSString *userId; +@property (nonatomic, strong)NSString *userDisplayName; +@property (nonatomic, strong)NSString *messageDigest; + +- (NSDictionary *)encode; +- (void)decode:(NSDictionary *)dictData; +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCRawMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCRawMessageContent.h new file mode 100644 index 00000000..f3d05e10 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCRawMessageContent.h @@ -0,0 +1,21 @@ +// +// WFCCRawMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMediaMessageContent.h" + +/** + Raw消息内容,消息没有经过decode,只包含payload. + */ +@interface WFCCRawMessageContent : WFCCMediaMessageContent + ++ (instancetype)contentOfPayload:(WFCCMessagePayload *)payload; +/** + 消息Payload + */ +@property (nonatomic, strong)WFCCMessagePayload *payload; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCReadReport.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCReadReport.h new file mode 100644 index 00000000..0a55ba95 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCReadReport.h @@ -0,0 +1,24 @@ +// +// WFCCConversation.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import +#import "WFCCConversation.h" +/** + 会话 + */ +@interface WFCCReadReport : WFCCJsonSerializer + ++(instancetype)readed:(WFCCConversation *)conversation + userId:(NSString *)userId + timestamp:(long long)timestamp; + +@property (nonatomic, strong)WFCCConversation *conversation; +@property (nonatomic, strong)NSString *userId; +@property (nonatomic, assign)long long timestamp; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCRecallMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCRecallMessageContent.h new file mode 100644 index 00000000..472b8612 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCRecallMessageContent.h @@ -0,0 +1,55 @@ +// +// WFCCRecallMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 文本消息 + */ +@interface WFCCRecallMessageContent : WFCCNotificationMessageContent + +/** + 被撤回消息的Uid + */ +@property (nonatomic, assign)long long messageUid; + +/** + 撤回用户Id + */ +@property (nonatomic, strong)NSString *operatorId; + +/** +被撤回消息的发送者用户Id +*/ +@property (nonatomic, strong)NSString *originalSender; + +/** +撤回消息的内容类型 +*/ +@property (nonatomic, assign)int originalContentType; + +/** +撤回消息的可搜索内容类型 +*/ +@property (nonatomic, strong)NSString *originalSearchableContent; + +/** +撤回消息的内容 +*/ +@property (nonatomic, strong)NSString *originalContent; + +/** +撤回消息的Extra内容 +*/ +@property (nonatomic, strong)NSString *originalExtra; + +/** +撤回消息的时间戳 +*/ +@property (nonatomic, assign)long long originalMessageTimestamp; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCRichNotificationMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCRichNotificationMessageContent.h new file mode 100644 index 00000000..22ee4bf6 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCRichNotificationMessageContent.h @@ -0,0 +1,29 @@ +// +// WFCCRichNotificationMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + +/** + 富通知消息 + */ +@interface WFCCRichNotificationMessageContent : WFCCMessageContent +@property (nonatomic, strong)NSString *title; +@property (nonatomic, strong)NSString *desc; +@property (nonatomic, strong)NSString *remark; + +//@[@{@"key":@"登录账户", @"value":@"野火IM", @"color":@"#173155"}, @{@"key":@"登录地点", @"value":@"北京", @"color":@"#173155"}] +@property (nonatomic, strong)NSArray *> *datas; + +//附加信息 +@property (nonatomic, strong)NSString *exName; +@property (nonatomic, strong)NSString *exPortrait; +@property (nonatomic, strong)NSString *exUrl; + +//应用信息 +@property (nonatomic, strong)NSString *appId; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCSecretChatInfo.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCSecretChatInfo.h new file mode 100644 index 00000000..66941823 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCSecretChatInfo.h @@ -0,0 +1,56 @@ +// +// WFCCSecretChatInfo.h +// WFChatClient +// +// Created by heavyrain on 2021/5/16. +// Copyright © 2021 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + 密聊状态 + + - SecretChatState_Starting: 密聊会话建立中 + - SecretChatState_Accepting: 密聊会话接受中 + - SecretChatState_Established: 密聊会话已建立 + - SecretChatState_Canceled: 密聊会话已取消 + */ +typedef NS_ENUM(NSInteger, WFCCSecretChatState) { + SecretChatState_Starting, + SecretChatState_Accepting, + SecretChatState_Established, + SecretChatState_Canceled +}; + +@interface WFCCSecretChatInfo : WFCCJsonSerializer +/* + 密聊ID + */ +@property(nonatomic, strong)NSString *targetId; + +/* + 用户ID + */ +@property(nonatomic, strong)NSString *userId; + +/* + 密聊状态 + */ +@property(nonatomic, assign)WFCCSecretChatState state; + +/* + 阅后即焚时间 + */ +@property(nonatomic, assign)int burnTime; + +/* + 创建时间 + */ +@property(nonatomic, assign)long long createTime; +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCSoundMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCSoundMessageContent.h new file mode 100644 index 00000000..de2b097d --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCSoundMessageContent.h @@ -0,0 +1,50 @@ +// +// WFCCSoundMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/9. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMediaMessageContent.h" + +/** + 语音消息 + */ +@interface WFCCSoundMessageContent : WFCCMediaMessageContent + +/** + 构造方法 + + @param wavPath 文件路径 + @param amrPath 转化为amr的存储路径 + @param duration 时间 + @return 语音消息 + */ ++ (instancetype)soundMessageContentForWav:(NSString *)wavPath + destinationAmrPath:(NSString *)amrPath + duration:(long)duration; + + +/** + 构造方法 + + @param amrPath amr的存储路径 + @param duration 时间 + @return 语音消息 + */ ++ (instancetype)soundMessageContentForAmr:(NSString *)amrPath + duration:(long)duration; + +/** + 时间 + */ +@property (nonatomic, assign)long duration; + +/** + 获取语音消息的wav数据 + + @return wav数据 + */ +- (NSData *)getWavData; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCStartSecretChatMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCStartSecretChatMessageContent.h new file mode 100644 index 00000000..103e0ec4 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCStartSecretChatMessageContent.h @@ -0,0 +1,18 @@ +// +// WFCCMarkUnreadMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + + +/** + 标记未读同步消息 + */ +@interface WFCCStartSecretChatMessageContent : WFCCMessageContent + + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCStickerMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCStickerMessageContent.h new file mode 100644 index 00000000..6f233a17 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCStickerMessageContent.h @@ -0,0 +1,26 @@ +// +// WFCCImageMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/2. +// Copyright © 2017年 wildfire chat. All rights reserved. +// + +#import "WFCCMediaMessageContent.h" +#import + +/** + 图片消息 + */ +@interface WFCCStickerMessageContent : WFCCMediaMessageContent + +/** + 构造方法 + + @param stickerPath 表情路径 + @return 表情消息 + */ ++ (instancetype)contentFrom:(NSString *)stickerPath; + +@property (nonatomic, assign)CGSize size; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCStreamingTextGeneratedMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCStreamingTextGeneratedMessageContent.h new file mode 100644 index 00000000..bc0fe215 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCStreamingTextGeneratedMessageContent.h @@ -0,0 +1,17 @@ +// +// WFCCStreamingTextGeneratedMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + +/** + 富通知消息 + */ +@interface WFCCStreamingTextGeneratedMessageContent : WFCCMessageContent +@property (nonatomic, strong)NSString *text; +@property (nonatomic, strong)NSString *streamId; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCStreamingTextGeneratingMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCStreamingTextGeneratingMessageContent.h new file mode 100644 index 00000000..0a69ae63 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCStreamingTextGeneratingMessageContent.h @@ -0,0 +1,17 @@ +// +// WFCCStreamingTextGeneratingMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + +/** + 富通知消息 + */ +@interface WFCCStreamingTextGeneratingMessageContent : WFCCMessageContent +@property (nonatomic, strong)NSString *text; +@property (nonatomic, strong)NSString *streamId; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCTextMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCTextMessageContent.h new file mode 100644 index 00000000..2440416e --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCTextMessageContent.h @@ -0,0 +1,44 @@ +// +// WFCCTextMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" +#import "WFCCQuoteInfo.h" +/** + 文本消息 + */ +@interface WFCCTextMessageContent : WFCCMessageContent + +/** + 构造方法 + + @param text 文本 + @return 文本消息 + */ ++ (instancetype)contentWith:(NSString *)text; + +/** + 文本内容 + */ +@property (nonatomic, strong)NSString *text; + + +/** + 提醒类型,1,提醒部分对象(mentinedTarget)。2,提醒全部。其他不提醒 + */ +@property (nonatomic, assign)int mentionedType; + +/** + 提醒对象,mentionedType 1时有效 + */ +@property (nonatomic, strong)NSArray *mentionedTargets; + +/** + 引用信息 + */ +@property (nonatomic, strong)WFCCQuoteInfo *quoteInfo; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCThingsDataContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCThingsDataContent.h new file mode 100644 index 00000000..cb1fb054 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCThingsDataContent.h @@ -0,0 +1,19 @@ +// +// WFCCThingsDataContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + +/** + 物联网数据 + */ +@interface WFCCThingsDataContent : WFCCMessageContent +/** + 二进制数据内容 + */ +@property (nonatomic, strong)NSData *data; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCThingsLostEventContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCThingsLostEventContent.h new file mode 100644 index 00000000..47c4e1c2 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCThingsLostEventContent.h @@ -0,0 +1,16 @@ +// +// WFCCThingsLostEventContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + +/** + 文本消息 + */ +@interface WFCCThingsLostEventContent : WFCCMessageContent + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCTipNotificationMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCTipNotificationMessageContent.h new file mode 100644 index 00000000..e5ac09f7 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCTipNotificationMessageContent.h @@ -0,0 +1,20 @@ +// +// WFCCNotificationMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/19. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 退群的通知消息 + */ +@interface WFCCTipNotificationContent : WFCCNotificationMessageContent + +/** + 退群成员的ID + */ +@property (nonatomic, strong)NSString *tip; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCTransferGroupOwnerNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCTransferGroupOwnerNotificationContent.h new file mode 100644 index 00000000..0151e523 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCTransferGroupOwnerNotificationContent.h @@ -0,0 +1,31 @@ +// +// WFCCTransferGroupOwnerNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/20. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 转让群主的通知消息 + */ +@interface WFCCTransferGroupOwnerNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 操作者的ID + */ +@property (nonatomic, strong)NSString *operateUser; + +/** + 新的群主ID + */ +@property (nonatomic, strong)NSString *owner; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCTypingMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCTypingMessageContent.h new file mode 100644 index 00000000..2d92bb00 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCTypingMessageContent.h @@ -0,0 +1,46 @@ +// +// TypingMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + +/** + 正在输入类型 + + - Typing_TEXT : 正在输入文本 + - Typing_VOICE : 正在输入语音 + - Typing_CAMERA : 正在拍摄 + - Typing_LOCATION : 正在选取位置 + - Typing_FILE : 正在选取文件 + */ +typedef NS_ENUM(NSInteger, WFCCTypingType) { + Typing_TEXT = 0, + Typing_VOICE = 1, + Typing_CAMERA = 2, + Typing_LOCATION = 3, + Typing_FILE = 4 +}; + + +/** + 正在输入消息 + */ +@interface WFCCTypingMessageContent : WFCCMessageContent + +/** + 构造方法 + + @param type 输入类型类型。 + @return 正在输入消息 + */ ++ (instancetype)contentType:(WFCCTypingType)type; + +/** + 输入类型类型。0 文本;1 语言。 + */ +@property (nonatomic, assign)WFCCTypingType type; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCUnknownMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCUnknownMessageContent.h new file mode 100644 index 00000000..1ef52312 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCUnknownMessageContent.h @@ -0,0 +1,27 @@ +// +// WFCCUnknownMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + +/** + 未知消息。所有未注册的消息都会解析为为止消息,主要用于新旧版本兼容 + */ +@interface WFCCUnknownMessageContent : WFCCMessageContent + +/** + 原消息类型 + */ +@property (nonatomic, assign)NSInteger orignalType; + + +/** + 原消息Payload + */ +@property (nonatomic, strong)WFCCMessagePayload *orignalPayload; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCUnreadCount.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCUnreadCount.h new file mode 100644 index 00000000..28aecd95 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCUnreadCount.h @@ -0,0 +1,21 @@ +// +// WFCCUnreadCount.h +// WFChatClient +// +// Created by WF Chat on 2018/9/30. +// Copyright © 2018 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface WFCCUnreadCount : WFCCJsonSerializer ++(instancetype)countOf:(int)unread mention:(int)mention mentionAll:(int)mentionAll; +@property(nonatomic, assign)int unread; +@property(nonatomic, assign)int unreadMention; +@property(nonatomic, assign)int unreadMentionAll; +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCUserInfo.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCUserInfo.h new file mode 100644 index 00000000..e4944ff6 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCUserInfo.h @@ -0,0 +1,104 @@ +// +// WFCCUserInfo.h +// WFChatClient +// +// Created by heavyrain on 2017/9/29. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" +/** + 用户信息 + */ +@interface WFCCUserInfo : WFCCJsonSerializer + +/** + 用户ID + */ +@property (nonatomic, strong)NSString *userId; + +/** + 名称 + */ +@property (nonatomic, strong)NSString *name; + +/** + 显示的名称 + */ +@property (nonatomic, strong)NSString *displayName; + +/** + 性别 + */ +@property (nonatomic, assign)int gender; + +/** + 头像 + */ +@property (nonatomic, strong)NSString *portrait; + +/** + 手机号 + */ +@property (nonatomic, strong)NSString *mobile; + +/** + 邮箱 + */ +@property (nonatomic, strong)NSString *email; + +/** + 地址 + */ +@property (nonatomic, strong)NSString *address; + +/** + 公司信息 + */ +@property (nonatomic, strong)NSString *company; + +/** + 社交信息 + */ +@property (nonatomic, strong)NSString *social; + +/** + 扩展信息 + */ +@property (nonatomic, strong)NSString *extra; + +/** + 好友备注 + */ +@property (nonatomic, strong)NSString *friendAlias; + +/** + 群昵称 + */ +@property (nonatomic, strong)NSString *groupAlias; + +/** + 更新时间 + */ +@property (nonatomic, assign)long long updateDt; + +/** + 用户类型 + */ +@property (nonatomic, assign) int type; + +/** + 是否被删除用户 + */ +@property (nonatomic, assign) int deleted; + + +/** + 辅助方法,返回可读的名称,如果有备注返回备注,如果有群昵称,显示群昵称,如果都没有返回用户昵称。 + */ +@property(nonatomic, readonly)NSString *readableName; + +- (void)cloneFrom:(WFCCUserInfo *)other; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCUserOnlineState.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCUserOnlineState.h new file mode 100644 index 00000000..732bc7cf --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCUserOnlineState.h @@ -0,0 +1,43 @@ +// +// WFCCUserOnlineState.h +// WFChatClient +// +// Created by heavyrain on 2022/2/17. +// Copyright © 2022 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" + +NS_ASSUME_NONNULL_BEGIN + +/* + int Platform_UNSET = 0; + int Platform_iOS = 1; + int Platform_Android = 2; + int Platform_Windows = 3; + int Platform_OSX = 4; + int Platform_WEB = 5; + int Platform_WX = 6; + int Platform_LINUX = 7; + int Platform_iPad = 8; + int Platform_APad = 9; + */ +@interface WFCCClientState : WFCCJsonSerializer +@property(nonatomic, assign)int platform; +@property(nonatomic, assign)int state; //设备的在线状态,0是在线,1是有session但不在线,其它不在线。 +@property(nonatomic, assign)long long lastSeen; //最后可见 +@end + +@interface WFCCUserCustomState : WFCCJsonSerializer +@property(nonatomic, assign)int state; //0,未设置,1 忙碌,2 离开(主动设置),3 离开(长时间不操作),4 隐身,其它可以自主扩展。 +@property(nonatomic, strong)NSString *text; +@end + +@interface WFCCUserOnlineState : WFCCJsonSerializer +@property(nonatomic, strong)NSString *userId; +@property(nonatomic, strong)WFCCUserCustomState *customState; +@property(nonatomic, strong)NSArray *clientStates; +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCUtilities.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCUtilities.h new file mode 100644 index 00000000..a7a5819a --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCUtilities.h @@ -0,0 +1,79 @@ +// +// WFCCUtilities.h +// WFChatClient +// +// Created by heavyrain on 2017/9/7. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import +#import "WFCCIMService.h" +#import "WFCCEnums.h" + +@interface WFCCUtilities : NSObject + +/** + 生成缩略图 + + @param image 原图 + @param targetWidth 宽度 + @param targetHeight 高度 + @return 缩略图 + */ ++ (UIImage *)generateThumbnail:(UIImage *)image + withWidth:(CGFloat)targetWidth + withHeight:(CGFloat)targetHeight; + +/** + 缩小图片 + + @param image 原图 + @param size 宽度 + @return 缩小到size范围内的Image + */ ++ (UIImage *)image:(UIImage *)image scaleInSize:(CGSize)size; +/** + 获取对应的沙盒路径 + + @param localPath 文件路径 + @return 对应的沙盒路径 + */ ++ (NSString *)getSendBoxFilePath:(NSString *)localPath; + +/** + 获取资源路径 + + @param componentPath 相对路径 + @return 资源路径 + */ ++ (NSString *)getDocumentPathWithComponent:(NSString *)componentPath; + ++ (CGSize)imageScaleSize:(CGSize)imageSize targetSize:(CGSize)targetSize thumbnailPoint:(CGPoint *)thumbnailPoint; + + ++ (UIImage *)imageWithRightOrientation:(UIImage *)aImage; + ++ (BOOL)isExternalTarget:(NSString *)targetId; ++ (NSString *)getExternalDomain:(NSString *)targetId; ++ (NSString *)getTargetWithoutDomain:(NSString *)targetId; ++ (NSAttributedString *)getExternal:(NSString *)domainId withName:(NSString *)name withColor:(UIColor *)color; ++ (NSAttributedString *)getExternal:(NSString *)domainId withName:(NSString *)name withColor:(UIColor *)color withSize:(CGFloat)fontSize; + +//同步函数,只能在后台线程执行 ++ (NSString *)getGroupGridPortrait:(NSString *)groupId + width:(int)width + generateIfNotExist:(BOOL)generateIfNotExist + defaultUserPortrait:(UIImage *(^)(NSString *userId))defaultUserPortraitBlock; + ++ (NSString *)getGroupGridPortrait:(NSString *)groupId + memberPortraits:(NSArray*> *)groupMembers + width:(int)PortraitWidth + defaultUserPortrait:(UIImage *(^)(NSString *userId))defaultUserPortraitBlock; + + ++ (NSString *)getGroupMemberExtra:(WFCCGroupMemberSourceType)sourceType sourceTargetId:(NSString *)sourceTargetId; + ++ (WFCCGroupMemberSourceType)getGroupMemberSourceType:(NSString *)memberExtra sourceTargetId:(NSMutableString *)sourceTargetId; + ++ (NSString *)getUserDisplayName:(NSString *)userId inGroup:(NSString *)groupId; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCVideoMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCVideoMessageContent.h new file mode 100644 index 00000000..d9d6c14b --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCCVideoMessageContent.h @@ -0,0 +1,34 @@ +// +// WFCCVideoMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/2. +// Copyright © 2017年 wildfire chat. All rights reserved. +// + +#import "WFCCMediaMessageContent.h" +#import + +/** + 图片消息 + */ +@interface WFCCVideoMessageContent : WFCCMediaMessageContent + +/** + 构造方法 + + @param image 图片 + @return 图片消息 + */ ++ (instancetype)contentPath:(NSString *)localPath thumbnail:(UIImage *)image; + +/** + 缩略图 + */ +@property (nonatomic, strong)UIImage *thumbnail; + +/** + 时长 +*/ +@property (nonatomic, assign)long duration; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCChatClient.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCChatClient.h new file mode 100644 index 00000000..be18c6b2 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Headers/WFCChatClient.h @@ -0,0 +1,109 @@ +// +// WFChatClient.h +// WFChatClient +// +// Created by heavyrain on 2017/11/5. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import + +//! Project version number for WFChatClient. +FOUNDATION_EXPORT double WFChatClientVersionNumber; + +//! Project version string for WFChatClient. +FOUNDATION_EXPORT const unsigned char WFChatClientVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Info.plist b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Info.plist new file mode 100644 index 00000000..5ee20ab8 Binary files /dev/null and b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/Info.plist differ diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/WFChatClient b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/WFChatClient new file mode 100644 index 00000000..1c1f6671 Binary files /dev/null and b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/WFChatClient differ diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/_CodeSignature/CodeResources b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/_CodeSignature/CodeResources new file mode 100644 index 00000000..b8f97521 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64/WFChatClient.framework/_CodeSignature/CodeResources @@ -0,0 +1,1125 @@ + + + + + files + + Headers/Common.h + + LNpNtEeIWFWNqfp83OzxnGqlCOk= + + Headers/WFCCAddGroupeMemberNotificationContent.h + + jvLO++pfRhcWd1SGd2Rl9MD72yI= + + Headers/WFCCArticlesMessageContent.h + + OCeFgvYBsjpkMD0TktQKQhsKhd4= + + Headers/WFCCCallAddParticipantMessageContent.h + + Gp2DUYZvy4oTOkc/ESfeRb7RiWE= + + Headers/WFCCCallByeMessageContent.h + + lLIN2Wba1CnarrOaKTCj0jdpAo4= + + Headers/WFCCCallStartMessageContent.h + + TkaXEIURlWRSAUSWH4JFT/k6lpo= + + Headers/WFCCCardMessageContent.h + + Hl6e1zMZnHARRV/0pP22uW0zNlc= + + Headers/WFCCChangeGroupNameNotificationContent.h + + sk8T7Vb28CU/13dFzOBH9oDMrac= + + Headers/WFCCChangeGroupPortraitNotificationContent.h + + RV7X/R5zu1nk7gWMG51Rau9bu18= + + Headers/WFCCChannelInfo.h + + J/5lIOlldCotTh7EdP/hQUDYzB4= + + Headers/WFCCChannelMenu.h + + 3Qvl119TweX+H7N+gpdmlNsk1pU= + + Headers/WFCCChannelMenuEventMessageContent.h + + KGX0HpyfUYU/+5LBf7Y7PWNyDf0= + + Headers/WFCCChatroomInfo.h + + D5lCwDH3GJCnM1X7Ug3CnX5RXsw= + + Headers/WFCCChatroomMemberInfo.h + + uAzguqEQAeOcOzpYPuX+FidG9dc= + + Headers/WFCCCompositeMessageContent.h + + ygnyDZtDTn9hq0Ar+RmKc95ysAQ= + + Headers/WFCCConferenceInviteMessageContent.h + + 7U7eIKenVwUFlrh6L5QWBsQm5os= + + Headers/WFCCConversation.h + + Xg2lkJiRwe5r5WjZQjOaY9wYaA4= + + Headers/WFCCConversationInfo.h + + ySFM+XEYbg8zv0Bn3psq1zV9T0k= + + Headers/WFCCConversationSearchInfo.h + + hojxK+qnxQcVKX2z8pVoB85zK/A= + + Headers/WFCCCreateGroupNotificationContent.h + + yKDBCXekBAKB97vuPrGqvQqz/Ls= + + Headers/WFCCDeleteMessageContent.h + + JgLZw5Iosxii47IRTkbYseNa010= + + Headers/WFCCDeliveryReport.h + + Mx9wvAK8IjC+EQwbZuqQBf12O3A= + + Headers/WFCCDictionary.h + + tyKSRT1vYkFUD8CKdLWQR+AayPk= + + Headers/WFCCDismissGroupNotificationContent.h + + 4OSaSDIkdb6xBrHm+MLR2oFBzKU= + + Headers/WFCCDomainInfo.h + + cW1JstDhOj1rfqEhqdBj71VYvKA= + + Headers/WFCCEnterChannelChatMessageContent.h + + oxI3DtPGppGSlY1l0JgHcU2eMF8= + + Headers/WFCCEnums.h + + qNHY+LulPY/c3tPfoonhObTr1r0= + + Headers/WFCCFileMessageContent.h + + 5wbl0fY5k0YAcEfHt+/grdcw+w0= + + Headers/WFCCFileRecord.h + + 4aIaA33n6bUCX8O6J0xxmsa1Pos= + + Headers/WFCCFriend.h + + 7KThvPXsIvxHuOLJPEinuIxJnt0= + + Headers/WFCCFriendAddedMessageContent.h + + 3iB08uqoiC7mBgsHek5V1uqUPcc= + + Headers/WFCCFriendGreetingMessageContent.h + + +nFxkjIxc004ir8x96f1ektvbrQ= + + Headers/WFCCFriendRequest.h + + c1jYJ4ka4ZInQuhTF6YyGMnqU74= + + Headers/WFCCGroupInfo.h + + 96/Vhp003W4SR9FKbeUw4RixYb4= + + Headers/WFCCGroupJoinTypeNotificationContent.h + + Qtr37R+sD09xV6fgIKZwO8rApSg= + + Headers/WFCCGroupMember.h + + hBtY1tjk9IiNXPU6TZHTOHhrhN8= + + Headers/WFCCGroupMemberAllowNotificationContent.h + + JyLiP6wWLIjkbcmVzri8+YDqUyA= + + Headers/WFCCGroupMemberMuteNotificationContent.h + + TivBTQtIvTtvcL2NdvqF74AapeQ= + + Headers/WFCCGroupMuteNotificationContent.h + + qLFbHvFV3B0PW18/X9IzTDyK+04= + + Headers/WFCCGroupPrivateChatNotificationContent.h + + 7sAJpuAG5CohYN3Is3k0A53OsF0= + + Headers/WFCCGroupSearchInfo.h + + 3p1LsaEdwpLPBTQdRKkGcrYKVOo= + + Headers/WFCCGroupSetManagerNotificationContent.h + + 77um+nAswlRD90DRTWYSNdQe1XY= + + Headers/WFCCGroupSettingsNotificationContent.h + + KjNqfUSKMt61fsrMugG2tnr0awo= + + Headers/WFCCIMService.h + + HVFbofdTKg6x10CH6ipDq7G1upw= + + Headers/WFCCImageMessageContent.h + + s3kEIc5J2OZUc4sRCNQ87Yt53n4= + + Headers/WFCCJoinCallRequestMessageContent.h + + xzAvi1X3CA9lt04ULjpeFB7daJA= + + Headers/WFCCJsonSerializer.h + + JyGwg9hovXqu5d48RAAU60KhStM= + + Headers/WFCCKickoffGroupMemberNotificationContent.h + + DvOzmLjA8M5RNq7pLEDD/nJmLTc= + + Headers/WFCCKickoffGroupMemberVisibleNotificationContent.h + + eH/rmf/flDrTAdqjgs3+WNZd5bE= + + Headers/WFCCLeaveChannelChatMessageContent.h + + DL8WjZgqYS9l/OvtU0AvYHPaMik= + + Headers/WFCCLinkMessageContent.h + + jOg9HYwkWXRPEXURI+GbDN5jCPU= + + Headers/WFCCLocationMessageContent.h + + 1Ly+2JUo9EsqAewScYTP5JKSu/A= + + Headers/WFCCMediaMessageContent.h + + dKL+vn0PcsLdH2KYp2FrEQjKVrE= + + Headers/WFCCMessage.h + + fAupfxwHH1mU/yWc9RxqVNcou3s= + + Headers/WFCCMessageContent.h + + ts0Q3p2wCt5/RGJYerWAVLLsMNg= + + Headers/WFCCModifyGroupAliasNotificationContent.h + + xEi8aY2nCX0jEEJfsGwz5knD7KA= + + Headers/WFCCModifyGroupExtraNotificationContent.h + + J11Ewm5umPZvVVeszmXP2g51NxU= + + Headers/WFCCModifyGroupMemberExtraNotificationContent.h + + rvJSIEXlU01q/ndzXoOgKR6dH1s= + + Headers/WFCCMultiCallOngoingMessageContent.h + + rPce0YbjYgHWcEDWp13gv00C7Gs= + + Headers/WFCCNetworkService.h + + hd+L+d6hS490ulG7MwVSl8ODyeg= + + Headers/WFCCNotDeliveredMessageContent.h + + oyuBhzo8KFD+LG1HZC7IqpKsAjk= + + Headers/WFCCNotificationMessageContent.h + + 23T1DmQe0mNYLQJRU0XeoKGklM0= + + Headers/WFCCPCLoginRequestMessageContent.h + + k/r3Yv0yVSbq6FU8T2CLxq6b6z4= + + Headers/WFCCPCOnlineInfo.h + + XHYyRIsilrjHZNVPPS4a7PxHNG4= + + Headers/WFCCPTTSoundMessageContent.h + + 7stUp2OKzIWTx4Ayf7A0r+XECrg= + + Headers/WFCCPTextMessageContent.h + + kEio/hGlyJShUFOyrmLfaDmW4W4= + + Headers/WFCCProtocol.h + + jPpd/6CLqGMng5+HetFH0QrZn6w= + + Headers/WFCCQuitGroupNotificationContent.h + + izkDAFN61r74fJuQzwzvb6WTrGs= + + Headers/WFCCQuitGroupVisibleNotificationContent.h + + MNjEZtRR3RODbTrJ1wN84iTWVi4= + + Headers/WFCCQuoteInfo.h + + ERBNbAyfOp3vf/yfH+xFXvRHVfE= + + Headers/WFCCRawMessageContent.h + + WXiU7KJa9MfydsGPUvEbQSkLbrw= + + Headers/WFCCReadReport.h + + RLnJXSMYZRuIrADwxk5m1TIhc2M= + + Headers/WFCCRecallMessageContent.h + + tf4uFEBvokiIXp5TyVpuJAFcLwU= + + Headers/WFCCRichNotificationMessageContent.h + + HpaBViVQ5Mr3Ar1gUKE0eiwkkqU= + + Headers/WFCCSecretChatInfo.h + + mBV4K2IicEM4D2l15yHmYUI+Nwc= + + Headers/WFCCSoundMessageContent.h + + 0HKp6UzDYPNtMEsF5Le0HHTdyCw= + + Headers/WFCCStartSecretChatMessageContent.h + + uy8dt0OafAkux/C2TQSRVlrC/Mo= + + Headers/WFCCStickerMessageContent.h + + RAl4w/bqWh+smqw9zyeBe9/c3H4= + + Headers/WFCCStreamingTextGeneratedMessageContent.h + + woFKNIgjsc8naNTMxv42sLuuYhg= + + Headers/WFCCStreamingTextGeneratingMessageContent.h + + 85FlvdNUDtADujETMUtI3O3xsTI= + + Headers/WFCCTextMessageContent.h + + uwVXSj/YvO4q1d6NgcSSoyKtEgU= + + Headers/WFCCThingsDataContent.h + + H0kbM+U+UuGJRdrAD80JPThvhEg= + + Headers/WFCCThingsLostEventContent.h + + dcQoEIqU6LrlKnTkods0HxE6IZo= + + Headers/WFCCTipNotificationMessageContent.h + + OUWpXw5oLCcRrZzKMinv4QWyeog= + + Headers/WFCCTransferGroupOwnerNotificationContent.h + + uPQxlwZhswwfQUa2jsCbTnS3GaI= + + Headers/WFCCTypingMessageContent.h + + V5jsf9t7lOaQcn4ZbE+Gs0z3RN8= + + Headers/WFCCUnknownMessageContent.h + + mp0JrMWcEog34JuOo8tTwVYxbOM= + + Headers/WFCCUnreadCount.h + + qQ9rtAub4TjppdUgobFrqZgF3S8= + + Headers/WFCCUserInfo.h + + hKbTUBb3e458uNUCvQfNsR/gIKc= + + Headers/WFCCUserOnlineState.h + + myA+bGrEbvSQvNI9uqAOakbK91w= + + Headers/WFCCUtilities.h + + u+c0kIEjg98+zbsS706mne3lYoQ= + + Headers/WFCCVideoMessageContent.h + + xqitZmCxwt/yGMV+5vCzjpLRiWQ= + + Headers/WFCChatClient.h + + YTmzHdMi4ejNPlcRcOgf3GlkmxI= + + Info.plist + + yC8caN5BiVGPmIFtm61zrvTAJXs= + + + files2 + + Headers/Common.h + + hash2 + + OUz6QgVKd+5TOOTzJbqUGALWGfkJndXC7brw3xJJ3pM= + + + Headers/WFCCAddGroupeMemberNotificationContent.h + + hash2 + + EpsJAfExMfDRxNnkv78FsRq19MxhZOOa7zAXkJWjhqc= + + + Headers/WFCCArticlesMessageContent.h + + hash2 + + eorX+dyEZxC/KyOBe/GEDyXrvHZZuhiwWYPaavCA2Lo= + + + Headers/WFCCCallAddParticipantMessageContent.h + + hash2 + + AlXCupdVJRWmVnjglrGyavED8Yz+sbIqoYS0GBu/vbI= + + + Headers/WFCCCallByeMessageContent.h + + hash2 + + 4mJFazKyranTM2fv8KTUwvpIaQmp3IE4H1Vd6yHGz7k= + + + Headers/WFCCCallStartMessageContent.h + + hash2 + + rsMetvs+P6KcPYwKQIE83DDG2zu1ydb0QMmEcvvfmpo= + + + Headers/WFCCCardMessageContent.h + + hash2 + + ZoU9cqNIFYZOPzL6ndiJPN2s7f+BhiB9xBaL4eXipKM= + + + Headers/WFCCChangeGroupNameNotificationContent.h + + hash2 + + 1EWF3W/5k+s0yQUIo+/STDR/vYjq7hCAPZs7haV/GxY= + + + Headers/WFCCChangeGroupPortraitNotificationContent.h + + hash2 + + VeQkDgvx4xzLQAUvHOZX+DP0pe5iFNa+W8tVeUHXBIg= + + + Headers/WFCCChannelInfo.h + + hash2 + + 6WeFt0dSRLGSnbn64ICrnGtZNphvudqH/V7qBn7feq8= + + + Headers/WFCCChannelMenu.h + + hash2 + + SkZwdrq3TA0/ZErc4eU/x4ym30IS7nxEdFxUl4CXjLg= + + + Headers/WFCCChannelMenuEventMessageContent.h + + hash2 + + kqR96xTnrwWJmDLxvCP1HsTHLjq9ABAJpUPhY1Ofxow= + + + Headers/WFCCChatroomInfo.h + + hash2 + + iGzH+D/CP1f+3wl2eHqSQ9bsMEdrhI/58jAUiFwDl3o= + + + Headers/WFCCChatroomMemberInfo.h + + hash2 + + zxOmgf7enEISucSuoB9IsV/o9VzSHNlp5Zmg/9/pPpY= + + + Headers/WFCCCompositeMessageContent.h + + hash2 + + CM2kbabygG2hCZmfD2Jk6Z99D1Yn8nRXo+K7m+eju1E= + + + Headers/WFCCConferenceInviteMessageContent.h + + hash2 + + i8Y2mtcByVLP4UMiRKgNlmQqCT7bykO4g0ktXi6pmcM= + + + Headers/WFCCConversation.h + + hash2 + + jd69mtim8Cq3R7mScjM5ryetKb/6+r0Jqk/i4dupGHE= + + + Headers/WFCCConversationInfo.h + + hash2 + + 3f+ILGU/FlBtVp22NTlznEAdS12YcE1WyJTFv7dq1V0= + + + Headers/WFCCConversationSearchInfo.h + + hash2 + + +2AEC1ivfDfqhL/uNJFq5bOOvu6Qadi3lGxt6CEvQYw= + + + Headers/WFCCCreateGroupNotificationContent.h + + hash2 + + pY7DoXVZyiYgFnGGEJb78fCgHMnUy1ObDFXeiAZof50= + + + Headers/WFCCDeleteMessageContent.h + + hash2 + + TpgwOudamzEDDSNDNggq0kwmq5Ekq/6GaYxWm9ZgOFs= + + + Headers/WFCCDeliveryReport.h + + hash2 + + OWY6aKmCkIe/yDO9vQaWTp/aV+Y7lbOLdxoykWcyeRY= + + + Headers/WFCCDictionary.h + + hash2 + + gW9qatoKB4pZEuLaDnanhd2YRA8GDovWdsUtbjHtSyo= + + + Headers/WFCCDismissGroupNotificationContent.h + + hash2 + + yaQ1yXmDH4B6pvTWMTMvD0f6MEioOBwVzOZS8cC93ug= + + + Headers/WFCCDomainInfo.h + + hash2 + + 9dTddUQIhN8t7WIrLra4TexL7x/tVyBLJDh9Hmz9Qy0= + + + Headers/WFCCEnterChannelChatMessageContent.h + + hash2 + + SVqeTZMQkETc7rzmwNlbMZhOVwV2HOcrrBW9VEWX4nw= + + + Headers/WFCCEnums.h + + hash2 + + YIv49UhmyEim+Jj4uTU0+9/bH88b7wdcSP4UiUwvo9s= + + + Headers/WFCCFileMessageContent.h + + hash2 + + Ke5naJ1rrOtdXPhmBi8Vs9tpTDUsZJxlzB7VcIg73AY= + + + Headers/WFCCFileRecord.h + + hash2 + + XwwSIhCpYldnFXUQc5XmQ/A1nR8leevRi5By0He+ECk= + + + Headers/WFCCFriend.h + + hash2 + + gHJ0WNEnSAHVNBZsBDweyX67wAwVb4+gl4kGrMDdp5A= + + + Headers/WFCCFriendAddedMessageContent.h + + hash2 + + VgBKXgCr2B3Sn6STGs8v9TrrI9SePwHkd0fj11L+JoI= + + + Headers/WFCCFriendGreetingMessageContent.h + + hash2 + + sdlJyHijoC7vh+e19I37KCEe8UrSHdSTsKyIMcplRmY= + + + Headers/WFCCFriendRequest.h + + hash2 + + 01sNgzdBzWU0dGsP/HexiSsqXQSkxYSD09Ie1sPwoJc= + + + Headers/WFCCGroupInfo.h + + hash2 + + yv3HF/PGRpX5iccbi0fiJG8mwChwQsKdgLzhVP8IdaE= + + + Headers/WFCCGroupJoinTypeNotificationContent.h + + hash2 + + UWXVAFchCctfR1zw4Z58MLM5ktwA3TVUziHrAkMz1BY= + + + Headers/WFCCGroupMember.h + + hash2 + + qjxJ2oQGZjuzDeywVker6TOv0ZWCiWCBXidQMW0FTKA= + + + Headers/WFCCGroupMemberAllowNotificationContent.h + + hash2 + + 2/m6Yd2/ZdGmiaQON/XjzuUTrcj/4o4Q18sKj7W48pE= + + + Headers/WFCCGroupMemberMuteNotificationContent.h + + hash2 + + XowKDr3PicQyindTuBp3s8Isf3m6toxGK8yo0DYVUvw= + + + Headers/WFCCGroupMuteNotificationContent.h + + hash2 + + I0vaBMST9PHfXlQ7n7THkN3IfD1q5orzXPvJD3Y/p5A= + + + Headers/WFCCGroupPrivateChatNotificationContent.h + + hash2 + + uaqdJhtVebaqAGbG6p4KxdgvyxAJLe4xfPslLpTYnLY= + + + Headers/WFCCGroupSearchInfo.h + + hash2 + + MbFwI4GeIC1sZHtxQuWRW1n/iw7C5fC9W8/vChToadU= + + + Headers/WFCCGroupSetManagerNotificationContent.h + + hash2 + + tijnFDgdln12dG2BqpOiWDVKuT4PjjRrVVNtY9ZIf+M= + + + Headers/WFCCGroupSettingsNotificationContent.h + + hash2 + + LRh2YozvXUyuyZfZDBx+KYZ5ALMg4IWrPF2uVAACBaA= + + + Headers/WFCCIMService.h + + hash2 + + mBkCL5a6IYUWcNarNs1Vg0ZksuzmRnNga1hfGrsDgvw= + + + Headers/WFCCImageMessageContent.h + + hash2 + + FOZ1hIIJG3HxNJkKL8cq64oulkGMDE01xaijw8l9yu4= + + + Headers/WFCCJoinCallRequestMessageContent.h + + hash2 + + zAu3dFjJzIl7b4I7P0EfZDoZqHbcZp4kaKlNTTHvGR0= + + + Headers/WFCCJsonSerializer.h + + hash2 + + KHLxniBuW1A6P/7NDiBSA33RF5FkBdUPjW3ILs3gdNg= + + + Headers/WFCCKickoffGroupMemberNotificationContent.h + + hash2 + + VLESbz/gJhDUmVs8OF992uc8EQ8ft8lQjN63t18TztE= + + + Headers/WFCCKickoffGroupMemberVisibleNotificationContent.h + + hash2 + + g3ZRN9hG636KMqyF7BuAl+peP3ryebf/LNfEPt3ZquA= + + + Headers/WFCCLeaveChannelChatMessageContent.h + + hash2 + + W1ziobFnL+1IGb7kMr/mJuaeAfbYb4JsVNsoxy2nNzM= + + + Headers/WFCCLinkMessageContent.h + + hash2 + + je04qlCJ87zmGhkaSwh+Y3mcZIWt8jDy233GgimsPQQ= + + + Headers/WFCCLocationMessageContent.h + + hash2 + + IMZf3SSoWodHaydvsD6VhKdTsqbEfZSFIH+6uyDYfPk= + + + Headers/WFCCMediaMessageContent.h + + hash2 + + ohbLG9MuRZtoapfSoVeBwmN8Q6N071RFZurZw+SgUEY= + + + Headers/WFCCMessage.h + + hash2 + + b32LtXrfugMv9vxXe/tA/rk41xt+e8ObTwX5OVIcw3Y= + + + Headers/WFCCMessageContent.h + + hash2 + + ZUosxN4ZrEZc5LvPK9LAXH0j6xRGHvXUiSuO7B7SP8I= + + + Headers/WFCCModifyGroupAliasNotificationContent.h + + hash2 + + 0EgehauC2ez48MrpabNN0yz2isB2ZIxFJGouIKcNMKE= + + + Headers/WFCCModifyGroupExtraNotificationContent.h + + hash2 + + wllrfca9rDDL+h5vY/49hXRSEkV6fkHjT1d+3t2mrqI= + + + Headers/WFCCModifyGroupMemberExtraNotificationContent.h + + hash2 + + vvdI3gmsn22GewXsrtCwLW8H/vprxgNdgsFRkBW601U= + + + Headers/WFCCMultiCallOngoingMessageContent.h + + hash2 + + FUXfJtGBWghjBX7GTYXvOE21kR3q4Ap1FbiyXkntgl4= + + + Headers/WFCCNetworkService.h + + hash2 + + u7/nKUxTVnTIJOvcoRo63P7OVmQ604HPdR9G4rcjlpo= + + + Headers/WFCCNotDeliveredMessageContent.h + + hash2 + + gHNvnH4GdODwGySG/8DFUw7aL9ab69LGBMuYqQ2YXks= + + + Headers/WFCCNotificationMessageContent.h + + hash2 + + YUZRfLun/R7I0bqHw4Mrl7KnnhfKaj0/wnbM0IDC9Pg= + + + Headers/WFCCPCLoginRequestMessageContent.h + + hash2 + + TAI09QlP7msC4SY0HrdIsyX1ootM+izGqQAdB3vRpqY= + + + Headers/WFCCPCOnlineInfo.h + + hash2 + + u41qwzHVYIrR+jZEvDimNA4YkNTwlYa6DGH8BaLK9ks= + + + Headers/WFCCPTTSoundMessageContent.h + + hash2 + + uzOi0HhJUOs0f4ktkgNc4xjCD1dTn8n5lEzoTc4jjSs= + + + Headers/WFCCPTextMessageContent.h + + hash2 + + XvZRKc8mf2/ZkoBHyDwnMLrng068LcZ13kzwSReKeOA= + + + Headers/WFCCProtocol.h + + hash2 + + 9o0gXvEi64Dd55DhgP6FPY/rZQg1vSIgfz3rXFnYHFg= + + + Headers/WFCCQuitGroupNotificationContent.h + + hash2 + + nmH0DF0aPGko6SbGYUf8+s+RFrQsJmvARGD34QAJxG8= + + + Headers/WFCCQuitGroupVisibleNotificationContent.h + + hash2 + + CuwdqTD5998kNuu0JcxS5Az+EmbfWjJReUuabz/Khas= + + + Headers/WFCCQuoteInfo.h + + hash2 + + HAwGIa4WqeAMr18p0GnQZlAtK7s9E3ihLD0Jaid98Vo= + + + Headers/WFCCRawMessageContent.h + + hash2 + + KIz5yhX9/j8m8xgWvw+ELYb4Ic+t52rEdDvg8i7jMqY= + + + Headers/WFCCReadReport.h + + hash2 + + rb7Q1EBA8r69zD0qiFTZn39sDs/oDiE441mqfdkiXh4= + + + Headers/WFCCRecallMessageContent.h + + hash2 + + 4R32Hfzp8TJRJ/Tk6B9zLNlUHExhecCwQWQnkFuEiiI= + + + Headers/WFCCRichNotificationMessageContent.h + + hash2 + + AWLzzGhyJma3YPMkATkkyqg5HlibEtPPGzwBDvPwZIU= + + + Headers/WFCCSecretChatInfo.h + + hash2 + + nI0vyOBAZvUzP0U37E9A9srzyBkpsjrTB2ATuVj7Kg0= + + + Headers/WFCCSoundMessageContent.h + + hash2 + + QcRbqxV27KMf/X8BQkrEn5jlEKg+5y5/wOzuxWAvS9w= + + + Headers/WFCCStartSecretChatMessageContent.h + + hash2 + + zVx5tl6i3NxpMLBX31K56SRqqeaytZORhC155BAReX0= + + + Headers/WFCCStickerMessageContent.h + + hash2 + + u+ZA58dpp4fGpgt9h83RjYiUjhMSYvcikS6w3S8O0co= + + + Headers/WFCCStreamingTextGeneratedMessageContent.h + + hash2 + + j4yUn7cF4oon36TRIsHKKtGVyfUaRWA4px3T3G2cf1I= + + + Headers/WFCCStreamingTextGeneratingMessageContent.h + + hash2 + + UItFJ9Sz9qIpBgv7yiyg/qqUecTV+QWquwxxpU8d9eg= + + + Headers/WFCCTextMessageContent.h + + hash2 + + 3eXlmFboM0t2OueHk+0BWwrcTz69Xm7kS4s4YVqHW+Y= + + + Headers/WFCCThingsDataContent.h + + hash2 + + YGvz8OLe1OD+lFQ17Y+uoAWaWx9KaiSEfPXtlZzobCk= + + + Headers/WFCCThingsLostEventContent.h + + hash2 + + AO38+ub8YBjHe/S3FcFXi6APYTBz1x1s7KpA+3PIXTA= + + + Headers/WFCCTipNotificationMessageContent.h + + hash2 + + 90RsFbgpcU6nG7UDzgXhe8VMRY4UDWpJbOLhyerU9pQ= + + + Headers/WFCCTransferGroupOwnerNotificationContent.h + + hash2 + + YGI11q4MRfksjgvqvIs6M7cOwRuQOimeTS4UtJ9BTKQ= + + + Headers/WFCCTypingMessageContent.h + + hash2 + + LkZ8mliAFqDgG1lgsFcc/956jRa+dWiMwfgkUzl/lnk= + + + Headers/WFCCUnknownMessageContent.h + + hash2 + + NpelLyOoJaPjiony8BiFENJKfUGX9/CmDoPkAxalSRw= + + + Headers/WFCCUnreadCount.h + + hash2 + + WXsnUNjKVv7ZLm292UKOidK0hrONKryavW9IZyJLUoQ= + + + Headers/WFCCUserInfo.h + + hash2 + + 3WCjD1cFMpZKuQCFJLf1y6zkEAba2E+SNp/g2GR/y4s= + + + Headers/WFCCUserOnlineState.h + + hash2 + + 4q1EGCs8+qY9p74Q4Tmib7ZisLHSjDkJ5kd4tlvKoXE= + + + Headers/WFCCUtilities.h + + hash2 + + DORRwQpFPlDe7v7nLakyPNjn5Q4wnncxMPctNDELjCM= + + + Headers/WFCCVideoMessageContent.h + + hash2 + + dAzsmak0E5VmmiaDL6mlrhniCf97j7d3ksK8KMHFwmU= + + + Headers/WFCChatClient.h + + hash2 + + SN/V2LZZOrL/mx0ZsSQ1aoO1aV8DmyBEVVjt+B9o4Wk= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/Common.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/Common.h new file mode 100644 index 00000000..6ccc7127 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/Common.h @@ -0,0 +1,177 @@ +// +// Common.h +// WFChatClient +// +// Created by heavyrain on 2017/11/8. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#ifndef Common_h +#define Common_h + + +/* + * 说明:1000以下为系统保留类型,自定义消息请使用1000以上数值。 + * 系统消息类型中100以下为常用基本类型消息。100-199位群组消息类型。400-499为VoIP消息类型. + */ +//基本消息类型 +//未知类型的消息 +#define MESSAGE_CONTENT_TYPE_UNKNOWN 0 +//文本消息 +#define MESSAGE_CONTENT_TYPE_TEXT 1 +//语音消息 +#define MESSAGE_CONTENT_TYPE_SOUND 2 +//图片消息 +#define MESSAGE_CONTENT_TYPE_IMAGE 3 +//位置消息 +#define MESSAGE_CONTENT_TYPE_LOCATION 4 +//文件消息 +#define MESSAGE_CONTENT_TYPE_FILE 5 +//视频消息 +#define MESSAGE_CONTENT_TYPE_VIDEO 6 +//动态表情消息 +#define MESSAGE_CONTENT_TYPE_STICKER 7 +//链接消息 +#define MESSAGE_CONTENT_TYPE_LINK 8 +//存储不计数文本消息 +#define MESSAGE_CONTENT_TYPE_P_TEXT 9 +//名片消息 +#define MESSAGE_CONTENT_TYPE_CARD 10 +//组合消息 +#define MESSAGE_CONTENT_TYPE_COMPOSITE_MESSAGE 11 +//富通知消息 +#define MESSAGE_CONTENT_TYPE_RICH_NOTIFICATION 12 +//文章消息 +#define MESSAGE_CONTENT_TYPE_ARTICLES 13 +//流式文本正在生成消息 +#define MESSAGE_CONTENT_TYPE_STREAMING_TEXT_GENERATING 14 +//流式文本消息 +#define MESSAGE_CONTENT_TYPE_STREAMING_TEXT_GENERATED 15 + +//消息未能送达消息 +#define MESSAGE_CONTENT_NOT_DELIVERED 16 + +//Dumy1 +#define MESSAGE_CONTENT_TYPE_DUMY1 21 + +//Dumy2 +#define MESSAGE_CONTENT_TYPE_DUMY2 22 + +//Ptt sound +#define MESSAGE_CONTENT_TYPE_PTT_VOICE 23 + +//Dumy3 +#define MESSAGE_CONTENT_TYPE_DUMY3 24 + +//同步标记未读 +#define MESSAGE_CONTENT_TYPE_MARK_UNREAD_SYNC 31 + +#define MESSAGE_CONTENT_TYPE_CREATE_SECRET_CHAT 40 +#define MESSAGE_CONTENT_TYPE_ACCEPT_SECRET_CHAT 41 +#define MESSAGE_CONTENT_TYPE_DESTROY_SECRET_CHAT 42 +#define MESSAGE_CONTENT_TYPE_SECRET_CHAT_MESSAGE 43 +#define MESSAGE_CONTENT_TYPE_BURN_MSG_READED 46 +#define MESSAGE_CONTENT_TYPE_BURN_MSG_PLAYED 47 + +//频道进出消息 +#define MESSAGE_CONTENT_TYPE_ENTER_CHANNEL_CHAT 71 +#define MESSAGE_CONTENT_TYPE_LEAVE_CHANNEL_CHAT 72 +#define MESSAGE_CONTENT_TYPE_CHANNEL_MENU_EVENT 73 + +//撤回消息 +#define MESSAGE_CONTENT_TYPE_RECALL 80 +//删除消息,请勿直接发送此消息,此消息是服务器端删除时的同步消息 +#define MESSAGE_CONTENT_TYPE_DELETE 81 + +//提醒消息 +#define MESSAGE_CONTENT_TYPE_TIP 90 + +//正在输入消息 +#define MESSAGE_CONTENT_TYPE_TYPING 91 + +//以上是打招呼的内容 +#define MESSAGE_FRIEND_GREETING 92 +//您已经添加XXX为好友了,可以愉快地聊天了 +#define MESSAGE_FRIEND_ADDED_NOTIFICATION 93 + +//PC 端请求登录 +#define MESSAGE_PC_LOGIN_REQUSET 94 + + + +//通知消息类型 +//创建群的通知消息 +#define MESSAGE_CONTENT_TYPE_CREATE_GROUP 104 +//加群的通知消息 +#define MESSAGE_CONTENT_TYPE_ADD_GROUP_MEMBER 105 +//踢出群成员的通知消息 +#define MESSAGE_CONTENT_TYPE_KICKOF_GROUP_MEMBER 106 +//退群的通知消息 +#define MESSAGE_CONTENT_TYPE_QUIT_GROUP 107 +//解散群的通知消息 +#define MESSAGE_CONTENT_TYPE_DISMISS_GROUP 108 +//转让群主的通知消息 +#define MESSAGE_CONTENT_TYPE_TRANSFER_GROUP_OWNER 109 +//修改群名称的通知消息 +#define MESSAGE_CONTENT_TYPE_CHANGE_GROUP_NAME 110 +//修改群昵称的通知消息 +#define MESSAGE_CONTENT_TYPE_MODIFY_GROUP_ALIAS 111 +//修改群头像的通知消息 +#define MESSAGE_CONTENT_TYPE_CHANGE_GROUP_PORTRAIT 112 +//修改群全局禁言的通知消息 +#define MESSAGE_CONTENT_TYPE_CHANGE_MUTE 113 +//修改群加入权限的通知消息 +#define MESSAGE_CONTENT_TYPE_CHANGE_JOINTYPE 114 +//修改群群成员私聊的通知消息 +#define MESSAGE_CONTENT_TYPE_CHANGE_PRIVATECHAT 115 +//修改群是否可搜索的通知消息 +#define MESSAGE_CONTENT_TYPE_CHANGE_SEARCHABLE 116 +//修改群管理的通知消息 +#define MESSAGE_CONTENT_TYPE_SET_MANAGER 117 +//禁言/取消禁言群成员的通知消息 +#define MESSAGE_CONTENT_TYPE_MUTE_MEMBER 118 +//允许/取消允许群成员发言的通知消息 +#define MESSAGE_CONTENT_TYPE_ALLOW_MEMBER 119 + +//踢出群成员的可见通知消息 +#define MESSAGE_CONTENT_TYPE_KICKOF_GROUP_MEMBER_VISIBLE_NOTIFICATION 120 +//退群的可见通知消息 +#define MESSAGE_CONTENT_TYPE_QUIT_GROUP_VISIBLE_NOTIFICATION 121 +//修改群组Extra通知消息 +#define MESSAGE_CONTENT_TYPE_MODIFY_GROUP_EXTRA 122 +//修改群组成员Extra通知消息 +#define MESSAGE_CONTENT_TYPE_MODIFY_GROUP_MEMBER_EXTRA 123 +//修改群组设置通知消息 +#define MESSAGE_CONTENT_TYPE_MODIFY_GROUP_SETTINGS 124 + +//VoIP开始消息 +#define VOIP_CONTENT_TYPE_START 400 +//VoIP结束消息 +#define VOIP_CONTENT_TYPE_END 402 + +#define VOIP_CONTENT_TYPE_ACCEPT 401 +#define VOIP_CONTENT_TYPE_SIGNAL 403 +#define VOIP_CONTENT_TYPE_MODIFY 404 +#define VOIP_CONTENT_TYPE_ACCEPT_T 405 +#define VOIP_CONTENT_TYPE_ADD_PARTICIPANT 406 +#define VOIP_CONTENT_MUTE_VIDEO 407 + +#define VOIP_CONTENT_CONFERENCE_INVITE 408 +#define VOIP_CONTENT_CONFERENCE_CHANGE_MODE 410 +#define VOIP_CONTENT_CONFERENCE_KICKOFF_MEMBER 411 +#define VOIP_CONTENT_CONFERENCE_COMMAND 412 + +#define VOIP_CONTENT_MULTI_CALL_ONGOING 416 +#define VOIP_CONTENT_JOIN_CALL_REQUEST 417 + +#define VOIP_CONTENT_PTT_INVITE 420 + +#define MESSAGE_CONTENT_TYPE_FEED 501 +#define MESSAGE_CONTENT_TYPE_COMMENT 502 + +#define THINGS_CONTENT_TYPE_DATA 601 +#define THINGS_CONTENT_TYPE_LOST_EVENT 602 + + + +#endif /* Common_h */ diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCAddGroupeMemberNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCAddGroupeMemberNotificationContent.h new file mode 100644 index 00000000..f0505967 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCAddGroupeMemberNotificationContent.h @@ -0,0 +1,31 @@ +// +// WFCCAddGroupeMemberNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/20. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 群组加人的通知消息 + */ +@interface WFCCAddGroupeMemberNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 邀请者ID + */ +@property (nonatomic, strong)NSString *invitor; + +/** + 被邀请者ID列表 + */ +@property (nonatomic, strong)NSArray *invitees; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCArticlesMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCArticlesMessageContent.h new file mode 100644 index 00000000..ebab29f6 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCArticlesMessageContent.h @@ -0,0 +1,29 @@ +// +// WFCCArticlesMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + +@class WFCCLinkMessageContent; +@interface WFCCArticle : NSObject +@property (nonatomic, strong)NSString *articleId; +@property (nonatomic, strong)NSString *cover; +@property (nonatomic, strong)NSString *title; +@property (nonatomic, strong)NSString *digest; +@property (nonatomic, strong)NSString *url; +@property (nonatomic, assign)BOOL readReport; +@end + +/** + 富通知消息 + */ +@interface WFCCArticlesMessageContent : WFCCMessageContent +@property (nonatomic, strong)WFCCArticle *topArticle; +@property (nonatomic, strong)NSArray *subArticles; + +- (NSArray *)toLinkMessageContent; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCCallAddParticipantMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCCallAddParticipantMessageContent.h new file mode 100644 index 00000000..72b09dcc --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCCallAddParticipantMessageContent.h @@ -0,0 +1,23 @@ +// +// WFCCCallAddParticipantMessageContent.h +// WFAVEngineKit +// +// Created by heavyrain on 17/9/27. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import +#import + +@interface WFCCCallAddParticipantMessageContent : WFCCNotificationMessageContent +@property(nonatomic, strong)NSString *callId; +@property(nonatomic, strong)NSString *initiator; +@property(nonatomic, strong)NSString *pin; +@property(nonatomic, strong)NSArray *participants; +//[{"userId":"xxxx","acceptTime":13123123123,"joinTime":13123123123,"videoMuted":false}] +@property(nonatomic, strong)NSArray *existParticipants; +@property(nonatomic, assign)BOOL audioOnly; +@property(nonatomic, assign)BOOL autoAnswer; +//指定对方clientId +@property(nonatomic, strong)NSString *clientId; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCCallByeMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCCallByeMessageContent.h new file mode 100644 index 00000000..5295cbc3 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCCallByeMessageContent.h @@ -0,0 +1,14 @@ +// +// WFCCCallByeMessageContent.h +// WFAVEngineKit +// +// Created by heavyrain on 17/9/27. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import +@interface WFCCCallByeMessageContent : WFCCMessageContent +@property(nonatomic, strong)NSString *callId; +@property(nonatomic, assign)int/*WFAVCallEndReason*/ endReason; +@property(nonatomic, assign)long long inviteMsgUid; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCCallStartMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCCallStartMessageContent.h new file mode 100644 index 00000000..f22d3c8f --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCCallStartMessageContent.h @@ -0,0 +1,59 @@ +// +// WFCCTextMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + +/** + 电话总结消息 + */ +@interface WFCCCallStartMessageContent : WFCCMessageContent + + +/** + CallId + */ +@property (nonatomic, strong)NSString *callId; +/** + 对端用户Id + */ +@property (nonatomic, strong)NSArray *targetIds; +/** + * 开始时间 + */ +@property (nonatomic, assign)long long connectTime; +/** + * 结束时间 + */ +@property (nonatomic, assign)long long endTime; +/* 结束原因 +WFAVCallEndReason + 0: kWFAVCallEndReasonUnknown, + 1: kWFAVCallEndReasonBusy, + 2: kWFAVCallEndReasonSignalError, + 3: kWFAVCallEndReasonHangup, + 4: kWFAVCallEndReasonMediaError, + 5: kWFAVCallEndReasonRemoteHangup, + 6: kWFAVCallEndReasonOpenCameraFailure, + 7: kWFAVCallEndReasonTimeout, + 8: kWFAVCallEndReasonAcceptByOtherClient + */ +@property (nonatomic, assign)int status; + +/* + 0 未知;1 音视频免费版;2 音视频高级版 + */ +@property (nonatomic, assign)int type; + +/* + * 是否仅音频 + */ +@property (nonatomic, assign, getter=isAudioOnly)BOOL audioOnly; + +@property (nonatomic, strong)NSString *pin; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCCardMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCCardMessageContent.h new file mode 100644 index 00000000..831fe84f --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCCardMessageContent.h @@ -0,0 +1,62 @@ +// +// WFCCTextMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + + +typedef NS_ENUM(NSInteger, WFCCCardType) { + CardType_User = 0, + CardType_Group = 1, + CardType_Channel = 3 +}; + +/** + 名片消息 + */ +@interface WFCCCardMessageContent : WFCCMessageContent + +/** + 构造方法 + + @param targetId 目标Id + @param type 类型,0 用户,1 群组, 3 频道。 + @param fromUser 分享用户。 + @return 名片消息 + */ ++ (instancetype)cardWithTarget:(NSString *)targetId type:(WFCCCardType)type from:(NSString *)fromUser; + +/** + 名片类型 + */ +@property (nonatomic, assign)WFCCCardType type; + +/** + 用户ID + */ +@property (nonatomic, strong)NSString *targetId; + +/** + 用户号 + */ +@property (nonatomic, strong)NSString *name; + +/** + 用户昵称 + */ +@property (nonatomic, strong)NSString *displayName; + +/** + 用户头像 + */ +@property (nonatomic, strong)NSString *portrait; + +/** +分享的用户ID + */ +@property (nonatomic, strong)NSString *fromUser; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCChangeGroupNameNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCChangeGroupNameNotificationContent.h new file mode 100644 index 00000000..341cd998 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCChangeGroupNameNotificationContent.h @@ -0,0 +1,31 @@ +// +// WFCCChangeGroupNameNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/20. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 修改群名的通知消息 + */ +@interface WFCCChangeGroupNameNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 操作者ID + */ +@property (nonatomic, strong)NSString *operateUser; + +/** + 群名 + */ +@property (nonatomic, strong)NSString *name; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCChangeGroupPortraitNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCChangeGroupPortraitNotificationContent.h new file mode 100644 index 00000000..f0ab69c0 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCChangeGroupPortraitNotificationContent.h @@ -0,0 +1,26 @@ +// +// WFCCChangeGroupNameNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/20. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 修改群头像的通知消息 + */ +@interface WFCCChangeGroupPortraitNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 操作者ID + */ +@property (nonatomic, strong)NSString *operateUser; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCChannelInfo.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCChannelInfo.h new file mode 100644 index 00000000..6164c963 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCChannelInfo.h @@ -0,0 +1,28 @@ +// +// WFCCChatroomInfo.h +// WFChatClient +// +// Created by heavyrain lee on 2018/8/24. +// Copyright © 2018 WildFireChat. All rights reserved. +// + +#import +#import "WFCCChannelMenu.h" +#import "WFCCJsonSerializer.h" + +@interface WFCCChannelInfo : WFCCJsonSerializer +@property(nonatomic, strong)NSString *channelId; +@property(nonatomic, strong)NSString *name; +@property(nonatomic, strong)NSString *portrait; +@property(nonatomic, strong)NSString *owner; +@property(nonatomic, strong)NSString *desc; +@property(nonatomic, strong)NSString *extra; +@property(nonatomic, strong)NSString *secret; +@property(nonatomic, strong)NSString *callback; + +//https://docs.wildfirechat.net/base_knowledge/channel.html##频道状态 +@property(nonatomic, assign)int status; +@property(nonatomic, assign)long long updateDt; + +@property(nonatomic, strong)NSArray *menus; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCChannelMenu.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCChannelMenu.h new file mode 100644 index 00000000..83168422 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCChannelMenu.h @@ -0,0 +1,29 @@ +// +// WFCCChannelMenu.h +// WFChatClient +// +// Created by Rain on 2022/8/11. +// Copyright © 2022 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" + +NS_ASSUME_NONNULL_BEGIN + + +@interface WFCCChannelMenu : WFCCJsonSerializer +@property(nonatomic, strong)NSString *menuId; +@property(nonatomic, strong)NSString *type; +@property(nonatomic, strong)NSString *name; +@property(nonatomic, strong)NSString *key; +@property(nonatomic, strong)NSString *url; +@property(nonatomic, strong)NSString *mediaId; +@property(nonatomic, strong)NSString *articleId; +@property(nonatomic, strong)NSString *appId; +@property(nonatomic, strong)NSString *appPage; +@property(nonatomic, assign)NSString *extra; +@property(nonatomic, strong)NSArray *subMenus; +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCChannelMenuEventMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCChannelMenuEventMessageContent.h new file mode 100644 index 00000000..66921556 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCChannelMenuEventMessageContent.h @@ -0,0 +1,14 @@ +// +// WFCCChannelMenuEventMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + +@class WFCCChannelMenu; +@interface WFCCChannelMenuEventMessageContent : WFCCMessageContent +@property (nonatomic, strong)WFCCChannelMenu *menu; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCChatroomInfo.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCChatroomInfo.h new file mode 100644 index 00000000..56ef53b2 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCChatroomInfo.h @@ -0,0 +1,24 @@ +// +// WFCCChatroomInfo.h +// WFChatClient +// +// Created by heavyrain lee on 2018/8/24. +// Copyright © 2018 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" + +@interface WFCCChatroomInfo : WFCCJsonSerializer +@property(nonatomic, strong)NSString *chatroomId; +@property(nonatomic, strong)NSString *title; +@property(nonatomic, strong)NSString *desc; +@property(nonatomic, strong)NSString *portrait; +@property(nonatomic, strong)NSString *extra; + +//0 normal; 1 not started; 2 end +@property(nonatomic, assign)int state; +@property(nonatomic, assign)int memberCount; +@property(nonatomic, assign)long long createDt; +@property(nonatomic, assign)long long updateDt; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCChatroomMemberInfo.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCChatroomMemberInfo.h new file mode 100644 index 00000000..0ebd239c --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCChatroomMemberInfo.h @@ -0,0 +1,15 @@ +// +// WFCCChatroomInfo.h +// WFChatClient +// +// Created by heavyrain lee on 2018/8/24. +// Copyright © 2018 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" + +@interface WFCCChatroomMemberInfo : WFCCJsonSerializer +@property(nonatomic, assign)int memberCount; +@property(nonatomic, strong)NSArray *members; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCCompositeMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCCompositeMessageContent.h new file mode 100644 index 00000000..a405844d --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCCompositeMessageContent.h @@ -0,0 +1,20 @@ +// +// WFCCCompositeMessageContent.h +// WFChatClient +// +// Created by Tom Lee on 2020/10/4. +// Copyright © 2020 WildFireChat. All rights reserved. +// + +#import "WFCCMediaMessageContent.h" +@class WFCCMessage; + +NS_ASSUME_NONNULL_BEGIN + +@interface WFCCCompositeMessageContent : WFCCMediaMessageContent +@property (nonatomic, strong)NSString *title; +@property (nonatomic, strong)NSArray *messages; +@property(nonatomic, assign)BOOL loaded; +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCConferenceInviteMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCConferenceInviteMessageContent.h new file mode 100644 index 00000000..822353db --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCConferenceInviteMessageContent.h @@ -0,0 +1,69 @@ +// +// WFCCConferenceInviteMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + +/** + 电话总结消息 + */ +@interface WFCCConferenceInviteMessageContent : WFCCMessageContent + + +/** + CallId + */ +@property (nonatomic, strong)NSString *callId; + +/** + 会议主持人 +*/ +@property (nonatomic, strong)NSString *host; +/** + 会议标题 + */ +@property (nonatomic, strong)NSString *title; + +/** + 会议描述 + */ +@property (nonatomic, strong)NSString *desc; +/** + 会议开始时间 + */ +@property (nonatomic, assign)long long startTime; + +/* + 是否音频会议 + */ +@property (nonatomic, assign, getter=isAudioOnly)BOOL audioOnly; + +/* + 会议PIN +*/ +@property (nonatomic, strong)NSString *pin; + +/* + 会议密码 +*/ +@property (nonatomic, strong)NSString *password; + +/* + 是否是会议观众 +*/ +@property (nonatomic, assign)BOOL audience; + +/* + 是否是高级会议模式 +*/ +@property (nonatomic, assign)BOOL advanced; + +/* + 呼叫附加信息 +*/ +@property (nonatomic, strong)NSString *callExtra; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCConversation.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCConversation.h new file mode 100644 index 00000000..a4f5372c --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCConversation.h @@ -0,0 +1,79 @@ +// +// WFCCConversation.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" +#import "WFCCProtocol.h" +/** + 会话类型 + + - Single_Type: 单聊 + - Group_Type: 群组 + - Chatroom_Type: 聊天室 + - Channel_Type: 频道 + - Things_Type: 物联网 + - SecretChat_Type: 密聊 + */ +typedef NS_ENUM(NSInteger, WFCCConversationType) { + Single_Type, + Group_Type, + Chatroom_Type, + Channel_Type, + Things_Type, + SecretChat_Type, +}; + +/** + 会话 + */ +@interface WFCCConversation : WFCCJsonSerializer + +/** + 构造方法 + + @param type 会话类型 + @param target 目标会话ID + @param line 默认传0 + @return 会话 + */ ++(instancetype)conversationWithType:(WFCCConversationType)type + target:(NSString *)target + line:(int)line; + +/** + 构造方法 + + @param target 目标会话ID + @return 单聊会话 + */ ++(instancetype)singleConversation:(NSString *)target; + +/** + 构造方法 + + @param target 目标会话ID + @return 群组会话 + */ ++(instancetype)groupConversation:(NSString *)target; + +/** + 会话类型 + */ +@property (nonatomic, assign)WFCCConversationType type; + +/** + 目标会话ID,单聊为对方用户ID,群聊为群ID + */ +@property (nonatomic, strong)NSString *target; + +/** + 默认为0 + */ +@property (nonatomic, assign)int line; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCConversationInfo.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCConversationInfo.h new file mode 100644 index 00000000..e058f01e --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCConversationInfo.h @@ -0,0 +1,57 @@ +// +// WFCCConversationInfo.h +// WFChatClient +// +// Created by heavyrain on 2017/8/29. +// Copyright © 2017年 wildfire chat. All rights reserved. +// + +#import +#import "WFCCConversation.h" +#import "WFCCMessage.h" +#import "WFCCUnreadCount.h" +#import "WFCCJsonSerializer.h" + +/** + 会话信息 + */ +@interface WFCCConversationInfo : WFCCJsonSerializer + +/** + 会话 + */ +@property (nonatomic, strong)WFCCConversation *conversation; + +/** + 最后一条消息 + */ +@property (nonatomic, strong)WFCCMessage *lastMessage; + +/** + 草稿 + */ +@property (nonatomic, strong)NSString *draft; + +/** + 最后一条消息的时间戳 + */ +@property (nonatomic, assign)long long timestamp; + +/** + 未读数 + */ +@property (nonatomic, strong)WFCCUnreadCount *unreadCount; + +/** + 是否置顶 + */ +@property (nonatomic, assign)int isTop; + +/** + 是否设置了免打扰 + */ +@property (nonatomic, assign)BOOL isSilent; + +@end + + diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCConversationSearchInfo.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCConversationSearchInfo.h new file mode 100644 index 00000000..ec9e885e --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCConversationSearchInfo.h @@ -0,0 +1,42 @@ +// +// WFCCConversationSearchInfo.h +// WFChatClient +// +// Created by heavyrain on 2017/10/22. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import +#import "WFCCConversation.h" +#import "WFCCMessage.h" +#import "WFCCJsonSerializer.h" +/** + 会话搜索信息 + */ +@interface WFCCConversationSearchInfo : WFCCJsonSerializer + +/** + 会话 + */ +@property (nonatomic, strong)WFCCConversation *conversation; + +/** + 命中的消息 + */ +@property (nonatomic, strong)WFCCMessage *marchedMessage; + +/** + 命中数量 + */ +@property (nonatomic, assign)int marchedCount; + +/** + 搜索关键字 + */ +@property (nonatomic, strong)NSString *keyword; + +/** + 会话时间 + */ +@property (nonatomic, assign)int64_t timestamp; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCCreateGroupNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCCreateGroupNotificationContent.h new file mode 100644 index 00000000..6adfe2b4 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCCreateGroupNotificationContent.h @@ -0,0 +1,31 @@ +// +// WFCCCreateGroupNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/19. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 建群的通知消息 + */ +@interface WFCCCreateGroupNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 创建者ID + */ +@property (nonatomic, strong)NSString *creator; + +/** + 群名 + */ +@property (nonatomic, strong)NSString *groupName; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCDeleteMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCDeleteMessageContent.h new file mode 100644 index 00000000..34b73b8a --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCDeleteMessageContent.h @@ -0,0 +1,25 @@ +// +// WFCCDeleteMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + +/** + 文本消息 + */ +@interface WFCCDeleteMessageContent : WFCCMessageContent + +/** + 被删除消息的Uid + */ +@property (nonatomic, assign)long long messageUid; + +/** + 撤回用户Id + */ +@property (nonatomic, strong)NSString *operatorId; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCDeliveryReport.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCDeliveryReport.h new file mode 100644 index 00000000..52446303 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCDeliveryReport.h @@ -0,0 +1,22 @@ +// +// WFCCConversation.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" +/** + 会话 + */ +@interface WFCCDeliveryReport : WFCCJsonSerializer + ++(instancetype)delivered:(NSString *)userId + timestamp:(long long)timestamp; + +@property (nonatomic, strong)NSString *userId; +@property (nonatomic, assign)long long timestamp; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCDictionary.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCDictionary.h new file mode 100644 index 00000000..3c758bc7 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCDictionary.h @@ -0,0 +1,21 @@ +// +// WFCCDictionary.h +// WFChatClient +// +// Created by Rain on 26/5/2025. +// Copyright © 2025 WildFireChat. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface WFCCDictionary : NSObject ++ (WFCCDictionary *)fromData:(NSData *)data error:(NSError **)error; ++ (WFCCDictionary *)fromString:(NSString *)str error:(NSError **)error; ++ (WFCCDictionary *)fromDictionary:(NSDictionary *)dictionary; + +- (id)objectForKeyedSubscript:(id)key; +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCDismissGroupNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCDismissGroupNotificationContent.h new file mode 100644 index 00000000..97803499 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCDismissGroupNotificationContent.h @@ -0,0 +1,26 @@ +// +// WFCCDismissGroupNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/20. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 群解散的通知消息 + */ +@interface WFCCDismissGroupNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 操作者ID + */ +@property (nonatomic, strong)NSString *operateUser; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCDomainInfo.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCDomainInfo.h new file mode 100644 index 00000000..8ca2d465 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCDomainInfo.h @@ -0,0 +1,56 @@ +// +// WFCCDomainInfo.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" + +/** + 域信息 + */ +@interface WFCCDomainInfo : WFCCJsonSerializer + +/** + 域ID + */ +@property (nonatomic, strong)NSString *domainId; + +/** + 域的名称 + */ +@property (nonatomic, strong)NSString *name; + +/** + 域的描述 + */ +@property (nonatomic, strong)NSString *desc; + +/** + 域的邮件地址 + */ +@property (nonatomic, strong)NSString *email; + +/** + 域的电话 + */ +@property (nonatomic, strong)NSString *tel; + +/** + 域的地址 + */ +@property (nonatomic, strong)NSString *address; + +/** + 群的额外信息 + */ +@property (nonatomic, strong)NSString *extra; + +/** + 域的最后更新日期 + */ +@property (nonatomic, assign)long long updateDt; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCEnterChannelChatMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCEnterChannelChatMessageContent.h new file mode 100644 index 00000000..74e85b6b --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCEnterChannelChatMessageContent.h @@ -0,0 +1,17 @@ +// +// WFCCEnterChannelChatMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + + +/** + 进入频道会话消息 + */ +@interface WFCCEnterChannelChatMessageContent : WFCCMessageContent + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCEnums.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCEnums.h new file mode 100644 index 00000000..e4612ebc --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCEnums.h @@ -0,0 +1,141 @@ +// +// WFCCEnums.h +// WFChatClient +// +// Created by Heavyrian Lee on 2020/6/25. +// Copyright © 2020 WildFireChat. All rights reserved. +// + +#ifndef WFCCEnums_h +#define WFCCEnums_h + +typedef NS_ENUM(NSInteger, WFCCErrorCode) { + //0~255 server error + ERROR_CODE_SUCCESS = 0, // //"success"), + ERROR_CODE_SECRECT_KEY_MISMATCH = 1, //"secrect key mismatch"), + ERROR_CODE_INVALID_DATA = 2, //"invalid data"), + ERROR_CODE_NODE_NOT_EXIST = 3, //"node not exist"), + ERROR_CODE_SERVER_ERROR = 4, //"server error"), + ERROR_CODE_NOT_MODIFIED = 5, //"not modified"), + + //Auth error + ERROR_CODE_TOKEN_ERROR = 6, //"token error"), + ERROR_CODE_USER_FORBIDDEN = 8, //"user forbidden"), + + //Message error + ERROR_CODE_NOT_IN_GROUP = 9, //"not in group"), + ERROR_CODE_INVALID_MESSAGE = 10, //"invalid message"), + + //Group error + ERROR_CODE_GROUP_ALREADY_EXIST = 11, //"group aleady exist"), + + + //user error + ERROR_CODE_PASSWORD_INCORRECT = 15, //"password incorrect"), + + //user error + ERROR_CODE_FRIEND_ALREADY_REQUEST = 16, //"already send request"), + ERROR_CODE_FRIEND_REQUEST_BLOCKED = 18, //"friend request blocked"), + ERROR_CODE_FRIEND_REQUEST_EXPIRED = 19, //"friend request expired"), + + ERROR_CODE_NOT_IN_CHATROOM = 20, //"not in chatroom"), + + ERROR_CODE_NOT_IN_CHANNEL = 21, //"not in channel"), + + ERROR_CODE_NOT_LICENSED = 22, //"not licensed"), + ERROR_CODE_ALREADY_FRIENDS = 23, //"already friends"), + + ERROR_CODE_GROUP_EXCEED_MAX_MEMBER_COUNT = 240, //"group exceed max member count"), + ERROR_CODE_GROUP_MUTED = 241, //"group is muted"), + ERROR_CODE_SENSITIVE_MATCHED = 242, //"sensitive matched"), + ERROR_CODE_SIGN_EXPIRED = 243, //"sign expired"), + ERROR_CODE_AUTH_FAILURE = 244, //"auth failure"), + ERROR_CODE_CLIENT_COUNT_OUT_OF_LIMIT = 245, //"client count out of limit"), + ERROR_CODE_IN_BLACK_LIST = 246, //"user in balck list"), + ERROR_CODE_FORBIDDEN_SEND_MSG = 247, //"forbidden send msg globally"), + ERROR_CODE_NOT_RIGHT = 248, //"no right to operate"), + ERROR_CODE_TIMEOUT = 249, //"timeout"), + ERROR_CODE_OVER_FREQUENCY = 250, //"over frequency"), + ERROR_CODE_INVALID_PARAMETER = 251, //"Invalid parameter"), + ERROR_CODE_NOT_EXIST = 253, //"not exist"), + ERROR_CODE_NOT_IMPLEMENT = 254, //"not implement"), + + //负值为mars返回错误 + ERROR_CODE_Local_TaskTimeout = -1, + ERROR_CODE_Local_TaskRetry = -2, + ERROR_CODE_Local_StartTaskFail = -3, + ERROR_CODE_Local_AntiAvalanche = -4, + ERROR_CODE_Local_ChannelSelect = -5, + ERROR_CODE_Local_NoNet = -6, + ERROR_CODE_Local_Cancel = -7, + ERROR_CODE_Local_Clear = -8, + ERROR_CODE_Local_Reset = -9, + ERROR_CODE_Local_TaskParam = -12, + ERROR_CODE_Local_CgiFrequcencyLimit = -13, + ERROR_CODE_Local_ChannelID = -14, + + ERROR_CODE_Long_FirstPkgTimeout = -500, + ERROR_CODE_Long_PkgPkgTimeout = -501, + ERROR_CODE_Long_ReadWriteTimeout = -502, + ERROR_CODE_Long_TaskTimeout = -503, + + ERROR_CODE_Socket_NetworkChange = -10086, + ERROR_CODE_Socket_MakeSocketPrepared = -10087, + ERROR_CODE_Socket_WritenWithNonBlock = -10088, + ERROR_CODE_Socket_ReadOnce = -10089, + ERROR_CODE_Socket_RecvErr = -10091, + ERROR_CODE_Socket_SendErr = -10092, + ERROR_CODE_Socket_NoopTimeout = -10093, + ERROR_CODE_Socket_NoopAlarmTooLate = -10094, + ERROR_CODE_Http_SplitHttpHeadAndBody = -10194, + ERROR_CODE_Http_ParseStatusLine = -10195, + ERROR_CODE_Net_MsgXPHandleBufferErr = -10504, + ERROR_CODE_Dns_MakeSocketPrepared = -10606, + + //proto error code + ERROR_CODE_Proto_CorruptData = -100001, + ERROR_CODE_Proto_InvalideParameter = -100002, + //消息内容超过最大值,最大值为200KB,建议不超过15KB。 + ERROR_CODE_Proto_Content_Exceed_Max_Size = -100003, + //媒体内容超过最大值,最大值为100MB + ERROR_CODE_Proto_Media_Exceed_Max_Size = -100004, +}; + + +/** + 添加好友来源 + + - FriendSource_Unknown: 未知 + - FriendSource_Search: 搜索 + - FriendSource_Group: 群组,targetId为群主ID + - FriendSource_QrCode: 二维码,targetId为分享二维码的用户Id + - FriendSource_Card: 用户名片,targetId为分享名片的用户Id + - FriendSource_Org: 组织通讯录查看 + */ +typedef NS_ENUM(NSInteger, WFCCFriendSourceType) { + FriendSource_Unknown, + FriendSource_Search, + FriendSource_Group, + FriendSource_QrCode, + FriendSource_Card, + FriendSource_Org +}; + +/** + 群成员来源 + + - GroupMemberSource_Unknown: 搜索 + - GroupMemberSource_Search: 搜索 + - GroupMemberSource_Invite: 邀请,targetId为邀请人的用户id + - GroupMemberSource_QrCode: 二维码,targetId为分享群二维码的用户id + - GroupMemberSource_Card: 群名片,targetId为分享群名片的用户Id + */ +typedef NS_ENUM(NSInteger, WFCCGroupMemberSourceType) { + GroupMemberSource_Unknown, + GroupMemberSource_Search, + GroupMemberSource_Invite, + GroupMemberSource_QrCode, + GroupMemberSource_Card, +}; + +#endif /* WFCCEnums_h */ diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCFileMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCFileMessageContent.h new file mode 100644 index 00000000..2234767b --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCFileMessageContent.h @@ -0,0 +1,33 @@ +// +// WFCCSoundMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/9. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMediaMessageContent.h" + +/** + 语音消息 + */ +@interface WFCCFileMessageContent : WFCCMediaMessageContent + +/** + 构造方法 + + @param filePath 文件路径 + @return 语音消息 + */ ++ (instancetype)fileMessageContentFromPath:(NSString *)filePath; + +/** + 文件名 + */ +@property (nonatomic, strong)NSString *name; + +/** + 文件名 + */ +@property (nonatomic, assign)NSUInteger size; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCFileRecord.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCFileRecord.h new file mode 100644 index 00000000..1fdbc089 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCFileRecord.h @@ -0,0 +1,26 @@ +// +// WFCCFileRecord.h +// WFChatClient +// +// Created by dali on 2020/8/2. +// Copyright © 2020 WildFireChat. All rights reserved. +// + +#import +#import "WFCCConversation.h" +#import "WFCCJsonSerializer.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface WFCCFileRecord : WFCCJsonSerializer +@property (nonatomic, strong)WFCCConversation *conversation; +@property (nonatomic, assign)long long messageUid; +@property (nonatomic, strong)NSString *userId; +@property (nonatomic, strong)NSString *name; +@property (nonatomic, strong)NSString *url; +@property (nonatomic, assign)int size; +@property (nonatomic, assign)int downloadCount; +@property (nonatomic, assign)long long timestamp; +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCFriend.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCFriend.h new file mode 100644 index 00000000..1a23ee32 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCFriend.h @@ -0,0 +1,36 @@ +// +// WFCCFriend.h +// WFChatClient +// +// Created by heavyrain on 2021/5/16. +// Copyright © 2021 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface WFCCFriend : WFCCJsonSerializer +/* + 好友ID + */ +@property(nonatomic, strong)NSString *userId; + +/* + 好友昵称 + */ +@property(nonatomic, strong)NSString *alias; + +/* + 扩展信息,添加方式等 + */ +@property(nonatomic, strong)NSString *extra; + +/* + 添加好友时间 + */ +@property(nonatomic, assign)long long timestamp; +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCFriendAddedMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCFriendAddedMessageContent.h new file mode 100644 index 00000000..75316d2a --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCFriendAddedMessageContent.h @@ -0,0 +1,16 @@ +// +// WFCCFriendAddedMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/19. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 好友添加成功的通知。一般可以显示为你已添加XXX为好友了,可以开始聊天了。本消息和WFCCFriendGreetingMessageContent为后添加的,之前服务器端是直接发送了2个tip消息,这样就没有办法做多语言化了。但现在还不能直接使用这两个消息,因为有历史兼容问题,可以先加上这两个功能,等您的应用的SDK都更新支持这两个消息以后,再在服务器端加上。 + */ +@interface WFCCFriendAddedMessageContent : WFCCNotificationMessageContent + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCFriendGreetingMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCFriendGreetingMessageContent.h new file mode 100644 index 00000000..42cb0b7e --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCFriendGreetingMessageContent.h @@ -0,0 +1,16 @@ +// +// WFCCFriendGreetingMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/19. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** +好友打招呼的提示。一般可以显示为以上是打招呼信息。更多信息请阅读WFCCFriendAddedMessageContent的注释 +*/ +@interface WFCCFriendGreetingMessageContent : WFCCNotificationMessageContent + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCFriendRequest.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCFriendRequest.h new file mode 100644 index 00000000..882d8376 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCFriendRequest.h @@ -0,0 +1,51 @@ +// +// WFCCFriendRequest.h +// WFChatClient +// +// Created by heavyrain on 2017/10/17. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" +/** + 好友请求 + */ +@interface WFCCFriendRequest : WFCCJsonSerializer + +/** + 方向 + */ +@property(nonatomic, assign)int direction; + +/** + ID + */ +@property(nonatomic, strong)NSString *target; + +/** + 请求说明 + */ +@property(nonatomic, strong)NSString *reason; + +/** + 请求扩展信息 + */ +@property(nonatomic, strong)NSString *extra; + +/** + 接受状态 + */ +@property(nonatomic, assign)int status; + +/** + 已读 + */ +@property(nonatomic, assign)int readStatus; + +/** + 发起时间 + */ +@property(nonatomic, assign)long long timestamp; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCGroupInfo.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCGroupInfo.h new file mode 100644 index 00000000..b772a936 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCGroupInfo.h @@ -0,0 +1,125 @@ +// +// WFCCGroupInfo.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" +/** + 群类型 + + - GroupType_Normal: 管理员和群主才能加人和退群,修改群信息。 + - GroupType_Free: 所有人都能加人、退群和修改群信息 + - GroupType_Restricted: 带有群管理功能 + - GroupType_Organization: 组织群,只能通过API操作,群主和管理员可以禁言、撤回等操作 + */ +typedef NS_ENUM(NSInteger, WFCCGroupType) { + GroupType_Normal = 0, + GroupType_Free = 1, + GroupType_Restricted = 2, + GroupType_Organization = 3, +} ; + +/** + 群信息 + */ +@interface WFCCGroupInfo : WFCCJsonSerializer + +/** + 群类型 + */ +@property (nonatomic, assign)WFCCGroupType type; + +/** + 群ID + */ +@property (nonatomic, strong)NSString *target; + +/** + 群名 + */ +@property (nonatomic, strong)NSString *name; + +/** + 群头像 + */ +@property (nonatomic, strong)NSString *portrait; + +/** + 成员数 + */ +@property (nonatomic, assign)NSUInteger memberCount; + +/** + 群主 + */ +@property (nonatomic, strong)NSString *owner; + +/** + 扩展信息 + */ +@property (nonatomic, strong)NSString *extra; + +/** + 群备注 + */ +@property (nonatomic, strong)NSString *remark; + +/** + 群禁言状态,0 关闭群禁言;1 开启群禁言 + */ +@property (nonatomic, assign)int mute; + +/** + 加群申请状态,0 不限制加入(用户可以自己加群或被普通群成员拉入);1 普通群成员可以拉人进群;2 只有群管理才能拉人 + */ +@property (nonatomic, assign)int joinType; + +/** + 群成员私聊状态,0 允许私聊;1 不允许私聊 + */ +@property (nonatomic, assign)int privateChat; + +/** + 群搜索状态,0 群可以被搜索到;1 群不会被搜索到 + */ +@property (nonatomic, assign)int searchable; + +/** + 群成员是否可以加载加入之前的历史消息,0不可以;1可以 + */ +@property (nonatomic, assign)int historyMessage; + +/** + 群的最大成员数,可以通过server api来修改 + */ +@property (nonatomic, assign)int maxMemberCount; + +/** + 群成员私聊状态,0 普通群组;1 超级群组。超级群组不支持服务器端删除。 + */ +@property (nonatomic, assign)int superGroup; + +/** + 是否被解散,0 没有解散;1 已经被解散。在2024.3.30日以后的IM服务支持群组标记删除,默认为关,需要IM服务打开群组标记删除的开关。 + */ +@property (nonatomic, assign)int deleted; + +/** + 群的最后更新日期 + */ +@property (nonatomic, assign)long long updateDt; + +/** + 群成员的最后更新日期,一般是没有什么作用,唯一的作用就是当用户退出群组后,再获取群组信息,memberDt会为负数。 + */ +@property (nonatomic, assign)long long memberDt; + +/** + 群显示名称,如果有群备注返回群备注,没有群备注返回群名称 + */ +@property (nonatomic, strong, readonly)NSString *displayName; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCGroupJoinTypeNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCGroupJoinTypeNotificationContent.h new file mode 100644 index 00000000..35896206 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCGroupJoinTypeNotificationContent.h @@ -0,0 +1,31 @@ +// +// WFCCCreateGroupNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/19. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 建群的通知消息 + */ +@interface WFCCGroupJoinTypeNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 操作者ID + */ +@property (nonatomic, strong)NSString *operatorId; + +/** + 操作 + */ +@property (nonatomic, strong)NSString *type; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCGroupMember.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCGroupMember.h new file mode 100644 index 00000000..3e774f1c --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCGroupMember.h @@ -0,0 +1,66 @@ +// +// WFCCGroupMember.h +// WFChatClient +// +// Created by heavyrain on 2017/10/30. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" + +/** + 群成员类型 + + - Member_Type_Normal: 普通成员 + - Member_Type_Manager: 管理员 + - Member_Type_Owner: 群主 + - Member_Type_Muted: 被禁言 + - Member_Type_Deleted: 已删除成员,仅在群成员变动回调中存在。 + - Member_Type_Allowed: 被允许发言 + */ +typedef NS_ENUM(NSInteger, WFCCGroupMemberType) { + Member_Type_Normal = 0, + Member_Type_Manager, + Member_Type_Owner, + Member_Type_Muted, + Member_Type_Deleted, + Member_Type_Allowed = 5 +} ; + +/** + 群成员信息 + */ +@interface WFCCGroupMember : WFCCJsonSerializer + +/** + 群ID + */ +@property(nonatomic, strong)NSString *groupId; + +/** + 群成员ID + */ +@property(nonatomic, strong)NSString *memberId; + +/** + 群昵称 + */ +@property(nonatomic, strong)NSString *alias; + +/** + 群成员扩展信息 + */ +@property(nonatomic, strong)NSString *extra; + +/** + 群成员类型 + */ +@property(nonatomic, assign)WFCCGroupMemberType type; + +/** + 群成员加入时间戳 +*/ +@property(nonatomic, assign)long long createTime; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCGroupMemberAllowNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCGroupMemberAllowNotificationContent.h new file mode 100644 index 00000000..63b52e37 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCGroupMemberAllowNotificationContent.h @@ -0,0 +1,35 @@ +// +// WFCCCreateGroupNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/19. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 群成员禁言的通知消息 + */ +@interface WFCCGroupMemberAllowNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 操作者ID + */ +@property (nonatomic, strong)NSString *creator; + +/** + 操作 + */ +@property (nonatomic, strong)NSString *type; + +/** + 被禁言/取消禁言者ID列表 + */ +@property (nonatomic, strong)NSArray *targetIds; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCGroupMemberMuteNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCGroupMemberMuteNotificationContent.h new file mode 100644 index 00000000..def006ec --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCGroupMemberMuteNotificationContent.h @@ -0,0 +1,35 @@ +// +// WFCCCreateGroupNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/19. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 群成员禁言的通知消息 + */ +@interface WFCCGroupMemberMuteNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 操作者ID + */ +@property (nonatomic, strong)NSString *creator; + +/** + 操作 + */ +@property (nonatomic, strong)NSString *type; + +/** + 被禁言/取消禁言者ID列表 + */ +@property (nonatomic, strong)NSArray *targetIds; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCGroupMuteNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCGroupMuteNotificationContent.h new file mode 100644 index 00000000..71a4633c --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCGroupMuteNotificationContent.h @@ -0,0 +1,31 @@ +// +// WFCCCreateGroupNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/19. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 建群的通知消息 + */ +@interface WFCCGroupMuteNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 创建者ID + */ +@property (nonatomic, strong)NSString *creator; + +/** + 操作 + */ +@property (nonatomic, strong)NSString *type; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCGroupPrivateChatNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCGroupPrivateChatNotificationContent.h new file mode 100644 index 00000000..1b6d4fe3 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCGroupPrivateChatNotificationContent.h @@ -0,0 +1,31 @@ +// +// WFCCCreateGroupNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/19. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 建群的通知消息 + */ +@interface WFCCGroupPrivateChatNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 操作者ID + */ +@property (nonatomic, strong)NSString *operatorId; + +/** + 操作 + */ +@property (nonatomic, strong)NSString *type; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCGroupSearchInfo.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCGroupSearchInfo.h new file mode 100644 index 00000000..fd13458d --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCGroupSearchInfo.h @@ -0,0 +1,53 @@ +// +// WFCCGroupSearchInfo.h +// WFChatClient +// +// Created by heavyrain on 2017/10/22. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import +#import "WFCCGroupInfo.h" +#import "WFCCJsonSerializer.h" + +/** + 搜索群组匹配类型mask + + - GroupSearchMarchTypeMask_Group_Name: 匹配群组名称 + - GroupSearchMarchTypeMask_Member_Name: 匹配群成员昵称 + - GroupSearchMarchTypeMask_Member_Alias: 匹配群成员群昵称 + - GroupSearchMarchTypeMask_Group_Remark: 匹配群组remark + */ +typedef NS_ENUM(NSInteger, WFCCGroupSearchMarchTypeMask) { + GroupSearchMarchTypeMask_Group_Name = 0x01, + GroupSearchMarchTypeMask_Member_Name = 0x02, + GroupSearchMarchTypeMask_Member_Alias = 0x04, + GroupSearchMarchTypeMask_Group_Remark = 0x08 +}; + +/** + 群组搜索信息 + */ +@interface WFCCGroupSearchInfo : WFCCJsonSerializer + +/** + 命中的群组 + */ +@property (nonatomic, strong)WFCCGroupInfo *groupInfo; + +/** + 命中的类型,请参考WFCCGroupSearchMarchTypeMask + */ +@property (nonatomic, assign)int marchType; + +/** + 命中群成员名称 + */ +@property (nonatomic, strong)NSArray *marchedMemberNames; + +/** + 搜索的关键字 + */ +@property (nonatomic, strong)NSString *keyword; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCGroupSetManagerNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCGroupSetManagerNotificationContent.h new file mode 100644 index 00000000..3187cfd4 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCGroupSetManagerNotificationContent.h @@ -0,0 +1,35 @@ +// +// WFCCCreateGroupNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/19. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 设置/取消群管理员通知消息 + */ +@interface WFCCGroupSetManagerNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 操作者ID + */ +@property (nonatomic, strong)NSString *operatorId; + +/** + 操作,0取消管理员,1设置为管理员。 + */ +@property (nonatomic, strong)NSString *type; + +/** + Member ID + */ +@property (nonatomic, strong)NSArray *memberIds; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCGroupSettingsNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCGroupSettingsNotificationContent.h new file mode 100644 index 00000000..cfa1c08e --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCGroupSettingsNotificationContent.h @@ -0,0 +1,36 @@ +// +// WFCCGroupSettingsNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/19. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 建群的通知消息 + */ +@interface WFCCGroupSettingsNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 操作者ID + */ +@property (nonatomic, strong)NSString *operatorId; + +/** + 修改设置类型。7为修改是否查看历史消息;8为修改群最大成员数,9为修改是否为超级群 + */ +@property (nonatomic, assign)int type; + +/** + 修改后的数据 + */ +@property (nonatomic, assign)int value; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCIMService.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCIMService.h new file mode 100644 index 00000000..31083a87 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCIMService.h @@ -0,0 +1,2862 @@ +// +// WFCCIMService.h +// WFChatClient +// +// Created by heavyrain on 2017/11/5. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import +#import "WFCCMessage.h" +#import "WFCCGroupInfo.h" +#import "WFCCConversationInfo.h" +#import "WFCCUserInfo.h" +#import "WFCCFriendRequest.h" +#import "WFCCConversationSearchInfo.h" +#import "WFCCGroupMember.h" +#import "WFCCGroupSearchInfo.h" +#import "WFCCChatroomInfo.h" +#import "WFCCChatroomMemberInfo.h" +#import "WFCCUnreadCount.h" +#import "WFCCChannelInfo.h" +#import "WFCCPCOnlineInfo.h" +#import "WFCCFileRecord.h" +#import "WFCCFriend.h" +#import "WFCCSecretChatInfo.h" +#import "WFCCNetworkService.h" +#import "WFCCDomainInfo.h" + +#pragma mark - 频道通知定义 +//发送消息状态通知 +extern NSString *kSendingMessageStatusUpdated; +extern NSString *kUploadMediaMessageProgresse; +extern NSString *kConnectionStatusChanged; +extern NSString *kReceiveMessages; +extern NSString *kRecallMessages; +extern NSString *kDeleteMessages; +extern NSString *kMessageDelivered; +extern NSString *kMessageReaded; +extern NSString *kMessageUpdated; + +#pragma mark - 枚举值定义 +/** + 修改个人信息的内容 + + - Modify_DisplayName: 修改显示名 + - Modify_Portrait: 修改头像 + - Modify_Gender: 修改性别 + - Modify_Mobile: 修改手机号 + - Modify_Email: 修改邮箱 + - Modify_Address: 修改地址 + - Modify_Company: 修改公司信息 + - Modify_Social: 修改社交信息 + - Modify_Extra: 修改扩展信息 + */ +typedef NS_ENUM(NSInteger, ModifyMyInfoType) { + Modify_DisplayName = 0, + Modify_Portrait = 1, + Modify_Gender = 2, + Modify_Mobile = 3, + Modify_Email = 4, + Modify_Address = 5, + Modify_Company = 6, + Modify_Social = 7, + Modify_Extra = 8 +}; + +typedef NS_ENUM(NSInteger, ModifyGroupInfoType) { + Modify_Group_Name = 0, + Modify_Group_Portrait = 1, + Modify_Group_Extra = 2, + Modify_Group_Mute = 3, + Modify_Group_JoinType = 4, + Modify_Group_PrivateChat = 5, + Modify_Group_Searchable = 6, + Modify_Group_History_Message = 7, + Modify_Group_Max_Member_Count = 8 +}; + + +typedef NS_ENUM(NSInteger, ModifyChannelInfoType) { + Modify_Channel_Name = 0, + Modify_Channel_Portrait = 1, + Modify_Channel_Desc = 2, + Modify_Channel_Extra = 3, + Modify_Channel_Secret = 4, + Modify_Channel_Callback = 5 +}; + +/** + 个人设置Scope + + @discussion 用户设置,1000以内被系统保留。应用不应该直接使用系统预制的范围。应用可以使用1000以上的值。 + */ +typedef NS_ENUM(NSInteger, UserSettingScope) { + //不能直接使用,调用setConversation:silent:方法会使用到此值。 + UserSettingScope_Conversation_Silent = 1, + //不能直接使用 + UserSettingScope_Global_Silent = 2, + + //不能直接使用,调用setConversation:top:方法会使用到此值。 + UserSettingScope_Conversation_Top = 3, + //不能直接使用 + UserSettingScope_Hidden_Notification_Detail = 4, + //不能直接使用 + UserSettingScope_Group_Hide_Nickname = 5, + //不能直接使用 + UserSettingScope_Favourite_Group = 6, + + //不能直接使用,协议栈内会使用此值 + UserSettingScope_Conversation_Sync = 7, + //不能直接使用,协议栈内会使用此值 + UserSettingScope_My_Channel = 8, + //不能直接使用,协议栈内会使用此值 + UserSettingScope_Listened_Channel = 9, + + //不能直接使用,协议栈内会使用此值 + UserSettingScope_PC_Online = 10, + //不能直接使用,协议栈内会使用此值 + UserSettingScope_Conversation_Readed = 11, + //不能直接使用,协议栈内会使用此值 + UserSettingScope_WebOnline = 12, + //不能直接使用,协议栈内会使用此值 + UserSettingScope_DisableRecipt = 13, + //不能直接使用 + UserSettingScope_Favourite_User = 14, + //不能直接使用 + UserSettingScope_Mute_When_PC_Online = 15, + //不能直接使用 + UserSettingScope_Lines_Readed = 16, + //不能直接使用 + UserSettingScope_No_Disturbing = 17, + //不能直接使用,协议栈内会使用此值 + UserSettingScope_Conversation_Clear_Message = 18, + //不能直接使用,协议栈内会使用此值 + UserSettingScope_Conversation_Draft = 19, + //不能直接使用,协议栈内会使用此值 + UserSettingScope_Disable_Sync_Draft = 20, + //不能直接使用,协议栈内会使用此值 + UserSettingScope_Voip_Silent = 21, + //不能直接使用,协议栈内会使用此值 + UserSettingScope_PTT_Reserved = 22, + //不能直接使用,协议栈内会使用此值 + UserSettingScope_Custom_State = 23, + //不能直接使用,协议栈内会使用此值 + UserSettingScope_Disable_Secret_Chat = 24, + //不能直接使用,协议栈内会使用此值 + UserSettingScope_Ptt_Silent = 25, + //不能直接使用,协议栈内会使用此值 + UserSettingScope_Group_Remark = 26, + //不能直接使用,协议栈内会使用此值 + UserSettingScope_Privacy_Searchable = 27, + //不能直接使用,协议栈内会使用此值 + UserSettingScope_AddFriend_NoVerify = 28, + + //自定义用户设置,请使用1000以上的key + UserSettingScope_Custom_Begin = 1000 +} ; + + +/** + 搜索用户类型 + + - SearchUserType_General: 模糊搜索diaplayName,精确匹配name或电话或用户ID + - SearchUserType_Name_Mobile: 精确匹配name或电话 + - SearchUserType_Name: 精确匹配name + - SearchUserType_Mobile: 精确匹配电话 + - SearchUserType_UserId: 精确匹配用户ID + - SearchUserType_Name_Mobile_UserId: 精确匹配name或电话或用户ID + */ +typedef NS_ENUM(NSInteger, WFCCSearchUserType) { + SearchUserType_General, + SearchUserType_Name_Mobile, + SearchUserType_Name, + SearchUserType_Mobile, + SearchUserType_UserId, + SearchUserType_Name_Mobile_UserId +}; + +/** + 搜索用户的用户类型 + + - UserSearchUserType_All: 搜索普通用户和机器人 + - UserSearchUserType_Only_User: 只搜索普通用户 + - UserSearchUserType_Only_Robot: 只搜索机器人 + */ +typedef NS_ENUM(NSInteger, WFCCUserSearchUserType) { + UserSearchUserType_All, + UserSearchUserType_Only_User, + UserSearchUserType_Only_Robot +}; + +/** + 禁止搜索当前用户的掩码。 + + - DisableSearch_DisplayName_Mask: 第1位是是否禁止搜索昵称 + - DisableSearch_Name_Mask: 第2位是否禁止搜索账户 + - DisableSearch_Mobile_Mask: 第3位是否禁止搜索电话号码 + - DisableSearch_UserId_Mask: 第4位是否禁止搜索用户ID + */ +typedef NS_ENUM(NSInteger, WFCCDisableSearchMask) { + DisableSearch_DisplayName_Mask = 1, + DisableSearch_Name_Mask = 2, + DisableSearch_Mobile_Mask = 4, + DisableSearch_UserId_Mask = 8, +}; + + +typedef NS_ENUM(NSInteger, WFCCPlatformType) { + PlatformType_UNSET = 0, + PlatformType_iOS = 1, + PlatformType_Android = 2, + PlatformType_Windows = 3, + PlatformType_OSX = 4, + PlatformType_WEB = 5, + PlatformType_WX = 6, + PlatformType_Linux = 7, + PlatformType_iPad = 8, + //Android pad + PlatformType_APad = 9, + PlatformType_Harmony = 10, + PlatformType_HarmonyPad = 11, + PlatformType_HarmonyPC = 12 +} ; + +typedef NS_ENUM(NSInteger, WFCCFileRecordOrder) { + FileRecordOrder_TIME_DESC = 0, + FileRecordOrder_TIME_ASC = 1, + FileRecordOrder_SIZE_DESC = 2, + FileRecordOrder_SIZE_ASC = 3, +} ; + +#pragma mark - 用户源 +/* + * ChatClient内置支持用户信息托管,但对于很多应用来说都已经拥有自己的用户信息。此时可以实现用户源并设置到IMServer中去。这样ChatClient会从源中读取信息,从而ChatUIKit不用修改代码。 + * 对于好友关系,由于页面简单。如果客户有自己的好友关系,建议客户自己修改相关UI。 + * 对于群组建议使用我们的托管。 + */ +@protocol WFCCUserSource +- (WFCCUserInfo *)getUserInfo:(NSString *)userId + refresh:(BOOL)refresh; + +- (WFCCUserInfo *)getUserInfo:(NSString *)userId inGroup:(NSString *)groupId refresh:(BOOL)refresh; + +- (NSArray *)getUserInfos:(NSArray *)userIds inGroup:(NSString *)groupId; + +- (void)getUserInfo:(NSString *)userId + refresh:(BOOL)refresh + success:(void(^)(WFCCUserInfo *userInfo))successBlock + error:(void(^)(int errorCode))errorBlock; + +- (void)getUserInfo:(NSString *)userId + groupId:(NSString *)groupId + refresh:(BOOL)refresh + success:(void(^)(WFCCUserInfo *userInfo))successBlock + error:(void(^)(int errorCode))errorBlock; + +- (void)getUserInfos:(NSArray *)userIds + groupId:(NSString *)groupId + success:(void(^)(NSArray *userInfos))successBlock + error:(void(^)(int errorCode))errorBlock; + +- (void)searchUser:(NSString *)keyword + searchType:(WFCCSearchUserType)searchType + page:(int)page + success:(void(^)(NSArray *machedUsers))successBlock + error:(void(^)(int errorCode))errorBlock; + +- (void)searchUser:(NSString *)keyword + domain:(NSString *)domainId + searchType:(WFCCSearchUserType)searchType + page:(int)page + success:(void(^)(NSArray *machedUsers))successBlock + error:(void(^)(int errorCode))errorBlock; + +- (void)searchUser:(NSString *)keyword + domain:(NSString *)domainId + searchType:(WFCCSearchUserType)searchType + userType:(WFCCUserSearchUserType)userType + page:(int)page + success:(void(^)(NSArray *machedUsers))successBlock + error:(void(^)(int errorCode))errorBlock; + + +-(void)modifyMyInfo:(NSDictionary *)values + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; +@end + +@protocol ReceiveMessageFilter; +@class WFCCUserOnlineState; +@class WFCCUserCustomState; +@class UIImage; +#pragma mark - IM服务 + +/** + IM服务 + */ +@interface WFCCIMService : NSObject + +/** + IM服务单例 + + @return IM服务单例 + */ ++ (WFCCIMService*)sharedWFCIMService; + + +/* + 使用raw消息。当client用于uniapp时,messagePayload没有必要decode为messagecontent,使用raw消息,收发消息都是WFCCRawMessageContent。不要调用这个函数,仅仅当client用在uniapp时。 + */ +- (void)useRawMessage; + + +/** + 外部用户源 + */ +@property(nonatomic, weak)id userSource; + + +/** + 默认图片,当图片消息或者其他类型需要缩略图消息没有缩略图时,使用次默认图片 + */ +@property(nonatomic, strong)UIImage *defaultThumbnailImage; + +#pragma mark - 会话相关 +/** + 获取会话信息 + + @param conversationTypes 会话类型 + @param lines 默认传 @[@(0)] + @return 会话信息 + */ +- (NSArray *)getConversationInfos:(NSArray *)conversationTypes + lines:(NSArray *)lines; + +/** + 获取会话信息 + + @param conversation 会话 + @return 会话信息 + */ +- (WFCCConversationInfo *)getConversationInfo:(WFCCConversation *)conversation; + +/** + 搜索会话 + + @param keyword 关键词 + @param conversationTypes 会话类型 + @param lines 默认传 @[@(0)] + @return 会话搜索结果信息 + */ +- (NSArray *)searchConversation:(NSString *)keyword inConversation:(NSArray *)conversationTypes lines:(NSArray *)lines; + +/** + 搜索会话 + + @param keyword 关键词 + @param conversationTypes 会话类型 + @param lines 默认传 @[@(0)] + @param startTime 开始时间,如果不限制开始时间请使用0 + @param endTime 结束时间,如果不限制开始时间请使用0 + @param desc 是否逆序 + @param limit limit + @param offset offset + @return 会话搜索结果信息 + */ +- (NSArray *)searchConversation:(NSString *)keyword inConversation:(NSArray *)conversationTypes lines:(NSArray *)lines startTime:(int64_t)startTime endTime:(int64_t)endTime desc:(BOOL)desc limit:(int)limit offset:(int)offset; + +/** + 搜索会话 + + @param keyword 关键词 + @param conversationTypes 会话类型 + @param lines 默认传 @[@(0)] + @param cntTypes 消息内容类型 + @param startTime 开始时间,如果不限制开始时间请使用0 + @param endTime 结束时间,如果不限制开始时间请使用0 + @param desc 是否逆序 + @param limit limit + @param offset offset + @param onlyMentionedMsg 是否只搜索提醒消息 + @return 会话搜索结果信息 + */ +- (NSArray *)searchConversation:(NSString *)keyword + inConversation:(NSArray *)conversationTypes + lines:(NSArray *)lines + cntTypes:(NSArray *)cntTypes + startTime:(int64_t)startTime + endTime:(int64_t)endTime + desc:(BOOL)desc + limit:(int)limit + offset:(int)offset + onlyMentionedMsg:(BOOL)onlyMentionedMsg; + +/** + 删除会话 + + @param conversation 会话 + @param clearMessage 是否删除会话中的消息 + */ +- (void)removeConversation:(WFCCConversation *)conversation + clearMessage:(BOOL)clearMessage; + +/** + 设置或取消会话置顶 + + @param conversation 会话 + @param top 置顶优先级 + */ +- (void)setConversation:(WFCCConversation *)conversation + top:(int)top + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 设置会话免打扰 + + @param conversation 会话 + @param silent 是否免打扰 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)setConversation:(WFCCConversation *)conversation + silent:(BOOL)silent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取会话是否免打扰状态 + + @param conversation 会话 + @return 会话是否免打扰 + */ +- (BOOL)isConversationSilent:(WFCCConversation *)conversation; +/** + 设置会话草稿 + + @param conversation 会话 + @param draft 草稿 + */ +- (void)setConversation:(WFCCConversation *)conversation + draft:(NSString *)draft; + +/** + 更新会话的时间 + + @param conversation 会话 + @param timestamp 时间戳 + */ +- (void)setConversation:(WFCCConversation *)conversation + timestamp:(long long)timestamp; + +/** + 获取会话列表第一条未读消息Id + + @param conversation 会话 + + @return 会话中最早一条未读消息Id + */ +- (long)getFirstUnreadMessageId:(WFCCConversation *)conversation; + +/** + 清除远端会话消息,仅专业版支持。 + + @param conversation 会话 + @param successBlock 删除成功 + @param errorBlock 删除失败 + */ +- (void)clearRemoteConversationMessage:(WFCCConversation *)conversation + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +#pragma mark - 未读数相关 +/** + 获取指定类型会话的未读数 + + @param conversationTypes 会话类型 + @param lines 默认传 @[@(0)] + @return 未读数 + */ +- (WFCCUnreadCount *)getUnreadCount:(NSArray *)conversationTypes + lines:(NSArray *)lines; + +/** + 获取某个会话的未读数 + + @param conversation 会话 + @return 未读数 + */ +- (WFCCUnreadCount *)getUnreadCount:(WFCCConversation *)conversation; + +/** + 清空会话未读数。 + + @param conversation 会话 + */ +- (void)clearUnreadStatus:(WFCCConversation *)conversation; + +/** +清空会话未读数 + +@param conversationTypes 会话类型 +@param lines 线路 +*/ +- (void)clearUnreadStatus:(NSArray *)conversationTypes + lines:(NSArray *)lines; + +/** + 清空所有会话的未读数。仅清理本地消息的未读数,没有同步到其他端,如果多端使用,请避免使用此方法 + */ +- (void)clearAllUnreadStatus DEPRECATED_MSG_ATTRIBUTE("use clearUnreadStatus:lines: instead"); + +/** + 清空消息未读。 + + @param messageId 消息ID + @discuss 这个函数只能清除本地的状态,不能同步到服务器或者其他端。建议一般情况下不要用这个接口。 + */ +- (void)clearMessageUnreadStatus:(long)messageId; + +/** + 清空某条消息之前(包含)所有消息的未读状态。 + + @param messageId 消息ID + @param conversation 消息所属会话 + */ +- (void)clearMessageUnreadStatusBefore:(long)messageId conversation:(WFCCConversation *)conversation; + +/** + 设置会话的最后一条接收消息为未读状态。 + + @param conversation 会话 + @param sync 是否同步到其它客户端 + @return YES设置成功,NO消息不存在或已经存在未读。 + */ +- (BOOL)markAsUnRead:(WFCCConversation *)conversation syncToOtherClient:(BOOL)sync; + +/** + 设置媒体消息已播放(已经放开限制,所有消息都可以设置为已读状态) + + @param messageId 消息ID + */ +- (void)setMediaMessagePlayed:(long)messageId; + +/** + 设置消息的本地附加信息,注意信息不在多端之间同步。 + + @param messageId 消息ID + @param extra 附加信息 + + @return YES更新成功,NO消息不存在 + */ +- (BOOL)setMessage:(long)messageId localExtra:(NSString *)extra; +/** +获取会话内已读状态 + +@param conversation 会话 +@return 会话的每个用户的已读时间 +*/ +- (NSMutableDictionary *)getConversationRead:(WFCCConversation *)conversation; + +/** +获取会话内已送达状态 + +@param conversation 会话 +@return 会话的每个用户的已送达时间 +*/ +- (NSMutableDictionary *)getMessageDelivery:(WFCCConversation *)conversation; + +#pragma mark - 消息相关 +/** + 获取消息 + @discuss 获取从fromIndex起count条旧的消息。如果想要获取比fromIndex新的消息,count传负值。 + + @param conversation 会话 + @param contentTypes 消息类型 + @param fromIndex 起始index + @param count 总数 + @return 消息实体 + */ +- (NSArray *)getMessages:(WFCCConversation *)conversation + contentTypes:(NSArray *)contentTypes + from:(NSUInteger)fromIndex + count:(NSInteger)count + withUser:(NSString *)user DEPRECATED_MSG_ATTRIBUTE("use v2 API instead"); + +/** + 获取消息 + @discuss 获取从fromIndex起count条旧的消息。如果想要获取比fromIndex新的消息,count传负值。 + + @param conversation 会话 + @param contentTypes 消息类型 + @param fromIndex 起始index + @param count 总数 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getMessagesV2:(WFCCConversation *)conversation + contentTypes:(NSArray *)contentTypes + from:(NSUInteger)fromIndex + count:(NSInteger)count + withUser:(NSString *)user + success:(void(^)(NSArray *messages))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取提醒消息 + @discuss 获取从fromIndex起count条旧的消息。如果想要获取比fromIndex新的消息,count传负值。 + + @param conversation 会话 + @param fromIndex 起始index + @param count 总数 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getMentionedMessages:(WFCCConversation *)conversation + from:(NSUInteger)fromIndex + count:(NSInteger)count + success:(void(^)(NSArray *messages))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取消息 + @discuss 获取从fromIndex起count条旧的消息。如果想要获取比fromIndex新的消息,count传负值。 + + @param conversation 会话 + @param messageStatus 消息状态WFCCMessageStatus + @param fromIndex 起始index + @param count 总数 + @return 消息实体 + */ +- (NSArray *)getMessages:(WFCCConversation *)conversation + messageStatus:(NSArray *)messageStatus + from:(NSUInteger)fromIndex + count:(NSInteger)count + withUser:(NSString *)user DEPRECATED_MSG_ATTRIBUTE("use v2 API instead"); + +/** + 获取消息 + @discuss 获取从fromIndex起count条旧的消息。如果想要获取比fromIndex新的消息,count传负值。 + + @param conversation 会话 + @param messageStatus 消息状态WFCCMessageStatus + @param fromIndex 起始index + @param count 总数 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getMessagesV2:(WFCCConversation *)conversation + messageStatus:(NSArray *)messageStatus + from:(NSUInteger)fromIndex + count:(NSInteger)count + withUser:(NSString *)user + success:(void(^)(NSArray *messages))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取某类会话信息 + + @param conversationTypes 会话类型 + @param lines 默认传 @[@(0)] + @param contentTypes 消息类型 + @param fromIndex 起始index + @param count 总数 + @return 消息实体 + */ +- (NSArray *)getMessages:(NSArray *)conversationTypes + lines:(NSArray *)lines + contentTypes:(NSArray *)contentTypes + from:(NSUInteger)fromIndex + count:(NSInteger)count + withUser:(NSString *)user DEPRECATED_MSG_ATTRIBUTE("use v2 API instead"); + +/** + 获取某类会话信息 + + @param conversationTypes 会话类型 + @param lines 默认传 @[@(0)] + @param contentTypes 消息类型 + @param fromIndex 起始index + @param count 总数 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getMessagesV2:(NSArray *)conversationTypes + lines:(NSArray *)lines + contentTypes:(NSArray *)contentTypes + from:(NSUInteger)fromIndex + count:(NSInteger)count + withUser:(NSString *)user + success:(void(^)(NSArray *messages))successBlock + error:(void(^)(int error_code))errorBlock; +/** + 获取某类会话信息 + + @param conversationTypes 会话类型 + @param lines 默认传 @[@(0)] + @param messageStatus 消息状态 + @param fromIndex 起始index + @param count 总数 + @param user 对话用户 + @return 消息实体 + */ +- (NSArray *)getMessages:(NSArray *)conversationTypes + lines:(NSArray *)lines + messageStatus:(NSArray *)messageStatus + from:(NSUInteger)fromIndex + count:(NSInteger)count + withUser:(NSString *)user DEPRECATED_MSG_ATTRIBUTE("use v2 API instead"); + +/** + 获取某类会话信息 + + @param conversationTypes 会话类型 + @param lines 默认传 @[@(0)] + @param messageStatus 消息状态 + @param fromIndex 起始index + @param count 总数 + @param user 对话用户 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getMessagesV2:(NSArray *)conversationTypes + lines:(NSArray *)lines + messageStatus:(NSArray *)messageStatus + from:(NSUInteger)fromIndex + count:(NSInteger)count + withUser:(NSString *)user + success:(void(^)(NSArray *messages))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取消息 + @discuss 获取从fromTime起count条旧的消息。如果想要获取比fromIndex新的消息,count传负值。 + + @param conversation 会话 + @param contentTypes 消息类型 + @param fromTime 起始index + @param count 总数 + @return 消息实体 + */ +- (NSArray *)getMessages:(WFCCConversation *)conversation + contentTypes:(NSArray *)contentTypes + fromTime:(NSUInteger)fromTime + count:(NSInteger)count + withUser:(NSString *)user DEPRECATED_MSG_ATTRIBUTE("use v2 API instead"); + +/** + 获取消息 + @discuss 获取从fromTime起count条旧的消息。如果想要获取比fromIndex新的消息,count传负值。 + + @param conversation 会话 + @param contentTypes 消息类型 + @param fromTime 起始index + @param count 总数 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getMessagesV2:(WFCCConversation *)conversation + contentTypes:(NSArray *)contentTypes + fromTime:(NSUInteger)fromTime + count:(NSInteger)count + withUser:(NSString *)user + success:(void(^)(NSArray *messages))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取用户会话消息 + @discuss 获取从fromIndex起count条旧的消息。如果想要获取比fromIndex新的消息,count传负值。 + + @param userId 用户ID + @param conversation 会话 + @param contentTypes 消息类型 + @param fromIndex 起始index + @param count 总数 + @return 消息实体 + */ +- (NSArray *)getUserMessages:(NSString *)userId + conversation:(WFCCConversation *)conversation + contentTypes:(NSArray *)contentTypes + from:(NSUInteger)fromIndex + count:(NSInteger)count DEPRECATED_MSG_ATTRIBUTE("use v2 API instead"); + +/** + 获取用户会话消息 + @discuss 获取从fromIndex起count条旧的消息。如果想要获取比fromIndex新的消息,count传负值。 + + @param userId 用户ID + @param conversation 会话 + @param contentTypes 消息类型 + @param fromIndex 起始index + @param count 总数 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getUserMessagesV2:(NSString *)userId + conversation:(WFCCConversation *)conversation + contentTypes:(NSArray *)contentTypes + from:(NSUInteger)fromIndex + count:(NSInteger)count + success:(void(^)(NSArray *messages))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取用户某类会话信息 + + @param userId 用户ID + @param conversationTypes 会话类型 + @param lines 默认传 @[@(0)] + @param contentTypes 消息类型 + @param fromIndex 起始index + @param count 总数 + @return 消息实体 + */ +- (NSArray *)getUserMessages:(NSString *)userId + conversationTypes:(NSArray *)conversationTypes + lines:(NSArray *)lines + contentTypes:(NSArray *)contentTypes + from:(NSUInteger)fromIndex + count:(NSInteger)count DEPRECATED_MSG_ATTRIBUTE("use v2 API instead"); + +/** + 获取用户某类会话信息 + + @param userId 用户ID + @param conversationTypes 会话类型 + @param lines 默认传 @[@(0)] + @param contentTypes 消息类型 + @param fromIndex 起始index + @param count 总数 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getUserMessagesV2:(NSString *)userId + conversationTypes:(NSArray *)conversationTypes + lines:(NSArray *)lines + contentTypes:(NSArray *)contentTypes + from:(NSUInteger)fromIndex + count:(NSInteger)count + success:(void(^)(NSArray *messages))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取服务器消息 + @discussion 获取得到的消息数目有可能少于指定的count数,如果count不为0就意味着还有更多的消息可以获取,只有获取到的消息数为0才表示没有更多的消息了。 + + @param conversation 会话 + @param beforeMessageUid 起始index + @param count 总数 + @param successBlock 返回消息 + @param errorBlock 返回错误码 + */ +- (void)getRemoteMessages:(WFCCConversation *)conversation + before:(long long)beforeMessageUid + count:(NSUInteger)count + contentTypes:(NSArray *)contentTypes + success:(void(^)(NSArray *messages))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取一条远端消息,消息不会存储在数据库中 + + @param messageUid 消息ID + @param successBlock 返回消息 + @param errorBlock 返回错误码 + */ +- (void)getRemoteMessage:(long long)messageUid + success:(void(^)(WFCCMessage *message))successBlock + error:(void(^)(int error_code))errorBlock; +/** + 获取消息 + + @param messageId 消息ID + @return 消息实体 + */ +- (WFCCMessage *)getMessage:(long)messageId; + +/** + 获取消息 + + @param messageUid 消息UID + @return 消息实体 + */ +- (WFCCMessage *)getMessageByUid:(long long)messageUid; + +/** + 搜索消息 + + @param conversation 会话,如果为空将搜索所有会话 + @param keyword 关键词 + @param desc order + @param limit limit + @param offset offset + @param withUser 用户ID + @return 命中的消息 + */ +- (NSArray *)searchMessage:(WFCCConversation *)conversation + keyword:(NSString *)keyword + order:(BOOL)desc + limit:(int)limit + offset:(int)offset + withUser:(NSString *)withUser; + +/** + 搜索消息 + + @param conversation 会话,如果为空将搜索所有会话 + @param keyword 关键词 + @param contentTypes 过滤的消息类型 + @param desc order + @param offset offset + @param limit limit + @param withUser 用户ID + @return 命中的消息 + */ +- (NSArray *)searchMessage:(WFCCConversation *)conversation + keyword:(NSString *)keyword + contentTypes:(NSArray *)contentTypes + order:(BOOL)desc + limit:(int)limit + offset:(int)offset + withUser:(NSString *)withUser; + +/** + 搜索消息 + + @param conversation 会话,如果为空将搜索所有会话 + @param keyword 关键词 + @param contentTypes 过滤的消息类型 + @param startTime 消息的开始时间,单位为毫秒,如果不需要开始时间请用0。 + @param endTime 消息的结束时间,单位为毫秒,如果不需要结束时间请用0.。 + @param desc order + @param offset offset + @param limit limit + @param withUser 用户ID + @return 命中的消息 + */ +- (NSArray *)searchMessage:(WFCCConversation *)conversation + keyword:(NSString *)keyword + contentTypes:(NSArray *)contentTypes + startTime:(int64_t)startTime + endTime:(int64_t)endTime + order:(BOOL)desc + limit:(int)limit + offset:(int)offset + withUser:(NSString *)withUser; + +/** + 搜索提醒消息 + + @param conversation 会话,如果为空将搜索所有会话 + @param keyword 关键词 + @param desc order + @param offset offset + @param limit limit + @return 命中的消息 + */ +- (NSArray *)searchMentionedMessages:(WFCCConversation *)conversation + keyword:(NSString *)keyword + order:(BOOL)desc + limit:(int)limit + offset:(int)offset; + +/** + 获取某类会话信息 + + @param conversationTypes 会话类型 + @param lines 默认传 @[@(0)] + @param contentTypes 消息类型 + @param keyword 关键字 + @param fromIndex 起始index + @param count 总数 + @param withUser 用户ID + @return 消息实体 + */ +- (NSArray *)searchMessage:(NSArray *)conversationTypes + lines:(NSArray *)lines + contentTypes:(NSArray *)contentTypes + keyword:(NSString *)keyword + from:(NSUInteger)fromIndex + count:(NSInteger)count + withUser:(NSString *)withUser; + +/** + 获取某类会话提醒信息 + + @param conversationTypes 会话类型 + @param lines 默认传 @[@(0)] + @param keyword 关键字 + @param desc order + @param offset offset + @param limit limit + @return 消息实体 + */ +- (NSArray *)searchMentionedMessage:(NSArray *)conversationTypes + lines:(NSArray *)lines + keyword:(NSString *)keyword + order:(BOOL)desc + limit:(int)limit + offset:(int)offset; +/** + 发送消息 + + @param conversation 会话 + @param content 消息内容 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + @return 消息实体 + */ +- (WFCCMessage *)send:(WFCCConversation *)conversation + content:(WFCCMessageContent *)content + success:(void(^)(long long messageUid, long long timestamp))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 发送媒体消息 + + @param conversation 会话 + @param content 消息内容 + @param successBlock 成功的回调 + @param progressBlock 上传进度的回调,注意仅当媒体内容大于300K才会有回调 + @param errorBlock 失败的回调 + @return 消息实体 + */ +- (WFCCMessage *)sendMedia:(WFCCConversation *)conversation + content:(WFCCMessageContent *)content + success:(void(^)(long long messageUid, long long timestamp))successBlock + progress:(void(^)(long uploaded, long total))progressBlock + error:(void(^)(int error_code))errorBlock; + +/** + 发送消息 + + @param conversation 会话 + @param content 消息内容 + @param expireDuration 消息的有效期,0不限期,单位秒 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + @return 消息实体 + */ +- (WFCCMessage *)send:(WFCCConversation *)conversation + content:(WFCCMessageContent *)content + expireDuration:(int)expireDuration + success:(void(^)(long long messageUid, long long timestamp))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 发送消息 + + @param conversation 会话 + @param content 消息内容 + @param toUsers 在会话中只发给该用户,如果为空则发到会话中 + @param expireDuration 消息的有效期,0不限期,单位秒 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + @return 消息实体 + */ +- (WFCCMessage *)send:(WFCCConversation *)conversation + content:(WFCCMessageContent *)content + toUsers:(NSArray *)toUsers + expireDuration:(int)expireDuration + success:(void(^)(long long messageUid, long long timestamp))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 发送媒体消息 + + @param conversation 会话 + @param content 消息内容 + @param expireDuration 消息的有效期,0不限期,单位秒 + @param successBlock 成功的回调 + @param progressBlock 上传进度的回调,注意仅当媒体内容大于300K才会有回调 + @param errorBlock 失败的回调 + @return 消息实体 + */ +- (WFCCMessage *)sendMedia:(WFCCConversation *)conversation + content:(WFCCMessageContent *)content + expireDuration:(int)expireDuration + success:(void(^)(long long messageUid, long long timestamp))successBlock + progress:(void(^)(long uploaded, long total))progressBlock + error:(void(^)(int error_code))errorBlock; + + +/** + 发送媒体消息 + + @param conversation 会话 + @param content 消息内容 + @param toUsers 在会话中只发给该用户,如果为空则发到会话中 + @param expireDuration 消息的有效期,0不限期,单位秒 + @param successBlock 成功的回调 + @param progressBlock 上传进度的回调,注意仅当媒体内容大于300K才会有回调 + @param errorBlock 失败的回调 + @return 消息实体 + */ +- (WFCCMessage *)sendMedia:(WFCCConversation *)conversation + content:(WFCCMessageContent *)content + toUsers:(NSArray *)toUsers + expireDuration:(int)expireDuration + success:(void(^)(long long messageUid, long long timestamp))successBlock + progress:(void(^)(long uploaded, long total))progressBlock + error:(void(^)(int error_code))errorBlock; + +/** + 发送媒体消息 + + @param conversation 会话 + @param content 消息内容 + @param toUsers 在会话中只发给该用户,如果为空则发到会话中 + @param expireDuration 消息的有效期,0不限期,单位秒 + @param successBlock 成功的回调 + @param progressBlock 上传进度的回调,注意仅当媒体内容大于300K才会有回调 + @param mediaUploadedBlock 上传成功的回调 + @param errorBlock 失败的回调 + @return 消息实体 + */ +- (WFCCMessage *)sendMedia:(WFCCConversation *)conversation + content:(WFCCMessageContent *)content + toUsers:(NSArray *)toUsers + expireDuration:(int)expireDuration + success:(void(^)(long long messageUid, long long timestamp))successBlock + progress:(void(^)(long uploaded, long total))progressBlock + mediaUploaded:(void(^)(NSString *remoteUrl))mediaUploadedBlock + error:(void(^)(int error_code))errorBlock; + +/** + 发送已保存消息,消息状态必须是发送中或者发送失败 + + @param message 已经存储在本地待发送的消息 + @param expireDuration 消息的有效期,0不限期,单位秒 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + @return 协议栈是否可以发送 + */ +- (BOOL)sendSavedMessage:(WFCCMessage *)message + expireDuration:(int)expireDuration + success:(void(^)(long long messageUid, long long timestamp))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 取消发送消息,只有发送媒体类消息才可以取消 + + @param messageId 消息Id + @return 是否取消成功 + */ +- (BOOL)cancelSendingMessage:(long)messageId; +/** + 撤回消息 + + @param message 待撤回的消息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + @discuss 服务器不检查可撤回时间,应用逻辑来处理。 + */ +- (void)recall:(WFCCMessage *)message + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 上传媒体(图片、语音、文件等)数据 + + @param fileName 文件名,可为空 + @param mediaData 媒体信息 + @param mediaType 媒体类型 + @param successBlock 成功的回调 + @param progressBlock 上传进度的回调,注意仅当媒体内容大于300K才会有回调 + @param errorBlock 失败的回调 + */ +- (void)uploadMedia:(NSString *)fileName + mediaData:(NSData *)mediaData + mediaType:(WFCCMediaType)mediaType + success:(void(^)(NSString *remoteUrl))successBlock + progress:(void(^)(long uploaded, long total))progressBlock + error:(void(^)(int error_code))errorBlock; + +/** + 上传媒体(图片、语音、文件等)文件 + + @param filePath 文件名,可为空 + @param mediaType 媒体类型 + @param successBlock 成功的回调 + @param progressBlock 上传进度的回调,注意仅当媒体内容大于300K才会有回调 + @param errorBlock 失败的回调 + */ +- (void)uploadMediaFile:(NSString *)filePath + mediaType:(WFCCMediaType)mediaType + success:(void(^)(NSString *remoteUrl))successBlock + progress:(void(^)(long uploaded, long total))progressBlock + error:(void(^)(int error_code))errorBlock; + +/** + 同步上传媒体(图片、语音、文件等),成功或者失败之后才会返回 + + @param fileName 文件名,可为空 + @param mediaData 媒体信息 + @param mediaType 媒体类型 + @param successBlock 成功的回调 + @param progressBlock 上传进度的回调,注意仅当媒体内容大于300K才会有回调 + @param errorBlock 失败的回调 + + @return 是否上传成功 + */ +- (BOOL)syncUploadMedia:(NSString *)fileName + mediaData:(NSData *)mediaData + mediaType:(WFCCMediaType)mediaType + success:(void(^)(NSString *remoteUrl))successBlock + progress:(void(^)(long uploaded, long total))progressBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取上传接口,用来上传大文件。只有专业版才支持,使用前先调用isSupportBigFilesUpload检查是否支持 + + @param fileName 文件名 + @param mediaType 媒体类型 + @param contentType Http的ContentType header,为空时默认为"application/octet-stream" + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getUploadUrl:(NSString *)fileName + mediaType:(WFCCMediaType)mediaType + contentType:(NSString *)contentType + success:(void(^)(NSString *uploadUrl, NSString *downloadUrl, NSString *backupUploadUrl, int type))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 是否支持大文件上传 + + @return YES支持大文件上传,调用getUploadUrl:getUploadUrl:success:error:方法获取到上传url,然后再在应用层上传。 + */ +- (BOOL)isSupportBigFilesUpload; + +/** + 删除本地消息 + + @param messageId 消息ID + @return 是否删除成功 + */ +- (BOOL)deleteMessage:(long)messageId; + + +/** + 批量删除本地消息 + + @param messageUids 消息UID列表 + @return 是否删除成功 + */ +- (BOOL)batchDeleteMessages:(NSArray *)messageUids; + +/** + 删除远端消息,仅专业版支持。 + + @param messageUid 消息UID + @param successBlock 删除成功 + @param errorBlock 删除失败 + */ +- (void)deleteRemoteMessage:(long long)messageUid + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 更新远端消息,仅专业版支持。 + + @discussion 客户端仅能更新自己发送的消息,更新的消息类型不能变,更新的消息类型是服务配置允许更新的内容。Server API更新则没有限制。 + + @param messageUid 消息UID + @param content 更新消息内容 + @param distribute 是否分发到其他客户端 + @param updateLocal 是否更新本地消息内容 + @param successBlock 删除成功 + @param errorBlock 删除失败 + */ +- (void)updateRemoteMessage:(long long)messageUid + content:(WFCCMessageContent *)content + distribute:(BOOL)distribute + updateLocal:(BOOL)updateLocal + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 删除会话中的消息 + + @param conversation 会话 + */ +- (void)clearMessages:(WFCCConversation *)conversation; + +/** + 删除会话中的before之前的旧消息。 + + @param conversation 会话,如果conversation为nil,则清除所有会话的消息。 + @param before 时间点,单位是毫秒 + */ +- (void)clearMessages:(WFCCConversation *)conversation before:(int64_t)before; + +/** + 删除会话中的消息,只保留最近指定条数的消息。 + + @param conversation 会话,如果conversation为nil,则清除所有会话的消息。 + @param keepCount 保留的条数 + */ +- (void)clearMessages:(WFCCConversation *)conversation keepLatest:(int)keepCount; + +/** + 删除指定用户指定时间段的消息 + + @param userId 指定用户 + @param start 消息开始时间,如果为0忽略开始时间 + @param end 消息结束时间,如果为0忽略结束时间 + */ +- (void)clearMessages:(NSString *)userId start:(int64_t)start end:(int64_t)end; + +/** + 删除所有消息。 + + @param removeConversation 是否同时删除会话信息 + */ +- (void)clearAllMessages:(BOOL)removeConversation; + +/** + 注册自定义消息类型 + + @param contentClass 自定义消息 + */ +- (void)registerMessageContent:(Class)contentClass; + +/** + 注册自定义消息flag。此方法仅供给uniapp使用。 + + @param contentType 自定义消息类型 + @param contentFlag 自定义消息flag + */ +- (void)registerMessageFlag:(int)contentType flag:(int)contentFlag; + +/** + 消息解码 + + @param payload 消息Payload + @return 消息内容 + */ +- (WFCCMessageContent *)messageContentFromPayload:(WFCCMessagePayload *)payload; + + +/** + 插入消息 + + @param conversation 会话 + @param content 消息内容 + @param status 消息状态,注意消息状态会影响消息方向 + @param serverTime 时间,0为当前时间 + @return 消息实体 + */ +- (WFCCMessage *)insert:(WFCCConversation *)conversation + sender:(NSString *)sender + content:(WFCCMessageContent *)content + status:(WFCCMessageStatus)status + notify:(BOOL)notify + toUsers:(NSArray *)toUsers + serverTime:(long long)serverTime; + +/** + 更新消息内容。只更新本地消息内容,无法更新服务器和远端。不支持聊天室消息,因为聊天室消息本地不存储。 + + @param messageId 消息ID + @param content 消息内容 + */ +- (void)updateMessage:(long)messageId + content:(WFCCMessageContent *)content; + +/** + 更新消息内容及时间。只更新本地消息内容,无法更新服务器和远端。不支持聊天室消息,因为聊天室消息本地不存储。 + + @param messageId 消息ID + @param content 消息内容 + @param timestamp 消息时间戳 + */ +- (void)updateMessage:(long)messageId + content:(WFCCMessageContent *)content + timestamp:(long long)timestamp; + +/** +更新消息状态,需要确保状态跟消息的方向相对应。一般情况下协议栈会自动处理好,不建议客户手动操作状态。。只更新本地消息内容,无法更新服务器和远端。 + +@param messageId 消息ID +@param status 消息状态 + +@return YES 更新成功。NO 消息不存在,或者状态与消息方向不匹配 +*/ +- (BOOL)updateMessage:(long)messageId status:(WFCCMessageStatus)status; + +/** + 插入消息。只插入到本地,无法更新服务器和远端。 + + @param message 待插入的消息 + @return 插入消息的id + */ +- (long)insertMessage:(WFCCMessage *)message; + +/** + 获取会话的消息数 + + @param conversation 会话。 + @return 会话的消息数。 + */ +- (int)getMessageCount:(WFCCConversation *)conversation; + +/** + 获取会话消息数量 + + @param conversationTypes 会话类型 + @param lines 默认传 @[@(0)] + @return 会话信息 + */ +- (int)getConversationMessageCount:(NSArray *)conversationTypes + lines:(NSArray *)lines; +#pragma mark - 用户相关 +/** + 获取用户信息 + @discussion refresh 为true会导致一次网络同步,代价特别大,应该尽量避免使用true,仅当在进入此人的单聊会话中时或者此人的用户信息页面使用一次true。 + + @param userId 用户ID + @param refresh 是否强制从服务器更新,如果本地没有或者强制,会从服务器刷新,然后发出通知kUserInfoUpdated。 + @return 本地的用户信息,可能为空 + */ +- (WFCCUserInfo *)getUserInfo:(NSString *)userId + refresh:(BOOL)refresh; + +/** + 获取用户信息 + @discussion 获取用户信息,如果在群中有群昵称也一并返回 + @discussion refresh 为true会导致一次网络同步,代价特别大,应该尽量避免使用true,仅当在进入此人的单聊会话中时或者此人的用户信息页面使用一次true。 + + @param userId 用户ID + @param groupId 群组ID + @param refresh 是否强制从服务器更新,如果本地没有或者强制,会从服务器刷新,然后发出通知kUserInfoUpdated。 + @return 本地的用户信息,可能为空 + */ +- (WFCCUserInfo *)getUserInfo:(NSString *)userId inGroup:(NSString *)groupId refresh:(BOOL)refresh; + +/** + 批量获取用户信息 + + @param userIds 用户ID列表 + @param groupId 群组ID + @return 本地的用户信息列表。本地不存在的用户会返回只有id的用户信息,同时会拉取。 + */ +- (NSArray *)getUserInfos:(NSArray *)userIds inGroup:(NSString *)groupId; + +/** + 搜索用户 + + @param keyword 关键词 + @param searchType 搜索类型 + @param page page + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)searchUser:(NSString *)keyword + searchType:(WFCCSearchUserType)searchType + page:(int)page + success:(void(^)(NSArray *machedUsers))successBlock + error:(void(^)(int errorCode))errorBlock; + +/** + 搜索用户 + + @param keyword 关键词 + @param domainId 域ID + @param searchType 搜索类型 + @param page page + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)searchUser:(NSString *)keyword + domain:(NSString *)domainId + searchType:(WFCCSearchUserType)searchType + page:(int)page + success:(void(^)(NSArray *machedUsers))successBlock + error:(void(^)(int errorCode))errorBlock; + +/** + 搜索用户 + + @param keyword 关键词 + @param domainId 域ID + @param searchType 搜索类型 + @param userType 用户类型 + @param page page + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)searchUser:(NSString *)keyword + domain:(NSString *)domainId + searchType:(WFCCSearchUserType)searchType + userType:(WFCCUserSearchUserType)userType + page:(int)page + success:(void(^)(NSArray *machedUsers))successBlock + error:(void(^)(int errorCode))errorBlock; + +/** + 获取用户信息 + @discussion refresh 为true会导致一次网络同步,代价特别大,应该尽量避免使用true,仅当在进入此人的单聊会话中时或者此人的用户信息页面使用true + + @param userId 用户ID + @param refresh 是否强制从服务器更新,如果本地没有或者强制,会从服务器刷新,然后发出通知kUserInfoUpdated。 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getUserInfo:(NSString *)userId + refresh:(BOOL)refresh + success:(void(^)(WFCCUserInfo *userInfo))successBlock + error:(void(^)(int errorCode))errorBlock; + +/** + 获取用户信息 + @discussion refresh 为true会导致一次网络同步,代价特别大,应该尽量避免使用true,仅当在进入此人的单聊会话中时或者此人的用户信息页面使用true + + @param userId 用户ID + @param groupId 群组ID,可以为nil + @param refresh 是否强制从服务器更新,如果本地没有或者强制,会从服务器刷新,然后发出通知kUserInfoUpdated。 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getUserInfo:(NSString *)userId + groupId:(NSString *)groupId + refresh:(BOOL)refresh + success:(void(^)(WFCCUserInfo *userInfo))successBlock + error:(void(^)(int errorCode))errorBlock; + +/** + 批量获取用户信息 + @discussion 当本地有部分或者全部不存在时,会从服务器加载这些缺失的用户信息。 + + @param userIds 用户ID列表 + @param groupId 群组ID,可以为nil + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getUserInfos:(NSArray *)userIds + groupId:(NSString *)groupId + success:(void(^)(NSArray *userInfo))successBlock + error:(void(^)(int errorCode))errorBlock; +#pragma mark - 好友相关 +/** + 查询用户和当前用户是否是好友关系 + + @param userId 用户ID + @return 是否是好友 + */ +- (BOOL)isMyFriend:(NSString *)userId; + +/** + 获取当前用户的好友列表 + + @param refresh 是否强制从服务器更新,如果不刷新则从本地缓存中读取 + @return 好友列表的用户ID + */ +- (NSArray *)getMyFriendList:(BOOL)refresh; + +/** + 获取当前用户的好友列表 + + @param refresh 是否强制从服务器更新,如果不刷新则从本地缓存中读取 + @return 好友列表 + */ +- (NSArray *)getFriendList:(BOOL)refresh; + +/** + 搜索好友 + @param keyword 关键词 + @return 好友用户信息 + */ +- (NSArray *)searchFriends:(NSString *)keyword; + +/** + 搜索群组 + @param keyword 关键词 + @return 群组搜索结果 + */ +- (NSArray *)searchGroups:(NSString *)keyword; + +/** + 获取收到的好友请求 + + @return 好友请求 + */ +- (NSArray *)getIncommingFriendRequest; + +/** + 获取发出的好友请求 + + @return 好友请求 + */ +- (NSArray *)getOutgoingFriendRequest; + +/** + 获取所有的好友请求 + + @return 好友请求 + */ +- (NSArray *)getAllFriendRequest; + +/** + 获取某一条好友请求记录 + @param uerId 对方用户ID + @param direction 0 发送的好友请求;1 收到的好友请求。 + + @return 好友请求 + */ +- (WFCCFriendRequest *)getFriendRequest:(NSString *)uerId direction:(int)direction; + +/** + 清理好友请求 + @param direction 好友请求的方向,0发送;1收到。 + @param beforeTime 清理时间之前的请求,单位是毫秒。如果清理所有用0 + + @return 返回true表示清理成功,返回false表示没有符合条件的请求 + */ +- (BOOL)clearFriendRequest:(int)direction beforeTime:(int64_t)beforeTime; + +/** + 删除好友请求 + @param direction 好友请求的方向,0发送;1收到。 + @param userId 用户ID + + @return 返回true表示删除成功,返回false表示找到请求 + */ +- (BOOL)deleteFriendRequest:(NSString *)userId direction:(int)direction; + +/** + 从服务器更新好友请求 + */ +- (void)loadFriendRequestFromRemote; + +/** + 获取未读的好友请求数 + + @return 未读的好友请求数 + */ +- (int)getUnreadFriendRequestStatus; + +/** + 清除好友请求的未读数 + */ +- (void)clearUnreadFriendRequestStatus; + +/** + 删除好友 + + @param userId 用户ID + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)deleteFriend:(NSString *)userId + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 发送好友请求 + + @param userId 用户ID + @param reason 请求说明 + @param extra 扩展信息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)sendFriendRequest:(NSString *)userId + reason:(NSString *)reason + extra:(NSString *)extra + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 处理好友请求 + + @param userId 用户ID + @param accpet 是否接受 + @param extra 附加信息,如果接受,附加信息会添加到好友附加信息中 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)handleFriendRequest:(NSString *)userId + accept:(BOOL)accpet + extra:(NSString *)extra + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +- (NSString *)getFriendAlias:(NSString *)friendId; + +- (void)setFriend:(NSString *)friendId + alias:(NSString *)alias + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +- (NSString *)getFriendExtra:(NSString *)friendId; +/** + 查询用户是否被加入黑名单 + + @param userId 用户ID + @return 是否被加入黑名单 + */ +- (BOOL)isBlackListed:(NSString *)userId; + +/** + 获取当前用户的黑名单列表 + + @param refresh 是否强制从服务器更新,如果不刷新则从本地缓存中读取 + @return 黑名单列表的用户ID + */ +- (NSArray *)getBlackList:(BOOL)refresh; + +/** + 设置黑名单 + + @param userId 用户ID + @param isBlackListed YES 加入黑名单; NO 取消黑名单 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)setBlackList:(NSString *)userId + isBlackListed:(BOOL)isBlackListed + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +#pragma mark - 群相关 +/** + 获取群成员信息 + @discussion refresh 为true会导致一次网络同步,代价特别大,应该尽量避免使用true,仅当在进入此人的群聊会话详情中时使用一次true。 + + @param groupId 群ID + @param refresh 是否强制从服务器更新,如果不刷新则从本地缓存中读取 + @return 群成员信息列表 + */ +- (NSArray *)getGroupMembers:(NSString *)groupId + forceUpdate:(BOOL)refresh; + +/** + 根据成员类型获取群成员信息 + + @param groupId 群ID + @param memberType 群成员类型 + @return 群成员信息列表 + */ +- (NSArray *)getGroupMembers:(NSString *)groupId + type:(WFCCGroupMemberType)memberType; + +/** + 获取指定数目群成员信息 + + @param groupId 群ID + @param count 群成员类型个数 + @return 群成员信息列表 + */ +- (NSArray *)getGroupMembers:(NSString *)groupId + count:(int)count; +/** + 获取群成员信息 + @discussion refresh 为true会导致一次网络同步,代价特别大,应该尽量避免使用true,仅当在进入此人的群聊会话详情中时使用一次true。 + + @param groupId 群ID + @param refresh 是否强制从服务器更新,如果不刷新则从本地缓存中读取 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getGroupMembers:(NSString *)groupId + refresh:(BOOL)refresh + success:(void(^)(NSString *groupId, NSArray *))successBlock + error:(void(^)(int errorCode))errorBlock; + +/** + 获取群信息 + @discussion refresh 为true会导致一次网络同步,代价特别大,应该尽量避免使用true,仅当在进入此人的群聊会话中时使用一次true。 + + @param groupId 群ID + @param refresh 是否强制从服务器更新,如果不刷新则从本地缓存中读取 + @return 群信息 + */ +- (WFCCGroupInfo *)getGroupInfo:(NSString *)groupId + refresh:(BOOL)refresh; + +/** + 批量获取群信息 + @discussion refresh 为true会导致一次网络同步,代价特别大,应该尽量避免使用true,仅当在进入此人的群聊会话中时使用一次true。 + + @param groupIds 群ID列表 + @param refresh 是否强制从服务器更新,如果不刷新则从本地缓存中读取 + @return 群信息 + */ +- (NSArray *)getGroupInfos:(NSArray *)groupIds + refresh:(BOOL)refresh; +/** + 获取群信息 + @discussion refresh 为true会导致一次网络同步,代价特别大,应该尽量避免使用true,仅当在进入此人的群聊会话中时使用一次true。 + + @param groupId 群ID + @param refresh 是否强制从服务器更新,如果不刷新则从本地缓存中读取 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getGroupInfo:(NSString *)groupId + refresh:(BOOL)refresh + success:(void(^)(WFCCGroupInfo *groupInfo))successBlock + error:(void(^)(int errorCode))errorBlock; +/** + 获取群成员信息 + + @param groupId 群ID + @param memberId 群成员ID + @return 群成员信息 + */ +- (WFCCGroupMember *)getGroupMember:(NSString *)groupId + memberId:(NSString *)memberId; + +/** + 创建群 + + @param groupId 群ID + @param groupName 群名称 + @param groupPortrait 群头像 + @param groupMembers 群成员 + @param notifyLines 默认传 @[@(0)] + @param notifyContent 通知消息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)createGroup:(NSString *)groupId + name:(NSString *)groupName + portrait:(NSString *)groupPortrait + type:(WFCCGroupType)type + groupExtra:(NSString *)groupExtra + members:(NSArray *)groupMembers + memberExtra:(NSString *)memberExtra + notifyLines:(NSArray *)notifyLines + notifyContent:(WFCCMessageContent *)notifyContent + success:(void(^)(NSString *groupId))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 添加群成员 + + @param members 成员的用户ID列表 + @param groupId 群ID + @param notifyLines 默认传 @[@(0)] + @param notifyContent 通知消息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)addMembers:(NSArray *)members + toGroup:(NSString *)groupId + memberExtra:(NSString *)memberExtra + notifyLines:(NSArray *)notifyLines + notifyContent:(WFCCMessageContent *)notifyContent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 踢出群成员 + + @param members 成员的用户ID列表 + @param groupId 群ID + @param notifyLines 默认传 @[@(0)] + @param notifyContent 通知消息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)kickoffMembers:(NSArray *)members + fromGroup:(NSString *)groupId + notifyLines:(NSArray *)notifyLines + notifyContent:(WFCCMessageContent *)notifyContent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 退群 + + @param groupId 群ID + @param notifyLines 默认传 @[@(0)] + @param notifyContent 通知消息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)quitGroup:(NSString *)groupId + notifyLines:(NSArray *)notifyLines + notifyContent:(WFCCMessageContent *)notifyContent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 退群 + + @param groupId 群ID + @param keepMessage 是否保留消息 + @param notifyLines 默认传 @[@(0)] + @param notifyContent 通知消息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)quitGroup:(NSString *)groupId + keepMessage:(BOOL)keepMessage + notifyLines:(NSArray *)notifyLines + notifyContent:(WFCCMessageContent *)notifyContent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 解散群 + + @param groupId 群ID + @param notifyLines 默认传 @[@(0)] + @param notifyContent 通知消息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)dismissGroup:(NSString *)groupId + notifyLines:(NSArray *)notifyLines + notifyContent:(WFCCMessageContent *)notifyContent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 修改群信息 + + @param groupId 群ID + @param type 要修改的群属性 + @param newValue 要修改的群属性值 + @param notifyLines 默认传 @[@(0)] + @param notifyContent 通知消息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)modifyGroupInfo:(NSString *)groupId + type:(ModifyGroupInfoType)type + newValue:(NSString *)newValue + notifyLines:(NSArray *)notifyLines + notifyContent:(WFCCMessageContent *)notifyContent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 修改自己的群昵称 + + @param groupId 群ID + @param newAlias 昵称 + @param notifyLines 默认传 @[@(0)] + @param notifyContent 通知消息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)modifyGroupAlias:(NSString *)groupId + alias:(NSString *)newAlias + notifyLines:(NSArray *)notifyLines + notifyContent:(WFCCMessageContent *)notifyContent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 修改群成员的昵称,群主可以修改所有人,群管理员可以修改普通成员的群昵称 + + @param groupId 群ID + @param newAlias 昵称 + @param notifyLines 默认传 @[@(0)] + @param notifyContent 通知消息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)modifyGroupMemberAlias:(NSString *)groupId + memberId:(NSString *)memberId + alias:(NSString *)newAlias + notifyLines:(NSArray *)notifyLines + notifyContent:(WFCCMessageContent *)notifyContent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 修改自己的群成员附加信息 + + @param groupId 群ID + @param extra 附加信息 + @param notifyLines 默认传 @[@(0)] + @param notifyContent 通知消息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)modifyGroupMemberExtra:(NSString *)groupId + extra:(NSString *)extra + notifyLines:(NSArray *)notifyLines + notifyContent:(WFCCMessageContent *)notifyContent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 修改群成员的附加信息,群主可以修改所有人,群管理员可以修改普通成员的附加信息 + + @param groupId 群ID + @param extra 附加信息 + @param notifyLines 默认传 @[@(0)] + @param notifyContent 通知消息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)modifyGroupMemberExtra:(NSString *)groupId + memberId:(NSString *)memberId + extra:(NSString *)extra + notifyLines:(NSArray *)notifyLines + notifyContent:(WFCCMessageContent *)notifyContent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; +/** + 转移群主 + + @param groupId 群ID + @param newOwner 群主的用户ID + @param notifyLines 默认传 @[@(0)] + @param notifyContent 通知消息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)transferGroup:(NSString *)groupId + to:(NSString *)newOwner + notifyLines:(NSArray *)notifyLines + notifyContent:(WFCCMessageContent *)notifyContent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 设置群管理 + + @param groupId 群ID + @param isSet 设置或取消 + @param memberIds 成员ID + @param notifyLines 默认传 @[@(0)] + @param notifyContent 通知消息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)setGroupManager:(NSString *)groupId + isSet:(BOOL)isSet + memberIds:(NSArray *)memberIds + notifyLines:(NSArray *)notifyLines + notifyContent:(WFCCMessageContent *)notifyContent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 设置群成员禁言,仅专业版支持 + + @param groupId 群ID + @param isSet 设置或取消 + @param memberIds 成员ID + @param notifyLines 默认传 @[@(0)] + @param notifyContent 通知消息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)muteGroupMember:(NSString *)groupId + isSet:(BOOL)isSet + memberIds:(NSArray *)memberIds + notifyLines:(NSArray *)notifyLines + notifyContent:(WFCCMessageContent *)notifyContent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 设置群成员允许名单,当设置群全局禁言时,仅群主/群管理/运行名单成员可以发言,仅专业版支持 + + @param groupId 群ID + @param isSet 设置或取消 + @param memberIds 成员ID + @param notifyLines 默认传 @[@(0)] + @param notifyContent 通知消息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)allowGroupMember:(NSString *)groupId + isSet:(BOOL)isSet + memberIds:(NSArray *)memberIds + notifyLines:(NSArray *)notifyLines + notifyContent:(WFCCMessageContent *)notifyContent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取群备注 + + @param groupId 群ID + @return 群备注 + */ +- (NSString *)getGroupRemark:(NSString *)groupId; + +/** + 设置群备注 + + @param groupId 群ID + @param remark 群备注 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)setGroup:(NSString *)groupId + remark:(NSString *)remark + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; +/** + 获取当前用户收藏的群组 + + @return 当前用户收藏的群组ID + */ +- (NSArray *)getFavGroups; + +/** + 是否是当前用户收藏的群组 + + @return 是否是当前用户收藏的群组 + */ +- (BOOL)isFavGroup:(NSString *)groupId; + +/** + 设置群组收藏状态 + + @param groupId 群组ID + @param fav 是否收藏 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)setFavGroup:(NSString *)groupId fav:(BOOL)fav success:(void(^)(void))successBlock error:(void(^)(int errorCode))errorBlock; +#pragma mark - 个人设置相关 +/** + 获取个人设置 + + @param scope 设置项的scope + @param key 设置项的key + @return 设置值 + */ +- (NSString *)getUserSetting:(UserSettingScope)scope + key:(NSString *)key; + +/** + 获取个人一类设置 + + @param scope 设置项的scope + @return scope对应的所有设置值 + */ +- (NSDictionary *)getUserSettings:(UserSettingScope)scope; + +/** + 设置个人设置项 + + @param scope 设置项的scope + @param key 设置项的key + @param value 值 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)setUserSetting:(UserSettingScope)scope + key:(NSString *)key + value:(NSString *)value + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 修改个人信息 + + @param values 信息 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + @discuss 性别属性是int类型,修改时需要转为字符串类型 + */ +-(void)modifyMyInfo:(NSDictionary *)values + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + + + +/** +是否全局静音 + +@return YES,当前用户全局静音;NO,没有全局静音 +*/ +- (BOOL)isGlobalSilent; + +/** +修改全局静音状态 + +@param silent 是否静音 +@param successBlock 成功的回调 +@param errorBlock 失败的回调 +*/ +- (void)setGlobalSilent:(BOOL)silent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** +是否实时音视频通知面打扰。服务器端2021.9.20后支持分别设置通知免打扰和实时音视频免打扰 + +@return YES,当前用户音视频不通知;NO,当前用户音视频通知 +*/ +- (BOOL)isVoipNotificationSilent; + +/** +修改实时音视频通知面打扰。服务器端2021.9.20后支持分别设置通知免打扰和实时音视频免打扰 + +@param silent 是否静音 +@param successBlock 成功的回调 +@param errorBlock 失败的回调 +*/ +- (void)setVoipNotificationSilent:(BOOL)silent + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** +是否开启草稿同步 + +@return YES,同步;NO,不同步 +*/ +- (BOOL)isEnableSyncDraft; + +/** +修改是否开启草稿同步 + +@param enable 是否同步 +@param successBlock 成功的回调 +@param errorBlock 失败的回调 +*/ +- (void)setEnableSyncDraft:(BOOL)enable + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** +获取免打扰时间 + + @param resultBlock 免打扰时间回调,时间为UTC 0点开始的分钟数,需要转换成当地时间。 + @param errorBlock 不存在时调用,error_code为-1 +*/ +- (void)getNoDisturbingTimes:(void(^)(int startMins, int endMins))resultBlock + error:(void(^)(int error_code))errorBlock; + +/** +修改免打扰时间 + +@param startMins 起始时间,一天中的分钟数,时间为UTC,需要转换成当地时间。 +@param endMins 结束时间,一天中的分钟数。可以小于startMins,如果小于表示隔夜。 +@param successBlock 成功的回调 +@param errorBlock 失败的回调 +*/ +- (void)setNoDisturbingTimes:(int)startMins + endMins:(int)endMins + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** +取消免打扰时间 + +@param successBlock 成功的回调 +@param errorBlock 失败的回调 +*/ +- (void)clearNoDisturbingTimes:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 当前时间是否是免打扰 + */ +- (BOOL)isNoDisturbing; + +/** +是否隐藏推送详情 + +@return YES,隐藏推送详情,提示“您收到一条消息”;NO,推送显示消息摘要 +*/ +- (BOOL)isHiddenNotificationDetail; + +/** +修改全局静音状态 + +@param hidden 是否静音 +@param successBlock 成功的回调 +@param errorBlock 失败的回调 +*/ +- (void)setHiddenNotificationDetail:(BOOL)hidden + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** +是否隐藏群组会话中群成员昵称显示 + +@return YES,群组会话中不显示群成员昵称;NO,显示 +*/ +- (BOOL)isHiddenGroupMemberName:(NSString *)groupId; + +/** +修改隐藏群组会话中群成员昵称显示状态 + +@param hidden 是否隐藏 +@param successBlock 成功的回调 +@param errorBlock 失败的回调 +*/ +- (void)setHiddenGroupMemberName:(BOOL)hidden + group:(NSString *)groupId + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取当前用户的所有群组,注意这个方法的代价比较大,不建议高频使用 + + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +-(void)getMyGroups:(void(^)(NSArray *groupIds))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取某个用户的共同群组,注意这个方法的代价比较大,不建议高频使用 + + @param userId 用户ID + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getCommonGroups:(NSString *)userId + success:(void(^)(NSArray *groupIds))successBlock + error:(void(^)(int error_code))errorBlock; + +/** +当前用户是否启用消息回执功能,仅专业版有效 + +@return YES,开启消息回执功能;NO,关闭个人的消息回执功能。 +@disscussion 仅当服务器开启这个功能才有效 +*/ +- (BOOL)isUserEnableReceipt; +/** +修改当前用户是否启用消息回执功能,仅专业版有效 + +@param enable 是否开启 +@param successBlock 成功的回调 +@param errorBlock 失败的回调 + @disscussion 仅当服务器开启这个功能才有效 +*/ +- (void)setUserEnableReceipt:(BOOL)enable + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取当前用户星标用户 + + @return 当前用户星标用户 + */ +- (NSArray *)getFavUsers; + +/** + 是否是星标用户 + + @return 是否是星标用户 + */ +- (BOOL)isFavUser:(NSString *)userId; + +/** + 设置星标用户 + + @param userId 用户ID + @param fav 是否星标 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)setFavUser:(NSString *)userId fav:(BOOL)fav success:(void(^)(void))successBlock error:(void(^)(int errorCode))errorBlock; +#pragma mark - 聊天室相关 +- (void)joinChatroom:(NSString *)chatroomId + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +- (void)quitChatroom:(NSString *)chatroomId + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +- (void)getChatroomInfo:(NSString *)chatroomId + upateDt:(long long)updateDt + success:(void(^)(WFCCChatroomInfo *chatroomInfo))successBlock + error:(void(^)(int error_code))errorBlock; + +- (void)getChatroomMemberInfo:(NSString *)chatroomId + maxCount:(int)maxCount + success:(void(^)(WFCCChatroomMemberInfo *memberInfo))successBlock + error:(void(^)(int error_code))errorBlock; + +- (NSString *)getJoinedChatroomId; + +#pragma mark - 频道相关 +- (void)createChannel:(NSString *)channelName + portrait:(NSString *)channelPortrait + desc:(NSString *)desc + extra:(NSString *)extra + success:(void(^)(WFCCChannelInfo *channelInfo))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取频道信息 + + @param channelId 频道ID + @param refresh 是否强制从服务器更新,如果不刷新则从本地缓存中读取 + @return 群信息 + */ +- (WFCCChannelInfo *)getChannelInfo:(NSString *)channelId + refresh:(BOOL)refresh; + +/** + 修改频道信息 + + @param channelId 群ID + @param type 要修改的群属性 + @param newValue 要修改的群属性值 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)modifyChannelInfo:(NSString *)channelId + type:(ModifyChannelInfoType)type + newValue:(NSString *)newValue + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 搜索频道 + + @param keyword 关键词 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)searchChannel:(NSString *)keyword success:(void(^)(NSArray *machedChannels))successBlock error:(void(^)(int errorCode))errorBlock; + +/** + 是否收听频道 + + @param channelId 频道ID + @return YES,收听;NO,未收听 + */ +- (BOOL)isListenedChannel:(NSString *)channelId; + +/** + 收听或者取消收听频道 + + @param channelId 频道ID + @param listen 是否收听 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)listenChannel:(NSString *)channelId listen:(BOOL)listen success:(void(^)(void))successBlock error:(void(^)(int errorCode))errorBlock; + +/** + 获取当前用户创建的频道 + + @return 当前用户创建的频道ID + */ +- (NSArray *)getMyChannels; + +/** + 获取当前用户收听的频道 + + @return 当前用户收听的频道ID + */ +- (NSArray *)getListenedChannels DEPRECATED_MSG_ATTRIBUTE("use getRemoteListenedChannels: instead"); + +/** + 获取当前用户收听的频道 + + @param successBlock 成功返回关注的频道id列表 + @param errorBlock 失败 + */ +- (void)getRemoteListenedChannels:(void(^)(NSArray *))successBlock error:(void(^)(int errorCode))errorBlock; + +/** + 销毁频道 + + @param channelId 频道ID + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)destoryChannel:(NSString *)channelId + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + + +#pragma mark - Mesh 接口 +/** + 获取域信息 + + @param domainId 域ID + @param refresh 是否从服务器刷新 + + @return 域信息 + */ +- (WFCCDomainInfo *)getDomainInfo:(NSString *)domainId refresh:(BOOL)refresh; +/** + 获取所有的域 + + @param successBlock 成功回调 + @param errorBlock 错误回调 + */ +- (void)getRemoteDomains:(void (^)(NSArray *))successBlock error:(void (^)(int))errorBlock; + +#pragma mark - Secret Chat 接口 +/** + 发起密聊 + + @param userId 对方用户ID + @param successBlock 成功的回调,回调返回密聊ID + @param errorBlock 失败的回调 + */ +- (void)createSecretChat:(NSString *)userId + success:(void(^)(NSString *targetId, int line))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 销毁密聊 + + @param targetId 密聊ID + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)destroySecretChat:(NSString *)targetId + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取密聊用户ID + + @param targetId 密聊ID + @return 密聊对方用户ID + */ +- (WFCCSecretChatInfo *)getSecretChatInfo:(NSString *)targetId; + +/** + 解密密聊会话中加密的媒体数据 + + @param targetId 密聊会话 + @param encryptData 密聊中的加密过的媒体数据,需要下载下来本地保存。 + + @return 解密过的数据,注意只放到内存中,不要保存。 + */ +- (NSData *)decodeSecretChat:(NSString *)targetId mediaData:(NSData *)encryptData; + +/** + 设置密聊会话阅后即焚时间 + + @param targetId 密聊会话 + @param millisecond 时间 + */ +- (void)setSecretChat:(NSString *)targetId burnTime:(int)millisecond; + + +/** + 当前系统是否支持密聊。 + + @return t是否支持密聊 + */ +- (BOOL)isEnableSecretChat; + +/** +当前用户是否启用密聊 + +@return YES,开启密聊功能;NO,关闭密聊功能。 +@disscussion 仅影响密聊的创建,已经创建的密聊不受影响 +*/ +- (BOOL)isUserEnableSecretChat; +/** +修改当前用户是否启用密聊功能 + +@param enable 是否开启 +@param successBlock 成功的回调 +@param errorBlock 失败的回调 +@disscussion 仅影响密聊的创建,已经创建的密聊不受影响 +*/ +- (void)setUserEnableSecretChat:(BOOL)enable + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** +当前用户是否开启添加好友需要验证,默认为开启 + +@return YES,需要验证;NO,不需验证 +*/ +- (BOOL)isAddFriendNeedVerify; +/** +修改当前用户是否开启添加好友需要验证功能 + +@param enable 是否开启 +@param successBlock 成功的回调 +@param errorBlock 失败的回调 +*/ +- (void)setAddFriendNeedVerify:(BOOL)enable + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; +#pragma mark - 其它接口 +/** +获取PC在线信息 + +@return PC端在线状态 +*/ +- (NSArray *)getPCOnlineInfos; + +/** +踢掉PC或者Web + +@param pcClientId PC或Web端的clientId +@param successBlock 成功的回调 +@param errorBlock 失败的回调 +*/ +- (void)kickoffPCClient:(NSString *)pcClientId + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + PC/Web在线时,是否停止通知 + + @return 是否停止通知 + */ +- (BOOL)isMuteNotificationWhenPcOnline; + +/** + 设置PC/Web在线时,手机是否默认静音。缺省值为YES,只有在IM服务配置server.mobile_default_silent_when_pc_online 为false时,才需要调用此函数设置为NO,此时静音状态意义翻转。其它请求千万不要调用此函数,否则会引起状态错乱。 + 设置当PC在线时是否通知的方法是 muteNotificationWhenPcOnline:success:error + + @param defaultSilent 缺省值是否为静音。 + */ +- (void)setDefaultSilentWhenPcOnline:(BOOL)defaultSilent; + +/** + 设置PC/Web在线时,是否发送通知 + + @param isMute 是否通知 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)muteNotificationWhenPcOnline:(BOOL)isMute + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取会话文件。conversation不为空时,获取该会话内的文件记录;当conversation为空时,获取用户收到的所有文件记录。 + + @param conversation 会话 + @param fromUser 该用户发送的文件,如果为空返回所有文件 + @param messageUid 起始记录的UID + @param order 文件列表排序 + @param count count + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getConversationFiles:(WFCCConversation *)conversation + fromUser:(NSString *)fromUser + beforeMessageUid:(long long)messageUid + order:(WFCCFileRecordOrder)order + count:(int)count + success:(void(^)(NSArray *files))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 获取当前用户发送的文件。 + + @param beforeMessageUid 起始记录的UID + @param order 文件列表排序 + @param count count + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)getMyFiles:(long long)beforeMessageUid + order:(WFCCFileRecordOrder)order + count:(int)count + success:(void(^)(NSArray *files))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 删除文件记录。发送者可以删除,另外如果在群里,群主和管理员也可以删除。 + + @param messageUid 起始记录的UID + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)deleteFileRecord:(long long)messageUid + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 搜索文件。conversation不为空时,搜索该会话内的文件记录;当conversation为空时,搜索用户收到的所有文件记录。 + + @param keyword 关键字 + @param conversation 会话 + @param fromUser 该用户发送的文件,如果为空返回所有文件 + @param messageUid 起始记录的UID + @param order 文件列表排序 + @param count count + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)searchFiles:(NSString *)keyword + conversation:(WFCCConversation *)conversation + fromUser:(NSString *)fromUser + beforeMessageUid:(long long)messageUid + order:(WFCCFileRecordOrder)order + count:(int)count + success:(void(^)(NSArray *files))successBlock + error:(void(^)(int error_code))errorBlock; + +/** + 搜索当前用户发送的文件。 + + @param keyword 关键字 + @param beforeMessageUid 起始记录的UID + @param order 文件列表排序 + @param count count + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + */ +- (void)searchMyFiles:(NSString *)keyword + beforeMessageUid:(long long)beforeMessageUid + order:(WFCCFileRecordOrder)order + count:(int)count + success:(void(^)(NSArray *files))successBlock + error:(void(^)(int error_code))errorBlock; + +/** +获取媒体文件授权访问地址 + +@param messageUid 消息Uid +@param mediaType 媒体类型 +@param mediaPath 媒体Path +@param successBlock 成功的回调,backupAuthorizedUrl仅当支持双网环境才有意义 +@param errorBlock 失败的回调 +*/ +- (void)getAuthorizedMediaUrl:(long long)messageUid + mediaType:(WFCCMediaType)mediaType + mediaPath:(NSString *)mediaPath + success:(void(^)(NSString *authorizedUrl, NSString *backupAuthorizedUrl))successBlock + error:(void(^)(int error_code))errorBlock; + + +/** +获取应用的auth code,用于应用的免密登录 + */ +- (void)getAuthCode:(NSString *)applicationId + type:(int)type + host:(NSString *)host + success:(void(^)(NSString *authCode))successBlock + error:(void(^)(int error_code))errorBlock; + +/** +config应用 + */ +- (void)configApplication:(NSString *)applicationId + type:(int)type + timestamp:(int64_t)timestamp + nonce:(NSString *)nonce + signature:(NSString *)signature + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; +/** +amr文件转成wav数据 + +@param amrPath amr文件路径 +@return wav数据 +*/ +- (NSData *)getWavData:(NSString *)amrPath; + +/** + 获取图片缩略图参数 + + @return 图片缩略图参数 + */ +- (NSString *)imageThumbPara; + + +/** + 开启数据库事务。注意:该方法仅仅在做数据迁移时使用,其它情况不要使用;另外开启成功后一定要注意commit,需要配对使用. + + @return 是否开启成功。 + */ +- (BOOL)beginTransaction; + +/** +提交数据库事务。注意:该方法仅仅在做数据迁移时使用,其它情况不要使用;需要跟beginTransaction配对使用 + +*/ +- (BOOL)commitTransaction; + +/** +回滚数据库事务。注意:该方法仅仅在做数据迁移时使用,其它情况不要使用;需要跟beginTransaction配对使用 + +*/ +- (BOOL)rollbackTransaction; + +/** + 是否是商业版IM服务。 + */ +- (BOOL)isCommercialServer; + +/** +是否支持已阅读报告 +*/ +- (BOOL)isReceiptEnabled; + +/** +群组是否支持已阅读报告 +*/ +- (BOOL)isGroupReceiptEnabled; + +/* + 是否应用关闭草稿同步功能 + */ +- (BOOL)isGlobalDisableSyncDraft; + +/* + 是否应用开启了Mesh功能 + */ +- (BOOL)isMeshEnabled; + +/* + 获取用户的在线状态 + */ +- (WFCCUserOnlineState *)getUserOnlineState:(NSString *)userId; + +- (WFCCUserCustomState *)getMyCustomState; + +- (void)setMyCustomState:(WFCCUserCustomState *)state + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +- (void)watchOnlineState:(WFCCConversationType)conversationType + targets:(NSArray *)targets + duration:(int)watchDuration + success:(void(^)(NSArray *states))successBlock + error:(void(^)(int error_code))errorBlock; + +- (void)unwatchOnlineState:(WFCCConversationType)conversationType + targets:(NSArray *)targets + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +- (BOOL)isEnableUserOnlineState; + +/* + 音视频会议相关 + */ +- (void)sendConferenceRequest:(long long)sessionId + room:(NSString *)roomId + request:(NSString *)request + data:(NSString *)data + success:(void(^)(NSString *authorizedUrl))successBlock + error:(void(^)(int error_code))errorBlock; + +- (void)sendConferenceRequest:(long long)sessionId + room:(NSString *)roomId + request:(NSString *)request + advanced:(BOOL)advanced + data:(NSString *)data + success:(void(^)(NSString *authorizedUrl))successBlock + error:(void(^)(int error_code))errorBlock; + +- (void)requireLock:(NSString *)lockId + duration:(NSUInteger)duration + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +- (void)releaseLock:(NSString *)lockId + success:(void(^)(void))successBlock + error:(void(^)(int error_code))errorBlock; + +- (void)postMomentsRequest:(NSString *)path data:(NSData *)data success:(void(^)(NSData *responseData))successBlock error:(void(^)(int error_code))errorBlock; +//内部调用,请勿使用 +- (void)putUseOnlineStates:(NSArray *)states; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCImageMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCImageMessageContent.h new file mode 100644 index 00000000..0f8f998f --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCImageMessageContent.h @@ -0,0 +1,53 @@ +// +// WFCCImageMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/2. +// Copyright © 2017年 wildfire chat. All rights reserved. +// + +#import "WFCCMediaMessageContent.h" +#import + +/** + 图片消息 + */ +@interface WFCCImageMessageContent : WFCCMediaMessageContent + +/** + 构造方法,会把Image存储到path中。 + + @param image 图片 + @param path 图片存储路径 + + @return 图片消息 + */ ++ (instancetype)contentFrom:(UIImage *)image cachePath:(NSString *)path; + +/** + 构造方法,会把Image存储到path中。 + + @param image 图片 + @param path 图片存储路径 + @param fullImage 是否发送原图 + + @return 图片消息 + */ ++ (instancetype)contentFrom:(UIImage *)image cachePath:(NSString *)path fullImage:(BOOL)fullImage; + +/** + 缩略图,自动生成 + */ +@property (nonatomic, strong)UIImage *thumbnail; + +/** + 图片尺寸 + */ +@property (nonatomic, assign)CGSize size; + +/** + 图片缩略图参数 + */ +@property (nonatomic, strong)NSString *thumbParameter; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCJoinCallRequestMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCJoinCallRequestMessageContent.h new file mode 100644 index 00000000..3fad1dcd --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCJoinCallRequestMessageContent.h @@ -0,0 +1,17 @@ +// +// WFCCJoinCallRequestMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + +/** + 通话正在进行消息 + */ +@interface WFCCJoinCallRequestMessageContent : WFCCMessageContent +@property (nonatomic, strong)NSString *callId; +@property (nonatomic, strong)NSString *clientId; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCJsonSerializer.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCJsonSerializer.h new file mode 100644 index 00000000..388dcaba --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCJsonSerializer.h @@ -0,0 +1,22 @@ +// +// WFCCJsonSerializer.h +// WFChatClient +// +// Created by Rain on 2022/5/31. +// Copyright © 2022 WildFireChat. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface WFCCJsonSerializer : NSObject +//子类需要实现此方法 +- (id)toJsonObj; + +//子类不要实现此方法 +- (NSString *)toJsonStr; +- (void)setDict:(NSMutableDictionary *)dict key:(NSString *)key longlongValue:(long long)longValue; +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCKickoffGroupMemberNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCKickoffGroupMemberNotificationContent.h new file mode 100644 index 00000000..78e3d2f6 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCKickoffGroupMemberNotificationContent.h @@ -0,0 +1,31 @@ +// +// WFCCKickoffGroupMemberNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/20. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 群组踢人的通知消息 + */ +@interface WFCCKickoffGroupMemberNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 操作者ID + */ +@property (nonatomic, strong)NSString *operateUser; + +/** + 被踢成员的ID列表 + */ +@property (nonatomic, strong)NSArray *kickedMembers; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCKickoffGroupMemberVisibleNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCKickoffGroupMemberVisibleNotificationContent.h new file mode 100644 index 00000000..620230f0 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCKickoffGroupMemberVisibleNotificationContent.h @@ -0,0 +1,31 @@ +// +// WFCCKickoffGroupMemberNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/20. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 群组踢人的通知消息 + */ +@interface WFCCKickoffGroupMemberVisibleNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 操作者ID + */ +@property (nonatomic, strong)NSString *operateUser; + +/** + 被踢成员的ID列表 + */ +@property (nonatomic, strong)NSArray *kickedMembers; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCLeaveChannelChatMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCLeaveChannelChatMessageContent.h new file mode 100644 index 00000000..b4784d5b --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCLeaveChannelChatMessageContent.h @@ -0,0 +1,17 @@ +// +// WFCCLeaveChannelChatMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + + +/** + 进入频道会话消息 + */ +@interface WFCCLeaveChannelChatMessageContent : WFCCMessageContent + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCLinkMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCLinkMessageContent.h new file mode 100644 index 00000000..5c162235 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCLinkMessageContent.h @@ -0,0 +1,36 @@ +// +// WFCCLinkMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + +/** + 链接消息 + */ +@interface WFCCLinkMessageContent : WFCCMessageContent + +/** + 链接标题 + */ +@property (nonatomic, strong)NSString *title; + +/** + 内容摘要 + */ +@property (nonatomic, strong)NSString *contentDigest; + +/** + 链接地址 + */ +@property (nonatomic, strong)NSString *url; + +/** + 链接图片地址 + */ +@property (nonatomic, strong)NSString *thumbnailUrl; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCLocationMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCLocationMessageContent.h new file mode 100644 index 00000000..26451cd3 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCLocationMessageContent.h @@ -0,0 +1,45 @@ +// +// WFCCTextMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" +#import +#import + +/** + 位置消息 + */ +@interface WFCCLocationMessageContent : WFCCMessageContent + +/** + 构造消息 + + @param coordinate 坐标值 + @param title 位置信息 + @param thumbnail 缩略图 + @return 位置消息 + */ ++ (instancetype)contentWith:(CLLocationCoordinate2D) coordinate + title:(NSString *)title + thumbnail:(UIImage *)thumbnail; + +/** + 位置坐标 + */ +@property (nonatomic, assign)CLLocationCoordinate2D coordinate; + +/** + 位置信息 + */ +@property (nonatomic, strong)NSString *title; + +/** + 缩略图 + */ +@property (nonatomic, strong)UIImage *thumbnail; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCMediaMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCMediaMessageContent.h new file mode 100644 index 00000000..9b419bc9 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCMediaMessageContent.h @@ -0,0 +1,25 @@ +// +// WFCCMediaMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/6. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + +/** + 媒体消息 + */ +@interface WFCCMediaMessageContent : WFCCMessageContent + +/** + 媒体内容的本地存储路径 + */ +@property (nonatomic, strong)NSString *localPath; + +/** + 媒体内容的服务器路径 + */ +@property (nonatomic, strong)NSString *remoteUrl; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCMessage.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCMessage.h new file mode 100644 index 00000000..0c60ddd9 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCMessage.h @@ -0,0 +1,103 @@ +// +// WFCCMessage.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import +#import "WFCCConversation.h" +#import "WFCCMessageContent.h" +#import "WFCCJsonSerializer.h" +#import "WFCCProtocol.h" +/** + 消息方向 + + - MessageDirection_Send: 发送 + - MessageDirection_Receive: 接收 + */ +typedef NS_ENUM(NSInteger, WFCCMessageDirection) { + MessageDirection_Send, + MessageDirection_Receive +}; + +/** + 消息状态 + + - Message_Status_Sending: 发送中 + - Message_Status_Sent: 发送成功 + - Message_Status_Send_Failure: 发送失败 + - Message_Status_Unread: 未读 + - Message_Status_Readed: 已读 + - Message_Status_Played: 已播放(媒体消息) + */ +typedef NS_ENUM(NSInteger, WFCCMessageStatus) { + Message_Status_Sending, + Message_Status_Sent, + Message_Status_Send_Failure, + Message_Status_Mentioned, + Message_Status_AllMentioned, + Message_Status_Unread, + Message_Status_Readed, + Message_Status_Played +}; + +/** + 消息实体 + */ +@interface WFCCMessage : WFCCJsonSerializer + +/** + 消息ID,当前用户本地唯一 + */ +@property (nonatomic, assign)long messageId; + +/** + 消息UID,所有用户全局唯一 + */ +@property (nonatomic, assign)long long messageUid; + +/** + 消息所属的会话 + */ +@property (nonatomic, strong)WFCCConversation *conversation; + +/** + 消息发送者的用户ID + */ +@property (nonatomic, strong)NSString * fromUser; + +/** + 消息在会话中定向发送给该用户的 + */ +@property (nonatomic, strong)NSArray *toUsers; + +/** + 消息内容 + */ +@property (nonatomic, strong)WFCCMessageContent *content; + +/** + 消息方向 + */ +@property (nonatomic, assign)WFCCMessageDirection direction; + +/** + 消息状态 + */ +@property (nonatomic, assign)WFCCMessageStatus status; + +/** + 消息的发送时间 + */ +@property (nonatomic, assign)long long serverTime; + +/** + 消息本地附加信息 + */ +@property (nonatomic, strong)NSString * localExtra; + +- (NSString *)digest; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCMessageContent.h new file mode 100644 index 00000000..242fd434 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCMessageContent.h @@ -0,0 +1,193 @@ +// +// WFCCMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/15. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" +/** + 媒体类型 + + - Media_Type_GENERAL: 一般 + - Media_Type_IMAGE: 图片 + - Media_Type_VOICE: 语音 + - Media_Type_VIDEO: 视频 + - Media_Type_File: 文件 + - Media_Type_PORTRAIT: 头像 + - Media_Type_FAVORITE: 收藏 + - Media_Type_STICKER:动态表情 + - Media_Type_MOMENTS:朋友圈 + */ +typedef NS_ENUM(NSInteger, WFCCMediaType) { + Media_Type_GENERAL = 0, + Media_Type_IMAGE = 1, + Media_Type_VOICE = 2, + Media_Type_VIDEO = 3, + Media_Type_FILE = 4, + Media_Type_PORTRAIT = 5, + Media_Type_FAVORITE = 6, + Media_Type_STICKER = 7, + Media_Type_MOMENTS = 8 +}; + + +/** + 消息存储类型 + + - NOT_PERSIST: 本地不存储 + - PERSIST: 本地存储 + - PERSIST_AND_COUNT: 本地存储,并计入未读计数 + - TRANSPARENT: 透传消息,不多端同步,如果对端不在线,消息会丢弃 + */ +typedef NS_ENUM(NSInteger, WFCCPersistFlag) { + WFCCPersistFlag_NOT_PERSIST = 0, + WFCCPersistFlag_PERSIST = 1, + WFCCPersistFlag_PERSIST_AND_COUNT = 3, + WFCCPersistFlag_TRANSPARENT = 4, +}; + +/** + 普通消息的持久化内容 + */ +@interface WFCCMessagePayload : WFCCJsonSerializer + +/** + 消息类型 + */ +@property (nonatomic, assign)int contentType; + +/** + 搜索内容 + */ +@property (nonatomic, strong)NSString *searchableContent; + +/** + 推送内容 +*/ +@property (nonatomic, strong)NSString *pushContent; +/** + 推送数据 +*/ +@property (nonatomic, strong)NSString *pushData; + +/** + 内容 + */ +@property (nonatomic, strong)NSString *content; + +/** + 内容流 + */ +@property (nonatomic, strong)NSData *binaryContent; + +/** + 只存储在客户端本地的内容 + */ +@property (nonatomic, strong)NSString *localContent; + +/** + 提醒类型,1,提醒部分对象(mentinedTarget)。2,提醒全部。其他不提醒 + */ +@property (nonatomic, assign)int mentionedType; + +/** + 提醒对象,mentionedType 1时有效 + */ +@property (nonatomic, strong)NSArray *mentionedTargets; + +/** + 附加信息 + */ +@property (nonatomic, strong)NSString *extra; + +/** + 本地信息,用于消息未从服务器下载下来。 + */ +@property (nonatomic, assign)BOOL notLoaded; +@end + +/** + 媒体消息的持久化内容 + */ +@interface WFCCMediaMessagePayload : WFCCMessagePayload + +/** + 媒体类型 + */ +@property (nonatomic, assign)WFCCMediaType mediaType; + +/** + 媒体内容的服务器URL + */ +@property (nonatomic, strong)NSString *remoteMediaUrl; + +/** + 媒体内容的本地URL,发送消息时不会携带,用于缓存加速显示 + */ +@property (nonatomic, strong)NSString *localMediaPath; + +@end + +@class WFCCMessage; +@class WFCCDictionary; +/** + 消息协议,所有消息(包括自定义消息均需要实现此协议) + */ +@protocol WFCCMessageContent + +/** + 消息编码 + + @return 消息的持久化内容 + */ +- (WFCCMessagePayload *)encode; + +/** + 消息解码 + + @param payload 消息的持久化内容 + */ +- (void)decode:(WFCCMessagePayload *)payload; + +/** + 消息类型,必须全局唯一。1000及以下为系统内置类型,自定义消息需要使用1000以上。 + + @return 消息类型的唯一值 + */ ++ (int)getContentType; + +/** + 消息的存储策略 + + @return 存储策略 + */ ++ (int)getContentFlags; + +/** + 消息的简短信息 + + @return 消息的简短信息,主要用于通知提示和会话列表等需要简略信息的地方。 + */ +- (NSString *)digest:(WFCCMessage *)message; +@end + +/** + 消息内容,自定义消息可以继承此类 + */ +@interface WFCCMessageContent : NSObject + +/** + 附加信息 + */ +@property (nonatomic, strong)NSString *extra; + +/** + 本地信息,用于消息未从服务器下载下来。 + */ +@property (nonatomic, assign)BOOL notLoaded; + +- (NSArray *)getArray:(WFCCDictionary *)dict ofKey:(NSString *)key; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCModifyGroupAliasNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCModifyGroupAliasNotificationContent.h new file mode 100644 index 00000000..d645b490 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCModifyGroupAliasNotificationContent.h @@ -0,0 +1,36 @@ +// +// WFCCModifyGroupAliasNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/20. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 群成员修改群昵称的通知消息 + */ +@interface WFCCModifyGroupAliasNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 操作者用户ID + */ +@property (nonatomic, strong)NSString *operateUser; + +/** + 群昵称 + */ +@property (nonatomic, strong)NSString *alias; + +/** + 被修改昵称的用户,如果为空为修改operator的群昵称。 + */ +@property (nonatomic, strong)NSString *memberId; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCModifyGroupExtraNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCModifyGroupExtraNotificationContent.h new file mode 100644 index 00000000..9023b929 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCModifyGroupExtraNotificationContent.h @@ -0,0 +1,30 @@ +// +// WFCCModifyGroupExtraNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/20. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 群成员修改群附加信息的通知消息 + */ +@interface WFCCModifyGroupExtraNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 操作者用户ID + */ +@property (nonatomic, strong)NSString *operateUser; + +/** + 群成员附加信息 + */ +@property (nonatomic, strong)NSString *groupExtra; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCModifyGroupMemberExtraNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCModifyGroupMemberExtraNotificationContent.h new file mode 100644 index 00000000..0f55321b --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCModifyGroupMemberExtraNotificationContent.h @@ -0,0 +1,36 @@ +// +// WFCCModifyGroupMemberExtraNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/20. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 群成员修改群附加信息的通知消息 + */ +@interface WFCCModifyGroupMemberExtraNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 操作者用户ID + */ +@property (nonatomic, strong)NSString *operateUser; + +/** + 群成员附加信息 + */ +@property (nonatomic, strong)NSString *groupMemberExtra; + +/** + 被修改昵称的用户,如果为空为修改operator的群昵称。 + */ +@property (nonatomic, strong)NSString *memberId; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCMultiCallOngoingMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCMultiCallOngoingMessageContent.h new file mode 100644 index 00000000..647fdb59 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCMultiCallOngoingMessageContent.h @@ -0,0 +1,20 @@ +// +// WFCCMultiCallOngoingMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + +/** + 通话正在进行消息 + */ +@interface WFCCMultiCallOngoingMessageContent : WFCCMessageContent +@property (nonatomic, strong)NSString *callId; +@property (nonatomic, strong)NSString *initiator; +@property (nonatomic, assign)BOOL audioOnly; +@property (nonatomic, strong)NSArray *targetIds; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCNetworkService.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCNetworkService.h new file mode 100644 index 00000000..d4700d78 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCNetworkService.h @@ -0,0 +1,519 @@ +// +// WFCCNetworkService.h +// WFChatClient +// +// Created by heavyrain on 2017/11/5. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#ifndef WFCCNetworkService_h +#define WFCCNetworkService_h + +#import +#import "WFCCMessage.h" +#import "WFCCReadReport.h" +#import "WFCCDeliveryReport.h" + +extern const NSString *SDKVERSION; +#pragma mark - 通知定义 +//群组信息更新通知 +extern NSString *kGroupInfoUpdated; +//群组成员更新通知 +extern NSString *kGroupMemberUpdated; +//用户信息更新通知 +extern NSString *kUserInfoUpdated; +//好友列表更新通知 +extern NSString *kFriendListUpdated; +//好友请求信息更新通知 +extern NSString *kFriendRequestUpdated; +//设置更新通知 +extern NSString *kSettingUpdated; +//频道信息更新通知 +extern NSString *kChannelInfoUpdated; +//用户在线状态更新通知 +extern NSString *kUserOnlineStateUpdated; +//密聊状态更新通知 +extern NSString *kSecretChatStateUpdated; +//密聊消息阅后即焚开始计时 +extern NSString *kSecretMessageStartBurning; +//密聊消息阅后即焚完成 +extern NSString *kSecretMessageBurned; +//域信息更新通知 +extern NSString *kDomainInfoUpdated; + +#pragma mark - 枚举值定义 +/** + 连接状态 + + - kConnectionStatusTimeInconsistent 服务器和客户端时间相差太大 + - kConnectionStatusNotLicensed 专业版IM服务没有授权或者授权过期,社区版不会有此状态 + - kConnectionStatusKickedoff 多端登录被迫下线。 + - kConnectionStatusSecretKeyMismatch 密钥错误 + - kConnectionStatusTokenIncorrect Token错误 + - kConnectionStatusServerDown 服务器关闭 + - kConnectionStatusRejected: 被拒绝 + - kConnectionStatusLogout: 退出登录 + - kConnectionStatusUnconnected: 未连接 + - kConnectionStatusConnecting: 连接中 + - kConnectionStatusConnected: 已连接 + - kConnectionStatusReceiving: 正在与服务同步数据中 + */ +typedef NS_ENUM(NSInteger, ConnectionStatus) { + kConnectionStatusTimeInconsistent = -9, + kConnectionStatusNotLicensed = -8, + //错误码kConnectionStatusKickedoff是IM服务2021.9.15之后的版本才支持,并且打开服务器端开关server.client_support_kickoff_event + kConnectionStatusKickedoff = -7, + kConnectionStatusSecretKeyMismatch = -6, + kConnectionStatusTokenIncorrect = -5, + kConnectionStatusServerDown = -4, + kConnectionStatusRejected = -3, + kConnectionStatusLogout = -2, + kConnectionStatusUnconnected = -1, + kConnectionStatusConnecting = 0, + kConnectionStatusConnected = 1, + kConnectionStatusReceiving = 2 +}; + + +/** + 在双网环境中,获取当前连接的网络类型。仅当长连接建立时是准确的。如果长连接未建立,此值为上一次长连接建立时的值 + + - kConnectedNetworkType_Main 连接到主网络 + - kConnectedNetworkType_Backup 连接到备网络 + - kConnectedNetworkType_Unknown 未知 + + */ +typedef NS_ENUM(NSInteger, ConnectedNetworkType) { + kConnectedNetworkType_Main = 1, + kConnectedNetworkType_Unknown = 0, + kConnectedNetworkType_Backup = -1, +}; + +/** +平台枚举值 + + //Platform_Android = 2, + //Platform_Windows = 3, + //Platform_OSX = 4, + //Platform_WEB = 5, + //Platform_WX = 6, + //Platform_Linux = 7, + //Platform_iPad = 8, + //Platform_APad = 9, +*/ +#define Platform_iOS 1 +#define Platform_iPad 8 + + +#pragma mark - 连接状态&消息监听 +/** + 连接状态的监听 + */ +@protocol ConnectionStatusDelegate + +/** + 连接状态变化的回调 + + @param status 连接状态 + */ +- (void)onConnectionStatusChanged:(ConnectionStatus)status; + +@end + +/** + 连接状态的监听 + */ +@protocol ConnectToServerDelegate + +/** + 开始连接到服务器的回调 + + @param host 服务Host + @param ip 服务ip + @param port 服务端口 + */ +- (void)onConnectToServer:(NSString *)host ip:(NSString *)ip port:(int)port; + +/** + 成功连接到服务器的回调 + + @param host 服务Host + @param ip 服务ip + @param port 服务端口 + @param mainNw 是否是主网 + */ +- (void)onConnected:(NSString *)host ip:(NSString *)ip port:(int)port mainNw:(BOOL)mainNw; + +@end + +/** + 网络流量使用监听 + */ +@protocol TrafficDataDelegate + +/** + 网络产生流量的回调 + + @param send 发送的字节数 + @param recv 收到的字节数 + */ +- (void)onTrafficData:(int64_t)send recv:(int64_t)recv; + +@end + +/** + 消息接收的监听 + */ +@protocol ReceiveMessageDelegate + +/** + 接收消息的回调 + + @param messages 收到的消息 + @param hasMore 是否还有待接受的消息,UI可以根据此参数决定刷新的时机 + */ +- (void)onReceiveMessage:(NSArray *)messages hasMore:(BOOL)hasMore; + +@optional +- (void)onRecallMessage:(long long)messageUid; +- (void)onDeleteMessage:(long long)messageUid; + +/** +消息已送达到目标用户的回调 + +@param delivereds 送达报告 +*/ + +- (void)onMessageDelivered:(NSArray *)delivereds; + +/** +消息已读的监听 +*/ +- (void)onMessageReaded:(NSArray *)readeds; +@end + +/** + 接收消息前的拦截Filter + */ +@protocol ReceiveMessageFilter + +/** + 是否拦截收到的消息 + + @param message 消息 + @return 是否拦截,如果拦截该消息,则ReceiveMessageDelegate回调不会再收到此消息 + */ +- (BOOL)onReceiveMessage:(WFCCMessage *)message; +@end + +/** + 会议事件的监听 + */ +@protocol ConferenceEventDelegate + +/** + 会议事件的回调 + + @param event 事件 + */ +- (void)onConferenceEvent:(NSString *)event; +@end + +@class WFCCUserOnlineState; +/** + 在线事件的监听 + */ +@protocol OnlineEventDelegate + +/** + 在线事件的回调 + + @param events 事件 + */ +- (void)onOnlineEvent:(NSArray *)events; +@end + +@class WFCCUserInfo; +@class WFCCGroupInfo; +/** + 默认头像提供者 + */ +@protocol WFCCDefaultPortraitProvider +/** + 获取用户的默认头像链接 + + @param userInfo 用户信息 + @return 返回此用户的默认头像 + */ +- (NSString *)userDefaultPortrait:(WFCCUserInfo *)userInfo; + +/** + 获取群组的默认头像链接 + + @param groupInfo 群组信息 + @param memberInfos 群成员用户信息,只用前9名,可以只传入9名成员 + @return 返回此用户的默认头像 + */ +- (NSString *)groupDefaultPortrait:(WFCCGroupInfo *)groupInfo memberInfos:(NSArray *)memberInfos; +@end + +/** + 链接地址转换器,用于双网环境下媒体资源和头像等在不同网络下的转换 + */ +@protocol WFCCUrlRedirector +- (NSString *)redirect:(NSString *)originalUrl; +@end + + +#pragma mark - 连接服务 +/** + 连接服务 + */ +@interface WFCCNetworkService : NSObject + +/** + 连接服务单例 + + @return 连接服务单例 + */ ++ (WFCCNetworkService *)sharedInstance; + +/** + 连接状态监听 + */ +@property(nonatomic, weak) id connectionStatusDelegate; + +/** + 连接到服务监听 + */ +@property(nonatomic, weak) id connectToServerDelegate; + +/** + 网络流量监听 + */ +@property(nonatomic, weak) id trafficDataDelegate; + +/** + 消息接收监听 + */ +@property(nonatomic, weak) id receiveMessageDelegate; + +/** +会议事件监听 +*/ +@property(nonatomic, weak) id conferenceEventDelegate; + +/** +在线事件监听 +*/ +@property(nonatomic, weak) id onlineEventDelegate; + +/** + 默认头像提供者 + */ +@property(nonatomic, weak)id defaultPortraitProvider; + +/** + 双网地址转换器 + */ +@property(nonatomic, strong)id urlRedirector; + +/** + 当前是否处于登录状态 + */ +@property(nonatomic, assign, getter=isLogined, readonly)BOOL logined; + +/** + 当前的连接状态 + */ +@property(nonatomic, assign, readonly)ConnectionStatus currentConnectionStatus; + +/** + 当前登录的用户ID + */ +@property (nonatomic, strong, readonly)NSString *userId; + +/** + 服务器时间与本地时间的差值 + */ +@property(nonatomic, assign, readonly)long long serverDeltaTime; + +/** + 当前服务是否连接到了主网络 + */ +@property (nonatomic, assign, readonly)BOOL connectedToMainNetwork; + +/** + 发送日志命令 + */ +@property (nonatomic, strong)NSString *sendLogCommand; + +/** + 开启Log + */ ++ (void)startLog; + +/** + 停止Log + */ ++ (void)stopLog; + +/** +获取日志文件路径 +*/ ++ (NSArray *)getLogFilesPath; + +/* + 使用国密加密。注意必须和服务器同时配置,否则无法连接。 + */ +- (void)useSM4; + +/* + 使用AES256加密。注意必须和服务器同时配置,否则无法连接。 + */ +- (void)useAES256; + +/* + 使用TCP的短连接。需要专业版IM服务支持。 + */ +- (void)useTcpShortLink; + +/* + 是否使用TCP的短连接。需要专业版IM服务支持。 + */ +- (BOOL)isTcpShortLink; + +/* + 不使用FTS搜索。仅在connect之前调用有效。 + */ +- (void)noUseFts; +/** + 设置Lite模式。 + Lite模式下,协议栈不存储数据库,不同步所有信息,只能收发消息,接收消息只接收连接以后发送的消息。 + 此函数只能在connect之前调用。 + + @param isLiteMode 是否Lite模式 + */ +- (void)setLiteMode:(BOOL)isLiteMode; + +/** + 设置心跳时间,默认为270秒,可以设置为30-300之间的秒数。 + */ +- (void)setHeartBeatInterval:(int)second; + +/** + 获取客户端id + + @return 客户端ID + */ +- (NSString *)getClientId; + +/** + 连接服务器,需要注意token跟clientId是强依赖的,一定要调用getClientId获取到clientId,然后用这个clientId获取token,这样connect才能成功,如果随便使用一个clientId获取到的token将无法链接成功。另外不能多次connect,如果需要切换用户请先disconnect,然后3秒钟之后再connect(如果是用户手动登录可以不用等,因为用户操作很难3秒完成,如果程序自动切换请等3秒) + + @param userId 用户Id + @param token 密码 + + @return 返回上一次活动时间。如果间隔时间较长,可以加个第一次登录的等待提示界面,在等待时同步所有的用户信息/群组信息/频道信息等。 + */ +- (int64_t)connect:(NSString *)userId token:(NSString *)token; + +/** + 断开连接 + + @param disablePush 是否停止推送,clearSession为YES时无意义。如果为true,session会变成disable状态,token会失效,必须重新获取token才能登录。 + @param clearSession 是否清除Session信息,如果清除本地历史消息将全部清除,且token失效无法再次登录,必须重新获取token才能进行登录。 + */ +- (void)disconnect:(BOOL)disablePush clearSession:(BOOL)clearSession; + +/** + 设置服务器地址信息。host可以是IP,可以是域名。如果IM服务是专业版IM服务,需要设置为IM服务绑定的地址。 + + @param host 服务器地址 + */ +- (void)setServerAddress:(NSString *)host; + +/** + 设置当前设备的device token + + @param token 苹果APNs Device Token + */ +- (void)setDeviceToken:(NSString *)token; + +/** + 设置当前设备的device token,可以指定推送类型,用来对接个推、极光等第三方推送。 + + @param token 苹果APNs Device Token + @param pushType 推送类型 + */ +- (void)setDeviceToken:(NSString *)token pushType:(int)pushType; + +/** + 设置当前设备的Voip device token + + @param token 苹果APNs Device Token + */ +- (void)setVoipDeviceToken:(NSString *)token; + +/** + 添加消息拦截Filter + + @param filter 消息拦截Filter + */ +- (void)addReceiveMessageFilter:(id)filter; + +/** + 移除消息拦截Filter + + @param filter 消息拦截Filter + */ +- (void)removeReceiveMessageFilter:(id)filter; + +/** + 应用已经login且在后台的情况下,强制进行连接,确保后台连接5秒钟,用于voip推送后台刷新等场景。 + 应用在前台情况下,此方法无效。 + */ +- (void)forceConnect:(NSUInteger)second; + +- (void)cancelForceConnect; + +/* + 设置备选服务地址,仅专业版支持,一般用于政企单位内外网两种网络环境。请参考:https://docs.wildfirechat.cn/blogs/政企内外双网解决方案.html + */ +- (void)setBackupAddressStrategy:(int)strategy; +- (void)setBackupAddress:(NSString *)host port:(int)port; +- (ConnectedNetworkType)getConnectedNetworkType; + +/* + 设置协议栈短连接User agent。 + + @param userAgent User agent + */ +- (void)setProtoUserAgent:(NSString *)userAgent; + +/* + 添加协议栈短连接自定义header,value为空时清除该header。 + + @param header header + @param value value + */ +- (void)addHttpHeader:(NSString *)header value:(NSString *)value; + +/* + 设置代理,注意只能支持socks5代理,http代理无法支持,只有专业版支持次功能。 + + @param host 代理服务域名,host和ip至少要有一个有效值。 + @param ip 代理服务IP地址,host和ip至少要有一个有效值。 + @param port 代理服务端口 + @param username 账户 + @param password 密码 + */ +- (void)setProxyInfo:(NSString *)host ip:(NSString *)ip port:(int)port username:(NSString *)username password:(NSString *)password; + +/** + 获取协议栈版本 + */ +- (NSString *)getProtoRevision; +@end + +#endif diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCNotDeliveredMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCNotDeliveredMessageContent.h new file mode 100644 index 00000000..7ef1aaab --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCNotDeliveredMessageContent.h @@ -0,0 +1,59 @@ +// +// WFCCNotDeliveredMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + + +/** + 没有送达消息 + */ +@interface WFCCNotDeliveredMessageContent : WFCCNotificationMessageContent +/** + 请求的类型,1是发送消息,2撤回消息,3 + */ +@property(nonatomic, assign)int type; +/** + 发送的消息ID + */ +@property(nonatomic, assign)int64_t messageUid; + +/** + 是全部失败,还是部分失败 + */ +@property(nonatomic, assign)BOOL allFailure; + +/** + 当部分失败时,失败的用户id列表 + */ +@property(nonatomic, strong)NSArray *userIds; + +/** + 归属IM服务请求桥接服务出现的错误,有可能是桥接服务没有配置,或者不可用。 + */ +@property(nonatomic, assign)int localImErrorCode; + +/** + 归属桥接服务出现的错误 + */ +@property(nonatomic, assign)int localBridgeErrorCode; + +/** + 远端桥接服务出现的错误 + */ +@property(nonatomic, assign)int remoteBridgeErrorCode; + +/** + 远端IM服务出现的错误 + */ +@property(nonatomic, assign)int remoteServerErrorCode; + +/** + 错误提示信息 + */ +@property(nonatomic, strong)NSString* errorMessage; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCNotificationMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCNotificationMessageContent.h new file mode 100644 index 00000000..d65b33b1 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCNotificationMessageContent.h @@ -0,0 +1,31 @@ +// +// WFCCNotificationMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/19. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + + +@class WFCCMessage; +/** + 通知消息的协议 + */ +@protocol WFCCNotificationMessageContent + +/** + 获取通知的提示内容 + + @return 提示内容 + */ +- (NSString *)formatNotification:(WFCCMessage *)message; +@end + +/** + 通知消息 + */ +@interface WFCCNotificationMessageContent : WFCCMessageContent + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCPCLoginRequestMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCPCLoginRequestMessageContent.h new file mode 100644 index 00000000..6fa6975f --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCPCLoginRequestMessageContent.h @@ -0,0 +1,27 @@ +// +// WFCCPCLoginRequestMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/19. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" +#import "WFCCIMService.h" + +/** + 建群的通知消息 + */ +@interface WFCCPCLoginRequestMessageContent : WFCCMessageContent + +/** + PC登录SessionID + */ +@property (nonatomic, strong)NSString *sessionId; + +/** + PC登录类型 + */ +@property (nonatomic, assign)WFCCPlatformType platform; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCPCOnlineInfo.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCPCOnlineInfo.h new file mode 100644 index 00000000..4e0448c3 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCPCOnlineInfo.h @@ -0,0 +1,40 @@ +// +// WFCCPCOnlineInfo.h +// WFChatClient +// +// Created by Tom Lee on 2020/4/6. +// Copyright © 2020 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + PC在线类型 + + - PC_Online: PC客户端在线 + - Web_Online: Web客户端在线 + - WX_Online: WX小程序客户端在线 + - Pad_Online: Pad客户端在线 + */ +typedef NS_ENUM(NSInteger, WFCCPCOnlineType) { + PC_Online, + Web_Online, + WX_Online, + Pad_Online +}; + + +@interface WFCCPCOnlineInfo : WFCCJsonSerializer ++ (instancetype)infoFromStr:(NSString *)strInfo withType:(WFCCPCOnlineType)type; +@property(nonatomic, assign)WFCCPCOnlineType type; +@property(nonatomic, assign)BOOL isOnline; +@property(nonatomic, assign)int/*WFCCPlatformType*/ platform; +@property(nonatomic, strong)NSString *clientId; +@property(nonatomic, strong)NSString *clientName; +@property(nonatomic, assign)long long timestamp; +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCPTTSoundMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCPTTSoundMessageContent.h new file mode 100644 index 00000000..8e9615c9 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCPTTSoundMessageContent.h @@ -0,0 +1,39 @@ +// +// WFCCPTTSoundMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/9. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCSoundMessageContent.h" + +/** + 语音消息 + */ +@interface WFCCPTTSoundMessageContent : WFCCSoundMessageContent + +/** + 构造方法 + + @param wavPath 文件路径 + @param amrPath 转化为amr的存储路径 + @param duration 时间 + @return 语音消息 + */ ++ (instancetype)soundMessageContentForWav:(NSString *)wavPath + destinationAmrPath:(NSString *)amrPath + duration:(long)duration; + + +/** + 构造方法 + + @param amrPath amr的存储路径 + @param duration 时间 + @return 语音消息 + */ ++ (instancetype)soundMessageContentForAmr:(NSString *)amrPath + duration:(long)duration; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCPTextMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCPTextMessageContent.h new file mode 100644 index 00000000..b7cd90d5 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCPTextMessageContent.h @@ -0,0 +1,16 @@ +// +// WFCCPTextMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCTextMessageContent.h" + +/** + 存储文本消息,与普通文本消息的区别是,普通文本消息存储切计未读数,本消息只存储不计数。 + */ +@interface WFCCPTextMessageContent : WFCCTextMessageContent + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCProtocol.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCProtocol.h new file mode 100644 index 00000000..0e617f05 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCProtocol.h @@ -0,0 +1,18 @@ +// +// WFCCProtocol.h +// WFChatClient +// +// Created by Rain on 2022/9/20. +// Copyright © 2022 WildFireChat. All rights reserved. +// + +#ifndef WFCCProtocol_h +#define WFCCProtocol_h + +@protocol WFCCDuplicatable + +- (instancetype)duplicate; + +@end + +#endif /* WFCCProtocol_h */ diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCQuitGroupNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCQuitGroupNotificationContent.h new file mode 100644 index 00000000..92dbf1af --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCQuitGroupNotificationContent.h @@ -0,0 +1,30 @@ +// +// WFCCQuitGroupNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/20. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 退群的通知消息 + */ +@interface WFCCQuitGroupNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 退群成员的ID + */ +@property (nonatomic, strong)NSString *quitMember; + +/** + 退群成员的ID + */ +@property (nonatomic, assign)BOOL keepMessage; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCQuitGroupVisibleNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCQuitGroupVisibleNotificationContent.h new file mode 100644 index 00000000..0f4cc945 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCQuitGroupVisibleNotificationContent.h @@ -0,0 +1,25 @@ +// +// WFCCQuitGroupNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/20. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 退群的通知消息 + */ +@interface WFCCQuitGroupVisibleNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 退群成员的ID + */ +@property (nonatomic, strong)NSString *quitMember; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCQuoteInfo.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCQuoteInfo.h new file mode 100644 index 00000000..8864ee74 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCQuoteInfo.h @@ -0,0 +1,25 @@ +// +// WFCCQuoteInfo.h +// WFChatClient +// +// Created by dali on 2020/10/4. +// Copyright © 2020 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" + +NS_ASSUME_NONNULL_BEGIN +@class WFCCMessage; +@interface WFCCQuoteInfo : WFCCJsonSerializer +- (instancetype)initWithMessage:(WFCCMessage *)message; +@property (nonatomic, assign)long long messageUid; +@property (nonatomic, strong)NSString *userId; +@property (nonatomic, strong)NSString *userDisplayName; +@property (nonatomic, strong)NSString *messageDigest; + +- (NSDictionary *)encode; +- (void)decode:(NSDictionary *)dictData; +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCRawMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCRawMessageContent.h new file mode 100644 index 00000000..f3d05e10 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCRawMessageContent.h @@ -0,0 +1,21 @@ +// +// WFCCRawMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMediaMessageContent.h" + +/** + Raw消息内容,消息没有经过decode,只包含payload. + */ +@interface WFCCRawMessageContent : WFCCMediaMessageContent + ++ (instancetype)contentOfPayload:(WFCCMessagePayload *)payload; +/** + 消息Payload + */ +@property (nonatomic, strong)WFCCMessagePayload *payload; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCReadReport.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCReadReport.h new file mode 100644 index 00000000..0a55ba95 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCReadReport.h @@ -0,0 +1,24 @@ +// +// WFCCConversation.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import +#import "WFCCConversation.h" +/** + 会话 + */ +@interface WFCCReadReport : WFCCJsonSerializer + ++(instancetype)readed:(WFCCConversation *)conversation + userId:(NSString *)userId + timestamp:(long long)timestamp; + +@property (nonatomic, strong)WFCCConversation *conversation; +@property (nonatomic, strong)NSString *userId; +@property (nonatomic, assign)long long timestamp; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCRecallMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCRecallMessageContent.h new file mode 100644 index 00000000..472b8612 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCRecallMessageContent.h @@ -0,0 +1,55 @@ +// +// WFCCRecallMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 文本消息 + */ +@interface WFCCRecallMessageContent : WFCCNotificationMessageContent + +/** + 被撤回消息的Uid + */ +@property (nonatomic, assign)long long messageUid; + +/** + 撤回用户Id + */ +@property (nonatomic, strong)NSString *operatorId; + +/** +被撤回消息的发送者用户Id +*/ +@property (nonatomic, strong)NSString *originalSender; + +/** +撤回消息的内容类型 +*/ +@property (nonatomic, assign)int originalContentType; + +/** +撤回消息的可搜索内容类型 +*/ +@property (nonatomic, strong)NSString *originalSearchableContent; + +/** +撤回消息的内容 +*/ +@property (nonatomic, strong)NSString *originalContent; + +/** +撤回消息的Extra内容 +*/ +@property (nonatomic, strong)NSString *originalExtra; + +/** +撤回消息的时间戳 +*/ +@property (nonatomic, assign)long long originalMessageTimestamp; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCRichNotificationMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCRichNotificationMessageContent.h new file mode 100644 index 00000000..22ee4bf6 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCRichNotificationMessageContent.h @@ -0,0 +1,29 @@ +// +// WFCCRichNotificationMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + +/** + 富通知消息 + */ +@interface WFCCRichNotificationMessageContent : WFCCMessageContent +@property (nonatomic, strong)NSString *title; +@property (nonatomic, strong)NSString *desc; +@property (nonatomic, strong)NSString *remark; + +//@[@{@"key":@"登录账户", @"value":@"野火IM", @"color":@"#173155"}, @{@"key":@"登录地点", @"value":@"北京", @"color":@"#173155"}] +@property (nonatomic, strong)NSArray *> *datas; + +//附加信息 +@property (nonatomic, strong)NSString *exName; +@property (nonatomic, strong)NSString *exPortrait; +@property (nonatomic, strong)NSString *exUrl; + +//应用信息 +@property (nonatomic, strong)NSString *appId; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCSecretChatInfo.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCSecretChatInfo.h new file mode 100644 index 00000000..66941823 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCSecretChatInfo.h @@ -0,0 +1,56 @@ +// +// WFCCSecretChatInfo.h +// WFChatClient +// +// Created by heavyrain on 2021/5/16. +// Copyright © 2021 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + 密聊状态 + + - SecretChatState_Starting: 密聊会话建立中 + - SecretChatState_Accepting: 密聊会话接受中 + - SecretChatState_Established: 密聊会话已建立 + - SecretChatState_Canceled: 密聊会话已取消 + */ +typedef NS_ENUM(NSInteger, WFCCSecretChatState) { + SecretChatState_Starting, + SecretChatState_Accepting, + SecretChatState_Established, + SecretChatState_Canceled +}; + +@interface WFCCSecretChatInfo : WFCCJsonSerializer +/* + 密聊ID + */ +@property(nonatomic, strong)NSString *targetId; + +/* + 用户ID + */ +@property(nonatomic, strong)NSString *userId; + +/* + 密聊状态 + */ +@property(nonatomic, assign)WFCCSecretChatState state; + +/* + 阅后即焚时间 + */ +@property(nonatomic, assign)int burnTime; + +/* + 创建时间 + */ +@property(nonatomic, assign)long long createTime; +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCSoundMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCSoundMessageContent.h new file mode 100644 index 00000000..de2b097d --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCSoundMessageContent.h @@ -0,0 +1,50 @@ +// +// WFCCSoundMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/9. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMediaMessageContent.h" + +/** + 语音消息 + */ +@interface WFCCSoundMessageContent : WFCCMediaMessageContent + +/** + 构造方法 + + @param wavPath 文件路径 + @param amrPath 转化为amr的存储路径 + @param duration 时间 + @return 语音消息 + */ ++ (instancetype)soundMessageContentForWav:(NSString *)wavPath + destinationAmrPath:(NSString *)amrPath + duration:(long)duration; + + +/** + 构造方法 + + @param amrPath amr的存储路径 + @param duration 时间 + @return 语音消息 + */ ++ (instancetype)soundMessageContentForAmr:(NSString *)amrPath + duration:(long)duration; + +/** + 时间 + */ +@property (nonatomic, assign)long duration; + +/** + 获取语音消息的wav数据 + + @return wav数据 + */ +- (NSData *)getWavData; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCStartSecretChatMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCStartSecretChatMessageContent.h new file mode 100644 index 00000000..103e0ec4 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCStartSecretChatMessageContent.h @@ -0,0 +1,18 @@ +// +// WFCCMarkUnreadMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + + +/** + 标记未读同步消息 + */ +@interface WFCCStartSecretChatMessageContent : WFCCMessageContent + + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCStickerMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCStickerMessageContent.h new file mode 100644 index 00000000..6f233a17 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCStickerMessageContent.h @@ -0,0 +1,26 @@ +// +// WFCCImageMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/2. +// Copyright © 2017年 wildfire chat. All rights reserved. +// + +#import "WFCCMediaMessageContent.h" +#import + +/** + 图片消息 + */ +@interface WFCCStickerMessageContent : WFCCMediaMessageContent + +/** + 构造方法 + + @param stickerPath 表情路径 + @return 表情消息 + */ ++ (instancetype)contentFrom:(NSString *)stickerPath; + +@property (nonatomic, assign)CGSize size; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCStreamingTextGeneratedMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCStreamingTextGeneratedMessageContent.h new file mode 100644 index 00000000..bc0fe215 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCStreamingTextGeneratedMessageContent.h @@ -0,0 +1,17 @@ +// +// WFCCStreamingTextGeneratedMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + +/** + 富通知消息 + */ +@interface WFCCStreamingTextGeneratedMessageContent : WFCCMessageContent +@property (nonatomic, strong)NSString *text; +@property (nonatomic, strong)NSString *streamId; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCStreamingTextGeneratingMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCStreamingTextGeneratingMessageContent.h new file mode 100644 index 00000000..0a69ae63 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCStreamingTextGeneratingMessageContent.h @@ -0,0 +1,17 @@ +// +// WFCCStreamingTextGeneratingMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + +/** + 富通知消息 + */ +@interface WFCCStreamingTextGeneratingMessageContent : WFCCMessageContent +@property (nonatomic, strong)NSString *text; +@property (nonatomic, strong)NSString *streamId; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCTextMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCTextMessageContent.h new file mode 100644 index 00000000..2440416e --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCTextMessageContent.h @@ -0,0 +1,44 @@ +// +// WFCCTextMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" +#import "WFCCQuoteInfo.h" +/** + 文本消息 + */ +@interface WFCCTextMessageContent : WFCCMessageContent + +/** + 构造方法 + + @param text 文本 + @return 文本消息 + */ ++ (instancetype)contentWith:(NSString *)text; + +/** + 文本内容 + */ +@property (nonatomic, strong)NSString *text; + + +/** + 提醒类型,1,提醒部分对象(mentinedTarget)。2,提醒全部。其他不提醒 + */ +@property (nonatomic, assign)int mentionedType; + +/** + 提醒对象,mentionedType 1时有效 + */ +@property (nonatomic, strong)NSArray *mentionedTargets; + +/** + 引用信息 + */ +@property (nonatomic, strong)WFCCQuoteInfo *quoteInfo; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCThingsDataContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCThingsDataContent.h new file mode 100644 index 00000000..cb1fb054 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCThingsDataContent.h @@ -0,0 +1,19 @@ +// +// WFCCThingsDataContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + +/** + 物联网数据 + */ +@interface WFCCThingsDataContent : WFCCMessageContent +/** + 二进制数据内容 + */ +@property (nonatomic, strong)NSData *data; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCThingsLostEventContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCThingsLostEventContent.h new file mode 100644 index 00000000..47c4e1c2 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCThingsLostEventContent.h @@ -0,0 +1,16 @@ +// +// WFCCThingsLostEventContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + +/** + 文本消息 + */ +@interface WFCCThingsLostEventContent : WFCCMessageContent + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCTipNotificationMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCTipNotificationMessageContent.h new file mode 100644 index 00000000..e5ac09f7 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCTipNotificationMessageContent.h @@ -0,0 +1,20 @@ +// +// WFCCNotificationMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/19. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 退群的通知消息 + */ +@interface WFCCTipNotificationContent : WFCCNotificationMessageContent + +/** + 退群成员的ID + */ +@property (nonatomic, strong)NSString *tip; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCTransferGroupOwnerNotificationContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCTransferGroupOwnerNotificationContent.h new file mode 100644 index 00000000..0151e523 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCTransferGroupOwnerNotificationContent.h @@ -0,0 +1,31 @@ +// +// WFCCTransferGroupOwnerNotificationContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/20. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCNotificationMessageContent.h" + +/** + 转让群主的通知消息 + */ +@interface WFCCTransferGroupOwnerNotificationContent : WFCCNotificationMessageContent + +/** + 群组ID + */ +@property (nonatomic, strong)NSString *groupId; + +/** + 操作者的ID + */ +@property (nonatomic, strong)NSString *operateUser; + +/** + 新的群主ID + */ +@property (nonatomic, strong)NSString *owner; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCTypingMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCTypingMessageContent.h new file mode 100644 index 00000000..2d92bb00 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCTypingMessageContent.h @@ -0,0 +1,46 @@ +// +// TypingMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + +/** + 正在输入类型 + + - Typing_TEXT : 正在输入文本 + - Typing_VOICE : 正在输入语音 + - Typing_CAMERA : 正在拍摄 + - Typing_LOCATION : 正在选取位置 + - Typing_FILE : 正在选取文件 + */ +typedef NS_ENUM(NSInteger, WFCCTypingType) { + Typing_TEXT = 0, + Typing_VOICE = 1, + Typing_CAMERA = 2, + Typing_LOCATION = 3, + Typing_FILE = 4 +}; + + +/** + 正在输入消息 + */ +@interface WFCCTypingMessageContent : WFCCMessageContent + +/** + 构造方法 + + @param type 输入类型类型。 + @return 正在输入消息 + */ ++ (instancetype)contentType:(WFCCTypingType)type; + +/** + 输入类型类型。0 文本;1 语言。 + */ +@property (nonatomic, assign)WFCCTypingType type; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCUnknownMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCUnknownMessageContent.h new file mode 100644 index 00000000..1ef52312 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCUnknownMessageContent.h @@ -0,0 +1,27 @@ +// +// WFCCUnknownMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/8/16. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import "WFCCMessageContent.h" + +/** + 未知消息。所有未注册的消息都会解析为为止消息,主要用于新旧版本兼容 + */ +@interface WFCCUnknownMessageContent : WFCCMessageContent + +/** + 原消息类型 + */ +@property (nonatomic, assign)NSInteger orignalType; + + +/** + 原消息Payload + */ +@property (nonatomic, strong)WFCCMessagePayload *orignalPayload; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCUnreadCount.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCUnreadCount.h new file mode 100644 index 00000000..28aecd95 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCUnreadCount.h @@ -0,0 +1,21 @@ +// +// WFCCUnreadCount.h +// WFChatClient +// +// Created by WF Chat on 2018/9/30. +// Copyright © 2018 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface WFCCUnreadCount : WFCCJsonSerializer ++(instancetype)countOf:(int)unread mention:(int)mention mentionAll:(int)mentionAll; +@property(nonatomic, assign)int unread; +@property(nonatomic, assign)int unreadMention; +@property(nonatomic, assign)int unreadMentionAll; +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCUserInfo.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCUserInfo.h new file mode 100644 index 00000000..e4944ff6 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCUserInfo.h @@ -0,0 +1,104 @@ +// +// WFCCUserInfo.h +// WFChatClient +// +// Created by heavyrain on 2017/9/29. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" +/** + 用户信息 + */ +@interface WFCCUserInfo : WFCCJsonSerializer + +/** + 用户ID + */ +@property (nonatomic, strong)NSString *userId; + +/** + 名称 + */ +@property (nonatomic, strong)NSString *name; + +/** + 显示的名称 + */ +@property (nonatomic, strong)NSString *displayName; + +/** + 性别 + */ +@property (nonatomic, assign)int gender; + +/** + 头像 + */ +@property (nonatomic, strong)NSString *portrait; + +/** + 手机号 + */ +@property (nonatomic, strong)NSString *mobile; + +/** + 邮箱 + */ +@property (nonatomic, strong)NSString *email; + +/** + 地址 + */ +@property (nonatomic, strong)NSString *address; + +/** + 公司信息 + */ +@property (nonatomic, strong)NSString *company; + +/** + 社交信息 + */ +@property (nonatomic, strong)NSString *social; + +/** + 扩展信息 + */ +@property (nonatomic, strong)NSString *extra; + +/** + 好友备注 + */ +@property (nonatomic, strong)NSString *friendAlias; + +/** + 群昵称 + */ +@property (nonatomic, strong)NSString *groupAlias; + +/** + 更新时间 + */ +@property (nonatomic, assign)long long updateDt; + +/** + 用户类型 + */ +@property (nonatomic, assign) int type; + +/** + 是否被删除用户 + */ +@property (nonatomic, assign) int deleted; + + +/** + 辅助方法,返回可读的名称,如果有备注返回备注,如果有群昵称,显示群昵称,如果都没有返回用户昵称。 + */ +@property(nonatomic, readonly)NSString *readableName; + +- (void)cloneFrom:(WFCCUserInfo *)other; + +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCUserOnlineState.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCUserOnlineState.h new file mode 100644 index 00000000..732bc7cf --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCUserOnlineState.h @@ -0,0 +1,43 @@ +// +// WFCCUserOnlineState.h +// WFChatClient +// +// Created by heavyrain on 2022/2/17. +// Copyright © 2022 WildFireChat. All rights reserved. +// + +#import +#import "WFCCJsonSerializer.h" + +NS_ASSUME_NONNULL_BEGIN + +/* + int Platform_UNSET = 0; + int Platform_iOS = 1; + int Platform_Android = 2; + int Platform_Windows = 3; + int Platform_OSX = 4; + int Platform_WEB = 5; + int Platform_WX = 6; + int Platform_LINUX = 7; + int Platform_iPad = 8; + int Platform_APad = 9; + */ +@interface WFCCClientState : WFCCJsonSerializer +@property(nonatomic, assign)int platform; +@property(nonatomic, assign)int state; //设备的在线状态,0是在线,1是有session但不在线,其它不在线。 +@property(nonatomic, assign)long long lastSeen; //最后可见 +@end + +@interface WFCCUserCustomState : WFCCJsonSerializer +@property(nonatomic, assign)int state; //0,未设置,1 忙碌,2 离开(主动设置),3 离开(长时间不操作),4 隐身,其它可以自主扩展。 +@property(nonatomic, strong)NSString *text; +@end + +@interface WFCCUserOnlineState : WFCCJsonSerializer +@property(nonatomic, strong)NSString *userId; +@property(nonatomic, strong)WFCCUserCustomState *customState; +@property(nonatomic, strong)NSArray *clientStates; +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCUtilities.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCUtilities.h new file mode 100644 index 00000000..a7a5819a --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCUtilities.h @@ -0,0 +1,79 @@ +// +// WFCCUtilities.h +// WFChatClient +// +// Created by heavyrain on 2017/9/7. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import +#import "WFCCIMService.h" +#import "WFCCEnums.h" + +@interface WFCCUtilities : NSObject + +/** + 生成缩略图 + + @param image 原图 + @param targetWidth 宽度 + @param targetHeight 高度 + @return 缩略图 + */ ++ (UIImage *)generateThumbnail:(UIImage *)image + withWidth:(CGFloat)targetWidth + withHeight:(CGFloat)targetHeight; + +/** + 缩小图片 + + @param image 原图 + @param size 宽度 + @return 缩小到size范围内的Image + */ ++ (UIImage *)image:(UIImage *)image scaleInSize:(CGSize)size; +/** + 获取对应的沙盒路径 + + @param localPath 文件路径 + @return 对应的沙盒路径 + */ ++ (NSString *)getSendBoxFilePath:(NSString *)localPath; + +/** + 获取资源路径 + + @param componentPath 相对路径 + @return 资源路径 + */ ++ (NSString *)getDocumentPathWithComponent:(NSString *)componentPath; + ++ (CGSize)imageScaleSize:(CGSize)imageSize targetSize:(CGSize)targetSize thumbnailPoint:(CGPoint *)thumbnailPoint; + + ++ (UIImage *)imageWithRightOrientation:(UIImage *)aImage; + ++ (BOOL)isExternalTarget:(NSString *)targetId; ++ (NSString *)getExternalDomain:(NSString *)targetId; ++ (NSString *)getTargetWithoutDomain:(NSString *)targetId; ++ (NSAttributedString *)getExternal:(NSString *)domainId withName:(NSString *)name withColor:(UIColor *)color; ++ (NSAttributedString *)getExternal:(NSString *)domainId withName:(NSString *)name withColor:(UIColor *)color withSize:(CGFloat)fontSize; + +//同步函数,只能在后台线程执行 ++ (NSString *)getGroupGridPortrait:(NSString *)groupId + width:(int)width + generateIfNotExist:(BOOL)generateIfNotExist + defaultUserPortrait:(UIImage *(^)(NSString *userId))defaultUserPortraitBlock; + ++ (NSString *)getGroupGridPortrait:(NSString *)groupId + memberPortraits:(NSArray*> *)groupMembers + width:(int)PortraitWidth + defaultUserPortrait:(UIImage *(^)(NSString *userId))defaultUserPortraitBlock; + + ++ (NSString *)getGroupMemberExtra:(WFCCGroupMemberSourceType)sourceType sourceTargetId:(NSString *)sourceTargetId; + ++ (WFCCGroupMemberSourceType)getGroupMemberSourceType:(NSString *)memberExtra sourceTargetId:(NSMutableString *)sourceTargetId; + ++ (NSString *)getUserDisplayName:(NSString *)userId inGroup:(NSString *)groupId; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCVideoMessageContent.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCVideoMessageContent.h new file mode 100644 index 00000000..d9d6c14b --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCCVideoMessageContent.h @@ -0,0 +1,34 @@ +// +// WFCCVideoMessageContent.h +// WFChatClient +// +// Created by heavyrain on 2017/9/2. +// Copyright © 2017年 wildfire chat. All rights reserved. +// + +#import "WFCCMediaMessageContent.h" +#import + +/** + 图片消息 + */ +@interface WFCCVideoMessageContent : WFCCMediaMessageContent + +/** + 构造方法 + + @param image 图片 + @return 图片消息 + */ ++ (instancetype)contentPath:(NSString *)localPath thumbnail:(UIImage *)image; + +/** + 缩略图 + */ +@property (nonatomic, strong)UIImage *thumbnail; + +/** + 时长 +*/ +@property (nonatomic, assign)long duration; +@end diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCChatClient.h b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCChatClient.h new file mode 100644 index 00000000..be18c6b2 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Headers/WFCChatClient.h @@ -0,0 +1,109 @@ +// +// WFChatClient.h +// WFChatClient +// +// Created by heavyrain on 2017/11/5. +// Copyright © 2017年 WildFireChat. All rights reserved. +// + +#import + +//! Project version number for WFChatClient. +FOUNDATION_EXPORT double WFChatClientVersionNumber; + +//! Project version string for WFChatClient. +FOUNDATION_EXPORT const unsigned char WFChatClientVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Info.plist b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Info.plist new file mode 100644 index 00000000..ffa15f32 Binary files /dev/null and b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/Info.plist differ diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/WFChatClient b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/WFChatClient new file mode 100644 index 00000000..b660d93e Binary files /dev/null and b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/WFChatClient differ diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/_CodeSignature/CodeResources b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/_CodeSignature/CodeResources new file mode 100644 index 00000000..05c1f3fb --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFChatClient.xcframework/ios-arm64_x86_64-simulator/WFChatClient.framework/_CodeSignature/CodeResources @@ -0,0 +1,1125 @@ + + + + + files + + Headers/Common.h + + LNpNtEeIWFWNqfp83OzxnGqlCOk= + + Headers/WFCCAddGroupeMemberNotificationContent.h + + jvLO++pfRhcWd1SGd2Rl9MD72yI= + + Headers/WFCCArticlesMessageContent.h + + OCeFgvYBsjpkMD0TktQKQhsKhd4= + + Headers/WFCCCallAddParticipantMessageContent.h + + Gp2DUYZvy4oTOkc/ESfeRb7RiWE= + + Headers/WFCCCallByeMessageContent.h + + lLIN2Wba1CnarrOaKTCj0jdpAo4= + + Headers/WFCCCallStartMessageContent.h + + TkaXEIURlWRSAUSWH4JFT/k6lpo= + + Headers/WFCCCardMessageContent.h + + Hl6e1zMZnHARRV/0pP22uW0zNlc= + + Headers/WFCCChangeGroupNameNotificationContent.h + + sk8T7Vb28CU/13dFzOBH9oDMrac= + + Headers/WFCCChangeGroupPortraitNotificationContent.h + + RV7X/R5zu1nk7gWMG51Rau9bu18= + + Headers/WFCCChannelInfo.h + + J/5lIOlldCotTh7EdP/hQUDYzB4= + + Headers/WFCCChannelMenu.h + + 3Qvl119TweX+H7N+gpdmlNsk1pU= + + Headers/WFCCChannelMenuEventMessageContent.h + + KGX0HpyfUYU/+5LBf7Y7PWNyDf0= + + Headers/WFCCChatroomInfo.h + + D5lCwDH3GJCnM1X7Ug3CnX5RXsw= + + Headers/WFCCChatroomMemberInfo.h + + uAzguqEQAeOcOzpYPuX+FidG9dc= + + Headers/WFCCCompositeMessageContent.h + + ygnyDZtDTn9hq0Ar+RmKc95ysAQ= + + Headers/WFCCConferenceInviteMessageContent.h + + 7U7eIKenVwUFlrh6L5QWBsQm5os= + + Headers/WFCCConversation.h + + Xg2lkJiRwe5r5WjZQjOaY9wYaA4= + + Headers/WFCCConversationInfo.h + + ySFM+XEYbg8zv0Bn3psq1zV9T0k= + + Headers/WFCCConversationSearchInfo.h + + hojxK+qnxQcVKX2z8pVoB85zK/A= + + Headers/WFCCCreateGroupNotificationContent.h + + yKDBCXekBAKB97vuPrGqvQqz/Ls= + + Headers/WFCCDeleteMessageContent.h + + JgLZw5Iosxii47IRTkbYseNa010= + + Headers/WFCCDeliveryReport.h + + Mx9wvAK8IjC+EQwbZuqQBf12O3A= + + Headers/WFCCDictionary.h + + tyKSRT1vYkFUD8CKdLWQR+AayPk= + + Headers/WFCCDismissGroupNotificationContent.h + + 4OSaSDIkdb6xBrHm+MLR2oFBzKU= + + Headers/WFCCDomainInfo.h + + cW1JstDhOj1rfqEhqdBj71VYvKA= + + Headers/WFCCEnterChannelChatMessageContent.h + + oxI3DtPGppGSlY1l0JgHcU2eMF8= + + Headers/WFCCEnums.h + + qNHY+LulPY/c3tPfoonhObTr1r0= + + Headers/WFCCFileMessageContent.h + + 5wbl0fY5k0YAcEfHt+/grdcw+w0= + + Headers/WFCCFileRecord.h + + 4aIaA33n6bUCX8O6J0xxmsa1Pos= + + Headers/WFCCFriend.h + + 7KThvPXsIvxHuOLJPEinuIxJnt0= + + Headers/WFCCFriendAddedMessageContent.h + + 3iB08uqoiC7mBgsHek5V1uqUPcc= + + Headers/WFCCFriendGreetingMessageContent.h + + +nFxkjIxc004ir8x96f1ektvbrQ= + + Headers/WFCCFriendRequest.h + + c1jYJ4ka4ZInQuhTF6YyGMnqU74= + + Headers/WFCCGroupInfo.h + + 96/Vhp003W4SR9FKbeUw4RixYb4= + + Headers/WFCCGroupJoinTypeNotificationContent.h + + Qtr37R+sD09xV6fgIKZwO8rApSg= + + Headers/WFCCGroupMember.h + + hBtY1tjk9IiNXPU6TZHTOHhrhN8= + + Headers/WFCCGroupMemberAllowNotificationContent.h + + JyLiP6wWLIjkbcmVzri8+YDqUyA= + + Headers/WFCCGroupMemberMuteNotificationContent.h + + TivBTQtIvTtvcL2NdvqF74AapeQ= + + Headers/WFCCGroupMuteNotificationContent.h + + qLFbHvFV3B0PW18/X9IzTDyK+04= + + Headers/WFCCGroupPrivateChatNotificationContent.h + + 7sAJpuAG5CohYN3Is3k0A53OsF0= + + Headers/WFCCGroupSearchInfo.h + + 3p1LsaEdwpLPBTQdRKkGcrYKVOo= + + Headers/WFCCGroupSetManagerNotificationContent.h + + 77um+nAswlRD90DRTWYSNdQe1XY= + + Headers/WFCCGroupSettingsNotificationContent.h + + KjNqfUSKMt61fsrMugG2tnr0awo= + + Headers/WFCCIMService.h + + HVFbofdTKg6x10CH6ipDq7G1upw= + + Headers/WFCCImageMessageContent.h + + s3kEIc5J2OZUc4sRCNQ87Yt53n4= + + Headers/WFCCJoinCallRequestMessageContent.h + + xzAvi1X3CA9lt04ULjpeFB7daJA= + + Headers/WFCCJsonSerializer.h + + JyGwg9hovXqu5d48RAAU60KhStM= + + Headers/WFCCKickoffGroupMemberNotificationContent.h + + DvOzmLjA8M5RNq7pLEDD/nJmLTc= + + Headers/WFCCKickoffGroupMemberVisibleNotificationContent.h + + eH/rmf/flDrTAdqjgs3+WNZd5bE= + + Headers/WFCCLeaveChannelChatMessageContent.h + + DL8WjZgqYS9l/OvtU0AvYHPaMik= + + Headers/WFCCLinkMessageContent.h + + jOg9HYwkWXRPEXURI+GbDN5jCPU= + + Headers/WFCCLocationMessageContent.h + + 1Ly+2JUo9EsqAewScYTP5JKSu/A= + + Headers/WFCCMediaMessageContent.h + + dKL+vn0PcsLdH2KYp2FrEQjKVrE= + + Headers/WFCCMessage.h + + fAupfxwHH1mU/yWc9RxqVNcou3s= + + Headers/WFCCMessageContent.h + + ts0Q3p2wCt5/RGJYerWAVLLsMNg= + + Headers/WFCCModifyGroupAliasNotificationContent.h + + xEi8aY2nCX0jEEJfsGwz5knD7KA= + + Headers/WFCCModifyGroupExtraNotificationContent.h + + J11Ewm5umPZvVVeszmXP2g51NxU= + + Headers/WFCCModifyGroupMemberExtraNotificationContent.h + + rvJSIEXlU01q/ndzXoOgKR6dH1s= + + Headers/WFCCMultiCallOngoingMessageContent.h + + rPce0YbjYgHWcEDWp13gv00C7Gs= + + Headers/WFCCNetworkService.h + + hd+L+d6hS490ulG7MwVSl8ODyeg= + + Headers/WFCCNotDeliveredMessageContent.h + + oyuBhzo8KFD+LG1HZC7IqpKsAjk= + + Headers/WFCCNotificationMessageContent.h + + 23T1DmQe0mNYLQJRU0XeoKGklM0= + + Headers/WFCCPCLoginRequestMessageContent.h + + k/r3Yv0yVSbq6FU8T2CLxq6b6z4= + + Headers/WFCCPCOnlineInfo.h + + XHYyRIsilrjHZNVPPS4a7PxHNG4= + + Headers/WFCCPTTSoundMessageContent.h + + 7stUp2OKzIWTx4Ayf7A0r+XECrg= + + Headers/WFCCPTextMessageContent.h + + kEio/hGlyJShUFOyrmLfaDmW4W4= + + Headers/WFCCProtocol.h + + jPpd/6CLqGMng5+HetFH0QrZn6w= + + Headers/WFCCQuitGroupNotificationContent.h + + izkDAFN61r74fJuQzwzvb6WTrGs= + + Headers/WFCCQuitGroupVisibleNotificationContent.h + + MNjEZtRR3RODbTrJ1wN84iTWVi4= + + Headers/WFCCQuoteInfo.h + + ERBNbAyfOp3vf/yfH+xFXvRHVfE= + + Headers/WFCCRawMessageContent.h + + WXiU7KJa9MfydsGPUvEbQSkLbrw= + + Headers/WFCCReadReport.h + + RLnJXSMYZRuIrADwxk5m1TIhc2M= + + Headers/WFCCRecallMessageContent.h + + tf4uFEBvokiIXp5TyVpuJAFcLwU= + + Headers/WFCCRichNotificationMessageContent.h + + HpaBViVQ5Mr3Ar1gUKE0eiwkkqU= + + Headers/WFCCSecretChatInfo.h + + mBV4K2IicEM4D2l15yHmYUI+Nwc= + + Headers/WFCCSoundMessageContent.h + + 0HKp6UzDYPNtMEsF5Le0HHTdyCw= + + Headers/WFCCStartSecretChatMessageContent.h + + uy8dt0OafAkux/C2TQSRVlrC/Mo= + + Headers/WFCCStickerMessageContent.h + + RAl4w/bqWh+smqw9zyeBe9/c3H4= + + Headers/WFCCStreamingTextGeneratedMessageContent.h + + woFKNIgjsc8naNTMxv42sLuuYhg= + + Headers/WFCCStreamingTextGeneratingMessageContent.h + + 85FlvdNUDtADujETMUtI3O3xsTI= + + Headers/WFCCTextMessageContent.h + + uwVXSj/YvO4q1d6NgcSSoyKtEgU= + + Headers/WFCCThingsDataContent.h + + H0kbM+U+UuGJRdrAD80JPThvhEg= + + Headers/WFCCThingsLostEventContent.h + + dcQoEIqU6LrlKnTkods0HxE6IZo= + + Headers/WFCCTipNotificationMessageContent.h + + OUWpXw5oLCcRrZzKMinv4QWyeog= + + Headers/WFCCTransferGroupOwnerNotificationContent.h + + uPQxlwZhswwfQUa2jsCbTnS3GaI= + + Headers/WFCCTypingMessageContent.h + + V5jsf9t7lOaQcn4ZbE+Gs0z3RN8= + + Headers/WFCCUnknownMessageContent.h + + mp0JrMWcEog34JuOo8tTwVYxbOM= + + Headers/WFCCUnreadCount.h + + qQ9rtAub4TjppdUgobFrqZgF3S8= + + Headers/WFCCUserInfo.h + + hKbTUBb3e458uNUCvQfNsR/gIKc= + + Headers/WFCCUserOnlineState.h + + myA+bGrEbvSQvNI9uqAOakbK91w= + + Headers/WFCCUtilities.h + + u+c0kIEjg98+zbsS706mne3lYoQ= + + Headers/WFCCVideoMessageContent.h + + xqitZmCxwt/yGMV+5vCzjpLRiWQ= + + Headers/WFCChatClient.h + + YTmzHdMi4ejNPlcRcOgf3GlkmxI= + + Info.plist + + UX4ZcGUOTuFjNe5fOCCZwwBQApQ= + + + files2 + + Headers/Common.h + + hash2 + + OUz6QgVKd+5TOOTzJbqUGALWGfkJndXC7brw3xJJ3pM= + + + Headers/WFCCAddGroupeMemberNotificationContent.h + + hash2 + + EpsJAfExMfDRxNnkv78FsRq19MxhZOOa7zAXkJWjhqc= + + + Headers/WFCCArticlesMessageContent.h + + hash2 + + eorX+dyEZxC/KyOBe/GEDyXrvHZZuhiwWYPaavCA2Lo= + + + Headers/WFCCCallAddParticipantMessageContent.h + + hash2 + + AlXCupdVJRWmVnjglrGyavED8Yz+sbIqoYS0GBu/vbI= + + + Headers/WFCCCallByeMessageContent.h + + hash2 + + 4mJFazKyranTM2fv8KTUwvpIaQmp3IE4H1Vd6yHGz7k= + + + Headers/WFCCCallStartMessageContent.h + + hash2 + + rsMetvs+P6KcPYwKQIE83DDG2zu1ydb0QMmEcvvfmpo= + + + Headers/WFCCCardMessageContent.h + + hash2 + + ZoU9cqNIFYZOPzL6ndiJPN2s7f+BhiB9xBaL4eXipKM= + + + Headers/WFCCChangeGroupNameNotificationContent.h + + hash2 + + 1EWF3W/5k+s0yQUIo+/STDR/vYjq7hCAPZs7haV/GxY= + + + Headers/WFCCChangeGroupPortraitNotificationContent.h + + hash2 + + VeQkDgvx4xzLQAUvHOZX+DP0pe5iFNa+W8tVeUHXBIg= + + + Headers/WFCCChannelInfo.h + + hash2 + + 6WeFt0dSRLGSnbn64ICrnGtZNphvudqH/V7qBn7feq8= + + + Headers/WFCCChannelMenu.h + + hash2 + + SkZwdrq3TA0/ZErc4eU/x4ym30IS7nxEdFxUl4CXjLg= + + + Headers/WFCCChannelMenuEventMessageContent.h + + hash2 + + kqR96xTnrwWJmDLxvCP1HsTHLjq9ABAJpUPhY1Ofxow= + + + Headers/WFCCChatroomInfo.h + + hash2 + + iGzH+D/CP1f+3wl2eHqSQ9bsMEdrhI/58jAUiFwDl3o= + + + Headers/WFCCChatroomMemberInfo.h + + hash2 + + zxOmgf7enEISucSuoB9IsV/o9VzSHNlp5Zmg/9/pPpY= + + + Headers/WFCCCompositeMessageContent.h + + hash2 + + CM2kbabygG2hCZmfD2Jk6Z99D1Yn8nRXo+K7m+eju1E= + + + Headers/WFCCConferenceInviteMessageContent.h + + hash2 + + i8Y2mtcByVLP4UMiRKgNlmQqCT7bykO4g0ktXi6pmcM= + + + Headers/WFCCConversation.h + + hash2 + + jd69mtim8Cq3R7mScjM5ryetKb/6+r0Jqk/i4dupGHE= + + + Headers/WFCCConversationInfo.h + + hash2 + + 3f+ILGU/FlBtVp22NTlznEAdS12YcE1WyJTFv7dq1V0= + + + Headers/WFCCConversationSearchInfo.h + + hash2 + + +2AEC1ivfDfqhL/uNJFq5bOOvu6Qadi3lGxt6CEvQYw= + + + Headers/WFCCCreateGroupNotificationContent.h + + hash2 + + pY7DoXVZyiYgFnGGEJb78fCgHMnUy1ObDFXeiAZof50= + + + Headers/WFCCDeleteMessageContent.h + + hash2 + + TpgwOudamzEDDSNDNggq0kwmq5Ekq/6GaYxWm9ZgOFs= + + + Headers/WFCCDeliveryReport.h + + hash2 + + OWY6aKmCkIe/yDO9vQaWTp/aV+Y7lbOLdxoykWcyeRY= + + + Headers/WFCCDictionary.h + + hash2 + + gW9qatoKB4pZEuLaDnanhd2YRA8GDovWdsUtbjHtSyo= + + + Headers/WFCCDismissGroupNotificationContent.h + + hash2 + + yaQ1yXmDH4B6pvTWMTMvD0f6MEioOBwVzOZS8cC93ug= + + + Headers/WFCCDomainInfo.h + + hash2 + + 9dTddUQIhN8t7WIrLra4TexL7x/tVyBLJDh9Hmz9Qy0= + + + Headers/WFCCEnterChannelChatMessageContent.h + + hash2 + + SVqeTZMQkETc7rzmwNlbMZhOVwV2HOcrrBW9VEWX4nw= + + + Headers/WFCCEnums.h + + hash2 + + YIv49UhmyEim+Jj4uTU0+9/bH88b7wdcSP4UiUwvo9s= + + + Headers/WFCCFileMessageContent.h + + hash2 + + Ke5naJ1rrOtdXPhmBi8Vs9tpTDUsZJxlzB7VcIg73AY= + + + Headers/WFCCFileRecord.h + + hash2 + + XwwSIhCpYldnFXUQc5XmQ/A1nR8leevRi5By0He+ECk= + + + Headers/WFCCFriend.h + + hash2 + + gHJ0WNEnSAHVNBZsBDweyX67wAwVb4+gl4kGrMDdp5A= + + + Headers/WFCCFriendAddedMessageContent.h + + hash2 + + VgBKXgCr2B3Sn6STGs8v9TrrI9SePwHkd0fj11L+JoI= + + + Headers/WFCCFriendGreetingMessageContent.h + + hash2 + + sdlJyHijoC7vh+e19I37KCEe8UrSHdSTsKyIMcplRmY= + + + Headers/WFCCFriendRequest.h + + hash2 + + 01sNgzdBzWU0dGsP/HexiSsqXQSkxYSD09Ie1sPwoJc= + + + Headers/WFCCGroupInfo.h + + hash2 + + yv3HF/PGRpX5iccbi0fiJG8mwChwQsKdgLzhVP8IdaE= + + + Headers/WFCCGroupJoinTypeNotificationContent.h + + hash2 + + UWXVAFchCctfR1zw4Z58MLM5ktwA3TVUziHrAkMz1BY= + + + Headers/WFCCGroupMember.h + + hash2 + + qjxJ2oQGZjuzDeywVker6TOv0ZWCiWCBXidQMW0FTKA= + + + Headers/WFCCGroupMemberAllowNotificationContent.h + + hash2 + + 2/m6Yd2/ZdGmiaQON/XjzuUTrcj/4o4Q18sKj7W48pE= + + + Headers/WFCCGroupMemberMuteNotificationContent.h + + hash2 + + XowKDr3PicQyindTuBp3s8Isf3m6toxGK8yo0DYVUvw= + + + Headers/WFCCGroupMuteNotificationContent.h + + hash2 + + I0vaBMST9PHfXlQ7n7THkN3IfD1q5orzXPvJD3Y/p5A= + + + Headers/WFCCGroupPrivateChatNotificationContent.h + + hash2 + + uaqdJhtVebaqAGbG6p4KxdgvyxAJLe4xfPslLpTYnLY= + + + Headers/WFCCGroupSearchInfo.h + + hash2 + + MbFwI4GeIC1sZHtxQuWRW1n/iw7C5fC9W8/vChToadU= + + + Headers/WFCCGroupSetManagerNotificationContent.h + + hash2 + + tijnFDgdln12dG2BqpOiWDVKuT4PjjRrVVNtY9ZIf+M= + + + Headers/WFCCGroupSettingsNotificationContent.h + + hash2 + + LRh2YozvXUyuyZfZDBx+KYZ5ALMg4IWrPF2uVAACBaA= + + + Headers/WFCCIMService.h + + hash2 + + mBkCL5a6IYUWcNarNs1Vg0ZksuzmRnNga1hfGrsDgvw= + + + Headers/WFCCImageMessageContent.h + + hash2 + + FOZ1hIIJG3HxNJkKL8cq64oulkGMDE01xaijw8l9yu4= + + + Headers/WFCCJoinCallRequestMessageContent.h + + hash2 + + zAu3dFjJzIl7b4I7P0EfZDoZqHbcZp4kaKlNTTHvGR0= + + + Headers/WFCCJsonSerializer.h + + hash2 + + KHLxniBuW1A6P/7NDiBSA33RF5FkBdUPjW3ILs3gdNg= + + + Headers/WFCCKickoffGroupMemberNotificationContent.h + + hash2 + + VLESbz/gJhDUmVs8OF992uc8EQ8ft8lQjN63t18TztE= + + + Headers/WFCCKickoffGroupMemberVisibleNotificationContent.h + + hash2 + + g3ZRN9hG636KMqyF7BuAl+peP3ryebf/LNfEPt3ZquA= + + + Headers/WFCCLeaveChannelChatMessageContent.h + + hash2 + + W1ziobFnL+1IGb7kMr/mJuaeAfbYb4JsVNsoxy2nNzM= + + + Headers/WFCCLinkMessageContent.h + + hash2 + + je04qlCJ87zmGhkaSwh+Y3mcZIWt8jDy233GgimsPQQ= + + + Headers/WFCCLocationMessageContent.h + + hash2 + + IMZf3SSoWodHaydvsD6VhKdTsqbEfZSFIH+6uyDYfPk= + + + Headers/WFCCMediaMessageContent.h + + hash2 + + ohbLG9MuRZtoapfSoVeBwmN8Q6N071RFZurZw+SgUEY= + + + Headers/WFCCMessage.h + + hash2 + + b32LtXrfugMv9vxXe/tA/rk41xt+e8ObTwX5OVIcw3Y= + + + Headers/WFCCMessageContent.h + + hash2 + + ZUosxN4ZrEZc5LvPK9LAXH0j6xRGHvXUiSuO7B7SP8I= + + + Headers/WFCCModifyGroupAliasNotificationContent.h + + hash2 + + 0EgehauC2ez48MrpabNN0yz2isB2ZIxFJGouIKcNMKE= + + + Headers/WFCCModifyGroupExtraNotificationContent.h + + hash2 + + wllrfca9rDDL+h5vY/49hXRSEkV6fkHjT1d+3t2mrqI= + + + Headers/WFCCModifyGroupMemberExtraNotificationContent.h + + hash2 + + vvdI3gmsn22GewXsrtCwLW8H/vprxgNdgsFRkBW601U= + + + Headers/WFCCMultiCallOngoingMessageContent.h + + hash2 + + FUXfJtGBWghjBX7GTYXvOE21kR3q4Ap1FbiyXkntgl4= + + + Headers/WFCCNetworkService.h + + hash2 + + u7/nKUxTVnTIJOvcoRo63P7OVmQ604HPdR9G4rcjlpo= + + + Headers/WFCCNotDeliveredMessageContent.h + + hash2 + + gHNvnH4GdODwGySG/8DFUw7aL9ab69LGBMuYqQ2YXks= + + + Headers/WFCCNotificationMessageContent.h + + hash2 + + YUZRfLun/R7I0bqHw4Mrl7KnnhfKaj0/wnbM0IDC9Pg= + + + Headers/WFCCPCLoginRequestMessageContent.h + + hash2 + + TAI09QlP7msC4SY0HrdIsyX1ootM+izGqQAdB3vRpqY= + + + Headers/WFCCPCOnlineInfo.h + + hash2 + + u41qwzHVYIrR+jZEvDimNA4YkNTwlYa6DGH8BaLK9ks= + + + Headers/WFCCPTTSoundMessageContent.h + + hash2 + + uzOi0HhJUOs0f4ktkgNc4xjCD1dTn8n5lEzoTc4jjSs= + + + Headers/WFCCPTextMessageContent.h + + hash2 + + XvZRKc8mf2/ZkoBHyDwnMLrng068LcZ13kzwSReKeOA= + + + Headers/WFCCProtocol.h + + hash2 + + 9o0gXvEi64Dd55DhgP6FPY/rZQg1vSIgfz3rXFnYHFg= + + + Headers/WFCCQuitGroupNotificationContent.h + + hash2 + + nmH0DF0aPGko6SbGYUf8+s+RFrQsJmvARGD34QAJxG8= + + + Headers/WFCCQuitGroupVisibleNotificationContent.h + + hash2 + + CuwdqTD5998kNuu0JcxS5Az+EmbfWjJReUuabz/Khas= + + + Headers/WFCCQuoteInfo.h + + hash2 + + HAwGIa4WqeAMr18p0GnQZlAtK7s9E3ihLD0Jaid98Vo= + + + Headers/WFCCRawMessageContent.h + + hash2 + + KIz5yhX9/j8m8xgWvw+ELYb4Ic+t52rEdDvg8i7jMqY= + + + Headers/WFCCReadReport.h + + hash2 + + rb7Q1EBA8r69zD0qiFTZn39sDs/oDiE441mqfdkiXh4= + + + Headers/WFCCRecallMessageContent.h + + hash2 + + 4R32Hfzp8TJRJ/Tk6B9zLNlUHExhecCwQWQnkFuEiiI= + + + Headers/WFCCRichNotificationMessageContent.h + + hash2 + + AWLzzGhyJma3YPMkATkkyqg5HlibEtPPGzwBDvPwZIU= + + + Headers/WFCCSecretChatInfo.h + + hash2 + + nI0vyOBAZvUzP0U37E9A9srzyBkpsjrTB2ATuVj7Kg0= + + + Headers/WFCCSoundMessageContent.h + + hash2 + + QcRbqxV27KMf/X8BQkrEn5jlEKg+5y5/wOzuxWAvS9w= + + + Headers/WFCCStartSecretChatMessageContent.h + + hash2 + + zVx5tl6i3NxpMLBX31K56SRqqeaytZORhC155BAReX0= + + + Headers/WFCCStickerMessageContent.h + + hash2 + + u+ZA58dpp4fGpgt9h83RjYiUjhMSYvcikS6w3S8O0co= + + + Headers/WFCCStreamingTextGeneratedMessageContent.h + + hash2 + + j4yUn7cF4oon36TRIsHKKtGVyfUaRWA4px3T3G2cf1I= + + + Headers/WFCCStreamingTextGeneratingMessageContent.h + + hash2 + + UItFJ9Sz9qIpBgv7yiyg/qqUecTV+QWquwxxpU8d9eg= + + + Headers/WFCCTextMessageContent.h + + hash2 + + 3eXlmFboM0t2OueHk+0BWwrcTz69Xm7kS4s4YVqHW+Y= + + + Headers/WFCCThingsDataContent.h + + hash2 + + YGvz8OLe1OD+lFQ17Y+uoAWaWx9KaiSEfPXtlZzobCk= + + + Headers/WFCCThingsLostEventContent.h + + hash2 + + AO38+ub8YBjHe/S3FcFXi6APYTBz1x1s7KpA+3PIXTA= + + + Headers/WFCCTipNotificationMessageContent.h + + hash2 + + 90RsFbgpcU6nG7UDzgXhe8VMRY4UDWpJbOLhyerU9pQ= + + + Headers/WFCCTransferGroupOwnerNotificationContent.h + + hash2 + + YGI11q4MRfksjgvqvIs6M7cOwRuQOimeTS4UtJ9BTKQ= + + + Headers/WFCCTypingMessageContent.h + + hash2 + + LkZ8mliAFqDgG1lgsFcc/956jRa+dWiMwfgkUzl/lnk= + + + Headers/WFCCUnknownMessageContent.h + + hash2 + + NpelLyOoJaPjiony8BiFENJKfUGX9/CmDoPkAxalSRw= + + + Headers/WFCCUnreadCount.h + + hash2 + + WXsnUNjKVv7ZLm292UKOidK0hrONKryavW9IZyJLUoQ= + + + Headers/WFCCUserInfo.h + + hash2 + + 3WCjD1cFMpZKuQCFJLf1y6zkEAba2E+SNp/g2GR/y4s= + + + Headers/WFCCUserOnlineState.h + + hash2 + + 4q1EGCs8+qY9p74Q4Tmib7ZisLHSjDkJ5kd4tlvKoXE= + + + Headers/WFCCUtilities.h + + hash2 + + DORRwQpFPlDe7v7nLakyPNjn5Q4wnncxMPctNDELjCM= + + + Headers/WFCCVideoMessageContent.h + + hash2 + + dAzsmak0E5VmmiaDL6mlrhniCf97j7d3ksK8KMHFwmU= + + + Headers/WFCChatClient.h + + hash2 + + SN/V2LZZOrL/mx0ZsSQ1aoO1aV8DmyBEVVjt+B9o4Wk= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/Info.plist b/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/Info.plist new file mode 100644 index 00000000..64e6d6bc --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/Info.plist @@ -0,0 +1,44 @@ + + + + + AvailableLibraries + + + BinaryPath + WFClientUniPlugin.framework/WFClientUniPlugin + LibraryIdentifier + ios-arm64 + LibraryPath + WFClientUniPlugin.framework + SupportedArchitectures + + arm64 + + SupportedPlatform + ios + + + BinaryPath + WFClientUniPlugin.framework/WFClientUniPlugin + LibraryIdentifier + ios-arm64_x86_64-simulator + LibraryPath + WFClientUniPlugin.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64/WFClientUniPlugin.framework/Info.plist b/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64/WFClientUniPlugin.framework/Info.plist new file mode 100644 index 00000000..e879dcce Binary files /dev/null and b/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64/WFClientUniPlugin.framework/Info.plist differ diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64/WFClientUniPlugin.framework/WFClientUniPlugin b/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64/WFClientUniPlugin.framework/WFClientUniPlugin new file mode 100644 index 00000000..ee5d0215 Binary files /dev/null and b/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64/WFClientUniPlugin.framework/WFClientUniPlugin differ diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64/WFClientUniPlugin.framework/_CodeSignature/CodeDirectory b/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64/WFClientUniPlugin.framework/_CodeSignature/CodeDirectory new file mode 100644 index 00000000..f27c6378 Binary files /dev/null and b/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64/WFClientUniPlugin.framework/_CodeSignature/CodeDirectory differ diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64/WFClientUniPlugin.framework/_CodeSignature/CodeRequirements b/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64/WFClientUniPlugin.framework/_CodeSignature/CodeRequirements new file mode 100644 index 00000000..e47bbb61 Binary files /dev/null and b/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64/WFClientUniPlugin.framework/_CodeSignature/CodeRequirements differ diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64/WFClientUniPlugin.framework/_CodeSignature/CodeRequirements-1 b/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64/WFClientUniPlugin.framework/_CodeSignature/CodeRequirements-1 new file mode 100644 index 00000000..e421ea6f Binary files /dev/null and b/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64/WFClientUniPlugin.framework/_CodeSignature/CodeRequirements-1 differ diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64/WFClientUniPlugin.framework/_CodeSignature/CodeResources b/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64/WFClientUniPlugin.framework/_CodeSignature/CodeResources new file mode 100644 index 00000000..b72585f2 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64/WFClientUniPlugin.framework/_CodeSignature/CodeResources @@ -0,0 +1,101 @@ + + + + + files + + Info.plist + + Edg5rJBJ4TsmLkqIHL+p7R3c5/Y= + + + files2 + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64/WFClientUniPlugin.framework/_CodeSignature/CodeSignature b/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64/WFClientUniPlugin.framework/_CodeSignature/CodeSignature new file mode 100644 index 00000000..1c9716d7 Binary files /dev/null and b/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64/WFClientUniPlugin.framework/_CodeSignature/CodeSignature differ diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64_x86_64-simulator/WFClientUniPlugin.framework/Info.plist b/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64_x86_64-simulator/WFClientUniPlugin.framework/Info.plist new file mode 100644 index 00000000..041a9a49 Binary files /dev/null and b/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64_x86_64-simulator/WFClientUniPlugin.framework/Info.plist differ diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64_x86_64-simulator/WFClientUniPlugin.framework/WFClientUniPlugin b/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64_x86_64-simulator/WFClientUniPlugin.framework/WFClientUniPlugin new file mode 100644 index 00000000..a5655b74 Binary files /dev/null and b/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64_x86_64-simulator/WFClientUniPlugin.framework/WFClientUniPlugin differ diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64_x86_64-simulator/WFClientUniPlugin.framework/_CodeSignature/CodeDirectory b/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64_x86_64-simulator/WFClientUniPlugin.framework/_CodeSignature/CodeDirectory new file mode 100644 index 00000000..0c221532 Binary files /dev/null and b/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64_x86_64-simulator/WFClientUniPlugin.framework/_CodeSignature/CodeDirectory differ diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64_x86_64-simulator/WFClientUniPlugin.framework/_CodeSignature/CodeRequirements b/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64_x86_64-simulator/WFClientUniPlugin.framework/_CodeSignature/CodeRequirements new file mode 100644 index 00000000..dbf9d614 Binary files /dev/null and b/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64_x86_64-simulator/WFClientUniPlugin.framework/_CodeSignature/CodeRequirements differ diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64_x86_64-simulator/WFClientUniPlugin.framework/_CodeSignature/CodeRequirements-1 b/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64_x86_64-simulator/WFClientUniPlugin.framework/_CodeSignature/CodeRequirements-1 new file mode 100644 index 00000000..39e93fcc Binary files /dev/null and b/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64_x86_64-simulator/WFClientUniPlugin.framework/_CodeSignature/CodeRequirements-1 differ diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64_x86_64-simulator/WFClientUniPlugin.framework/_CodeSignature/CodeResources b/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64_x86_64-simulator/WFClientUniPlugin.framework/_CodeSignature/CodeResources new file mode 100644 index 00000000..e4057316 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64_x86_64-simulator/WFClientUniPlugin.framework/_CodeSignature/CodeResources @@ -0,0 +1,101 @@ + + + + + files + + Info.plist + + Q/5mdW7y80BUozZhxnFgSrRY+QY= + + + files2 + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64_x86_64-simulator/WFClientUniPlugin.framework/_CodeSignature/CodeSignature b/nativeplugins/wf-uni-wfc-client/ios/WFClientUniPlugin.xcframework/ios-arm64_x86_64-simulator/WFClientUniPlugin.framework/_CodeSignature/CodeSignature new file mode 100644 index 00000000..e69de29b diff --git a/nativeplugins/wf-uni-wfc-client/package.json b/nativeplugins/wf-uni-wfc-client/package.json new file mode 100644 index 00000000..9e78a919 --- /dev/null +++ b/nativeplugins/wf-uni-wfc-client/package.json @@ -0,0 +1,57 @@ +{ + "name": "野火IM SDK", + "id": "wf-uni-wfc-client", + "version": "0.1.2", + "description": "野火IM 原生插件", + "_dp_type": "nativeplugin", + "_dp_nativeplugin": { + "android": { + "plugins": [ + { + "type": "module", + "name": "wf-uni-wfc-client", + "class": "cn.wildfirechat.uni.client.ClientModule" + } + ], + "hooksClass": "cn.wildfirechat.uni.client.ClientUniAppHookProxy", + "integrateType": "aar", + "dependencies": [ + "androidx.lifecycle:lifecycle-extensions:2.2.0" + ], + "abis": [ + "arm64-v8a", + "armeabi-v7a", + "x86" + ], + "minSdkVersion": 21, + "compileOptions": { + "sourceCompatibility": "1.8", + "targetCompatibility": "1.8" + }, + "useAndroidX": true + }, + "ios": { + "plugins": [ + { + "type": "module", + "name": "wf-uni-wfc-client", + "class": "WFClientModule" + } + ], + "frameworks": [ + "Bugly.framework", + "WFClientUniPlugin.xcframework", + "WFChatClient.xcframework" + ], + "embedFrameworks": [ + "WFChatClient.xcframework" + ], + "validArchitectures": [ + "arm64" + ], + "hooksClass": "WFClientProxy", + "integrateType": "framework", + "deploymentTarget": "11.0" + } + } +} \ No newline at end of file diff --git a/package.json b/package.json index 2a76fbd9..b83462cd 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,18 @@ "pinia-plugin-persist-uni": "^1.2.0", "vue": "^3.4.21", "vue-i18n": "^9.1.9", - "weixin-js-sdk": "^1.6.0" + "weixin-js-sdk": "^1.6.0", + "anchorme": "^2.1.2", + "base64-arraybuffer": "^1.0.2", + "emojilib": "^3.0.6", + "events": "^3.3.0", + "long": "^5.2.0", + "mitt": "^3.0.1", + "pinyin": "^4.0.0-alpha.0", + "resize-image": "^0.1.0", + "segmentit": "^2.0.3", + "twemoji": "^14.0.2", + "universal-emoji-parser": "1.0.125" }, "devDependencies": { "@dcloudio/types": "^3.4.8", diff --git a/src/ForwardType.js b/src/ForwardType.js new file mode 100644 index 00000000..0c761b83 --- /dev/null +++ b/src/ForwardType.js @@ -0,0 +1,17 @@ +export default class ForwardType { + /** + * 普通转发 + * @type {number} + */ + static NORMAL = 0; + /** + * 逐条转发 + * @type {number} + */ + static ONE_BY_ONE = 1; + /** + * 合并转发 + * @type {number} + */ + static COMPOSITE = 2; +} diff --git a/src/assets/images/icon.png b/src/assets/images/icon.png new file mode 100644 index 00000000..3a55ca45 Binary files /dev/null and b/src/assets/images/icon.png differ diff --git a/src/assets/images/user-fallback.png b/src/assets/images/user-fallback.png new file mode 100644 index 00000000..346686d3 Binary files /dev/null and b/src/assets/images/user-fallback.png differ diff --git a/src/assets/lang/en.json b/src/assets/lang/en.json new file mode 100644 index 00000000..595375e5 --- /dev/null +++ b/src/assets/lang/en.json @@ -0,0 +1,174 @@ +{ + "login": { + "desc": "Scan the QR code to login Wildfire IM", + "tip": "Wildfire IM Web client needs to be used with your mobile", + "warning": "Don't use WeChat to scan the QR code!!!", + "scan_qr_success": "Scan code successfully", + "confirm_login_tip": "Please confirm the login on your mobile", + "remember_me": "Remember me", + "cancel_login": "Cancel Login", + "login": "Login", + "switch_user": "Switch User", + "auto_login_tip": "Automatically logging in..." + }, + "contact": { + "new_friend": "New friend", + "group": "Group Chat", + "contact": "Contact", + "channel": "Channel" + }, + "friend_request": { + "request": "Friend Request", + "send_request_tip": "Send friend request to {0}", + "accepted": "Accepted", + "sent": "Sent", + "denied": "Rejected", + "im": "I am", + "intro": "Hello" + }, + "group": { + "name": "Group name {0}", + "chat": "Start group chat", + "fav": "Save to contact list" + }, + "message":{ + "send_message": "Send Message", + "records": "Chat Records", + "unsupport_message_desc": "This message type is not supported, please check it on your phone", + "receipt": "Message Receipt", + "receipt_detail": "Message Receipt Detail", + "receipt_read_users": "Read", + "receipt_received_users": "Delivered", + "receipt_unreceived_users": "Undelivered", + "sender": "Message Sender", + "content": "Message content" + }, + "conversation": { + "forward_title": "Send separately", + "picked_contact": "Selected contact", + "create_group": "Create a group chat", + "recent_conversation": "Recent Chat", + "not_select_conversation": "Not select any chat", + "select_conversation_desc": "{0} chats selected", + "forward_extra": "Leave a message to friend", + "forward_one_by_one": "Forward one by one", + "forward_composite": "Merge Forward", + "user_message_records": "{0}’s chat records", + "group_message_records": "Group Chat Records", + "drag_to_send_to": "Drag here to send to {0}", + "no_more_message": "No more messages", + "all_message_load": "All messages have been loaded :(", + "drag_to_send_limit_tip": "Send up to 5 files at a time", + "not_support_send_folder": "Not support send folder", + "group_name": "Group name", + "group_announcement": "Group announcement", + "add_member": "Add member", + "remove_member": "Remove member", + "quit_group": "Quit group chat", + "click_to_edit_group_announcement": "click to edit group announcement", + "all_people": "Everyone", + "sticky_top": "sticky_top", + "cancel_sticky_top": "Cancel sticky top", + "enable_notification": "Allow notification", + "disable_notification": "Not disturb", + "mark_as_unread": "Mark as unread", + "mark_as_read": "Mark as read" + }, + "fav": { + "fav": "Collection", + "all": "All Collection", + "file": "File", + "media": "Album", + "composite": "Chat Record", + "from": "From", + "no_more": "No more favorites", + "all_fav_load": "All favorites have been loaded :(" + }, + "voip": { + "desc": "Audio and Video Call", + "not_answer": "The other party did not answer", + "ongoing": "Calling", + "duration": "Call duration" + }, + "pick": { + "pick_contact": "Select Contact", + "picked_contact": "Selected contact" + }, + "search": { + "new_user": "New User", + "view_all": "View All", + "message_history": "Chat History", + "search_message_history": "Search chat history..." + }, + "file_record": { + "no_more": "No more files", + "all_file_load": "All files have been loaded :(" + }, + "setting": { + "setting": "Settings", + "enable_notification": "Enable notification", + "enable_notification_detail": "Notification display message content", + "close_window_to_exit": "When closing the window, exit directly", + "auto_login": "Remember me", + "exit_switch_user": "Exit/Switch Account", + "feedback": "Send feedback to us", + "lang": "Language (valid after restart)", + "zh_cn": "简体中文", + "zh_tw": "繁體中文", + "en": "English", + "sync_draft": "Sync draft" + }, + "common": { + "add": "Add", + "remove": "Remove", + "send": "Send", + "contact": "Contact", + "confirm": "Confirm", + "cancel": "Cancel", + "alias": "Remarks", + "area": "Area", + "label": "Label", + "conversation": "Chat", + "sender": "Sender", + "all": "All", + "mine": "Mine", + "unknown": "Unknown", + "search": "Search", + "back": "Back", + "create": "Create", + "none": "None", + "copy": "Copy", + "paste": "Paste", + "cut": "Cut", + "delete": "Delete", + "forward": "forward", + "fav": "Collection", + "quote": "quote", + "multi_select": "Multiselect", + "recall": "Recall", + "open": "Open", + "open_dir": "Open Directory", + "draft": "Draft", + "save": "Save", + "month_1": "January", + "month_2": "February", + "month_3": "March Month", + "month_4": "April", + "month_5": "May", + "month_6": "June", + "month_7": "July", + "month_8": "August", + "month_9": "September", + "month_10": "October", + "month_11": "November", + "month_12": "December", + "wfc_id": "ID" + }, + "misc":{ + "beijing": "Beijing", + "test_user": "Test User", + "gen_qr_code": "Generating QR code", + "send_to_friend": "Send to Friend..." + + } +} \ No newline at end of file diff --git a/src/assets/lang/zh-CN.json b/src/assets/lang/zh-CN.json new file mode 100644 index 00000000..8f0c4ec8 --- /dev/null +++ b/src/assets/lang/zh-CN.json @@ -0,0 +1,174 @@ +{ + "login": { + "desc": "扫码登录野火IM", + "tip": "野火IM Web端需要配合您的手机客户端登录使用", + "warning": "不是使用微信扫码登录!!!", + "scan_qr_success": "扫码成功", + "confirm_login_tip": "请在手机上点击确认以登录", + "remember_me": "记住登录", + "cancel_login": "取消登录", + "login": "登录", + "switch_user": "切换用户", + "auto_login_tip": "自动登录中..." + }, + "contact": { + "new_friend": "新的朋友", + "group": "群聊", + "contact": "联系人", + "channel": "频道" + }, + "friend_request": { + "request": "好友请求", + "send_request_tip": "向{0}发送好球请求", + "accepted": "已添加", + "sent": "已发送", + "denied": "已拒绝", + "im": "我是", + "intro": "你好" + }, + "group": { + "name": "群名称{0}", + "chat": "进入群聊", + "fav": "保存到通讯录" + }, + "message":{ + "send_message": "发消息", + "records": "聊天记录", + "unsupport_message_desc": "不支持该消息类型,请在手机上查看", + "receipt": "消息回执", + "receipt_detail": "消息回执信息", + "receipt_read_users": "已读人员", + "receipt_received_users": "已送达", + "receipt_unreceived_users": "未送达", + "sender": "消息发送者", + "content": "消息内容" + }, + "conversation": { + "forward_title": "分别发送给", + "picked_contact": "已选择联系人", + "create_group": "创建群聊", + "recent_conversation": "最近聊天", + "not_select_conversation": "未选择聊天", + "select_conversation_desc": "已选择{0}个聊天", + "forward_extra": "给朋友留言", + "forward_one_by_one": "逐条转发", + "forward_composite": "合并转发", + "user_message_records": "{0}的聊天记录", + "group_message_records": "群聊的聊天记录", + "drag_to_send_to": "拖拽到此发送给{0}", + "no_more_message": "没有更多消息", + "all_message_load": "已加载全部消息 :(", + "drag_to_send_limit_tip": "一次最多发送5个文件", + "not_support_send_folder": "不支持发送文件夹", + "group_name": "群名", + "group_announcement": "群公告", + "add_member": "添加成员", + "remove_member": "移除成员", + "quit_group": "退出群聊", + "click_to_edit_group_announcement": "点击编辑群公告", + "all_people": "所有人", + "sticky_top": "置顶", + "cancel_sticky_top": "取消置顶", + "enable_notification": "允许通知", + "disable_notification": "消息免打扰", + "mark_as_unread": "标记为未读", + "mark_as_read": "标记为已读" + }, + "fav": { + "fav": "收藏", + "all": "全部收藏", + "file": "文件", + "media": "相册", + "composite": "聊天记录", + "from": "来自", + "no_more": "没有更多收藏", + "all_fav_load": "已加载全部收藏 :(" + }, + "voip": { + "desc": "音视频通话", + "not_answer": "对方未接听", + "ongoing": "通话中", + "duration": "通话时长" + }, + "pick": { + "pick_contact": "选择联系人", + "picked_contact": "已选择联系人" + }, + "search": { + "new_user": "新用户", + "view_all": "查看全部", + "message_history": "聊天记录", + "search_message_history": "搜索聊天记录..." + }, + "file_record": { + "no_more": "没有更多文件", + "all_file_load": "已加载全部文件 :(" + }, + "setting": { + "setting": "设置", + "enable_notification": "开启通知", + "enable_notification_detail": "通知显示消息内容", + "close_window_to_exit": "关闭窗口时,直接退出", + "enable_minimize": "支持最小化", + "auto_login": "记住登录", + "exit_switch_user": "退出/切换账号", + "feedback": "发送反馈给我们", + "lang": "语言(重启生效)", + "zh_cn": "简体中文", + "zh_tw": "繁體中文", + "en": "English", + "sync_draft": "同步草稿" + }, + "common": { + "add": "添加", + "remove": "移除", + "send": "发送", + "contact": "联系人", + "confirm": "确认", + "cancel": "取消", + "alias": "备注", + "area": "地区", + "label": "标签", + "conversation": "聊天", + "sender": "发送者", + "all": "全部", + "mine": "我的", + "unknown": "未知", + "search": "搜索", + "back": "返回", + "create": "创建", + "none": "无", + "copy": "复制", + "paste": "粘贴", + "cut": "剪切", + "delete": "删除", + "forward": "转发", + "fav": "收藏", + "quote": "引用", + "multi_select": "多选", + "recall": "撤回", + "open": "打开", + "open_dir": "打开目录", + "draft": "草稿", + "save": "存储", + "month_1": "一月", + "month_2": "二月", + "month_3": "三月", + "month_4": "四月", + "month_5": "五月", + "month_6": "六月", + "month_7": "七月", + "month_8": "八月", + "month_9": "九月", + "month_10": "十月", + "month_11": "十一月", + "month_12": "十二月", + "wfc_id": "野火号" + }, + "misc":{ + "beijing": "北京", + "test_user": "测试用户", + "gen_qr_code": "二维码生成中", + "send_to_friend": "发送给朋友..." + } +} \ No newline at end of file diff --git a/src/assets/lang/zh-TW.json b/src/assets/lang/zh-TW.json new file mode 100644 index 00000000..4b352cd2 --- /dev/null +++ b/src/assets/lang/zh-TW.json @@ -0,0 +1,174 @@ +{ + "login": { + "desc": "掃碼登錄野火IM", + "tip": "野火IM Web端需要配合您的手機客戶端登錄使用", + "warning": "不是使用微信掃碼登錄!!!", + "scan_qr_success": "掃碼成功", + "confirm_login_tip": "請在手機上點擊確認以登錄", + "remember_me": "記住登錄", + "cancel_login": "取消登錄", + "login": "登錄", + "switch_user": "切換用戶", + "auto_login_tip": "自動登錄中..." + }, + "contact": { + "new_friend": "新的朋友", + "group": "群聊", + "contact": "聯系人", + "channel": "频道" + }, + "friend_request": { + "request": "好友請求", + "send_request_tip": "向{0}發送好球請求", + "accepted": "已添加", + "sent": "已發送", + "denied": "已拒絕", + "im": "我是", + "intro": "你好" + }, + "group": { + "name": "群名稱{0}", + "chat": "進入群聊", + "fav": "保存到通訊錄" + }, + "message": { + "send_message": "發消息", + "records": "聊天記錄", + "unsupport_message_desc": "不支持該消息類型,請在手機上查看", + "receipt": "消息回執", + "receipt_detail": "消息回執信息", + "receipt_read_users": "已讀人員", + "receipt_received_users": "已送達", + "receipt_unreceived_users": "未送達", + "sender": "消息發送者", + "content": "消息內容" + }, + "conversation": { + "forward_title": "分別發送給", + "picked_contact": "已選擇聯系人", + "create_group": "創建群聊", + "recent_conversation": "最近聊天", + "not_select_conversation": "未選擇聊天", + "select_conversation_desc": "已選擇{0}個聊天", + "forward_extra": "給朋友留言", + "forward_one_by_one": "逐條轉發", + "forward_composite": "合並轉發", + "user_message_records": "{0}的聊天記錄", + "group_message_records": "群聊的聊天記錄", + "drag_to_send_to": "拖拽到此發送給{0}", + "no_more_message": "沒有更多消息", + "all_message_load": "已加載全部消息 :(", + "drag_to_send_limit_tip": "一次最多發送5個文件", + "not_support_send_folder": "不支持發送文件夾", + "group_name": "群名", + "group_announcement": "群公告", + "add_member": "添加成員", + "remove_member": "移除成員", + "quit_group": "退出群聊", + "click_to_edit_group_announcement": "點擊編輯群公告", + "all_people": "所有人", + "sticky_top": "置頂", + "cancel_sticky_top": "取消置頂", + "enable_notification": "允許通知", + "disable_notification": "消息免打擾", + "mark_as_unread": "標記為未讀", + "mark_as_read": "標記為已讀" + }, + "fav": { + "fav": "收藏", + "all": "全部收藏", + "file": "文件", + "media": "相冊", + "composite": "聊天記錄", + "from": "來自", + "no_more": "沒有更多收藏", + "all_fav_load": "已加載全部收藏 :(" + }, + "voip": { + "desc": "音視頻通話", + "not_answer": "對方未接聽", + "ongoing": "通話中", + "duration": "通話時長" + }, + "pick": { + "pick_contact": "選擇聯系人", + "picked_contact": "已選擇聯系人" + }, + "search": { + "new_user": "新用戶", + "view_all": "查看全部", + "message_history": "聊天記錄", + "search_message_history": "搜索聊天記錄..." + }, + "file_record": { + "no_more": "沒有更多文件", + "all_file_load": "已加載全部文件 :(" + }, + "setting": { + "setting": "設置", + "enable_notification": "開啟通知", + "enable_notification_detail": "通知顯示消息內容", + "close_window_to_exit": "關閉窗口時,直接退出", + "enable_minimize": "支持最小化", + "auto_login": "記住登錄", + "exit_switch_user": "退出/切換賬號", + "feedback": "發送反饋給我們", + "lang": "語言(重啟生效)", + "zh_cn": "简体中文", + "zh_tw": "繁體中文", + "en": "English", + "sync_draft": "同步草稿" + }, + "common": { + "add": "添加", + "remove": "移除", + "send": "發送", + "contact": "聯系人", + "confirm": "確認", + "cancel": "取消", + "alias": "備註", + "area": "地區", + "label": "標簽", + "conversation": "聊天", + "sender": "發送者", + "all": "全部", + "mine": "我的", + "unknown": "未知", + "search": "搜索", + "back": "返回", + "create": "創建", + "none": "無", + "copy": "復製", + "paste": "粘貼", + "cut": "剪切", + "delete": "刪除", + "forward": "轉發", + "fav": "收藏", + "quote": "引用", + "multi_select": "多選", + "recall": "撤回", + "open": "打開", + "open_dir": "打開目錄", + "draft": "草稿", + "save": "存儲", + "month_1": "一月", + "month_2": "二月", + "month_3": "三月", + "month_4": "四月", + "month_5": "五月", + "month_6": "六月", + "month_7": "七月", + "month_8": "八月", + "month_9": "九月", + "month_10": "十月", + "month_11": "十一月", + "month_12": "十二月", + "wfc_id": "野火號" + }, + "misc": { + "beijing": "北京", + "test_user": "測試用戶", + "gen_qr_code": "二維碼生成中", + "send_to_friend": "發送給朋友..." + } +} diff --git a/src/components/chunLei-popups/chunLei-popups.vue b/src/components/chunLei-popups/chunLei-popups.vue new file mode 100644 index 00000000..4158d5ed --- /dev/null +++ b/src/components/chunLei-popups/chunLei-popups.vue @@ -0,0 +1,332 @@ + + + + + diff --git a/src/components/main-action-menu/main-action-menu.vue b/src/components/main-action-menu/main-action-menu.vue new file mode 100644 index 00000000..009c3d54 --- /dev/null +++ b/src/components/main-action-menu/main-action-menu.vue @@ -0,0 +1,250 @@ + + + + diff --git a/src/main.ts b/src/main.ts index e00b21aa..a3460a50 100644 --- a/src/main.ts +++ b/src/main.ts @@ -4,12 +4,90 @@ import { createSSRApp } from 'vue'; import { setupPinia } from './sheep/store'; import './main.scss'; import 'virtual:uno.css'; +// @ts-ignore +import wfc from './wfc/client/wfc'; +// @ts-ignore +import Config from './config'; +// @ts-ignore +import store from './store'; +// @ts-ignore +import { getItem } from '@/sheep/util/storageHelper'; +import { createI18n } from 'vue-i18n'; +// @ts-ignore +import zhCNLang from './assets/lang/zh-CN.json'; +// @ts-ignore +import zhTWLang from './assets/lang/zh-TW.json'; +// @ts-ignore +import enLang from './assets/lang/en.json'; +import mitt from 'mitt'; export function createApp() { const app = createSSRApp(App); setupPinia(app); + const i18n = createI18n({ + // 使用localStorage存储语言状态是为了保证页面刷新之后还是保持原来选择的语言状态 + locale: getItem('lang') ? getItem('lang') : 'zh-CN', // 定义默认语言为中文 + allowComposition: true, + messages: { + 'zh-CN': zhCNLang, + 'zh-TW': zhTWLang, + en: enLang, + }, + }); + app.use(i18n); + + // 如果不存在会话页面,则入栈,如果已经存在会话页面,则返回到该页面 + app.config.globalProperties.$go2ConversationPage = () => { + let pages = getCurrentPages(); + let cvRoute = 'pages/conversation/ConversationPage'; + let delta = 0; + let found = false; + for (let i = pages.length - 1; i >= 0; i--) { + if (pages[i].route === cvRoute) { + found = true; + break; + } else { + delta++; + } + } + if (found) { + uni.navigateBack({ + delta: delta, + fail: (err) => { + console.log('nav back to conversationView err', err); + }, + }); + } else { + uni.navigateTo({ + url: '/pages/conversation/ConversationPage', + success: () => { + console.log('nav to conversationPage success'); + }, + fail: (err) => { + console.log('nav to conversationPage err', err); + }, + }); + } + }; + + const eventBus = mitt(); + // @ts-ignore + eventBus.$on = eventBus.on; + // @ts-ignore + eventBus.$off = eventBus.off; + // @ts-ignore + eventBus.$emit = eventBus.emit; + app.config.globalProperties.$eventBus = eventBus; + // @ts-ignore + app.config.globalProperties.$set = (obj, key, value) => (obj[key] = value); + + // #ifdef APP-PLUS + wfc.init(); + store.init(); + // #endif + return { app, }; diff --git a/src/manifest.json b/src/manifest.json index a1d59678..e608c67b 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,6 +1,6 @@ { "name" : "荷塘月色", - "appid" : "__UNI__460BC4C", + "appid" : "__UNI__5B53E65", "description" : "聊天交友app", "versionName" : "2025.10", "versionCode" : 0, @@ -49,7 +49,6 @@ "", "", "", - "", "", "", "", @@ -65,7 +64,10 @@ "" ], "minSdkVersion" : 21, - "schemes" : "shopro" + "schemes" : "shopro", + "excludePermissions" : [ + "" + ] }, "ios" : { "urlschemewhitelist" : [ "baidumap", "iosamap" ], @@ -113,9 +115,14 @@ }, "orientation" : [ "portrait-primary" ], "splashscreen" : { - "androidStyle" : "common", + "androidStyle" : "default", "iosStyle" : "common", - "useOriginalMsgbox" : true + "useOriginalMsgbox" : true, + "android" : { + "hdpi" : "C:/Users/20513/Pictures/login-bg.png", + "xhdpi" : "C:/Users/20513/Pictures/login-bg.png", + "xxhdpi" : "C:/Users/20513/Pictures/login-bg.png" + } }, "icons" : { "android" : { @@ -149,6 +156,22 @@ } } } + }, + "nativePlugins" : { + "wf-uni-wfc-client" : { + "__plugin_info__" : { + "name" : "【官方】野火即时通讯IM插件", + "description" : "野火官方发布移动端即时通讯插件,包括Android和iOS平台,拥有完善的Demo,支持单人、群组和聊天室会话,支持文字、语音、图片等常见消息,服务器和移动端免费使用,让您一步拥有完美的即时通讯软件。", + "platforms" : "Android,iOS", + "url" : "https://ext.dcloud.net.cn/plugin?id=7895", + "android_package_name" : "uni.app.UNIB94390A", + "ios_bundle_id" : "uni.app.UNIB94390A", + "isCloud" : true, + "bought" : 1, + "pid" : "7895", + "parameters" : {} + } + } } }, "quickapp" : {}, @@ -209,7 +232,7 @@ "async" : { "timeout" : 20000 }, - "title" : "芋道商城", + "title" : "聊天交友", "optimization" : { "treeShaking" : { "enable" : true diff --git a/src/pages.json b/src/pages.json index 4f14bd21..58dd4ebb 100644 --- a/src/pages.json +++ b/src/pages.json @@ -115,6 +115,51 @@ "navigationStyle": "custom" } } + // { + // "path": "pages/conversation/ConversationPage", + // "style": { + // "navigationBarTitleText": "会话详情", + // "enablePullDownRefresh": false, + // "disableScroll": true, + // "app-plus": { + // "titleNView": { + // "buttons": [ + // { + // "text": "\ue623", + // "fontSrc": "/static/iconfonts/wx_iconfont.ttf", + // "fontSize": "28px" + // } + // ] + // }, + // "softinputMode": "adjustResize", + // "bounce": "none" + // } + // } + // } + // { + // "path": "pages/conversation/message/CompositeMessagePage", + // "style": { + // "navigationBarTitleText": "组合消息预览" + // } + // }, + // { + // "path": "pages/conversation/SingleConversationInfoPage", + // "style": { + // "navigationBarTitleText": "单人会话信息" + // } + // }, + // { + // "path": "pages/conversation/message/forward/ForwardMessagePage", + // "style": { + // "navigationBarTitleText": "消息转发" + // } + // }, + // { + // "path": "pages/conversation/GroupConversationInfoPage", + // "style": { + // "navigationBarTitleText": "群会话信息" + // } + // } ], "subPackages": [ { diff --git a/src/pages/common/LoadingView.vue b/src/pages/common/LoadingView.vue new file mode 100644 index 00000000..b5d3c39d --- /dev/null +++ b/src/pages/common/LoadingView.vue @@ -0,0 +1,143 @@ + + + + + diff --git a/src/pages/messages/1.vue b/src/pages/messages/1.vue new file mode 100644 index 00000000..63bc9c13 --- /dev/null +++ b/src/pages/messages/1.vue @@ -0,0 +1,46 @@ + + + diff --git a/src/pages/messages/components/ConversationItemView.vue b/src/pages/messages/components/ConversationItemView.vue new file mode 100644 index 00000000..b0b97512 --- /dev/null +++ b/src/pages/messages/components/ConversationItemView.vue @@ -0,0 +1,269 @@ + + + + + diff --git a/src/pages/messages/messages.vue b/src/pages/messages/messages.vue index 23d96412..a3d9caf1 100644 --- a/src/pages/messages/messages.vue +++ b/src/pages/messages/messages.vue @@ -16,50 +16,282 @@ - - - - - - - - - {{ message.username || '发放' }} - {{ message.time || 'ww' }} - - - - {{ message.lastMessage || '啊发发看来福娃' }} - - - - - - + + + + + {{ connectionStatusDesc }} + + + + + + + + + - + + diff --git a/src/pages/profile/profile.vue b/src/pages/profile/profile.vue index b036c669..e608eeb2 100644 --- a/src/pages/profile/profile.vue +++ b/src/pages/profile/profile.vue @@ -16,6 +16,12 @@ + + + + + + { + uni.showToast({ + title: '发送验证码成功', + icon: 'none', + }); + }) + .catch((reason) => { + uni.showToast({ + title: reason, + icon: 'none', + }); + }); + } + function bindLoginTap(e) { + console.log(phone.value); + login(phone.value, code.value); + } + function login(phone, code) { + console.log('login', wfc.getClientId(), Config.getWFCPlatform()); + appServerApi + .loginWithAuthCode(phone, code) + .then((result) => { + console.log('login result', result); + let userId = result.userId; + let token = result.token; + wfc.connect(userId, token); + setItem('userId', userId); + setItem('im-token', token); + }) + .catch((r) => { + console.log('login failed', r); + uni.showToast({ + title: r, + icon: 'none', + }); + }); + } + // #endif diff --git a/src/permission.js b/src/permission.js new file mode 100644 index 00000000..575d30ed --- /dev/null +++ b/src/permission.js @@ -0,0 +1,264 @@ +/// null = 未请求,1 = 已允许,0 = 拒绝|受限, 2 = 系统未开启 + +var isIOS + +function album() { + var result = 0; + var PHPhotoLibrary = plus.ios.import("PHPhotoLibrary"); + var authStatus = PHPhotoLibrary.authorizationStatus(); + if (authStatus === 0) { + result = null; + } else if (authStatus == 3) { + result = 1; + } else { + result = 0; + } + plus.ios.deleteObject(PHPhotoLibrary); + return result; +} + +function camera() { + var result = 0; + var AVCaptureDevice = plus.ios.import("AVCaptureDevice"); + var authStatus = AVCaptureDevice.authorizationStatusForMediaType('vide'); + if (authStatus === 0) { + result = null; + } else if (authStatus == 3) { + result = 1; + } else { + result = 0; + } + plus.ios.deleteObject(AVCaptureDevice); + return result; +} + +function location() { + var result = 0; + var cllocationManger = plus.ios.import("CLLocationManager"); + var enable = cllocationManger.locationServicesEnabled(); + var status = cllocationManger.authorizationStatus(); + if (!enable) { + result = 2; + } else if (status === 0) { + result = null; + } else if (status === 3 || status === 4) { + result = 1; + } else { + result = 0; + } + plus.ios.deleteObject(cllocationManger); + return result; +} + +function push() { + var result = 0; + var UIApplication = plus.ios.import("UIApplication"); + var app = UIApplication.sharedApplication(); + var enabledTypes = 0; + if (app.currentUserNotificationSettings) { + var settings = app.currentUserNotificationSettings(); + enabledTypes = settings.plusGetAttribute("types"); + if (enabledTypes == 0) { + result = 0; + console.log("推送权限没有开启"); + } else { + result = 1; + console.log("已经开启推送功能!") + } + plus.ios.deleteObject(settings); + } else { + enabledTypes = app.enabledRemoteNotificationTypes(); + if (enabledTypes == 0) { + result = 3; + console.log("推送权限没有开启!"); + } else { + result = 4; + console.log("已经开启推送功能!") + } + } + plus.ios.deleteObject(app); + plus.ios.deleteObject(UIApplication); + return result; +} + +function contact() { + var result = 0; + var CNContactStore = plus.ios.import("CNContactStore"); + var cnAuthStatus = CNContactStore.authorizationStatusForEntityType(0); + if (cnAuthStatus === 0) { + result = null; + } else if (cnAuthStatus == 3) { + result = 1; + } else { + result = 0; + } + plus.ios.deleteObject(CNContactStore); + return result; +} + +function record() { + var result = null; + var avaudiosession = plus.ios.import("AVAudioSession"); + var avaudio = avaudiosession.sharedInstance(); + var status = avaudio.recordPermission(); + console.log("permissionStatus:" + status); + if (status === 1970168948) { + result = null; + } else if (status === 1735552628) { + result = 1; + } else { + result = 0; + } + plus.ios.deleteObject(avaudiosession); + return result; +} + +function calendar() { + var result = null; + var EKEventStore = plus.ios.import("EKEventStore"); + var ekAuthStatus = EKEventStore.authorizationStatusForEntityType(0); + if (ekAuthStatus == 3) { + result = 1; + console.log("日历权限已经开启"); + } else { + console.log("日历权限没有开启"); + } + plus.ios.deleteObject(EKEventStore); + return result; +} + +function memo() { + var result = null; + var EKEventStore = plus.ios.import("EKEventStore"); + var ekAuthStatus = EKEventStore.authorizationStatusForEntityType(1); + if (ekAuthStatus == 3) { + result = 1; + console.log("备忘录权限已经开启"); + } else { + console.log("备忘录权限没有开启"); + } + plus.ios.deleteObject(EKEventStore); + return result; +} + + +function requestIOS(permissionIDs) { + let ps = []; + for (const permissionID of permissionIDs) { + let p = new Promise((resolve, reject) => { + switch (permissionID) { + case "push": + resolve(push()); + break; + case "location": + resolve(location()); + break; + case "record": + resolve(record()); + break; + case "camera": + resolve(camera()); + break; + case "album": + resolve(album()); + break; + case "contact": + resolve(contact()); + break; + case "calendar": + resolve(calendar()); + break; + case "memo": + resolve(memo()); + break; + default: + resolve(0); + break; + } + }); + ps.push(p); + } + + return new Promise((resolve, reject) => { + Promise.all(ps).then(value => { + let result = 1; + for (const v of value) { + if (v !== 1 && v != null) { + result = v; + break; + } + } + resolve(result); + }, reason => { + reject(reason); + }) + }) +} + +function requestAndroid(permissionIDs) { + return new Promise((resolve, reject) => { + plus.android.requestPermissions( + permissionIDs, + function (resultObj) { + var result = 0; + for (var i = 0; i < resultObj.granted.length; i++) { + var grantedPermission = resultObj.granted[i]; + console.log('已获取的权限:' + grantedPermission); + result = 1 + } + for (var i = 0; i < resultObj.deniedPresent.length; i++) { + var deniedPresentPermission = resultObj.deniedPresent[i]; + console.log('拒绝本次申请的权限:' + deniedPresentPermission); + result = 0 + } + for (var i = 0; i < resultObj.deniedAlways.length; i++) { + var deniedAlwaysPermission = resultObj.deniedAlways[i]; + console.log('永久拒绝申请的权限:' + deniedAlwaysPermission); + result = -1 + } + resolve(result); + }, + function (error) { + console.log('result error: ' + error.message) + resolve({ + code: error.code, + message: error.message + }); + } + ); + }); +} + +function gotoAppPermissionSetting() { + if (permission.isIOS) { + var UIApplication = plus.ios.import("UIApplication"); + var application2 = UIApplication.sharedApplication(); + var NSURL2 = plus.ios.import("NSURL"); + var setting2 = NSURL2.URLWithString("app-settings:"); + application2.openURL(setting2); + plus.ios.deleteObject(setting2); + plus.ios.deleteObject(NSURL2); + plus.ios.deleteObject(application2); + } else { + var Intent = plus.android.importClass("android.content.Intent"); + var Settings = plus.android.importClass("android.provider.Settings"); + var Uri = plus.android.importClass("android.net.Uri"); + var mainActivity = plus.android.runtimeMainActivity(); + var intent = new Intent(); + intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); + var uri = Uri.fromParts("package", mainActivity.getPackageName(), null); + intent.setData(uri); + mainActivity.startActivity(intent); + } +} + +const permission = { + get isIOS() { + return typeof isIOS === 'boolean' ? isIOS : (isIOS = uni.getSystemInfoSync().platform === 'ios') + }, + requestIOS: requestIOS, + requestAndroid: requestAndroid, + gotoAppSetting: gotoAppPermissionSetting +} + +export default permission diff --git a/src/pstore.js b/src/pstore.js new file mode 100644 index 00000000..b30cfc5c --- /dev/null +++ b/src/pstore.js @@ -0,0 +1,176 @@ +import {defineStore} from 'pinia' +import {ref} from "vue"; +import ConnectionStatus from "./wfc/client/connectionStatus"; +import Config from "./config"; + +export const pstore = defineStore('store-p', () => { + const conversationStore = ref({ + + currentConversationInfo: null, + conversationInfoList: [], + currentConversationMessageList: [], + currentConversationOldestMessageId: 0, + currentConversationOldestMessageUid: 0, + + currentConversationRead: null, + + // TODO 调用setUserEnableReceipt时,需要更新 + isMessageReceiptEnable: false, + + inputtingUser: null, + inputClearHandler: null, + + shouldAutoScrollToBottom: true, + + previewMediaItems: [], + previewMediaIndex: null, + + enableMessageMultiSelection: false, + showChannelMenu: false, + quotedMessage: null, + + // 为什么不用 map? + // map 里面的元素并不是 reactive 的 + downloadingMessages: [], + sendingMessages: [], + floatingConversations: [], + + currentVoiceMessage: null, + contextMenuConversationInfo: null, + + _reset() { + this.currentConversationInfo = null; + this.conversationInfoList = [] + this.currentConversationMessageList = []; + this.currentConversationOldestMessageId = 0; + this.currentConversationOldestMessageUid = 0; + this.currentConversationRead = null; + this.isMessageReceiptEnable = false; + this.inputtingUser = null; + this.inputClearHandler = null; + this.shouldAutoScrollToBottom = true; + this.previewMediaItems = []; + this.previewMediaIndex = null; + this.enableMessageMultiSelection = false; + this.showChannelMenu = false; + this.quotedMessage = null; + this.downloadingMessages = []; + this.sendingMessages = []; + this.floatingConversations = []; + this.currentVoiceMessage = null; + this.contextMenuConversationInfo = null; + } + }) + + const contactStore = ref({ + currentFriendRequest: null, + currentGroup: null, + currentChannel: null, + currentFriend: null, + currentOrganization: null, + currentChatroom: null, + currentUser: null, + + expandFriendRequestList: false, + expandFriendList: true, + expandGroup: false, + expandChanel: false, + expandOrganization: false, + expandChatroom: false, + + unreadFriendRequestCount: 0, + friendList: [], + friendRequestList: [], + favGroupList: [], + channelList: [], + favContactList: [], + + selfUserInfo: null, + contextMenuUserInfo: null, + + + _reset() { + this.currentFriendRequest = null; + this.currentGroup = null; + this.currentChannel = null; + this.currentFriend = null; + this.currentOrganization = null; + this.currentChatroom = null; + this.currentUser = null; + + this.expandFriendRequestList = false; + this.expandFriendList = true; + this.expandGroup = false; + this.expandChanel = false; + + this.unreadFriendRequestCount = 0; + this.friendList = []; + this.friendRequestList = []; + this.favGroupList = []; + this.channelList = []; + this.favContactList = []; + + this.selfUserInfo = null; + this.contextMenuUserInfo = null; + } + }) + + const searchStore = ref({ + query: null, + userSearchResult: [], + channelSearchResult: [], + contactSearchResult: [], + groupSearchResult: [], + conversationSearchResult: [], + messageSearchResult: [], + + _reset() { + this.query = null + this.userSearchResult = []; + this.channelSearchResult = []; + this.contactSearchResult = []; + this.groupSearchResult = []; + this.conversationSearchResult = []; + this.messageSearchResult = [] + } + }) + + const pickStore = ref({ + users: [], + organizations: [], + conversations: [], + messages: [], + _reset() { + this.users = []; + this.organizations = []; + this.conversations = []; + this.messages = []; + + } + }) + const miscStore = ref({ + connectionStatus: ConnectionStatus.ConnectionStatusUnconnected, + enableNotification: true, + enableNotificationMessageDetail: true, + enableAutoLogin: false, + isMainWindow: false, + isCommercialServer: false, + isDisableSyncDraft: false, + isVoipOngoing: false, + config: Config, + userOnlineStateMap: new Map(), + + _reset() { + this.connectionStatus = ConnectionStatus.ConnectionStatusUnconnected; + this.enableNotification = true; + this.enableAutoLogin = false; + this.isCommercialServer = false; + this.isDisableSyncDraft = false; + this.isVoipOngoing = false; + this.config = Config; + this.userOnlineStateMap = new Map(); + } + }) + + return {conversationStore, contactStore, pickStore, searchStore, miscStore} +}) \ No newline at end of file diff --git a/src/sheep/api/imchat/appServerApi.js b/src/sheep/api/imchat/appServerApi.js new file mode 100644 index 00000000..5157034f --- /dev/null +++ b/src/sheep/api/imchat/appServerApi.js @@ -0,0 +1,223 @@ +import Config from '@/config'; +import FavItem from '@/wfc/model/favItem'; +import { stringValue } from '@/wfc/util/longUtil'; +import AppServerError from './appServerError'; +import wfc from '@/wfc/client/wfc'; +import { getItem, setItem } from '@/sheep/util/storageHelper'; + +export class AppServerApi { + constructor() {} + + requestAuthCode(mobile) { + return this._post('/send_code', { mobile }); + } + + loinWithPassword(mobile, password) { + return new Promise((resolve, reject) => { + let responsePromise = this._post( + '/login_pwd', + { + mobile, + password, + platform: Config.getWFCPlatform(), + clientId: wfc.getClientId(), + }, + true, + ); + this._interceptLoginResponse(responsePromise, resolve, reject); + }); + } + + loginWithAuthCode(mobile, authCode) { + return new Promise((resolve, reject) => { + let responsePromise = this._post( + '/login', + { + mobile, + code: authCode, + platform: Config.getWFCPlatform(), + clientId: wfc.getClientId(), + }, + true, + ); + this._interceptLoginResponse(responsePromise, resolve, reject); + }); + } + + changePassword(oldPassword, newPassword) { + return this._post('/change_pwd', { + oldPassword, + newPassword, + }); + } + + requestResetPasswordAuthCode() { + return this._post('/send_reset_code'); + } + + resetPassword(resetPasswordAuthCode, newPassword) { + return this._post('/reset_pwd', { + resetCode: resetPasswordAuthCode, + newPassword: newPassword, + }); + } + + getGroupAnnouncement(groupId) { + return this._post('/get_group_announcement', { groupId: groupId }); + } + + updateGroupAnnouncement(author, groupId, announcement) { + return this._post('/put_group_announcement', { + author, + groupId, + text: announcement, + }); + } + + favMessage(message) { + let favItem = FavItem.fromMessage(message); + return this._post('/fav/add', { + messageUid: stringValue(favItem.messageUid), + type: favItem.favType, + convType: favItem.conversation.type, + convTarget: favItem.conversation.target, + convLine: favItem.conversation.line, + origin: favItem.origin, + sender: favItem.sender, + title: favItem.title, + url: favItem.url, + thumbUrl: favItem.thumbUrl, + data: favItem.data, + }); + } + + getFavList(startId, count = 20) { + return this._post('/fav/list', { id: startId, count: count }, false, true); + } + + delFav(favItemId) { + return this._post('/fav/del/' + favItemId, ''); + } + + _interceptLoginResponse(responsePromise, resolve, reject) { + responsePromise + .then((response) => { + if (response.data.code === 0) { + let appAuthToken = response.header['authtoken']; + if (!appAuthToken) { + appAuthToken = response.header['authToken']; + } + + if (appAuthToken) { + setItem('authToken-app', appAuthToken); + } + resolve(response.data.result); + } else { + reject(new AppServerError(response.data.code, response.data.message)); + } + }) + .catch((err) => { + reject(err); + }); + } + + /** + * + * @param path + * @param data + * @param rawResponse + * @param rawResponseData + * @return {Promise|*|T>} + * @private + */ + _post(path, data = {}, rawResponse = false, rawResponseData = false) { + let response; + path = Config.APP_SERVER + path; + let p = new Promise((resolve, reject) => { + console.log('_post', path, data); + uni.request({ + url: path, + data: data, + header: { + 'content-type': 'application/json', // 默认值 + authToken: getItem('authToken-app'), + }, + method: 'POST', + + success: (res) => { + console.log('_post result', res); + if (res.statusCode === 200) { + if (rawResponse) { + resolve(res); + return; + } + if (rawResponseData) { + resolve(res.data); + return; + } + if (res.data.code === 0) { + resolve(res.data.result); + } else { + throw new AppServerError(res.data.code, res.data.message); + } + } else { + throw new Error('request error, status code: ' + res.status); + } + }, + fail: (res) => { + console.log('fail', res); + throw new Error('request error: ' + res); + }, + }); + }); + return p; + } + + login(phone, code) { + let appServer = Config.APP_SERVER + '/login'; + let clientId = wfc.getClientId(); + console.log('login', wfc.getClientId(), Config.getWFCPlatform()); + uni.request({ + url: appServer, + data: { + mobile: phone, + code: code, + clientId: clientId, + platform: Config.getWFCPlatform(), + }, + header: { + 'content-type': 'application/json', // 默认值 + }, + method: 'POST', + + success: (res) => { + if (res.statusCode === 200) { + let loginResult = res.data; + + if (loginResult.code === 0) { + let userId = loginResult.result.userId; + let token = loginResult.result.token; + wfc.connect(userId, token); + setItem('userId', userId); + setItem('token', token); + + let authToken = res.header['authToken']; + if (!authToken) { + authToken = res.header['authtoken']; + } + + console.log('setupAppserver', Config.APP_SERVER, authToken); + // wfcUIKit.setupAppServer(Config.APP_SERVER, authToken); + + this.go2ConversationList(); + } else { + console.log('login failed', loginResult); + } + } + }, + }); + } +} + +const appServerApi = new AppServerApi(); +export default appServerApi; diff --git a/src/sheep/api/imchat/appServerError.js b/src/sheep/api/imchat/appServerError.js new file mode 100644 index 00000000..fcf42693 --- /dev/null +++ b/src/sheep/api/imchat/appServerError.js @@ -0,0 +1,12 @@ +export default class AppServerError extends Error { + errorCode; + + constructor(errorCode, message) { + super(message); + this.errorCode = errorCode; + } + + toString() { + return this.errorCode + '-' + this.message; + } +} diff --git a/src/sheep/api/imchat/conferenceApi.js b/src/sheep/api/imchat/conferenceApi.js new file mode 100644 index 00000000..a01a48cc --- /dev/null +++ b/src/sheep/api/imchat/conferenceApi.js @@ -0,0 +1,75 @@ +import {AppServerApi} from "./appServerApi"; + +class ConferenceApi extends AppServerApi { + constructor() { + super(); + } + + /** + * + * @return {Promise} + */ + getMyPrivateConferenceId() { + return this._post('/conference/get_my_id'); + } + + /** + * + * @param conferenceInfo + * @return {Promise} + */ + createConference(conferenceInfo) { + return this._post('/conference/create', conferenceInfo); + } + + /** + * + * @param conferenceId + * @param password + * @return {Promise} + */ + queryConferenceInfo(conferenceId, password) { + let obj; + if (password) { + obj = {conferenceId, password} + } else { + obj = {conferenceId} + } + return this._post('/conference/info', obj); + } + + destroyConference(conferenceId) { + return this._post('/conference/destroy/' + conferenceId); + } + + favConference(conferenceId) { + return this._post('/conference/fav/' + conferenceId); + } + + unfavConference(conferenceId) { + return this._post('/conference/unfav/' + conferenceId); + } + + isFavConference(conferenceId) { + return this._post('/conference/is_fav/' + conferenceId); + } + + getFavConferences() { + return this._post('/conference/fav_conferences'); + } + + updateConference(conferenceInfo) { + return this._post('/conference/put_info', conferenceInfo); + } + + recordConference(conferenceId, record) { + return this._post('/conference/recording/' + conferenceId, {recording: record}); + } + + setConferenceFocusUserId(conferenceId, userId) { + return this._post('/conference/focus/' + conferenceId, {userId: userId ? userId : ''}); + } +} + +const conferenceApi = new ConferenceApi(); +export default conferenceApi; diff --git a/src/sheep/api/imchat/organizationServerApi.js b/src/sheep/api/imchat/organizationServerApi.js new file mode 100644 index 00000000..5cd4e4e2 --- /dev/null +++ b/src/sheep/api/imchat/organizationServerApi.js @@ -0,0 +1,188 @@ +import Config from '@/config'; +import { getItem, setItem } from '@/sheep/util/storageHelper'; +import wfc from '@/wfc/client/wfc'; +import OrganizationServerError from './organizationServerError'; +import UserInfo from '@/wfc/model/userInfo'; + +export class OrganizationServerApi { + isServiceAvailable = true; + serviceUnavailbelError = new OrganizationServerError(-1, '未登录或服务不可用'); + + constructor() { + // do nothing + } + + login() { + return new Promise((resolve, reject) => { + // int ApplicationType_Robot = 0; + // int ApplicationType_Channel = 1; + // int ApplicationType_Admin = 2; + if (!Config.ORGANIZATION_SERVER) { + return Promise.reject(this.serviceUnavailbelError); + } + wfc.getAuthCode( + 'admin', + 2, + '', + (code) => { + let path = '/api/user_login'; + this._post( + path, + { + authCode: code, + }, + true, + ).then((response) => { + if (response.data.code === 0) { + // uni.request 的 response 是 header, 不是 headers + let appAuthToken = response.header['authtoken']; + if (!appAuthToken) { + appAuthToken = response.header['authToken']; + } + + if (appAuthToken) { + setItem('authToken-org', appAuthToken); + } + this.isServiceAvailable = true; + resolve(response.data.result); + } else { + reject(new OrganizationServerError(response.data.code, response.data.message)); + } + }); + }, + (error) => { + console.error('getAuthCode error', error); + reject(new OrganizationServerError(-1, '未登录,或服务不可用')); + }, + ); + }); + } + + getRootOrganization() { + return this._post('/api/organization/root'); + } + + getRelationShip(employeeId) { + return this._post('/api/relationship/employee', { employeeId }); + } + + getOrganizationEx(orgId) { + return this._post('/api/organization/query_ex', { id: orgId }); + } + + getOrganizations(orgIds) { + return this._post('/api/organization/query_list', { ids: orgIds }); + } + + async getOrganizationEmployees(orgIds) { + let employeeIds = await this._post('/api/organization/batch_employees', { ids: orgIds }); + return this.getEmployeeList(employeeIds); + } + + getOrgEmployees(orgId) { + return this._post('/api/organization/employees', { ids: orgId }); + } + + getEmployee(employeeId) { + return this._post('/api/employee/query', { employeeId }); + } + + getEmployeeEx(employeeId) { + return this._post('/api/employee/query_ex', { employeeId }); + } + + getEmployeeList(employeeIds) { + return this._post('/api/employee/query_list', { employeeIds: employeeIds }); + } + + searchEmployee(orgId, keyword) { + return this._post('/api/employee/search', { organizationId: orgId, keyword: keyword }); + } + + async getOrganizationPath(organizationId) { + let pathList = []; + let org = await this._getOrganizationSync(organizationId); + if (org) { + pathList.push(org); + if (org.parentId) { + pathList.push(...(await this.getOrganizationPath(org.parentId))); + } + } + return pathList; + } + + employeeToUserInfo(employee) { + let userInfo = new UserInfo(); + userInfo.uid = employee.employeeId; + userInfo.name = employee.name; + userInfo.displayName = employee.name; + userInfo.portrait = employee.portrait ? employee.portrait : Config.DEFAULT_PORTRAIT_URL; + userInfo.gender = employee.gender; + userInfo.mobile = employee.mobile; + userInfo.email = employee.email; + userInfo.updateDt = employee.updateDt; + //0 normal; 1 robot; 2 thing; + userInfo.type = 1; + userInfo.deleted = 0; + return userInfo; + } + + async _getOrganizationSync(orgId) { + let orgs = await this.getOrganizations([orgId]); + return orgs && orgs.length > 0 ? orgs[0] : null; + } + + /** + * + * @param path + * @param data + * @param rawResponse + * @param rawResponseData + * @return {Promise|*|T>} + * @private + */ + _post(path, data = {}, rawResponse = false, rawResponseData = false) { + let response; + path = Config.ORGANIZATION_SERVER + path; + let p = new Promise((resolve, reject) => { + uni.request({ + url: path, + data: data, + header: { + 'content-type': 'application/json', // 默认值 + authToken: getItem('authToken-org'), + }, + method: 'POST', + + success: (res) => { + console.log('_post result', res); + if (res.statusCode === 200) { + if (rawResponse) { + resolve(res); + return; + } + if (rawResponseData) { + resolve(res.data); + return; + } + if (res.data.code === 0) { + resolve(res.data.result); + } else { + throw new OrganizationServerError(res.data.code, res.data.message); + } + } else { + throw new Error('request error, status code: ' + res.status); + } + }, + fail: (res) => { + console.log('fail', res); + throw new Error('request error: ' + res); + }, + }); + }); + return p; + } +} + +const organizationServerApi = new OrganizationServerApi(); +export default organizationServerApi; diff --git a/src/sheep/api/imchat/organizationServerError.js b/src/sheep/api/imchat/organizationServerError.js new file mode 100644 index 00000000..05b761a5 --- /dev/null +++ b/src/sheep/api/imchat/organizationServerError.js @@ -0,0 +1,12 @@ +export default class OrganizationServerError extends Error { + errorCode; + + constructor(errorCode, message) { + super(message); + this.errorCode = errorCode; + } + + toString() { + return this.errorCode + '-' + this.message; + } +} diff --git a/src/sheep/util/draft.js b/src/sheep/util/draft.js new file mode 100644 index 00000000..a4c57948 --- /dev/null +++ b/src/sheep/util/draft.js @@ -0,0 +1,55 @@ +import wfc from '@/wfc/client/wfc'; +import { _patchToJavaLong, _reverseToJsLongString, stringValue } from '@/wfc/wfc/util/longUtil'; +import store from '@/store'; + +export default class Draft { + static setConversationDraft(conversation, draftText, quoteInfo, mentions = null) { + if (!draftText && !quoteInfo) { + wfc.setConversationDraft(conversation, ''); + return; + } + let obj = { + content: draftText, + mentions: mentions, + quoteInfo: quoteInfo, + }; + let jsonStr = JSON.stringify(obj, (key, value) => { + if (key === 'messageUid') { + return stringValue(value); + } + return value; + }); + jsonStr = _patchToJavaLong(jsonStr, 'messageUid'); + wfc.setConversationDraft(conversation, jsonStr); + } + + static getConversationDraftEx(conversationInfo) { + let obj = { + text: '', + quotedMessage: null, + }; + if (!conversationInfo || !conversationInfo.draft) { + return obj; + } + // 兼容处理 + if (!conversationInfo.draft.startsWith('{')) { + obj.text = conversationInfo.draft; + return obj; + } + let draftStr = conversationInfo.draft; + draftStr = _reverseToJsLongString(draftStr, 'messageUid'); + let draft = JSON.parse(draftStr); + obj.text = draft.content; + obj.text = obj.text ? obj.text : ''; + if (draft.quoteInfo) { + let msg = store.getMessageByUid(draft.quoteInfo.messageUid); + obj.quotedMessage = msg; + } + return obj; + } + + static getConversationDraft(conversation) { + let conversationInfo = wfc.getConversationInfo(conversation); + return this.getConversationDraftEx(conversationInfo); + } +} diff --git a/src/sheep/util/helper.js b/src/sheep/util/helper.js new file mode 100644 index 00000000..28a879b4 --- /dev/null +++ b/src/sheep/util/helper.js @@ -0,0 +1,234 @@ +// ie11 not support browser-md5-file +// import MD5 from 'browser-md5-file'; +import { numberValue } from '@/wfc/util/longUtil'; + +const helper = { + parseXml: (text, tagName) => { + var parser = new window.DOMParser(); + var xml = parser.parseFromString(text.replace(/</g, '<').replace(/>/g, '>'), 'text/xml'); + var value = {}; + + tagName = Array.isArray(tagName) ? tagName : [tagName]; + + tagName.map((e) => { + value[e] = xml.getElementsByTagName(e)[0].childNodes[0].nodeValue; + }); + + return { xml, value }; + }, + + humanSize: (size) => { + var value = (size / 1024).toFixed(1); + + if (size > 1024 << 10) { + value = (value / 1024).toFixed(1); + return `${value} M`; + } else { + return `${value} KB`; + } + }, + + getFiletypeIcon: (extension) => { + var filename = 'unknow'; + + extension = (extension || '').toLowerCase().replace(/^\./, ''); + + switch (true) { + case ['mp3', 'flac', 'aac', 'm4a', 'wma'].includes(extension): + filename = 'audio'; + break; + + case ['mp4', 'mkv', 'avi', 'flv'].includes(extension): + filename = 'audio'; + break; + + case ['zip', 'rar', 'tar', 'tar.gz'].includes(extension): + filename = 'archive'; + break; + + case ['doc', 'docx'].includes(extension): + filename = 'word'; + break; + + case ['xls', 'xlsx'].includes(extension): + filename = 'excel'; + break; + + case ['ai', 'apk', 'exe', 'ipa', 'pdf', 'ppt', 'psd'].includes(extension): + filename = extension; + break; + default: + break; + } + + return `${filename}.png`; + }, + + getPallet: (image) => { + return new Promise((resolve, reject) => { + new window.AlbumColors(image).getColors((colors, err) => { + if (err) { + resolve([ + [0, 0, 0], + [0, 0, 0], + [0, 0, 0], + ]); + } else { + resolve(colors); + } + }); + }); + }, + + decodeHTML: (text = '') => { + return text.replace(/</g, '<').replace(/>/g, '>').replace(/&/g, '&'); + }, + + isImage: (ext) => { + return ['bmp', 'gif', 'jpeg', 'jpg', 'png'].includes(ext); + }, + + // 3 types supported: pic, video, doc + getMediaType: (ext = '') => { + ext = ext.toLowerCase(); + + switch (true) { + case helper.isImage(ext): + return 'pic'; + + case ['mp4'].includes(ext): + return 'video'; + + default: + return 'doc'; + } + }, + + getDataURL: (src) => { + var image = new window.Image(); + + return new Promise((resolve, reject) => { + image.src = src; + image.onload = () => { + var canvas = document.createElement('canvas'); + var context = canvas.getContext('2d'); + + canvas.width = image.width; + canvas.height = image.height; + + context.drawImage(image, 0, 0, image.width, image.height); + resolve(canvas.toDataURL('image/png')); + }; + + image.onerror = () => { + resolve(''); + }; + }); + }, + + // md5: (file) => { + // return new Promise((resolve, reject) => { + // new MD5().md5(file, (err, md5) => { + // resolve(err ? false : md5); + // }); + // }); + // }, + + weekFormat: (num) => { + let str; + switch (num) { + case 1: + str = '星期一'; + break; + case 2: + str = '星期二'; + break; + case 3: + str = '星期三'; + break; + case 4: + str = '星期四'; + break; + case 5: + str = '星期五'; + break; + case 6: + str = '星期六'; + break; + default: + str = '星期天'; + } + return str; + }, + + /** + * 会话时间显示 + */ + + dateFormat(date) { + if (!date) return ''; + if (typeof date === 'object') { + date = numberValue(date); + } + let today = new Date().setHours(0, 0, 0, 0); + let that = new Date(date).setHours(0, 0, 0, 0); + if (today === that) { + return this.timeFormat(date); + } else { + let thatDate = new Date(date); + return thatDate.getFullYear() + '/' + (thatDate.getMonth() + 1) + '/' + thatDate.getDate(); + } + }, + + /** + * 消息会话时间显示 + */ + timeFormat: (date) => { + if (!date) return ''; + if (typeof date === 'object') { + date = numberValue(date); + } + let newtime; + let nowtime = new Date(); + // if (date.constructor !== Date) { + // date = new Date(date.replace(/\-/g, '/')) // 解决ios日期显示NAN问题 + // } + date = new Date(date); + // 获取消息发送时间 + let Y = date.getFullYear(); + let M = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1; + let D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate(); + let W = date.getDay(); + let H = date.getHours() < 10 ? '0' + date.getHours() : date.getHours(); + let Min = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes(); + // 获取当前时间 + let nowY = nowtime.getFullYear(); + let nowM = + nowtime.getMonth() + 1 < 10 ? '0' + (nowtime.getMonth() + 1) : nowtime.getMonth() + 1; + let nowD = nowtime.getDate() < 10 ? '0' + nowtime.getDate() : nowtime.getDate(); + let isWeek = Math.abs(date - nowtime) < 7 * 24 * 3600 * 1000; + if (Y < nowY) { + // 去年 + newtime = Y + '-' + M + '-' + D + ' ' + H + ':' + Min; + } else { + if (Y === nowY && M === nowM && nowD - D <= 7) { + // 昨天 + if (nowD - D === 1) { + newtime = '昨天' + ' ' + H + ':' + Min; + } else if (nowD === D) { + // 当天 + newtime = H + ':' + Min; + } else { + // 一周内 + newtime = helper.weekFormat(W) + ' ' + H + ':' + Min; + } + } else { + // 一年内 + newtime = M + '-' + D + ' ' + H + ':' + Min; + } + } + return newtime; + }, +}; + +export default helper; diff --git a/src/sheep/util/imageUtil.js b/src/sheep/util/imageUtil.js new file mode 100644 index 00000000..f6cc0819 --- /dev/null +++ b/src/sheep/util/imageUtil.js @@ -0,0 +1,411 @@ +import resizeImage from "resize-image"; + +function mergeImages(sources = [], options = {}) { + // Defaults + let defaultOptions = { + format: 'image/png', + quality: 0.92, + width: undefined, + height: undefined, + Canvas: undefined + }; + return new Promise(resolve => { + options = Object.assign({}, defaultOptions, options); + + sources = sources.filter(source => source !== null && source !== undefined); + + // Setup browser/Node.js specific variables + const canvas = options.Canvas ? new options.Canvas() : window.document.createElement('canvas'); + const Image = options.Canvas ? options.Canvas.Image : window.Image; + if (options.Canvas) { + options.quality *= 100; + } + + let targetSize = 64; + let divider = 1; + var size = 0; + + switch (sources.length) { + case 2: + size = (targetSize - 3 * divider) / 2; + break; + case 3: + size = (targetSize - 3 * divider) / 2; + break; + case 4: + size = (targetSize - 3 * divider) / 2; + break; + case 5: + size = (targetSize - 4 * divider) / 3; + break; + case 6: + size = (targetSize - 4 * divider) / 3; + break; + case 7: + size = (targetSize - 4 * divider) / 3; + break; + case 8: + size = (targetSize - 4 * divider) / 3; + break; + case 9: + size = (targetSize - 4 * divider) / 3; + break; + default: + break; + } + + sources = sources.slice(0, sources.length >= 9 ? 9 : sources.length); + + // Load sources + const images = sources.map(source => new Promise((resolve, reject) => { + // Convert sources to objects + if (source.constructor.name !== 'Object') { + source = {src: source}; + } + + // Resolve source and img when loaded + const img = new Image(); + img.setAttribute('crossOrigin', 'anonymous'); + //img.onerror = () => reject(new Error('Couldn\'t load image')); + img.onerror = () => resolve(null); + img.onload = () => resolve(Object.assign({}, source, {data: resizeImage.resize(img, size, size, resizeImage.PNG)})); + img.src = source.src; + })); + + const loadResizedImages = (resizedImagesBase64) => resizedImagesBase64.map(image => new Promise((resolve, reject) => { + // Resolve source and img when loaded + const img = new Image(); + img.setAttribute('crossOrigin', 'anonymous'); + //img.onerror = () => reject(new Error('Couldn\'t load image2')); + img.onerror = () => resolve(null); + img.onload = () => resolve(Object.assign({}, {img})); + img.src = image.data; + })); + + // Get canvas context + const ctx = canvas.getContext('2d'); + + // When sources have loaded + resolve(Promise.all(images) + .then((images) => { + images = images.filter(i => i !== null); + return Promise.all(loadResizedImages(images)); + }) + .then(images => { + + images = images.filter(i => i !== null); + + // Set canvas dimensions + // const getSize = dim => options[dim] || Math.max(...images.map(image => image.img[dim])); + // canvas.width = getSize('width'); + // canvas.height = getSize('height'); + canvas.width = targetSize; + canvas.height = targetSize; + switch (images.length) { + case 2: + images[0].x = divider; + images[0].y = targetSize / 4; + images[1].x = images[0].x + size + divider; + images[1].y = images[0].y; + break; + case 3: + images[0].x = targetSize / 4; + images[0].y = divider; + + images[1].x = divider; + images[1].y = images[0].y + size + divider; + images[2].x = images[1].x + size + divider; + images[2].y = images[1].y; + break; + case 4: + images[0].x = divider; + images[0].y = divider; + images[1].x = images[0].x + size + divider; + images[1].y = divider; + + images[2].x = divider; + images[2].y = images[0].y + size + divider; + images[3].x = images[2].x + size + divider; + images[3].y = images[2].y; + break; + case 5: + images[0].x = (targetSize - 2 * size - divider) / 2; + images[0].y = (targetSize - 2 * size - divider) / 2; + images[1].x = images[0].x + size + divider; + images[1].y = images[0].y; + + images[2].x = divider; + images[2].y = images[1].y + size + divider; + images[3].x = images[2].x + size + divider; + images[3].y = images[2].y; + images[4].x = images[3].x + size + divider; + images[4].y = images[2].y; + break; + case 6: + images[0].x = divider; + images[0].y = (targetSize - 2 * size - divider) / 2; + images[1].x = images[0].x + size + divider; + images[1].y = images[0].y; + images[2].x = images[1].x + size + divider; + images[2].y = images[0].y; + + images[3].x = divider; + images[3].y = images[0].y + size + divider; + images[4].x = images[3].x + size + divider; + images[4].y = images[3].y; + images[5].x = images[4].x + size + divider; + images[5].y = images[3].y; + break; + case 7: + images[0].x = divider + size + divider; + images[0].y = divider; + + images[1].x = divider; + images[1].y = images[0].y + size + divider; + images[2].x = images[1].x + size + divider; + images[2].y = images[1].y; + images[3].x = images[2].x + size + divider; + images[3].y = images[1].y; + + images[4].x = divider; + images[4].y = images[1].y + size + divider; + images[5].x = images[4].x + size + divider; + images[5].y = images[4].y; + images[6].x = images[5].x + size + divider; + images[6].y = images[4].y; + break; + case 8: + images[0].x = (targetSize - 2 * size - divider) / 2; + images[0].y = divider; + images[1].x = images[0].x + size + divider; + images[1].y = images[0].y; + + images[2].x = divider; + images[2].y = images[0].y + size + divider; + images[3].x = images[2].x + size + divider; + images[3].y = images[2].y + images[4].x = images[3].x + size + divider; + images[4].y = images[2].y; + + images[5].x = divider; + images[5].y = images[2].y + size + divider; + images[6].x = images[5].x + size + divider; + images[6].y = images[5].y; + images[7].x = images[6].x + size + divider; + images[7].y = images[5].y; + break; + case 9: + images[0].x = divider; + images[0].y = divider; + images[1].x = images[0].x + size + divider; + images[1].y = images[0].y; + images[2].x = images[1].x + size + divider; + images[2].y = images[0].y; + + images[3].x = divider; + images[3].y = images[0].y + size + divider; + images[4].x = images[3].x + size + divider; + images[4].y = images[3].y; + images[5].x = images[4].x + size + divider; + images[5].y = images[3].y; + + images[6].x = divider; + images[6].y = images[3].y + size + divider; + images[7].x = images[6].x + size + divider; + images[7].y = images[6].y; + images[8].x = images[7].x + size + divider; + images[8].y = images[6].y; + break; + } + + ctx.fillStyle = '#CCCCCC'; + ctx.fillRect(0, 0, canvas.width, canvas.height); + // Draw images to canvas + images.forEach(image => { + ctx.globalAlpha = image.opacity ? image.opacity : 1; + return ctx.drawImage(image.img, image.x || 0, image.y || 0); + }); + + if (options.Canvas && options.format === 'image/jpeg') { + // Resolve data URI for node-canvas jpeg async + return new Promise(resolve => { + canvas.toDataURL(options.format, { + quality: options.quality, + progressive: false + }, (err, jpeg) => { + if (err) { + throw err; + } + resolve(jpeg); + }); + }); + } + + // Resolve all other data URIs sync + return canvas.toDataURL(options.format, options.quality); + })); + }) +} + +async function genGroupPortrait(groupMemberUsers) { + let groupMemberPortraits = []; + for (let i = 0; i < Math.min(9, groupMemberUsers.length); i++) { + groupMemberPortraits.push(groupMemberUsers[i].portrait) + } + return await mergeImages(groupMemberPortraits); +} + +// return {data uri, width, height} +function imageThumbnail(file) { + return new Promise((resolve, reject) => { + var img = new Image(); + img.setAttribute('crossOrigin', 'anonymous'); + img.onload = () => { + let resizedCanvas = resizeImage.resize2Canvas(img, 200, 200); + resizedCanvas.toBlob((blob) => { + var reader = new FileReader(); + reader.readAsDataURL(blob); + reader.onloadend = () => { + let base64data = reader.result; + resolve({thumbnail: base64data, width: img.naturalWidth, height: img.naturalHeight}); + } + reader.onerror = () => { + resolve(null); + } + }, 'image/jpeg', 0.4); + }; + img.onerror = () => { + resolve(null); + } + if (file.path) { + if (file.path.startsWith('/')) { + img.src = 'local-resource://' + (file.path.indexOf(file.name) > -1 ? file.path : file.path + file.name); // local image url + } else { + img.src = file.path; + } + } else { + let reader = new FileReader(); + reader.onload = function (event) { + img.src = event.target.result; + }; + reader.readAsDataURL(file); + } + }); +} + +// return {data uri, width, height} +function videoThumbnail(file) { + return new Promise( + (resolve, reject) => { + let video = document.getElementById('bgvid'); + video.onplay = () => { + console.log('------------ video onplay'); + + var canvas = document.createElement("canvas"); + canvas.width = video.videoWidth; + canvas.height = video.videoHeight; + canvas.getContext('2d') + .drawImage(video, 0, 0, canvas.width, canvas.height); + var img = document.createElement("img"); + img.src = canvas.toDataURL(); + img.onload = () => { + let resizedCanvas = resizeImage.resize2Canvas(img, 200, 200); + resizedCanvas.toBlob((blob) => { + var reader = new FileReader(); + reader.readAsDataURL(blob); + reader.onloadend = () => { + let base64data = reader.result; + resolve({thumbnail: base64data, width: video.videoWidth, height: video.videoHeight}); + video.src = null; + }; + reader.onerror = () => { + resolve(null); + } + }, 'image/jpeg', 0.4); + }; + img.onerror = () => { + resolve(null); + }; + }; + video.onerror = () => { + resolve(null); + }; + _loadVideo(file) + console.log('----------', video); + }); +} + +function _loadVideo(file) { + let video = document.getElementById('bgvid'); + if (file.path) { + if (file.path.startsWith('/')) { + video.src = 'local-resource://' + (file.path.indexOf(file.name) > -1 ? file.path : file.path + file.name); // local video url + } else { + video.src = file.path; + } + } else { + let reader = new FileReader(); + reader.onload = function (event) { + video.src = event.target.result; + }; + reader.readAsDataURL(file); + } +} + +function videoDuration(file) { + return new Promise( + (resolve, reject) => { + let video = document.getElementById('bgvid'); + video.onplay = () => { + resolve(video.duration); + }; + video.onerror = () => { + resolve(0); + }; + _loadVideo(file) + console.log('----------', video); + }); +} + +function dataURItoBlob(dataURI) { + // convert base64 to raw binary data held in a string + // doesn't handle URLEncoded DataURIs - see SO answer #6850276 for code that does this + let byteString = atob(dataURI.split(',')[1]); + + // separate out the mime component + let mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0]; + + // write the bytes of the string to an ArrayBuffer + let ab = new ArrayBuffer(byteString.length); + let ia = new Uint8Array(ab); + for (let i = 0; i < byteString.length; i++) { + ia[i] = byteString.charCodeAt(i); + } + return new Blob([ab], {type: mimeString}); +} + +function fileFromDataUri(dataUri, fileName) { + const blob = dataURItoBlob(dataUri); + const resultFile = new File([blob], fileName); + return resultFile; +} + +function scaleDown(width, height, maxWidth, maxHeight) { + if (width < maxWidth && height < maxHeight) { + return {width, height} + } + + const widthRatio = maxWidth / width; + const heightRatio = maxHeight / height; + + // 计算比例最小的缩放倍数 + const scale = Math.min(widthRatio, heightRatio); + + // 缩放后的宽度和高度 + const scaledWidth = width * scale; + const scaledHeight = height * scale; + + return {width: Math.ceil(scaledWidth), height: Math.ceil(scaledHeight)}; +} + +export {mergeImages, genGroupPortrait, videoThumbnail, videoDuration, imageThumbnail, fileFromDataUri, scaleDown}; diff --git a/src/sheep/util/storageHelper.js b/src/sheep/util/storageHelper.js new file mode 100644 index 00000000..f8d780ac --- /dev/null +++ b/src/sheep/util/storageHelper.js @@ -0,0 +1,15 @@ +export function removeItem(key) { + uni.removeStorageSync(key) +} + +export function getItem(key) { + return uni.getStorageSync(key); +} + +export function setItem(key, value) { + uni.setStorageSync(key, value); +} + +export function clear() { + uni.clearStorageSync(); +} diff --git a/src/static/login-bg.png b/src/static/login-bg.png deleted file mode 100644 index f5ce4b8d..00000000 Binary files a/src/static/login-bg.png and /dev/null differ diff --git a/src/store.js b/src/store.js new file mode 100644 index 00000000..49f71b8e --- /dev/null +++ b/src/store.js @@ -0,0 +1,2062 @@ +import ConnectionStatus from './wfc/client/connectionStatus'; +import wfc from './wfc/client/wfc'; +import EventType from './wfc/client/wfcEvent'; +import ConversationType from './wfc/model/conversationType'; +import { eq, gt, numberValue, stringValue } from './wfc/util/longUtil'; +import helper from '@/sheep/util/helper'; +import pinyin from 'pinyin/lib/esm/pinyin'; +import GroupType from './wfc/model/groupType'; +// import {imageThumbnail, videoDuration, videoThumbnail} from "./ui/util/imageUtil"; +import MessageContentMediaType from './wfc/messages/messageContentMediaType'; +import Conversation from './wfc/model/conversation'; +import MessageContentType from './wfc/messages/messageContentType'; +import Message from './wfc/messages/message'; +import ImageMessageContent from './wfc/messages/imageMessageContent'; +import VideoMessageContent from './wfc/messages/videoMessageContent'; +import FileMessageContent from './wfc/messages/fileMessageContent'; +import ForwardType from './ForwardType'; +import TextMessageContent from './wfc/messages/textMessageContent'; +import SearchType from './wfc/model/searchType'; +import Config from './config'; +import { clear, getItem, removeItem, setItem } from '@/sheep/util/storageHelper'; +import CompositeMessageContent from './wfc/messages/compositeMessageContent'; +// import {getConversationPortrait} from "./ui/util/imageUtil"; +import DismissGroupNotification from './wfc/messages/notification/dismissGroupNotification'; +import KickoffGroupMemberNotification from './wfc/messages/notification/kickoffGroupMemberNotification'; +import QuitGroupNotification from './wfc/messages/notification/quitGroupNotification'; +import MessageStatus from './wfc/messages/messageStatus'; +import MessageConfig from './wfc/client/messageConfig'; +import PersistFlag from './wfc/messages/persistFlag'; +import NullGroupInfo from './wfc/model/nullGroupInfo'; +import NullUserInfo from './wfc/model/nullUserInfo'; +import LeaveChannelChatMessageContent from './wfc/messages/leaveChannelChatMessageContent'; +import ArticlesMessageContent from './wfc/messages/articlesMessageContent'; +import EnterChannelChatMessageContent from './wfc/messages/enterChannelChatMessageContent'; +import NullChannelInfo from './wfc/model/NullChannelInfo'; +import CallStartMessageContent from './wfc/av/messages/callStartMessageContent'; +import { storeToRefs } from 'pinia'; +import { pstore } from './pstore'; +import SoundMessageContent from './wfc/messages/soundMessageContent'; + +/** + * 一些说明 + * _开头的字段,是为了UI层展示方便,而打补丁上出去的 + * __开头的字段,仅内部使用 + * _开头的函数,是内部函数 + * 外部不直接更新字段,而是通过提供各种action方法更新 + */ + +let conversationState; +let contactState; +let searchState; +let pickState; +let miscState; + +let store = { + debug: true, + state: { + conversation: null, + contact: null, + search: null, + pick: null, + misc: null, + }, + + init() { + console.log('init store'); + + const { conversationStore, contactStore, pickStore, searchStore, miscStore } = storeToRefs( + pstore(), + ); + conversationState = conversationStore.value; + contactState = contactStore.value; + searchState = searchStore.value; + pickState = pickStore.value; + miscState = miscStore.value; + + store.state.conversation = conversationState; + store.state.contact = contactState; + store.state.search = searchState; + store.state.pick = pickState; + store.state.misc = miscState; + + wfc.eventEmitter.on(EventType.ConnectionStatusChanged, (status) => { + miscState.connectionStatus = status; + console.log('connection status changed', status); + if (status === ConnectionStatus.ConnectionStatusConnected) { + this._loadDefaultData(); + } else if ( + status === ConnectionStatus.ConnectionStatusLogout || + status === ConnectionStatus.ConnectionStatusRejected || + status === ConnectionStatus.ConnectionStatusSecretKeyMismatch || + status === ConnectionStatus.ConnectionStatusKickedOff || + status === ConnectionStatus.ConnectionStatusTokenIncorrect + ) { + // 清除 token 等 + clear(); + if (status === ConnectionStatus.ConnectionStatusKickedOff) { + wfc.disconnect(); + } + _reset(); + } + }); + + wfc.eventEmitter.on(EventType.UserInfosUpdate, (userInfos) => { + console.log('store UserInfosUpdate', userInfos, miscState.connectionStatus); + this._reloadSingleConversationIfExist(userInfos); + // TODO optimize + this._loadCurrentConversationMessages(); + this._loadFriendList(); + this._loadFriendRequest(); + this._loadSelfUserInfo(); + // TODO 其他相关逻辑 + }); + + wfc.eventEmitter.on(EventType.SettingUpdate, () => { + console.log('store SettingUpdate'); + this._loadDefaultConversationList(); + this._loadFavContactList(); + this._loadFavGroupList(); + this._loadChannelList(); + this._loadCurrentConversationMessages(); + }); + + wfc.eventEmitter.on(EventType.FriendRequestUpdate, (newFrs) => { + this._loadFriendRequest(); + }); + + wfc.eventEmitter.on(EventType.FriendListUpdate, (updatedFriendIds) => { + this._loadFriendList(); + this._loadFriendRequest(); + this._loadFavContactList(); + this._loadDefaultConversationList(); + this._loadCurrentConversationMessages(); + }); + + wfc.eventEmitter.on(EventType.GroupInfosUpdate, (groupInfos) => { + // TODO optimize + console.log('store GroupInfosUpdate', groupInfos); + this._reloadGroupConversationIfExist(groupInfos); + this._loadFavGroupList(); + // TODO 其他相关逻辑 + }); + + wfc.eventEmitter.on(EventType.GroupMembersUpdate, (groupId, members) => { + // TODO optimize + console.log('store GroupMembersUpdate', groupId); + this._reloadGroupConversationIfExist([new NullGroupInfo(groupId)]); + // this._loadFavGroupList(); + // TODO 其他相关逻辑 + }); + + wfc.eventEmitter.on(EventType.ChannelInfosUpdate, (groupInfos) => { + this._loadDefaultConversationList(); + this._loadChannelList(); + }); + + wfc.eventEmitter.on(EventType.ConversationInfoUpdate, (conversationInfo) => { + this._reloadConversation(conversationInfo.conversation); + if ( + conversationState.currentConversationInfo && + conversationState.currentConversationInfo.conversation.equal(conversationInfo.conversation) + ) { + this._loadCurrentConversationMessages(); + } + }); + + wfc.eventEmitter.on(EventType.ReceiveMessages, (msgs, hasMore) => { + //console.log('receiveMessage', msg, hasMore); + if (miscState.connectionStatus === ConnectionStatus.ConnectionStatusReceiveing) { + return; + } + + for (const msg of msgs) { + if ( + msg.messageContent instanceof DismissGroupNotification || + (msg.messageContent instanceof KickoffGroupMemberNotification && + msg.messageContent.kickedMembers.indexOf(wfc.getUserId()) >= 0) || + (msg.messageContent instanceof QuitGroupNotification && + msg.messageContent.operator === wfc.getUserId()) + ) { + this.setCurrentConversationInfo(null); + return; + } + + if (!hasMore) { + this._reloadConversation(msg.conversation); + } + if ( + conversationState.currentConversationInfo && + msg.conversation.equal(conversationState.currentConversationInfo.conversation) + ) { + // 移动端,目前只有单聊会发送typing消息 + if (msg.messageContent.type === MessageContentType.Typing) { + let groupId = msg.conversation.type === 1 ? msg.conversation.target : ''; + let userInfo = wfc.getUserInfo(msg.from, false, groupId); + userInfo = Object.assign({}, userInfo); + userInfo._displayName = wfc.getGroupMemberDisplayNameEx(userInfo); + conversationState.inputtingUser = userInfo; + + if (!conversationState.inputClearHandler) { + conversationState.inputClearHandler = () => { + conversationState.inputtingUser = null; + }; + } + clearTimeout(conversationState.inputClearHandler); + setTimeout(conversationState.inputClearHandler, 3000); + } else { + clearTimeout(conversationState.inputClearHandler); + conversationState.inputtingUser = null; + } + + if ( + !this._isDisplayMessage(msg) || + msg.messageContent.type === MessageContentType.RecallMessage_Notification + ) { + return; + } + + // 会把下来加载更多加载的历史消息给清理了 + let lastTimestamp = 0; + let msgListLength = conversationState.currentConversationMessageList.length; + if (msgListLength > 0) { + lastTimestamp = + conversationState.currentConversationMessageList[msgListLength - 1].timestamp; + } + this._patchMessage(msg, lastTimestamp); + let msgIndex = conversationState.currentConversationMessageList.findIndex((m) => { + return ( + m.messageId === msg.messageId || + (gt(m.messageUid, 0) && eq(m.messageUid, msg.messageUid)) || + (m.messageContent.type === MessageContentType.Streaming_Text_Generating && + (msg.messageContent.type === MessageContentType.Streaming_Text_Generating || + msg.messageContent.type === MessageContentType.Streaming_Text_Generated) && + m.messageContent.streamId === msg.messageContent.streamId) + ); + }); + if (msgIndex > -1) { + // FYI: https://v2.vuejs.org/v2/guide/reactivity#Change-Detection-Caveats + conversationState.currentConversationMessageList.splice(msgIndex, 1, msg); + console.log('msg duplicate', msg.messageId, msg.messageUid); + return; + } + conversationState.currentConversationMessageList.push(msg); + } + + // 没有使用 uikit 默认的通知处理 + if ( + msg.conversation.type !== 2 && + miscState.isAppHidden && + (miscState.enableNotification || + msg.status === MessageStatus.AllMentioned || + msg.status === MessageStatus.Mentioned) + ) { + this.notify(msg); + } + } + }); + + wfc.eventEmitter.on(EventType.RecallMessage, (operator, messageUid) => { + this._reloadConversationByMessageUidIfExist(messageUid); + if (conversationState.currentConversationInfo) { + let msg = wfc.getMessageByUid(messageUid); + if (msg && msg.conversation.equal(conversationState.currentConversationInfo.conversation)) { + if (conversationState.currentConversationMessageList) { + let lastTimestamp = 0; + conversationState.currentConversationMessageList = + conversationState.currentConversationMessageList.map((msg) => { + if (eq(msg.messageUid, messageUid)) { + let newMsg = wfc.getMessageByUid(messageUid); + this._patchMessage(newMsg, lastTimestamp); + return newMsg; + } + lastTimestamp = msg.timestamp; + return msg; + }); + } + } + } + }); + + wfc.eventEmitter.on(EventType.UserOnlineEvent, (userOnlineStatus) => { + userOnlineStatus.forEach((e) => { + miscState.userOnlineStateMap.set(e.userId, e); + }); + // 更新在线状态 + contactState.friendList = this._patchAndSortUserInfos(contactState.friendList, ''); + }); + // 服务端删除 + wfc.eventEmitter.on(EventType.MessageDeleted, (messageUid) => { + this._reloadConversationByMessageUidIfExist(messageUid); + if (conversationState.currentConversationInfo) { + if (conversationState.currentConversationMessageList) { + conversationState.currentConversationMessageList = + conversationState.currentConversationMessageList.filter( + (msg) => !eq(msg.messageUid, messageUid), + ); + } + } + }); + // 本地删除 + wfc.eventEmitter.on(EventType.DeleteMessage, (messageId) => { + this._reloadConversationByMessageIdIfExist(messageId); + if (conversationState.currentConversationInfo) { + if (conversationState.currentConversationMessageList) { + conversationState.currentConversationMessageList = + conversationState.currentConversationMessageList.filter( + (msg) => msg.messageId !== messageId, + ); + } + } + }); + + wfc.eventEmitter.on(EventType.SendMessage, (message) => { + // 删除频道,或者从频道会话切到其他会话时,会发送一条离开频道的消息 + if (message.messageContent instanceof LeaveChannelChatMessageContent) { + return; + } + this._reloadConversation(message.conversation); + if (!this._isDisplayMessage(message)) { + return; + } + if ( + !conversationState.currentConversationInfo || + !message.conversation.equal(conversationState.currentConversationInfo.conversation) + ) { + console.log('not current conv'); + return; + } + let index = conversationState.currentConversationMessageList.findIndex( + (m) => m.messageId === message.messageId, + ); + if (index !== -1) { + return; + } + let length = conversationState.currentConversationMessageList.length; + let lastTimestamp = 0; + if (length > 0) { + let lastMessage = conversationState.currentConversationMessageList[length - 1]; + lastTimestamp = lastMessage.timestamp; + } + this._patchMessage(message, lastTimestamp); + + conversationState.currentConversationMessageList.push(message); + }); + + wfc.eventEmitter.on(EventType.MessageStatusUpdate, (message) => { + console.log('message status update', message); + if (!this._isDisplayMessage(message)) { + return; + } + if ( + !conversationState.currentConversationInfo || + !message.conversation.equal(conversationState.currentConversationInfo.conversation) + ) { + console.log('not current conv'); + return; + } + + let index = conversationState.currentConversationMessageList.findIndex( + (m) => m.messageId === message.messageId, + ); + if (index < 0) { + return; + } + let msg = conversationState.currentConversationMessageList[index]; + Object.assign(msg, message); + + if ( + conversationState.currentConversationInfo.lastMessage && + conversationState.currentConversationInfo.lastMessage.messageId === message.messageId + ) { + Object.assign(conversationState.currentConversationInfo.lastMessage, message); + } + }); + + wfc.eventEmitter.on(EventType.MessageRead, (readEntries) => { + // optimization + if (conversationState.currentConversationInfo) { + // wfc.getConversationRead 每次返回同一个对象,只是该对象的值不一样。 + // 由于 VUE 不能检测到初始化时,不存在的属性的变更,故此处重新 new 一个新的对象,并赋值。 + // FYI:https://vuejs.org/v2/guide/reactivity.html + conversationState.currentConversationRead = new Map( + wfc.getConversationRead(conversationState.currentConversationInfo.conversation), + ); + } + }); + + if (wfc.getConnectionStatus() === ConnectionStatus.ConnectionStatusConnected) { + this._loadDefaultData(); + } + miscState.connectionStatus = wfc.getConnectionStatus(); + }, + + _loadDefaultData() { + console.log('store.js', '_loadDefaultData'); + this._loadFavGroupList(); + this._loadChannelList(); + this._loadFriendList(); + this._loadFavContactList(); + this._loadFriendRequest(); + this._loadSelfUserInfo(); + this._loadDefaultConversationList(); + this._loadUserLocalSettings(); + conversationState.isMessageReceiptEnable = wfc.isReceiptEnabled() && wfc.isUserReceiptEnabled(); + if (conversationState.currentConversationInfo) { + this._loadCurrentConversationMessages(); + } + }, + + // conversation actions + + _isDisplayMessage(message) { + // return [PersistFlag.Persist, PersistFlag.Persist_And_Count].indexOf(MessageConfig.getMessageContentPersitFlag(message.messageContent.type)) > -1; + return ( + message.messageId !== 0 || + message.messageContent.type === MessageContentType.Streaming_Text_Generating + ); + }, + + _loadDefaultConversationList() { + this._loadConversationList([0, 1, 3], [0]); + }, + + _loadConversationList(conversationType = [0, 1, 3], lines = [0]) { + let conversationList = wfc.getConversationList(conversationType, lines); + let toLoadUserIdSet = new Set(); + let toLoadGroupIds = []; + console.log('_loadConversationList size', conversationList.length); + conversationList.forEach((info) => { + if (info.conversation.type === ConversationType.Single) { + toLoadUserIdSet.add(info.conversation.target); + if (info.lastMessage) { + toLoadUserIdSet.add(info.lastMessage.from); + } + } else if (info.conversation.type === ConversationType.Group) { + toLoadGroupIds.push(info.conversation.target); + if (info.lastMessage) { + toLoadUserIdSet.add(info.lastMessage.from); + } + } + }); + let userInfoMap = new Map(); + let groupInfoMap = new Map(); + toLoadUserIdSet.forEach((uid) => { + userInfoMap.set(uid, new NullUserInfo(uid)); + }); + toLoadGroupIds.forEach((gid) => { + groupInfoMap.set(gid, new NullGroupInfo(gid)); + }); + + console.log('to load userIds', toLoadUserIdSet.size); + wfc.getUserInfos([...toLoadUserIdSet], '').forEach((u) => { + userInfoMap.set(u.uid, u); + }); + wfc.getGroupInfos(toLoadGroupIds).forEach((g) => { + groupInfoMap.set(g.target, g); + }); + + conversationList.forEach((info) => { + this._patchConversationInfo(info, true, userInfoMap, groupInfoMap); + // side affect + if ( + conversationState.currentConversationInfo && + conversationState.currentConversationInfo.conversation.equal(info.conversation) + ) { + conversationState.currentConversationInfo = info; + this._patchCurrentConversationOnlineStatus(); + } + }); + conversationState.conversationInfoList = conversationList; + }, + + _reloadConversation(conversation, insertIfNoExist = true) { + let conversationInfo = wfc.getConversationInfo(conversation); + if (conversationInfo) { + conversationInfo = this._patchConversationInfo(conversationInfo); + } + let index = conversationState.conversationInfoList.findIndex((info) => + info.conversation.equal(conversation), + ); + if (index >= 0) { + Object.assign(conversationState.conversationInfoList[index], conversationInfo); + } else { + if ( + insertIfNoExist && + gt(conversationInfo.timestamp, 0) && + conversation.type !== ConversationType.ChatRoom + ) { + conversationState.conversationInfoList.push(conversationInfo); + } else { + return conversationInfo; + } + } + + if ( + conversationState.currentConversationInfo && + conversationState.currentConversationInfo.conversation.equal(conversation) + ) { + conversationState.currentConversationInfo = conversationInfo; + } + + // sort + conversationState.conversationInfoList.sort((a, b) => { + if ((a.top && b.top) || (!a.top && !b.top)) { + return gt(a.timestamp, b.timestamp) ? -1 : 1; + } else { + if (a.top) { + return -1; + } else { + return 1; + } + } + }); + return conversationInfo; + }, + + _reloadSingleConversationIfExist(userInfos) { + if (userInfos.length > 10) { + this._loadDefaultConversationList(); + } else { + userInfos.forEach((ui) => { + let conv = new Conversation(ConversationType.Single, ui.uid, 0); + this._reloadConversation(conv, false); + }); + } + }, + + _reloadGroupConversationIfExist(groupInfos) { + if (groupInfos.length > 10) { + this._loadDefaultConversationList(); + } else { + groupInfos.forEach((gi) => { + let conv = new Conversation(ConversationType.Group, gi.target, 0); + this._reloadConversation(conv, false); + }); + } + }, + + _reloadConversationByMessageIdIfExist(messageId) { + if (messageId === 0) { + return; + } + let toLoadConversationInfo = null; + for (let i = 0; i < conversationState.conversationInfoList.length; i++) { + let info = conversationState.conversationInfoList[i]; + if (info.lastMessage && info.lastMessage.messageId === messageId) { + toLoadConversationInfo = info; + break; + } + } + + if (toLoadConversationInfo) { + this._reloadConversation(toLoadConversationInfo.conversation); + } + }, + _reloadConversationByMessageUidIfExist(messageUid) { + let toLoadConversationInfo = null; + for (let i = 0; i < conversationState.conversationInfoList.length; i++) { + let info = conversationState.conversationInfoList[i]; + if (info.lastMessage && eq(info.lastMessage.messageUid, messageUid)) { + toLoadConversationInfo = info; + break; + } + } + + if (toLoadConversationInfo) { + this._reloadConversation(toLoadConversationInfo.conversation); + } + }, + + setCurrentConversation(conversation) { + if (!conversation) { + this.setCurrentConversationInfo(null); + return; + } + if ( + conversationState.currentConversationInfo && + conversation.equal(conversationState.currentConversationInfo.conversation) + ) { + return; + } + let convs = conversationState.conversationInfoList.filter((info) => + info.conversation.equal(conversation), + ); + let info; + if (convs && convs.length > 0) { + info = convs[0]; + } else { + wfc.setConversationTimestamp(conversation, new Date().getTime()); + info = this._reloadConversation(conversation); + } + this.setCurrentConversationInfo(info); + }, + + setCurrentConversationInfo(conversationInfo) { + if (!conversationInfo) { + if (conversationState.currentConversationInfo) { + let conversation = conversationState.currentConversationInfo.conversation; + if ([ConversationType.Single, ConversationType.Group].indexOf(conversation.type) >= 0) { + wfc.unwatchOnlineState(conversation.type, [conversation.target]); + } else if (conversation.type === ConversationType.Channel) { + let content = new LeaveChannelChatMessageContent(); + wfc.sendConversationMessage(conversation, content); + } else if (conversation.type === ConversationType.ChatRoom) { + wfc.quitChatroom(conversation.target); + } + } + conversationState.currentConversationInfo = null; + conversationState.shouldAutoScrollToBottom = false; + conversationState.currentConversationMessageList.length = 0; + conversationState.currentConversationOldestMessageId = 0; + conversationState.currentConversationOldestMessageUid = 0; + conversationState.currentConversationRead = null; + conversationState.enableMessageMultiSelection = false; + + return; + } + + if ( + conversationState.currentConversationInfo && + conversationState.currentConversationInfo.conversation.equal(conversationInfo.conversation) + ) { + return; + } + + let conversation = conversationInfo.conversation; + if ( + conversation.type === ConversationType.Group || + (conversation.type === ConversationType.Single && !wfc.isMyFriend(conversation.target)) + ) { + wfc.watchOnlineState( + conversation.type, + [conversation.target], + 1000, + (states) => { + states.forEach((e) => { + miscState.userOnlineStateMap.set(e.userId, e); + }); + this._patchCurrentConversationOnlineStatus(); + }, + (err) => { + console.log('watchOnlineState error', err); + }, + ); + } + if (conversation.type === ConversationType.Channel) { + let content = new EnterChannelChatMessageContent(); + wfc.sendConversationMessage(conversation, content); + } else if (conversation.type === ConversationType.ChatRoom) { + wfc.joinChatroom(conversation.target); + } + conversationState.currentConversationInfo = conversationInfo; + conversationState.shouldAutoScrollToBottom = true; + conversationState.currentConversationMessageList.length = 0; + conversationState.currentConversationOldestMessageId = 0; + conversationState.currentConversationOldestMessageUid = 0; + this._loadCurrentConversationMessages(); + + conversationState.currentConversationRead = wfc.getConversationRead( + conversationInfo.conversation, + ); + + conversationState.enableMessageMultiSelection = false; + conversationState.showChannelMenu = false; + if (conversation.type === ConversationType.Channel) { + let channelInfo = wfc.getChannelInfo(conversation.target, true); + if (channelInfo.menus && channelInfo.menus.length > 0) { + conversationState.showChannelMenu = true; + } + } else if (conversation.type === ConversationType.Group) { + wfc.getGroupInfo(conversation.target, true); + } else if (conversation.type === ConversationType.Single) { + wfc.getUserInfo(conversation.target, true); + } + conversationState.quotedMessage = null; + conversationState.currentVoiceMessage = null; + + clearTimeout(conversationState.inputClearHandler); + conversationState.inputtingUser = null; + + pickState.messages.length = 0; + }, + + quitGroup(groupId) { + wfc.quitGroup( + groupId, + [0], + null, + () => { + this.setCurrentConversationInfo(null); + let conversation = new Conversation(ConversationType.Group, groupId, 0); + conversationState.conversationInfoList = conversationState.conversationInfoList.filter( + (info) => !info.conversation.equal(conversation), + ); + }, + (err) => { + console.log('quit group error', err); + }, + ); + }, + dismissGroup(groupId) { + wfc.dismissGroup( + groupId, + [0], + null, + () => { + this.setCurrentConversationInfo(null); + let conversation = new Conversation(ConversationType.Group, groupId, 0); + conversationState.conversationInfoList = conversationState.conversationInfoList.filter( + (info) => !info.conversation.equal(conversation), + ); + }, + (err) => { + console.log('dismiss group error', err); + }, + ); + }, + subscribeChannel(channelId, subscribe) { + wfc.listenChannel( + channelId, + subscribe, + () => { + //this.setCurrentConversationInfo(null) + }, + (err) => { + console.log('unsubscribe channel error', err); + }, + ); + }, + + toggleMessageMultiSelection(message) { + conversationState.enableMessageMultiSelection = !conversationState.enableMessageMultiSelection; + pickState.messages.length = 0; + if (conversationState.enableMessageMultiSelection && message) { + pickState.messages.push(message); + } + }, + + toggleChannelMenu(toggle) { + conversationState.showChannelMenu = toggle; + }, + + selectOrDeselectMessage(message) { + let index = pickState.messages.findIndex((m) => m.messageId === message.messageId); + if (index >= 0) { + pickState.messages.splice(index, 1); + } else { + pickState.messages.push(message); + } + }, + + deleteSelectedMessages() { + conversationState.enableMessageMultiSelection = false; + if (pickState.messages.length < 1) { + return; + } + pickState.messages.sort((m1, m2) => m1.messageId - m2.messageId); + pickState.messages.forEach((m) => { + wfc.deleteMessage(m.messageId); + }); + pickState.messages.length = 0; + }, + + forwardMessage(forwardType, targetConversations, messages, extraMessageText) { + targetConversations.forEach((conversation) => { + // let msg =new Message(conversation, message.messageContent) + // wfc.sendMessage(msg) + // 或者下面这种 + if (forwardType === ForwardType.NORMAL || forwardType === ForwardType.ONE_BY_ONE) { + messages.forEach((message) => { + if (message.messageContent instanceof ArticlesMessageContent) { + let linkContents = message.messageContent.toLinkMessageContent(); + linkContents.forEach((lm) => { + wfc.sendConversationMessage(conversation, lm); + }); + } else { + message.messageContent = this._filterForwardMessageContent(message); + wfc.sendConversationMessage(conversation, message.messageContent); + } + }); + } else { + // 合并转发 + let compositeMessageContent = new CompositeMessageContent(); + let title = ''; + let msgConversation = messages[0].conversation; + if (msgConversation.type === ConversationType.Single) { + let users = store.getUserInfos([wfc.getUserId(), msgConversation.target], ''); + title = users[0]._displayName + '和' + users[1]._displayName + '的聊天记录'; + } else { + title = '群的聊天记录'; + } + compositeMessageContent.title = title; + let msgs = messages.map((m) => { + m.messageContent = this._filterForwardMessageContent(m); + return m; + }); + compositeMessageContent.setMessages(msgs); + + wfc.sendConversationMessage(conversation, compositeMessageContent); + } + + if (extraMessageText) { + let textMessage = new TextMessageContent(extraMessageText); + wfc.sendConversationMessage(conversation, textMessage); + } + }); + }, + + forwardByCreateConversation(forwardType, users, messages, extraMessageText) { + this.createConversation( + users, + (conversation) => { + this.forwardMessage(forwardType, [conversation], messages, extraMessageText); + }, + (err) => { + console.error('createConversation error', err); + }, + ); + }, + + setShouldAutoScrollToBottom(scroll) { + conversationState.shouldAutoScrollToBottom = scroll; + }, + + /** + * + * @param src {String} 媒体url + * @param thumbUrl {String} 缩略图url + * @param thumb {String} base64格式的缩略图,但不包含'data:image/png;base64,' + * @param autoplay + */ + previewMedia(src, thumbUrl, thumb, autoplay = true) { + conversationState.previewMediaItems.length = 0; + conversationState.previewMediaItems.push({ + src: src, + thumb: thumbUrl ? thumbUrl : 'data:image/png;base64,' + thumb, + autoplay: autoplay, + }); + conversationState.previewMediaIndex = 0; + console.log( + 'preview media', + conversationState.previewMediaItems, + conversationState.previewMediaIndex, + ); + }, + previewMedias(mediaItems, index) { + conversationState.previewMediaItems.length = 0; + conversationState.previewMediaItems.push(...mediaItems); + conversationState.previewMediaIndex = index; + console.log( + 'preview medias', + conversationState.previewMediaItems, + conversationState.previewMediaIndex, + ); + }, + + playVoice(message) { + if (conversationState.currentVoiceMessage) { + conversationState.currentVoiceMessage._isPlaying = false; + } + conversationState.currentVoiceMessage = message; + }, + + /** + * + * @param message + * @param {Boolean} continuous true,预览周围的媒体消息;false,只预览第一个参数传入的那条媒体消息 + */ + previewMessage(message, continuous) { + conversationState.previewMediaItems.length = 0; + conversationState.previewMediaIndex = 0; + if (continuous && conversationState.currentConversationMessageList.length > 0) { + let mediaMsgs = conversationState.currentConversationMessageList.filter( + (m) => + [MessageContentType.Image, MessageContentType.Video].indexOf(m.messageContent.type) > -1, + ); + let msg; + for (let i = 0; i < mediaMsgs.length; i++) { + msg = mediaMsgs[i]; + if (msg.messageId === message.messageId) { + conversationState.previewMediaIndex = i; + } + conversationState.previewMediaItems.push({ + src: msg.messageContent.remotePath, + thumb: 'data:image/png;base64,' + msg.messageContent.thumbnail, + autoplay: true, + }); + } + } else { + conversationState.previewMediaIndex = 0; + conversationState.previewMediaItems.push({ + src: message.messageContent.remotePath, + thumb: 'data:image/png;base64,' + message.messageContent.thumbnail, + autoplay: true, + }); + } + }, + + previewCompositeMessage(compositeMessage, focusMessageUid) { + conversationState.previewMediaItems.length = 0; + conversationState.previewMediaIndex = 0; + + let mediaMsgs = compositeMessage.messageContent.messages.filter( + (m) => + [MessageContentType.Image, MessageContentType.Video].indexOf(m.messageContent.type) > -1, + ); + let msg; + for (let i = 0; i < mediaMsgs.length; i++) { + msg = mediaMsgs[i]; + if (eq(msg.messageUid, focusMessageUid)) { + conversationState.previewMediaIndex = i; + } + conversationState.previewMediaItems.push({ + src: msg.messageContent.remotePath, + thumb: 'data:image/png;base64,' + msg.messageContent.thumbnail, + autoplay: true, + }); + } + }, + + /** + * + * @param conversation + * @param {File | string} file html File 类型或者url,绝对路径只在electron里面生效 + * @return {Promise} + */ + async sendFile(conversation, file) { + if (file.size && file.size > 100 * 1024 * 1024) { + if (!wfc.isSupportBigFilesUpload() || conversation.type === ConversationType.SecretChat) { + console.log('file too big, and not support upload big file'); + return true; + } + } + let fileOrLocalPath = null; + let remotePath = null; + if (typeof file === 'string') { + if (!file.startsWith('http')) { + fileOrLocalPath = file; + } else { + remotePath = file; + } + + file = { + path: file, + name: file.substring(file.lastIndexOf('/') + 1), + }; + } else { + fileOrLocalPath = file; + } + let msg = new Message(); + msg.conversation = conversation; + + let mediaType = helper.getMediaType(file.name.split('.').slice(-1).pop()); + // todo other file type + let messageContentmediaType = { + pic: MessageContentMediaType.Image, + video: MessageContentMediaType.Video, + doc: MessageContentMediaType.File, + }[mediaType]; + + let messageContent; + switch (messageContentmediaType) { + case MessageContentMediaType.Image: + messageContent = new ImageMessageContent(fileOrLocalPath, remotePath); + break; + case MessageContentMediaType.Video: + messageContent = new VideoMessageContent(fileOrLocalPath, remotePath, '', 0); + break; + case MessageContentMediaType.File: + messageContent = new FileMessageContent(fileOrLocalPath, remotePath); + break; + default: + console.log('not support file'); + return false; + } + msg.messageContent = messageContent; + wfc.sendMessage( + msg, + (messageId) => { + msg.messageId = messageId; + console.log('sf, pr', messageId); + }, + (progress, total) => { + // console.log('sf p', msg.messageId, Math.ceil(progress / total * 100)) + let sm = conversationState.sendingMessages.find((e) => e.messageId === msg.messageId); + if (sm) { + sm.progress = progress; + sm.total = total; + } else { + conversationState.sendingMessages.push({ messageId: msg.messageId, progress, total }); + } + }, + (messageUid) => { + console.log('sf s', messageUid); + + conversationState.sendingMessages = conversationState.sendingMessages.filter( + (e) => e.messageId !== msg.messageId, + ); + }, + (error) => { + console.log('sf e', error); + + conversationState.sendingMessages = conversationState.sendingMessages.filter( + (e) => e.messageId !== msg.messageId, + ); + }, + ); + }, + + quoteMessage(message) { + conversationState.quotedMessage = message; + }, + + getConversationInfo(conversation) { + let info = wfc.getConversationInfo(conversation); + return this._patchConversationInfo(info, false); + }, + + /** + * 获取会话消息 + * @param {Conversation} conversation 会话 + * @param {number} fromIndex 其实消息的 messageId + * @param {boolean} before 获取其实消息之前,还是之后的消息 + * @param {string} withUser 过滤该用户发送或接收的消息 + * @param {function (Message[]) } callback 消息列表会回调 + */ + getMessages(conversation, fromIndex = 0, before = true, withUser = '', callback) { + wfc.getMessagesV2( + conversation, + fromIndex, + before, + 20, + withUser, + (msgs) => { + msgs = msgs.map((m) => this._patchMessage(m, 0)); + //callback && callback(msgs); + callback && callback(msgs); + }, + (err) => { + console.error('getMessageV2 error', err); + callback && callback([]); + }, + ); + }, + + getMessageInTypes(conversation, contentTypes, timestamp, before = true, withUser = '', callback) { + wfc.getMessagesByTimestampV2( + conversation, + contentTypes, + timestamp, + before, + 20, + withUser, + (msgs) => { + msgs = msgs.map((m) => this._patchMessage(m, 0)); + setTimeout(() => callback && callback(msgs), 200); + }, + (err) => { + callback && callback([]); + }, + ); + }, + + _loadCurrentConversationMessages() { + console.log('_loadCurrentConversationMessages'); + if (!conversationState.currentConversationInfo) { + return; + } + let conversation = conversationState.currentConversationInfo.conversation; + wfc.getMessagesV2( + conversation, + 0, + true, + 20, + '', + (msgs) => { + conversationState.currentConversationMessageList = msgs; + this._patchCurrentConversationMessages(); + if (msgs.length) { + conversationState.currentConversationOldestMessageId = msgs[0].messageId; + } + for (let i = 0; i < msgs.length; i++) { + if (gt(msgs[i].messageUid, 0)) { + conversationState.currentConversationOldestMessageUid = msgs[0].messageUid; + break; + } + } + console.log('_loadCurrentConversationMessages success', conversation, msgs); + }, + (err) => { + console.error('_loadCurrentConversationMessages error', err); + }, + ); + }, + + _patchCurrentConversationMessages() { + let lastTimestamp = 0; + let msgs = conversationState.currentConversationMessageList; + msgs.forEach((m) => { + this._patchMessage(m, lastTimestamp); + lastTimestamp = m.timestamp; + }); + }, + + _onloadConversationMessages(conversation, messages) { + if (!messages || messages.length === 0) { + return false; + } + let loadNewMsg = false; + let lastTimestamp = 0; + let newMsgs = []; + messages.forEach((m) => { + let index = conversationState.currentConversationMessageList.findIndex( + (cm) => cm.messageId === m.messageId, + ); + if (index === -1) { + this._patchMessage(m, lastTimestamp); + lastTimestamp = m.timestamp; + newMsgs.push(m); + loadNewMsg = true; + } + }); + conversationState.currentConversationMessageList = newMsgs.concat( + conversationState.currentConversationMessageList, + ); + return loadNewMsg; + }, + + loadConversationHistoryMessages(loadedCB, completeCB) { + if (!conversationState.currentConversationInfo) { + return; + } + let conversation = conversationState.currentConversationInfo.conversation; + console.log( + 'loadConversationHistoryMessage', + conversation, + conversationState.currentConversationOldestMessageId, + stringValue(conversationState.currentConversationOldestMessageUid), + ); + let loadRemoteHistoryMessageFunc = () => { + console.log( + 'loadRemoteConversationMessages request', + stringValue(conversationState.currentConversationOldestMessageUid), + ); + wfc.loadRemoteConversationMessages( + conversation, + [], + conversationState.currentConversationOldestMessageUid, + 20, + (msgs, hasMore) => { + console.log( + 'loadRemoteConversationMessages response', + stringValue(conversationState.currentConversationOldestMessageUid), + msgs.length, + ); + if (msgs.length === 0) { + // 拉回来的消息,本地全都有时,会走到这儿 + if (hasMore) { + loadedCB(); + } else { + completeCB(); + } + } else { + // 可能拉回来的时候,本地已经切换会话了 + if (conversation.equal(conversationState.currentConversationInfo.conversation)) { + conversationState.currentConversationOldestMessageUid = msgs[0].messageUid; + msgs = msgs.filter((m) => m.messageId !== 0); + this._onloadConversationMessages(conversation, msgs); + } + this._reloadConversation(conversation); + loadedCB(); + } + }, + (error) => { + completeCB(); + }, + ); + }; + + wfc.getMessagesV2( + conversation, + conversationState.currentConversationOldestMessageId, + true, + 20, + '', + (lmsgs) => { + if (lmsgs.length > 0) { + if (!conversation.equal(conversationState.currentConversationInfo.conversation)) { + return; + } + conversationState.currentConversationOldestMessageId = lmsgs[0].messageId; + if (gt(lmsgs[0].messageUid, 0)) { + conversationState.currentConversationOldestMessageUid = lmsgs[0].messageUid; + } + let loadNewMsg = this._onloadConversationMessages(conversation, lmsgs); + if (!loadNewMsg) { + loadRemoteHistoryMessageFunc(); + } else { + // loadedCB(); + setTimeout(() => loadedCB(), 200); + } + } else { + loadRemoteHistoryMessageFunc(); + } + }, + (err) => { + completeCB(); + }, + ); + }, + + setConversationTop(conversation, top) { + wfc.setConversationTop( + conversation, + top, + () => { + this._reloadConversation(conversation); + }, + (err) => { + console.log('setConversationTop error', err); + }, + ); + }, + + setConversationSilent(conversation, silent) { + wfc.setConversationSlient( + conversation, + silent, + () => { + this._reloadConversation(conversation); + }, + (err) => { + console.log('setConversationSilent error', err); + }, + ); + }, + + removeConversation(conversation) { + wfc.removeConversation(conversation, false); + if ( + conversationState.currentConversationInfo && + conversationState.currentConversationInfo.conversation.equal(conversation) + ) { + this.setCurrentConversationInfo(null); + } + conversationState.conversationInfoList = conversationState.conversationInfoList.filter( + (info) => !info.conversation.equal(conversation), + ); + }, + + getMessageById(messageId) { + let msg = wfc.getMessageById(messageId); + if (msg) { + this._patchMessage(msg, 0); + } + return msg; + }, + + getMessageByUid(messageUid) { + let msg = wfc.getMessageByUid(messageUid); + if (msg) { + this._patchMessage(msg, 0); + } + return msg; + }, + + _patchMessage(m, lastTimestamp = 0, userInfoMap) { + // TODO + // _from + // _showTime + if (m.conversation.type === ConversationType.Single) { + m._from = userInfoMap ? userInfoMap.get(m.from) : wfc.getUserInfo(m.from, false, ''); + } + if (!m._from) { + m._from = wfc.getUserInfo( + m.from, + false, + m.conversation.type === ConversationType.Group ? m.conversation.target : '', + ); + } + if (m.conversation.type === ConversationType.Group) { + m._from._displayName = wfc.getGroupMemberDisplayNameEx(m._from); + } else { + m._from._displayName = wfc.getUserDisplayNameEx(m._from); + } + if ( + numberValue(lastTimestamp) > 0 && + numberValue(m.timestamp) - numberValue(lastTimestamp) > 5 * 60 * 1000 + ) { + m._showTime = true; + } + m._timeStr = helper.timeFormat(m.timestamp); + + if (m.messageContent instanceof CompositeMessageContent) { + this._patchCompositeMessageContent(m.messageContent); + } + + // TODO 如果Im server支持备选网络,需要根据当前的网络情况,判断当前是处于主网络,还是备选网络,并动态修改媒体类消息的remotePath,不然可能会出现不能正常加载的情况 + // 如何判断是主网络,还是备选网络,这儿提供一种思路:分别通过主网络和备选网络测试访问im server的/api/version接口 + // 判断是主网络,还是备选网络,一般启动的时候,检测到网络网络变化的时候,在判断一次。 + // if(m.messageContent instanceof MediaMessageContent){ + // TODO 动态修改remotePath + // } + + return m; + }, + + _patchCompositeMessageContent(compositeMessageContent) { + let messages = compositeMessageContent.messages; + messages.forEach((m) => { + this._patchMessage(m, 0); + }); + }, + + _patchConversationInfo(info, patchLastMessage = true, userInfoMap, groupInfoMap) { + if (info.conversation.type === ConversationType.Single) { + info.conversation._target = userInfoMap + ? userInfoMap.get(info.conversation.target) + : wfc.getUserInfo(info.conversation.target, false); + if (info.conversation._target) { + info.conversation._target._displayName = wfc.getUserDisplayNameEx( + info.conversation._target, + ); + } + } else if (info.conversation.type === ConversationType.Group) { + info.conversation._target = groupInfoMap + ? groupInfoMap.get(info.conversation.target) + : wfc.getGroupInfo(info.conversation.target, false); + if (info.conversation._target) { + info.conversation._target._isFav = wfc.isFavGroup(info.conversation.target); + info.conversation._target._displayName = info.conversation._target.remark + ? info.conversation._target.remark + : info.conversation._target.name; + } + } else if (info.conversation.type === ConversationType.Channel) { + info.conversation._target = wfc.getChannelInfo(info.conversation.target, false); + info.conversation._target._displayName = info.conversation._target.name; + } else if (info.conversation.type === ConversationType.ChatRoom) { + wfc.getChatroomInfo( + info.conversation.target, + 0, + (chatRoomInfo) => { + info.conversation._target = chatRoomInfo; + }, + (err) => { + console.log('get chatRoomInfo error', err); + info.conversation._target = {}; + }, + ); + } + if (gt(info.timestamp, 0)) { + info._timeStr = helper.dateFormat(info.timestamp); + } else { + info._timeStr = ''; + } + + // 显示的时候,再 patch + if (info.lastMessage && info.lastMessage.conversation !== undefined && patchLastMessage) { + //this._patchMessage(info.lastMessage, 0, userInfoMap) + if (!info.lastMessage._from) { + info.lastMessage._from = undefined; + } + } + + if (info.unreadCount) { + info._unread = + info.unreadCount.unread + + info.unreadCount.unreadMention + + info.unreadCount.unreadMentionAll; + } + // if (info.conversation.equal(avenginekitproxy.conversation)) { + // info._isVoipOngoing = true; + // } else { + // info._isVoipOngoing = false; + // } + + return info; + }, + + addDownloadingMessage(messageId) { + conversationState.downloadingMessages.push({ + messageId: messageId, + progress: 0, + total: Number.MAX_SAFE_INTEGER, + }); + console.log('add downloading'); + }, + + isDownloadingMessage(messageId) { + return conversationState.downloadingMessages.findIndex((dm) => dm.messageId === messageId) >= 0; + }, + + isSendingMessage(messageId) { + return conversationState.sendingMessages.has(messageId); + }, + getDownloadingMessageStatus(messageId) { + return conversationState.downloadingMessages.find((dm) => dm.messageId === messageId); + }, + + getSendingStatus(messageId) { + return conversationState.sendingMessages.find((e) => e.messageId === messageId); + }, + + addFloatingConversation(conversation) { + conversationState.floatingConversations.push(conversation); + }, + + removeFloatingConversation(conversation) { + conversationState.floatingConversations = conversationState.floatingConversations.filter( + (c) => !c.equal(conversation), + ); + }, + + isConversationInCurrentWindow(conversation) { + if (miscState.isMainWindow) { + let index = conversationState.floatingConversations.findIndex((fc) => fc.equal(conversation)); + return index === -1; + } else { + return ( + conversationState.currentConversationInfo && + conversationState.currentConversationInfo.conversation.equal(conversation) + ); + } + }, + + // contact actions + + _loadSelfUserInfo() { + contactState.selfUserInfo = wfc.getUserInfo(wfc.getUserId(), false); + }, + + _loadFriendList() { + let friends = wfc.getMyFriendList(false); + let fileHelperIndex = friends.indexOf(Config.FILE_HELPER_ID); + if (fileHelperIndex < 0) { + friends.push(Config.FILE_HELPER_ID); + } + if (friends && friends.length > 0) { + let friendList = wfc.getUserInfos(friends, ''); + contactState.friendList = this._patchAndSortUserInfos(friendList, ''); + } + }, + + getUserOnlineState(userId) { + let userOnlineState = miscState.userOnlineStateMap.get(userId); + if (userOnlineState) { + return userOnlineState.desc(); + } + return ''; + }, + + _patchCurrentConversationOnlineStatus() { + let convInfo = conversationState.currentConversationInfo; + if (convInfo && convInfo.conversation.type === ConversationType.Single) { + conversationState.currentConversationInfo.conversation._targetOnlineStateDesc = + this.getUserOnlineState(convInfo.conversation.target); + } else { + //TODO + } + }, + _loadFriendRequest() { + let requests = wfc.getIncommingFriendRequest(); + + requests.sort((a, b) => numberValue(b.timestamp) - numberValue(a.timestamp)); + requests = requests.length >= 20 ? requests.slice(0, 20) : requests; + let uids = []; + requests.forEach((fr) => { + uids.push(fr.target); + }); + let userInfos = wfc.getUserInfos(uids, ''); + requests.forEach((fr) => { + let userInfo = userInfos.find((u) => u.uid === fr.target); + fr._target = userInfo; + }); + + contactState.friendRequestList = requests; + contactState.unreadFriendRequestCount = wfc.getUnreadFriendRequestCount(); + }, + + _patchAndSortUserInfos(userInfos, groupId = '', compareFn) { + userInfos = userInfos.map((u) => { + if (groupId) { + u._displayName = wfc.getGroupMemberDisplayNameEx(u); + } else { + u._displayName = wfc.getUserDisplayNameEx(u); + } + u._pinyin = pinyin(u._displayName, { style: 0 }).join('').trim().toLowerCase(); + let firstLetter = u._pinyin[0]; + if (firstLetter >= 'a' && firstLetter <= 'z') { + u.__sortPinyin = 'a' + u._pinyin; + } else { + u.__sortPinyin = 'z' + u._pinyin; + } + u._firstLetters = pinyin(u._displayName, { style: 4 }).join('').trim().toLowerCase(); + return u; + }); + if (compareFn) { + userInfos = userInfos.sort(compareFn); + } else { + userInfos = userInfos.sort((a, b) => a.__sortPinyin.localeCompare(b.__sortPinyin)); + } + + userInfos.forEach((u) => { + let uFirstLetter = u.__sortPinyin[1]; + if (uFirstLetter >= 'a' && uFirstLetter <= 'z') { + u._category = uFirstLetter; + } else { + u._category = '#'; + } + u._userOnlineStatusDesc = this.getUserOnlineState(u.uid); + }); + return userInfos; + }, + + _loadFavGroupList() { + contactState.favGroupList = wfc.getFavGroupList(); + }, + + _loadChannelList() { + let channelIds = wfc.getListenedChannels(); + if (channelIds) { + contactState.channelList = channelIds.map((channelId) => + wfc.getChannelInfo(channelId, false), + ); + contactState.channelList = contactState.channelList.filter((ch) => { + return !(ch instanceof NullChannelInfo); + }); + } + }, + _loadFavContactList() { + let favUserIds = wfc.getFavUsers(); + if (favUserIds.length > 0) { + contactState.favContactList = this.getUserInfos(favUserIds, ''); + contactState.favContactList.forEach((u) => { + u._category = '☆ 星标朋友'; + }); + } else { + contactState.favContactList = []; + } + }, + + reloadFavGroupList() { + this._loadFavGroupList(); + }, + + setCurrentFriendRequest(friendRequest) { + contactState.currentFriendRequest = friendRequest; + contactState.currentFriend = null; + contactState.currentOrganization = null; + contactState.currentGroup = null; + }, + + setCurrentFriend(friend) { + contactState.currentFriendRequest = null; + contactState.currentFriend = friend; + contactState.currentOrganization = null; + contactState.currentGroup = null; + }, + + setCurrentGroup(group) { + contactState.currentFriendRequest = null; + contactState.currentFriend = null; + contactState.currentOrganization = null; + contactState.currentGroup = group; + }, + + setCurrentOrganization(organization) { + contactState.currentFriendRequest = null; + contactState.currentFriend = null; + contactState.currentGroup = null; + // contactState.currentChannel = null; + contactState.currentOrganization = organization; + }, + + toggleGroupList() { + contactState.expandGroup = !contactState.expandGroup; + }, + + toggleFriendRequestList() { + contactState.expandFriendRequestList = !contactState.expandFriendRequestList; + }, + + toggleFriendList() { + contactState.expandFriendList = !contactState.expandFriendList; + }, + + setSearchQuery(query, options) { + searchState.query = query; + if (query) { + console.log('search', query, options); + if (options.contact) { + searchState.contactSearchResult = this.filterContact(query); + } + if (options.group) { + searchState.groupSearchResult = this.filterGroupConversation(query); + } + if (options.conversation) { + searchState.conversationSearchResult = this.searchConversation(query); + } + // searchState.messageSearchResult = this.searchMessage(query); + // 默认不搜索新用户 + if (options.user) { + this.searchUser(query); + } + } else { + searchState.contactSearchResult = []; + searchState.conversationSearchResult = []; + searchState.groupSearchResult = []; + searchState.messageSearchResult = []; + searchState.userSearchResult = []; + } + }, + + searchUser(query) { + console.log('search user', query); + wfc.searchUser( + query, + SearchType.General, + 0, + (keyword, userInfos) => { + console.log('search user result', query, userInfos); + if (searchState.query === keyword) { + searchState.userSearchResult = userInfos.filter((u) => !wfc.isMyFriend(u.uid)); + } + }, + (err) => { + console.log('search user error', query, err); + if (searchState.query === query) { + searchState.userSearchResult = []; + } + }, + ); + }, + + // TODO 到底是什么匹配了 + filterContact(query) { + let result = contactState.friendList.filter((u) => { + return ( + u._displayName.indexOf(query) > -1 || + u._firstLetters.indexOf(query.toLowerCase()) > -1 || + u._pinyin.indexOf(query.toLowerCase()) > -1 + ); + }); + + console.log('friend searchResult', result); + return result; + }, + + searchFiles(keyword, beforeMessageUid, successCB, failCB) { + if (!keyword) { + return; + } + wfc.searchFiles( + keyword, + null, + '', + beforeMessageUid, + 0, + 20, + (files) => { + this._patchFileRecords(files); + successCB && successCB(files); + }, + (errorCode) => { + console.log('search file error', errorCode); + failCB && failCB(errorCode); + }, + ); + }, + + filterUsers(users, filter) { + if (!users || !filter || !filter.trim()) { + return users; + } + let queryPinyin = pinyin(filter, { style: 0 }).join('').trim().toLowerCase(); + let result = users.filter((u) => { + return ( + u._displayName.indexOf(filter) > -1 || + u._displayName.indexOf(queryPinyin) > -1 || + u._pinyin.indexOf(filter) > -1 || + u._pinyin.indexOf(queryPinyin) > -1 || + u._firstLetters.indexOf(filter) > -1 || + u._firstLetters.indexOf(queryPinyin) > -1 + ); + }); + return result; + }, + + // TODO 匹配类型,是群名称匹配上了,还是群成员的名称匹配上了? + // 目前只搜索群名称 + filterFavGroup(query) { + console.log('to search group', contactState.favGroupList); + let queryPinyin = pinyin(query, { style: 0 }).join('').trim().toLowerCase(); + let result = contactState.favGroupList.filter((g) => { + let groupNamePinyin = pinyin(g.name, { style: 0 }).join('').trim().toLowerCase(); + return ( + g.name.indexOf(query) > -1 || + g.name.indexOf(queryPinyin) > -1 || + groupNamePinyin.indexOf(query) > -1 || + groupNamePinyin.indexOf(queryPinyin) > -1 + ); + }); + + console.log('group searchResult', result); + return result; + }, + + // TODO + filterConversation(query) { + return conversationState.conversationInfoList.filter((info) => { + let displayNamePinyin = pinyin(info.conversation._target._displayName, { style: 0 }) + .join('') + .trim() + .toLowerCase(); + let firstLetters = pinyin(info.conversation._target._displayName, { style: 4 }) + .join('') + .trim() + .toLowerCase(); + return ( + info.conversation._target._displayName.indexOf(query) > -1 || + displayNamePinyin.indexOf(query.toLowerCase()) > -1 || + firstLetters.indexOf(query) > -1 + ); + }); + }, + + filterGroupConversation(query) { + // query = query.toLowerCase(); + // let groups = conversationState.conversationInfoList.filter(info => info.conversation.type === ConversationType.Group).map(info => info.conversation._target); + // return groups.filter(groupInfo => { + // let namePinyin = pinyin(groupInfo.name, {style: 0}).join('').trim().toLowerCase(); + // let firstLetters = pinyin(groupInfo.name, {style: 4}).join('').trim().toLowerCase(); + // return groupInfo.name.indexOf(query) > -1 || namePinyin.indexOf(query) > -1 || firstLetters.indexOf(query) > -1 + // }) + let gsr = wfc.searchGroups(query); + return gsr.map((r) => r.groupInfo); + }, + + searchMessage(conversation, query) { + let msgs = wfc.searchMessage(conversation, query); + msgs = msgs.reverse(); + return msgs.map((m) => this._patchMessage(m, 0)); + }, + + searchMessageInTypes(conversation, contentTypes, query, offset) { + let msgs = wfc.searchMessageByTypes(conversation, query, contentTypes, true, 20, offset); + return msgs.map((m) => this._patchMessage(m, 0)); + }, + + searchConversation(query, types = [0, 1, 2], lines = [0, 1, 2]) { + let results = wfc.searchConversation(query, types, lines); + return results.map((r) => { + let info = wfc.getConversationInfo(r.conversation); + r._conversationInfo = this._patchConversationInfo(info, false); + return r; + }); + }, + + // pick actions + pickOrUnpickUser(user) { + let index = pickState.users.findIndex((u) => u.uid === user.uid); + if (index >= 0) { + pickState.users = pickState.users.filter((u) => user.uid !== u.uid); + } else { + pickState.users.push(user); + } + }, + + isUserPicked(user) { + let index = pickState.users.findIndex((u) => u.uid === user.uid); + return index >= 0; + }, + + // pick actions + pickOrUnpickOrganization(org) { + let index = pickState.organizations.findIndex((o) => o.id === org.id); + if (index >= 0) { + pickState.organizations = pickState.organizations.filter((o) => o.id !== org.id); + } else { + pickState.organizations.push(org); + } + }, + + isOrganizationPicked(org) { + let index = pickState.organizations.findIndex((o) => o.id === org.id); + return index >= 0; + }, + + pickOrUnpickConversation(conversation) { + let index = pickState.conversations.findIndex( + (c) => + conversation.target === c.target && + conversation.line === c.line && + conversation.type === c.type, + ); + if (index >= 0) { + pickState.conversations = pickState.conversations.filter( + (c) => + !( + conversation.target === c.target && + conversation.line === c.line && + conversation.type === c.type + ), + ); + } else { + pickState.conversations.push(conversation); + } + }, + + // misc actions + createConversation(users, successCB, failCB) { + if (users.length === 1) { + let conversation = new Conversation(ConversationType.Single, users[0].uid, 0); + this.setCurrentConversation(conversation); + successCB && successCB(conversation); + return; + } + + let groupName = contactState.selfUserInfo.displayName; + let groupMemberIds = []; + let groupMemberPortraits = [contactState.selfUserInfo.portrait]; + for (let i = 0; i < users.length; i++) { + groupMemberIds.push(users[i].uid); + if (i <= 3) { + groupName += '、' + users[i].displayName; + } + if (i < 8) { + groupMemberPortraits.push(users[i].portrait); + } + } + groupName = groupName.substr(0, groupName.length - 1); + + wfc.createGroup( + null, + GroupType.Restricted, + groupName, + null, + null, + groupMemberIds, + null, + [0], + null, + (groupId) => { + let conversation = new Conversation(ConversationType.Group, groupId, 0); + this.setCurrentConversation(conversation); + successCB && successCB(conversation); + }, + (error) => { + console.log('create group error', error); + failCB && failCB(error); + }, + ); + }, + + _loadUserLocalSettings() { + let userId = wfc.getUserId(); + // 默认允许通知 + let setting = getItem(userId + '-' + 'notification'); + miscState.enableNotification = setting === null || setting === '' || setting === '1'; + setting = getItem(userId + '-' + 'notificationDetail'); + miscState.enableNotificationMessageDetail = setting === null || setting === '1'; + }, + + setEnableNotification(enable) { + miscState.enableNotification = enable; + setItem(contactState.selfUserInfo.uid + '-' + 'notification', enable ? '1' : '0'); + }, + + setEnableNotificationDetail(enable) { + miscState.enableNotificationMessageDetail = enable; + setItem(contactState.selfUserInfo.uid + '-' + 'notificationDetail', enable ? '1' : '0'); + }, + + // clone一下,别影响到好友列表 + getUserInfos(userIds, groupId) { + let userInfos = wfc.getUserInfos(userIds, groupId); + let userInfosCloneCopy = userInfos.map((u) => Object.assign({}, u)); + return this._patchAndSortUserInfos(userInfosCloneCopy, groupId); + }, + + // clone一下,别影响到好友列表 + getGroupMemberUserInfos(groupId, includeSelf = true, sortByPinyin = false) { + let memberIds = wfc.getGroupMemberIds(groupId); + let userInfos = wfc.getUserInfos(memberIds, groupId); + if (!includeSelf) { + userInfos = userInfos.filter((u) => u.uid !== wfc.getUserId()); + } + let userInfosCloneCopy = userInfos.map((u) => Object.assign({}, u)); + if (sortByPinyin) { + return this._patchAndSortUserInfos(userInfosCloneCopy, groupId); + } else { + let compareFn = (u1, u2) => { + let index1 = memberIds.findIndex((id) => id === u1.uid); + let index2 = memberIds.findIndex((id) => id === u2.uid); + return index1 - index2; + }; + return this._patchAndSortUserInfos(userInfosCloneCopy, groupId, compareFn); + } + }, + + // clone一下,别影响到好友列表 + getConversationMemberUsrInfos(conversation) { + let userInfos = []; + if (conversation.type === 0) { + if (conversation.target !== contactState.selfUserInfo.uid) { + userInfos.push(wfc.getUserInfo(wfc.getUserId(), false)); + } + userInfos.push(wfc.getUserInfo(conversation.target, false)); + let userInfosCloneCopy = userInfos.map((u) => Object.assign({}, u)); + userInfos = this._patchAndSortUserInfos(userInfosCloneCopy, ''); + } else if (conversation.type === 1) { + userInfos = this.getGroupMemberUserInfos(conversation.target, true); + } + return userInfos; + }, + + getMyFileRecords(beforeUid, count, successCB, failCB) { + if (!successCB) { + return; + } + wfc.getMyFileRecords( + beforeUid, + 0, + count, + (fileRecords) => { + this._patchFileRecords(fileRecords); + successCB(fileRecords); + }, + failCB, + ); + }, + + getConversationFileRecords(conversation, fromUser, beforeMessageUid, count, successCB, failCB) { + wfc.getConversationFileRecords( + conversation, + fromUser, + beforeMessageUid, + 0, + count, + (fileRecords) => { + this._patchFileRecords(fileRecords); + successCB(fileRecords); + }, + failCB, + ); + }, + + deleteFriend(target) { + wfc.deleteFriend( + target, + () => { + let conv = new Conversation(ConversationType.Single, target, 0); + wfc.removeConversation(conv, true); + conversationState.conversationInfoList = conversationState.conversationInfoList.filter( + (info) => !info.conversation.equal(conv), + ); + }, + (err) => { + console.log('deleteFriend error', err); + }, + ); + }, + + _patchFileRecords(fileRecords) { + fileRecords.forEach((fileRecord) => { + let groupId = fileRecord.conversation.type === 1 ? fileRecord.conversation.target : ''; + if (groupId) { + fileRecord._userDisplayName = wfc.getGroupMemberDisplayName(groupId, fileRecord.userId); + } else { + fileRecord._userDisplayName = wfc.getUserDisplayName(fileRecord.userId); + } + let conversationInfo = wfc.getConversationInfo(fileRecord.conversation); + this._patchConversationInfo(conversationInfo, false); + + if (fileRecord.conversation.type === 0) { + fileRecord._conversationDisplayName = + '与' + conversationInfo.conversation._target._displayName + '的聊天'; + } else { + fileRecord._conversationDisplayName = conversationInfo.conversation._target._displayName; + } + if (fileRecord.name.indexOf(FileMessageContent.FILE_NAME_PREFIX) === 0) { + fileRecord.name = fileRecord.name.substring( + fileRecord.name.indexOf(FileMessageContent.FILE_NAME_PREFIX) + + FileMessageContent.FILE_NAME_PREFIX.length, + ); + } + fileRecord._timeStr = helper.dateFormat(fileRecord.timestamp); + fileRecord._sizeStr = helper.humanSize(fileRecord.size); + fileRecord._fileIconName = helper.getFiletypeIcon( + fileRecord.name.substring(fileRecord.name.lastIndexOf('.')), + ); + }); + }, + + clearConversationUnreadStatus(conversation) { + let info = wfc.getConversationInfo(conversation); + if ( + info && + info.unreadCount.unread + info.unreadCount.unreadMention + info.unreadCount.unreadMentionAll > + 0 + ) { + wfc.clearConversationUnreadStatus(conversation); + } + }, + clearAllUnreadStatus() { + wfc.clearAllUnreadStatus(); + conversationState.conversationInfoList.forEach((info) => { + info.unreadCount = new UnreadCount(); + }); + }, + notify(msg) { + let content = msg.messageContent; + let tip; + //Todo + if (msg.direction === 0 /* && !(type===0 && target===file_transfer_id)*/) { + return; + } + if (MessageConfig.getMessageContentPersitFlag(content.type) === PersistFlag.Persist_And_Count) { + if (msg.status !== MessageStatus.AllMentioned && msg.status !== MessageStatus.Mentioned) { + let silent = false; + for (const info of conversationState.conversationInfoList) { + if (info.conversation.equal(msg.conversation)) { + silent = info.isSilent; + break; + } + } + if (silent) { + return; + } + tip = '新消息来了'; + } else { + tip = '有人@你'; + } + + wfc.notify(tip, miscState.enableNotificationMessageDetail ? content.digest(msg) : ''); + } + }, + + _filterForwardMessageContent(message) { + let content = message.messageContent; + if (content instanceof CallStartMessageContent) { + content = new TextMessageContent(content.digest(message)); + } else if (content instanceof SoundMessageContent) { + content = new TextMessageContent(content.digest(message) + ' ' + content.duration + "''"); + } + return content; + }, +}; + +function _reset() { + conversationState._reset(); + contactState._reset(); + searchState._reset(); + pickState._reset(); + miscState._reset(); + + uni.reLaunch({ + url: '/pages/login/LoginPage', + }); +} + +export default store; diff --git a/src/wfcScheme.js b/src/wfcScheme.js new file mode 100644 index 00000000..3f74431c --- /dev/null +++ b/src/wfcScheme.js @@ -0,0 +1,15 @@ +export default class WfcScheme { + static QR_CODE_PREFIX_PC_SESSION = "wildfirechat://pcsession/"; + static QR_CODE_PREFIX_USER = "wildfirechat://user/"; + static QR_CODE_PREFIX_GROUP = "wildfirechat://group/"; + static QR_CODE_PREFIX_CHANNEL = "wildfirechat://channel/"; + static QR_CODE_PREFIX_CONFERENCE = "wildfirechat://conference/"; + + static buildConferenceLink(conferenceId, password) { + let link = WfcScheme.QR_CODE_PREFIX_CONFERENCE + conferenceId; + if (password) { + link += '/?pwd=' + password + } + return link; + } +} diff --git a/src/wfc_custom_message/README.md b/src/wfc_custom_message/README.md new file mode 100644 index 00000000..1067a0f6 --- /dev/null +++ b/src/wfc_custom_message/README.md @@ -0,0 +1,13 @@ +## 说明 + +**自定义消息扩展野火IM 功能时,请勿直接修改`wfc`目录下的内容,修改之后,会为后续升级带来很大的麻烦** + +## 自定义消息步骤 + +1. 定义消息类型,参考[customMessageContentType](./customMessageContentType.js),`1000`以下为内部保留,请使用`1000`以上的消息类型 +2. 实现自定义消息,普通消息参考[testCustomMessageContent](./testCustomMessageContent.js),通知消息参考[testCustomNotificationMessageContent](./testCustomNotificationMessageContent.js) +3. 配置自定义消息,参考[customMessageConfig](./customMessageConfig.js) +4. 实现自定义消息对应的 UI,普通类型消息请参考[testCustomMessageContentView](../pages/conversation/message/content/TestCustomMessageContentView.vue); + 普通通知类消息,默认会使用默认通知样式,具体参考[NotificationMessageContentView](../pages/conversation/message/NotificationMessageContentView.vue); +5. 配置自定义消息和自定义消息 UI 的对应关系,普通消息参考[MessageContentContainerView](../pages/conversation/message/MessageContentContainerView.vue); + 需要自定义通知类消息 UI 时,请参考考[MessageItemView](../ui/main/conversation/MessageItemView.vue) diff --git a/src/wfc_custom_message/customMessageConfig.js b/src/wfc_custom_message/customMessageConfig.js new file mode 100644 index 00000000..54261bff --- /dev/null +++ b/src/wfc_custom_message/customMessageConfig.js @@ -0,0 +1,30 @@ +import PersistFlag from "../wfc/messages/persistFlag"; +import CustomMessageContentType from "./customMessageContentType"; +import TestCustomMessageContent from "./testCustomMessageContent"; +import TestCustomNotificationMessageContent from "./testCustomNotificationMessageContent"; +import wfc from "../wfc/client/wfc"; + +export default class CustomMessageConfig { + static CustomMessageContents = [ + { + name: 'testCustomMessage', // 消息名字 + flag: PersistFlag.Persist,// 消息的存储类型,根据消息是否需要存储选择 + type: CustomMessageContentType.MESSAGE_CONTENT_TYPE_CUSTOM_MESSAGE_TEST, // 消息类型 + contentClazz: TestCustomMessageContent, // 消息类型定义 + }, + { + name: 'testCustomNotificationMessage', + flag: PersistFlag.Persist, + type: CustomMessageContentType.MESSAGE_CONTENT_TYPE_CUSTOM_MESSAGE_TEST_NOTIFICATION, + contentClazz: TestCustomNotificationMessageContent, + }, + // 在此配置更多自定义消息 + ]; + + // 请勿修改 + static registerCustomMessages() { + CustomMessageConfig.CustomMessageContents.forEach(cmc => { + wfc.registerMessageContent(cmc.name, cmc.flag, cmc.type, cmc.contentClazz) + }) + } +} diff --git a/src/wfc_custom_message/customMessageContentType.js b/src/wfc_custom_message/customMessageContentType.js new file mode 100644 index 00000000..21c9ccb9 --- /dev/null +++ b/src/wfc_custom_message/customMessageContentType.js @@ -0,0 +1,5 @@ +export default class CustomMessageContentType { + // 1000 以下为内部消息保留,自定义消息需使用 1000 以上的数字 + static MESSAGE_CONTENT_TYPE_CUSTOM_MESSAGE_TEST = 1001; + static MESSAGE_CONTENT_TYPE_CUSTOM_MESSAGE_TEST_NOTIFICATION = 1002; +} diff --git a/src/wfc_custom_message/testCustomMessageContent.js b/src/wfc_custom_message/testCustomMessageContent.js new file mode 100644 index 00000000..45d404fb --- /dev/null +++ b/src/wfc_custom_message/testCustomMessageContent.js @@ -0,0 +1,35 @@ +import CustomMessageContentType from "./customMessageContentType"; + + +import MessageContent from '../wfc/messages/messageContent' + +/** + * 对应的 UI,请参考{@link TestCustomMessageContentView} + */ +export default class TestCustomMessageContent extends MessageContent { + content; + + constructor(content) { + super(CustomMessageContentType.MESSAGE_CONTENT_TYPE_CUSTOM_MESSAGE_TEST); + this.content = content; + } + + // 会话列表显示对应会话时,会显示会话最后一条消息的摘要信息 + digest() { + return this.content; + } + + // 发送消息时,会进行 encode 操作,实际发送的是 payload + encode() { + let payload = super.encode(); + payload.searchableContent = this.content; + return payload; + } + + // 收到消息时,会执行 decode 操作,从 payload 解析到具体的消息内容,encode 和 decode 的操作要对应起来 + decode(payload) { + super.decode(payload); + this.content = payload.searchableContent; + } +} + diff --git a/src/wfc_custom_message/testCustomNotificationMessageContent.js b/src/wfc_custom_message/testCustomNotificationMessageContent.js new file mode 100644 index 00000000..73730a66 --- /dev/null +++ b/src/wfc_custom_message/testCustomNotificationMessageContent.js @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2020 WildFireChat. All rights reserved. + */ + +import CustomMessageContentType from "./customMessageContentType"; +import NotificationMessageContent from "../wfc/messages/notification/notificationMessageContent"; + +/** + * 对应的 UI 请参考{@link NotificationMessageContentView},或 {@link RichNotificationMessageContentView} + */ +export default class TestCustomNotificationMessageContent extends NotificationMessageContent { + tip = ''; + + constructor(tip) { + super(CustomMessageContentType.MESSAGE_CONTENT_TYPE_CUSTOM_MESSAGE_TEST_NOTIFICATION); + this.tip = tip; + } + + // 会话界面显示通知时,将显示本函数的返回值 + formatNotification() { + return this.tip; + } + + digest() { + return this.tip; + } + + encode() { + let payload = super.encode(); + payload.content = this.tip; + return payload; + }; + + decode(payload) { + super.decode(payload); + this.tip = payload.content; + } +} diff --git a/unpackage/res/icons/1024x1024.png b/unpackage/res/icons/1024x1024.png new file mode 100644 index 00000000..2b055e04 Binary files /dev/null and b/unpackage/res/icons/1024x1024.png differ diff --git a/unpackage/res/icons/120x120.png b/unpackage/res/icons/120x120.png new file mode 100644 index 00000000..713ba8a0 Binary files /dev/null and b/unpackage/res/icons/120x120.png differ diff --git a/unpackage/res/icons/144x144.png b/unpackage/res/icons/144x144.png new file mode 100644 index 00000000..6d4bd4ac Binary files /dev/null and b/unpackage/res/icons/144x144.png differ diff --git a/unpackage/res/icons/152x152.png b/unpackage/res/icons/152x152.png new file mode 100644 index 00000000..2f35987d Binary files /dev/null and b/unpackage/res/icons/152x152.png differ diff --git a/unpackage/res/icons/167x167.png b/unpackage/res/icons/167x167.png new file mode 100644 index 00000000..4dc91f8c Binary files /dev/null and b/unpackage/res/icons/167x167.png differ diff --git a/unpackage/res/icons/180x180.png b/unpackage/res/icons/180x180.png new file mode 100644 index 00000000..0178ff50 Binary files /dev/null and b/unpackage/res/icons/180x180.png differ diff --git a/unpackage/res/icons/192x192.png b/unpackage/res/icons/192x192.png new file mode 100644 index 00000000..00ca6edb Binary files /dev/null and b/unpackage/res/icons/192x192.png differ diff --git a/unpackage/res/icons/20x20.png b/unpackage/res/icons/20x20.png new file mode 100644 index 00000000..d9490b8d Binary files /dev/null and b/unpackage/res/icons/20x20.png differ diff --git a/unpackage/res/icons/29x29.png b/unpackage/res/icons/29x29.png new file mode 100644 index 00000000..474d3ffb Binary files /dev/null and b/unpackage/res/icons/29x29.png differ diff --git a/unpackage/res/icons/40x40.png b/unpackage/res/icons/40x40.png new file mode 100644 index 00000000..78788ea4 Binary files /dev/null and b/unpackage/res/icons/40x40.png differ diff --git a/unpackage/res/icons/58x58.png b/unpackage/res/icons/58x58.png new file mode 100644 index 00000000..3fb428ed Binary files /dev/null and b/unpackage/res/icons/58x58.png differ diff --git a/unpackage/res/icons/60x60.png b/unpackage/res/icons/60x60.png new file mode 100644 index 00000000..ba1f627a Binary files /dev/null and b/unpackage/res/icons/60x60.png differ diff --git a/unpackage/res/icons/72x72.png b/unpackage/res/icons/72x72.png new file mode 100644 index 00000000..937587ac Binary files /dev/null and b/unpackage/res/icons/72x72.png differ diff --git a/unpackage/res/icons/76x76.png b/unpackage/res/icons/76x76.png new file mode 100644 index 00000000..5cc6089b Binary files /dev/null and b/unpackage/res/icons/76x76.png differ diff --git a/unpackage/res/icons/80x80.png b/unpackage/res/icons/80x80.png new file mode 100644 index 00000000..76979029 Binary files /dev/null and b/unpackage/res/icons/80x80.png differ diff --git a/unpackage/res/icons/87x87.png b/unpackage/res/icons/87x87.png new file mode 100644 index 00000000..8756a207 Binary files /dev/null and b/unpackage/res/icons/87x87.png differ diff --git a/unpackage/res/icons/96x96.png b/unpackage/res/icons/96x96.png new file mode 100644 index 00000000..acbb6545 Binary files /dev/null and b/unpackage/res/icons/96x96.png differ diff --git a/yarn.lock b/yarn.lock index 299a65fd..8ad27a9b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -28,7 +28,7 @@ resolved "https://registry.npmmirror.com/@antfu/utils/-/utils-9.3.0.tgz#e05e277f788ac3bec771f57a49fb64546bb32374" integrity sha512-9hFT4RauhcUzqOE4f1+frMKLZrgNog5b06I7VmZQV1BkvwvqrbC8EBZf3L1eEL2AKb6rNKjER0sEvJiSP1FXEA== -"@babel/code-frame@^7.23.5", "@babel/code-frame@^7.27.1": +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.23.5", "@babel/code-frame@^7.27.1": version "7.27.1" resolved "https://registry.npmmirror.com/@babel/code-frame/-/code-frame-7.27.1.tgz#200f715e66d52a23b221a9435534a91cc13ad5be" integrity sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg== @@ -2092,6 +2092,11 @@ dependencies: undici-types "~7.16.0" +"@types/parse-json@^4.0.0": + version "4.0.2" + resolved "https://registry.npmmirror.com/@types/parse-json/-/parse-json-4.0.2.tgz#5950e50960793055845e956c427fc2b0d70c5239" + integrity sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw== + "@uni-helper/uni-app-types@1.0.0-alpha.6": version "1.0.0-alpha.6" resolved "https://registry.npmmirror.com/@uni-helper/uni-app-types/-/uni-app-types-1.0.0-alpha.6.tgz#08fc7ae163a29c1b6c026fe08d3a7898b0c58c13" @@ -2592,6 +2597,11 @@ adm-zip@^0.5.12: resolved "https://registry.npmmirror.com/adm-zip/-/adm-zip-0.5.16.tgz#0b5e4c779f07dedea5805cdccb1147071d94a909" integrity sha512-TGw5yVi4saajsSEgz25grObGHEUaDrniwvA2qwSC060KfqGPdglhvPMA2lPIoxs3PQIItj2iag35fONcQqgUaQ== +anchorme@^2.1.2: + version "2.1.2" + resolved "https://registry.npmmirror.com/anchorme/-/anchorme-2.1.2.tgz#4abc7e128a8a42d0036a61ebb9b18bbc032fa52a" + integrity sha512-2iPY3kxDDZvtRzauqKDb4v7a5sTF4GZ+esQTY8nGYvmhAtGTeFPMn4cRnvyWS1qmtPTP0Mv8hyLOp9l3ZzWMKg== + ansi-styles@^4.1.0: version "4.3.0" resolved "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" @@ -2629,6 +2639,15 @@ autoprefixer@^10.4.19: picocolors "^1.1.1" postcss-value-parser "^4.2.0" +babel-plugin-macros@^2.6.1: + version "2.8.0" + resolved "https://registry.npmmirror.com/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz#0f958a7cc6556b1e65344465d99111a1e5e10138" + integrity sha512-SEP5kJpfGYqYKpBrj5XU3ahw5p5GOHJ0U5ssOSQ/WBVdwkD2Dzlce95exQTs3jOVWPPKLBN2rlEWkCK7dSmLvg== + dependencies: + "@babel/runtime" "^7.7.2" + cosmiconfig "^6.0.0" + resolve "^1.12.0" + babel-plugin-polyfill-corejs2@^0.4.14: version "0.4.14" resolved "https://registry.npmmirror.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.14.tgz#8101b82b769c568835611542488d463395c2ef8f" @@ -2653,11 +2672,25 @@ babel-plugin-polyfill-regenerator@^0.6.5: dependencies: "@babel/helper-define-polyfill-provider" "^0.6.5" +babel-plugin-preval@^4.0.0: + version "4.0.0" + resolved "https://registry.npmmirror.com/babel-plugin-preval/-/babel-plugin-preval-4.0.0.tgz#edb8501167985752aafcc31086791e1314052e9d" + integrity sha512-fZI/4cYneinlj2k/FsXw0/lTWSC5KKoepUueS1g25Gb5vx3GrRyaVwxWCshYqx11GEU4mZnbbFhee8vpquFS2w== + dependencies: + "@babel/runtime" "^7.7.2" + babel-plugin-macros "^2.6.1" + require-from-string "^2.0.2" + balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== +base64-arraybuffer@^1.0.2: + version "1.0.2" + resolved "https://registry.npmmirror.com/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz#1c37589a7c4b0746e34bd1feb951da2df01c1bdc" + integrity sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ== + base64-js@^1.3.1: version "1.5.1" resolved "https://registry.npmmirror.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" @@ -2782,6 +2815,11 @@ call-bound@^1.0.2: call-bind-apply-helpers "^1.0.2" get-intrinsic "^1.3.0" +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.npmmirror.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + caniuse-lite@^1.0.30001754: version "1.0.30001755" resolved "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001755.tgz#c01cfb1c30f5acf1229391666ec03492f4c332ff" @@ -2839,6 +2877,13 @@ commander@^2.20.0: resolved "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== +commander@~1.1.1: + version "1.1.1" + resolved "https://registry.npmmirror.com/commander/-/commander-1.1.1.tgz#50d1651868ae60eccff0a2d9f34595376bc6b041" + integrity sha512-71Rod2AhcH3JhkBikVpNd0pA+fWsmAaVoti6OR38T76chA7vE3pSerS0Jor4wDw+tOueD2zLVvFOw5H0Rcj7rA== + dependencies: + keypress "0.1.x" + compare-versions@^3.6.0: version "3.6.0" resolved "https://registry.npmmirror.com/compare-versions/-/compare-versions-3.6.0.tgz#1a5689913685e5a87637b8d3ffca75514ec41d62" @@ -2908,6 +2953,17 @@ core-js@^3.11.0, core-js@^3.36.0, core-js@^3.4.1: resolved "https://registry.npmmirror.com/core-js/-/core-js-3.47.0.tgz#436ef07650e191afeb84c24481b298bd60eb4a17" integrity sha512-c3Q2VVkGAUyupsjRnaNX6u8Dq2vAdzm9iuPj5FW0fRxzlxgq9Q39MDq10IvmQSpLgHQNyQzQmOo6bgGHmH3NNg== +cosmiconfig@^6.0.0: + version "6.0.0" + resolved "https://registry.npmmirror.com/cosmiconfig/-/cosmiconfig-6.0.0.tgz#da4fee853c52f6b1e6935f41c1a2fc50bd4a9982" + integrity sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg== + dependencies: + "@types/parse-json" "^4.0.0" + import-fresh "^3.1.0" + parse-json "^5.0.0" + path-type "^4.0.0" + yaml "^1.7.2" + cross-env@^7.0.3: version "7.0.3" resolved "https://registry.npmmirror.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf" @@ -3052,6 +3108,11 @@ electron-to-chromium@^1.5.249: resolved "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.5.255.tgz#fe9294ce172241eb50733bc00f2bd00d9c1e4ec7" integrity sha512-Z9oIp4HrFF/cZkDPMpz2XSuVpc1THDpT4dlmATFlJUIBVCy9Vap5/rIXsASP1CscBacBqhabwh8vLctqBwEerQ== +emojilib@^3.0.6: + version "3.0.12" + resolved "https://registry.npmmirror.com/emojilib/-/emojilib-3.0.12.tgz#ecea3d317dcc1e68113b2f93910c96440e1fef7f" + integrity sha512-b52zmWqBwv9juk6lKaTdYxRQSnpsnT58Sj/x6fE8fZWcsNd43gAPXUbtjLKJvVlPS9FFNCN6nB9Vh1xipnCzXw== + encodeurl@~1.0.2: version "1.0.2" resolved "https://registry.npmmirror.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" @@ -3067,6 +3128,13 @@ entities@^4.5.0: resolved "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== +error-ex@^1.3.1: + version "1.3.4" + resolved "https://registry.npmmirror.com/error-ex/-/error-ex-1.3.4.tgz#b3a8d8bb6f92eecc1629e3e27d3c8607a8a32414" + integrity sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ== + dependencies: + is-arrayish "^0.2.1" + es-define-property@^1.0.1: version "1.0.1" resolved "https://registry.npmmirror.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa" @@ -3155,6 +3223,11 @@ etag@~1.8.1: resolved "https://registry.npmmirror.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== +events@^3.3.0: + version "3.3.0" + resolved "https://registry.npmmirror.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" + integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== + execa@^5.0.0: version "5.1.1" resolved "https://registry.npmmirror.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" @@ -3294,6 +3367,15 @@ fs-extra@^10.0.0: jsonfile "^6.0.1" universalify "^2.0.0" +fs-extra@^8.0.1: + version "8.1.0" + resolved "https://registry.npmmirror.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" + integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^4.0.0" + universalify "^0.1.0" + fsevents@~2.3.2, fsevents@~2.3.3: version "2.3.3" resolved "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" @@ -3457,6 +3539,14 @@ immutable@^4.0.0: resolved "https://registry.npmmirror.com/immutable/-/immutable-4.3.7.tgz#c70145fc90d89fb02021e65c84eb0226e4e5a381" integrity sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw== +import-fresh@^3.1.0: + version "3.3.1" + resolved "https://registry.npmmirror.com/import-fresh/-/import-fresh-3.3.1.tgz#9cecb56503c0ada1f2741dbbd6546e4b13b57ccf" + integrity sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + inherits@2.0.4: version "2.0.4" resolved "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" @@ -3472,6 +3562,11 @@ ipaddr.js@1.9.1: resolved "https://registry.npmmirror.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.npmmirror.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== + is-binary-path@~2.1.0: version "2.1.0" resolved "https://registry.npmmirror.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" @@ -3560,6 +3655,11 @@ jsesc@^3.0.2, jsesc@~3.1.0: resolved "https://registry.npmmirror.com/jsesc/-/jsesc-3.1.0.tgz#74d335a234f67ed19907fdadfac7ccf9d409825d" integrity sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA== +json-parse-even-better-errors@^2.3.0: + version "2.3.1" + resolved "https://registry.npmmirror.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== + json5@^2.2.3: version "2.2.3" resolved "https://registry.npmmirror.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" @@ -3570,6 +3670,22 @@ jsonc-parser@^3.2.0: resolved "https://registry.npmmirror.com/jsonc-parser/-/jsonc-parser-3.3.1.tgz#f2a524b4f7fd11e3d791e559977ad60b98b798b4" integrity sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ== +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.npmmirror.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== + optionalDependencies: + graceful-fs "^4.1.6" + +jsonfile@^5.0.0: + version "5.0.0" + resolved "https://registry.npmmirror.com/jsonfile/-/jsonfile-5.0.0.tgz#e6b718f73da420d612823996fdf14a03f6ff6922" + integrity sha512-NQRZ5CRo74MhMMC3/3r5g2k4fjodJ/wh8MxjFbCViWKFjxrnudWSY5vomh+23ZaXzAS7J3fBZIR2dV6WbmfM0w== + dependencies: + universalify "^0.1.2" + optionalDependencies: + graceful-fs "^4.1.6" + jsonfile@^6.0.1: version "6.2.0" resolved "https://registry.npmmirror.com/jsonfile/-/jsonfile-6.2.0.tgz#7c265bd1b65de6977478300087c99f1c84383f62" @@ -3579,6 +3695,11 @@ jsonfile@^6.0.1: optionalDependencies: graceful-fs "^4.1.6" +keypress@0.1.x: + version "0.1.0" + resolved "https://registry.npmmirror.com/keypress/-/keypress-0.1.0.tgz#4a3188d4291b66b4f65edb99f806aa9ae293592a" + integrity sha512-x0yf9PL/nx9Nw9oLL8ZVErFAk85/lslwEP7Vz7s5SI1ODXZIgit3C5qyWjw4DxOuO/3Hb4866SQh28a1V1d+WA== + kolorist@^1.8.0: version "1.8.0" resolved "https://registry.npmmirror.com/kolorist/-/kolorist-1.8.0.tgz#edddbbbc7894bc13302cdf740af6374d4a04743c" @@ -3601,6 +3722,11 @@ lilconfig@^2.0.5: resolved "https://registry.npmmirror.com/lilconfig/-/lilconfig-2.1.0.tgz#78e23ac89ebb7e1bfbf25b18043de756548e7f52" integrity sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ== +lines-and-columns@^1.1.6: + version "1.2.4" + resolved "https://registry.npmmirror.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" + integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== + lines-and-columns@^2.0.4: version "2.0.4" resolved "https://registry.npmmirror.com/lines-and-columns/-/lines-and-columns-2.0.4.tgz#d00318855905d2660d8c0822e3f5a4715855fc42" @@ -3667,6 +3793,11 @@ lodash@^4.17.21: resolved "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== +long@^5.2.0: + version "5.3.2" + resolved "https://registry.npmmirror.com/long/-/long-5.3.2.tgz#1d84463095999262d7d7b7f8bfd4a8cc55167f83" + integrity sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA== + lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.npmmirror.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -3787,6 +3918,11 @@ minimist@^1.2.6: resolved "https://registry.npmmirror.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== +mitt@^3.0.1: + version "3.0.1" + resolved "https://registry.npmmirror.com/mitt/-/mitt-3.0.1.tgz#ea36cf0cc30403601ae074c8f77b7092cdab36d1" + integrity sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw== + mkdirp@^0.5.1: version "0.5.6" resolved "https://registry.npmmirror.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" @@ -3921,6 +4057,13 @@ pako@^1.0.5: resolved "https://registry.npmmirror.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.npmmirror.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + parse-bmfont-ascii@^1.0.3: version "1.0.6" resolved "https://registry.npmmirror.com/parse-bmfont-ascii/-/parse-bmfont-ascii-1.0.6.tgz#11ac3c3ff58f7c2020ab22769079108d4dfa0285" @@ -3957,6 +4100,16 @@ parse-headers@^2.0.0: resolved "https://registry.npmmirror.com/parse-headers/-/parse-headers-2.0.6.tgz#7940f0abe5fe65df2dd25d4ce8800cb35b49d01c" integrity sha512-Tz11t3uKztEW5FEVZnj1ox8GKblWn+PvHY9TmJV5Mll2uHEwRdR/5Li1OlXoECjLYkApdhWy44ocONwXLiKO5A== +parse-json@^5.0.0: + version "5.2.0" + resolved "https://registry.npmmirror.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== + dependencies: + "@babel/code-frame" "^7.0.0" + error-ex "^1.3.1" + json-parse-even-better-errors "^2.3.0" + lines-and-columns "^1.1.6" + parseurl@~1.3.3: version "1.3.3" resolved "https://registry.npmmirror.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" @@ -3982,6 +4135,11 @@ path-to-regexp@0.1.12: resolved "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-0.1.12.tgz#d5e1a12e478a976d432ef3c58d534b9923164bb7" integrity sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ== +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.npmmirror.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + pathe@^2.0.1, pathe@^2.0.3: version "2.0.3" resolved "https://registry.npmmirror.com/pathe/-/pathe-2.0.3.tgz#3ecbec55421685b70a9da872b2cff3e1cbed1716" @@ -4039,6 +4197,13 @@ pinia@^2.0.33: "@vue/devtools-api" "^6.6.3" vue-demi "^0.14.10" +pinyin@^4.0.0-alpha.0: + version "4.0.0" + resolved "https://registry.npmmirror.com/pinyin/-/pinyin-4.0.0.tgz#9c15fd9d45c08b6813221fc602f77759429bfa4f" + integrity sha512-vHpV5K+vpp6XUUpZNGRDuHoN+1xcmieM3EWlH4QjSX2kkpG/gVOwpqwV9EOJ9x9c9UERFKeLml5XVSukE/PLgQ== + dependencies: + commander "~1.1.1" + pixelmatch@^4.0.2: version "4.0.2" resolved "https://registry.npmmirror.com/pixelmatch/-/pixelmatch-4.0.2.tgz#8f47dcec5011b477b67db03c243bc1f3085e8854" @@ -4163,6 +4328,13 @@ prettier@^2.8.7: resolved "https://registry.npmmirror.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== +preval.macro@^4.0.0: + version "4.0.0" + resolved "https://registry.npmmirror.com/preval.macro/-/preval.macro-4.0.0.tgz#24218fa36f68bf8a01a8c65c45d19a3ccad6496c" + integrity sha512-sJJnE71X+MPr64CVD2AurmUj4JEDqbudYbStav3L9Xjcqm4AR0ymMm6sugw1mUmfI/7gw4JWA4JXo/k6w34crw== + dependencies: + babel-plugin-preval "^4.0.0" + process@^0.11.10: version "0.11.10" resolved "https://registry.npmmirror.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" @@ -4278,7 +4450,22 @@ regjsparser@^0.13.0: dependencies: jsesc "~3.1.0" -resolve@^1.1.7, resolve@^1.22.1, resolve@^1.22.10: +require-from-string@^2.0.2: + version "2.0.2" + resolved "https://registry.npmmirror.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + +resize-image@^0.1.0: + version "0.1.0" + resolved "https://registry.npmmirror.com/resize-image/-/resize-image-0.1.0.tgz#033d5f499cb7095def7827d48b8046f7e1c5776c" + integrity sha512-78cWCEX/IupMCwKi5Gg5gxjOZKoN6UXinL2eVOB4xzyG2QNjq64z6pJBnyBKg5/BsjEosLz1co5e3DHr99TgFg== + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.npmmirror.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + +resolve@^1.1.7, resolve@^1.12.0, resolve@^1.22.1, resolve@^1.22.10: version "1.22.11" resolved "https://registry.npmmirror.com/resolve/-/resolve-1.22.11.tgz#aad857ce1ffb8bfa9b0b1ac29f1156383f68c262" integrity sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ== @@ -4364,6 +4551,13 @@ scule@^1.3.0: resolved "https://registry.npmmirror.com/scule/-/scule-1.3.0.tgz#6efbd22fd0bb801bdcc585c89266a7d2daa8fbd3" integrity sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g== +segmentit@^2.0.3: + version "2.0.3" + resolved "https://registry.npmmirror.com/segmentit/-/segmentit-2.0.3.tgz#799897667acbc518b27811acdb2a341a79c7973f" + integrity sha512-7mn2XL3OdTUQ+AhHz7SbgyxLTaQRzTWQNVwiK+UlTO8aePGbSwvKUzTwE4238+OUY9MoR6ksAg35zl8sfTunQQ== + dependencies: + preval.macro "^4.0.0" + semver@^6.3.1: version "6.3.1" resolved "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" @@ -4586,6 +4780,21 @@ totalist@^3.0.0: resolved "https://registry.npmmirror.com/totalist/-/totalist-3.0.1.tgz#ba3a3d600c915b1a97872348f79c127475f6acf8" integrity sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ== +twemoji-parser@14.0.0: + version "14.0.0" + resolved "https://registry.npmmirror.com/twemoji-parser/-/twemoji-parser-14.0.0.tgz#13dabcb6d3a261d9efbf58a1666b182033bf2b62" + integrity sha512-9DUOTGLOWs0pFWnh1p6NF+C3CkQ96PWmEFwhOVmT3WbecRC+68AIqpsnJXygfkFcp4aXbOp8Dwbhh/HQgvoRxA== + +twemoji@14.0.2, twemoji@^14.0.2: + version "14.0.2" + resolved "https://registry.npmmirror.com/twemoji/-/twemoji-14.0.2.tgz#c53adb01dab22bf4870f648ca8cc347ce99ee37e" + integrity sha512-BzOoXIe1QVdmsUmZ54xbEH+8AgtOKUiG53zO5vVP2iUu6h5u9lN15NcuS6te4OY96qx0H7JK9vjjl9WQbkTRuA== + dependencies: + fs-extra "^8.0.1" + jsonfile "^5.0.0" + twemoji-parser "14.0.0" + universalify "^0.1.2" + type-is@~1.6.18: version "1.6.18" resolved "https://registry.npmmirror.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" @@ -4671,6 +4880,18 @@ unimport@^3.11.1, unimport@^3.13.4: strip-literal "^2.1.1" unplugin "^1.16.1" +universal-emoji-parser@1.0.125: + version "1.0.125" + resolved "https://registry.npmmirror.com/universal-emoji-parser/-/universal-emoji-parser-1.0.125.tgz#53a7bb746617eb92abf874c78ad559c8cebbd913" + integrity sha512-3hHLn7zDQnE6/I5Qz6fVWjOart+ztYJkFuyBmJhv+roAXuJ2I4Iotfh6Aw3q5credzAyMPLn7KykOMgCX5AE4A== + dependencies: + twemoji "14.0.2" + +universalify@^0.1.0, universalify@^0.1.2: + version "0.1.2" + resolved "https://registry.npmmirror.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + universalify@^2.0.0: version "2.0.1" resolved "https://registry.npmmirror.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d" @@ -4993,7 +5214,7 @@ yallist@^3.0.2: resolved "https://registry.npmmirror.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== -yaml@^1.10.2: +yaml@^1.10.2, yaml@^1.7.2: version "1.10.2" resolved "https://registry.npmmirror.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==