feat:聊天im替换

This commit is contained in:
ctw committed 2025-11-25 12:11:55 +08:00
1 parent 18fdcafd39
commit 6d26839aee
395 files changed
+8914 -40109

No files matched your search

-21
View File
@@ -1,21 +0,0 @@
# 野火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)发帖子问题,我们会尽快回复。谢谢大家的支持。
@@ -1,163 +0,0 @@
//
// Bugly.h
//
// Version: 2.6(1)
//
// Copyright (c) 2017年 Tencent. All rights reserved.
//
#import <Foundation/Foundation.h>
#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
@@ -1,149 +0,0 @@
//
// 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 <Foundation/Foundation.h>
#import "BuglyLog.h"
BLY_START_NONNULL
@protocol BuglyDelegate <NSObject>
@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<BuglyDelegate> 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
@@ -1,78 +0,0 @@
//
// BuglyLog.h
// Bugly
//
// Copyright (c) 2017年 Tencent. All rights reserved.
//
#import <Foundation/Foundation.h>
// 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
@@ -1,12 +0,0 @@
framework module Bugly {
umbrella header "Bugly.h"
export *
module * { export * }
link framework "Foundation"
link framework "Security"
link framework "SystemConfiguration"
link "c++"
link "z"
}
@@ -1,41 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>35F9.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryDiskSpace</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>E174.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
</array>
</dict>
</array>
</dict>
</plist>
@@ -1,44 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AvailableLibraries</key>
<array>
<dict>
<key>BinaryPath</key>
<string>WFChatClient.framework/WFChatClient</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>WFChatClient.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>WFChatClient.framework/WFChatClient</string>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>WFChatClient.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
<string>XFWK</string>
<key>XCFrameworkFormatVersion</key>
<string>1.0</string>
</dict>
</plist>
@@ -1,177 +0,0 @@
//
// 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 */
@@ -1,31 +0,0 @@
//
// 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<NSString *> *invitees;
@end
@@ -1,29 +0,0 @@
//
// 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<WFCCArticle *> *subArticles;
- (NSArray<WFCCLinkMessageContent *> *)toLinkMessageContent;
@end
@@ -1,23 +0,0 @@
//
// WFCCCallAddParticipantMessageContent.h
// WFAVEngineKit
//
// Created by heavyrain on 17/9/27.
// Copyright © 2017年 WildFireChat. All rights reserved.
//
#import <WFChatClient/WFCChatClient.h>
#import <Foundation/Foundation.h>
@interface WFCCCallAddParticipantMessageContent : WFCCNotificationMessageContent
@property(nonatomic, strong)NSString *callId;
@property(nonatomic, strong)NSString *initiator;
@property(nonatomic, strong)NSString *pin;
@property(nonatomic, strong)NSArray<NSString *> *participants;
//[{"userId":"xxxx","acceptTime":13123123123,"joinTime":13123123123,"videoMuted":false}]
@property(nonatomic, strong)NSArray<NSDictionary *> *existParticipants;
@property(nonatomic, assign)BOOL audioOnly;
@property(nonatomic, assign)BOOL autoAnswer;
//指定对方clientId
@property(nonatomic, strong)NSString *clientId;
@end
@@ -1,14 +0,0 @@
//
// WFCCCallByeMessageContent.h
// WFAVEngineKit
//
// Created by heavyrain on 17/9/27.
// Copyright © 2017年 WildFireChat. All rights reserved.
//
#import <WFChatClient/WFCChatClient.h>
@interface WFCCCallByeMessageContent : WFCCMessageContent
@property(nonatomic, strong)NSString *callId;
@property(nonatomic, assign)int/*WFAVCallEndReason*/ endReason;
@property(nonatomic, assign)long long inviteMsgUid;
@end
@@ -1,59 +0,0 @@
//
// 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<NSString *> *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
@@ -1,62 +0,0 @@
//
// 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
@@ -1,31 +0,0 @@
//
// 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
@@ -1,26 +0,0 @@
//
// 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
@@ -1,28 +0,0 @@
//
// WFCCChatroomInfo.h
// WFChatClient
//
// Created by heavyrain lee on 2018/8/24.
// Copyright © 2018 WildFireChat. All rights reserved.
//
#import <Foundation/Foundation.h>
#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<WFCCChannelMenu *> *menus;
@end
@@ -1,29 +0,0 @@
//
// WFCCChannelMenu.h
// WFChatClient
//
// Created by Rain on 2022/8/11.
// Copyright © 2022 WildFireChat. All rights reserved.
//
#import <Foundation/Foundation.h>
#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<WFCCChannelMenu *> *subMenus;
@end
NS_ASSUME_NONNULL_END
@@ -1,14 +0,0 @@
//
// 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
@@ -1,24 +0,0 @@
//
// WFCCChatroomInfo.h
// WFChatClient
//
// Created by heavyrain lee on 2018/8/24.
// Copyright © 2018 WildFireChat. All rights reserved.
//
#import <Foundation/Foundation.h>
#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
@@ -1,15 +0,0 @@
//
// WFCCChatroomInfo.h
// WFChatClient
//
// Created by heavyrain lee on 2018/8/24.
// Copyright © 2018 WildFireChat. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "WFCCJsonSerializer.h"
@interface WFCCChatroomMemberInfo : WFCCJsonSerializer
@property(nonatomic, assign)int memberCount;
@property(nonatomic, strong)NSArray<NSString *> *members;
@end
@@ -1,20 +0,0 @@
//
// 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<WFCCMessage *> *messages;
@property(nonatomic, assign)BOOL loaded;
@end
NS_ASSUME_NONNULL_END
@@ -1,69 +0,0 @@
//
// 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
@@ -1,79 +0,0 @@
//
// WFCCConversation.h
// WFChatClient
//
// Created by heavyrain on 2017/8/16.
// Copyright © 2017年 WildFireChat. All rights reserved.
//
#import <Foundation/Foundation.h>
#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 <NSCopying, WFCCDuplicatable>
/**
构造方法
@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
@@ -1,57 +0,0 @@
//
// WFCCConversationInfo.h
// WFChatClient
//
// Created by heavyrain on 2017/8/29.
// Copyright © 2017年 wildfire chat. All rights reserved.
//
#import <Foundation/Foundation.h>
#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
@@ -1,42 +0,0 @@
//
// WFCCConversationSearchInfo.h
// WFChatClient
//
// Created by heavyrain on 2017/10/22.
// Copyright © 2017年 WildFireChat. All rights reserved.
//
#import <Foundation/Foundation.h>
#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
@@ -1,31 +0,0 @@
//
// 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
@@ -1,25 +0,0 @@
//
// 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
@@ -1,22 +0,0 @@
//
// WFCCConversation.h
// WFChatClient
//
// Created by heavyrain on 2017/8/16.
// Copyright © 2017年 WildFireChat. All rights reserved.
//
#import <Foundation/Foundation.h>
#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
@@ -1,21 +0,0 @@
//
// WFCCDictionary.h
// WFChatClient
//
// Created by Rain on 26/5/2025.
// Copyright © 2025 WildFireChat. All rights reserved.
//
#import <Foundation/Foundation.h>
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
@@ -1,26 +0,0 @@
//
// 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
@@ -1,56 +0,0 @@
//
// WFCCDomainInfo.h
// WFChatClient
//
// Created by heavyrain on 2017/8/16.
// Copyright © 2017年 WildFireChat. All rights reserved.
//
#import <Foundation/Foundation.h>
#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
@@ -1,17 +0,0 @@
//
// WFCCEnterChannelChatMessageContent.h
// WFChatClient
//
// Created by heavyrain on 2017/8/16.
// Copyright © 2017年 WildFireChat. All rights reserved.
//
#import "WFCCMessageContent.h"
/**
进入频道会话消息
*/
@interface WFCCEnterChannelChatMessageContent : WFCCMessageContent
@end
@@ -1,141 +0,0 @@
//
// 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 */
@@ -1,33 +0,0 @@
//
// 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
@@ -1,26 +0,0 @@
//
// WFCCFileRecord.h
// WFChatClient
//
// Created by dali on 2020/8/2.
// Copyright © 2020 WildFireChat. All rights reserved.
//
#import <Foundation/Foundation.h>
#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
@@ -1,36 +0,0 @@
//
// WFCCFriend.h
// WFChatClient
//
// Created by heavyrain on 2021/5/16.
// Copyright © 2021 WildFireChat. All rights reserved.
//
#import <Foundation/Foundation.h>
#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
@@ -1,16 +0,0 @@
//
// 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
@@ -1,16 +0,0 @@
//
// WFCCFriendGreetingMessageContent.h
// WFChatClient
//
// Created by heavyrain on 2017/9/19.
// Copyright © 2017年 WildFireChat. All rights reserved.
//
#import "WFCCNotificationMessageContent.h"
/**
好友打招呼的提示。一般可以显示为以上是打招呼信息。更多信息请阅读WFCCFriendAddedMessageContent的注释
*/
@interface WFCCFriendGreetingMessageContent : WFCCNotificationMessageContent
@end
@@ -1,51 +0,0 @@
//
// WFCCFriendRequest.h
// WFChatClient
//
// Created by heavyrain on 2017/10/17.
// Copyright © 2017年 WildFireChat. All rights reserved.
//
#import <Foundation/Foundation.h>
#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
@@ -1,125 +0,0 @@
//
// WFCCGroupInfo.h
// WFChatClient
//
// Created by heavyrain on 2017/8/16.
// Copyright © 2017年 WildFireChat. All rights reserved.
//
#import <Foundation/Foundation.h>
#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
@@ -1,31 +0,0 @@
//
// 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
@@ -1,66 +0,0 @@
//
// WFCCGroupMember.h
// WFChatClient
//
// Created by heavyrain on 2017/10/30.
// Copyright © 2017年 WildFireChat. All rights reserved.
//
#import <Foundation/Foundation.h>
#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
@@ -1,35 +0,0 @@
//
// 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<NSString *> *targetIds;
@end
@@ -1,35 +0,0 @@
//
// 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<NSString *> *targetIds;
@end
@@ -1,31 +0,0 @@
//
// 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
@@ -1,31 +0,0 @@
//
// 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
@@ -1,53 +0,0 @@
//
// WFCCGroupSearchInfo.h
// WFChatClient
//
// Created by heavyrain on 2017/10/22.
// Copyright © 2017年 WildFireChat. All rights reserved.
//
#import <Foundation/Foundation.h>
#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
@@ -1,35 +0,0 @@
//
// 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<NSString *> *memberIds;
@end
@@ -1,36 +0,0 @@
//
// 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
@@ -1,53 +0,0 @@
//
// WFCCImageMessageContent.h
// WFChatClient
//
// Created by heavyrain on 2017/9/2.
// Copyright © 2017年 wildfire chat. All rights reserved.
//
#import "WFCCMediaMessageContent.h"
#import <UIKit/UIKit.h>
/**
图片消息
*/
@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
@@ -1,17 +0,0 @@
//
// 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
@@ -1,22 +0,0 @@
//
// WFCCJsonSerializer.h
// WFChatClient
//
// Created by Rain on 2022/5/31.
// Copyright © 2022 WildFireChat. All rights reserved.
//
#import <Foundation/Foundation.h>
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
@@ -1,31 +0,0 @@
//
// 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<NSString *> *kickedMembers;
@end
@@ -1,31 +0,0 @@
//
// 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<NSString *> *kickedMembers;
@end
@@ -1,17 +0,0 @@
//
// WFCCLeaveChannelChatMessageContent.h
// WFChatClient
//
// Created by heavyrain on 2017/8/16.
// Copyright © 2017年 WildFireChat. All rights reserved.
//
#import "WFCCMessageContent.h"
/**
进入频道会话消息
*/
@interface WFCCLeaveChannelChatMessageContent : WFCCMessageContent
@end
@@ -1,36 +0,0 @@
//
// 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
@@ -1,45 +0,0 @@
//
// WFCCTextMessageContent.h
// WFChatClient
//
// Created by heavyrain on 2017/8/16.
// Copyright © 2017年 WildFireChat. All rights reserved.
//
#import "WFCCMessageContent.h"
#import <CoreLocation/CoreLocation.h>
#import <UIKit/UIKit.h>
/**
位置消息
*/
@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
@@ -1,25 +0,0 @@
//
// 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
@@ -1,103 +0,0 @@
//
// WFCCMessage.h
// WFChatClient
//
// Created by heavyrain on 2017/8/16.
// Copyright © 2017年 WildFireChat. All rights reserved.
//
#import <Foundation/Foundation.h>
#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 <WFCCDuplicatable>
/**
消息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<NSString *> *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
@@ -1,193 +0,0 @@
//
// WFCCMessageContent.h
// WFChatClient
//
// Created by heavyrain on 2017/8/15.
// Copyright © 2017年 WildFireChat. All rights reserved.
//
#import <Foundation/Foundation.h>
#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<NSString *> *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 <NSObject>
/**
消息编码
@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 <WFCCMessageContent>
/**
附加信息
*/
@property (nonatomic, strong)NSString *extra;
/**
本地信息,用于消息未从服务器下载下来。
*/
@property (nonatomic, assign)BOOL notLoaded;
- (NSArray *)getArray:(WFCCDictionary *)dict ofKey:(NSString *)key;
@end
@@ -1,36 +0,0 @@
//
// 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
@@ -1,30 +0,0 @@
//
// 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
@@ -1,36 +0,0 @@
//
// 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
@@ -1,20 +0,0 @@
//
// 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<NSString *> *targetIds;
@end
@@ -1,519 +0,0 @@
//
// WFCCNetworkService.h
// WFChatClient
//
// Created by heavyrain on 2017/11/5.
// Copyright © 2017年 WildFireChat. All rights reserved.
//
#ifndef WFCCNetworkService_h
#define WFCCNetworkService_h
#import <Foundation/Foundation.h>
#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 <NSObject>
/**
连接状态变化的回调
@param status 连接状态
*/
- (void)onConnectionStatusChanged:(ConnectionStatus)status;
@end
/**
连接状态的监听
*/
@protocol ConnectToServerDelegate <NSObject>
/**
开始连接到服务器的回调
@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 <NSObject>
/**
网络产生流量的回调
@param send 发送的字节数
@param recv 收到的字节数
*/
- (void)onTrafficData:(int64_t)send recv:(int64_t)recv;
@end
/**
消息接收的监听
*/
@protocol ReceiveMessageDelegate <NSObject>
/**
接收消息的回调
@param messages 收到的消息
@param hasMore 是否还有待接受的消息,UI可以根据此参数决定刷新的时机
*/
- (void)onReceiveMessage:(NSArray<WFCCMessage *> *)messages hasMore:(BOOL)hasMore;
@optional
- (void)onRecallMessage:(long long)messageUid;
- (void)onDeleteMessage:(long long)messageUid;
/**
消息已送达到目标用户的回调
@param delivereds 送达报告
*/
- (void)onMessageDelivered:(NSArray<WFCCDeliveryReport *> *)delivereds;
/**
消息已读的监听
*/
- (void)onMessageReaded:(NSArray<WFCCReadReport *> *)readeds;
@end
/**
接收消息前的拦截Filter
*/
@protocol ReceiveMessageFilter <NSObject>
/**
是否拦截收到的消息
@param message 消息
@return 是否拦截,如果拦截该消息,则ReceiveMessageDelegate回调不会再收到此消息
*/
- (BOOL)onReceiveMessage:(WFCCMessage *)message;
@end
/**
会议事件的监听
*/
@protocol ConferenceEventDelegate <NSObject>
/**
会议事件的回调
@param event 事件
*/
- (void)onConferenceEvent:(NSString *)event;
@end
@class WFCCUserOnlineState;
/**
在线事件的监听
*/
@protocol OnlineEventDelegate <NSObject>
/**
在线事件的回调
@param events 事件
*/
- (void)onOnlineEvent:(NSArray<WFCCUserOnlineState *> *)events;
@end
@class WFCCUserInfo;
@class WFCCGroupInfo;
/**
默认头像提供者
*/
@protocol WFCCDefaultPortraitProvider <NSObject>
/**
获取用户的默认头像链接
@param userInfo 用户信息
@return 返回此用户的默认头像
*/
- (NSString *)userDefaultPortrait:(WFCCUserInfo *)userInfo;
/**
获取群组的默认头像链接
@param groupInfo 群组信息
@param memberInfos 群成员用户信息,只用前9名,可以只传入9名成员
@return 返回此用户的默认头像
*/
- (NSString *)groupDefaultPortrait:(WFCCGroupInfo *)groupInfo memberInfos:(NSArray<WFCCUserInfo *> *)memberInfos;
@end
/**
链接地址转换器,用于双网环境下媒体资源和头像等在不同网络下的转换
*/
@protocol WFCCUrlRedirector <NSObject>
- (NSString *)redirect:(NSString *)originalUrl;
@end
#pragma mark - 连接服务
/**
连接服务
*/
@interface WFCCNetworkService : NSObject
/**
连接服务单例
@return 连接服务单例
*/
+ (WFCCNetworkService *)sharedInstance;
/**
连接状态监听
*/
@property(nonatomic, weak) id<ConnectionStatusDelegate> connectionStatusDelegate;
/**
连接到服务监听
*/
@property(nonatomic, weak) id<ConnectToServerDelegate> connectToServerDelegate;
/**
网络流量监听
*/
@property(nonatomic, weak) id<TrafficDataDelegate> trafficDataDelegate;
/**
消息接收监听
*/
@property(nonatomic, weak) id<ReceiveMessageDelegate> receiveMessageDelegate;
/**
会议事件监听
*/
@property(nonatomic, weak) id<ConferenceEventDelegate> conferenceEventDelegate;
/**
在线事件监听
*/
@property(nonatomic, weak) id<OnlineEventDelegate> onlineEventDelegate;
/**
默认头像提供者
*/
@property(nonatomic, weak)id<WFCCDefaultPortraitProvider> defaultPortraitProvider;
/**
双网地址转换器
*/
@property(nonatomic, strong)id<WFCCUrlRedirector> 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<NSString *> *)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<ReceiveMessageFilter>)filter;
/**
移除消息拦截Filter
@param filter 消息拦截Filter
*/
- (void)removeReceiveMessageFilter:(id<ReceiveMessageFilter>)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
@@ -1,59 +0,0 @@
//
// 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<NSString *> *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
@@ -1,31 +0,0 @@
//
// WFCCNotificationMessageContent.h
// WFChatClient
//
// Created by heavyrain on 2017/9/19.
// Copyright © 2017年 WildFireChat. All rights reserved.
//
#import "WFCCMessageContent.h"
@class WFCCMessage;
/**
通知消息的协议
*/
@protocol WFCCNotificationMessageContent <WFCCMessageContent>
/**
获取通知的提示内容
@return 提示内容
*/
- (NSString *)formatNotification:(WFCCMessage *)message;
@end
/**
通知消息
*/
@interface WFCCNotificationMessageContent : WFCCMessageContent <WFCCNotificationMessageContent>
@end
@@ -1,27 +0,0 @@
//
// 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
@@ -1,40 +0,0 @@
//
// WFCCPCOnlineInfo.h
// WFChatClient
//
// Created by Tom Lee on 2020/4/6.
// Copyright © 2020 WildFireChat. All rights reserved.
//
#import <Foundation/Foundation.h>
#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
@@ -1,39 +0,0 @@
//
// 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
@@ -1,16 +0,0 @@
//
// WFCCPTextMessageContent.h
// WFChatClient
//
// Created by heavyrain on 2017/8/16.
// Copyright © 2017年 WildFireChat. All rights reserved.
//
#import "WFCCTextMessageContent.h"
/**
存储文本消息,与普通文本消息的区别是,普通文本消息存储切计未读数,本消息只存储不计数。
*/
@interface WFCCPTextMessageContent : WFCCTextMessageContent
@end
@@ -1,18 +0,0 @@
//
// WFCCProtocol.h
// WFChatClient
//
// Created by Rain on 2022/9/20.
// Copyright © 2022 WildFireChat. All rights reserved.
//
#ifndef WFCCProtocol_h
#define WFCCProtocol_h
@protocol WFCCDuplicatable <NSObject>
- (instancetype)duplicate;
@end
#endif /* WFCCProtocol_h */
@@ -1,30 +0,0 @@
//
// 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
@@ -1,25 +0,0 @@
//
// 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
@@ -1,25 +0,0 @@
//
// WFCCQuoteInfo.h
// WFChatClient
//
// Created by dali on 2020/10/4.
// Copyright © 2020 WildFireChat. All rights reserved.
//
#import <Foundation/Foundation.h>
#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
@@ -1,21 +0,0 @@
//
// 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
@@ -1,24 +0,0 @@
//
// WFCCConversation.h
// WFChatClient
//
// Created by heavyrain on 2017/8/16.
// Copyright © 2017年 WildFireChat. All rights reserved.
//
#import <Foundation/Foundation.h>
#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
@@ -1,55 +0,0 @@
//
// 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
@@ -1,29 +0,0 @@
//
// 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<NSDictionary<NSString *, NSString *> *> *datas;
//附加信息
@property (nonatomic, strong)NSString *exName;
@property (nonatomic, strong)NSString *exPortrait;
@property (nonatomic, strong)NSString *exUrl;
//应用信息
@property (nonatomic, strong)NSString *appId;
@end
@@ -1,56 +0,0 @@
//
// WFCCSecretChatInfo.h
// WFChatClient
//
// Created by heavyrain on 2021/5/16.
// Copyright © 2021 WildFireChat. All rights reserved.
//
#import <Foundation/Foundation.h>
#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
@@ -1,50 +0,0 @@
//
// 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
@@ -1,18 +0,0 @@
//
// WFCCMarkUnreadMessageContent.h
// WFChatClient
//
// Created by heavyrain on 2017/8/16.
// Copyright © 2017年 WildFireChat. All rights reserved.
//
#import "WFCCMessageContent.h"
/**
标记未读同步消息
*/
@interface WFCCStartSecretChatMessageContent : WFCCMessageContent
@end
@@ -1,26 +0,0 @@
//
// WFCCImageMessageContent.h
// WFChatClient
//
// Created by heavyrain on 2017/9/2.
// Copyright © 2017年 wildfire chat. All rights reserved.
//
#import "WFCCMediaMessageContent.h"
#import <UIKit/UIKit.h>
/**
图片消息
*/
@interface WFCCStickerMessageContent : WFCCMediaMessageContent
/**
构造方法
@param stickerPath 表情路径
@return 表情消息
*/
+ (instancetype)contentFrom:(NSString *)stickerPath;
@property (nonatomic, assign)CGSize size;
@end
@@ -1,17 +0,0 @@
//
// 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
@@ -1,17 +0,0 @@
//
// 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
@@ -1,44 +0,0 @@
//
// 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<NSString *> *mentionedTargets;
/**
引用信息
*/
@property (nonatomic, strong)WFCCQuoteInfo *quoteInfo;
@end
@@ -1,19 +0,0 @@
//
// 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
@@ -1,16 +0,0 @@
//
// WFCCThingsLostEventContent.h
// WFChatClient
//
// Created by heavyrain on 2017/8/16.
// Copyright © 2017年 WildFireChat. All rights reserved.
//
#import "WFCCMessageContent.h"
/**
文本消息
*/
@interface WFCCThingsLostEventContent : WFCCMessageContent
@end
@@ -1,20 +0,0 @@
//
// 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
@@ -1,31 +0,0 @@
//
// 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
@@ -1,46 +0,0 @@
//
// 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
@@ -1,27 +0,0 @@
//
// 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
@@ -1,21 +0,0 @@
//
// WFCCUnreadCount.h
// WFChatClient
//
// Created by WF Chat on 2018/9/30.
// Copyright © 2018 WildFireChat. All rights reserved.
//
#import <Foundation/Foundation.h>
#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
@@ -1,104 +0,0 @@
//
// WFCCUserInfo.h
// WFChatClient
//
// Created by heavyrain on 2017/9/29.
// Copyright © 2017年 WildFireChat. All rights reserved.
//
#import <Foundation/Foundation.h>
#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
Loaded 100 of 395 files, more files were not shown because too many files have changed in this diff. Show more