commit
ab683ae25d
@ -9,7 +9,7 @@ buildscript {
|
||||
maven { url 'http://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
|
||||
google()
|
||||
maven {
|
||||
url 'http://127.0.0.1:8081/repository/maven-releases/' //这个路径就是Browse下maven-release右边有一个copy按钮,复制出来的。
|
||||
url 'http://127.0.0.1:8081/repository/maven-releases/'
|
||||
}
|
||||
mavenCentral()
|
||||
}
|
||||
@ -27,7 +27,7 @@ rootProject.allprojects {
|
||||
maven { url 'http://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
|
||||
google()
|
||||
maven {
|
||||
url 'http://127.0.0.1:8081/repository/maven-releases' //这个路径就是Browse下maven-release右边有一个copy按钮,复制出来的。
|
||||
url 'http://127.0.0.1:8081/repository/maven-releases'
|
||||
}
|
||||
mavenCentral()
|
||||
}
|
||||
@ -47,6 +47,5 @@ android {
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
implementation 'com.alibaba:fastjson:1.1.72.android'
|
||||
implementation 'io.openim:localsdk:1.1.4@aar'//graoupId:artifactId:version@aar
|
||||
implementation 'io.openim:localsdk:1.2.6@aar'//graoupId:artifactId:version@aar
|
||||
}
|
@ -8,6 +8,7 @@ import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import io.flutter.Log;
|
||||
import io.flutter.embedding.engine.plugins.FlutterPlugin;
|
||||
import io.flutter.plugin.common.MethodCall;
|
||||
import io.flutter.plugin.common.MethodChannel;
|
||||
@ -15,6 +16,7 @@ import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
|
||||
import io.flutter.plugin.common.MethodChannel.Result;
|
||||
import io.openim.flutter_openim_sdk.manager.ConversationManager;
|
||||
import io.openim.flutter_openim_sdk.manager.FriendshipManager;
|
||||
import io.openim.flutter_openim_sdk.manager.GroupManager;
|
||||
import io.openim.flutter_openim_sdk.manager.IMManager;
|
||||
import io.openim.flutter_openim_sdk.manager.MessageManager;
|
||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||
@ -28,26 +30,29 @@ public class FlutterOpenimSdkPlugin implements FlutterPlugin, MethodCallHandler
|
||||
///
|
||||
/// This local reference serves to register the plugin with the Flutter Engine and unregister it
|
||||
/// when the Flutter Engine is detached from the Activity
|
||||
|
||||
public static MethodChannel channel;
|
||||
private static IMManager imManager;
|
||||
private static FriendshipManager friendshipManager;
|
||||
private static MessageManager messageManager;
|
||||
private static ConversationManager conversationManager;
|
||||
private static GroupManager groupManager;
|
||||
|
||||
public FlutterOpenimSdkPlugin() {
|
||||
}
|
||||
|
||||
private FlutterOpenimSdkPlugin(Context context, MethodChannel channel) {
|
||||
FlutterOpenimSdkPlugin.imManager = new IMManager(channel);
|
||||
FlutterOpenimSdkPlugin.friendshipManager = new FriendshipManager(channel);
|
||||
FlutterOpenimSdkPlugin.messageManager = new MessageManager(channel);
|
||||
FlutterOpenimSdkPlugin.conversationManager = new ConversationManager(channel);
|
||||
private FlutterOpenimSdkPlugin(Context context) {
|
||||
FlutterOpenimSdkPlugin.imManager = new IMManager();
|
||||
FlutterOpenimSdkPlugin.friendshipManager = new FriendshipManager();
|
||||
FlutterOpenimSdkPlugin.messageManager = new MessageManager();
|
||||
FlutterOpenimSdkPlugin.conversationManager = new ConversationManager();
|
||||
FlutterOpenimSdkPlugin.groupManager = new GroupManager();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttachedToEngine(@NonNull FlutterPluginBinding flutterPluginBinding) {
|
||||
channel = new MethodChannel(flutterPluginBinding.getBinaryMessenger(), "flutter_openim_sdk");
|
||||
channel.setMethodCallHandler(new FlutterOpenimSdkPlugin(flutterPluginBinding.getApplicationContext(), channel));
|
||||
FlutterOpenimSdkPlugin.channel = new MethodChannel(flutterPluginBinding.getBinaryMessenger(), "flutter_openim_sdk");
|
||||
FlutterOpenimSdkPlugin.channel.setMethodCallHandler(new FlutterOpenimSdkPlugin(flutterPluginBinding.getApplicationContext()));
|
||||
// channel.setMethodCallHandler(this);
|
||||
}
|
||||
|
||||
@ -58,7 +63,7 @@ public class FlutterOpenimSdkPlugin implements FlutterPlugin, MethodCallHandler
|
||||
|
||||
@Override
|
||||
public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) {
|
||||
channel.setMethodCallHandler(null);
|
||||
FlutterOpenimSdkPlugin.channel.setMethodCallHandler(null);
|
||||
}
|
||||
|
||||
void parse(@NonNull MethodCall call, @NonNull Result result) {
|
||||
@ -66,7 +71,7 @@ public class FlutterOpenimSdkPlugin implements FlutterPlugin, MethodCallHandler
|
||||
String managerName = CommonUtil.getParamValue(call, "ManagerName");
|
||||
Field field = FlutterOpenimSdkPlugin.class.getDeclaredField(managerName);
|
||||
Method method = field.get(new Object()).getClass().getDeclaredMethod(call.method, MethodCall.class, Result.class);
|
||||
System.out.println("flutter call native { class:" + managerName + ", method:" + method.getName() + " }");
|
||||
Log.i("F-OpenIMSDK(flutter call native)", "{ class:" + managerName + ", method:" + method.getName() + " }");
|
||||
method.invoke(field.get(new Object()), call, result);
|
||||
} catch (NoSuchFieldException e) {
|
||||
e.printStackTrace();
|
||||
|
@ -3,34 +3,31 @@ package io.openim.flutter_openim_sdk.listener;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import io.flutter.plugin.common.MethodChannel;
|
||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||
import open_im_sdk.OnAdvancedMsgListener;
|
||||
|
||||
public class AdvancedMsgListenerImpl implements OnAdvancedMsgListener {
|
||||
final MethodChannel channel;
|
||||
public class AdvancedMsgListener implements OnAdvancedMsgListener {
|
||||
final Map<String, String> values = new HashMap<>();
|
||||
|
||||
public AdvancedMsgListenerImpl(MethodChannel channel, String listenerId) {
|
||||
this.channel = channel;
|
||||
public AdvancedMsgListener(String listenerId) {
|
||||
this.values.put("id", listenerId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRecvC2CReadReceipt(String s) {
|
||||
values.put("message", s);
|
||||
CommonUtil.emitEvent(channel, "advancedMsgListener", "onRecvC2CReadReceipt", values);
|
||||
CommonUtil.emitEvent("advancedMsgListener", "onRecvC2CReadReceipt", values);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRecvMessageRevoked(String s) {
|
||||
values.put("message", s);
|
||||
CommonUtil.emitEvent(channel, "advancedMsgListener", "onRecvMessageRevoked", values);
|
||||
CommonUtil.emitEvent("advancedMsgListener", "onRecvMessageRevoked", values);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRecvNewMessage(String s) {
|
||||
values.put("message", s);
|
||||
CommonUtil.emitEvent(channel, "advancedMsgListener", "onRecvNewMessage", values);
|
||||
CommonUtil.emitEvent("advancedMsgListener", "onRecvNewMessage", values);
|
||||
}
|
||||
}
|
@ -1,27 +1,28 @@
|
||||
package io.openim.flutter_openim_sdk.listener;
|
||||
|
||||
|
||||
import io.flutter.Log;
|
||||
import io.flutter.plugin.common.MethodChannel;
|
||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||
import open_im_sdk.Base;
|
||||
|
||||
public class BaseImpl implements Base {
|
||||
public class BaseListener implements Base {
|
||||
|
||||
MethodChannel.Result result;
|
||||
|
||||
public BaseImpl(MethodChannel.Result result) {
|
||||
public BaseListener(MethodChannel.Result result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(long l, String s) {
|
||||
System.out.println("BaseImpl:" + s);
|
||||
Log.e("F-OpenIMSD(callback)", s);
|
||||
CommonUtil.runMainThreadReturnError(result, l, s, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(String s) {
|
||||
System.out.println("BaseImpl:" + s);
|
||||
Log.i("F-OpenIMSDK(callback)", s);
|
||||
CommonUtil.runMainThreadReturn(result, s);
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package io.openim.flutter_openim_sdk.listener;
|
||||
|
||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||
import open_im_sdk.OnConversationListener;
|
||||
|
||||
public class ConversationListener implements OnConversationListener {
|
||||
|
||||
|
||||
@Override
|
||||
public void onConversationChanged(String s) {
|
||||
CommonUtil.emitEvent("conversationListener", "onConversationChanged", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNewConversation(String s) {
|
||||
CommonUtil.emitEvent("conversationListener", "onNewConversation", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSyncServerFailed() {
|
||||
CommonUtil.emitEvent("conversationListener", "onSyncServerFailed", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSyncServerFinish() {
|
||||
CommonUtil.emitEvent("conversationListener", "onSyncServerFinish", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSyncServerStart() {
|
||||
CommonUtil.emitEvent("conversationListener", "onSyncServerStart", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTotalUnreadMessageCountChanged(int i) {
|
||||
CommonUtil.emitEvent("conversationListener", "onTotalUnreadMessageCountChanged", i);
|
||||
}
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
package io.openim.flutter_openim_sdk.listener;
|
||||
|
||||
import io.flutter.plugin.common.MethodChannel;
|
||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||
import open_im_sdk.OnConversationListener;
|
||||
|
||||
public class ConversationListenerImpl implements OnConversationListener {
|
||||
private final MethodChannel channel;
|
||||
|
||||
public ConversationListenerImpl(MethodChannel channel) {
|
||||
this.channel = channel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConversationChanged(String s) {
|
||||
CommonUtil.emitEvent(channel, "conversationListener", "onConversationChanged", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNewConversation(String s) {
|
||||
CommonUtil.emitEvent(channel, "conversationListener", "onNewConversation", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSyncServerFailed() {
|
||||
CommonUtil.emitEvent(channel, "conversationListener", "onSyncServerFailed", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSyncServerFinish() {
|
||||
CommonUtil.emitEvent(channel, "conversationListener", "onSyncServerFinish", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSyncServerStart() {
|
||||
CommonUtil.emitEvent(channel, "conversationListener", "onSyncServerStart", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTotalUnreadMessageCountChanged(int i) {
|
||||
CommonUtil.emitEvent(channel, "conversationListener", "onTotalUnreadMessageCountChanged", i);
|
||||
}
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
package io.openim.flutter_openim_sdk.listener;
|
||||
|
||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||
import open_im_sdk.OnFriendshipListener;
|
||||
|
||||
public class FriendshipListener implements OnFriendshipListener {
|
||||
|
||||
@Override
|
||||
public void onBlackListAdd(String s) {
|
||||
CommonUtil.emitEvent("friendListener", "onBlackListAdd", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlackListDeleted(String s) {
|
||||
CommonUtil.emitEvent("friendListener", "onBlackListDeleted", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFriendApplicationListAccept(String s) {
|
||||
CommonUtil.emitEvent("friendListener", "onFriendApplicationListAccept", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFriendApplicationListAdded(String s) {
|
||||
CommonUtil.emitEvent("friendListener", "onFriendApplicationListAdded", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFriendApplicationListDeleted(String s) {
|
||||
CommonUtil.emitEvent("friendListener", "onFriendApplicationListDeleted", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFriendApplicationListReject(String s) {
|
||||
CommonUtil.emitEvent("friendListener", "onFriendApplicationListReject", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFriendInfoChanged(String s) {
|
||||
CommonUtil.emitEvent("friendListener", "onFriendInfoChanged", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFriendListAdded(String s) {
|
||||
CommonUtil.emitEvent("friendListener", "onFriendListAdded", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFriendListDeleted(String s) {
|
||||
CommonUtil.emitEvent("friendListener", "onFriendListDeleted", s);
|
||||
}
|
||||
}
|
@ -1,58 +0,0 @@
|
||||
package io.openim.flutter_openim_sdk.listener;
|
||||
|
||||
import io.flutter.plugin.common.MethodChannel;
|
||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||
import open_im_sdk.OnFriendshipListener;
|
||||
|
||||
public class FriendshipListenerImpl implements OnFriendshipListener {
|
||||
private final MethodChannel channel;
|
||||
|
||||
public FriendshipListenerImpl(MethodChannel channel) {
|
||||
this.channel = channel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlackListAdd(String s) {
|
||||
CommonUtil.emitEvent(channel, "friendListener", "onBlackListAdd", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlackListDeleted(String s) {
|
||||
CommonUtil.emitEvent(channel, "friendListener", "onBlackListDeleted", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFriendApplicationListAccept(String s) {
|
||||
CommonUtil.emitEvent(channel, "friendListener", "onFriendApplicationListAccept", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFriendApplicationListAdded(String s) {
|
||||
CommonUtil.emitEvent(channel, "friendListener", "onFriendApplicationListAdded", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFriendApplicationListDeleted(String s) {
|
||||
CommonUtil.emitEvent(channel, "friendListener", "onFriendApplicationListDeleted", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFriendApplicationListReject(String s) {
|
||||
CommonUtil.emitEvent(channel, "friendListener", "onFriendApplicationListReject", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFriendInfoChanged(String s) {
|
||||
CommonUtil.emitEvent(channel, "friendListener", "onFriendInfoChanged", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFriendListAdded(String s) {
|
||||
CommonUtil.emitEvent(channel, "friendListener", "onFriendListAdded", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFriendListDeleted(String s) {
|
||||
CommonUtil.emitEvent(channel, "friendListener", "onFriendListDeleted", s);
|
||||
}
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
package io.openim.flutter_openim_sdk.listener;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||
import open_im_sdk.OnGroupListener;
|
||||
|
||||
public class GroupListener implements OnGroupListener {
|
||||
@Override
|
||||
public void onApplicationProcessed(String s, String s1, int i, String s2) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("groupId", s);
|
||||
map.put("opUser", s1);
|
||||
map.put("agreeOrReject", i);
|
||||
map.put("opReason", s2);
|
||||
CommonUtil.emitEvent("groupListener", "onApplicationProcessed", map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGroupCreated(String s) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("groupId", s);
|
||||
CommonUtil.emitEvent("groupListener", "onGroupCreated", map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGroupInfoChanged(String s, String s1) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("groupId", s);
|
||||
map.put("groupInfo", s1);
|
||||
CommonUtil.emitEvent("groupListener", "onGroupInfoChanged", map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMemberEnter(String s, String s1) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("groupId", s);
|
||||
map.put("memberList", s1);
|
||||
CommonUtil.emitEvent("groupListener", "onMemberEnter", map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMemberInvited(String s, String s1, String s2) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("groupId", s);
|
||||
map.put("opUser", s1);
|
||||
map.put("memberList", s2);
|
||||
CommonUtil.emitEvent("groupListener", "onMemberInvited", map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMemberKicked(String s, String s1, String s2) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("groupId", s);
|
||||
map.put("opUser", s1);
|
||||
map.put("memberList", s2);
|
||||
CommonUtil.emitEvent("groupListener", "onMemberKicked", map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMemberLeave(String s, String s1) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("groupId", s);
|
||||
map.put("member", s1);
|
||||
CommonUtil.emitEvent("groupListener", "onMemberLeave", map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceiveJoinApplication(String s, String s1, String s2) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("groupId", s);
|
||||
map.put("member", s1);
|
||||
map.put("opReason", s2);
|
||||
CommonUtil.emitEvent("groupListener", "onReceiveJoinApplication", map);
|
||||
}
|
||||
}
|
@ -9,19 +9,14 @@ import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||
import open_im_sdk.SendMsgCallBack;
|
||||
|
||||
public class MsgSendProgressListener implements SendMsgCallBack {
|
||||
|
||||
|
||||
public MsgSendProgressListener(MethodChannel.Result result, MethodChannel channel, MethodCall call) {
|
||||
this.result = result;
|
||||
this.channel = channel;
|
||||
this.call = call;
|
||||
}
|
||||
|
||||
final private MethodChannel.Result result;
|
||||
final private MethodChannel channel;
|
||||
final private MethodCall call;
|
||||
final Map<String, Object> values = new HashMap<>();
|
||||
|
||||
public MsgSendProgressListener(MethodChannel.Result result, MethodCall call) {
|
||||
this.result = result;
|
||||
this.call = call;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(long l, String s) {
|
||||
@ -32,7 +27,7 @@ public class MsgSendProgressListener implements SendMsgCallBack {
|
||||
public void onProgress(long l) {
|
||||
values.put("clientMsgID", CommonUtil.getSendMessageClientMsgID(call));
|
||||
values.put("progress", l);
|
||||
CommonUtil.emitEvent(channel, "messageProgressListener", "onProgress", values);
|
||||
CommonUtil.emitEvent("msgSendProgressListener", "onProgress", values);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -0,0 +1,38 @@
|
||||
package io.openim.flutter_openim_sdk.listener;
|
||||
|
||||
|
||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||
import open_im_sdk.IMSDKListener;
|
||||
|
||||
public class SDKListener implements IMSDKListener {
|
||||
|
||||
@Override
|
||||
public void onConnectFailed(long l, String s) {
|
||||
CommonUtil.emitEvent("initSDKListener", "onConnectFailed", l, s, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConnectSuccess() {
|
||||
CommonUtil.emitEvent("initSDKListener", "onConnectSuccess", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConnecting() {
|
||||
CommonUtil.emitEvent("initSDKListener", "onConnecting", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onKickedOffline() {
|
||||
CommonUtil.emitEvent("initSDKListener", "onKickedOffline", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSelfInfoUpdated(String s) {
|
||||
CommonUtil.emitEvent("initSDKListener", "onSelfInfoUpdated", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUserTokenExpired() {
|
||||
CommonUtil.emitEvent("initSDKListener", "onUserTokenExpired", null);
|
||||
}
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
package io.openim.flutter_openim_sdk.listener;
|
||||
|
||||
|
||||
import io.flutter.plugin.common.MethodChannel;
|
||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||
import open_im_sdk.IMSDKListener;
|
||||
|
||||
public class SDKListenerImpl implements IMSDKListener {
|
||||
final private MethodChannel channel;
|
||||
|
||||
public SDKListenerImpl(MethodChannel channel) {
|
||||
this.channel = channel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConnectFailed(long l, String s) {
|
||||
CommonUtil.emitEvent(channel, "initSDKListener", "onConnectFailed", l, s, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConnectSuccess() {
|
||||
CommonUtil.emitEvent(channel, "initSDKListener", "onConnectSuccess", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConnecting() {
|
||||
CommonUtil.emitEvent(channel, "initSDKListener", "onConnecting", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onKickedOffline() {
|
||||
CommonUtil.emitEvent(channel, "initSDKListener", "onKickedOffline", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSelfInfoUpdated(String s) {
|
||||
CommonUtil.emitEvent(channel, "initSDKListener", "onSelfInfoUpdated", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUserTokenExpired() {
|
||||
CommonUtil.emitEvent(channel, "initSDKListener", "onUserTokenExpired", null);
|
||||
}
|
||||
}
|
@ -2,47 +2,53 @@ package io.openim.flutter_openim_sdk.manager;
|
||||
|
||||
import io.flutter.plugin.common.MethodCall;
|
||||
import io.flutter.plugin.common.MethodChannel;
|
||||
import io.openim.flutter_openim_sdk.listener.BaseImpl;
|
||||
import io.openim.flutter_openim_sdk.listener.ConversationListenerImpl;
|
||||
import io.openim.flutter_openim_sdk.listener.BaseListener;
|
||||
import io.openim.flutter_openim_sdk.listener.ConversationListener;
|
||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||
import open_im_sdk.Open_im_sdk;
|
||||
|
||||
public class ConversationManager {
|
||||
final private MethodChannel channel;
|
||||
|
||||
public ConversationManager(MethodChannel channel) {
|
||||
this.channel = channel;
|
||||
}
|
||||
|
||||
public void setConversationListener(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setConversationListener(new ConversationListenerImpl(channel));
|
||||
Open_im_sdk.setConversationListener(new ConversationListener());
|
||||
}
|
||||
|
||||
public void getAllConversationList(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getAllConversationList(new BaseImpl(result));
|
||||
Open_im_sdk.getAllConversationList(new BaseListener(result));
|
||||
}
|
||||
|
||||
public void getOneConversation(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getOneConversation(CommonUtil.getConversationSourceId(methodCall), CommonUtil.getConversationSessionType(methodCall), new BaseImpl(result));
|
||||
Open_im_sdk.getOneConversation(
|
||||
CommonUtil.getConversationSourceId(methodCall),
|
||||
CommonUtil.getConversationSessionType(methodCall),
|
||||
new BaseListener(result));
|
||||
}
|
||||
|
||||
public void getMultipleConversation(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getMultipleConversation(CommonUtil.getConversationIds(methodCall), new BaseImpl(result));
|
||||
Open_im_sdk.getMultipleConversation(
|
||||
CommonUtil.getConversationIds(methodCall),
|
||||
new BaseListener(result));
|
||||
}
|
||||
|
||||
public void deleteConversation(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.deleteConversation(CommonUtil.getConversationId(methodCall), new BaseImpl(result));
|
||||
Open_im_sdk.deleteConversation(CommonUtil.getConversationId(methodCall), new BaseListener(result));
|
||||
}
|
||||
|
||||
public void setConversationDraft(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setConversationDraft(CommonUtil.getConversationId(methodCall), CommonUtil.getConversationDraft(methodCall), new BaseImpl(result));
|
||||
Open_im_sdk.setConversationDraft(
|
||||
CommonUtil.getConversationId(methodCall),
|
||||
CommonUtil.getConversationDraft(methodCall),
|
||||
new BaseListener(result));
|
||||
}
|
||||
|
||||
public void pinConversation(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.pinConversation(CommonUtil.getConversationId(methodCall), CommonUtil.isPinnedConversation(methodCall), new BaseImpl(result));
|
||||
Open_im_sdk.pinConversation(
|
||||
CommonUtil.getConversationId(methodCall),
|
||||
CommonUtil.isPinnedConversation(methodCall),
|
||||
new BaseListener(result));
|
||||
}
|
||||
|
||||
public void getTotalUnreadMsgCount(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getTotalUnreadMsgCount(new BaseImpl(result));
|
||||
Open_im_sdk.getTotalUnreadMsgCount(new BaseListener(result));
|
||||
}
|
||||
}
|
||||
|
@ -2,69 +2,64 @@ package io.openim.flutter_openim_sdk.manager;
|
||||
|
||||
import io.flutter.plugin.common.MethodCall;
|
||||
import io.flutter.plugin.common.MethodChannel;
|
||||
import io.openim.flutter_openim_sdk.listener.BaseImpl;
|
||||
import io.openim.flutter_openim_sdk.listener.FriendshipListenerImpl;
|
||||
import io.openim.flutter_openim_sdk.listener.BaseListener;
|
||||
import io.openim.flutter_openim_sdk.listener.FriendshipListener;
|
||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||
import open_im_sdk.Open_im_sdk;
|
||||
|
||||
public class FriendshipManager {
|
||||
|
||||
final private MethodChannel channel;
|
||||
|
||||
public FriendshipManager(MethodChannel channel) {
|
||||
this.channel = channel;
|
||||
}
|
||||
|
||||
public void setFriendListener(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setFriendListener(new FriendshipListenerImpl(channel));
|
||||
Open_im_sdk.setFriendListener(new FriendshipListener());
|
||||
}
|
||||
|
||||
public void getFriendsInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getFriendsInfo(new BaseImpl(result), CommonUtil.getUidList(methodCall));
|
||||
Open_im_sdk.getFriendsInfo(new BaseListener(result), CommonUtil.getUidList(methodCall));
|
||||
}
|
||||
|
||||
public void addFriend(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.addFriend(new BaseImpl(result), CommonUtil.getSDKJsonParam(methodCall));
|
||||
Open_im_sdk.addFriend(new BaseListener(result), CommonUtil.getSDKJsonParam(methodCall));
|
||||
}
|
||||
|
||||
public void getFriendApplicationList(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getFriendApplicationList(new BaseImpl(result));
|
||||
Open_im_sdk.getFriendApplicationList(new BaseListener(result));
|
||||
}
|
||||
|
||||
public void getFriendList(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getFriendList(new BaseImpl(result));
|
||||
Open_im_sdk.getFriendList(new BaseListener(result));
|
||||
}
|
||||
|
||||
public void setFriendInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setFriendInfo(CommonUtil.getSDKJsonParam(methodCall), new BaseImpl(result));
|
||||
Open_im_sdk.setFriendInfo(CommonUtil.getSDKJsonParam(methodCall), new BaseListener(result));
|
||||
}
|
||||
|
||||
public void addToBlackList(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.addToBlackList(new BaseImpl(result), CommonUtil.getJsonUid(methodCall));
|
||||
Open_im_sdk.addToBlackList(new BaseListener(result), CommonUtil.getJsonUid(methodCall));
|
||||
}
|
||||
|
||||
public void getBlackList(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getBlackList(new BaseImpl(result));
|
||||
Open_im_sdk.getBlackList(new BaseListener(result));
|
||||
}
|
||||
|
||||
public void deleteFromBlackList(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.deleteFromBlackList(new BaseImpl(result), CommonUtil.getJsonUid(methodCall));
|
||||
Open_im_sdk.deleteFromBlackList(new BaseListener(result), CommonUtil.getJsonUid(methodCall));
|
||||
}
|
||||
|
||||
public void checkFriend(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.checkFriend(new BaseImpl(result), CommonUtil.getUidList(methodCall));
|
||||
Open_im_sdk.checkFriend(new BaseListener(result), CommonUtil.getUidList(methodCall));
|
||||
}
|
||||
|
||||
public void deleteFromFriendList(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.deleteFromFriendList(CommonUtil.getJsonUid(methodCall), new BaseImpl(result));
|
||||
Open_im_sdk.deleteFromFriendList(CommonUtil.getJsonUid(methodCall), new BaseListener(result));
|
||||
}
|
||||
|
||||
public void acceptFriendApplication(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.acceptFriendApplication(new BaseImpl(result), CommonUtil.getJsonUid(methodCall));
|
||||
Open_im_sdk.acceptFriendApplication(new BaseListener(result), CommonUtil.getJsonUid(methodCall));
|
||||
}
|
||||
|
||||
public void refuseFriendApplication(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.refuseFriendApplication(new BaseImpl(result), CommonUtil.getJsonUid(methodCall));
|
||||
Open_im_sdk.refuseFriendApplication(new BaseListener(result), CommonUtil.getJsonUid(methodCall));
|
||||
}
|
||||
|
||||
public void forceSyncFriendApplication(MethodCall methodCall, MethodChannel.Result result) {
|
||||
|
@ -0,0 +1,113 @@
|
||||
package io.openim.flutter_openim_sdk.manager;
|
||||
|
||||
import io.flutter.plugin.common.MethodCall;
|
||||
import io.flutter.plugin.common.MethodChannel;
|
||||
import io.openim.flutter_openim_sdk.listener.BaseListener;
|
||||
import io.openim.flutter_openim_sdk.listener.GroupListener;
|
||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||
import open_im_sdk.Open_im_sdk;
|
||||
|
||||
public class GroupManager {
|
||||
|
||||
public void setGroupListener(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setGroupListener(new GroupListener());
|
||||
}
|
||||
|
||||
public void inviteUserToGroup(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.inviteUserToGroup(
|
||||
CommonUtil.getGid(methodCall),
|
||||
CommonUtil.getGroupOpReason(methodCall),
|
||||
CommonUtil.getUidList(methodCall),
|
||||
new BaseListener(result));
|
||||
}
|
||||
|
||||
public void kickGroupMember(MethodCall methodCall, MethodChannel.Result result) {
|
||||
System.out.println("gid:" + CommonUtil.getGid(methodCall));
|
||||
System.out.println("reason:" + CommonUtil.getGroupOpReason(methodCall));
|
||||
System.out.println("uidList:" + CommonUtil.getUidList(methodCall));
|
||||
Open_im_sdk.kickGroupMember(
|
||||
CommonUtil.getGid(methodCall),
|
||||
CommonUtil.getGroupOpReason(methodCall),
|
||||
CommonUtil.getUidList(methodCall),
|
||||
new BaseListener(result));
|
||||
}
|
||||
|
||||
public void getGroupMembersInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getGroupMembersInfo(
|
||||
CommonUtil.getGid(methodCall),
|
||||
CommonUtil.getUidList(methodCall),
|
||||
new BaseListener(result));
|
||||
}
|
||||
|
||||
public void getGroupMemberList(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getGroupMemberList(
|
||||
CommonUtil.getGid(methodCall),
|
||||
CommonUtil.getGroupListFilter(methodCall),
|
||||
CommonUtil.getGroupListNext(methodCall),
|
||||
new BaseListener(result));
|
||||
}
|
||||
|
||||
|
||||
public void getJoinedGroupList(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getJoinedGroupList(new BaseListener(result));
|
||||
}
|
||||
|
||||
public void createGroup(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.createGroup(
|
||||
CommonUtil.getGroupInfo(methodCall),
|
||||
CommonUtil.getGroupMemberRoleList(methodCall),
|
||||
new BaseListener(result));
|
||||
}
|
||||
|
||||
public void setGroupInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setGroupInfo(
|
||||
CommonUtil.getGroupInfo(methodCall),
|
||||
new BaseListener(result));
|
||||
}
|
||||
|
||||
public void getGroupsInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getGroupsInfo(
|
||||
CommonUtil.getGidList(methodCall),
|
||||
new BaseListener(result));
|
||||
}
|
||||
|
||||
public void joinGroup(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.joinGroup(
|
||||
CommonUtil.getGid(methodCall),
|
||||
CommonUtil.getGroupOpReason(methodCall),
|
||||
new BaseListener(result));
|
||||
}
|
||||
|
||||
public void quitGroup(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.quitGroup(
|
||||
CommonUtil.getGid(methodCall),
|
||||
new BaseListener(result));
|
||||
}
|
||||
|
||||
public void transferGroupOwner(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.transferGroupOwner(
|
||||
CommonUtil.getGid(methodCall),
|
||||
CommonUtil.getUid(methodCall),
|
||||
new BaseListener(result));
|
||||
}
|
||||
|
||||
public void getGroupApplicationList(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getGroupApplicationList(new BaseListener(result));
|
||||
}
|
||||
|
||||
public void acceptGroupApplication(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.acceptGroupApplication(
|
||||
CommonUtil.getGroupApplicationInfo(methodCall),
|
||||
CommonUtil.getGroupOpReason(methodCall),
|
||||
new BaseListener(result));
|
||||
|
||||
}
|
||||
|
||||
public void refuseGroupApplication(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.refuseGroupApplication(
|
||||
CommonUtil.getGroupApplicationInfo(methodCall),
|
||||
CommonUtil.getGroupOpReason(methodCall),
|
||||
new BaseListener(result));
|
||||
|
||||
}
|
||||
}
|
@ -2,30 +2,24 @@ package io.openim.flutter_openim_sdk.manager;
|
||||
|
||||
import io.flutter.plugin.common.MethodCall;
|
||||
import io.flutter.plugin.common.MethodChannel;
|
||||
import io.openim.flutter_openim_sdk.listener.BaseImpl;
|
||||
import io.openim.flutter_openim_sdk.listener.SDKListenerImpl;
|
||||
import io.openim.flutter_openim_sdk.listener.BaseListener;
|
||||
import io.openim.flutter_openim_sdk.listener.SDKListener;
|
||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||
import open_im_sdk.Open_im_sdk;
|
||||
|
||||
public class IMManager {
|
||||
|
||||
final private MethodChannel channel;
|
||||
|
||||
public IMManager(MethodChannel channel) {
|
||||
this.channel = channel;
|
||||
}
|
||||
|
||||
public void initSDK(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.initSDK(CommonUtil.getSDKJsonParam(methodCall), new SDKListenerImpl(channel));
|
||||
Open_im_sdk.initSDK(CommonUtil.getSDKJsonParam(methodCall), new SDKListener());
|
||||
CommonUtil.runMainThreadReturn(result, null);
|
||||
}
|
||||
|
||||
public void login(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.login(CommonUtil.getUid(methodCall), CommonUtil.getToken(methodCall), new BaseImpl(result));
|
||||
Open_im_sdk.login(CommonUtil.getUid(methodCall), CommonUtil.getToken(methodCall), new BaseListener(result));
|
||||
}
|
||||
|
||||
public void logout(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.logout(new BaseImpl(result));
|
||||
Open_im_sdk.logout(new BaseListener(result));
|
||||
}
|
||||
|
||||
public void getLoginStatus(MethodCall methodCall, MethodChannel.Result result) {
|
||||
@ -37,11 +31,11 @@ public class IMManager {
|
||||
}
|
||||
|
||||
public void getUsersInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getUsersInfo(CommonUtil.getUidList(methodCall), new BaseImpl(result));
|
||||
Open_im_sdk.getUsersInfo(CommonUtil.getUidList(methodCall), new BaseListener(result));
|
||||
}
|
||||
|
||||
public void setSelfInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setSelfInfo(CommonUtil.getSDKJsonParam(methodCall), new BaseImpl(result));
|
||||
Open_im_sdk.setSelfInfo(CommonUtil.getSDKJsonParam(methodCall), new BaseListener(result));
|
||||
}
|
||||
|
||||
public void forceSyncLoginUerInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||
|
@ -5,8 +5,8 @@ import java.util.Map;
|
||||
|
||||
import io.flutter.plugin.common.MethodCall;
|
||||
import io.flutter.plugin.common.MethodChannel;
|
||||
import io.openim.flutter_openim_sdk.listener.AdvancedMsgListenerImpl;
|
||||
import io.openim.flutter_openim_sdk.listener.BaseImpl;
|
||||
import io.openim.flutter_openim_sdk.listener.AdvancedMsgListener;
|
||||
import io.openim.flutter_openim_sdk.listener.BaseListener;
|
||||
import io.openim.flutter_openim_sdk.listener.MsgSendProgressListener;
|
||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||
import open_im_sdk.OnAdvancedMsgListener;
|
||||
@ -15,18 +15,12 @@ import open_im_sdk.Open_im_sdk;
|
||||
|
||||
public class MessageManager {
|
||||
private final static String KEY_ID = "id";
|
||||
private final MethodChannel channel;
|
||||
private final static Map<String, OnAdvancedMsgListener> listeners = new HashMap<>();
|
||||
|
||||
|
||||
public MessageManager(MethodChannel channel) {
|
||||
this.channel = channel;
|
||||
}
|
||||
|
||||
public void addAdvancedMsgListener(MethodCall methodCall, MethodChannel.Result result) {
|
||||
String key = methodCall.argument(KEY_ID);
|
||||
if (!listeners.containsKey(key)) {
|
||||
AdvancedMsgListenerImpl listener = new AdvancedMsgListenerImpl(channel, key);
|
||||
AdvancedMsgListener listener = new AdvancedMsgListener(key);
|
||||
listeners.put(methodCall.argument(KEY_ID), listener);
|
||||
Open_im_sdk.addAdvancedMsgListener(listener);
|
||||
}
|
||||
@ -39,20 +33,24 @@ public class MessageManager {
|
||||
}
|
||||
|
||||
public void sendMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||
MsgSendProgressListener listener = new MsgSendProgressListener(result, channel, methodCall);
|
||||
Open_im_sdk.sendMessage(listener, CommonUtil.getSendMessageContent(methodCall), CommonUtil.getSendMessageReceiver(methodCall), CommonUtil.geSendMessageGroupId(methodCall), CommonUtil.getSendMessageOnlineOnly(methodCall));
|
||||
MsgSendProgressListener listener = new MsgSendProgressListener(result, methodCall);
|
||||
Open_im_sdk.sendMessage(listener,
|
||||
CommonUtil.getSendMessageContent(methodCall),
|
||||
CommonUtil.getSendMessageReceiver(methodCall),
|
||||
CommonUtil.geSendMessageGroupId(methodCall),
|
||||
CommonUtil.getSendMessageOnlineOnly(methodCall));
|
||||
}
|
||||
|
||||
public void getHistoryMessageList(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getHistoryMessageList(new BaseImpl(result), CommonUtil.getSDKJsonParam(methodCall));
|
||||
Open_im_sdk.getHistoryMessageList(new BaseListener(result), CommonUtil.getSDKJsonParam(methodCall));
|
||||
}
|
||||
|
||||
public void revokeMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.revokeMessage(new BaseImpl(result), CommonUtil.getSDKJsonParam(methodCall));
|
||||
Open_im_sdk.revokeMessage(new BaseListener(result), CommonUtil.getSDKJsonParam(methodCall));
|
||||
}
|
||||
|
||||
public void deleteMessageFromLocalStorage(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.deleteMessageFromLocalStorage(new BaseImpl(result), CommonUtil.getSDKJsonParam(methodCall));
|
||||
Open_im_sdk.deleteMessageFromLocalStorage(new BaseListener(result), CommonUtil.getSDKJsonParam(methodCall));
|
||||
}
|
||||
|
||||
public void deleteMessages(MethodCall methodCall, MethodChannel.Result result) {
|
||||
@ -60,46 +58,81 @@ public class MessageManager {
|
||||
}
|
||||
|
||||
public void insertSingleMessageToLocalStorage(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.insertSingleMessageToLocalStorage(new BaseImpl(result), CommonUtil.getSingleMessageContent(methodCall), CommonUtil.getSingleMessageUserid(methodCall), CommonUtil.getSingleMessageSender(methodCall));
|
||||
Open_im_sdk.insertSingleMessageToLocalStorage(new BaseListener(result),
|
||||
CommonUtil.getSingleMessageContent(methodCall),
|
||||
CommonUtil.getSingleMessageUserid(methodCall),
|
||||
CommonUtil.getSingleMessageSender(methodCall));
|
||||
}
|
||||
|
||||
public void findMessages(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.findMessages(new BaseImpl(result), CommonUtil.getFindMessageIds(methodCall));
|
||||
Open_im_sdk.findMessages(new BaseListener(result), CommonUtil.getFindMessageIds(methodCall));
|
||||
}
|
||||
|
||||
public void markSingleMessageHasRead(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.markSingleMessageHasRead(new BaseImpl(result), CommonUtil.getSingleMessageUserid(methodCall));
|
||||
Open_im_sdk.markSingleMessageHasRead(new BaseListener(result), CommonUtil.getSingleMessageUserid(methodCall));
|
||||
}
|
||||
|
||||
public void markGroupMessageHasRead(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.markGroupMessageHasRead(new BaseListener(result), CommonUtil.getGroupMessageGroupid(methodCall));
|
||||
}
|
||||
|
||||
public void markC2CMessageAsRead(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.markC2CMessageAsRead(new BaseImpl(result), CommonUtil.getSingleMessageUserid(methodCall));
|
||||
}
|
||||
|
||||
public void createTextMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||
CommonUtil.runMainThreadReturn(result, Open_im_sdk.createTextMessage(CommonUtil.getMessageText(methodCall)));
|
||||
CommonUtil.runMainThreadReturn(result,
|
||||
Open_im_sdk.createTextMessage(
|
||||
CommonUtil.getMessageText(methodCall)));
|
||||
}
|
||||
|
||||
public void createTextAtMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||
CommonUtil.runMainThreadReturn(result, Open_im_sdk.createTextAtMessage(CommonUtil.getMessageText(methodCall), CommonUtil.getAtUserList(methodCall)));
|
||||
CommonUtil.runMainThreadReturn(result,
|
||||
Open_im_sdk.createTextAtMessage(
|
||||
CommonUtil.getMessageText(methodCall),
|
||||
CommonUtil.getAtUserList(methodCall)));
|
||||
}
|
||||
|
||||
public void createImageMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||
CommonUtil.runMainThreadReturn(result, Open_im_sdk.createImageMessage(CommonUtil.getImagePath(methodCall)));
|
||||
CommonUtil.runMainThreadReturn(result,
|
||||
Open_im_sdk.createImageMessage(
|
||||
CommonUtil.getImagePath(methodCall)));
|
||||
}
|
||||
|
||||
public void createSoundMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||
CommonUtil.runMainThreadReturn(result, Open_im_sdk.createSoundMessage(CommonUtil.getSoundPath(methodCall), CommonUtil.getSoundDuration(methodCall)));
|
||||
CommonUtil.runMainThreadReturn(result,
|
||||
Open_im_sdk.createSoundMessage(
|
||||
CommonUtil.getSoundPath(methodCall),
|
||||
CommonUtil.getSoundDuration(methodCall)));
|
||||
}
|
||||
|
||||
public void createVideoMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||
CommonUtil.runMainThreadReturn(result, Open_im_sdk.createVideoMessage(CommonUtil.getVideoPath(methodCall), CommonUtil.getVideoType(methodCall), CommonUtil.getVideoDuration(methodCall), CommonUtil.getVideoSnapshotPath(methodCall)));
|
||||
CommonUtil.runMainThreadReturn(result,
|
||||
Open_im_sdk.createVideoMessage(
|
||||
CommonUtil.getVideoPath(methodCall),
|
||||
CommonUtil.getVideoType(methodCall),
|
||||
CommonUtil.getVideoDuration(methodCall),
|
||||
CommonUtil.getVideoSnapshotPath(methodCall)));
|
||||
}
|
||||
|
||||
public void createFileMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||
CommonUtil.runMainThreadReturn(result, Open_im_sdk.createFileMessage(CommonUtil.getFilePath(methodCall), CommonUtil.getFileName(methodCall)));
|
||||
CommonUtil.runMainThreadReturn(result,
|
||||
Open_im_sdk.createFileMessage(
|
||||
CommonUtil.getFilePath(methodCall),
|
||||
CommonUtil.getFileName(methodCall)));
|
||||
}
|
||||
|
||||
public void createMergerMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||
CommonUtil.runMainThreadReturn(result, Open_im_sdk.createMergerMessage(CommonUtil.getMergerMessageList(methodCall), CommonUtil.getMergerMessageTitle(methodCall), CommonUtil.getSummaryList(methodCall)));
|
||||
CommonUtil.runMainThreadReturn(result,
|
||||
Open_im_sdk.createMergerMessage(
|
||||
CommonUtil.getMergerMessageList(methodCall),
|
||||
CommonUtil.getMergerMessageTitle(methodCall),
|
||||
CommonUtil.getSummaryList(methodCall)));
|
||||
}
|
||||
|
||||
public void createForwardMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||
CommonUtil.runMainThreadReturn(result, Open_im_sdk.createForwardMessage(CommonUtil.getForwardMessage(methodCall)));
|
||||
CommonUtil.runMainThreadReturn(result,
|
||||
Open_im_sdk.createForwardMessage(
|
||||
CommonUtil.getForwardMessage(methodCall)));
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import android.os.Looper;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import io.flutter.Log;
|
||||
import io.flutter.plugin.common.MethodCall;
|
||||
import io.flutter.plugin.common.MethodChannel;
|
||||
import io.openim.flutter_openim_sdk.FlutterOpenimSdkPlugin;
|
||||
@ -53,7 +54,7 @@ public class CommonUtil {
|
||||
runMainThreadReturnError(result, String.valueOf(errorCode), errorMessage, errorDetails);
|
||||
}
|
||||
|
||||
public static <T> void emitEvent(MethodChannel channel, String method, String type, Long errCode, String errMsg, T data) {
|
||||
public static <T> void emitEvent(String method, String type, Long errCode, String errMsg, T data) {
|
||||
runMainThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -70,29 +71,29 @@ public class CommonUtil {
|
||||
if (null != errMsg) {
|
||||
res.put("errMsg", errMsg);
|
||||
}
|
||||
System.out.println("native call flutter { method:" + method + ", type:" + type + " }");
|
||||
Log.i("F-OpenIMSDK(native call flutter)", "{ method:" + method + ", type:" + type + " }");
|
||||
FlutterOpenimSdkPlugin.channel.invokeMethod(method, res);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static <T> void emitEvent(MethodChannel channel, String method, String type, T data) {
|
||||
emitEvent(channel, method, type, null, null, data);
|
||||
public static <T> void emitEvent(String method, String type, T data) {
|
||||
emitEvent(method, type, null, null, data);
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////
|
||||
//////////////////////////////////////
|
||||
public static String getUid(MethodCall methodCall) {
|
||||
return getParamValue(methodCall, KEY_LOGIN_UID);
|
||||
return getParamValue(methodCall, KEY_UID);
|
||||
}
|
||||
|
||||
public static String getJsonUid(MethodCall methodCall) {
|
||||
return JsonUtil.toString(getParamValue(methodCall, KEY_LOGIN_UID));
|
||||
return JsonUtil.toString(getParamValue(methodCall, KEY_UID));
|
||||
}
|
||||
|
||||
public static String getToken(MethodCall methodCall) {
|
||||
return getParamValue(methodCall, KEY_LOGIN_TOKEN);
|
||||
return getParamValue(methodCall, KEY_TOKEN);
|
||||
}
|
||||
|
||||
public static String getMessageText(MethodCall methodCall) {
|
||||
@ -190,6 +191,10 @@ public class CommonUtil {
|
||||
return getParamValue(methodCall, KEY_SINGLE_MESSAGE_USERID);
|
||||
}
|
||||
|
||||
public static String getGroupMessageGroupid(MethodCall methodCall) {
|
||||
return getParamValue(methodCall, KEY_GROUP_MESSAGE_GROUPID);
|
||||
}
|
||||
|
||||
public static String getSingleMessageSender(MethodCall methodCall) {
|
||||
return getParamValue(methodCall, KEY_SINGLE_MESSAGE_SENDER);
|
||||
}
|
||||
@ -226,10 +231,41 @@ public class CommonUtil {
|
||||
return getSDKJsonParam(methodCall, KEY_USER_IDS);
|
||||
}
|
||||
|
||||
public static String getGid(MethodCall methodCall) {
|
||||
return getParamValue(methodCall, KEY_GROUP_ID);
|
||||
}
|
||||
|
||||
public static String getGidList(MethodCall methodCall) {
|
||||
return getSDKJsonParam(methodCall, KEY_GROUP_IDS);
|
||||
}
|
||||
|
||||
public static String getGroupOpReason(MethodCall methodCall) {
|
||||
return getParamValue(methodCall, KEY_GROUP_OP_REASON);
|
||||
}
|
||||
|
||||
public static int getGroupListFilter(MethodCall methodCall) {
|
||||
return getParamValue(methodCall, KEY_GROUP_LIST_FILTER);
|
||||
}
|
||||
|
||||
public static int getGroupListNext(MethodCall methodCall) {
|
||||
return getParamValue(methodCall, KEY_GROUP_LIST_NEXT);
|
||||
}
|
||||
|
||||
public static String getGroupInfo(MethodCall methodCall) {
|
||||
return getSDKJsonParam(methodCall, KEY_GROUP_INFO);
|
||||
}
|
||||
|
||||
public static String getGroupMemberRoleList(MethodCall methodCall) {
|
||||
return getSDKJsonParam(methodCall, KEY_GROUP_MEMBER_ROLE_LIST);
|
||||
}
|
||||
|
||||
public static String getGroupApplicationInfo(MethodCall methodCall) {
|
||||
return getSDKJsonParam(methodCall, KEY_GROUP_APPLICATION_INFO);
|
||||
}
|
||||
|
||||
//login
|
||||
final static String KEY_LOGIN_UID = "uid";
|
||||
final static String KEY_LOGIN_TOKEN = "token";
|
||||
final static String KEY_UID = "uid";
|
||||
final static String KEY_TOKEN = "token";
|
||||
//create message body
|
||||
final static String KEY_TEXT = "text";
|
||||
final static String KEY_AT_USER_LIST = "atUserList";
|
||||
@ -256,6 +292,8 @@ public class CommonUtil {
|
||||
final static String KEY_SINGLE_MESSAGE_CONTENT = "message";
|
||||
final static String KEY_SINGLE_MESSAGE_USERID = "userID";
|
||||
final static String KEY_SINGLE_MESSAGE_SENDER = "sender";
|
||||
//group chat
|
||||
final static String KEY_GROUP_MESSAGE_GROUPID = "groupID";
|
||||
// find message
|
||||
final static String KEY_FIND_MESSAGE_IDS = "messageIDList";
|
||||
// conversation
|
||||
@ -267,4 +305,15 @@ public class CommonUtil {
|
||||
final static String KEY_CONVERSATION_SESSION_TYPE = "sessionType";
|
||||
// user info
|
||||
final static String KEY_USER_IDS = "uidList";
|
||||
// group
|
||||
final static String KEY_GROUP_ID = "gid";
|
||||
final static String KEY_GROUP_IDS = "gidList";
|
||||
final static String KEY_GROUP_OP_REASON = "reason";
|
||||
// final static String KEY_GROUP_USER_ID = "uid";
|
||||
// final static String KEY_GROUP_USER_IDS = "uidList";
|
||||
final static String KEY_GROUP_LIST_FILTER = "filter";
|
||||
final static String KEY_GROUP_LIST_NEXT = "next";
|
||||
final static String KEY_GROUP_INFO = "gInfo";
|
||||
final static String KEY_GROUP_MEMBER_ROLE_LIST = "memberList";
|
||||
final static String KEY_GROUP_APPLICATION_INFO = "application";
|
||||
}
|
||||
|
@ -1,70 +1,13 @@
|
||||
package io.openim.flutter_openim_sdk.util;
|
||||
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.TypeReference;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.alibaba.fastjson.JSON.parseObject;
|
||||
import org.json.JSONObject;
|
||||
|
||||
public class JsonUtil {
|
||||
|
||||
public static String toString(Object object) {
|
||||
if (object == null) {
|
||||
return "";
|
||||
public static String toString(Object o) {
|
||||
Object obj = JSONObject.wrap(o);
|
||||
if (null != obj) {
|
||||
return obj.toString();
|
||||
}
|
||||
try {
|
||||
return JSON.toJSONString(object);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return "";
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public static <T> T toObj(String jsonData, Class<T> clazz) {
|
||||
T t = null;
|
||||
if (TextUtils.isEmpty(jsonData)) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
t = parseObject(jsonData, clazz);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return t;
|
||||
}
|
||||
|
||||
|
||||
public static <T> List<T> toList(String jsonData, Class<T> clazz) {
|
||||
List<T> list = null;
|
||||
try {
|
||||
list = JSON.parseArray(jsonData, clazz);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* json转化为Map fastjson 使用方式
|
||||
*/
|
||||
public static Map toMap(String jsonData) {
|
||||
if (TextUtils.isEmpty(jsonData)) {
|
||||
return null;
|
||||
}
|
||||
Map map = null;
|
||||
try {
|
||||
map = parseObject(jsonData, new TypeReference<Map>() {
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
344
ios/Classes/CommonUtil.swift
Normal file
344
ios/Classes/CommonUtil.swift
Normal file
@ -0,0 +1,344 @@
|
||||
//
|
||||
// CommonUtil.swift
|
||||
// Runner
|
||||
//
|
||||
// Created by z1u24 on 2021/6/28.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
public class CommonUtil {
|
||||
|
||||
public static func getParamValue(methodCall:FlutterMethodCall, param: String)->Any? {
|
||||
let argument = methodCall.arguments as! NSDictionary
|
||||
let arg = argument.value(forKey: param)
|
||||
return arg;
|
||||
}
|
||||
|
||||
public static func getSDKJsonParam(methodCall: FlutterMethodCall, key: String) -> String{
|
||||
let argument = methodCall.arguments as! NSDictionary
|
||||
let arg = argument.value(forKey: key) as AnyObject
|
||||
return JsonUtil.toString(object: arg);
|
||||
}
|
||||
|
||||
public static func getSDKJsonParam(methodCall: FlutterMethodCall) -> String{
|
||||
let argument = methodCall.arguments as AnyObject
|
||||
let s = JsonUtil.toString(object: argument)
|
||||
return s
|
||||
}
|
||||
|
||||
public static func emitEvent(channel: FlutterMethodChannel, method: String, type: String, errCode: Int?, errMsg: String?, data: Any?){
|
||||
DispatchQueue.main.async {
|
||||
let res: NSMutableDictionary = NSMutableDictionary(capacity: 0)
|
||||
res.setValue(type, forKey: "type")
|
||||
if (data != nil) {
|
||||
res.setValue(data, forKey: "data");
|
||||
}
|
||||
if (nil != errCode) {
|
||||
res.setValue(errCode, forKey: "errCode");
|
||||
}
|
||||
if (nil != errMsg) {
|
||||
res.setValue(errMsg, forKey: "errMsg");
|
||||
}
|
||||
print("native call flutter { method: \(method) type: \(type) }")
|
||||
channel.invokeMethod(method, arguments: res)
|
||||
}
|
||||
}
|
||||
|
||||
public static func getUid(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_LOGIN_UID) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getToken(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_LOGIN_TOKEN) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getUidList(methodCall: FlutterMethodCall)->String{
|
||||
let result = getParamValue(methodCall: methodCall, param: KEY_UID_LIST) as AnyObject
|
||||
let r = JsonUtil.toString(object: result)
|
||||
return r
|
||||
}
|
||||
|
||||
public static func getUserUid(methodCall: FlutterMethodCall)->String{
|
||||
let result = getParamValue(methodCall: methodCall, param: KEY_LOGIN_UID) as AnyObject
|
||||
let r = JsonUtil.toString(object: result)
|
||||
return r
|
||||
}
|
||||
|
||||
public static func getDeleteUid(methodCall: FlutterMethodCall)->String{
|
||||
let result = getParamValue(methodCall: methodCall, param: KEY_DELETE_UID) as AnyObject
|
||||
let r = JsonUtil.toString(object: result)
|
||||
return r
|
||||
}
|
||||
|
||||
public static func getMessageText(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_TEXT) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getAtUserList(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_AT_USER_LIST) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getImagePath(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_IMAGE_PATH) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getSoundPath(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_SOUND_PATH) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getSoundDuration(methodCall: FlutterMethodCall)->Int64{
|
||||
let result: Int64 = getParamValue(methodCall: methodCall, param: KEY_SOUND_DURATION) as! Int64
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getVideoPath(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_VIDEO_PATH) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getVideoType(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_VIDEO_TYPE) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getVideoDuration(methodCall: FlutterMethodCall)->Int64{
|
||||
let result: Int64 = getParamValue(methodCall: methodCall, param: KEY_VIDEO_DURATION) as! Int64
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getVideoSnapshotPath(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_VIDEO_SNAPSHOT_PATH) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getFilePath(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_FILE_PATH) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getFileName(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_FILE_NAME) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getMergerMessageList(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_MERGER_MESSAGE_LIST) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getMergerMessageTitle(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_MERGER_MESSAGE_TITLE) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getSummaryList(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_SUMMARY_LIST) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getForwardMessage(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_FORWARD_MESSAGE) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getSendMessageContent(methodCall: FlutterMethodCall)->String{
|
||||
let result = getParamValue(methodCall: methodCall, param: KEY_SEND_MESSAGE_CONTENT)
|
||||
if result is NSDictionary && result != nil {
|
||||
return JsonUtil.toString(object: result as? NSDictionary)
|
||||
}
|
||||
return result as! String
|
||||
}
|
||||
|
||||
public static func getSendMessageClientMsgID(methodCall: FlutterMethodCall)->String{
|
||||
let r = getParamValue(methodCall: methodCall, param: KEY_SEND_MESSAGE_CONTENT) as! NSDictionary
|
||||
let result = r.value(forKey: KEY_SEND_MESSAGE_CONTENT_CLIENT_ID)
|
||||
return result as! String
|
||||
}
|
||||
|
||||
public static func getSendMessageReceiver(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_SEND_MESSAGE_RECEIVER) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getSendMessageGroupId(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_SEND_MESSAGE_GROUP_ID) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getSendMessageOnlineOnly(methodCall: FlutterMethodCall)->Bool{
|
||||
let result: Int = getParamValue(methodCall: methodCall, param: KEY_SEND_MESSAGE_ONLINE_ONLY) as! Int
|
||||
return (result != 0)
|
||||
}
|
||||
|
||||
public static func getSingleMessageContent(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_SINGLE_MESSAGE_CONTENT) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getSingleMessageUserid(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_SINGLE_MESSAGE_USERID) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getSingleMessageSender(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_SINGLE_MESSAGE_SENDER) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getFindMessageIds(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_FIND_MESSAGE_IDS) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getConversationId(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_CONVERSATION_ID) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getConversationIds(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_CONVERSATION_IDS) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getConversationDraft(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_CONVERSATION_DRAFT) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
public static func isPinnedConversation(methodCall: FlutterMethodCall)->Bool{
|
||||
let result: Int = getParamValue(methodCall: methodCall, param: KEY_SINGLE_MESSAGE_USERID) as! Int
|
||||
return (result != 0)
|
||||
}
|
||||
|
||||
public static func getSessionType(methodCall: FlutterMethodCall)->Int{
|
||||
let result: Int = getParamValue(methodCall: methodCall, param: KEY_CONVERSATION_SESSION) as! Int
|
||||
return result
|
||||
}
|
||||
|
||||
/**
|
||||
* group
|
||||
*/
|
||||
public static func getGroupId(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_GROUP_ID) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getGroupReason(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_GROUP_REASON) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getGroupUserList(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_GROUP_USERLIST) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getGroupFilter(methodCall: FlutterMethodCall)->Int32{
|
||||
let result: Int32 = getParamValue(methodCall: methodCall, param: KEY_GROUP_FILTER) as! Int32
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getGroupNext(methodCall: FlutterMethodCall)->Int32{
|
||||
let result: Int32 = getParamValue(methodCall: methodCall, param: KEY_GROUP_NEXT) as! Int32
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getGroupInfo(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_GROUP_INFO) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getGroupMemberList(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_GROUP_MEMBERLIST) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getGroupJsonInfo(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_GROUP_JSONINFO) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getGroupIdList(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_GROUP_IDLIST) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getGroupMessage(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_GROUP_MESSAGE) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getGroupUserId(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_USER_ID) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
public static func getGroupApplication(methodCall: FlutterMethodCall)->String{
|
||||
let result: String = getParamValue(methodCall: methodCall, param: KEY_GROUP_APPLICATION) as! String
|
||||
return result
|
||||
}
|
||||
|
||||
|
||||
//login
|
||||
private static let KEY_LOGIN_UID: String = "uid";
|
||||
private static let KEY_LOGIN_TOKEN: String = "token";
|
||||
//userinfo
|
||||
private static let KEY_UID_LIST: String = "uidList";
|
||||
private static let KEY_DELETE_UID: String = "deleteUid";
|
||||
//create message body
|
||||
private static let KEY_TEXT: String = "text";
|
||||
private static let KEY_AT_USER_LIST: String = "atUserList";
|
||||
private static let KEY_IMAGE_PATH: String = "imagePath";
|
||||
private static let KEY_SOUND_PATH: String = "soundPath";
|
||||
private static let KEY_SOUND_DURATION: String = "duration";
|
||||
private static let KEY_VIDEO_PATH: String = "videoPath";
|
||||
private static let KEY_VIDEO_TYPE: String = "videoType";
|
||||
private static let KEY_VIDEO_DURATION: String = "duration";
|
||||
private static let KEY_VIDEO_SNAPSHOT_PATH: String = "snapshotPath";
|
||||
private static let KEY_FILE_PATH: String = "filePath";
|
||||
private static let KEY_FILE_NAME: String = "fileName";
|
||||
private static let KEY_MERGER_MESSAGE_LIST: String = "messageList";
|
||||
private static let KEY_MERGER_MESSAGE_TITLE: String = "title";
|
||||
private static let KEY_SUMMARY_LIST: String = "summaryList";
|
||||
private static let KEY_FORWARD_MESSAGE: String = "message";
|
||||
//send message
|
||||
private static let KEY_SEND_MESSAGE_CONTENT: String = "message";
|
||||
private static let KEY_SEND_MESSAGE_CONTENT_CLIENT_ID: String = "clientMsgID";
|
||||
private static let KEY_SEND_MESSAGE_RECEIVER: String = "receiver";
|
||||
private static let KEY_SEND_MESSAGE_GROUP_ID: String = "groupID";
|
||||
private static let KEY_SEND_MESSAGE_ONLINE_ONLY: String = "onlineUserOnly";
|
||||
//single chat
|
||||
private static let KEY_SINGLE_MESSAGE_CONTENT: String = "message";
|
||||
private static let KEY_SINGLE_MESSAGE_USERID: String = "userID";
|
||||
private static let KEY_SINGLE_MESSAGE_SENDER: String = "sender";
|
||||
// find message
|
||||
private static let KEY_FIND_MESSAGE_IDS: String = "messageIDList";
|
||||
// conversation
|
||||
private static let KEY_CONVERSATION_ID: String = "conversationID";
|
||||
private static let KEY_CONVERSATION_IDS: String = "conversationIDList";
|
||||
private static let KEY_CONVERSATION_DRAFT: String = "draftText";
|
||||
private static let KEY_CONVERSATION_PINNED: String = "isPinned";
|
||||
private static let KEY_CONVERSATION_SESSION: String = "sessionType";
|
||||
|
||||
//group
|
||||
private static let KEY_GROUP_ID: String = "groupid";
|
||||
private static let KEY_GROUP_USERLIST: String = "userList";
|
||||
private static let KEY_GROUP_REASON: String = "reason";
|
||||
private static let KEY_GROUP_FILTER: String = "filter";
|
||||
private static let KEY_GROUP_NEXT: String = "next";
|
||||
private static let KEY_GROUP_INFO: String = "gInfo";
|
||||
private static let KEY_GROUP_MEMBERLIST: String = "memberList";
|
||||
private static let KEY_GROUP_JSONINFO: String = "jsonGroupInfo";
|
||||
private static let KEY_GROUP_IDLIST: String = "groupIdList";
|
||||
private static let KEY_GROUP_MESSAGE: String = "message";
|
||||
private static let KEY_USER_ID: String = "userId";
|
||||
private static let KEY_GROUP_APPLICATION: String = "application";
|
||||
}
|
27
ios/Classes/JsonUtil.swift
Normal file
27
ios/Classes/JsonUtil.swift
Normal file
@ -0,0 +1,27 @@
|
||||
//
|
||||
// JsonUtil.swift
|
||||
// Runner
|
||||
//
|
||||
// Created by z1u24 on 2021/6/28.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
public class JsonUtil {
|
||||
|
||||
public static func toString(object: AnyObject?)->String{
|
||||
if object == nil {
|
||||
return "";
|
||||
}
|
||||
if object is String{
|
||||
let s = object as! String
|
||||
let b = s.replacingOccurrences(of: "\"", with: "\\\"")
|
||||
let a = "\"\(b)\""
|
||||
return a
|
||||
}
|
||||
let data = try? JSONSerialization.data(withJSONObject: object!, options: JSONSerialization.WritingOptions.init(rawValue: 0))
|
||||
let jsonStr = NSString(data: data!, encoding: String.Encoding.utf8.rawValue)
|
||||
return jsonStr! as String
|
||||
}
|
||||
|
||||
}
|
88
ios/Classes/Module/ConversationManager.swift
Normal file
88
ios/Classes/Module/ConversationManager.swift
Normal file
@ -0,0 +1,88 @@
|
||||
//
|
||||
// ConversationManager.swift
|
||||
// Runner
|
||||
//
|
||||
// Created by z1u24 on 2021/6/29.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import OpenIMCore
|
||||
|
||||
public class ConversationManager:NSObject{
|
||||
private let channel:FlutterMethodChannel
|
||||
|
||||
init(channel:FlutterMethodChannel) {
|
||||
self.channel = channel
|
||||
}
|
||||
|
||||
func setConversationListener(methodCall: FlutterMethodCall, result: FlutterResult){
|
||||
Open_im_sdkSetConversationListener(ConversationListenerImpl(channel: channel))
|
||||
}
|
||||
|
||||
func getAllConversationList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkGetAllConversationList(BaseImpl(result: result))
|
||||
}
|
||||
|
||||
func getOneConversation(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkGetOneConversation(CommonUtil.getConversationId(methodCall: methodCall), CommonUtil.getSessionType(methodCall: methodCall), BaseImpl(result: result))
|
||||
}
|
||||
|
||||
func getMultipleConversation(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkGetMultipleConversation(CommonUtil.getConversationIds(methodCall: methodCall), BaseImpl(result: result))
|
||||
}
|
||||
|
||||
func deleteConversation(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkDeleteConversation(CommonUtil.getConversationId(methodCall: methodCall), BaseImpl(result: result))
|
||||
}
|
||||
|
||||
func setConversationDraft(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSetConversationDraft(CommonUtil.getConversationId(methodCall: methodCall), CommonUtil.getConversationDraft(methodCall: methodCall), BaseImpl(result: result))
|
||||
}
|
||||
|
||||
func pinConversation(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkPinConversation(CommonUtil.getConversationId(methodCall: methodCall), CommonUtil.isPinnedConversation(methodCall: methodCall), BaseImpl(result: result))
|
||||
}
|
||||
|
||||
func getTotalUnreadMsgCount(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkGetTotalUnreadMsgCount(BaseImpl(result: result))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class ConversationListenerImpl:NSObject,Open_im_sdkOnConversationListenerProtocol {
|
||||
|
||||
private let channel:FlutterMethodChannel
|
||||
|
||||
init(channel:FlutterMethodChannel) {
|
||||
self.channel = channel
|
||||
}
|
||||
|
||||
public func onConversationChanged(_ conversationList: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "conversationListener", type: "onConversationChanged", errCode: nil, errMsg: nil, data: conversationList)
|
||||
}
|
||||
|
||||
public func onNewConversation(_ conversationList: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "conversationListener", type: "onNewConversation", errCode: nil, errMsg: nil, data: conversationList)
|
||||
}
|
||||
|
||||
public func onSyncServerFailed() {
|
||||
CommonUtil.emitEvent(channel: channel, method: "conversationListener", type: "onSyncServerFailed", errCode: nil, errMsg: nil, data: nil)
|
||||
}
|
||||
|
||||
public func onSyncServerFinish() {
|
||||
CommonUtil.emitEvent(channel: channel, method: "conversationListener", type: "onSyncServerFinish", errCode: nil, errMsg: nil, data: nil)
|
||||
}
|
||||
|
||||
public func onSyncServerStart() {
|
||||
CommonUtil.emitEvent(channel: channel, method: "conversationListener", type: "onSyncServerStart", errCode: nil, errMsg: nil, data: nil)
|
||||
}
|
||||
|
||||
public func onTotalUnreadMessageCountChanged(_ totalUnreadCount: Int32) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "conversationListener", type: "onTotalUnreadMessageCountChanged", errCode: nil, errMsg: nil, data: totalUnreadCount)
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
126
ios/Classes/Module/FriendshipManager.swift
Normal file
126
ios/Classes/Module/FriendshipManager.swift
Normal file
@ -0,0 +1,126 @@
|
||||
//
|
||||
// FriendshipManager.swift
|
||||
// Runner
|
||||
//
|
||||
// Created by z1u24 on 2021/6/29.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import OpenIMCore
|
||||
|
||||
public class FriendshipManager:NSObject{
|
||||
private let channel:FlutterMethodChannel
|
||||
|
||||
init(channel:FlutterMethodChannel) {
|
||||
self.channel = channel
|
||||
}
|
||||
|
||||
func setFriendListener(methodCall: FlutterMethodCall, result: FlutterResult){
|
||||
Open_im_sdkSetFriendListener(FriendshipListenerImpl(channel: channel))
|
||||
}
|
||||
|
||||
func getFriendsInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkGetFriendsInfo(BaseImpl(result: result), CommonUtil.getUidList(methodCall: methodCall))
|
||||
}
|
||||
|
||||
func addFriend(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkAddFriend(BaseImpl(result: result), CommonUtil.getSDKJsonParam(methodCall: methodCall))
|
||||
}
|
||||
|
||||
func getFriendApplicationList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkGetFriendApplicationList(BaseImpl(result: result))
|
||||
}
|
||||
|
||||
func getFriendList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkGetFriendList(BaseImpl(result: result))
|
||||
}
|
||||
|
||||
func setFriendInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSetFriendInfo(CommonUtil.getSDKJsonParam(methodCall: methodCall), BaseImpl(result: result))
|
||||
}
|
||||
|
||||
func addToBlackList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkAddToBlackList(BaseImpl(result: result), CommonUtil.getUserUid(methodCall: methodCall))
|
||||
}
|
||||
|
||||
func getBlackList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkGetBlackList(BaseImpl(result: result))
|
||||
}
|
||||
|
||||
func deleteFromBlackList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkDeleteFromBlackList(BaseImpl(result: result), CommonUtil.getUserUid(methodCall: methodCall))
|
||||
}
|
||||
|
||||
func checkFriend(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkCheckFriend(BaseImpl(result: result), CommonUtil.getUidList(methodCall: methodCall))
|
||||
}
|
||||
|
||||
func deleteFromFriendList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkDeleteFromFriendList(CommonUtil.getDeleteUid(methodCall: methodCall), BaseImpl(result: result))
|
||||
}
|
||||
|
||||
func acceptFriendApplication(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkAcceptFriendApplication(BaseImpl(result: result), CommonUtil.getUid(methodCall: methodCall))
|
||||
}
|
||||
|
||||
func refuseFriendApplication(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkRefuseFriendApplication(BaseImpl(result: result), CommonUtil.getUid(methodCall: methodCall))
|
||||
}
|
||||
|
||||
func forceSyncFriendApplication(methodCall: FlutterMethodCall, result: FlutterResult){
|
||||
Open_im_sdkForceSyncFriendApplication();
|
||||
}
|
||||
|
||||
func forceSyncFriend(methodCall: FlutterMethodCall, result: FlutterResult){
|
||||
Open_im_sdkForceSyncFriend()
|
||||
}
|
||||
|
||||
func forceSyncBlackList(methodCall: FlutterMethodCall, result: FlutterResult){
|
||||
Open_im_sdkForceSyncBlackList()
|
||||
}
|
||||
}
|
||||
|
||||
public class FriendshipListenerImpl:NSObject,Open_im_sdkOnFriendshipListenerProtocol {
|
||||
private let channel:FlutterMethodChannel
|
||||
|
||||
init(channel:FlutterMethodChannel) {
|
||||
self.channel = channel
|
||||
}
|
||||
|
||||
public func onBlackListAdd(_ userInfo: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onBlackListAdd", errCode: nil, errMsg: nil, data: userInfo)
|
||||
}
|
||||
|
||||
public func onBlackListDeleted(_ userInfo: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onBlackListDeleted", errCode: nil, errMsg: nil, data: userInfo)
|
||||
}
|
||||
|
||||
public func onFriendApplicationListAccept(_ applyUserInfo: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onFriendApplicationListAccept", errCode: nil, errMsg: nil, data: applyUserInfo)
|
||||
}
|
||||
|
||||
public func onFriendApplicationListAdded(_ applyUserInfo: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onFriendApplicationListAdded", errCode: nil, errMsg: nil, data: applyUserInfo)
|
||||
}
|
||||
|
||||
public func onFriendApplicationListDeleted(_ applyUserInfo: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onFriendApplicationListDeleted", errCode: nil, errMsg: nil, data: applyUserInfo)
|
||||
}
|
||||
|
||||
public func onFriendApplicationListReject(_ applyUserInfo: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onFriendApplicationListReject", errCode: nil, errMsg: nil, data: applyUserInfo)
|
||||
}
|
||||
|
||||
public func onFriendInfoChanged(_ friendInfo: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onFriendInfoChanged", errCode: nil, errMsg: nil, data: friendInfo)
|
||||
}
|
||||
|
||||
public func onFriendListAdded(_ friendInfo: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onFriendListAdded", errCode: nil, errMsg: nil, data: friendInfo)
|
||||
}
|
||||
|
||||
public func onFriendListDeleted(_ friendInfo: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onFriendListDeleted", errCode: nil, errMsg: nil, data: friendInfo)
|
||||
}
|
||||
|
||||
}
|
74
ios/Classes/Module/GroupManager.swift
Normal file
74
ios/Classes/Module/GroupManager.swift
Normal file
@ -0,0 +1,74 @@
|
||||
//
|
||||
// GroupManager.swift
|
||||
// flutter_openim_sdk
|
||||
//
|
||||
// Created by z1u24 on 2021/7/5.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import OpenIMCore
|
||||
|
||||
public class GroupManager:NSObject{
|
||||
private let channel:FlutterMethodChannel
|
||||
|
||||
init(channel:FlutterMethodChannel) {
|
||||
self.channel = channel
|
||||
}
|
||||
|
||||
func inviteUserToGroup(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkInviteUserToGroup(CommonUtil.getGroupId(methodCall: methodCall), CommonUtil.getGroupReason(methodCall: methodCall), CommonUtil.getGroupUserList(methodCall: methodCall), BaseImpl(result: result))
|
||||
}
|
||||
|
||||
func kickGroupMember(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkKickGroupMember(CommonUtil.getGroupId(methodCall: methodCall), CommonUtil.getGroupUserList(methodCall: methodCall), CommonUtil.getGroupReason(methodCall: methodCall), BaseImpl(result: result))
|
||||
}
|
||||
|
||||
func getGroupMembersInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkGetGroupMembersInfo(CommonUtil.getGroupId(methodCall: methodCall), CommonUtil.getGroupUserList(methodCall: methodCall), BaseImpl(result: result))
|
||||
}
|
||||
|
||||
func getGroupMemberList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkGetGroupMemberList(CommonUtil.getGroupId(methodCall: methodCall), CommonUtil.getGroupFilter(methodCall: methodCall), CommonUtil.getGroupNext(methodCall: methodCall), BaseImpl(result: result))
|
||||
}
|
||||
|
||||
func getJoinedGroupList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkGetJoinedGroupList(BaseImpl(result: result))
|
||||
}
|
||||
|
||||
func createGroup(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkCreateGroup(CommonUtil.getGroupInfo(methodCall: methodCall), CommonUtil.getGroupMemberList(methodCall: methodCall), BaseImpl(result: result))
|
||||
}
|
||||
|
||||
func setGroupInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSetGroupInfo(CommonUtil.getGroupJsonInfo(methodCall: methodCall), BaseImpl(result: result))
|
||||
}
|
||||
|
||||
func getGroupsInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkGetGroupsInfo(CommonUtil.getGroupIdList(methodCall: methodCall), BaseImpl(result: result))
|
||||
}
|
||||
|
||||
func joinGroup(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkJoinGroup(CommonUtil.getGroupId(methodCall: methodCall), CommonUtil.getGroupMessage(methodCall: methodCall), BaseImpl(result: result))
|
||||
}
|
||||
|
||||
func quitGroup(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkQuitGroup(CommonUtil.getGroupId(methodCall: methodCall), BaseImpl(result: result))
|
||||
}
|
||||
|
||||
func transferGroupOwner(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkTransferGroupOwner(CommonUtil.getGroupId(methodCall: methodCall), CommonUtil.getGroupUserId(methodCall: methodCall), BaseImpl(result: result))
|
||||
}
|
||||
|
||||
func getGroupApplicationList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkGetGroupApplicationList(BaseImpl(result: result))
|
||||
}
|
||||
|
||||
func acceptGroupApplication(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkAcceptGroupApplication(CommonUtil.getGroupApplication(methodCall: methodCall), CommonUtil.getGroupReason(methodCall: methodCall), BaseImpl(result: result))
|
||||
}
|
||||
|
||||
func refuseGroupApplication(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkRefuseGroupApplication(CommonUtil.getGroupApplication(methodCall: methodCall), CommonUtil.getGroupReason(methodCall: methodCall), BaseImpl(result: result))
|
||||
}
|
||||
|
||||
}
|
101
ios/Classes/Module/IMManager.swift
Normal file
101
ios/Classes/Module/IMManager.swift
Normal file
@ -0,0 +1,101 @@
|
||||
//
|
||||
// IMManager.swift
|
||||
// Runner
|
||||
//
|
||||
// Created by z1u24 on 2021/6/28.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import OpenIMCore
|
||||
|
||||
public class IMMananger:NSObject{
|
||||
|
||||
private let channel:FlutterMethodChannel
|
||||
|
||||
init(channel:FlutterMethodChannel) {
|
||||
self.channel = channel
|
||||
}
|
||||
|
||||
func initSDK(methodCall: FlutterMethodCall, result: FlutterResult){
|
||||
Open_im_sdkInitSDK(CommonUtil.getSDKJsonParam(methodCall: methodCall), SDKListenerImpl(channel: self.channel))
|
||||
}
|
||||
|
||||
func login(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkLogin(CommonUtil.getUid(methodCall: methodCall), CommonUtil.getToken(methodCall: methodCall), BaseImpl(result: result))
|
||||
}
|
||||
|
||||
func logout(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkLogout(BaseImpl(result: result))
|
||||
}
|
||||
|
||||
func getLoginStatus(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
DispatchQueue.main.async { result(Open_im_sdkGetLoginStatus()) }
|
||||
}
|
||||
|
||||
func getLoginUid(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
DispatchQueue.main.async { result(Open_im_sdkGetLoginUser()) }
|
||||
}
|
||||
|
||||
func getUsersInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkGetUsersInfo(CommonUtil.getUidList(methodCall: methodCall), BaseImpl(result: result))
|
||||
}
|
||||
|
||||
func setSelfInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkSetSelfInfo(CommonUtil.getSDKJsonParam(methodCall: methodCall), BaseImpl(result: result))
|
||||
}
|
||||
|
||||
func forceSyncLoginUerInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkForceSyncLoginUerInfo()
|
||||
}
|
||||
}
|
||||
|
||||
public class SDKListenerImpl:NSObject,Open_im_sdkIMSDKListenerProtocol {
|
||||
private let channel:FlutterMethodChannel
|
||||
|
||||
init(channel:FlutterMethodChannel) {
|
||||
self.channel = channel
|
||||
}
|
||||
|
||||
public func onConnectFailed(_ errCode: Int, errMsg: String?) {
|
||||
CommonUtil.emitEvent(channel: self.channel, method: "initSDKListener", type: "onConnectFailed", errCode: errCode, errMsg: errMsg, data: nil)
|
||||
}
|
||||
|
||||
public func onConnectSuccess() {
|
||||
CommonUtil.emitEvent(channel: self.channel, method: "initSDKListener", type: "onConnectSuccess", errCode: nil, errMsg: nil, data: nil);
|
||||
}
|
||||
|
||||
public func onConnecting() {
|
||||
CommonUtil.emitEvent(channel: self.channel, method: "initSDKListener", type: "onConnecting", errCode: nil, errMsg: nil, data: nil);
|
||||
}
|
||||
|
||||
public func onKickedOffline() {
|
||||
CommonUtil.emitEvent(channel: self.channel, method: "initSDKListener", type: "onKickedOffline", errCode: nil, errMsg: nil, data: nil);
|
||||
}
|
||||
|
||||
public func onSelfInfoUpdated(_ userInfo: String?) {
|
||||
CommonUtil.emitEvent(channel: self.channel, method: "initSDKListener", type: "onSelfInfoUpdated", errCode: nil, errMsg: nil, data: userInfo);
|
||||
}
|
||||
|
||||
public func onUserTokenExpired() {
|
||||
CommonUtil.emitEvent(channel: self.channel, method: "initSDKListener", type: "onUserTokenExpired", errCode: nil, errMsg: nil, data: nil);
|
||||
}
|
||||
}
|
||||
|
||||
public class BaseImpl:NSObject,Open_im_sdkBaseProtocol {
|
||||
|
||||
private let result:FlutterResult
|
||||
|
||||
init(result:@escaping FlutterResult) {
|
||||
self.result = result
|
||||
}
|
||||
|
||||
public func onError(_ errCode: Int, errMsg: String?) {
|
||||
print("BaseImpl: " + errMsg!)
|
||||
DispatchQueue.main.async { self.result(FlutterError(code: "\(errCode)", message: errMsg, details: nil)) }
|
||||
}
|
||||
|
||||
public func onSuccess(_ data: String?) {
|
||||
DispatchQueue.main.async { self.result(data) }
|
||||
}
|
||||
|
||||
}
|
187
ios/Classes/Module/MessageManager.swift
Normal file
187
ios/Classes/Module/MessageManager.swift
Normal file
@ -0,0 +1,187 @@
|
||||
//
|
||||
// MessageManager.swift
|
||||
// Runner
|
||||
//
|
||||
// Created by z1u24 on 2021/6/29.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import OpenIMCore
|
||||
|
||||
public class MessageManager:NSObject{
|
||||
private let KEY_ID: String = "id"
|
||||
private let channel:FlutterMethodChannel
|
||||
private let listeners: NSMutableDictionary = NSMutableDictionary(capacity: 0)
|
||||
private var sendMsgProgressListener: SendMsgProgressListener?
|
||||
|
||||
init(channel:FlutterMethodChannel) {
|
||||
self.channel = channel
|
||||
}
|
||||
|
||||
func addAdvancedMsgListener(methodCall: FlutterMethodCall, result: FlutterResult){
|
||||
if sendMsgProgressListener == nil {
|
||||
sendMsgProgressListener = SendMsgProgressListener(channel: channel)
|
||||
}
|
||||
let d = methodCall.arguments as! NSDictionary
|
||||
let key = d.value(forKey: KEY_ID) as! String
|
||||
if !listeners.allKeys.contains(where: {($0 as! String).compare(key) == .orderedSame}) {
|
||||
let lis = AdvancedMsgListenerImpl(channel: channel, id: key)
|
||||
let k = methodCall.arguments as! NSDictionary
|
||||
let s = k.value(forKey: KEY_ID) as! String
|
||||
listeners.setValue(lis, forKey: s)
|
||||
Open_im_sdkAddAdvancedMsgListener(lis)
|
||||
print("=================add msg listener======\n\(lis)");
|
||||
}
|
||||
}
|
||||
|
||||
func removeAdvancedMsgListener(methodCall: FlutterMethodCall, result: FlutterResult){
|
||||
let k = methodCall.arguments as! NSDictionary
|
||||
let s = k.value(forKey: KEY_ID) as! String
|
||||
if listeners.allKeys.contains(where: {($0 as! String).compare(s) == .orderedSame}) {
|
||||
let lis = listeners.value(forKey: s) as! AdvancedMsgListenerImpl
|
||||
listeners.removeObject(forKey: s)
|
||||
Open_im_sdkRemoveAdvancedMsgListener(lis)
|
||||
}
|
||||
}
|
||||
|
||||
func sendMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
sendMsgProgressListener?.setCall(methodCall: methodCall)
|
||||
sendMsgProgressListener?.setResult(result: result)
|
||||
print("===============sendMessage===============")
|
||||
Open_im_sdkSendMessage(sendMsgProgressListener, CommonUtil.getSendMessageContent(methodCall: methodCall), CommonUtil.getSendMessageReceiver(methodCall: methodCall), CommonUtil.getSendMessageGroupId(methodCall: methodCall), CommonUtil.getSendMessageOnlineOnly(methodCall: methodCall))
|
||||
}
|
||||
|
||||
func getHistoryMessageList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkGetHistoryMessageList(BaseImpl(result: result), CommonUtil.getSDKJsonParam(methodCall: methodCall))
|
||||
}
|
||||
|
||||
func revokeMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkRevokeMessage(BaseImpl(result: result), CommonUtil.getSDKJsonParam(methodCall: methodCall))
|
||||
}
|
||||
|
||||
func deleteMessageFromLocalStorage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkDeleteMessageFromLocalStorage(BaseImpl(result: result), CommonUtil.getSDKJsonParam(methodCall: methodCall))
|
||||
}
|
||||
|
||||
func deleteMessages(methodCall: FlutterMethodCall, result: FlutterResult){
|
||||
|
||||
}
|
||||
|
||||
func insertSingleMessageToLocalStorage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkInsertSingleMessageToLocalStorage(BaseImpl(result: result), CommonUtil.getSingleMessageContent(methodCall: methodCall), CommonUtil.getSingleMessageUserid(methodCall: methodCall), CommonUtil.getSingleMessageSender(methodCall: methodCall))
|
||||
}
|
||||
|
||||
func findMessages(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkFindMessages(BaseImpl(result: result), CommonUtil.getFindMessageIds(methodCall: methodCall))
|
||||
}
|
||||
|
||||
func markSingleMessageHasRead(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkMarkSingleMessageHasRead(BaseImpl(result: result), CommonUtil.getSingleMessageUserid(methodCall: methodCall))
|
||||
}
|
||||
|
||||
func createTextMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
let prama = Open_im_sdkCreateTextMessage(CommonUtil.getMessageText(methodCall: methodCall))
|
||||
DispatchQueue.main.async { result(prama) }
|
||||
}
|
||||
|
||||
func createTextAtMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
let prama = Open_im_sdkCreateTextAtMessage(CommonUtil.getMessageText(methodCall: methodCall), CommonUtil.getAtUserList(methodCall: methodCall))
|
||||
DispatchQueue.main.async { result(prama) }
|
||||
}
|
||||
|
||||
func createImageMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
let prama = Open_im_sdkCreateImageMessage(CommonUtil.getImagePath(methodCall: methodCall))
|
||||
DispatchQueue.main.async { result(prama) }
|
||||
}
|
||||
|
||||
func createSoundMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
let prama = Open_im_sdkCreateSoundMessage(CommonUtil.getSoundPath(methodCall: methodCall),CommonUtil.getSoundDuration(methodCall: methodCall))
|
||||
DispatchQueue.main.async { result(prama) }
|
||||
}
|
||||
|
||||
func createVideoMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
let prama = Open_im_sdkCreateVideoMessage(CommonUtil.getVideoPath(methodCall: methodCall), CommonUtil.getVideoType(methodCall: methodCall), CommonUtil.getVideoDuration(methodCall: methodCall), CommonUtil.getVideoSnapshotPath(methodCall: methodCall))
|
||||
DispatchQueue.main.async { result(prama) }
|
||||
}
|
||||
|
||||
func createFileMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
let prama = Open_im_sdkCreateFileMessage(CommonUtil.getFilePath(methodCall: methodCall), CommonUtil.getFileName(methodCall: methodCall))
|
||||
DispatchQueue.main.async { result(prama) }
|
||||
}
|
||||
|
||||
func createMergerMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
let prama = Open_im_sdkCreateMergerMessage(CommonUtil.getMergerMessageList(methodCall: methodCall), CommonUtil.getMergerMessageTitle(methodCall: methodCall), CommonUtil.getSummaryList(methodCall: methodCall))
|
||||
DispatchQueue.main.async { result(prama) }
|
||||
}
|
||||
|
||||
func createForwardMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
let prama = Open_im_sdkCreateForwardMessage(CommonUtil.getForwardMessage(methodCall: methodCall))
|
||||
DispatchQueue.main.async { result(prama) }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class SendMsgProgressListener:NSObject, Open_im_sdkSendMsgCallBackProtocol {
|
||||
|
||||
private let channel: FlutterMethodChannel
|
||||
private var result: FlutterResult?
|
||||
private var call: FlutterMethodCall?
|
||||
private let values: NSMutableDictionary = NSMutableDictionary(capacity: 0)
|
||||
|
||||
init(channel: FlutterMethodChannel) {
|
||||
self.channel = channel
|
||||
}
|
||||
|
||||
func setResult(result: @escaping FlutterResult){
|
||||
self.result = result
|
||||
}
|
||||
|
||||
func setCall(methodCall: FlutterMethodCall){
|
||||
self.call = methodCall
|
||||
}
|
||||
|
||||
public func onError(_ errCode: Int, errMsg: String?) {
|
||||
print("=================onError============\nerrcode:\(errCode),errMsg:\(errMsg!)");
|
||||
DispatchQueue.main.async { self.result!(FlutterError(code: "\(errCode)", message: errMsg, details: nil)) }
|
||||
}
|
||||
|
||||
public func onProgress(_ progress: Int) {
|
||||
print("=================onProgress============\nprogress:\(progress)");
|
||||
values.setValue(CommonUtil.getSendMessageClientMsgID(methodCall: self.call!), forKey: "clientMsgID")
|
||||
values.setValue(progress, forKey: "progress")
|
||||
CommonUtil.emitEvent(channel: channel, method: "messageProgressListener", type: "onProgress", errCode: nil, errMsg: nil, data: values)
|
||||
}
|
||||
|
||||
public func onSuccess(_ data: String?) {
|
||||
print("=================onSuccess============\nsuccess:\(data!)");
|
||||
DispatchQueue.main.async { self.result!(data) }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class AdvancedMsgListenerImpl: NSObject, Open_im_sdkOnAdvancedMsgListenerProtocol {
|
||||
private let channel: FlutterMethodChannel
|
||||
private let values: NSMutableDictionary = NSMutableDictionary(capacity: 0)
|
||||
|
||||
init(channel: FlutterMethodChannel, id: String) {
|
||||
self.channel = channel
|
||||
values.setValue(id, forKey: "id")
|
||||
}
|
||||
|
||||
public func onRecvC2CReadReceipt(_ msgReceiptList: String?) {
|
||||
values.setValue(msgReceiptList, forKey: "message")
|
||||
CommonUtil.emitEvent(channel: channel, method: "advancedMsgListener", type: "onRecvC2CReadReceipt", errCode: nil, errMsg: nil, data: values)
|
||||
}
|
||||
|
||||
public func onRecvMessageRevoked(_ msgId: String?) {
|
||||
values.setValue(msgId, forKey: "message")
|
||||
CommonUtil.emitEvent(channel: channel, method: "advancedMsgListener", type: "onRecvMessageRevoked", errCode: nil, errMsg: nil, data: values)
|
||||
}
|
||||
|
||||
public func onRecvNewMessage(_ message: String?) {
|
||||
values.setValue(message, forKey: "message")
|
||||
CommonUtil.emitEvent(channel: channel, method: "advancedMsgListener", type: "onRecvNewMessage", errCode: nil, errMsg: nil, data: values)
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -2,13 +2,205 @@ import Flutter
|
||||
import UIKit
|
||||
|
||||
public class SwiftFlutterOpenimSdkPlugin: NSObject, FlutterPlugin {
|
||||
|
||||
let imManager: IMMananger
|
||||
let conversationManager: ConversationManager
|
||||
let friendshipManager: FriendshipManager
|
||||
let messageManager: MessageManager
|
||||
let groupManager: GroupManager
|
||||
|
||||
init(channel: FlutterMethodChannel) {
|
||||
self.imManager = IMMananger(channel: channel)
|
||||
self.conversationManager = ConversationManager(channel: channel)
|
||||
self.friendshipManager = FriendshipManager(channel: channel)
|
||||
self.messageManager = MessageManager(channel: channel)
|
||||
self.groupManager = GroupManager(channel: channel)
|
||||
}
|
||||
|
||||
public static func register(with registrar: FlutterPluginRegistrar) {
|
||||
let channel = FlutterMethodChannel(name: "flutter_openim_sdk", binaryMessenger: registrar.messenger())
|
||||
let instance = SwiftFlutterOpenimSdkPlugin()
|
||||
let instance = SwiftFlutterOpenimSdkPlugin(channel: channel)
|
||||
registrar.addMethodCallDelegate(instance, channel: channel)
|
||||
}
|
||||
|
||||
public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
result("iOS " + UIDevice.current.systemVersion)
|
||||
let managerName: String = CommonUtil.getParamValue(methodCall: call, param: "ManagerName") as! String
|
||||
if managerName == "imManager" {
|
||||
handleIMManager(call: call, result: result)
|
||||
}else if managerName == "conversationManager"{
|
||||
handleConversationManager(call: call, result: result)
|
||||
}else if managerName == "friendshipManager"{
|
||||
handleFriendshipManager(call: call, result: result)
|
||||
}else if managerName == "messageManager"{
|
||||
handleMessageManager(call: call, result: result)
|
||||
}else if managerName == "groupManager"{
|
||||
handleGroupManager(call: call, result: result)
|
||||
}else{
|
||||
print("Handle ManagerName Error: \(managerName) not found")
|
||||
}
|
||||
}
|
||||
|
||||
private func handleIMManager(call: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
let method: String = call.method
|
||||
if method == "initSDK" {
|
||||
imManager.initSDK(methodCall: call, result: result)
|
||||
}else if method == "login" {
|
||||
imManager.login(methodCall: call, result: result)
|
||||
}else if method == "logout" {
|
||||
imManager.logout(methodCall: call, result: result)
|
||||
}else if method == "getLoginStatus" {
|
||||
imManager.getLoginStatus(methodCall: call, result: result)
|
||||
}else if method == "getLoginUid" {
|
||||
imManager.getLoginUid(methodCall: call, result: result)
|
||||
}else if method == "getUsersInfo" {
|
||||
imManager.getUsersInfo(methodCall: call, result: result)
|
||||
}else if method == "setSelfInfo" {
|
||||
imManager.setSelfInfo(methodCall: call, result: result)
|
||||
}else if method == "forceSyncLoginUerInfo" {
|
||||
imManager.forceSyncLoginUerInfo(methodCall: call, result: result)
|
||||
}else{
|
||||
print("Handle MethodName Error: IMManager method: \(method) not found")
|
||||
}
|
||||
}
|
||||
|
||||
private func handleConversationManager(call: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
let method: String = call.method
|
||||
if method == "setConversationListener" {
|
||||
conversationManager.setConversationListener(methodCall: call, result: result)
|
||||
}else if method == "getAllConversationList" {
|
||||
conversationManager.getAllConversationList(methodCall: call, result: result)
|
||||
}else if method == "getOneConversation" {
|
||||
conversationManager.getOneConversation(methodCall: call, result: result)
|
||||
}else if method == "getMultipleConversation" {
|
||||
conversationManager.getMultipleConversation(methodCall: call, result: result)
|
||||
}else if method == "deleteConversation" {
|
||||
conversationManager.deleteConversation(methodCall: call, result: result)
|
||||
}else if method == "setConversationDraft" {
|
||||
conversationManager.setConversationDraft(methodCall: call, result: result)
|
||||
}else if method == "pinConversation" {
|
||||
conversationManager.pinConversation(methodCall: call, result: result)
|
||||
}else if method == "getTotalUnreadMsgCount" {
|
||||
conversationManager.getTotalUnreadMsgCount(methodCall: call, result: result)
|
||||
}else{
|
||||
print("Handle MethodName Error: ConversationManager method: \(method) not found")
|
||||
}
|
||||
}
|
||||
|
||||
private func handleFriendshipManager(call: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
let method: String = call.method
|
||||
if method == "setFriendListener" {
|
||||
friendshipManager.setFriendListener(methodCall: call, result: result)
|
||||
}else if method == "getFriendsInfo" {
|
||||
friendshipManager.getFriendsInfo(methodCall: call, result: result)
|
||||
}else if method == "addFriend" {
|
||||
friendshipManager.addFriend(methodCall: call, result: result)
|
||||
}else if method == "getFriendApplicationList" {
|
||||
friendshipManager.getFriendApplicationList(methodCall: call, result: result)
|
||||
}else if method == "getFriendList" {
|
||||
friendshipManager.getFriendList(methodCall: call, result: result)
|
||||
}else if method == "setFriendInfo" {
|
||||
friendshipManager.setFriendInfo(methodCall: call, result: result)
|
||||
}else if method == "addToBlackList" {
|
||||
friendshipManager.addToBlackList(methodCall: call, result: result)
|
||||
}else if method == "getBlackList" {
|
||||
friendshipManager.getBlackList(methodCall: call, result: result)
|
||||
}else if method == "deleteFromBlackList" {
|
||||
friendshipManager.deleteFromBlackList(methodCall: call, result: result)
|
||||
}else if method == "checkFriend" {
|
||||
friendshipManager.checkFriend(methodCall: call, result: result)
|
||||
}else if method == "deleteFromFriendList" {
|
||||
friendshipManager.deleteFromFriendList(methodCall: call, result: result)
|
||||
}else if method == "acceptFriendApplication" {
|
||||
friendshipManager.acceptFriendApplication(methodCall: call, result: result)
|
||||
}else if method == "refuseFriendApplication" {
|
||||
friendshipManager.refuseFriendApplication(methodCall: call, result: result)
|
||||
}else if method == "forceSyncFriendApplication" {
|
||||
friendshipManager.forceSyncFriendApplication(methodCall: call, result: result)
|
||||
}else if method == "forceSyncFriend" {
|
||||
friendshipManager.forceSyncFriend(methodCall: call, result: result)
|
||||
}else if method == "forceSyncBlackList" {
|
||||
friendshipManager.forceSyncBlackList(methodCall: call, result: result)
|
||||
}else{
|
||||
print("Handle MethodName Error: FriendshipManager method: \(method) not found")
|
||||
}
|
||||
}
|
||||
|
||||
private func handleMessageManager(call: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
let method: String = call.method
|
||||
if method == "addAdvancedMsgListener" {
|
||||
messageManager.addAdvancedMsgListener(methodCall: call, result: result)
|
||||
}else if method == "removeAdvancedMsgListener" {
|
||||
messageManager.removeAdvancedMsgListener(methodCall: call, result: result)
|
||||
}else if method == "sendMessage" {
|
||||
messageManager.sendMessage(methodCall: call, result: result)
|
||||
}else if method == "getHistoryMessageList" {
|
||||
messageManager.getHistoryMessageList(methodCall: call, result: result)
|
||||
}else if method == "revokeMessage" {
|
||||
messageManager.revokeMessage(methodCall: call, result: result)
|
||||
}else if method == "deleteMessageFromLocalStorage" {
|
||||
messageManager.deleteMessageFromLocalStorage(methodCall: call, result: result)
|
||||
}else if method == "deleteMessages" {
|
||||
messageManager.deleteMessages(methodCall: call, result: result)
|
||||
}else if method == "insertSingleMessageToLocalStorage" {
|
||||
messageManager.insertSingleMessageToLocalStorage(methodCall: call, result: result)
|
||||
}else if method == "findMessages" {
|
||||
messageManager.findMessages(methodCall: call, result: result)
|
||||
}else if method == "markSingleMessageHasRead" {
|
||||
messageManager.markSingleMessageHasRead(methodCall: call, result: result)
|
||||
}else if method == "createTextMessage" {
|
||||
messageManager.createTextMessage(methodCall: call, result: result)
|
||||
}else if method == "createTextAtMessage" {
|
||||
messageManager.createTextAtMessage(methodCall: call, result: result)
|
||||
}else if method == "createImageMessage" {
|
||||
messageManager.createImageMessage(methodCall: call, result: result)
|
||||
}else if method == "createSoundMessage" {
|
||||
messageManager.createSoundMessage(methodCall: call, result: result)
|
||||
}else if method == "createVideoMessage" {
|
||||
messageManager.createVideoMessage(methodCall: call, result: result)
|
||||
}else if method == "createFileMessage" {
|
||||
messageManager.createFileMessage(methodCall: call, result: result)
|
||||
}else if method == "createMergerMessage" {
|
||||
messageManager.createMergerMessage(methodCall: call, result: result)
|
||||
}else if method == "createForwardMessage" {
|
||||
messageManager.createForwardMessage(methodCall: call, result: result)
|
||||
}else{
|
||||
print("Handle MethodName Error: MessageManager method: \(method) not found")
|
||||
}
|
||||
}
|
||||
|
||||
private func handleGroupManager(call: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
let method: String = call.method
|
||||
if method == "inviteUserToGroup" {
|
||||
groupManager.inviteUserToGroup(methodCall: call, result: result)
|
||||
}else if method == "kickGroupMember" {
|
||||
groupManager.kickGroupMember(methodCall: call, result: result)
|
||||
}else if method == "getGroupMembersInfo" {
|
||||
groupManager.getGroupMembersInfo(methodCall: call, result: result)
|
||||
}else if method == "getGroupMemberList" {
|
||||
groupManager.getGroupMemberList(methodCall: call, result: result)
|
||||
}else if method == "getJoinedGroupList" {
|
||||
groupManager.getJoinedGroupList(methodCall: call, result: result)
|
||||
}else if method == "createGroup" {
|
||||
groupManager.createGroup(methodCall: call, result: result)
|
||||
}else if method == "setGroupInfo" {
|
||||
groupManager.setGroupInfo(methodCall: call, result: result)
|
||||
}else if method == "getGroupsInfo" {
|
||||
groupManager.getGroupsInfo(methodCall: call, result: result)
|
||||
}else if method == "joinGroup" {
|
||||
groupManager.joinGroup(methodCall: call, result: result)
|
||||
}else if method == "quitGroup" {
|
||||
groupManager.quitGroup(methodCall: call, result: result)
|
||||
}else if method == "transferGroupOwner" {
|
||||
groupManager.transferGroupOwner(methodCall: call, result: result)
|
||||
}else if method == "getGroupApplicationList" {
|
||||
groupManager.getGroupApplicationList(methodCall: call, result: result)
|
||||
}else if method == "acceptGroupApplication" {
|
||||
groupManager.acceptGroupApplication(methodCall: call, result: result)
|
||||
}else if method == "refuseGroupApplication" {
|
||||
groupManager.refuseGroupApplication(methodCall: call, result: result)
|
||||
}else{
|
||||
print("Handle MethodName Error: MessageManager method: \(method) not found")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
13
ios/Framework/OpenIMCore.framework/Headers/OpenIMCore.h
Normal file
13
ios/Framework/OpenIMCore.framework/Headers/OpenIMCore.h
Normal file
@ -0,0 +1,13 @@
|
||||
|
||||
// Objective-C API for talking to the following Go packages
|
||||
//
|
||||
// open_im_sdk/open_im_sdk
|
||||
//
|
||||
// File is generated by gomobile bind. Do not edit.
|
||||
#ifndef __OpenIMCore_FRAMEWORK_H__
|
||||
#define __OpenIMCore_FRAMEWORK_H__
|
||||
|
||||
#include "Open_im_sdk.objc.h"
|
||||
#include "Universe.objc.h"
|
||||
|
||||
#endif
|
882
ios/Framework/OpenIMCore.framework/Headers/Open_im_sdk.objc.h
Normal file
882
ios/Framework/OpenIMCore.framework/Headers/Open_im_sdk.objc.h
Normal file
@ -0,0 +1,882 @@
|
||||
// Objective-C API for talking to open_im_sdk/open_im_sdk Go package.
|
||||
// gobind -lang=objc open_im_sdk/open_im_sdk
|
||||
//
|
||||
// File is generated by gobind. Do not edit.
|
||||
|
||||
#ifndef __Open_im_sdk_H__
|
||||
#define __Open_im_sdk_H__
|
||||
|
||||
@import Foundation;
|
||||
#include "ref.h"
|
||||
#include "Universe.objc.h"
|
||||
|
||||
|
||||
@class Open_im_sdkAgreeOrRejectGroupMember;
|
||||
@class Open_im_sdkArrMsg;
|
||||
@class Open_im_sdkChatLog;
|
||||
@class Open_im_sdkConversationListener;
|
||||
@class Open_im_sdkConversationStruct;
|
||||
@class Open_im_sdkFriend;
|
||||
@class Open_im_sdkGroupApplicationResponseReq;
|
||||
@class Open_im_sdkGroupReqListInfo;
|
||||
@class Open_im_sdkIMConfig;
|
||||
@class Open_im_sdkIMManager;
|
||||
@class Open_im_sdkInviteUserToGroupReq;
|
||||
@class Open_im_sdkKickGroupMemberReq;
|
||||
@class Open_im_sdkLogInfo;
|
||||
@class Open_im_sdkMessageReceipt;
|
||||
@class Open_im_sdkMsg;
|
||||
@class Open_im_sdkMsgData;
|
||||
@class Open_im_sdkMsgStruct;
|
||||
@class Open_im_sdkPictureBaseInfo;
|
||||
@class Open_im_sdkPullMsgReq;
|
||||
@class Open_im_sdkPullUserMsgResp;
|
||||
@class Open_im_sdkSendMsgRespFromServer;
|
||||
@class Open_im_sdkSoundElem;
|
||||
@class Open_im_sdkTransferGroupOwnerReq;
|
||||
@class Open_im_sdkUid2Flag;
|
||||
@protocol Open_im_sdkBase;
|
||||
@class Open_im_sdkBase;
|
||||
@protocol Open_im_sdkIMSDKListener;
|
||||
@class Open_im_sdkIMSDKListener;
|
||||
@protocol Open_im_sdkOnAdvancedMsgListener;
|
||||
@class Open_im_sdkOnAdvancedMsgListener;
|
||||
@protocol Open_im_sdkOnConversationListener;
|
||||
@class Open_im_sdkOnConversationListener;
|
||||
@protocol Open_im_sdkOnFriendshipListener;
|
||||
@class Open_im_sdkOnFriendshipListener;
|
||||
@protocol Open_im_sdkOnGroupListener;
|
||||
@class Open_im_sdkOnGroupListener;
|
||||
@protocol Open_im_sdkSendMsgCallBack;
|
||||
@class Open_im_sdkSendMsgCallBack;
|
||||
|
||||
@protocol Open_im_sdkBase <NSObject>
|
||||
- (void)onError:(long)errCode errMsg:(NSString* _Nullable)errMsg;
|
||||
- (void)onSuccess:(NSString* _Nullable)data;
|
||||
@end
|
||||
|
||||
@protocol Open_im_sdkIMSDKListener <NSObject>
|
||||
- (void)onConnectFailed:(long)ErrCode ErrMsg:(NSString* _Nullable)ErrMsg;
|
||||
- (void)onConnectSuccess;
|
||||
- (void)onConnecting;
|
||||
- (void)onKickedOffline;
|
||||
- (void)onSelfInfoUpdated:(NSString* _Nullable)userInfo;
|
||||
- (void)onUserTokenExpired;
|
||||
@end
|
||||
|
||||
@protocol Open_im_sdkOnAdvancedMsgListener <NSObject>
|
||||
- (void)onRecvC2CReadReceipt:(NSString* _Nullable)msgReceiptList;
|
||||
- (void)onRecvMessageRevoked:(NSString* _Nullable)msgId;
|
||||
- (void)onRecvNewMessage:(NSString* _Nullable)message;
|
||||
@end
|
||||
|
||||
@protocol Open_im_sdkOnConversationListener <NSObject>
|
||||
- (void)onConversationChanged:(NSString* _Nullable)conversationList;
|
||||
- (void)onNewConversation:(NSString* _Nullable)conversationList;
|
||||
- (void)onSyncServerFailed;
|
||||
- (void)onSyncServerFinish;
|
||||
- (void)onSyncServerStart;
|
||||
- (void)onTotalUnreadMessageCountChanged:(int32_t)totalUnreadCount;
|
||||
@end
|
||||
|
||||
@protocol Open_im_sdkOnFriendshipListener <NSObject>
|
||||
- (void)onBlackListAdd:(NSString* _Nullable)userInfo;
|
||||
- (void)onBlackListDeleted:(NSString* _Nullable)userInfo;
|
||||
- (void)onFriendApplicationListAccept:(NSString* _Nullable)applyUserInfo;
|
||||
- (void)onFriendApplicationListAdded:(NSString* _Nullable)applyUserInfo;
|
||||
- (void)onFriendApplicationListDeleted:(NSString* _Nullable)applyUserInfo;
|
||||
- (void)onFriendApplicationListReject:(NSString* _Nullable)applyUserInfo;
|
||||
- (void)onFriendInfoChanged:(NSString* _Nullable)friendInfo;
|
||||
- (void)onFriendListAdded:(NSString* _Nullable)friendInfo;
|
||||
- (void)onFriendListDeleted:(NSString* _Nullable)friendInfo;
|
||||
@end
|
||||
|
||||
@protocol Open_im_sdkOnGroupListener <NSObject>
|
||||
- (void)onApplicationProcessed:(NSString* _Nullable)groupId opUser:(NSString* _Nullable)opUser AgreeOrReject:(int32_t)AgreeOrReject opReason:(NSString* _Nullable)opReason;
|
||||
- (void)onGroupCreated:(NSString* _Nullable)groupId;
|
||||
- (void)onGroupInfoChanged:(NSString* _Nullable)groupId groupInfo:(NSString* _Nullable)groupInfo;
|
||||
- (void)onMemberEnter:(NSString* _Nullable)groupId memberList:(NSString* _Nullable)memberList;
|
||||
- (void)onMemberInvited:(NSString* _Nullable)groupId opUser:(NSString* _Nullable)opUser memberList:(NSString* _Nullable)memberList;
|
||||
- (void)onMemberKicked:(NSString* _Nullable)groupId opUser:(NSString* _Nullable)opUser memberList:(NSString* _Nullable)memberList;
|
||||
- (void)onMemberLeave:(NSString* _Nullable)groupId member:(NSString* _Nullable)member;
|
||||
- (void)onReceiveJoinApplication:(NSString* _Nullable)groupId member:(NSString* _Nullable)member opReason:(NSString* _Nullable)opReason;
|
||||
@end
|
||||
|
||||
@protocol Open_im_sdkSendMsgCallBack <NSObject>
|
||||
- (void)onError:(long)errCode errMsg:(NSString* _Nullable)errMsg;
|
||||
- (void)onProgress:(long)progress;
|
||||
- (void)onSuccess:(NSString* _Nullable)data;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkAgreeOrRejectGroupMember : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull groupId;
|
||||
@property (nonatomic) NSString* _Nonnull userId;
|
||||
@property (nonatomic) long role;
|
||||
// skipped field AgreeOrRejectGroupMember.JoinTime with unsupported type: uint64
|
||||
|
||||
@property (nonatomic) NSString* _Nonnull nickName;
|
||||
@property (nonatomic) NSString* _Nonnull faceUrl;
|
||||
@property (nonatomic) NSString* _Nonnull reason;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkArrMsg : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
// skipped field ArrMsg.Data with unsupported type: []open_im_sdk/open_im_sdk.MsgData
|
||||
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkChatLog : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull msgId;
|
||||
@property (nonatomic) NSString* _Nonnull sendID;
|
||||
@property (nonatomic) int32_t isRead;
|
||||
@property (nonatomic) int64_t seq;
|
||||
@property (nonatomic) int32_t status;
|
||||
@property (nonatomic) int32_t sessionType;
|
||||
@property (nonatomic) NSString* _Nonnull recvID;
|
||||
@property (nonatomic) int32_t contentType;
|
||||
@property (nonatomic) int32_t msgFrom;
|
||||
@property (nonatomic) NSString* _Nonnull content;
|
||||
// skipped field ChatLog.Remark with unsupported type: database/sql.NullString
|
||||
|
||||
@property (nonatomic) int32_t senderPlatformID;
|
||||
@property (nonatomic) int64_t sendTime;
|
||||
@property (nonatomic) int64_t createTime;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkConversationListener : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) id<Open_im_sdkOnConversationListener> _Nullable conversationListener;
|
||||
// skipped field ConversationListener.MsgListenerList with unsupported type: []open_im_sdk/open_im_sdk.OnAdvancedMsgListener
|
||||
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkConversationStruct : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull conversationID;
|
||||
@property (nonatomic) long conversationType;
|
||||
@property (nonatomic) NSString* _Nonnull userID;
|
||||
@property (nonatomic) NSString* _Nonnull groupID;
|
||||
@property (nonatomic) NSString* _Nonnull showName;
|
||||
@property (nonatomic) NSString* _Nonnull faceURL;
|
||||
@property (nonatomic) long recvMsgOpt;
|
||||
@property (nonatomic) long unreadCount;
|
||||
@property (nonatomic) NSString* _Nonnull latestMsg;
|
||||
@property (nonatomic) int64_t latestMsgSendTime;
|
||||
@property (nonatomic) NSString* _Nonnull draftText;
|
||||
@property (nonatomic) int64_t draftTimestamp;
|
||||
@property (nonatomic) long isPinned;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkFriend : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkGroupApplicationResponseReq : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull operationID;
|
||||
@property (nonatomic) NSString* _Nonnull ownerID;
|
||||
@property (nonatomic) NSString* _Nonnull groupID;
|
||||
@property (nonatomic) NSString* _Nonnull fromUserID;
|
||||
@property (nonatomic) NSString* _Nonnull fromUserNickName;
|
||||
@property (nonatomic) NSString* _Nonnull fromUserFaceUrl;
|
||||
@property (nonatomic) NSString* _Nonnull toUserID;
|
||||
@property (nonatomic) NSString* _Nonnull toUserNickName;
|
||||
@property (nonatomic) NSString* _Nonnull toUserFaceUrl;
|
||||
@property (nonatomic) int64_t addTime;
|
||||
@property (nonatomic) NSString* _Nonnull requestMsg;
|
||||
@property (nonatomic) NSString* _Nonnull handledMsg;
|
||||
@property (nonatomic) int32_t type;
|
||||
@property (nonatomic) int32_t handleStatus;
|
||||
@property (nonatomic) int32_t handleResult;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkGroupReqListInfo : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull id_;
|
||||
@property (nonatomic) NSString* _Nonnull groupID;
|
||||
@property (nonatomic) NSString* _Nonnull fromUserID;
|
||||
@property (nonatomic) NSString* _Nonnull toUserID;
|
||||
@property (nonatomic) int32_t flag;
|
||||
@property (nonatomic) NSString* _Nonnull requestMsg;
|
||||
@property (nonatomic) NSString* _Nonnull handledMsg;
|
||||
@property (nonatomic) int64_t addTime;
|
||||
@property (nonatomic) NSString* _Nonnull fromUserNickname;
|
||||
@property (nonatomic) NSString* _Nonnull toUserNickname;
|
||||
@property (nonatomic) NSString* _Nonnull fromUserFaceUrl;
|
||||
@property (nonatomic) NSString* _Nonnull toUserFaceUrl;
|
||||
@property (nonatomic) NSString* _Nonnull handledUser;
|
||||
@property (nonatomic) int32_t type;
|
||||
@property (nonatomic) int32_t handleStatus;
|
||||
@property (nonatomic) int32_t handleResult;
|
||||
@property (nonatomic) int32_t isRead;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkIMConfig : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) int32_t platform;
|
||||
@property (nonatomic) NSString* _Nonnull ipApiAddr;
|
||||
@property (nonatomic) NSString* _Nonnull ipWsAddr;
|
||||
@property (nonatomic) NSString* _Nonnull dbDir;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkIMManager : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) long loginState;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkInviteUserToGroupReq : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull op;
|
||||
@property (nonatomic) NSString* _Nonnull groupID;
|
||||
@property (nonatomic) NSString* _Nonnull reason;
|
||||
// skipped field InviteUserToGroupReq.UidList with unsupported type: []string
|
||||
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkKickGroupMemberReq : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull op;
|
||||
@property (nonatomic) NSString* _Nonnull groupID;
|
||||
@property (nonatomic) NSString* _Nonnull reason;
|
||||
// skipped field KickGroupMemberReq.UidList with unsupported type: []string
|
||||
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkLogInfo : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull info;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkMessageReceipt : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull userID;
|
||||
// skipped field MessageReceipt.MsgIdList with unsupported type: []string
|
||||
|
||||
@property (nonatomic) int64_t readTime;
|
||||
@property (nonatomic) int32_t msgFrom;
|
||||
@property (nonatomic) int32_t contentType;
|
||||
@property (nonatomic) int32_t sessionType;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkMsg : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) long reqIdentifier;
|
||||
@property (nonatomic) long errCode;
|
||||
@property (nonatomic) NSString* _Nonnull errMsg;
|
||||
// skipped field Msg.Data with unsupported type: open_im_sdk/open_im_sdk.MsgData
|
||||
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkMsgData : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull sendID;
|
||||
@property (nonatomic) NSString* _Nonnull recvID;
|
||||
@property (nonatomic) int32_t sessionType;
|
||||
@property (nonatomic) int32_t msgFrom;
|
||||
@property (nonatomic) int32_t contentType;
|
||||
@property (nonatomic) NSString* _Nonnull serverMsgID;
|
||||
@property (nonatomic) NSString* _Nonnull content;
|
||||
@property (nonatomic) int64_t sendTime;
|
||||
@property (nonatomic) int64_t seq;
|
||||
@property (nonatomic) int32_t senderPlatformID;
|
||||
@property (nonatomic) NSString* _Nonnull senderNickName;
|
||||
@property (nonatomic) NSString* _Nonnull senderFaceURL;
|
||||
@property (nonatomic) NSString* _Nonnull clientMsgID;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkMsgStruct : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull clientMsgID;
|
||||
@property (nonatomic) NSString* _Nonnull serverMsgID;
|
||||
@property (nonatomic) int64_t createTime;
|
||||
@property (nonatomic) int64_t sendTime;
|
||||
@property (nonatomic) int32_t sessionType;
|
||||
@property (nonatomic) NSString* _Nonnull sendID;
|
||||
@property (nonatomic) NSString* _Nonnull recvID;
|
||||
@property (nonatomic) int32_t msgFrom;
|
||||
@property (nonatomic) int32_t contentType;
|
||||
@property (nonatomic) int32_t platformID;
|
||||
// skipped field MsgStruct.ForceList with unsupported type: []string
|
||||
|
||||
@property (nonatomic) NSString* _Nonnull senderNickName;
|
||||
@property (nonatomic) NSString* _Nonnull senderFaceURL;
|
||||
@property (nonatomic) NSString* _Nonnull groupID;
|
||||
@property (nonatomic) NSString* _Nonnull content;
|
||||
@property (nonatomic) int64_t seq;
|
||||
@property (nonatomic) BOOL isRead;
|
||||
@property (nonatomic) int32_t status;
|
||||
@property (nonatomic) NSString* _Nonnull remark;
|
||||
// skipped field MsgStruct.PictureElem with unsupported type: struct{SourcePath string "json:\"sourcePath\""; SourcePicture open_im_sdk/open_im_sdk.PictureBaseInfo "json:\"sourcePicture\""; BigPicture open_im_sdk/open_im_sdk.PictureBaseInfo "json:\"bigPicture\""; SnapshotPicture open_im_sdk/open_im_sdk.PictureBaseInfo "json:\"snapshotPicture\""}
|
||||
|
||||
// skipped field MsgStruct.SoundElem with unsupported type: struct{UUID string "json:\"uuid\""; SoundPath string "json:\"soundPath\""; SourceURL string "json:\"sourceUrl\""; DataSize int64 "json:\"dataSize\""; Duration int64 "json:\"duration\""}
|
||||
|
||||
// skipped field MsgStruct.VideoElem with unsupported type: struct{VideoPath string "json:\"videoPath\""; VideoUUID string "json:\"videoUUID\""; VideoURL string "json:\"videoUrl\""; VideoType string "json:\"videoType\""; VideoSize int64 "json:\"videoSize\""; Duration int64 "json:\"duration\""; SnapshotPath string "json:\"snapshotPath\""; SnapshotUUID string "json:\"snapshotUUID\""; SnapshotSize int64 "json:\"snapshotSize\""; SnapshotURL string "json:\"snapshotUrl\""; SnapshotWidth int32 "json:\"snapshotWidth\""; SnapshotHeight int32 "json:\"snapshotHeight\""}
|
||||
|
||||
// skipped field MsgStruct.FileElem with unsupported type: struct{FilePath string "json:\"filePath\""; UUID string "json:\"uuid\""; SourceURL string "json:\"sourceUrl\""; FileName string "json:\"fileName\""; FileSize int64 "json:\"fileSize\""}
|
||||
|
||||
// skipped field MsgStruct.MergeElem with unsupported type: struct{Title string "json:\"title\""; AbstractList []string "json:\"abstractList\""; MultiMessage []*open_im_sdk/open_im_sdk.MsgStruct "json:\"multiMessage\""}
|
||||
|
||||
// skipped field MsgStruct.RevokeMessage with unsupported type: struct{ServerMsgID string "json:\"serverMsgID\""; SendID string "json:\"sendID\""; SenderNickname string "json:\"senderNickname\""; RecvID string "json:\"recvID\""; GroupID string "json:\"groupID\""; ContentType int32 "json:\"contentType\""; SendTime int64 "json:\"sendTime\""}
|
||||
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkPictureBaseInfo : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull uuid;
|
||||
@property (nonatomic) NSString* _Nonnull type;
|
||||
@property (nonatomic) int64_t size;
|
||||
@property (nonatomic) int32_t width;
|
||||
@property (nonatomic) int32_t height;
|
||||
@property (nonatomic) NSString* _Nonnull url;
|
||||
@end
|
||||
|
||||
/**
|
||||
* //////////////////////// message/////////////////////////
|
||||
*/
|
||||
@interface Open_im_sdkPullMsgReq : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull userID;
|
||||
@property (nonatomic) NSString* _Nonnull groupID;
|
||||
@property (nonatomic) Open_im_sdkMsgStruct* _Nullable startMsg;
|
||||
@property (nonatomic) long count;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkPullUserMsgResp : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) long errCode;
|
||||
@property (nonatomic) NSString* _Nonnull errMsg;
|
||||
@property (nonatomic) long reqIdentifier;
|
||||
@property (nonatomic) long msgIncr;
|
||||
// skipped field PullUserMsgResp.Data with unsupported type: open_im_sdk/open_im_sdk.paramsPullUserMsgDataResp
|
||||
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkSendMsgRespFromServer : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) long errCode;
|
||||
@property (nonatomic) NSString* _Nonnull errMsg;
|
||||
@property (nonatomic) long reqIdentifier;
|
||||
// skipped field SendMsgRespFromServer.Data with unsupported type: struct{ServerMsgID string "json:\"serverMsgID\""; ClientMsgID string "json:\"clientMsgID\""; SendTime int64 "json:\"sendTime\""}
|
||||
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkSoundElem : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull uuid;
|
||||
@property (nonatomic) NSString* _Nonnull soundPath;
|
||||
@property (nonatomic) NSString* _Nonnull sourceURL;
|
||||
@property (nonatomic) int64_t dataSize;
|
||||
@property (nonatomic) int64_t duration;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkTransferGroupOwnerReq : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull groupID;
|
||||
@property (nonatomic) NSString* _Nonnull oldOwner;
|
||||
@property (nonatomic) NSString* _Nonnull newOwner;
|
||||
@property (nonatomic) NSString* _Nonnull operationID;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkUid2Flag : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull uid;
|
||||
@property (nonatomic) int32_t flag;
|
||||
@end
|
||||
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkAcceptFriendApplicationTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkAcceptGroupApplicationResultTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkAcceptGroupApplicationTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkAddConOrUpLatMsg;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkAddFriendTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkAtText;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkC2CMessageAsRead;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdAcceptFriend;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdAddFriend;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdBlackList;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdDeleteConversation;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdForceSyncFriend;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdForceSyncFriendApplication;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdForceSyncLoginUerInfo;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdForceSyncMsg;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdFriend;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdFriendApplication;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdFroceSyncBlackList;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdGeyLoginUserInfo;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdNewMsgCome;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdReLogin;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdRefuseFriend;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdUnInit;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdUpdateConversation;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkConAndUnreadChange;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkConChange;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkCreateGroupTip;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkDeFaultSuccessMsg;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkErrCodeConversation;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkErrCodeFriend;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkErrCodeGroup;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkErrCodeInitLogin;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkErrCodeUserInfo;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkFile;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkFriendAcceptTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkGroupActionAcceptGroupApplication;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkGroupActionApplyJoinGroup;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkGroupActionCreateGroup;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkGroupActionInviteUserToGroup;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkGroupActionKickGroupMember;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkGroupActionQuitGroup;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkGroupActionRefuseGroupApplication;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkGroupActionSetGroupInfo;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkGroupActionTransferGroupOwner;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkGroupApplicationResponseTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkGroupChatType;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkHasRead;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkIncrUnread;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkInviteUserToGroupTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkJoinGroupTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkKickGroupMemberTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkKickOnlineTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkLoginFailed;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkLoginSuccess;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkLogining;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkLogoutCmd;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkMerger;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkMessageHasNotRead;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkMessageHasRead;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkMsgStatusHasDeleted;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkMsgStatusSendFailed;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkMsgStatusSendSuccess;
|
||||
/**
|
||||
* MsgStatus
|
||||
*/
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkMsgStatusSending;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkNotRead;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkPicture;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkQuitGroupTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkRefuseFriendApplicationTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkRefuseGroupApplicationResultTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkRefuseGroupApplicationTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkRevokeMessageTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkSetGroupInfoTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkSetSelfInfoTip;
|
||||
/**
|
||||
* ///////////////////////////////////
|
||||
SessionType
|
||||
*/
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkSingleChatType;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkSound;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkSyncSenderMsg;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkSysMsgType;
|
||||
/**
|
||||
* ContentType
|
||||
*/
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkText;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkTimeOffset;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkTotalUnreadMessageChanged;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkTransferGroupOwnerTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkUnreadCountSetZero;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkUpdateFaceUrlAndNickName;
|
||||
/**
|
||||
* //////////////////////////////////////
|
||||
MsgFrom
|
||||
*/
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkUserMsgType;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkVideo;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkZoomScale;
|
||||
|
||||
@interface Open_im_sdk : NSObject
|
||||
// skipped variable ConListener with unsupported type: open_im_sdk/open_im_sdk.ConversationListener
|
||||
|
||||
// skipped variable ConversationCh with unsupported type: chan open_im_sdk/open_im_sdk.cmd2Value
|
||||
|
||||
// skipped variable FriendObj with unsupported type: open_im_sdk/open_im_sdk.Friend
|
||||
|
||||
+ (NSString* _Nonnull) loginUid;
|
||||
+ (void) setLoginUid:(NSString* _Nonnull)v;
|
||||
|
||||
// skipped variable SdkInitManager with unsupported type: open_im_sdk/open_im_sdk.IMManager
|
||||
|
||||
// skipped variable SvrConf with unsupported type: open_im_sdk/open_im_sdk.IMConfig
|
||||
|
||||
@end
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkAcceptFriendApplication(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable uid);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkAcceptGroupApplication(NSString* _Nullable application, NSString* _Nullable reason, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkAddAdvancedMsgListener(id<Open_im_sdkOnAdvancedMsgListener> _Nullable listener);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkAddFriend(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable paramsReq);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkAddToBlackList(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable blackUid);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkCheckFriend(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable uidList);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateFileMessage(NSString* _Nullable filePath, NSString* _Nullable fileName);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateForwardMessage(NSString* _Nullable m);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkCreateGroup(NSString* _Nullable gInfo, NSString* _Nullable memberList, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateImageMessage(NSString* _Nullable imagePath);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateImageMessageFromFullPath(NSString* _Nullable imageFullPath);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateMergerMessage(NSString* _Nullable messageList, NSString* _Nullable title, NSString* _Nullable summaryList);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateSoundMessage(NSString* _Nullable soundPath, int64_t duration);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateTextAtMessage(NSString* _Nullable text, NSString* _Nullable atUserList);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateTextMessage(NSString* _Nullable text);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateTextSystemMessage(NSString* _Nullable text, int32_t textType);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateVideoMessage(NSString* _Nullable videoPath, NSString* _Nullable videoType, int64_t duration, NSString* _Nullable snapshotPath);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateVideoMessageFromFullPath(NSString* _Nullable videoFullPath, NSString* _Nullable videoType, int64_t duration, NSString* _Nullable snapshotFullPath);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDeleteConversation(NSString* _Nullable conversationID, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDeleteFromBlackList(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable deleteUid);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDeleteFromFriendList(NSString* _Nullable deleteUid, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDeleteMessageFromLocalStorage(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable message);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDoCreateGroup(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDoGetGroupsInfo(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDoJoinGroup(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDoQuitGroup(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDoSetGroupInfo(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDotestGetGroupMemberList(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDotestGetGroupMembersInfo(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDotestGetJoinedGroupList(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDotestKickGroupMember(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDotesttestInviteUserToGroup(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkFindMessages(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable messageIDList);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkForceSyncBlackList(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkForceSyncFriend(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkForceSyncFriendApplication(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkForceSyncLoginUerInfo(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkForceSyncMsg(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkFriendApplication(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable uid, long flag);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetAllConversationList(id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetBlackList(id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkGetConversationIDBySessionType(NSString* _Nullable sourceID, long sessionType);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetFriendApplicationList(id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetFriendList(id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetFriendsInfo(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable uidList);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetGroupApplicationList(id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetGroupMemberList(NSString* _Nullable groupId, int32_t filter, int32_t next, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetGroupMembersInfo(NSString* _Nullable groupId, NSString* _Nullable userList, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetGroupsInfo(NSString* _Nullable groupIdList, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetHistoryMessageList(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable getMessageOptions);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetJoinedGroupList(id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT long Open_im_sdkGetLoginStatus(void);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkGetLoginUser(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetMultipleConversation(NSString* _Nullable conversationIDList, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetOneConversation(NSString* _Nullable sourceID, long sessionType, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetTotalUnreadMsgCount(id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetUsersInfo(NSString* _Nullable uIDList, id<Open_im_sdkBase> _Nullable cb);
|
||||
|
||||
FOUNDATION_EXPORT BOOL Open_im_sdkInitSDK(NSString* _Nullable config, id<Open_im_sdkIMSDKListener> _Nullable cb);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkInsertSingleMessageToLocalStorage(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable message, NSString* _Nullable userID, NSString* _Nullable sender);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkInviteUserToGroup(NSString* _Nullable groupId, NSString* _Nullable reason, NSString* _Nullable userList, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkJoinGroup(NSString* _Nullable groupId, NSString* _Nullable message, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkKickGroupMember(NSString* _Nullable groupId, NSString* _Nullable userList, NSString* _Nullable reason, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkLogin(NSString* _Nullable uid, NSString* _Nullable tk, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkLogout(id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkMarkC2CMessageAsRead(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable receiver, NSString* _Nullable msgList);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkMarkSingleMessageHasRead(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable userID);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkMd5(NSString* _Nullable s);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkPinConversation(NSString* _Nullable conversationID, BOOL isPinned, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkQuitGroup(NSString* _Nullable groupId, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkRefuseFriendApplication(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable uid);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkRefuseGroupApplication(NSString* _Nullable application, NSString* _Nullable reason, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkRemoveAdvancedMsgListener(id<Open_im_sdkOnAdvancedMsgListener> _Nullable listener);
|
||||
|
||||
FOUNDATION_EXPORT BOOL Open_im_sdkResetConversation(NSString* _Nullable conversationID, NSError* _Nullable* _Nullable error);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkRevokeMessage(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable message);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkSendMessage(id<Open_im_sdkSendMsgCallBack> _Nullable callback, NSString* _Nullable message, NSString* _Nullable receiver, NSString* _Nullable groupID, BOOL onlineUserOnly);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkSetConversationDraft(NSString* _Nullable conversationID, NSString* _Nullable draftText, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkSetConversationListener(id<Open_im_sdkOnConversationListener> _Nullable listener);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkSetFriendInfo(NSString* _Nullable comment, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT BOOL Open_im_sdkSetFriendListener(id<Open_im_sdkOnFriendshipListener> _Nullable listener);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkSetGroupInfo(NSString* _Nullable jsonGroupInfo, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkSetGroupListener(id<Open_im_sdkOnGroupListener> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkSetSelfInfo(NSString* _Nullable info, id<Open_im_sdkBase> _Nullable cb);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkTencentOssCredentials(id<Open_im_sdkBase> _Nullable cb);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkTransferGroupOwner(NSString* _Nullable groupId, NSString* _Nullable userId, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkUnInitSDK(void);
|
||||
|
||||
// skipped function UnixSecondToTime with unsupported parameter or return types
|
||||
|
||||
|
||||
@class Open_im_sdkBase;
|
||||
|
||||
@class Open_im_sdkIMSDKListener;
|
||||
|
||||
@class Open_im_sdkOnAdvancedMsgListener;
|
||||
|
||||
@class Open_im_sdkOnConversationListener;
|
||||
|
||||
@class Open_im_sdkOnFriendshipListener;
|
||||
|
||||
@class Open_im_sdkOnGroupListener;
|
||||
|
||||
@class Open_im_sdkSendMsgCallBack;
|
||||
|
||||
@interface Open_im_sdkBase : NSObject <goSeqRefInterface, Open_im_sdkBase> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (void)onError:(long)errCode errMsg:(NSString* _Nullable)errMsg;
|
||||
- (void)onSuccess:(NSString* _Nullable)data;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkIMSDKListener : NSObject <goSeqRefInterface, Open_im_sdkIMSDKListener> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (void)onConnectFailed:(long)ErrCode ErrMsg:(NSString* _Nullable)ErrMsg;
|
||||
- (void)onConnectSuccess;
|
||||
- (void)onConnecting;
|
||||
- (void)onKickedOffline;
|
||||
- (void)onSelfInfoUpdated:(NSString* _Nullable)userInfo;
|
||||
- (void)onUserTokenExpired;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkOnAdvancedMsgListener : NSObject <goSeqRefInterface, Open_im_sdkOnAdvancedMsgListener> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (void)onRecvC2CReadReceipt:(NSString* _Nullable)msgReceiptList;
|
||||
- (void)onRecvMessageRevoked:(NSString* _Nullable)msgId;
|
||||
- (void)onRecvNewMessage:(NSString* _Nullable)message;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkOnConversationListener : NSObject <goSeqRefInterface, Open_im_sdkOnConversationListener> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (void)onConversationChanged:(NSString* _Nullable)conversationList;
|
||||
- (void)onNewConversation:(NSString* _Nullable)conversationList;
|
||||
- (void)onSyncServerFailed;
|
||||
- (void)onSyncServerFinish;
|
||||
- (void)onSyncServerStart;
|
||||
- (void)onTotalUnreadMessageCountChanged:(int32_t)totalUnreadCount;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkOnFriendshipListener : NSObject <goSeqRefInterface, Open_im_sdkOnFriendshipListener> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (void)onBlackListAdd:(NSString* _Nullable)userInfo;
|
||||
- (void)onBlackListDeleted:(NSString* _Nullable)userInfo;
|
||||
- (void)onFriendApplicationListAccept:(NSString* _Nullable)applyUserInfo;
|
||||
- (void)onFriendApplicationListAdded:(NSString* _Nullable)applyUserInfo;
|
||||
- (void)onFriendApplicationListDeleted:(NSString* _Nullable)applyUserInfo;
|
||||
- (void)onFriendApplicationListReject:(NSString* _Nullable)applyUserInfo;
|
||||
- (void)onFriendInfoChanged:(NSString* _Nullable)friendInfo;
|
||||
- (void)onFriendListAdded:(NSString* _Nullable)friendInfo;
|
||||
- (void)onFriendListDeleted:(NSString* _Nullable)friendInfo;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkOnGroupListener : NSObject <goSeqRefInterface, Open_im_sdkOnGroupListener> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (void)onApplicationProcessed:(NSString* _Nullable)groupId opUser:(NSString* _Nullable)opUser AgreeOrReject:(int32_t)AgreeOrReject opReason:(NSString* _Nullable)opReason;
|
||||
- (void)onGroupCreated:(NSString* _Nullable)groupId;
|
||||
- (void)onGroupInfoChanged:(NSString* _Nullable)groupId groupInfo:(NSString* _Nullable)groupInfo;
|
||||
/**
|
||||
* list->group
|
||||
*/
|
||||
- (void)onMemberEnter:(NSString* _Nullable)groupId memberList:(NSString* _Nullable)memberList;
|
||||
/**
|
||||
* list->opUser->groupId
|
||||
*/
|
||||
- (void)onMemberInvited:(NSString* _Nullable)groupId opUser:(NSString* _Nullable)opUser memberList:(NSString* _Nullable)memberList;
|
||||
- (void)onMemberKicked:(NSString* _Nullable)groupId opUser:(NSString* _Nullable)opUser memberList:(NSString* _Nullable)memberList;
|
||||
/**
|
||||
* group->one
|
||||
*/
|
||||
- (void)onMemberLeave:(NSString* _Nullable)groupId member:(NSString* _Nullable)member;
|
||||
- (void)onReceiveJoinApplication:(NSString* _Nullable)groupId member:(NSString* _Nullable)member opReason:(NSString* _Nullable)opReason;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkSendMsgCallBack : NSObject <goSeqRefInterface, Open_im_sdkSendMsgCallBack> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (void)onError:(long)errCode errMsg:(NSString* _Nullable)errMsg;
|
||||
- (void)onProgress:(long)progress;
|
||||
- (void)onSuccess:(NSString* _Nullable)data;
|
||||
@end
|
||||
|
||||
#endif
|
29
ios/Framework/OpenIMCore.framework/Headers/Universe.objc.h
Normal file
29
ios/Framework/OpenIMCore.framework/Headers/Universe.objc.h
Normal file
@ -0,0 +1,29 @@
|
||||
// Objective-C API for talking to Go package.
|
||||
// gobind -lang=objc
|
||||
//
|
||||
// File is generated by gobind. Do not edit.
|
||||
|
||||
#ifndef __Universe_H__
|
||||
#define __Universe_H__
|
||||
|
||||
@import Foundation;
|
||||
#include "ref.h"
|
||||
|
||||
@protocol Universeerror;
|
||||
@class Universeerror;
|
||||
|
||||
@protocol Universeerror <NSObject>
|
||||
- (NSString* _Nonnull)error;
|
||||
@end
|
||||
|
||||
@class Universeerror;
|
||||
|
||||
@interface Universeerror : NSError <goSeqRefInterface, Universeerror> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (NSString* _Nonnull)error;
|
||||
@end
|
||||
|
||||
#endif
|
35
ios/Framework/OpenIMCore.framework/Headers/ref.h
Normal file
35
ios/Framework/OpenIMCore.framework/Headers/ref.h
Normal file
@ -0,0 +1,35 @@
|
||||
// Copyright 2015 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
#ifndef __GO_REF_HDR__
|
||||
#define __GO_REF_HDR__
|
||||
|
||||
#include <Foundation/Foundation.h>
|
||||
|
||||
// GoSeqRef is an object tagged with an integer for passing back and
|
||||
// forth across the language boundary. A GoSeqRef may represent either
|
||||
// an instance of a Go object, or an Objective-C object passed to Go.
|
||||
// The explicit allocation of a GoSeqRef is used to pin a Go object
|
||||
// when it is passed to Objective-C. The Go seq package maintains a
|
||||
// reference to the Go object in a map keyed by the refnum along with
|
||||
// a reference count. When the reference count reaches zero, the Go
|
||||
// seq package will clear the corresponding entry in the map.
|
||||
@interface GoSeqRef : NSObject {
|
||||
}
|
||||
@property(readonly) int32_t refnum;
|
||||
@property(strong) id obj; // NULL when representing a Go object.
|
||||
|
||||
// new GoSeqRef object to proxy a Go object. The refnum must be
|
||||
// provided from Go side.
|
||||
- (instancetype)initWithRefnum:(int32_t)refnum obj:(id)obj;
|
||||
|
||||
- (int32_t)incNum;
|
||||
|
||||
@end
|
||||
|
||||
@protocol goSeqRefInterface
|
||||
-(GoSeqRef*) _ref;
|
||||
@end
|
||||
|
||||
#endif
|
@ -0,0 +1,8 @@
|
||||
framework module "OpenIMCore" {
|
||||
header "ref.h"
|
||||
header "Open_im_sdk.objc.h"
|
||||
header "Universe.objc.h"
|
||||
header "OpenIMCore.h"
|
||||
|
||||
export *
|
||||
}
|
BIN
ios/Framework/OpenIMCore.framework/OpenIMCore
Normal file
BIN
ios/Framework/OpenIMCore.framework/OpenIMCore
Normal file
Binary file not shown.
6
ios/Framework/OpenIMCore.framework/Resources/Info.plist
Normal file
6
ios/Framework/OpenIMCore.framework/Resources/Info.plist
Normal file
@ -0,0 +1,6 @@
|
||||
<?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>
|
||||
</dict>
|
||||
</plist>
|
@ -0,0 +1,13 @@
|
||||
|
||||
// Objective-C API for talking to the following Go packages
|
||||
//
|
||||
// open_im_sdk/open_im_sdk
|
||||
//
|
||||
// File is generated by gomobile bind. Do not edit.
|
||||
#ifndef __OpenIMCore_FRAMEWORK_H__
|
||||
#define __OpenIMCore_FRAMEWORK_H__
|
||||
|
||||
#include "Open_im_sdk.objc.h"
|
||||
#include "Universe.objc.h"
|
||||
|
||||
#endif
|
@ -0,0 +1,882 @@
|
||||
// Objective-C API for talking to open_im_sdk/open_im_sdk Go package.
|
||||
// gobind -lang=objc open_im_sdk/open_im_sdk
|
||||
//
|
||||
// File is generated by gobind. Do not edit.
|
||||
|
||||
#ifndef __Open_im_sdk_H__
|
||||
#define __Open_im_sdk_H__
|
||||
|
||||
@import Foundation;
|
||||
#include "ref.h"
|
||||
#include "Universe.objc.h"
|
||||
|
||||
|
||||
@class Open_im_sdkAgreeOrRejectGroupMember;
|
||||
@class Open_im_sdkArrMsg;
|
||||
@class Open_im_sdkChatLog;
|
||||
@class Open_im_sdkConversationListener;
|
||||
@class Open_im_sdkConversationStruct;
|
||||
@class Open_im_sdkFriend;
|
||||
@class Open_im_sdkGroupApplicationResponseReq;
|
||||
@class Open_im_sdkGroupReqListInfo;
|
||||
@class Open_im_sdkIMConfig;
|
||||
@class Open_im_sdkIMManager;
|
||||
@class Open_im_sdkInviteUserToGroupReq;
|
||||
@class Open_im_sdkKickGroupMemberReq;
|
||||
@class Open_im_sdkLogInfo;
|
||||
@class Open_im_sdkMessageReceipt;
|
||||
@class Open_im_sdkMsg;
|
||||
@class Open_im_sdkMsgData;
|
||||
@class Open_im_sdkMsgStruct;
|
||||
@class Open_im_sdkPictureBaseInfo;
|
||||
@class Open_im_sdkPullMsgReq;
|
||||
@class Open_im_sdkPullUserMsgResp;
|
||||
@class Open_im_sdkSendMsgRespFromServer;
|
||||
@class Open_im_sdkSoundElem;
|
||||
@class Open_im_sdkTransferGroupOwnerReq;
|
||||
@class Open_im_sdkUid2Flag;
|
||||
@protocol Open_im_sdkBase;
|
||||
@class Open_im_sdkBase;
|
||||
@protocol Open_im_sdkIMSDKListener;
|
||||
@class Open_im_sdkIMSDKListener;
|
||||
@protocol Open_im_sdkOnAdvancedMsgListener;
|
||||
@class Open_im_sdkOnAdvancedMsgListener;
|
||||
@protocol Open_im_sdkOnConversationListener;
|
||||
@class Open_im_sdkOnConversationListener;
|
||||
@protocol Open_im_sdkOnFriendshipListener;
|
||||
@class Open_im_sdkOnFriendshipListener;
|
||||
@protocol Open_im_sdkOnGroupListener;
|
||||
@class Open_im_sdkOnGroupListener;
|
||||
@protocol Open_im_sdkSendMsgCallBack;
|
||||
@class Open_im_sdkSendMsgCallBack;
|
||||
|
||||
@protocol Open_im_sdkBase <NSObject>
|
||||
- (void)onError:(long)errCode errMsg:(NSString* _Nullable)errMsg;
|
||||
- (void)onSuccess:(NSString* _Nullable)data;
|
||||
@end
|
||||
|
||||
@protocol Open_im_sdkIMSDKListener <NSObject>
|
||||
- (void)onConnectFailed:(long)ErrCode ErrMsg:(NSString* _Nullable)ErrMsg;
|
||||
- (void)onConnectSuccess;
|
||||
- (void)onConnecting;
|
||||
- (void)onKickedOffline;
|
||||
- (void)onSelfInfoUpdated:(NSString* _Nullable)userInfo;
|
||||
- (void)onUserTokenExpired;
|
||||
@end
|
||||
|
||||
@protocol Open_im_sdkOnAdvancedMsgListener <NSObject>
|
||||
- (void)onRecvC2CReadReceipt:(NSString* _Nullable)msgReceiptList;
|
||||
- (void)onRecvMessageRevoked:(NSString* _Nullable)msgId;
|
||||
- (void)onRecvNewMessage:(NSString* _Nullable)message;
|
||||
@end
|
||||
|
||||
@protocol Open_im_sdkOnConversationListener <NSObject>
|
||||
- (void)onConversationChanged:(NSString* _Nullable)conversationList;
|
||||
- (void)onNewConversation:(NSString* _Nullable)conversationList;
|
||||
- (void)onSyncServerFailed;
|
||||
- (void)onSyncServerFinish;
|
||||
- (void)onSyncServerStart;
|
||||
- (void)onTotalUnreadMessageCountChanged:(int32_t)totalUnreadCount;
|
||||
@end
|
||||
|
||||
@protocol Open_im_sdkOnFriendshipListener <NSObject>
|
||||
- (void)onBlackListAdd:(NSString* _Nullable)userInfo;
|
||||
- (void)onBlackListDeleted:(NSString* _Nullable)userInfo;
|
||||
- (void)onFriendApplicationListAccept:(NSString* _Nullable)applyUserInfo;
|
||||
- (void)onFriendApplicationListAdded:(NSString* _Nullable)applyUserInfo;
|
||||
- (void)onFriendApplicationListDeleted:(NSString* _Nullable)applyUserInfo;
|
||||
- (void)onFriendApplicationListReject:(NSString* _Nullable)applyUserInfo;
|
||||
- (void)onFriendInfoChanged:(NSString* _Nullable)friendInfo;
|
||||
- (void)onFriendListAdded:(NSString* _Nullable)friendInfo;
|
||||
- (void)onFriendListDeleted:(NSString* _Nullable)friendInfo;
|
||||
@end
|
||||
|
||||
@protocol Open_im_sdkOnGroupListener <NSObject>
|
||||
- (void)onApplicationProcessed:(NSString* _Nullable)groupId opUser:(NSString* _Nullable)opUser AgreeOrReject:(int32_t)AgreeOrReject opReason:(NSString* _Nullable)opReason;
|
||||
- (void)onGroupCreated:(NSString* _Nullable)groupId;
|
||||
- (void)onGroupInfoChanged:(NSString* _Nullable)groupId groupInfo:(NSString* _Nullable)groupInfo;
|
||||
- (void)onMemberEnter:(NSString* _Nullable)groupId memberList:(NSString* _Nullable)memberList;
|
||||
- (void)onMemberInvited:(NSString* _Nullable)groupId opUser:(NSString* _Nullable)opUser memberList:(NSString* _Nullable)memberList;
|
||||
- (void)onMemberKicked:(NSString* _Nullable)groupId opUser:(NSString* _Nullable)opUser memberList:(NSString* _Nullable)memberList;
|
||||
- (void)onMemberLeave:(NSString* _Nullable)groupId member:(NSString* _Nullable)member;
|
||||
- (void)onReceiveJoinApplication:(NSString* _Nullable)groupId member:(NSString* _Nullable)member opReason:(NSString* _Nullable)opReason;
|
||||
@end
|
||||
|
||||
@protocol Open_im_sdkSendMsgCallBack <NSObject>
|
||||
- (void)onError:(long)errCode errMsg:(NSString* _Nullable)errMsg;
|
||||
- (void)onProgress:(long)progress;
|
||||
- (void)onSuccess:(NSString* _Nullable)data;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkAgreeOrRejectGroupMember : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull groupId;
|
||||
@property (nonatomic) NSString* _Nonnull userId;
|
||||
@property (nonatomic) long role;
|
||||
// skipped field AgreeOrRejectGroupMember.JoinTime with unsupported type: uint64
|
||||
|
||||
@property (nonatomic) NSString* _Nonnull nickName;
|
||||
@property (nonatomic) NSString* _Nonnull faceUrl;
|
||||
@property (nonatomic) NSString* _Nonnull reason;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkArrMsg : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
// skipped field ArrMsg.Data with unsupported type: []open_im_sdk/open_im_sdk.MsgData
|
||||
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkChatLog : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull msgId;
|
||||
@property (nonatomic) NSString* _Nonnull sendID;
|
||||
@property (nonatomic) int32_t isRead;
|
||||
@property (nonatomic) int64_t seq;
|
||||
@property (nonatomic) int32_t status;
|
||||
@property (nonatomic) int32_t sessionType;
|
||||
@property (nonatomic) NSString* _Nonnull recvID;
|
||||
@property (nonatomic) int32_t contentType;
|
||||
@property (nonatomic) int32_t msgFrom;
|
||||
@property (nonatomic) NSString* _Nonnull content;
|
||||
// skipped field ChatLog.Remark with unsupported type: database/sql.NullString
|
||||
|
||||
@property (nonatomic) int32_t senderPlatformID;
|
||||
@property (nonatomic) int64_t sendTime;
|
||||
@property (nonatomic) int64_t createTime;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkConversationListener : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) id<Open_im_sdkOnConversationListener> _Nullable conversationListener;
|
||||
// skipped field ConversationListener.MsgListenerList with unsupported type: []open_im_sdk/open_im_sdk.OnAdvancedMsgListener
|
||||
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkConversationStruct : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull conversationID;
|
||||
@property (nonatomic) long conversationType;
|
||||
@property (nonatomic) NSString* _Nonnull userID;
|
||||
@property (nonatomic) NSString* _Nonnull groupID;
|
||||
@property (nonatomic) NSString* _Nonnull showName;
|
||||
@property (nonatomic) NSString* _Nonnull faceURL;
|
||||
@property (nonatomic) long recvMsgOpt;
|
||||
@property (nonatomic) long unreadCount;
|
||||
@property (nonatomic) NSString* _Nonnull latestMsg;
|
||||
@property (nonatomic) int64_t latestMsgSendTime;
|
||||
@property (nonatomic) NSString* _Nonnull draftText;
|
||||
@property (nonatomic) int64_t draftTimestamp;
|
||||
@property (nonatomic) long isPinned;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkFriend : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkGroupApplicationResponseReq : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull operationID;
|
||||
@property (nonatomic) NSString* _Nonnull ownerID;
|
||||
@property (nonatomic) NSString* _Nonnull groupID;
|
||||
@property (nonatomic) NSString* _Nonnull fromUserID;
|
||||
@property (nonatomic) NSString* _Nonnull fromUserNickName;
|
||||
@property (nonatomic) NSString* _Nonnull fromUserFaceUrl;
|
||||
@property (nonatomic) NSString* _Nonnull toUserID;
|
||||
@property (nonatomic) NSString* _Nonnull toUserNickName;
|
||||
@property (nonatomic) NSString* _Nonnull toUserFaceUrl;
|
||||
@property (nonatomic) int64_t addTime;
|
||||
@property (nonatomic) NSString* _Nonnull requestMsg;
|
||||
@property (nonatomic) NSString* _Nonnull handledMsg;
|
||||
@property (nonatomic) int32_t type;
|
||||
@property (nonatomic) int32_t handleStatus;
|
||||
@property (nonatomic) int32_t handleResult;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkGroupReqListInfo : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull id_;
|
||||
@property (nonatomic) NSString* _Nonnull groupID;
|
||||
@property (nonatomic) NSString* _Nonnull fromUserID;
|
||||
@property (nonatomic) NSString* _Nonnull toUserID;
|
||||
@property (nonatomic) int32_t flag;
|
||||
@property (nonatomic) NSString* _Nonnull requestMsg;
|
||||
@property (nonatomic) NSString* _Nonnull handledMsg;
|
||||
@property (nonatomic) int64_t addTime;
|
||||
@property (nonatomic) NSString* _Nonnull fromUserNickname;
|
||||
@property (nonatomic) NSString* _Nonnull toUserNickname;
|
||||
@property (nonatomic) NSString* _Nonnull fromUserFaceUrl;
|
||||
@property (nonatomic) NSString* _Nonnull toUserFaceUrl;
|
||||
@property (nonatomic) NSString* _Nonnull handledUser;
|
||||
@property (nonatomic) int32_t type;
|
||||
@property (nonatomic) int32_t handleStatus;
|
||||
@property (nonatomic) int32_t handleResult;
|
||||
@property (nonatomic) int32_t isRead;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkIMConfig : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) int32_t platform;
|
||||
@property (nonatomic) NSString* _Nonnull ipApiAddr;
|
||||
@property (nonatomic) NSString* _Nonnull ipWsAddr;
|
||||
@property (nonatomic) NSString* _Nonnull dbDir;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkIMManager : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) long loginState;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkInviteUserToGroupReq : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull op;
|
||||
@property (nonatomic) NSString* _Nonnull groupID;
|
||||
@property (nonatomic) NSString* _Nonnull reason;
|
||||
// skipped field InviteUserToGroupReq.UidList with unsupported type: []string
|
||||
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkKickGroupMemberReq : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull op;
|
||||
@property (nonatomic) NSString* _Nonnull groupID;
|
||||
@property (nonatomic) NSString* _Nonnull reason;
|
||||
// skipped field KickGroupMemberReq.UidList with unsupported type: []string
|
||||
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkLogInfo : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull info;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkMessageReceipt : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull userID;
|
||||
// skipped field MessageReceipt.MsgIdList with unsupported type: []string
|
||||
|
||||
@property (nonatomic) int64_t readTime;
|
||||
@property (nonatomic) int32_t msgFrom;
|
||||
@property (nonatomic) int32_t contentType;
|
||||
@property (nonatomic) int32_t sessionType;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkMsg : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) long reqIdentifier;
|
||||
@property (nonatomic) long errCode;
|
||||
@property (nonatomic) NSString* _Nonnull errMsg;
|
||||
// skipped field Msg.Data with unsupported type: open_im_sdk/open_im_sdk.MsgData
|
||||
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkMsgData : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull sendID;
|
||||
@property (nonatomic) NSString* _Nonnull recvID;
|
||||
@property (nonatomic) int32_t sessionType;
|
||||
@property (nonatomic) int32_t msgFrom;
|
||||
@property (nonatomic) int32_t contentType;
|
||||
@property (nonatomic) NSString* _Nonnull serverMsgID;
|
||||
@property (nonatomic) NSString* _Nonnull content;
|
||||
@property (nonatomic) int64_t sendTime;
|
||||
@property (nonatomic) int64_t seq;
|
||||
@property (nonatomic) int32_t senderPlatformID;
|
||||
@property (nonatomic) NSString* _Nonnull senderNickName;
|
||||
@property (nonatomic) NSString* _Nonnull senderFaceURL;
|
||||
@property (nonatomic) NSString* _Nonnull clientMsgID;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkMsgStruct : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull clientMsgID;
|
||||
@property (nonatomic) NSString* _Nonnull serverMsgID;
|
||||
@property (nonatomic) int64_t createTime;
|
||||
@property (nonatomic) int64_t sendTime;
|
||||
@property (nonatomic) int32_t sessionType;
|
||||
@property (nonatomic) NSString* _Nonnull sendID;
|
||||
@property (nonatomic) NSString* _Nonnull recvID;
|
||||
@property (nonatomic) int32_t msgFrom;
|
||||
@property (nonatomic) int32_t contentType;
|
||||
@property (nonatomic) int32_t platformID;
|
||||
// skipped field MsgStruct.ForceList with unsupported type: []string
|
||||
|
||||
@property (nonatomic) NSString* _Nonnull senderNickName;
|
||||
@property (nonatomic) NSString* _Nonnull senderFaceURL;
|
||||
@property (nonatomic) NSString* _Nonnull groupID;
|
||||
@property (nonatomic) NSString* _Nonnull content;
|
||||
@property (nonatomic) int64_t seq;
|
||||
@property (nonatomic) BOOL isRead;
|
||||
@property (nonatomic) int32_t status;
|
||||
@property (nonatomic) NSString* _Nonnull remark;
|
||||
// skipped field MsgStruct.PictureElem with unsupported type: struct{SourcePath string "json:\"sourcePath\""; SourcePicture open_im_sdk/open_im_sdk.PictureBaseInfo "json:\"sourcePicture\""; BigPicture open_im_sdk/open_im_sdk.PictureBaseInfo "json:\"bigPicture\""; SnapshotPicture open_im_sdk/open_im_sdk.PictureBaseInfo "json:\"snapshotPicture\""}
|
||||
|
||||
// skipped field MsgStruct.SoundElem with unsupported type: struct{UUID string "json:\"uuid\""; SoundPath string "json:\"soundPath\""; SourceURL string "json:\"sourceUrl\""; DataSize int64 "json:\"dataSize\""; Duration int64 "json:\"duration\""}
|
||||
|
||||
// skipped field MsgStruct.VideoElem with unsupported type: struct{VideoPath string "json:\"videoPath\""; VideoUUID string "json:\"videoUUID\""; VideoURL string "json:\"videoUrl\""; VideoType string "json:\"videoType\""; VideoSize int64 "json:\"videoSize\""; Duration int64 "json:\"duration\""; SnapshotPath string "json:\"snapshotPath\""; SnapshotUUID string "json:\"snapshotUUID\""; SnapshotSize int64 "json:\"snapshotSize\""; SnapshotURL string "json:\"snapshotUrl\""; SnapshotWidth int32 "json:\"snapshotWidth\""; SnapshotHeight int32 "json:\"snapshotHeight\""}
|
||||
|
||||
// skipped field MsgStruct.FileElem with unsupported type: struct{FilePath string "json:\"filePath\""; UUID string "json:\"uuid\""; SourceURL string "json:\"sourceUrl\""; FileName string "json:\"fileName\""; FileSize int64 "json:\"fileSize\""}
|
||||
|
||||
// skipped field MsgStruct.MergeElem with unsupported type: struct{Title string "json:\"title\""; AbstractList []string "json:\"abstractList\""; MultiMessage []*open_im_sdk/open_im_sdk.MsgStruct "json:\"multiMessage\""}
|
||||
|
||||
// skipped field MsgStruct.RevokeMessage with unsupported type: struct{ServerMsgID string "json:\"serverMsgID\""; SendID string "json:\"sendID\""; SenderNickname string "json:\"senderNickname\""; RecvID string "json:\"recvID\""; GroupID string "json:\"groupID\""; ContentType int32 "json:\"contentType\""; SendTime int64 "json:\"sendTime\""}
|
||||
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkPictureBaseInfo : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull uuid;
|
||||
@property (nonatomic) NSString* _Nonnull type;
|
||||
@property (nonatomic) int64_t size;
|
||||
@property (nonatomic) int32_t width;
|
||||
@property (nonatomic) int32_t height;
|
||||
@property (nonatomic) NSString* _Nonnull url;
|
||||
@end
|
||||
|
||||
/**
|
||||
* //////////////////////// message/////////////////////////
|
||||
*/
|
||||
@interface Open_im_sdkPullMsgReq : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull userID;
|
||||
@property (nonatomic) NSString* _Nonnull groupID;
|
||||
@property (nonatomic) Open_im_sdkMsgStruct* _Nullable startMsg;
|
||||
@property (nonatomic) long count;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkPullUserMsgResp : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) long errCode;
|
||||
@property (nonatomic) NSString* _Nonnull errMsg;
|
||||
@property (nonatomic) long reqIdentifier;
|
||||
@property (nonatomic) long msgIncr;
|
||||
// skipped field PullUserMsgResp.Data with unsupported type: open_im_sdk/open_im_sdk.paramsPullUserMsgDataResp
|
||||
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkSendMsgRespFromServer : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) long errCode;
|
||||
@property (nonatomic) NSString* _Nonnull errMsg;
|
||||
@property (nonatomic) long reqIdentifier;
|
||||
// skipped field SendMsgRespFromServer.Data with unsupported type: struct{ServerMsgID string "json:\"serverMsgID\""; ClientMsgID string "json:\"clientMsgID\""; SendTime int64 "json:\"sendTime\""}
|
||||
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkSoundElem : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull uuid;
|
||||
@property (nonatomic) NSString* _Nonnull soundPath;
|
||||
@property (nonatomic) NSString* _Nonnull sourceURL;
|
||||
@property (nonatomic) int64_t dataSize;
|
||||
@property (nonatomic) int64_t duration;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkTransferGroupOwnerReq : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull groupID;
|
||||
@property (nonatomic) NSString* _Nonnull oldOwner;
|
||||
@property (nonatomic) NSString* _Nonnull newOwner;
|
||||
@property (nonatomic) NSString* _Nonnull operationID;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkUid2Flag : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull uid;
|
||||
@property (nonatomic) int32_t flag;
|
||||
@end
|
||||
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkAcceptFriendApplicationTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkAcceptGroupApplicationResultTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkAcceptGroupApplicationTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkAddConOrUpLatMsg;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkAddFriendTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkAtText;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkC2CMessageAsRead;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdAcceptFriend;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdAddFriend;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdBlackList;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdDeleteConversation;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdForceSyncFriend;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdForceSyncFriendApplication;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdForceSyncLoginUerInfo;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdForceSyncMsg;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdFriend;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdFriendApplication;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdFroceSyncBlackList;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdGeyLoginUserInfo;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdNewMsgCome;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdReLogin;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdRefuseFriend;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdUnInit;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdUpdateConversation;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkConAndUnreadChange;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkConChange;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkCreateGroupTip;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkDeFaultSuccessMsg;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkErrCodeConversation;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkErrCodeFriend;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkErrCodeGroup;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkErrCodeInitLogin;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkErrCodeUserInfo;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkFile;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkFriendAcceptTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkGroupActionAcceptGroupApplication;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkGroupActionApplyJoinGroup;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkGroupActionCreateGroup;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkGroupActionInviteUserToGroup;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkGroupActionKickGroupMember;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkGroupActionQuitGroup;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkGroupActionRefuseGroupApplication;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkGroupActionSetGroupInfo;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkGroupActionTransferGroupOwner;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkGroupApplicationResponseTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkGroupChatType;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkHasRead;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkIncrUnread;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkInviteUserToGroupTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkJoinGroupTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkKickGroupMemberTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkKickOnlineTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkLoginFailed;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkLoginSuccess;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkLogining;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkLogoutCmd;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkMerger;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkMessageHasNotRead;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkMessageHasRead;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkMsgStatusHasDeleted;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkMsgStatusSendFailed;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkMsgStatusSendSuccess;
|
||||
/**
|
||||
* MsgStatus
|
||||
*/
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkMsgStatusSending;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkNotRead;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkPicture;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkQuitGroupTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkRefuseFriendApplicationTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkRefuseGroupApplicationResultTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkRefuseGroupApplicationTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkRevokeMessageTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkSetGroupInfoTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkSetSelfInfoTip;
|
||||
/**
|
||||
* ///////////////////////////////////
|
||||
SessionType
|
||||
*/
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkSingleChatType;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkSound;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkSyncSenderMsg;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkSysMsgType;
|
||||
/**
|
||||
* ContentType
|
||||
*/
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkText;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkTimeOffset;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkTotalUnreadMessageChanged;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkTransferGroupOwnerTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkUnreadCountSetZero;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkUpdateFaceUrlAndNickName;
|
||||
/**
|
||||
* //////////////////////////////////////
|
||||
MsgFrom
|
||||
*/
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkUserMsgType;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkVideo;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkZoomScale;
|
||||
|
||||
@interface Open_im_sdk : NSObject
|
||||
// skipped variable ConListener with unsupported type: open_im_sdk/open_im_sdk.ConversationListener
|
||||
|
||||
// skipped variable ConversationCh with unsupported type: chan open_im_sdk/open_im_sdk.cmd2Value
|
||||
|
||||
// skipped variable FriendObj with unsupported type: open_im_sdk/open_im_sdk.Friend
|
||||
|
||||
+ (NSString* _Nonnull) loginUid;
|
||||
+ (void) setLoginUid:(NSString* _Nonnull)v;
|
||||
|
||||
// skipped variable SdkInitManager with unsupported type: open_im_sdk/open_im_sdk.IMManager
|
||||
|
||||
// skipped variable SvrConf with unsupported type: open_im_sdk/open_im_sdk.IMConfig
|
||||
|
||||
@end
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkAcceptFriendApplication(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable uid);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkAcceptGroupApplication(NSString* _Nullable application, NSString* _Nullable reason, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkAddAdvancedMsgListener(id<Open_im_sdkOnAdvancedMsgListener> _Nullable listener);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkAddFriend(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable paramsReq);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkAddToBlackList(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable blackUid);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkCheckFriend(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable uidList);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateFileMessage(NSString* _Nullable filePath, NSString* _Nullable fileName);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateForwardMessage(NSString* _Nullable m);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkCreateGroup(NSString* _Nullable gInfo, NSString* _Nullable memberList, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateImageMessage(NSString* _Nullable imagePath);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateImageMessageFromFullPath(NSString* _Nullable imageFullPath);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateMergerMessage(NSString* _Nullable messageList, NSString* _Nullable title, NSString* _Nullable summaryList);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateSoundMessage(NSString* _Nullable soundPath, int64_t duration);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateTextAtMessage(NSString* _Nullable text, NSString* _Nullable atUserList);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateTextMessage(NSString* _Nullable text);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateTextSystemMessage(NSString* _Nullable text, int32_t textType);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateVideoMessage(NSString* _Nullable videoPath, NSString* _Nullable videoType, int64_t duration, NSString* _Nullable snapshotPath);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateVideoMessageFromFullPath(NSString* _Nullable videoFullPath, NSString* _Nullable videoType, int64_t duration, NSString* _Nullable snapshotFullPath);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDeleteConversation(NSString* _Nullable conversationID, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDeleteFromBlackList(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable deleteUid);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDeleteFromFriendList(NSString* _Nullable deleteUid, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDeleteMessageFromLocalStorage(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable message);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDoCreateGroup(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDoGetGroupsInfo(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDoJoinGroup(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDoQuitGroup(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDoSetGroupInfo(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDotestGetGroupMemberList(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDotestGetGroupMembersInfo(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDotestGetJoinedGroupList(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDotestKickGroupMember(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDotesttestInviteUserToGroup(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkFindMessages(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable messageIDList);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkForceSyncBlackList(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkForceSyncFriend(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkForceSyncFriendApplication(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkForceSyncLoginUerInfo(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkForceSyncMsg(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkFriendApplication(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable uid, long flag);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetAllConversationList(id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetBlackList(id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkGetConversationIDBySessionType(NSString* _Nullable sourceID, long sessionType);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetFriendApplicationList(id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetFriendList(id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetFriendsInfo(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable uidList);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetGroupApplicationList(id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetGroupMemberList(NSString* _Nullable groupId, int32_t filter, int32_t next, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetGroupMembersInfo(NSString* _Nullable groupId, NSString* _Nullable userList, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetGroupsInfo(NSString* _Nullable groupIdList, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetHistoryMessageList(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable getMessageOptions);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetJoinedGroupList(id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT long Open_im_sdkGetLoginStatus(void);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkGetLoginUser(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetMultipleConversation(NSString* _Nullable conversationIDList, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetOneConversation(NSString* _Nullable sourceID, long sessionType, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetTotalUnreadMsgCount(id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetUsersInfo(NSString* _Nullable uIDList, id<Open_im_sdkBase> _Nullable cb);
|
||||
|
||||
FOUNDATION_EXPORT BOOL Open_im_sdkInitSDK(NSString* _Nullable config, id<Open_im_sdkIMSDKListener> _Nullable cb);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkInsertSingleMessageToLocalStorage(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable message, NSString* _Nullable userID, NSString* _Nullable sender);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkInviteUserToGroup(NSString* _Nullable groupId, NSString* _Nullable reason, NSString* _Nullable userList, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkJoinGroup(NSString* _Nullable groupId, NSString* _Nullable message, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkKickGroupMember(NSString* _Nullable groupId, NSString* _Nullable userList, NSString* _Nullable reason, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkLogin(NSString* _Nullable uid, NSString* _Nullable tk, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkLogout(id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkMarkC2CMessageAsRead(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable receiver, NSString* _Nullable msgList);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkMarkSingleMessageHasRead(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable userID);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkMd5(NSString* _Nullable s);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkPinConversation(NSString* _Nullable conversationID, BOOL isPinned, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkQuitGroup(NSString* _Nullable groupId, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkRefuseFriendApplication(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable uid);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkRefuseGroupApplication(NSString* _Nullable application, NSString* _Nullable reason, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkRemoveAdvancedMsgListener(id<Open_im_sdkOnAdvancedMsgListener> _Nullable listener);
|
||||
|
||||
FOUNDATION_EXPORT BOOL Open_im_sdkResetConversation(NSString* _Nullable conversationID, NSError* _Nullable* _Nullable error);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkRevokeMessage(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable message);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkSendMessage(id<Open_im_sdkSendMsgCallBack> _Nullable callback, NSString* _Nullable message, NSString* _Nullable receiver, NSString* _Nullable groupID, BOOL onlineUserOnly);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkSetConversationDraft(NSString* _Nullable conversationID, NSString* _Nullable draftText, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkSetConversationListener(id<Open_im_sdkOnConversationListener> _Nullable listener);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkSetFriendInfo(NSString* _Nullable comment, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT BOOL Open_im_sdkSetFriendListener(id<Open_im_sdkOnFriendshipListener> _Nullable listener);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkSetGroupInfo(NSString* _Nullable jsonGroupInfo, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkSetGroupListener(id<Open_im_sdkOnGroupListener> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkSetSelfInfo(NSString* _Nullable info, id<Open_im_sdkBase> _Nullable cb);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkTencentOssCredentials(id<Open_im_sdkBase> _Nullable cb);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkTransferGroupOwner(NSString* _Nullable groupId, NSString* _Nullable userId, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkUnInitSDK(void);
|
||||
|
||||
// skipped function UnixSecondToTime with unsupported parameter or return types
|
||||
|
||||
|
||||
@class Open_im_sdkBase;
|
||||
|
||||
@class Open_im_sdkIMSDKListener;
|
||||
|
||||
@class Open_im_sdkOnAdvancedMsgListener;
|
||||
|
||||
@class Open_im_sdkOnConversationListener;
|
||||
|
||||
@class Open_im_sdkOnFriendshipListener;
|
||||
|
||||
@class Open_im_sdkOnGroupListener;
|
||||
|
||||
@class Open_im_sdkSendMsgCallBack;
|
||||
|
||||
@interface Open_im_sdkBase : NSObject <goSeqRefInterface, Open_im_sdkBase> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (void)onError:(long)errCode errMsg:(NSString* _Nullable)errMsg;
|
||||
- (void)onSuccess:(NSString* _Nullable)data;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkIMSDKListener : NSObject <goSeqRefInterface, Open_im_sdkIMSDKListener> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (void)onConnectFailed:(long)ErrCode ErrMsg:(NSString* _Nullable)ErrMsg;
|
||||
- (void)onConnectSuccess;
|
||||
- (void)onConnecting;
|
||||
- (void)onKickedOffline;
|
||||
- (void)onSelfInfoUpdated:(NSString* _Nullable)userInfo;
|
||||
- (void)onUserTokenExpired;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkOnAdvancedMsgListener : NSObject <goSeqRefInterface, Open_im_sdkOnAdvancedMsgListener> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (void)onRecvC2CReadReceipt:(NSString* _Nullable)msgReceiptList;
|
||||
- (void)onRecvMessageRevoked:(NSString* _Nullable)msgId;
|
||||
- (void)onRecvNewMessage:(NSString* _Nullable)message;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkOnConversationListener : NSObject <goSeqRefInterface, Open_im_sdkOnConversationListener> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (void)onConversationChanged:(NSString* _Nullable)conversationList;
|
||||
- (void)onNewConversation:(NSString* _Nullable)conversationList;
|
||||
- (void)onSyncServerFailed;
|
||||
- (void)onSyncServerFinish;
|
||||
- (void)onSyncServerStart;
|
||||
- (void)onTotalUnreadMessageCountChanged:(int32_t)totalUnreadCount;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkOnFriendshipListener : NSObject <goSeqRefInterface, Open_im_sdkOnFriendshipListener> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (void)onBlackListAdd:(NSString* _Nullable)userInfo;
|
||||
- (void)onBlackListDeleted:(NSString* _Nullable)userInfo;
|
||||
- (void)onFriendApplicationListAccept:(NSString* _Nullable)applyUserInfo;
|
||||
- (void)onFriendApplicationListAdded:(NSString* _Nullable)applyUserInfo;
|
||||
- (void)onFriendApplicationListDeleted:(NSString* _Nullable)applyUserInfo;
|
||||
- (void)onFriendApplicationListReject:(NSString* _Nullable)applyUserInfo;
|
||||
- (void)onFriendInfoChanged:(NSString* _Nullable)friendInfo;
|
||||
- (void)onFriendListAdded:(NSString* _Nullable)friendInfo;
|
||||
- (void)onFriendListDeleted:(NSString* _Nullable)friendInfo;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkOnGroupListener : NSObject <goSeqRefInterface, Open_im_sdkOnGroupListener> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (void)onApplicationProcessed:(NSString* _Nullable)groupId opUser:(NSString* _Nullable)opUser AgreeOrReject:(int32_t)AgreeOrReject opReason:(NSString* _Nullable)opReason;
|
||||
- (void)onGroupCreated:(NSString* _Nullable)groupId;
|
||||
- (void)onGroupInfoChanged:(NSString* _Nullable)groupId groupInfo:(NSString* _Nullable)groupInfo;
|
||||
/**
|
||||
* list->group
|
||||
*/
|
||||
- (void)onMemberEnter:(NSString* _Nullable)groupId memberList:(NSString* _Nullable)memberList;
|
||||
/**
|
||||
* list->opUser->groupId
|
||||
*/
|
||||
- (void)onMemberInvited:(NSString* _Nullable)groupId opUser:(NSString* _Nullable)opUser memberList:(NSString* _Nullable)memberList;
|
||||
- (void)onMemberKicked:(NSString* _Nullable)groupId opUser:(NSString* _Nullable)opUser memberList:(NSString* _Nullable)memberList;
|
||||
/**
|
||||
* group->one
|
||||
*/
|
||||
- (void)onMemberLeave:(NSString* _Nullable)groupId member:(NSString* _Nullable)member;
|
||||
- (void)onReceiveJoinApplication:(NSString* _Nullable)groupId member:(NSString* _Nullable)member opReason:(NSString* _Nullable)opReason;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkSendMsgCallBack : NSObject <goSeqRefInterface, Open_im_sdkSendMsgCallBack> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (void)onError:(long)errCode errMsg:(NSString* _Nullable)errMsg;
|
||||
- (void)onProgress:(long)progress;
|
||||
- (void)onSuccess:(NSString* _Nullable)data;
|
||||
@end
|
||||
|
||||
#endif
|
@ -0,0 +1,29 @@
|
||||
// Objective-C API for talking to Go package.
|
||||
// gobind -lang=objc
|
||||
//
|
||||
// File is generated by gobind. Do not edit.
|
||||
|
||||
#ifndef __Universe_H__
|
||||
#define __Universe_H__
|
||||
|
||||
@import Foundation;
|
||||
#include "ref.h"
|
||||
|
||||
@protocol Universeerror;
|
||||
@class Universeerror;
|
||||
|
||||
@protocol Universeerror <NSObject>
|
||||
- (NSString* _Nonnull)error;
|
||||
@end
|
||||
|
||||
@class Universeerror;
|
||||
|
||||
@interface Universeerror : NSError <goSeqRefInterface, Universeerror> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (NSString* _Nonnull)error;
|
||||
@end
|
||||
|
||||
#endif
|
35
ios/Framework/OpenIMCore.framework/Versions/A/Headers/ref.h
Normal file
35
ios/Framework/OpenIMCore.framework/Versions/A/Headers/ref.h
Normal file
@ -0,0 +1,35 @@
|
||||
// Copyright 2015 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
#ifndef __GO_REF_HDR__
|
||||
#define __GO_REF_HDR__
|
||||
|
||||
#include <Foundation/Foundation.h>
|
||||
|
||||
// GoSeqRef is an object tagged with an integer for passing back and
|
||||
// forth across the language boundary. A GoSeqRef may represent either
|
||||
// an instance of a Go object, or an Objective-C object passed to Go.
|
||||
// The explicit allocation of a GoSeqRef is used to pin a Go object
|
||||
// when it is passed to Objective-C. The Go seq package maintains a
|
||||
// reference to the Go object in a map keyed by the refnum along with
|
||||
// a reference count. When the reference count reaches zero, the Go
|
||||
// seq package will clear the corresponding entry in the map.
|
||||
@interface GoSeqRef : NSObject {
|
||||
}
|
||||
@property(readonly) int32_t refnum;
|
||||
@property(strong) id obj; // NULL when representing a Go object.
|
||||
|
||||
// new GoSeqRef object to proxy a Go object. The refnum must be
|
||||
// provided from Go side.
|
||||
- (instancetype)initWithRefnum:(int32_t)refnum obj:(id)obj;
|
||||
|
||||
- (int32_t)incNum;
|
||||
|
||||
@end
|
||||
|
||||
@protocol goSeqRefInterface
|
||||
-(GoSeqRef*) _ref;
|
||||
@end
|
||||
|
||||
#endif
|
@ -0,0 +1,8 @@
|
||||
framework module "OpenIMCore" {
|
||||
header "ref.h"
|
||||
header "Open_im_sdk.objc.h"
|
||||
header "Universe.objc.h"
|
||||
header "OpenIMCore.h"
|
||||
|
||||
export *
|
||||
}
|
BIN
ios/Framework/OpenIMCore.framework/Versions/A/OpenIMCore
Normal file
BIN
ios/Framework/OpenIMCore.framework/Versions/A/OpenIMCore
Normal file
Binary file not shown.
@ -0,0 +1,6 @@
|
||||
<?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>
|
||||
</dict>
|
||||
</plist>
|
@ -0,0 +1,13 @@
|
||||
|
||||
// Objective-C API for talking to the following Go packages
|
||||
//
|
||||
// open_im_sdk/open_im_sdk
|
||||
//
|
||||
// File is generated by gomobile bind. Do not edit.
|
||||
#ifndef __OpenIMCore_FRAMEWORK_H__
|
||||
#define __OpenIMCore_FRAMEWORK_H__
|
||||
|
||||
#include "Open_im_sdk.objc.h"
|
||||
#include "Universe.objc.h"
|
||||
|
||||
#endif
|
@ -0,0 +1,882 @@
|
||||
// Objective-C API for talking to open_im_sdk/open_im_sdk Go package.
|
||||
// gobind -lang=objc open_im_sdk/open_im_sdk
|
||||
//
|
||||
// File is generated by gobind. Do not edit.
|
||||
|
||||
#ifndef __Open_im_sdk_H__
|
||||
#define __Open_im_sdk_H__
|
||||
|
||||
@import Foundation;
|
||||
#include "ref.h"
|
||||
#include "Universe.objc.h"
|
||||
|
||||
|
||||
@class Open_im_sdkAgreeOrRejectGroupMember;
|
||||
@class Open_im_sdkArrMsg;
|
||||
@class Open_im_sdkChatLog;
|
||||
@class Open_im_sdkConversationListener;
|
||||
@class Open_im_sdkConversationStruct;
|
||||
@class Open_im_sdkFriend;
|
||||
@class Open_im_sdkGroupApplicationResponseReq;
|
||||
@class Open_im_sdkGroupReqListInfo;
|
||||
@class Open_im_sdkIMConfig;
|
||||
@class Open_im_sdkIMManager;
|
||||
@class Open_im_sdkInviteUserToGroupReq;
|
||||
@class Open_im_sdkKickGroupMemberReq;
|
||||
@class Open_im_sdkLogInfo;
|
||||
@class Open_im_sdkMessageReceipt;
|
||||
@class Open_im_sdkMsg;
|
||||
@class Open_im_sdkMsgData;
|
||||
@class Open_im_sdkMsgStruct;
|
||||
@class Open_im_sdkPictureBaseInfo;
|
||||
@class Open_im_sdkPullMsgReq;
|
||||
@class Open_im_sdkPullUserMsgResp;
|
||||
@class Open_im_sdkSendMsgRespFromServer;
|
||||
@class Open_im_sdkSoundElem;
|
||||
@class Open_im_sdkTransferGroupOwnerReq;
|
||||
@class Open_im_sdkUid2Flag;
|
||||
@protocol Open_im_sdkBase;
|
||||
@class Open_im_sdkBase;
|
||||
@protocol Open_im_sdkIMSDKListener;
|
||||
@class Open_im_sdkIMSDKListener;
|
||||
@protocol Open_im_sdkOnAdvancedMsgListener;
|
||||
@class Open_im_sdkOnAdvancedMsgListener;
|
||||
@protocol Open_im_sdkOnConversationListener;
|
||||
@class Open_im_sdkOnConversationListener;
|
||||
@protocol Open_im_sdkOnFriendshipListener;
|
||||
@class Open_im_sdkOnFriendshipListener;
|
||||
@protocol Open_im_sdkOnGroupListener;
|
||||
@class Open_im_sdkOnGroupListener;
|
||||
@protocol Open_im_sdkSendMsgCallBack;
|
||||
@class Open_im_sdkSendMsgCallBack;
|
||||
|
||||
@protocol Open_im_sdkBase <NSObject>
|
||||
- (void)onError:(long)errCode errMsg:(NSString* _Nullable)errMsg;
|
||||
- (void)onSuccess:(NSString* _Nullable)data;
|
||||
@end
|
||||
|
||||
@protocol Open_im_sdkIMSDKListener <NSObject>
|
||||
- (void)onConnectFailed:(long)ErrCode ErrMsg:(NSString* _Nullable)ErrMsg;
|
||||
- (void)onConnectSuccess;
|
||||
- (void)onConnecting;
|
||||
- (void)onKickedOffline;
|
||||
- (void)onSelfInfoUpdated:(NSString* _Nullable)userInfo;
|
||||
- (void)onUserTokenExpired;
|
||||
@end
|
||||
|
||||
@protocol Open_im_sdkOnAdvancedMsgListener <NSObject>
|
||||
- (void)onRecvC2CReadReceipt:(NSString* _Nullable)msgReceiptList;
|
||||
- (void)onRecvMessageRevoked:(NSString* _Nullable)msgId;
|
||||
- (void)onRecvNewMessage:(NSString* _Nullable)message;
|
||||
@end
|
||||
|
||||
@protocol Open_im_sdkOnConversationListener <NSObject>
|
||||
- (void)onConversationChanged:(NSString* _Nullable)conversationList;
|
||||
- (void)onNewConversation:(NSString* _Nullable)conversationList;
|
||||
- (void)onSyncServerFailed;
|
||||
- (void)onSyncServerFinish;
|
||||
- (void)onSyncServerStart;
|
||||
- (void)onTotalUnreadMessageCountChanged:(int32_t)totalUnreadCount;
|
||||
@end
|
||||
|
||||
@protocol Open_im_sdkOnFriendshipListener <NSObject>
|
||||
- (void)onBlackListAdd:(NSString* _Nullable)userInfo;
|
||||
- (void)onBlackListDeleted:(NSString* _Nullable)userInfo;
|
||||
- (void)onFriendApplicationListAccept:(NSString* _Nullable)applyUserInfo;
|
||||
- (void)onFriendApplicationListAdded:(NSString* _Nullable)applyUserInfo;
|
||||
- (void)onFriendApplicationListDeleted:(NSString* _Nullable)applyUserInfo;
|
||||
- (void)onFriendApplicationListReject:(NSString* _Nullable)applyUserInfo;
|
||||
- (void)onFriendInfoChanged:(NSString* _Nullable)friendInfo;
|
||||
- (void)onFriendListAdded:(NSString* _Nullable)friendInfo;
|
||||
- (void)onFriendListDeleted:(NSString* _Nullable)friendInfo;
|
||||
@end
|
||||
|
||||
@protocol Open_im_sdkOnGroupListener <NSObject>
|
||||
- (void)onApplicationProcessed:(NSString* _Nullable)groupId opUser:(NSString* _Nullable)opUser AgreeOrReject:(int32_t)AgreeOrReject opReason:(NSString* _Nullable)opReason;
|
||||
- (void)onGroupCreated:(NSString* _Nullable)groupId;
|
||||
- (void)onGroupInfoChanged:(NSString* _Nullable)groupId groupInfo:(NSString* _Nullable)groupInfo;
|
||||
- (void)onMemberEnter:(NSString* _Nullable)groupId memberList:(NSString* _Nullable)memberList;
|
||||
- (void)onMemberInvited:(NSString* _Nullable)groupId opUser:(NSString* _Nullable)opUser memberList:(NSString* _Nullable)memberList;
|
||||
- (void)onMemberKicked:(NSString* _Nullable)groupId opUser:(NSString* _Nullable)opUser memberList:(NSString* _Nullable)memberList;
|
||||
- (void)onMemberLeave:(NSString* _Nullable)groupId member:(NSString* _Nullable)member;
|
||||
- (void)onReceiveJoinApplication:(NSString* _Nullable)groupId member:(NSString* _Nullable)member opReason:(NSString* _Nullable)opReason;
|
||||
@end
|
||||
|
||||
@protocol Open_im_sdkSendMsgCallBack <NSObject>
|
||||
- (void)onError:(long)errCode errMsg:(NSString* _Nullable)errMsg;
|
||||
- (void)onProgress:(long)progress;
|
||||
- (void)onSuccess:(NSString* _Nullable)data;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkAgreeOrRejectGroupMember : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull groupId;
|
||||
@property (nonatomic) NSString* _Nonnull userId;
|
||||
@property (nonatomic) long role;
|
||||
// skipped field AgreeOrRejectGroupMember.JoinTime with unsupported type: uint64
|
||||
|
||||
@property (nonatomic) NSString* _Nonnull nickName;
|
||||
@property (nonatomic) NSString* _Nonnull faceUrl;
|
||||
@property (nonatomic) NSString* _Nonnull reason;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkArrMsg : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
// skipped field ArrMsg.Data with unsupported type: []open_im_sdk/open_im_sdk.MsgData
|
||||
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkChatLog : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull msgId;
|
||||
@property (nonatomic) NSString* _Nonnull sendID;
|
||||
@property (nonatomic) int32_t isRead;
|
||||
@property (nonatomic) int64_t seq;
|
||||
@property (nonatomic) int32_t status;
|
||||
@property (nonatomic) int32_t sessionType;
|
||||
@property (nonatomic) NSString* _Nonnull recvID;
|
||||
@property (nonatomic) int32_t contentType;
|
||||
@property (nonatomic) int32_t msgFrom;
|
||||
@property (nonatomic) NSString* _Nonnull content;
|
||||
// skipped field ChatLog.Remark with unsupported type: database/sql.NullString
|
||||
|
||||
@property (nonatomic) int32_t senderPlatformID;
|
||||
@property (nonatomic) int64_t sendTime;
|
||||
@property (nonatomic) int64_t createTime;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkConversationListener : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) id<Open_im_sdkOnConversationListener> _Nullable conversationListener;
|
||||
// skipped field ConversationListener.MsgListenerList with unsupported type: []open_im_sdk/open_im_sdk.OnAdvancedMsgListener
|
||||
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkConversationStruct : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull conversationID;
|
||||
@property (nonatomic) long conversationType;
|
||||
@property (nonatomic) NSString* _Nonnull userID;
|
||||
@property (nonatomic) NSString* _Nonnull groupID;
|
||||
@property (nonatomic) NSString* _Nonnull showName;
|
||||
@property (nonatomic) NSString* _Nonnull faceURL;
|
||||
@property (nonatomic) long recvMsgOpt;
|
||||
@property (nonatomic) long unreadCount;
|
||||
@property (nonatomic) NSString* _Nonnull latestMsg;
|
||||
@property (nonatomic) int64_t latestMsgSendTime;
|
||||
@property (nonatomic) NSString* _Nonnull draftText;
|
||||
@property (nonatomic) int64_t draftTimestamp;
|
||||
@property (nonatomic) long isPinned;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkFriend : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkGroupApplicationResponseReq : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull operationID;
|
||||
@property (nonatomic) NSString* _Nonnull ownerID;
|
||||
@property (nonatomic) NSString* _Nonnull groupID;
|
||||
@property (nonatomic) NSString* _Nonnull fromUserID;
|
||||
@property (nonatomic) NSString* _Nonnull fromUserNickName;
|
||||
@property (nonatomic) NSString* _Nonnull fromUserFaceUrl;
|
||||
@property (nonatomic) NSString* _Nonnull toUserID;
|
||||
@property (nonatomic) NSString* _Nonnull toUserNickName;
|
||||
@property (nonatomic) NSString* _Nonnull toUserFaceUrl;
|
||||
@property (nonatomic) int64_t addTime;
|
||||
@property (nonatomic) NSString* _Nonnull requestMsg;
|
||||
@property (nonatomic) NSString* _Nonnull handledMsg;
|
||||
@property (nonatomic) int32_t type;
|
||||
@property (nonatomic) int32_t handleStatus;
|
||||
@property (nonatomic) int32_t handleResult;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkGroupReqListInfo : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull id_;
|
||||
@property (nonatomic) NSString* _Nonnull groupID;
|
||||
@property (nonatomic) NSString* _Nonnull fromUserID;
|
||||
@property (nonatomic) NSString* _Nonnull toUserID;
|
||||
@property (nonatomic) int32_t flag;
|
||||
@property (nonatomic) NSString* _Nonnull requestMsg;
|
||||
@property (nonatomic) NSString* _Nonnull handledMsg;
|
||||
@property (nonatomic) int64_t addTime;
|
||||
@property (nonatomic) NSString* _Nonnull fromUserNickname;
|
||||
@property (nonatomic) NSString* _Nonnull toUserNickname;
|
||||
@property (nonatomic) NSString* _Nonnull fromUserFaceUrl;
|
||||
@property (nonatomic) NSString* _Nonnull toUserFaceUrl;
|
||||
@property (nonatomic) NSString* _Nonnull handledUser;
|
||||
@property (nonatomic) int32_t type;
|
||||
@property (nonatomic) int32_t handleStatus;
|
||||
@property (nonatomic) int32_t handleResult;
|
||||
@property (nonatomic) int32_t isRead;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkIMConfig : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) int32_t platform;
|
||||
@property (nonatomic) NSString* _Nonnull ipApiAddr;
|
||||
@property (nonatomic) NSString* _Nonnull ipWsAddr;
|
||||
@property (nonatomic) NSString* _Nonnull dbDir;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkIMManager : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) long loginState;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkInviteUserToGroupReq : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull op;
|
||||
@property (nonatomic) NSString* _Nonnull groupID;
|
||||
@property (nonatomic) NSString* _Nonnull reason;
|
||||
// skipped field InviteUserToGroupReq.UidList with unsupported type: []string
|
||||
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkKickGroupMemberReq : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull op;
|
||||
@property (nonatomic) NSString* _Nonnull groupID;
|
||||
@property (nonatomic) NSString* _Nonnull reason;
|
||||
// skipped field KickGroupMemberReq.UidList with unsupported type: []string
|
||||
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkLogInfo : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull info;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkMessageReceipt : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull userID;
|
||||
// skipped field MessageReceipt.MsgIdList with unsupported type: []string
|
||||
|
||||
@property (nonatomic) int64_t readTime;
|
||||
@property (nonatomic) int32_t msgFrom;
|
||||
@property (nonatomic) int32_t contentType;
|
||||
@property (nonatomic) int32_t sessionType;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkMsg : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) long reqIdentifier;
|
||||
@property (nonatomic) long errCode;
|
||||
@property (nonatomic) NSString* _Nonnull errMsg;
|
||||
// skipped field Msg.Data with unsupported type: open_im_sdk/open_im_sdk.MsgData
|
||||
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkMsgData : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull sendID;
|
||||
@property (nonatomic) NSString* _Nonnull recvID;
|
||||
@property (nonatomic) int32_t sessionType;
|
||||
@property (nonatomic) int32_t msgFrom;
|
||||
@property (nonatomic) int32_t contentType;
|
||||
@property (nonatomic) NSString* _Nonnull serverMsgID;
|
||||
@property (nonatomic) NSString* _Nonnull content;
|
||||
@property (nonatomic) int64_t sendTime;
|
||||
@property (nonatomic) int64_t seq;
|
||||
@property (nonatomic) int32_t senderPlatformID;
|
||||
@property (nonatomic) NSString* _Nonnull senderNickName;
|
||||
@property (nonatomic) NSString* _Nonnull senderFaceURL;
|
||||
@property (nonatomic) NSString* _Nonnull clientMsgID;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkMsgStruct : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull clientMsgID;
|
||||
@property (nonatomic) NSString* _Nonnull serverMsgID;
|
||||
@property (nonatomic) int64_t createTime;
|
||||
@property (nonatomic) int64_t sendTime;
|
||||
@property (nonatomic) int32_t sessionType;
|
||||
@property (nonatomic) NSString* _Nonnull sendID;
|
||||
@property (nonatomic) NSString* _Nonnull recvID;
|
||||
@property (nonatomic) int32_t msgFrom;
|
||||
@property (nonatomic) int32_t contentType;
|
||||
@property (nonatomic) int32_t platformID;
|
||||
// skipped field MsgStruct.ForceList with unsupported type: []string
|
||||
|
||||
@property (nonatomic) NSString* _Nonnull senderNickName;
|
||||
@property (nonatomic) NSString* _Nonnull senderFaceURL;
|
||||
@property (nonatomic) NSString* _Nonnull groupID;
|
||||
@property (nonatomic) NSString* _Nonnull content;
|
||||
@property (nonatomic) int64_t seq;
|
||||
@property (nonatomic) BOOL isRead;
|
||||
@property (nonatomic) int32_t status;
|
||||
@property (nonatomic) NSString* _Nonnull remark;
|
||||
// skipped field MsgStruct.PictureElem with unsupported type: struct{SourcePath string "json:\"sourcePath\""; SourcePicture open_im_sdk/open_im_sdk.PictureBaseInfo "json:\"sourcePicture\""; BigPicture open_im_sdk/open_im_sdk.PictureBaseInfo "json:\"bigPicture\""; SnapshotPicture open_im_sdk/open_im_sdk.PictureBaseInfo "json:\"snapshotPicture\""}
|
||||
|
||||
// skipped field MsgStruct.SoundElem with unsupported type: struct{UUID string "json:\"uuid\""; SoundPath string "json:\"soundPath\""; SourceURL string "json:\"sourceUrl\""; DataSize int64 "json:\"dataSize\""; Duration int64 "json:\"duration\""}
|
||||
|
||||
// skipped field MsgStruct.VideoElem with unsupported type: struct{VideoPath string "json:\"videoPath\""; VideoUUID string "json:\"videoUUID\""; VideoURL string "json:\"videoUrl\""; VideoType string "json:\"videoType\""; VideoSize int64 "json:\"videoSize\""; Duration int64 "json:\"duration\""; SnapshotPath string "json:\"snapshotPath\""; SnapshotUUID string "json:\"snapshotUUID\""; SnapshotSize int64 "json:\"snapshotSize\""; SnapshotURL string "json:\"snapshotUrl\""; SnapshotWidth int32 "json:\"snapshotWidth\""; SnapshotHeight int32 "json:\"snapshotHeight\""}
|
||||
|
||||
// skipped field MsgStruct.FileElem with unsupported type: struct{FilePath string "json:\"filePath\""; UUID string "json:\"uuid\""; SourceURL string "json:\"sourceUrl\""; FileName string "json:\"fileName\""; FileSize int64 "json:\"fileSize\""}
|
||||
|
||||
// skipped field MsgStruct.MergeElem with unsupported type: struct{Title string "json:\"title\""; AbstractList []string "json:\"abstractList\""; MultiMessage []*open_im_sdk/open_im_sdk.MsgStruct "json:\"multiMessage\""}
|
||||
|
||||
// skipped field MsgStruct.RevokeMessage with unsupported type: struct{ServerMsgID string "json:\"serverMsgID\""; SendID string "json:\"sendID\""; SenderNickname string "json:\"senderNickname\""; RecvID string "json:\"recvID\""; GroupID string "json:\"groupID\""; ContentType int32 "json:\"contentType\""; SendTime int64 "json:\"sendTime\""}
|
||||
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkPictureBaseInfo : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull uuid;
|
||||
@property (nonatomic) NSString* _Nonnull type;
|
||||
@property (nonatomic) int64_t size;
|
||||
@property (nonatomic) int32_t width;
|
||||
@property (nonatomic) int32_t height;
|
||||
@property (nonatomic) NSString* _Nonnull url;
|
||||
@end
|
||||
|
||||
/**
|
||||
* //////////////////////// message/////////////////////////
|
||||
*/
|
||||
@interface Open_im_sdkPullMsgReq : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull userID;
|
||||
@property (nonatomic) NSString* _Nonnull groupID;
|
||||
@property (nonatomic) Open_im_sdkMsgStruct* _Nullable startMsg;
|
||||
@property (nonatomic) long count;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkPullUserMsgResp : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) long errCode;
|
||||
@property (nonatomic) NSString* _Nonnull errMsg;
|
||||
@property (nonatomic) long reqIdentifier;
|
||||
@property (nonatomic) long msgIncr;
|
||||
// skipped field PullUserMsgResp.Data with unsupported type: open_im_sdk/open_im_sdk.paramsPullUserMsgDataResp
|
||||
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkSendMsgRespFromServer : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) long errCode;
|
||||
@property (nonatomic) NSString* _Nonnull errMsg;
|
||||
@property (nonatomic) long reqIdentifier;
|
||||
// skipped field SendMsgRespFromServer.Data with unsupported type: struct{ServerMsgID string "json:\"serverMsgID\""; ClientMsgID string "json:\"clientMsgID\""; SendTime int64 "json:\"sendTime\""}
|
||||
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkSoundElem : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull uuid;
|
||||
@property (nonatomic) NSString* _Nonnull soundPath;
|
||||
@property (nonatomic) NSString* _Nonnull sourceURL;
|
||||
@property (nonatomic) int64_t dataSize;
|
||||
@property (nonatomic) int64_t duration;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkTransferGroupOwnerReq : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull groupID;
|
||||
@property (nonatomic) NSString* _Nonnull oldOwner;
|
||||
@property (nonatomic) NSString* _Nonnull newOwner;
|
||||
@property (nonatomic) NSString* _Nonnull operationID;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkUid2Flag : NSObject <goSeqRefInterface> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (nonnull instancetype)init;
|
||||
@property (nonatomic) NSString* _Nonnull uid;
|
||||
@property (nonatomic) int32_t flag;
|
||||
@end
|
||||
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkAcceptFriendApplicationTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkAcceptGroupApplicationResultTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkAcceptGroupApplicationTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkAddConOrUpLatMsg;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkAddFriendTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkAtText;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkC2CMessageAsRead;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdAcceptFriend;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdAddFriend;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdBlackList;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdDeleteConversation;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdForceSyncFriend;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdForceSyncFriendApplication;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdForceSyncLoginUerInfo;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdForceSyncMsg;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdFriend;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdFriendApplication;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdFroceSyncBlackList;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdGeyLoginUserInfo;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdNewMsgCome;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdReLogin;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdRefuseFriend;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdUnInit;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkCmdUpdateConversation;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkConAndUnreadChange;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkConChange;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkCreateGroupTip;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkDeFaultSuccessMsg;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkErrCodeConversation;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkErrCodeFriend;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkErrCodeGroup;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkErrCodeInitLogin;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkErrCodeUserInfo;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkFile;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkFriendAcceptTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkGroupActionAcceptGroupApplication;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkGroupActionApplyJoinGroup;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkGroupActionCreateGroup;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkGroupActionInviteUserToGroup;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkGroupActionKickGroupMember;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkGroupActionQuitGroup;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkGroupActionRefuseGroupApplication;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkGroupActionSetGroupInfo;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkGroupActionTransferGroupOwner;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkGroupApplicationResponseTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkGroupChatType;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkHasRead;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkIncrUnread;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkInviteUserToGroupTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkJoinGroupTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkKickGroupMemberTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkKickOnlineTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkLoginFailed;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkLoginSuccess;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkLogining;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkLogoutCmd;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkMerger;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkMessageHasNotRead;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkMessageHasRead;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkMsgStatusHasDeleted;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkMsgStatusSendFailed;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkMsgStatusSendSuccess;
|
||||
/**
|
||||
* MsgStatus
|
||||
*/
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkMsgStatusSending;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkNotRead;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkPicture;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkQuitGroupTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkRefuseFriendApplicationTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkRefuseGroupApplicationResultTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkRefuseGroupApplicationTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkRevokeMessageTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkSetGroupInfoTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkSetSelfInfoTip;
|
||||
/**
|
||||
* ///////////////////////////////////
|
||||
SessionType
|
||||
*/
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkSingleChatType;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkSound;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkSyncSenderMsg;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkSysMsgType;
|
||||
/**
|
||||
* ContentType
|
||||
*/
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkText;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkTimeOffset;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkTotalUnreadMessageChanged;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkTransferGroupOwnerTip;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkUnreadCountSetZero;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkUpdateFaceUrlAndNickName;
|
||||
/**
|
||||
* //////////////////////////////////////
|
||||
MsgFrom
|
||||
*/
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkUserMsgType;
|
||||
FOUNDATION_EXPORT const int64_t Open_im_sdkVideo;
|
||||
FOUNDATION_EXPORT NSString* _Nonnull const Open_im_sdkZoomScale;
|
||||
|
||||
@interface Open_im_sdk : NSObject
|
||||
// skipped variable ConListener with unsupported type: open_im_sdk/open_im_sdk.ConversationListener
|
||||
|
||||
// skipped variable ConversationCh with unsupported type: chan open_im_sdk/open_im_sdk.cmd2Value
|
||||
|
||||
// skipped variable FriendObj with unsupported type: open_im_sdk/open_im_sdk.Friend
|
||||
|
||||
+ (NSString* _Nonnull) loginUid;
|
||||
+ (void) setLoginUid:(NSString* _Nonnull)v;
|
||||
|
||||
// skipped variable SdkInitManager with unsupported type: open_im_sdk/open_im_sdk.IMManager
|
||||
|
||||
// skipped variable SvrConf with unsupported type: open_im_sdk/open_im_sdk.IMConfig
|
||||
|
||||
@end
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkAcceptFriendApplication(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable uid);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkAcceptGroupApplication(NSString* _Nullable application, NSString* _Nullable reason, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkAddAdvancedMsgListener(id<Open_im_sdkOnAdvancedMsgListener> _Nullable listener);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkAddFriend(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable paramsReq);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkAddToBlackList(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable blackUid);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkCheckFriend(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable uidList);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateFileMessage(NSString* _Nullable filePath, NSString* _Nullable fileName);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateForwardMessage(NSString* _Nullable m);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkCreateGroup(NSString* _Nullable gInfo, NSString* _Nullable memberList, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateImageMessage(NSString* _Nullable imagePath);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateImageMessageFromFullPath(NSString* _Nullable imageFullPath);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateMergerMessage(NSString* _Nullable messageList, NSString* _Nullable title, NSString* _Nullable summaryList);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateSoundMessage(NSString* _Nullable soundPath, int64_t duration);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateTextAtMessage(NSString* _Nullable text, NSString* _Nullable atUserList);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateTextMessage(NSString* _Nullable text);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateTextSystemMessage(NSString* _Nullable text, int32_t textType);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateVideoMessage(NSString* _Nullable videoPath, NSString* _Nullable videoType, int64_t duration, NSString* _Nullable snapshotPath);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateVideoMessageFromFullPath(NSString* _Nullable videoFullPath, NSString* _Nullable videoType, int64_t duration, NSString* _Nullable snapshotFullPath);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDeleteConversation(NSString* _Nullable conversationID, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDeleteFromBlackList(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable deleteUid);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDeleteFromFriendList(NSString* _Nullable deleteUid, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDeleteMessageFromLocalStorage(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable message);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDoCreateGroup(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDoGetGroupsInfo(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDoJoinGroup(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDoQuitGroup(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDoSetGroupInfo(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDotestGetGroupMemberList(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDotestGetGroupMembersInfo(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDotestGetJoinedGroupList(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDotestKickGroupMember(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkDotesttestInviteUserToGroup(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkFindMessages(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable messageIDList);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkForceSyncBlackList(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkForceSyncFriend(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkForceSyncFriendApplication(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkForceSyncLoginUerInfo(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkForceSyncMsg(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkFriendApplication(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable uid, long flag);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetAllConversationList(id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetBlackList(id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkGetConversationIDBySessionType(NSString* _Nullable sourceID, long sessionType);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetFriendApplicationList(id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetFriendList(id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetFriendsInfo(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable uidList);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetGroupApplicationList(id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetGroupMemberList(NSString* _Nullable groupId, int32_t filter, int32_t next, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetGroupMembersInfo(NSString* _Nullable groupId, NSString* _Nullable userList, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetGroupsInfo(NSString* _Nullable groupIdList, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetHistoryMessageList(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable getMessageOptions);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetJoinedGroupList(id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT long Open_im_sdkGetLoginStatus(void);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkGetLoginUser(void);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetMultipleConversation(NSString* _Nullable conversationIDList, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetOneConversation(NSString* _Nullable sourceID, long sessionType, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetTotalUnreadMsgCount(id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkGetUsersInfo(NSString* _Nullable uIDList, id<Open_im_sdkBase> _Nullable cb);
|
||||
|
||||
FOUNDATION_EXPORT BOOL Open_im_sdkInitSDK(NSString* _Nullable config, id<Open_im_sdkIMSDKListener> _Nullable cb);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkInsertSingleMessageToLocalStorage(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable message, NSString* _Nullable userID, NSString* _Nullable sender);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkInviteUserToGroup(NSString* _Nullable groupId, NSString* _Nullable reason, NSString* _Nullable userList, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkJoinGroup(NSString* _Nullable groupId, NSString* _Nullable message, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkKickGroupMember(NSString* _Nullable groupId, NSString* _Nullable userList, NSString* _Nullable reason, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkLogin(NSString* _Nullable uid, NSString* _Nullable tk, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkLogout(id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkMarkC2CMessageAsRead(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable receiver, NSString* _Nullable msgList);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkMarkSingleMessageHasRead(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable userID);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkMd5(NSString* _Nullable s);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkPinConversation(NSString* _Nullable conversationID, BOOL isPinned, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkQuitGroup(NSString* _Nullable groupId, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkRefuseFriendApplication(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable uid);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkRefuseGroupApplication(NSString* _Nullable application, NSString* _Nullable reason, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkRemoveAdvancedMsgListener(id<Open_im_sdkOnAdvancedMsgListener> _Nullable listener);
|
||||
|
||||
FOUNDATION_EXPORT BOOL Open_im_sdkResetConversation(NSString* _Nullable conversationID, NSError* _Nullable* _Nullable error);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkRevokeMessage(id<Open_im_sdkBase> _Nullable callback, NSString* _Nullable message);
|
||||
|
||||
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkSendMessage(id<Open_im_sdkSendMsgCallBack> _Nullable callback, NSString* _Nullable message, NSString* _Nullable receiver, NSString* _Nullable groupID, BOOL onlineUserOnly);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkSetConversationDraft(NSString* _Nullable conversationID, NSString* _Nullable draftText, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkSetConversationListener(id<Open_im_sdkOnConversationListener> _Nullable listener);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkSetFriendInfo(NSString* _Nullable comment, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT BOOL Open_im_sdkSetFriendListener(id<Open_im_sdkOnFriendshipListener> _Nullable listener);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkSetGroupInfo(NSString* _Nullable jsonGroupInfo, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkSetGroupListener(id<Open_im_sdkOnGroupListener> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkSetSelfInfo(NSString* _Nullable info, id<Open_im_sdkBase> _Nullable cb);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkTencentOssCredentials(id<Open_im_sdkBase> _Nullable cb);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkTransferGroupOwner(NSString* _Nullable groupId, NSString* _Nullable userId, id<Open_im_sdkBase> _Nullable callback);
|
||||
|
||||
FOUNDATION_EXPORT void Open_im_sdkUnInitSDK(void);
|
||||
|
||||
// skipped function UnixSecondToTime with unsupported parameter or return types
|
||||
|
||||
|
||||
@class Open_im_sdkBase;
|
||||
|
||||
@class Open_im_sdkIMSDKListener;
|
||||
|
||||
@class Open_im_sdkOnAdvancedMsgListener;
|
||||
|
||||
@class Open_im_sdkOnConversationListener;
|
||||
|
||||
@class Open_im_sdkOnFriendshipListener;
|
||||
|
||||
@class Open_im_sdkOnGroupListener;
|
||||
|
||||
@class Open_im_sdkSendMsgCallBack;
|
||||
|
||||
@interface Open_im_sdkBase : NSObject <goSeqRefInterface, Open_im_sdkBase> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (void)onError:(long)errCode errMsg:(NSString* _Nullable)errMsg;
|
||||
- (void)onSuccess:(NSString* _Nullable)data;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkIMSDKListener : NSObject <goSeqRefInterface, Open_im_sdkIMSDKListener> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (void)onConnectFailed:(long)ErrCode ErrMsg:(NSString* _Nullable)ErrMsg;
|
||||
- (void)onConnectSuccess;
|
||||
- (void)onConnecting;
|
||||
- (void)onKickedOffline;
|
||||
- (void)onSelfInfoUpdated:(NSString* _Nullable)userInfo;
|
||||
- (void)onUserTokenExpired;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkOnAdvancedMsgListener : NSObject <goSeqRefInterface, Open_im_sdkOnAdvancedMsgListener> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (void)onRecvC2CReadReceipt:(NSString* _Nullable)msgReceiptList;
|
||||
- (void)onRecvMessageRevoked:(NSString* _Nullable)msgId;
|
||||
- (void)onRecvNewMessage:(NSString* _Nullable)message;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkOnConversationListener : NSObject <goSeqRefInterface, Open_im_sdkOnConversationListener> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (void)onConversationChanged:(NSString* _Nullable)conversationList;
|
||||
- (void)onNewConversation:(NSString* _Nullable)conversationList;
|
||||
- (void)onSyncServerFailed;
|
||||
- (void)onSyncServerFinish;
|
||||
- (void)onSyncServerStart;
|
||||
- (void)onTotalUnreadMessageCountChanged:(int32_t)totalUnreadCount;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkOnFriendshipListener : NSObject <goSeqRefInterface, Open_im_sdkOnFriendshipListener> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (void)onBlackListAdd:(NSString* _Nullable)userInfo;
|
||||
- (void)onBlackListDeleted:(NSString* _Nullable)userInfo;
|
||||
- (void)onFriendApplicationListAccept:(NSString* _Nullable)applyUserInfo;
|
||||
- (void)onFriendApplicationListAdded:(NSString* _Nullable)applyUserInfo;
|
||||
- (void)onFriendApplicationListDeleted:(NSString* _Nullable)applyUserInfo;
|
||||
- (void)onFriendApplicationListReject:(NSString* _Nullable)applyUserInfo;
|
||||
- (void)onFriendInfoChanged:(NSString* _Nullable)friendInfo;
|
||||
- (void)onFriendListAdded:(NSString* _Nullable)friendInfo;
|
||||
- (void)onFriendListDeleted:(NSString* _Nullable)friendInfo;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkOnGroupListener : NSObject <goSeqRefInterface, Open_im_sdkOnGroupListener> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (void)onApplicationProcessed:(NSString* _Nullable)groupId opUser:(NSString* _Nullable)opUser AgreeOrReject:(int32_t)AgreeOrReject opReason:(NSString* _Nullable)opReason;
|
||||
- (void)onGroupCreated:(NSString* _Nullable)groupId;
|
||||
- (void)onGroupInfoChanged:(NSString* _Nullable)groupId groupInfo:(NSString* _Nullable)groupInfo;
|
||||
/**
|
||||
* list->group
|
||||
*/
|
||||
- (void)onMemberEnter:(NSString* _Nullable)groupId memberList:(NSString* _Nullable)memberList;
|
||||
/**
|
||||
* list->opUser->groupId
|
||||
*/
|
||||
- (void)onMemberInvited:(NSString* _Nullable)groupId opUser:(NSString* _Nullable)opUser memberList:(NSString* _Nullable)memberList;
|
||||
- (void)onMemberKicked:(NSString* _Nullable)groupId opUser:(NSString* _Nullable)opUser memberList:(NSString* _Nullable)memberList;
|
||||
/**
|
||||
* group->one
|
||||
*/
|
||||
- (void)onMemberLeave:(NSString* _Nullable)groupId member:(NSString* _Nullable)member;
|
||||
- (void)onReceiveJoinApplication:(NSString* _Nullable)groupId member:(NSString* _Nullable)member opReason:(NSString* _Nullable)opReason;
|
||||
@end
|
||||
|
||||
@interface Open_im_sdkSendMsgCallBack : NSObject <goSeqRefInterface, Open_im_sdkSendMsgCallBack> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (void)onError:(long)errCode errMsg:(NSString* _Nullable)errMsg;
|
||||
- (void)onProgress:(long)progress;
|
||||
- (void)onSuccess:(NSString* _Nullable)data;
|
||||
@end
|
||||
|
||||
#endif
|
@ -0,0 +1,29 @@
|
||||
// Objective-C API for talking to Go package.
|
||||
// gobind -lang=objc
|
||||
//
|
||||
// File is generated by gobind. Do not edit.
|
||||
|
||||
#ifndef __Universe_H__
|
||||
#define __Universe_H__
|
||||
|
||||
@import Foundation;
|
||||
#include "ref.h"
|
||||
|
||||
@protocol Universeerror;
|
||||
@class Universeerror;
|
||||
|
||||
@protocol Universeerror <NSObject>
|
||||
- (NSString* _Nonnull)error;
|
||||
@end
|
||||
|
||||
@class Universeerror;
|
||||
|
||||
@interface Universeerror : NSError <goSeqRefInterface, Universeerror> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (NSString* _Nonnull)error;
|
||||
@end
|
||||
|
||||
#endif
|
@ -0,0 +1,35 @@
|
||||
// Copyright 2015 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
#ifndef __GO_REF_HDR__
|
||||
#define __GO_REF_HDR__
|
||||
|
||||
#include <Foundation/Foundation.h>
|
||||
|
||||
// GoSeqRef is an object tagged with an integer for passing back and
|
||||
// forth across the language boundary. A GoSeqRef may represent either
|
||||
// an instance of a Go object, or an Objective-C object passed to Go.
|
||||
// The explicit allocation of a GoSeqRef is used to pin a Go object
|
||||
// when it is passed to Objective-C. The Go seq package maintains a
|
||||
// reference to the Go object in a map keyed by the refnum along with
|
||||
// a reference count. When the reference count reaches zero, the Go
|
||||
// seq package will clear the corresponding entry in the map.
|
||||
@interface GoSeqRef : NSObject {
|
||||
}
|
||||
@property(readonly) int32_t refnum;
|
||||
@property(strong) id obj; // NULL when representing a Go object.
|
||||
|
||||
// new GoSeqRef object to proxy a Go object. The refnum must be
|
||||
// provided from Go side.
|
||||
- (instancetype)initWithRefnum:(int32_t)refnum obj:(id)obj;
|
||||
|
||||
- (int32_t)incNum;
|
||||
|
||||
@end
|
||||
|
||||
@protocol goSeqRefInterface
|
||||
-(GoSeqRef*) _ref;
|
||||
@end
|
||||
|
||||
#endif
|
@ -0,0 +1,8 @@
|
||||
framework module "OpenIMCore" {
|
||||
header "ref.h"
|
||||
header "Open_im_sdk.objc.h"
|
||||
header "Universe.objc.h"
|
||||
header "OpenIMCore.h"
|
||||
|
||||
export *
|
||||
}
|
BIN
ios/Framework/OpenIMCore.framework/Versions/Current/OpenIMCore
Normal file
BIN
ios/Framework/OpenIMCore.framework/Versions/Current/OpenIMCore
Normal file
Binary file not shown.
@ -0,0 +1,6 @@
|
||||
<?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>
|
||||
</dict>
|
||||
</plist>
|
@ -17,6 +17,7 @@ A new Flutter project.
|
||||
s.dependency 'Flutter'
|
||||
s.platform = :ios, '8.0'
|
||||
|
||||
s.vendored_frameworks = 'Framework/*.framework'
|
||||
# Flutter.framework does not contain a i386 slice.
|
||||
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
|
||||
s.swift_version = '5.0'
|
||||
|
@ -1,8 +1,13 @@
|
||||
library flutter_openim_sdk;
|
||||
|
||||
export 'src/enum/conversation_type.dart';
|
||||
export 'src/enum/group_role.dart';
|
||||
export 'src/enum/listener_type.dart';
|
||||
export 'src/enum/message_type.dart';
|
||||
export 'src/listener/advanced_msg_listener.dart';
|
||||
export 'src/listener/conversation_listener.dart';
|
||||
export 'src/listener/friendship_listener.dart';
|
||||
export 'src/listener/group_listener.dart';
|
||||
export 'src/listener/init_sdk_listener.dart';
|
||||
export 'src/listener/msg_send_progress_listener.dart';
|
||||
export 'src/manager/im_conversation_manager.dart';
|
||||
@ -13,6 +18,7 @@ export 'src/manager/im_message_manager.dart';
|
||||
export 'src/manager/im_offline_push_manager.dart';
|
||||
export 'src/manager/im_signaling_manager.dart';
|
||||
export 'src/models/conversation_info.dart';
|
||||
export 'src/models/group_info.dart';
|
||||
export 'src/models/message.dart';
|
||||
export 'src/models/user_info.dart';
|
||||
export 'src/openim.dart';
|
||||
|
4
lib/src/enum/conversation_type.dart
Normal file
4
lib/src/enum/conversation_type.dart
Normal file
@ -0,0 +1,4 @@
|
||||
class ConversationType{
|
||||
static const int single_chat = 1;
|
||||
static const int group_chat = 2;
|
||||
}
|
5
lib/src/enum/group_role.dart
Normal file
5
lib/src/enum/group_role.dart
Normal file
@ -0,0 +1,5 @@
|
||||
class GroupRole {
|
||||
static const member = 0;
|
||||
static const owner = 1;
|
||||
static const admin = 2;
|
||||
}
|
@ -15,4 +15,6 @@ class MessageType {
|
||||
static const file = 105;
|
||||
|
||||
static const accept_friend = 201;
|
||||
|
||||
static const create_group = 502;
|
||||
}
|
||||
|
36
lib/src/listener/group_listener.dart
Normal file
36
lib/src/listener/group_listener.dart
Normal file
@ -0,0 +1,36 @@
|
||||
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
||||
|
||||
class GroupListener {
|
||||
void onMemberEnter(String groupId, List<GroupMembersInfo> list) {}
|
||||
|
||||
void onMemberLeave(String groupId, GroupMembersInfo info) {}
|
||||
|
||||
void onMemberInvited(
|
||||
String groupId,
|
||||
GroupMembersInfo opUser,
|
||||
List<GroupMembersInfo> list,
|
||||
) {}
|
||||
|
||||
void onMemberKicked(
|
||||
String groupId,
|
||||
GroupMembersInfo opUser,
|
||||
List<GroupMembersInfo> list,
|
||||
) {}
|
||||
|
||||
void onGroupCreated(String groupId) {}
|
||||
|
||||
void onGroupInfoChanged(String groupId, GroupInfo info) {}
|
||||
|
||||
void onReceiveJoinApplication(
|
||||
String groupId,
|
||||
GroupMembersInfo info,
|
||||
String opReason,
|
||||
) {}
|
||||
|
||||
void onApplicationProcessed(
|
||||
String groupId,
|
||||
GroupMembersInfo opUser,
|
||||
int agreeOrReject,
|
||||
String opReason,
|
||||
) {}
|
||||
}
|
@ -20,8 +20,8 @@ class ConversationManager {
|
||||
.then((value) => _toList(value));
|
||||
}
|
||||
|
||||
/// sourceID 若为单聊则为userID,若为群聊则为groupID
|
||||
/// sessionType 若为单聊则为1,若为群聊则为2
|
||||
/// sourceID: userID(single chat) ,groupID(group chat)
|
||||
/// sessionType: 1(single chat) ,2(group chat)
|
||||
Future<ConversationInfo> getSingleConversation(
|
||||
{required String sourceID, required String sessionType}) {
|
||||
return _channel
|
||||
|
@ -1,7 +1,213 @@
|
||||
import 'package:flutter/services.dart';
|
||||
import 'dart:convert';
|
||||
|
||||
class GroupManager{
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_openim_sdk/src/listener/group_listener.dart';
|
||||
import 'package:flutter_openim_sdk/src/models/group_info.dart';
|
||||
|
||||
class GroupManager {
|
||||
MethodChannel _channel;
|
||||
late GroupListener groupListener;
|
||||
|
||||
GroupManager(this._channel);
|
||||
}
|
||||
|
||||
void setGroupListener(GroupListener listener) {
|
||||
this.groupListener = listener;
|
||||
_channel.invokeMethod('setGroupListener', _buildParam({}));
|
||||
}
|
||||
|
||||
Future<List<GroupInviteResult>> inviteUserToGroup({
|
||||
required String groupId,
|
||||
required List<String> uidList,
|
||||
String? reason,
|
||||
}) {
|
||||
return _channel
|
||||
.invokeMethod(
|
||||
'inviteUserToGroup',
|
||||
_buildParam({
|
||||
'gid': groupId,
|
||||
'reason': reason,
|
||||
'uidList': uidList,
|
||||
}))
|
||||
.then((value) => (_formatJson(value) as List)
|
||||
.map((e) => GroupInviteResult.fromJson(e))
|
||||
.toList());
|
||||
}
|
||||
|
||||
Future<List<GroupInviteResult>> kickGroupMember({
|
||||
required String groupId,
|
||||
required List<String> uidList,
|
||||
String? reason,
|
||||
}) {
|
||||
return _channel
|
||||
.invokeMethod(
|
||||
'kickGroupMember',
|
||||
_buildParam({
|
||||
'gid': groupId,
|
||||
'reason': reason,
|
||||
'uidList': uidList,
|
||||
}))
|
||||
.then((value) => _formatJson(value)
|
||||
.map((e) => GroupInviteResult.fromJson(e))
|
||||
.toList());
|
||||
}
|
||||
|
||||
Future<List<GroupMembersInfo>> getGroupMembersInfo({
|
||||
required String groupId,
|
||||
required List<String> uidList,
|
||||
}) {
|
||||
return _channel
|
||||
.invokeMethod(
|
||||
'getGroupMembersInfo',
|
||||
_buildParam({
|
||||
'gid': groupId,
|
||||
'uidList': uidList,
|
||||
}))
|
||||
.then((value) => (_formatJson(value) as List)
|
||||
.map((e) => GroupMembersInfo.fromJson(e))
|
||||
.toList());
|
||||
}
|
||||
|
||||
///filter 0: all user, 1: group owner, 2: administrator
|
||||
///begin index, pull and fill 0 for the first time
|
||||
Future<GroupMembersList> getGroupMemberList({
|
||||
required String groupId,
|
||||
required int filter,
|
||||
required int next,
|
||||
}) {
|
||||
return _channel
|
||||
.invokeMethod(
|
||||
'getGroupMemberList',
|
||||
_buildParam({
|
||||
'gid': groupId,
|
||||
'filter': filter,
|
||||
'next': next,
|
||||
}))
|
||||
.then((value) => GroupMembersList.fromJson(_formatJson(value)));
|
||||
}
|
||||
|
||||
Future<List<GroupInfo>> getJoinedGroupList() {
|
||||
return _channel.invokeMethod('getJoinedGroupList', _buildParam({})).then(
|
||||
(value) => (_formatJson(value) as List)
|
||||
.map((e) => GroupInfo.fromJson(e))
|
||||
.toList());
|
||||
}
|
||||
|
||||
Future<bool> isJoinedGroup({required String gid}) {
|
||||
return getJoinedGroupList()
|
||||
.then((list) => list.where((e) => e.groupID == gid).length > 0);
|
||||
}
|
||||
|
||||
Future<dynamic> createGroup({
|
||||
GroupInfo? groupInfo,
|
||||
required List<GroupMemberRole> list,
|
||||
}) {
|
||||
return _channel.invokeMethod(
|
||||
'createGroup',
|
||||
_buildParam({
|
||||
'gInfo': groupInfo?.toJson(),
|
||||
'memberList': list.map((e) => e.toJson()).toList()
|
||||
}));
|
||||
/*.then((value) => _formatJson(value)['groupID'])*/
|
||||
}
|
||||
|
||||
Future<dynamic> setGroupInfo({
|
||||
required GroupInfo groupInfo,
|
||||
}) {
|
||||
return _channel.invokeMethod(
|
||||
'setGroupInfo',
|
||||
_buildParam({
|
||||
'gInfo': groupInfo.toJson(),
|
||||
}));
|
||||
}
|
||||
|
||||
Future<List<GroupInfo>> getGroupsInfo({
|
||||
required List<String> gidList,
|
||||
}) {
|
||||
return _channel
|
||||
.invokeMethod('getGroupsInfo', _buildParam({'gidList': gidList}))
|
||||
.then((value) {
|
||||
List list = _formatJson(value) ?? [];
|
||||
return list.map((e) => GroupInfo.fromJson(e)).toList();
|
||||
});
|
||||
}
|
||||
|
||||
Future<dynamic> joinGroup({
|
||||
required String gid,
|
||||
String? reason,
|
||||
}) {
|
||||
return _channel.invokeMethod(
|
||||
'joinGroup',
|
||||
_buildParam({
|
||||
'gid': gid,
|
||||
'reason': reason,
|
||||
}));
|
||||
}
|
||||
|
||||
Future<dynamic> quitGroup({
|
||||
required String gid,
|
||||
}) {
|
||||
return _channel.invokeMethod(
|
||||
'quitGroup',
|
||||
_buildParam({
|
||||
'gid': gid,
|
||||
}));
|
||||
}
|
||||
|
||||
Future<dynamic> transferGroupOwner({
|
||||
required String gid,
|
||||
required String uid,
|
||||
}) {
|
||||
return _channel.invokeMethod(
|
||||
'transferGroupOwner',
|
||||
_buildParam({
|
||||
'gid': gid,
|
||||
'uid': uid,
|
||||
}));
|
||||
}
|
||||
|
||||
Future<GroupApplicationList> getGroupApplicationList({
|
||||
required String gid,
|
||||
required String uid,
|
||||
}) {
|
||||
return _channel
|
||||
.invokeMethod('getGroupApplicationList', _buildParam({}))
|
||||
.then((value) => GroupApplicationList.fromJson(_formatJson(value)));
|
||||
}
|
||||
|
||||
Future<dynamic> acceptGroupApplication({
|
||||
required GroupApplicationInfo info,
|
||||
required String reason,
|
||||
}) {
|
||||
return _channel.invokeMethod(
|
||||
'acceptGroupApplication',
|
||||
_buildParam({
|
||||
'application': info.toJson(),
|
||||
'reason': reason,
|
||||
}));
|
||||
}
|
||||
|
||||
Future<dynamic> refuseGroupApplication({
|
||||
required GroupApplicationInfo info,
|
||||
required String reason,
|
||||
}) {
|
||||
return _channel.invokeMethod(
|
||||
'refuseGroupApplication',
|
||||
_buildParam({
|
||||
'application': info.toJson(),
|
||||
'reason': reason,
|
||||
}));
|
||||
}
|
||||
|
||||
static Map _buildParam(Map param) {
|
||||
param["ManagerName"] = "groupManager";
|
||||
return param;
|
||||
}
|
||||
|
||||
static dynamic _formatJson(value) {
|
||||
return jsonDecode(_printValue(value));
|
||||
}
|
||||
|
||||
static String _printValue(value) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ class IMManager {
|
||||
late OfflinePushManager offlinePushManager;
|
||||
late SignalingManager signalingManager;
|
||||
late InitSDKListener _initSDKListener;
|
||||
late String logUid;
|
||||
|
||||
IMManager(this._channel) {
|
||||
conversationManager = ConversationManager(_channel);
|
||||
@ -55,71 +56,83 @@ class IMManager {
|
||||
} else if (call.method == ListenerType.groupListener) {
|
||||
var args = call.arguments;
|
||||
String type = args['type'];
|
||||
Map<String, dynamic> params = args['data'] == null
|
||||
? new Map<String, dynamic>()
|
||||
: new Map<String, dynamic>.from(args['data']);
|
||||
|
||||
String groupID = params['groupID'] == null ? '' : params['groupID'];
|
||||
String opReason =
|
||||
params['opReason'] == null ? '' : params['opReason'];
|
||||
bool isAgreeJoin =
|
||||
params['isAgreeJoin'] == null ? false : params['isAgreeJoin'];
|
||||
String customData =
|
||||
params['customData'] == null ? '' : params['customData'];
|
||||
|
||||
Map<String, String> groupAttributeMap =
|
||||
params['groupAttributeMap'] == null
|
||||
? new Map<String, String>()
|
||||
: new Map<String, String>.from(params['groupAttributeMap']);
|
||||
|
||||
List<Map<String, dynamic>> memberListMap =
|
||||
params['memberList'] == null
|
||||
? List.empty(growable: true)
|
||||
: List.from(params['memberList']);
|
||||
|
||||
List<Map<String, dynamic>> groupMemberChangeInfoListMap =
|
||||
params['groupMemberChangeInfoList'] == null
|
||||
? List.empty(growable: true)
|
||||
: List.from(params['groupMemberChangeInfoList']);
|
||||
|
||||
List<Map<String, dynamic>> groupChangeInfoListMap =
|
||||
params['groupChangeInfoList'] == null
|
||||
? List.empty(growable: true)
|
||||
: List.from(params['groupChangeInfoList']);
|
||||
|
||||
Map<dynamic, dynamic> map = args['data'];
|
||||
switch (type) {
|
||||
case 'onMemberEnter':
|
||||
groupManager.groupListener.onMemberEnter(
|
||||
map['groupId'],
|
||||
(_formatJson(map['memberList']) as List)
|
||||
.map((e) => GroupMembersInfo.fromJson(e))
|
||||
.toList(),
|
||||
);
|
||||
break;
|
||||
case 'onMemberLeave':
|
||||
groupManager.groupListener.onMemberLeave(
|
||||
map['groupId'],
|
||||
GroupMembersInfo.fromJson(_formatJson(map['member'])),
|
||||
);
|
||||
break;
|
||||
case 'onMemberInvited':
|
||||
groupManager.groupListener.onMemberInvited(
|
||||
map['groupId'],
|
||||
GroupMembersInfo.fromJson(_formatJson(map['opUser'])),
|
||||
(_formatJson(map['memberList']) as List)
|
||||
.map((e) => GroupMembersInfo.fromJson(e))
|
||||
.toList(),
|
||||
);
|
||||
break;
|
||||
case 'onMemberKicked':
|
||||
break;
|
||||
case 'onMemberInfoChanged':
|
||||
groupManager.groupListener.onMemberKicked(
|
||||
map['groupId'],
|
||||
GroupMembersInfo.fromJson(_formatJson(map['opUser'])),
|
||||
(_formatJson(map['memberList']) as List)
|
||||
.map((e) => GroupMembersInfo.fromJson(e))
|
||||
.toList(),
|
||||
);
|
||||
break;
|
||||
case 'onGroupCreated':
|
||||
break;
|
||||
case 'onGroupDismissed':
|
||||
break;
|
||||
case 'onGroupRecycled':
|
||||
groupManager.groupListener.onGroupCreated(
|
||||
map['groupId'],
|
||||
);
|
||||
break;
|
||||
case 'onGroupInfoChanged':
|
||||
groupManager.groupListener.onGroupInfoChanged(
|
||||
map['groupId'],
|
||||
GroupInfo.fromJson(_formatJson(map['groupInfo'])),
|
||||
);
|
||||
break;
|
||||
case 'onReceiveJoinApplication':
|
||||
groupManager.groupListener.onReceiveJoinApplication(
|
||||
map['groupId'],
|
||||
GroupMembersInfo.fromJson(_formatJson(map['opUser'])),
|
||||
map['opReason'],
|
||||
);
|
||||
break;
|
||||
case 'onApplicationProcessed':
|
||||
groupManager.groupListener.onApplicationProcessed(
|
||||
map['groupId'],
|
||||
GroupMembersInfo.fromJson(_formatJson(map['opUser'])),
|
||||
map['agreeOrReject'],
|
||||
map['opReason'],
|
||||
);
|
||||
break;
|
||||
case 'onGrantAdministrator':
|
||||
break;
|
||||
case 'onRevokeAdministrator':
|
||||
break;
|
||||
case 'onQuitFromGroup':
|
||||
break;
|
||||
case 'onReceiveRESTCustomData':
|
||||
break;
|
||||
case 'onGroupAttributeChanged':
|
||||
break;
|
||||
// case 'onMemberInfoChanged':
|
||||
// break;
|
||||
// case 'onGroupDismissed':
|
||||
// break;
|
||||
// case 'onGroupRecycled':
|
||||
// break;
|
||||
//
|
||||
// case 'onGrantAdministrator':
|
||||
// break;
|
||||
// case 'onRevokeAdministrator':
|
||||
// break;
|
||||
// case 'onQuitFromGroup':
|
||||
// break;
|
||||
// case 'onReceiveRESTCustomData':
|
||||
// break;
|
||||
// case 'onGroupAttributeChanged':
|
||||
// break;
|
||||
}
|
||||
} else if (call.method == ListenerType.advancedMsgListener) {
|
||||
var type = call.arguments['type'];
|
||||
@ -266,6 +279,7 @@ class IMManager {
|
||||
}
|
||||
|
||||
Future<dynamic> login({required String uid, required String token}) {
|
||||
this.logUid = uid;
|
||||
return _channel.invokeMethod(
|
||||
'login',
|
||||
_buildParam({'uid': uid, 'token': token}),
|
||||
|
@ -103,6 +103,11 @@ class MessageManager {
|
||||
'markSingleMessageHasRead', _buildParam({'userID': userID}));
|
||||
}
|
||||
|
||||
Future<dynamic> markGroupMessageHasRead({required String groupID}) {
|
||||
return _channel.invokeMethod(
|
||||
'markGroupMessageHasRead', _buildParam({'groupID': groupID}));
|
||||
}
|
||||
|
||||
Future<Message> createTextMessage({required String text}) {
|
||||
return _channel
|
||||
.invokeMethod('createTextMessage', _buildParam({'text': text}))
|
||||
|
@ -74,4 +74,8 @@ class ConversationInfo {
|
||||
data['isPinned'] = this.isPinned;
|
||||
return data;
|
||||
}
|
||||
|
||||
bool get isSingleChat => conversationType == ConversationType.single_chat;
|
||||
|
||||
bool get isGroupChat => conversationType == ConversationType.group_chat;
|
||||
}
|
||||
|
226
lib/src/models/group_info.dart
Normal file
226
lib/src/models/group_info.dart
Normal file
@ -0,0 +1,226 @@
|
||||
class GroupInfo {
|
||||
String groupID;
|
||||
String? groupName;
|
||||
String? notification;
|
||||
String? introduction;
|
||||
String? faceUrl;
|
||||
String? ownerId;
|
||||
int? createTime;
|
||||
int? memberCount;
|
||||
|
||||
GroupInfo(
|
||||
{required this.groupID,
|
||||
this.groupName,
|
||||
this.notification,
|
||||
this.introduction,
|
||||
this.faceUrl,
|
||||
this.ownerId,
|
||||
this.createTime,
|
||||
this.memberCount});
|
||||
|
||||
GroupInfo.fromJson(Map<String, dynamic> json): groupID = json['groupID'] {
|
||||
/*groupID = json['groupID'];*/
|
||||
groupName = json['groupName'];
|
||||
notification = json['notification'];
|
||||
introduction = json['introduction'];
|
||||
faceUrl = json['faceUrl'];
|
||||
ownerId = json['ownerId'];
|
||||
createTime = json['createTime'];
|
||||
memberCount = json['memberCount'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['groupID'] = this.groupID;
|
||||
data['groupName'] = this.groupName;
|
||||
data['notification'] = this.notification;
|
||||
data['introduction'] = this.introduction;
|
||||
data['faceUrl'] = this.faceUrl;
|
||||
data['ownerId'] = this.ownerId;
|
||||
data['createTime'] = this.createTime;
|
||||
data['memberCount'] = this.memberCount;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class GroupMembersList {
|
||||
int? nextSeq;
|
||||
List<GroupMembersInfo>? data;
|
||||
|
||||
GroupMembersList({this.nextSeq, this.data});
|
||||
|
||||
GroupMembersList.fromJson(Map<String, dynamic> json) {
|
||||
nextSeq = json['nextSeq'];
|
||||
if (json['data'] is List) {
|
||||
data = (json['data'] as List)
|
||||
.map((e) => GroupMembersInfo.fromJson(e))
|
||||
.toList();
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['nextSeq'] = this.nextSeq;
|
||||
if (this.data != null) {
|
||||
data['data'] = this.data!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class GroupMembersInfo {
|
||||
String? groupID;
|
||||
String? userId;
|
||||
int? role;
|
||||
int? joinTime;
|
||||
String? nickName;
|
||||
String? faceUrl;
|
||||
|
||||
GroupMembersInfo(
|
||||
{this.groupID,
|
||||
this.userId,
|
||||
this.role,
|
||||
this.joinTime,
|
||||
this.nickName,
|
||||
this.faceUrl});
|
||||
|
||||
GroupMembersInfo.fromJson(Map<String, dynamic> json) {
|
||||
groupID = json['groupID'];
|
||||
userId = json['userId'];
|
||||
role = json['role'];
|
||||
joinTime = json['joinTime'];
|
||||
nickName = json['nickName'];
|
||||
faceUrl = json['faceUrl'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['groupID'] = this.groupID;
|
||||
data['userId'] = this.userId;
|
||||
data['role'] = this.role;
|
||||
data['joinTime'] = this.joinTime;
|
||||
data['nickName'] = this.nickName;
|
||||
data['faceUrl'] = this.faceUrl;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class GroupInviteResult {
|
||||
String? uid;
|
||||
int? result;
|
||||
|
||||
GroupInviteResult({this.uid, this.result});
|
||||
|
||||
GroupInviteResult.fromJson(Map<String, dynamic> json) {
|
||||
uid = json['uid'];
|
||||
result = json['result'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['uid'] = this.uid;
|
||||
data['result'] = this.result;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class GroupMemberRole {
|
||||
String? uid;
|
||||
int? setRole;
|
||||
|
||||
GroupMemberRole({this.uid, this.setRole});
|
||||
|
||||
GroupMemberRole.fromJson(Map<String, dynamic> json) {
|
||||
uid = json['uid'];
|
||||
setRole = json['setRole'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['uid'] = this.uid;
|
||||
data['setRole'] = this.setRole;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class GroupApplicationInfo {
|
||||
String? groupID;
|
||||
String? fromUserID;
|
||||
String? fromUserNickName;
|
||||
String? fromUserFaceUrl;
|
||||
String? toUserID;
|
||||
int? addTime;
|
||||
String? requestMsg;
|
||||
String? handledMsg;
|
||||
int? type;
|
||||
int? handleStatus;
|
||||
int? handleResult;
|
||||
|
||||
GroupApplicationInfo(
|
||||
{this.groupID,
|
||||
this.fromUserID,
|
||||
this.fromUserNickName,
|
||||
this.fromUserFaceUrl,
|
||||
this.toUserID,
|
||||
this.addTime,
|
||||
this.requestMsg,
|
||||
this.handledMsg,
|
||||
this.type,
|
||||
this.handleStatus,
|
||||
this.handleResult});
|
||||
|
||||
GroupApplicationInfo.fromJson(Map<String, dynamic> json) {
|
||||
groupID = json['groupID'];
|
||||
fromUserID = json['fromUserID'];
|
||||
fromUserNickName = json['fromUserNickName'];
|
||||
fromUserFaceUrl = json['fromUserFaceUrl'];
|
||||
toUserID = json['toUserID'];
|
||||
addTime = json['addTime'];
|
||||
requestMsg = json['requestMsg'];
|
||||
handledMsg = json['handledMsg'];
|
||||
type = json['type'];
|
||||
handleStatus = json['handleStatus'];
|
||||
handleResult = json['handleResult'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['groupID'] = this.groupID;
|
||||
data['fromUserID'] = this.fromUserID;
|
||||
data['fromUserNickName'] = this.fromUserNickName;
|
||||
data['fromUserFaceUrl'] = this.fromUserFaceUrl;
|
||||
data['toUserID'] = this.toUserID;
|
||||
data['addTime'] = this.addTime;
|
||||
data['requestMsg'] = this.requestMsg;
|
||||
data['handledMsg'] = this.handledMsg;
|
||||
data['type'] = this.type;
|
||||
data['handleStatus'] = this.handleStatus;
|
||||
data['handleResult'] = this.handleResult;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class GroupApplicationList {
|
||||
int? count;
|
||||
List<GroupApplicationInfo>? user;
|
||||
|
||||
GroupApplicationList({this.count, this.user});
|
||||
|
||||
GroupApplicationList.fromJson(Map<String, dynamic> json) {
|
||||
count = json['count'];
|
||||
if (json['user'] is List) {
|
||||
user = (json['user'] as List)
|
||||
.map((e) => GroupApplicationInfo.fromJson(e))
|
||||
.toList();
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['count'] = this.count;
|
||||
if (this.user != null) {
|
||||
data['user'] = this.user!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
@ -2,16 +2,16 @@ class UserInfo {
|
||||
String uid;
|
||||
String? name;
|
||||
String? icon;
|
||||
int? gender; // 0 未知,1 男,2 女
|
||||
int? gender;
|
||||
String? mobile;
|
||||
String? birth;
|
||||
String? email;
|
||||
String? ex;
|
||||
String? comment;
|
||||
int? isInBlackList; // 0 不在黑名单,1 在黑名单
|
||||
int? isInBlackList;
|
||||
String? reqMessage;
|
||||
String? applyTime;
|
||||
int? flag; // //0请求添加好友,1同意添加好友,-1拒绝添加好友
|
||||
int? flag;
|
||||
|
||||
UserInfo(
|
||||
{required this.uid,
|
||||
@ -61,5 +61,25 @@ class UserInfo {
|
||||
return data;
|
||||
}
|
||||
|
||||
String get nickname => comment ?? name ?? uid;
|
||||
String getShowName() {
|
||||
if (null != comment && comment!.trim().isNotEmpty) {
|
||||
return comment!;
|
||||
} else if (null != name && name!.trim().isNotEmpty) {
|
||||
return name!;
|
||||
}
|
||||
return uid;
|
||||
}
|
||||
|
||||
bool get isMan => gender == 1;
|
||||
|
||||
bool get isWoman => gender == 2;
|
||||
|
||||
/// blacklist
|
||||
bool get isBlocked => isInBlackList == 1;
|
||||
|
||||
/// friend application
|
||||
bool get isAgreed => flag == 1;
|
||||
|
||||
/// friend application
|
||||
bool get isRejected => flag == -1;
|
||||
}
|
||||
|
@ -6,4 +6,6 @@ class OpenIM {
|
||||
const MethodChannel('flutter_openim_sdk');
|
||||
|
||||
static IMManager iMManager = IMManager(_channel);
|
||||
|
||||
OpenIM._();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user