├── .gitignore ├── .idea ├── codeStyles │ └── Project.xml ├── libraries │ ├── Dart_SDK.xml │ ├── Flutter_Plugins.xml │ └── Flutter_for_Android.xml ├── misc.xml ├── modules.xml ├── runConfigurations │ └── example_lib_main_dart.xml ├── vcs.xml └── workspace.xml ├── .metadata ├── CHANGELOG.md ├── LICENSE ├── README.md ├── android ├── .classpath ├── .gitignore ├── .project ├── .settings │ └── org.eclipse.buildship.core.prefs ├── build.gradle ├── gradle.properties ├── libs │ └── Rong_IMLib.jar ├── settings.gradle └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── ninefrost │ │ └── flutterrongcloudim │ │ ├── ConstantFunc.java │ │ ├── FlutterRongcloudImPlugin.java │ │ ├── RongIMLib.java │ │ └── common │ │ ├── ErrorCode.java │ │ ├── RongCustomServiceResult.java │ │ ├── RongErrorResult.java │ │ ├── RongException.java │ │ ├── RongListenResult.java │ │ ├── RongResult.java │ │ └── translation │ │ ├── ITranslatedMessage.java │ │ ├── TranslatedCSGroupItem.java │ │ ├── TranslatedCSGroupList.java │ │ ├── TranslatedCommandMessage.java │ │ ├── TranslatedCommandNotificationMessage.java │ │ ├── TranslatedContactNtfMessage.java │ │ ├── TranslatedConversation.java │ │ ├── TranslatedConversationNtfyStatus.java │ │ ├── TranslatedCustomServiceDialogID.java │ │ ├── TranslatedCustomServiceErrorMsg.java │ │ ├── TranslatedCustomServiceMode.java │ │ ├── TranslatedCustomServiceQuitMsg.java │ │ ├── TranslatedDiscussion.java │ │ ├── TranslatedDiscussionNtfMessage.java │ │ ├── TranslatedGrpNtfMessage.java │ │ ├── TranslatedImageMessage.java │ │ ├── TranslatedInformationNtfMessage.java │ │ ├── TranslatedLocationMessage.java │ │ ├── TranslatedMessage.java │ │ ├── TranslatedMessageContent.java │ │ ├── TranslatedProfileNtfMessage.java │ │ ├── TranslatedQuietHour.java │ │ ├── TranslatedRichContentMessage.java │ │ ├── TranslatedTextMessage.java │ │ └── TranslatedVoiceMessage.java │ └── jniLibs │ └── armeabi-v7a │ ├── libRongIMLib.so │ └── libsqlite.so ├── arts ├── ali.jpeg └── wx.png ├── example ├── .gitignore ├── .metadata ├── README.md ├── android │ ├── .project │ ├── .settings │ │ └── org.eclipse.buildship.core.prefs │ ├── app │ │ ├── .classpath │ │ ├── .project │ │ ├── .settings │ │ │ └── org.eclipse.buildship.core.prefs │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── ninefrost │ │ │ │ └── flutterrongcloudimexample │ │ │ │ └── MainActivity.java │ │ │ └── res │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ └── values │ │ │ └── styles.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ └── settings.gradle ├── ios │ ├── Flutter │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ └── Release.xcconfig │ ├── Podfile │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── Runner │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ └── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ └── README.md │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ │ ├── Info.plist │ │ └── main.m ├── lib │ └── main.dart ├── pubspec.yaml └── test │ └── widget_test.dart ├── flutter_rongcloud_im.iml ├── ios ├── .gitignore ├── Assets │ └── .gitkeep ├── Classes │ ├── FlutterRongcloudImPlugin.h │ ├── FlutterRongcloudImPlugin.m │ ├── RCDCustomerServiceViewController.h │ ├── RCDCustomerServiceViewController.m │ ├── RongCloudApplicationHandler.h │ ├── RongCloudApplicationHandler.m │ ├── RongCloudConstant.h │ ├── RongCloudHandler.h │ ├── RongCloudHandler.m │ ├── RongCloudHybridAdapter.h │ ├── RongCloudHybridAdapter.m │ ├── RongCloudModel.h │ └── RongCloudModel.m ├── Libs │ ├── RongIMLib.framework │ │ ├── Headers │ │ │ ├── RCAMRDataConverter.h │ │ │ ├── RCBurnMessageService.h │ │ │ ├── RCCSLeaveMessage.h │ │ │ ├── RCCSLeaveMessageItem.h │ │ │ ├── RCCSPullLeaveMessage.h │ │ │ ├── RCChatRoomInfo.h │ │ │ ├── RCChatRoomMemberInfo.h │ │ │ ├── RCCommandMessage.h │ │ │ ├── RCCommandNotificationMessage.h │ │ │ ├── RCContactNotificationMessage.h │ │ │ ├── RCConversation.h │ │ │ ├── RCCustomerServiceConfig.h │ │ │ ├── RCCustomerServiceGroupItem.h │ │ │ ├── RCCustomerServiceInfo.h │ │ │ ├── RCDiscussion.h │ │ │ ├── RCDiscussionNotificationMessage.h │ │ │ ├── RCDownloadItem.h │ │ │ ├── RCEvaluateItem.h │ │ │ ├── RCFileMessage.h │ │ │ ├── RCFileUtility.h │ │ │ ├── RCFwLog.h │ │ │ ├── RCGroup.h │ │ │ ├── RCGroupNotificationMessage.h │ │ │ ├── RCIMClient.h │ │ │ ├── RCImageMessage.h │ │ │ ├── RCInformationNotificationMessage.h │ │ │ ├── RCLocationMessage.h │ │ │ ├── RCMediaMessageContent.h │ │ │ ├── RCMentionedInfo.h │ │ │ ├── RCMessage.h │ │ │ ├── RCMessageContent.h │ │ │ ├── RCProfileNotificationMessage.h │ │ │ ├── RCPublicServiceCommandMessage.h │ │ │ ├── RCPublicServiceMenu.h │ │ │ ├── RCPublicServiceMenuItem.h │ │ │ ├── RCPublicServiceMultiRichContentMessage.h │ │ │ ├── RCPublicServiceProfile.h │ │ │ ├── RCPublicServiceRichContentMessage.h │ │ │ ├── RCPushProfile.h │ │ │ ├── RCReadReceiptInfo.h │ │ │ ├── RCRealTimeLocationCommonDefine.h │ │ │ ├── RCRealTimeLocationEndMessage.h │ │ │ ├── RCRealTimeLocationManager.h │ │ │ ├── RCRealTimeLocationStartMessage.h │ │ │ ├── RCRecallNotificationMessage.h │ │ │ ├── RCResumeableDownloader.h │ │ │ ├── RCRichContentItem.h │ │ │ ├── RCRichContentMessage.h │ │ │ ├── RCSearchConversationResult.h │ │ │ ├── RCSightMessage.h │ │ │ ├── RCStatusDefine.h │ │ │ ├── RCStatusMessage.h │ │ │ ├── RCTSMutableDictionary.h │ │ │ ├── RCTextMessage.h │ │ │ ├── RCUnknownMessage.h │ │ │ ├── RCUploadImageStatusListener.h │ │ │ ├── RCUploadMediaStatusListener.h │ │ │ ├── RCUserInfo.h │ │ │ ├── RCUserOnlineStatusInfo.h │ │ │ ├── RCUserTypingStatus.h │ │ │ ├── RCUtilities.h │ │ │ ├── RCVoiceMessage.h │ │ │ ├── RCWatchKitStatusDelegate.h │ │ │ ├── RongIMLib.h │ │ │ ├── interf_dec.h │ │ │ └── interf_enc.h │ │ ├── Info.plist │ │ ├── Modules │ │ │ └── module.modulemap │ │ └── RongIMLib │ └── libopencore-amrnb.a └── flutter_rongcloud_im.podspec ├── lib ├── flutter_rongcloud_im.dart └── generated │ └── i18n.dart ├── pubspec.yaml └── res └── values └── strings_en.arb /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .dart_tool/ 3 | 4 | .packages 5 | .pub/ 6 | pubspec.lock 7 | 8 | build/ 9 | -------------------------------------------------------------------------------- /.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 15 | 16 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /.idea/libraries/Dart_SDK.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /.idea/libraries/Flutter_Plugins.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Flutter_for_Android.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/runConfigurations/example_lib_main_dart.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 5391447fae6209bb21a89e6a5a6583cac1af9b4b 8 | channel: stable 9 | 10 | project_type: plugin 11 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.0.1 2 | 3 | * TODO: Describe initial release. 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # flutter_rongcloud_im 2 | 3 | flutter封装的融云imlib库,项目比较忙,文档抽空写; 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter 8 | [plug-in package](https://flutter.io/developing-packages/), 9 | a specialized package that includes platform-specific implementation code for 10 | Android and/or iOS. 11 | 12 | For help getting started with Flutter, view our 13 | [online documentation](https://flutter.io/docs), which offers tutorials, 14 | samples, guidance on mobile development, and a full API reference. 15 | 16 | 17 | ### 请使用官网插件 18 | -------------------------------------------------------------------------------- /android/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | -------------------------------------------------------------------------------- /android/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | flutter_rongcloud_im 4 | Project flutter_rongcloud_im created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.buildship.core.gradleprojectbuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.buildship.core.gradleprojectnature 22 | 23 | 24 | -------------------------------------------------------------------------------- /android/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | connection.project.dir=../example/android 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | group 'com.ninefrost.flutterrongcloudim' 2 | version '1.0-SNAPSHOT' 3 | 4 | buildscript { 5 | repositories { 6 | google() 7 | jcenter() 8 | } 9 | 10 | dependencies { 11 | classpath 'com.android.tools.build:gradle:3.2.1' 12 | } 13 | } 14 | 15 | rootProject.allprojects { 16 | repositories { 17 | google() 18 | jcenter() 19 | } 20 | } 21 | 22 | apply plugin: 'com.android.library' 23 | 24 | android { 25 | compileSdkVersion 28 26 | 27 | defaultConfig { 28 | minSdkVersion 16 29 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 30 | } 31 | lintOptions { 32 | disable 'InvalidPackage' 33 | } 34 | } 35 | 36 | dependencies { 37 | implementation fileTree(dir:'libs', include: ['*.jar']) 38 | } 39 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | -------------------------------------------------------------------------------- /android/libs/Rong_IMLib.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TaleAi/flutter_rongcloud_im/5b298204a5dde362c3db78bba772123e70e066b5/android/libs/Rong_IMLib.jar -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'flutter_rongcloud_im' 2 | -------------------------------------------------------------------------------- /android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 12 | 13 | 16 | 17 | 18 | 19 | 24 | 25 | 26 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /android/src/main/java/com/ninefrost/flutterrongcloudim/common/RongCustomServiceResult.java: -------------------------------------------------------------------------------- 1 | package com.ninefrost.flutterrongcloudim.common; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | public class RongCustomServiceResult { 7 | Object result; 8 | int code; 9 | 10 | public Object getResult() { 11 | return result; 12 | } 13 | 14 | public void setResult(Object result) { 15 | this.result = result; 16 | } 17 | 18 | public int getStatus() { 19 | return code; 20 | } 21 | 22 | public Map toMap(){ 23 | Map map = new HashMap(); 24 | map.put("code", this.code); 25 | map.put("result", this.result); 26 | return map; 27 | } 28 | 29 | public void setStatus(int code) { 30 | this.code = code; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /android/src/main/java/com/ninefrost/flutterrongcloudim/common/RongErrorResult.java: -------------------------------------------------------------------------------- 1 | package com.ninefrost.flutterrongcloudim.common; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | /** 7 | * Created by weiqinxiao on 15/10/16. 8 | */ 9 | public class RongErrorResult { 10 | Object result; 11 | int code; 12 | 13 | public Object getResult() { 14 | return result; 15 | } 16 | 17 | public void setResult(Object result) { 18 | this.result = result; 19 | } 20 | 21 | public int getStatus() { 22 | return code; 23 | } 24 | 25 | public void setStatus(int code) { 26 | this.code = code; 27 | } 28 | 29 | public Map toMap(){ 30 | Map map = new HashMap(); 31 | map.put("code", this.code); 32 | map.put("result", this.result); 33 | return map; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /android/src/main/java/com/ninefrost/flutterrongcloudim/common/RongException.java: -------------------------------------------------------------------------------- 1 | package com.ninefrost.flutterrongcloudim.common; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | public class RongException { 7 | 8 | private int code; 9 | 10 | public RongException(ErrorCode errorCode) { 11 | this.code = errorCode.getValue(); 12 | } 13 | 14 | public RongException(int code) { 15 | ErrorCode errorCode = ErrorCode.setValue(code); 16 | this.code = errorCode.getValue(); 17 | } 18 | 19 | public RongException(Throwable throwable) { 20 | ErrorCode errorCode = ErrorCode.UNKNOWN; 21 | this.code = errorCode.getValue(); 22 | } 23 | 24 | public int getCode() { 25 | return code; 26 | } 27 | 28 | public void setCode(int code) { 29 | this.code = code; 30 | } 31 | 32 | public Map toMap(){ 33 | Map map = new HashMap(); 34 | map.put("code", this.code); 35 | return map; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /android/src/main/java/com/ninefrost/flutterrongcloudim/common/RongListenResult.java: -------------------------------------------------------------------------------- 1 | package com.ninefrost.flutterrongcloudim.common; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | public class RongListenResult { 7 | public static String PREPARE = "perpare"; 8 | public static String SUCCESS = "success"; 9 | public static String ERROR = "error"; 10 | public static String PROGRESS = "progress"; 11 | 12 | Object result; 13 | String status; 14 | 15 | public Object getResult() { 16 | return result; 17 | } 18 | 19 | public void setResult(Object result) { 20 | this.result = result; 21 | } 22 | 23 | public String getStatus() { 24 | return status; 25 | } 26 | 27 | public void setStatus(String status) { 28 | this.status = status; 29 | } 30 | 31 | public Map toMap(){ 32 | Map map = new HashMap(); 33 | map.put("status", this.status); 34 | map.put("result", this.result); 35 | return map; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /android/src/main/java/com/ninefrost/flutterrongcloudim/common/RongResult.java: -------------------------------------------------------------------------------- 1 | package com.ninefrost.flutterrongcloudim.common; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | public class RongResult { 7 | Object result; 8 | Status status; 9 | 10 | public Object getResult() { 11 | return result; 12 | } 13 | 14 | public void setResult(Object result) { 15 | this.result = result; 16 | } 17 | 18 | public Status getStatus() { 19 | return status; 20 | } 21 | 22 | public void setStatus(Status status) { 23 | this.status = status; 24 | } 25 | 26 | public Map toMap(){ 27 | Map map = new HashMap(); 28 | map.put("status", this.status.ordinal()); 29 | map.put("result", this.result); 30 | return map; 31 | } 32 | 33 | public static enum Status { 34 | prepare, success, error, progress 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /android/src/main/java/com/ninefrost/flutterrongcloudim/common/translation/ITranslatedMessage.java: -------------------------------------------------------------------------------- 1 | package com.ninefrost.flutterrongcloudim.common.translation; 2 | 3 | /** 4 | * Created by * Created by ailei 31/1/2019. 5 | */ 6 | public interface ITranslatedMessage { 7 | } 8 | -------------------------------------------------------------------------------- /android/src/main/java/com/ninefrost/flutterrongcloudim/common/translation/TranslatedCSGroupItem.java: -------------------------------------------------------------------------------- 1 | package com.ninefrost.flutterrongcloudim.common.translation; 2 | import java.util.HashMap; 3 | import java.util.Map; 4 | 5 | import io.rong.imlib.model.CSGroupItem; 6 | 7 | public class TranslatedCSGroupItem { 8 | String groupId; 9 | String name; 10 | boolean online; 11 | public TranslatedCSGroupItem(CSGroupItem item){ 12 | this.groupId = item.getId(); 13 | this.name = item.getName(); 14 | this.online = item.getOnline(); 15 | } 16 | 17 | public Map toMap() { 18 | Map map = new HashMap(); 19 | map.put("groupId", this.groupId); 20 | map.put("name", this.name); 21 | map.put("online", this.online); 22 | return map; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /android/src/main/java/com/ninefrost/flutterrongcloudim/common/translation/TranslatedCSGroupList.java: -------------------------------------------------------------------------------- 1 | package com.ninefrost.flutterrongcloudim.common.translation; 2 | 3 | import java.util.ArrayList; 4 | import java.util.HashMap; 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | import io.rong.imlib.model.CSGroupItem; 9 | 10 | /** 11 | * Created by wangmingqiang on 16/8/26. 12 | */ 13 | public class TranslatedCSGroupList { 14 | List groupList = new ArrayList(); 15 | public TranslatedCSGroupList(List groups) { 16 | for (CSGroupItem item : groups) 17 | groupList.add(new TranslatedCSGroupItem(item)); 18 | } 19 | 20 | public Map toMap() { 21 | Map map = new HashMap(); 22 | List list = new ArrayList(); 23 | for (TranslatedCSGroupItem item : groupList) 24 | list.add(item.toMap()); 25 | map.put("groupList", list); 26 | return map; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /android/src/main/java/com/ninefrost/flutterrongcloudim/common/translation/TranslatedCommandMessage.java: -------------------------------------------------------------------------------- 1 | package com.ninefrost.flutterrongcloudim.common.translation; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | import io.rong.imlib.model.MessageContent; 7 | import io.rong.message.CommandMessage; 8 | 9 | /** 10 | * Created by ailei 31/1/2019. 11 | */ 12 | public class TranslatedCommandMessage extends TranslatedMessageContent { 13 | String name; 14 | String data; 15 | 16 | public TranslatedCommandMessage(MessageContent content) { 17 | CommandMessage msg = (CommandMessage) content; 18 | this.name = msg.getName() == null ? "" : msg.getName(); 19 | this.data = msg.getData() == null ? "" : msg.getData(); 20 | } 21 | 22 | public Map toMap() { 23 | Map map = new HashMap(); 24 | map.put("name", this.name); 25 | map.put("data", this.data); 26 | return map; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /android/src/main/java/com/ninefrost/flutterrongcloudim/common/translation/TranslatedCommandNotificationMessage.java: -------------------------------------------------------------------------------- 1 | package com.ninefrost.flutterrongcloudim.common.translation; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | import io.rong.imlib.model.MessageContent; 7 | import io.rong.message.CommandNotificationMessage; 8 | 9 | /** 10 | * Created by ailei 31/1/2019. 11 | */ 12 | public class TranslatedCommandNotificationMessage extends TranslatedMessageContent { 13 | String name; 14 | String data; 15 | 16 | public TranslatedCommandNotificationMessage(MessageContent content) { 17 | CommandNotificationMessage msg = (CommandNotificationMessage) content; 18 | this.name = msg.getName() == null ? "" : msg.getName(); 19 | this.data = msg.getData() == null ? "" : msg.getData(); 20 | } 21 | 22 | public Map toMap() { 23 | Map map = new HashMap(); 24 | map.put("name", this.name); 25 | map.put("data", this.data); 26 | return map; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /android/src/main/java/com/ninefrost/flutterrongcloudim/common/translation/TranslatedContactNtfMessage.java: -------------------------------------------------------------------------------- 1 | package com.ninefrost.flutterrongcloudim.common.translation; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | import io.rong.imlib.model.MessageContent; 7 | import io.rong.message.ContactNotificationMessage; 8 | 9 | /** 10 | * Created by weiqinxiao on 15/12/24. 11 | */ 12 | public class TranslatedContactNtfMessage extends TranslatedMessageContent { 13 | private String operation; // 操作名,对应 ContactOperationXxxx,或自己传任何字符串。 14 | private String sourceUserId; // 请求者或者响应者的 UserId。 15 | private String targetUserId; // 被请求者或者被响应者的 UserId。 16 | private String message; // 请求或者响应消息,如添加理由或拒绝理由。 17 | private String extra; // 附加信息。 18 | 19 | public TranslatedContactNtfMessage(MessageContent content) { 20 | ContactNotificationMessage msg = (ContactNotificationMessage)content; 21 | operation = msg.getOperation() == null ? "" : msg.getOperation(); 22 | sourceUserId = msg.getSourceUserId() == null ? "" : msg.getSourceUserId(); 23 | targetUserId = msg.getTargetUserId() == null ? "" : msg.getTargetUserId(); 24 | message = msg.getMessage() == null ? "" : msg.getMessage(); 25 | extra = msg.getExtra() == null ? "" : msg.getExtra(); 26 | } 27 | 28 | public Map toMap() { 29 | Map map = new HashMap(); 30 | map.put("operation", this.operation); 31 | map.put("sourceUserId", this.sourceUserId); 32 | map.put("targetUserId", this.targetUserId); 33 | map.put("message", this.message); 34 | map.put("extra", this.extra); 35 | return map; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /android/src/main/java/com/ninefrost/flutterrongcloudim/common/translation/TranslatedConversation.java: -------------------------------------------------------------------------------- 1 | package com.ninefrost.flutterrongcloudim.common.translation; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | import io.rong.imlib.model.Conversation; 7 | import io.rong.imlib.model.Message; 8 | import io.rong.imlib.model.MessageContent; 9 | 10 | /** 11 | * Created by ailei 31/1/2019. 12 | */ 13 | public class TranslatedConversation { 14 | String conversationTitle; 15 | Conversation.ConversationType conversationType; 16 | String draft; 17 | String targetId; 18 | TranslatedMessageContent latestMessage; 19 | Message.SentStatus sentStatus; 20 | String objectName; 21 | String receivedStatus; 22 | String senderUserId; 23 | int unreadMessageCount; 24 | long receivedTime; 25 | long sentTime; 26 | boolean isTop; 27 | int latestMessageId; 28 | 29 | public TranslatedConversation(Conversation conversation) { 30 | this.conversationTitle = conversation.getConversationTitle() == null ? "" : conversation.getConversationTitle(); 31 | this.conversationType = conversation.getConversationType(); 32 | this.draft = conversation.getDraft() == null ? "" : conversation.getDraft(); 33 | this.targetId = conversation.getTargetId() == null ? "" : conversation.getTargetId(); 34 | this.sentStatus = conversation.getSentStatus(); 35 | this.objectName = conversation.getObjectName(); 36 | int flag = conversation.getReceivedStatus().getFlag(); 37 | if (flag == 0) 38 | this.receivedStatus = "UNREAD"; 39 | else if (flag == 1) 40 | this.receivedStatus = "READ"; 41 | else if (flag == 3 || flag == 2) 42 | this.receivedStatus = "LISTENED"; 43 | else if (flag == 4) 44 | this.receivedStatus = "DOWNLOADED"; 45 | else 46 | this.receivedStatus = "READ"; 47 | 48 | this.senderUserId = conversation.getSenderUserId() == null ? "" : conversation.getSenderUserId(); 49 | this.unreadMessageCount = conversation.getUnreadMessageCount(); 50 | this.receivedTime = conversation.getReceivedTime(); 51 | this.sentTime = conversation.getSentTime(); 52 | this.isTop = conversation.isTop(); 53 | this.latestMessageId = conversation.getLatestMessageId(); 54 | 55 | MessageContent msgContent = conversation.getLatestMessage(); 56 | TranslatedMessageContent tc = TranslatedMessage.translateMessageContent(msgContent); 57 | this.latestMessage = (tc == null ? new TranslatedMessageContent() : tc); 58 | } 59 | 60 | public Map toMap() { 61 | Map map = new HashMap(); 62 | map.put("conversationTitle", this.conversationTitle); 63 | map.put("conversationType", this.conversationType.getValue()); 64 | map.put("draft", this.draft); 65 | map.put("targetId", this.targetId); 66 | map.put("latestMessage", this.latestMessage.toMap()); 67 | map.put("sentStatus", this.sentStatus.getValue()); 68 | map.put("objectName", this.objectName); 69 | map.put("receivedStatus", this.receivedStatus); 70 | map.put("senderUserId", this.senderUserId ); 71 | map.put("unreadMessageCount", this.unreadMessageCount ); 72 | map.put("receivedTime", this.receivedTime); 73 | map.put("sentTime", this.sentTime); 74 | map.put("isTop", this.isTop); 75 | map.put("latestMessageId", this.latestMessageId); 76 | return map; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /android/src/main/java/com/ninefrost/flutterrongcloudim/common/translation/TranslatedConversationNtfyStatus.java: -------------------------------------------------------------------------------- 1 | package com.ninefrost.flutterrongcloudim.common.translation; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | import io.rong.imlib.model.Conversation; 7 | 8 | /** 9 | * Created by weiqinxiao on 15/9/16. 10 | */ 11 | public class TranslatedConversationNtfyStatus { 12 | int code; 13 | String notificationStatus; 14 | 15 | public TranslatedConversationNtfyStatus(Conversation.ConversationNotificationStatus status) { 16 | this.code = status.getValue(); 17 | this.notificationStatus = (status == null ? "" : status.toString()); 18 | } 19 | 20 | public Map toMap() { 21 | Map map = new HashMap(); 22 | map.put("code", this.code); 23 | map.put("notificationStatus", this.notificationStatus); 24 | return map; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /android/src/main/java/com/ninefrost/flutterrongcloudim/common/translation/TranslatedCustomServiceDialogID.java: -------------------------------------------------------------------------------- 1 | package com.ninefrost.flutterrongcloudim.common.translation; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | /** 7 | * Created by wangmingqiang on 16/8/26. 8 | */ 9 | public class TranslatedCustomServiceDialogID { 10 | String dialogId; 11 | public TranslatedCustomServiceDialogID(String id) { 12 | dialogId = id; 13 | } 14 | 15 | public Map toMap() { 16 | Map map = new HashMap(); 17 | map.put("dialogId", this.dialogId); 18 | return map; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /android/src/main/java/com/ninefrost/flutterrongcloudim/common/translation/TranslatedCustomServiceErrorMsg.java: -------------------------------------------------------------------------------- 1 | package com.ninefrost.flutterrongcloudim.common.translation; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | /** 7 | * Created by wangmingqiang on 16/8/26. 8 | */ 9 | public class TranslatedCustomServiceErrorMsg { 10 | int errorCode; 11 | String errorMsg; 12 | 13 | public TranslatedCustomServiceErrorMsg(int code, String msg) { 14 | errorCode = code; 15 | errorMsg = msg; 16 | } 17 | 18 | public Map toMap() { 19 | Map map = new HashMap(); 20 | map.put("errorCode", this.errorCode); 21 | map.put("errorMsg", this.errorMsg); 22 | return map; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /android/src/main/java/com/ninefrost/flutterrongcloudim/common/translation/TranslatedCustomServiceMode.java: -------------------------------------------------------------------------------- 1 | package com.ninefrost.flutterrongcloudim.common.translation; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | /** 7 | * Created by wangmingqiang on 16/8/26. 8 | */ 9 | public class TranslatedCustomServiceMode { 10 | int mode; 11 | 12 | public TranslatedCustomServiceMode(int csMode) { 13 | mode = csMode; 14 | } 15 | 16 | public Map toMap() { 17 | Map map = new HashMap(); 18 | map.put("mode", this.mode); 19 | return map; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /android/src/main/java/com/ninefrost/flutterrongcloudim/common/translation/TranslatedCustomServiceQuitMsg.java: -------------------------------------------------------------------------------- 1 | package com.ninefrost.flutterrongcloudim.common.translation; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | /** 7 | * Created by wangmingqiang on 16/8/26. 8 | */ 9 | public class TranslatedCustomServiceQuitMsg { 10 | String quitMsg; 11 | public TranslatedCustomServiceQuitMsg(String msg) { 12 | quitMsg = msg; 13 | } 14 | 15 | public Map toMap() { 16 | Map map = new HashMap(); 17 | map.put("quitMsg", this.quitMsg); 18 | return map; 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /android/src/main/java/com/ninefrost/flutterrongcloudim/common/translation/TranslatedDiscussion.java: -------------------------------------------------------------------------------- 1 | package com.ninefrost.flutterrongcloudim.common.translation; 2 | 3 | import java.util.HashMap; 4 | import java.util.List; 5 | import java.util.Map; 6 | 7 | import io.rong.imlib.model.Discussion; 8 | 9 | /** 10 | * Created by weiqinxiao on 15/9/16. 11 | */ 12 | public class TranslatedDiscussion { 13 | String creatorId; 14 | String id; 15 | String name; 16 | List memberIdList; 17 | String inviteStatus; 18 | 19 | public TranslatedDiscussion(Discussion discussion) { 20 | this.creatorId = discussion.getCreatorId(); 21 | this.id = discussion.getId(); 22 | this.name = discussion.getName(); 23 | this.memberIdList = discussion.getMemberIdList(); 24 | this.inviteStatus = discussion.isOpen() ? "OPENED" : "CLOSED"; 25 | } 26 | 27 | public Map toMap() { 28 | Map map = new HashMap(); 29 | map.put("creatorId",this.creatorId ); 30 | map.put("id", this.id); 31 | map.put("name", this.name); 32 | map.put("memberIdList", this.memberIdList); 33 | map.put("inviteStatus", this.inviteStatus); 34 | return map; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /android/src/main/java/com/ninefrost/flutterrongcloudim/common/translation/TranslatedDiscussionNtfMessage.java: -------------------------------------------------------------------------------- 1 | package com.ninefrost.flutterrongcloudim.common.translation; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | import io.rong.imlib.model.MessageContent; 7 | import io.rong.message.DiscussionNotificationMessage; 8 | 9 | /** 10 | * Created by weiqinxiao on 15/9/17. 11 | */ 12 | public class TranslatedDiscussionNtfMessage extends TranslatedMessageContent { 13 | String extension; 14 | String operator; 15 | int type; 16 | 17 | public TranslatedDiscussionNtfMessage(MessageContent content) { 18 | DiscussionNotificationMessage message = (DiscussionNotificationMessage) content; 19 | this.extension = message.getExtension() == null ? "" : message.getExtension(); 20 | this.operator = message.getOperator() == null ? "" : message.getOperator(); 21 | this.type = message.getType(); 22 | } 23 | 24 | public Map toMap() { 25 | Map map = new HashMap(); 26 | map.put("extension", this.extension); 27 | map.put("operator", this.operator); 28 | map.put("type", this.type); 29 | return map; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /android/src/main/java/com/ninefrost/flutterrongcloudim/common/translation/TranslatedGrpNtfMessage.java: -------------------------------------------------------------------------------- 1 | package com.ninefrost.flutterrongcloudim.common.translation; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | import io.rong.imlib.model.MessageContent; 7 | import io.rong.message.GroupNotificationMessage; 8 | 9 | /** 10 | * Created by weiqinxiao on 16/1/4. 11 | */ 12 | public class TranslatedGrpNtfMessage extends TranslatedMessageContent { 13 | private String operatorUserId; 14 | private String operation; 15 | private String data; 16 | private String message; 17 | private String extra; 18 | 19 | public TranslatedGrpNtfMessage(MessageContent content) { 20 | GroupNotificationMessage msg = (GroupNotificationMessage)content; 21 | operation = msg.getOperation() == null ? "" : msg.getOperation(); 22 | operatorUserId = msg.getOperatorUserId() == null ? "" : msg.getOperatorUserId(); 23 | data = msg.getData() == null ? "" : msg.getData(); 24 | message = msg.getMessage() == null ? "" : msg.getMessage(); 25 | extra = msg.getExtra() == null ? "" : msg.getExtra(); 26 | } 27 | 28 | public Map toMap() { 29 | Map map = new HashMap(); 30 | map.put("operatorUserId", this.operatorUserId); 31 | map.put("operation", this.operation); 32 | map.put("data", this.data); 33 | map.put("message", this.message); 34 | map.put("extra", this.extra); 35 | return map; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /android/src/main/java/com/ninefrost/flutterrongcloudim/common/translation/TranslatedImageMessage.java: -------------------------------------------------------------------------------- 1 | package com.ninefrost.flutterrongcloudim.common.translation; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | import io.rong.imlib.model.MessageContent; 7 | import io.rong.imlib.model.UserInfo; 8 | import io.rong.message.ImageMessage; 9 | 10 | /** 11 | * Created by ailei 31/1/2019. 12 | */ 13 | public class TranslatedImageMessage extends TranslatedMessageContent { 14 | String thumbPath; 15 | String imageUrl; 16 | UserInfo userInfo; 17 | String extra; 18 | 19 | public TranslatedImageMessage(MessageContent content) { 20 | ImageMessage imageMessage = (ImageMessage) content; 21 | 22 | this.imageUrl = imageMessage.getRemoteUri() != null ? 23 | imageMessage.getRemoteUri().toString() : 24 | (imageMessage.getLocalUri() != null ? imageMessage.getLocalUri().getPath() : ""); 25 | this.thumbPath = imageMessage.getThumUri() != null ? imageMessage.getThumUri().getPath() : ""; 26 | this.extra = imageMessage.getExtra() == null ? "" : imageMessage.getExtra(); 27 | this.userInfo = imageMessage.getUserInfo() == null ? null : imageMessage.getUserInfo(); 28 | } 29 | 30 | Map getUserInfo() { 31 | Map map = new HashMap(); 32 | if (this.userInfo != null) { 33 | map.put("id", this.userInfo.getUserId()); 34 | map.put("name", this.userInfo.getName()); 35 | map.put("avatar", this.userInfo.getPortraitUri().toString()); 36 | map.put("extra", this.userInfo.getExtra()); 37 | } 38 | return map; 39 | } 40 | 41 | public Map toMap() { 42 | Map map = new HashMap(); 43 | map.put("thumbPath", this.thumbPath); 44 | map.put("imageUrl", this.imageUrl); 45 | map.put("extra", this.extra); 46 | map.put("user", this.getUserInfo()); 47 | return map; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /android/src/main/java/com/ninefrost/flutterrongcloudim/common/translation/TranslatedInformationNtfMessage.java: -------------------------------------------------------------------------------- 1 | package com.ninefrost.flutterrongcloudim.common.translation; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | import io.rong.imlib.model.MessageContent; 7 | import io.rong.message.InformationNotificationMessage; 8 | 9 | /** 10 | * Created by weiqinxiao on 15/9/16. 11 | */ 12 | public class TranslatedInformationNtfMessage extends TranslatedMessageContent { 13 | String message; 14 | String extra; 15 | 16 | public TranslatedInformationNtfMessage(MessageContent content) { 17 | InformationNotificationMessage message = (InformationNotificationMessage)content; 18 | this.message = message.getMessage() == null ? "" : message.getMessage(); 19 | this.extra = message.getExtra() == null ? "" : message.getExtra(); 20 | } 21 | 22 | public Map toMap() { 23 | Map map = new HashMap(); 24 | map.put("message", this.message); 25 | map.put("extra", this.extra); 26 | return map; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /android/src/main/java/com/ninefrost/flutterrongcloudim/common/translation/TranslatedLocationMessage.java: -------------------------------------------------------------------------------- 1 | package com.ninefrost.flutterrongcloudim.common.translation; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | import io.rong.imlib.model.MessageContent; 7 | import io.rong.message.LocationMessage; 8 | 9 | /** 10 | * Created by ailei 31/1/2019. 11 | */ 12 | public class TranslatedLocationMessage extends TranslatedMessageContent { 13 | double latitude; 14 | double longitude; 15 | String poi; 16 | String imagePath; 17 | String extra; 18 | 19 | public TranslatedLocationMessage(MessageContent messageContent) { 20 | LocationMessage locationMessage = (LocationMessage) messageContent; 21 | extra = locationMessage.getExtra() == null ? "" : locationMessage.getExtra(); 22 | latitude = locationMessage.getLat(); 23 | longitude = locationMessage.getLng(); 24 | imagePath = locationMessage.getImgUri() != null ? locationMessage.getImgUri().getPath() : null; 25 | poi = locationMessage.getPoi() == null ? "" : locationMessage.getPoi(); 26 | } 27 | 28 | public Map toMap() { 29 | Map map = new HashMap(); 30 | map.put("latitude", this.latitude); 31 | map.put("longitude", this.longitude); 32 | map.put("poi", this.poi); 33 | map.put("imagePath", this.imagePath); 34 | map.put("extra", this.extra); 35 | return map; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /android/src/main/java/com/ninefrost/flutterrongcloudim/common/translation/TranslatedMessageContent.java: -------------------------------------------------------------------------------- 1 | package com.ninefrost.flutterrongcloudim.common.translation; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | /** 7 | * Created by ailei 31/1/2019. 8 | */ 9 | public class TranslatedMessageContent { 10 | public Map toMap() { 11 | return new HashMap(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /android/src/main/java/com/ninefrost/flutterrongcloudim/common/translation/TranslatedProfileNtfMessage.java: -------------------------------------------------------------------------------- 1 | package com.ninefrost.flutterrongcloudim.common.translation; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | import io.rong.imlib.model.MessageContent; 7 | import io.rong.message.ProfileNotificationMessage; 8 | 9 | /** 10 | * Created by weiqinxiao on 15/12/24. 11 | */ 12 | public class TranslatedProfileNtfMessage extends TranslatedMessageContent { 13 | private String operation; // 资料变更的操作名。 14 | private String data; // 资料变更的数据,可以为任意格式,如 JSON。 15 | private String extra; // 附加信息。 16 | 17 | public TranslatedProfileNtfMessage(MessageContent content) { 18 | ProfileNotificationMessage message = (ProfileNotificationMessage)content; 19 | operation = message.getOperation() == null ? "" : message.getOperation(); 20 | data = message.getData() == null ? "" : message.getData(); 21 | extra = message.getExtra() == null ? "" : message.getExtra(); 22 | } 23 | 24 | public Map toMap() { 25 | Map map = new HashMap(); 26 | map.put("operation", this.operation); 27 | map.put("data", this.data); 28 | map.put("extra", this.extra); 29 | return map; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /android/src/main/java/com/ninefrost/flutterrongcloudim/common/translation/TranslatedQuietHour.java: -------------------------------------------------------------------------------- 1 | package com.ninefrost.flutterrongcloudim.common.translation; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | /** 7 | * Created by weiqinxiao on 15/9/16. 8 | */ 9 | public class TranslatedQuietHour { 10 | String startTime; 11 | int spanMinutes; 12 | 13 | public TranslatedQuietHour(String startTime, int spanMinutes) { 14 | this.startTime = startTime; 15 | this.spanMinutes = spanMinutes; 16 | } 17 | 18 | public Map toMap() { 19 | Map map = new HashMap(); 20 | map.put("startTime", this.startTime); 21 | map.put("spanMinutes", this.spanMinutes); 22 | return map; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /android/src/main/java/com/ninefrost/flutterrongcloudim/common/translation/TranslatedRichContentMessage.java: -------------------------------------------------------------------------------- 1 | package com.ninefrost.flutterrongcloudim.common.translation; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | import io.rong.imlib.model.MessageContent; 7 | import io.rong.message.RichContentMessage; 8 | 9 | /** 10 | * Created by ailei 31/1/2019. 11 | */ 12 | public class TranslatedRichContentMessage extends TranslatedMessageContent { 13 | String title; 14 | String description; 15 | String imageUrl; 16 | String url; 17 | String extra; 18 | 19 | public TranslatedRichContentMessage(MessageContent content) { 20 | RichContentMessage richContentMessage = (RichContentMessage)content; 21 | this.extra = richContentMessage.getExtra() == null ? "" : richContentMessage.getExtra(); 22 | this.title = richContentMessage.getTitle() == null ? "" : richContentMessage.getTitle(); 23 | this.description = richContentMessage.getContent() == null ? "" : richContentMessage.getContent(); 24 | this.imageUrl = richContentMessage.getImgUrl() == null ? "" : richContentMessage.getImgUrl(); 25 | this.url = richContentMessage.getUrl() == null ? "" : richContentMessage.getUrl(); 26 | } 27 | 28 | public Map toMap() { 29 | Map map = new HashMap(); 30 | map.put("title", this.title); 31 | map.put("description", this.description); 32 | map.put("imageUrl", this.imageUrl); 33 | map.put("url", this.url); 34 | map.put("extra", this.extra); 35 | return map; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /android/src/main/java/com/ninefrost/flutterrongcloudim/common/translation/TranslatedTextMessage.java: -------------------------------------------------------------------------------- 1 | package com.ninefrost.flutterrongcloudim.common.translation; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | import io.rong.imlib.model.MessageContent; 7 | import io.rong.imlib.model.UserInfo; 8 | import io.rong.message.TextMessage; 9 | 10 | /** 11 | * Created by ailei 31/1/2019. 12 | */ 13 | public class TranslatedTextMessage extends TranslatedMessageContent { 14 | String text; 15 | String extra; 16 | UserInfo userInfo; 17 | 18 | public TranslatedTextMessage(MessageContent content) { 19 | TextMessage textMessage = (TextMessage) content; 20 | this.text = textMessage.getContent() == null ? "" : textMessage.getContent(); 21 | this.extra = textMessage.getExtra() == null ? "" : textMessage.getExtra(); 22 | this.userInfo = textMessage.getUserInfo() == null ? null : textMessage.getUserInfo(); 23 | } 24 | 25 | Map getUserInfo() { 26 | Map map = new HashMap(); 27 | if (this.userInfo != null) { 28 | map.put("id", this.userInfo.getUserId()); 29 | map.put("name", this.userInfo.getName()); 30 | map.put("avatar", this.userInfo.getPortraitUri().toString()); 31 | map.put("extra", this.userInfo.getExtra()); 32 | } 33 | return map; 34 | } 35 | 36 | public Map toMap() { 37 | Map map = new HashMap(); 38 | map.put("text", this.text); 39 | map.put("extra", this.extra); 40 | map.put("user", this.getUserInfo()); 41 | return map; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /android/src/main/java/com/ninefrost/flutterrongcloudim/common/translation/TranslatedVoiceMessage.java: -------------------------------------------------------------------------------- 1 | package com.ninefrost.flutterrongcloudim.common.translation; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | import io.rong.imlib.model.MessageContent; 7 | import io.rong.message.VoiceMessage; 8 | 9 | /** 10 | * Created by ailei 31/1/2019. 11 | */ 12 | public class TranslatedVoiceMessage extends TranslatedMessageContent { 13 | String voicePath; 14 | int duration; 15 | String extra; 16 | 17 | public TranslatedVoiceMessage(MessageContent content) { 18 | VoiceMessage voiceMessage = (VoiceMessage) content; 19 | this.duration = voiceMessage.getDuration(); 20 | this.extra = voiceMessage.getExtra() == null ? "" : voiceMessage.getExtra(); 21 | this.voicePath = voiceMessage.getUri() != null ? voiceMessage.getUri().getPath() : null; 22 | } 23 | 24 | public Map toMap() { 25 | Map map = new HashMap(); 26 | map.put("voicePath", this.voicePath); 27 | map.put("duration", this.duration); 28 | map.put("extra", this.extra); 29 | return map; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /android/src/main/jniLibs/armeabi-v7a/libRongIMLib.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TaleAi/flutter_rongcloud_im/5b298204a5dde362c3db78bba772123e70e066b5/android/src/main/jniLibs/armeabi-v7a/libRongIMLib.so -------------------------------------------------------------------------------- /android/src/main/jniLibs/armeabi-v7a/libsqlite.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TaleAi/flutter_rongcloud_im/5b298204a5dde362c3db78bba772123e70e066b5/android/src/main/jniLibs/armeabi-v7a/libsqlite.so -------------------------------------------------------------------------------- /arts/ali.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TaleAi/flutter_rongcloud_im/5b298204a5dde362c3db78bba772123e70e066b5/arts/ali.jpeg -------------------------------------------------------------------------------- /arts/wx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TaleAi/flutter_rongcloud_im/5b298204a5dde362c3db78bba772123e70e066b5/arts/wx.png -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.lock 4 | *.log 5 | *.pyc 6 | *.swp 7 | .DS_Store 8 | .atom/ 9 | .buildlog/ 10 | .history 11 | .svn/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # Visual Studio Code related 20 | .vscode/ 21 | 22 | # Flutter/Dart/Pub related 23 | **/doc/api/ 24 | .dart_tool/ 25 | .flutter-plugins 26 | .packages 27 | .pub-cache/ 28 | .pub/ 29 | build/ 30 | 31 | # Android related 32 | **/android/**/gradle-wrapper.jar 33 | **/android/.gradle 34 | **/android/captures/ 35 | **/android/gradlew 36 | **/android/gradlew.bat 37 | **/android/local.properties 38 | **/android/**/GeneratedPluginRegistrant.java 39 | 40 | # iOS/XCode related 41 | **/ios/**/*.mode1v3 42 | **/ios/**/*.mode2v3 43 | **/ios/**/*.moved-aside 44 | **/ios/**/*.pbxuser 45 | **/ios/**/*.perspectivev3 46 | **/ios/**/*sync/ 47 | **/ios/**/.sconsign.dblite 48 | **/ios/**/.tags* 49 | **/ios/**/.vagrant/ 50 | **/ios/**/DerivedData/ 51 | **/ios/**/Icon? 52 | **/ios/**/Pods/ 53 | **/ios/**/.symlinks/ 54 | **/ios/**/profile 55 | **/ios/**/xcuserdata 56 | **/ios/.generated/ 57 | **/ios/Flutter/App.framework 58 | **/ios/Flutter/Flutter.framework 59 | **/ios/Flutter/Generated.xcconfig 60 | **/ios/Flutter/app.flx 61 | **/ios/Flutter/app.zip 62 | **/ios/Flutter/flutter_assets/ 63 | **/ios/ServiceDefinitions.json 64 | **/ios/Runner/GeneratedPluginRegistrant.* 65 | 66 | # Exceptions to above rules. 67 | !**/ios/**/default.mode1v3 68 | !**/ios/**/default.mode2v3 69 | !**/ios/**/default.pbxuser 70 | !**/ios/**/default.perspectivev3 71 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 72 | -------------------------------------------------------------------------------- /example/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 5391447fae6209bb21a89e6a5a6583cac1af9b4b 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- 1 | # flutter_rongcloud_im_example 2 | 3 | Demonstrates how to use the flutter_rongcloud_im plugin. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.io/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.io/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.io/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /example/android/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | android 4 | Project android created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.buildship.core.gradleprojectbuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.buildship.core.gradleprojectnature 16 | 17 | 18 | -------------------------------------------------------------------------------- /example/android/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | connection.project.dir= 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /example/android/app/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /example/android/app/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | app 4 | Project app created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.buildship.core.gradleprojectbuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.buildship.core.gradleprojectnature 22 | 23 | 24 | -------------------------------------------------------------------------------- /example/android/app/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | connection.project.dir=.. 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 | 27 | android { 28 | compileSdkVersion 27 29 | 30 | lintOptions { 31 | disable 'InvalidPackage' 32 | } 33 | 34 | defaultConfig { 35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 36 | applicationId "com.ninefrost.flutterrongcloudimexample" 37 | minSdkVersion 16 38 | targetSdkVersion 27 39 | versionCode flutterVersionCode.toInteger() 40 | versionName flutterVersionName 41 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 42 | } 43 | 44 | buildTypes { 45 | release { 46 | // TODO: Add your own signing config for the release build. 47 | // Signing with the debug keys for now, so `flutter run --release` works. 48 | signingConfig signingConfigs.debug 49 | } 50 | } 51 | } 52 | 53 | flutter { 54 | source '../..' 55 | } 56 | 57 | dependencies { 58 | testImplementation 'junit:junit:4.12' 59 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 60 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 61 | } 62 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 10 | 15 | 19 | 26 | 30 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/ninefrost/flutterrongcloudimexample/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.ninefrost.flutterrongcloudimexample; 2 | 3 | import android.os.Bundle; 4 | import io.flutter.app.FlutterActivity; 5 | import io.flutter.plugins.GeneratedPluginRegistrant; 6 | 7 | public class MainActivity extends FlutterActivity { 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | GeneratedPluginRegistrant.registerWith(this); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TaleAi/flutter_rongcloud_im/5b298204a5dde362c3db78bba772123e70e066b5/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TaleAi/flutter_rongcloud_im/5b298204a5dde362c3db78bba772123e70e066b5/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TaleAi/flutter_rongcloud_im/5b298204a5dde362c3db78bba772123e70e066b5/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TaleAi/flutter_rongcloud_im/5b298204a5dde362c3db78bba772123e70e066b5/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TaleAi/flutter_rongcloud_im/5b298204a5dde362c3db78bba772123e70e066b5/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.3.0' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip 7 | -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def parse_KV_file(file, separator='=') 14 | file_abs_path = File.expand_path(file) 15 | if !File.exists? file_abs_path 16 | return []; 17 | end 18 | pods_ary = [] 19 | skip_line_start_symbols = ["#", "/"] 20 | File.foreach(file_abs_path) { |line| 21 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } 22 | plugin = line.split(pattern=separator) 23 | if plugin.length == 2 24 | podname = plugin[0].strip() 25 | path = plugin[1].strip() 26 | podpath = File.expand_path("#{path}", file_abs_path) 27 | pods_ary.push({:name => podname, :path => podpath}); 28 | else 29 | puts "Invalid plugin specification: #{line}" 30 | end 31 | } 32 | return pods_ary 33 | end 34 | 35 | target 'Runner' do 36 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock 37 | # referring to absolute paths on developers' machines. 38 | system('rm -rf .symlinks') 39 | system('mkdir -p .symlinks/plugins') 40 | 41 | # Flutter Pods 42 | generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig') 43 | if generated_xcode_build_settings.empty? 44 | puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first." 45 | end 46 | generated_xcode_build_settings.map { |p| 47 | if p[:name] == 'FLUTTER_FRAMEWORK_DIR' 48 | symlink = File.join('.symlinks', 'flutter') 49 | File.symlink(File.dirname(p[:path]), symlink) 50 | pod 'Flutter', :path => File.join(symlink, File.basename(p[:path])) 51 | end 52 | } 53 | 54 | # Plugin Pods 55 | plugin_pods = parse_KV_file('../.flutter-plugins') 56 | plugin_pods.map { |p| 57 | symlink = File.join('.symlinks', 'plugins', p[:name]) 58 | File.symlink(p[:path], symlink) 59 | pod p[:name], :path => File.join(symlink, 'ios') 60 | } 61 | end 62 | 63 | post_install do |installer| 64 | installer.pods_project.targets.each do |target| 65 | target.build_configurations.each do |config| 66 | config.build_settings['ENABLE_BITCODE'] = 'NO' 67 | end 68 | end 69 | end 70 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 56 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 75 | 77 | 83 | 84 | 85 | 86 | 88 | 89 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Original 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /example/ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #include "AppDelegate.h" 2 | #include "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application 7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 8 | [GeneratedPluginRegistrant registerWithRegistry:self]; 9 | // Override point for customization after application launch. 10 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TaleAi/flutter_rongcloud_im/5b298204a5dde362c3db78bba772123e70e066b5/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TaleAi/flutter_rongcloud_im/5b298204a5dde362c3db78bba772123e70e066b5/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TaleAi/flutter_rongcloud_im/5b298204a5dde362c3db78bba772123e70e066b5/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TaleAi/flutter_rongcloud_im/5b298204a5dde362c3db78bba772123e70e066b5/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TaleAi/flutter_rongcloud_im/5b298204a5dde362c3db78bba772123e70e066b5/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TaleAi/flutter_rongcloud_im/5b298204a5dde362c3db78bba772123e70e066b5/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TaleAi/flutter_rongcloud_im/5b298204a5dde362c3db78bba772123e70e066b5/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TaleAi/flutter_rongcloud_im/5b298204a5dde362c3db78bba772123e70e066b5/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TaleAi/flutter_rongcloud_im/5b298204a5dde362c3db78bba772123e70e066b5/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TaleAi/flutter_rongcloud_im/5b298204a5dde362c3db78bba772123e70e066b5/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TaleAi/flutter_rongcloud_im/5b298204a5dde362c3db78bba772123e70e066b5/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TaleAi/flutter_rongcloud_im/5b298204a5dde362c3db78bba772123e70e066b5/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TaleAi/flutter_rongcloud_im/5b298204a5dde362c3db78bba772123e70e066b5/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TaleAi/flutter_rongcloud_im/5b298204a5dde362c3db78bba772123e70e066b5/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TaleAi/flutter_rongcloud_im/5b298204a5dde362c3db78bba772123e70e066b5/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TaleAi/flutter_rongcloud_im/5b298204a5dde362c3db78bba772123e70e066b5/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TaleAi/flutter_rongcloud_im/5b298204a5dde362c3db78bba772123e70e066b5/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TaleAi/flutter_rongcloud_im/5b298204a5dde362c3db78bba772123e70e066b5/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /example/ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /example/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | flutter_rongcloud_im_example 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /example/ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char* argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /example/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'dart:async'; 3 | 4 | import 'package:flutter/services.dart'; 5 | import 'package:flutter_rongcloud_im/flutter_rongcloud_im.dart'; 6 | 7 | void main() => runApp(MyApp()); 8 | 9 | class MyApp extends StatefulWidget { 10 | @override 11 | _MyAppState createState() => _MyAppState(); 12 | } 13 | 14 | class _MyAppState extends State { 15 | String _token = 'token'; 16 | 17 | @override 18 | void initState() { 19 | super.initState(); 20 | _init(); 21 | } 22 | 23 | // Platform messages are asynchronous, so we initialize in an async method. 24 | Future _init() async { 25 | String platformVersion; 26 | // Platform messages may fail, so we use a try/catch PlatformException. 27 | try { 28 | await FlutterRongcloudIm.init(_token); //appkey 29 | FlutterRongcloudIm.connect(_token); // 服务器生成的token 30 | FlutterRongcloudIm.joinChatRoom('roomid', -1); // 加入聊天室 31 | FlutterRongcloudIm.responseFromMessageReceived.listen((data) { 32 | //收到消息 33 | }); 34 | // FlutterRongcloudIm.setUserInfo(id, name, avatar, level); // 设置用户信息 35 | // FlutterRongcloudIm.sendImageMessage(conversationType, targetId, imagePath, extra); //发送文字消息 36 | // FlutterRongcloudIm.sendTextMessage(conversationType, targetId, content, extra); 37 | } on PlatformException { 38 | platformVersion = 'Failed to get platform version.'; 39 | } 40 | 41 | // If the widget was removed from the tree while the asynchronous platform 42 | // message was in flight, we want to discard the reply rather than calling 43 | // setState to update our non-existent appearance. 44 | if (!mounted) return; 45 | 46 | setState(() {}); 47 | } 48 | 49 | @override 50 | Widget build(BuildContext context) { 51 | return MaterialApp( 52 | home: Scaffold( 53 | appBar: AppBar( 54 | title: const Text('Plugin example app'), 55 | ), 56 | body: Center( 57 | child: Text('Running on:\n'), 58 | ), 59 | ), 60 | ); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_rongcloud_im_example 2 | description: Demonstrates how to use the flutter_rongcloud_im plugin. 3 | publish_to: 'none' 4 | 5 | environment: 6 | sdk: ">=2.0.0-dev.68.0 <3.0.0" 7 | 8 | dependencies: 9 | flutter: 10 | sdk: flutter 11 | 12 | # The following adds the Cupertino Icons font to your application. 13 | # Use with the CupertinoIcons class for iOS style icons. 14 | cupertino_icons: ^0.1.2 15 | 16 | dev_dependencies: 17 | flutter_test: 18 | sdk: flutter 19 | 20 | flutter_rongcloud_im: 21 | path: ../ 22 | 23 | # For information on the generic Dart part of this file, see the 24 | # following page: https://www.dartlang.org/tools/pub/pubspec 25 | 26 | # The following section is specific to Flutter. 27 | flutter: 28 | 29 | # The following line ensures that the Material Icons font is 30 | # included with your application, so that you can use the icons in 31 | # the material Icons class. 32 | uses-material-design: true 33 | 34 | # To add assets to your application, add an assets section, like this: 35 | # assets: 36 | # - images/a_dot_burr.jpeg 37 | # - images/a_dot_ham.jpeg 38 | 39 | # An image asset can refer to one or more resolution-specific "variants", see 40 | # https://flutter.io/assets-and-images/#resolution-aware. 41 | 42 | # For details regarding adding assets from package dependencies, see 43 | # https://flutter.io/assets-and-images/#from-packages 44 | 45 | # To add custom fonts to your application, add a fonts section here, 46 | # in this "flutter" section. Each entry in this list should have a 47 | # "family" key with the font family name, and a "fonts" key with a 48 | # list giving the asset and other descriptors for the font. For 49 | # example: 50 | # fonts: 51 | # - family: Schyler 52 | # fonts: 53 | # - asset: fonts/Schyler-Regular.ttf 54 | # - asset: fonts/Schyler-Italic.ttf 55 | # style: italic 56 | # - family: Trajan Pro 57 | # fonts: 58 | # - asset: fonts/TrajanPro.ttf 59 | # - asset: fonts/TrajanPro_Bold.ttf 60 | # weight: 700 61 | # 62 | # For details regarding fonts from package dependencies, 63 | # see https://flutter.io/custom-fonts/#from-packages 64 | -------------------------------------------------------------------------------- /example/test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:flutter_rongcloud_im_example/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Verify Platform version', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that platform version is retrieved. 19 | expect( 20 | find.byWidgetPredicate( 21 | (Widget widget) => widget is Text && 22 | widget.data.startsWith('Running on:'), 23 | ), 24 | findsOneWidget, 25 | ); 26 | }); 27 | } 28 | -------------------------------------------------------------------------------- /flutter_rongcloud_im.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vagrant/ 3 | .sconsign.dblite 4 | .svn/ 5 | 6 | .DS_Store 7 | *.swp 8 | profile 9 | 10 | DerivedData/ 11 | build/ 12 | GeneratedPluginRegistrant.h 13 | GeneratedPluginRegistrant.m 14 | 15 | .generated/ 16 | 17 | *.pbxuser 18 | *.mode1v3 19 | *.mode2v3 20 | *.perspectivev3 21 | 22 | !default.pbxuser 23 | !default.mode1v3 24 | !default.mode2v3 25 | !default.perspectivev3 26 | 27 | xcuserdata 28 | 29 | *.moved-aside 30 | 31 | *.pyc 32 | *sync/ 33 | Icon? 34 | .tags* 35 | 36 | /Flutter/Generated.xcconfig 37 | -------------------------------------------------------------------------------- /ios/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TaleAi/flutter_rongcloud_im/5b298204a5dde362c3db78bba772123e70e066b5/ios/Assets/.gitkeep -------------------------------------------------------------------------------- /ios/Classes/FlutterRongcloudImPlugin.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface FlutterRongcloudImPlugin : NSObject 4 | @end 5 | -------------------------------------------------------------------------------- /ios/Classes/RCDCustomerServiceViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCDCustomerServiceViewController.h 3 | // RCloudMessage 4 | // 5 | // Created by litao on 16/2/23. 6 | // Copyright © 2016年 RongCloud. All rights reserved. 7 | // 8 | #ifdef RC_SUPPORT_IMKIT 9 | #import 10 | 11 | @interface RCDCustomerServiceViewController : RCConversationViewController 12 | 13 | @end 14 | #endif 15 | -------------------------------------------------------------------------------- /ios/Classes/RongCloudApplicationHandler.h: -------------------------------------------------------------------------------- 1 | // 2 | // RongCloudApplicationHandler.h 3 | // CordovaDemo 4 | // 5 | // Created by litao on 15/11/2. 6 | // 7 | // 8 | 9 | #import 10 | #import 11 | UIKIT_EXTERN NSString *const kAppBackgroundMode; 12 | UIKIT_EXTERN NSString *const kDeviceToken; 13 | 14 | 15 | @interface RongCloudApplicationHandler : NSObject 16 | + (void)didApplicationFinishLaunchingWithOptions:(NSDictionary *)launchOptions; 17 | + (void)didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings; 18 | + (void)didApplicationRegisterForRemoteNotificationsWithDeviceToken:(NSString *)deviceToken; 19 | + (void)didApplicationEnterBackground; 20 | + (void)willApplicationEnterForeground; 21 | @end 22 | -------------------------------------------------------------------------------- /ios/Classes/RongCloudApplicationHandler.m: -------------------------------------------------------------------------------- 1 | // 2 | // RongCloudApplicationHandler.m 3 | // CordovaDemo 4 | // 5 | // Created by litao on 15/11/2. 6 | // 7 | // 8 | 9 | #import "RongCloudApplicationHandler.h" 10 | #import 11 | 12 | NSString *const kAppBackgroundMode = @"kAppBackgroundMode"; 13 | NSString *const kDeviceToken = @"RongCloud_SDK_DeviceToken"; 14 | 15 | 16 | @implementation RongCloudApplicationHandler 17 | + (void)didApplicationFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 18 | if ([[[UIDevice currentDevice] systemVersion] floatValue] < 8.0) { 19 | [[UIApplication sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeBadge|UIRemoteNotificationTypeSound|UIRemoteNotificationTypeAlert]; 20 | } else { 21 | [[UIApplication sharedApplication] registerForRemoteNotifications]; 22 | 23 | UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeBadge|UIUserNotificationTypeSound|UIUserNotificationTypeAlert categories:nil]; 24 | [[UIApplication sharedApplication] registerUserNotificationSettings:settings]; 25 | } 26 | } 27 | + (void)didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings { 28 | 29 | } 30 | + (void)didApplicationRegisterForRemoteNotificationsWithDeviceToken:(NSString *)deviceToken { 31 | [[RCIMClient sharedRCIMClient]setDeviceToken:deviceToken]; 32 | 33 | [[NSUserDefaults standardUserDefaults] setObject:deviceToken forKey:kDeviceToken]; 34 | [[NSUserDefaults standardUserDefaults] synchronize]; 35 | } 36 | + (void)didApplicationEnterBackground { 37 | [[NSUserDefaults standardUserDefaults]setObject:@(YES) forKey:kAppBackgroundMode]; 38 | [[NSUserDefaults standardUserDefaults]synchronize]; 39 | } 40 | + (void)willApplicationEnterForeground { 41 | [[NSUserDefaults standardUserDefaults]setObject:@(NO) forKey:kAppBackgroundMode]; 42 | [[NSUserDefaults standardUserDefaults]synchronize]; 43 | } 44 | @end 45 | -------------------------------------------------------------------------------- /ios/Classes/RongCloudConstant.h: -------------------------------------------------------------------------------- 1 | // 2 | // RongCloudConstant.h 3 | // UZApp 4 | // 5 | // Created by MiaoGuangfa on 12/23/14. 6 | // Copyright (c) 2014 APICloud. All rights reserved. 7 | // 8 | 9 | #ifndef UZApp_RongCloudConstant_h 10 | #define UZApp_RongCloudConstant_h 11 | 12 | //NSString * const DeviceToken_Notification_To_RongCloudModule = @"const_DeviceToken_Notification_To_RongCloudModule"; 13 | #ifndef DeviceToken_Notification_To_RongCloudModule 14 | #define DeviceToken_Notification_To_RongCloudModule @"DeviceToken_Notification_To_RongCloudModule" 15 | #endif 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /ios/Classes/RongCloudHandler.h: -------------------------------------------------------------------------------- 1 | // 2 | // RongCloudHandler.h 3 | // UZApp 4 | // 5 | // Created by MiaoGuangfa on 1/20/15. 6 | // Copyright (c) 2015 APICloud. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface RongCloudHandler : NSObject 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /ios/Classes/RongCloudHandler.m: -------------------------------------------------------------------------------- 1 | // 2 | // RongCloudHandler.m 3 | // UZApp 4 | // 5 | // Created by MiaoGuangfa on 1/20/15. 6 | // Copyright (c) 2015 APICloud. All rights reserved. 7 | // 8 | 9 | #import "RongCloudHandler.h" 10 | #import 11 | #import "RongCloudApplicationHandler.h" 12 | 13 | 14 | @implementation RongCloudHandler 15 | 16 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 17 | [RongCloudApplicationHandler didApplicationFinishLaunchingWithOptions:launchOptions]; 18 | return YES; 19 | } 20 | 21 | 22 | - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { 23 | 24 | NSLog(@"%s, deviceToken > %@", __FUNCTION__, deviceToken); 25 | NSString *token = [[[[deviceToken description] stringByReplacingOccurrencesOfString:@"<" 26 | withString:@""] 27 | stringByReplacingOccurrencesOfString:@">" 28 | withString:@""] 29 | stringByReplacingOccurrencesOfString:@" " 30 | withString:@""]; 31 | [RongCloudApplicationHandler didApplicationRegisterForRemoteNotificationsWithDeviceToken:token]; 32 | } 33 | - (void)applicationDidEnterBackground:(UIApplication *)application { 34 | [RongCloudApplicationHandler didApplicationEnterBackground]; 35 | } 36 | 37 | - (void)applicationWillEnterForeground:(UIApplication *)application { 38 | [RongCloudApplicationHandler willApplicationEnterForeground]; 39 | } 40 | @end 41 | -------------------------------------------------------------------------------- /ios/Classes/RongCloudModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // RongCloudJsonUtils.h 3 | // UZApp 4 | // 5 | // Created by MiaoGuangfa on 12/19/14. 6 | // Copyright (c) 2014 APICloud. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | #import 13 | 14 | static NSString * const SUCCESS = @"success"; 15 | static NSString * const ERROR = @"error"; 16 | static NSString * const PROGRESS = @"progress"; 17 | static NSString * const PREPARE = @"prepare"; 18 | 19 | @interface RongCloudModel : NSObject 20 | 21 | + (RCConversationType) RCTransferConversationType:(NSString *) oldValue; 22 | 23 | + (NSString *) RCGenerateResultJSONString:(id)result withStatus:(NSString *)status; 24 | 25 | + (NSDictionary *) RCGenerateConversationModel:(RCConversation *)conversation; 26 | + (NSMutableArray *) RCGenerateConversationListModel:(NSArray *) conversationList; 27 | 28 | 29 | + (RCSentStatus)RCTransferSendStatusFromString:(NSString *)stringStatus; 30 | + (NSString *)RCTransferSendStatus:(RCSentStatus)status; 31 | 32 | + (RCReceivedStatus)RCTransferReceivedStatusFromString:(NSString *)stringStatus; 33 | + (NSString *)RCTransferReceivedStatus:(RCReceivedStatus)status; 34 | 35 | + (NSString *)RCTransferConnectionStatus:(RCConnectionStatus)status; 36 | 37 | + (NSDictionary *) RCGenerateMessageModel:(RCMessage *)message; 38 | + (NSMutableArray *) RCGenerateMessageListModel:(NSArray *)messageList; 39 | + (NSDictionary *)RCGenerateMessageContentModel:(RCMessageContent *)messageContent; 40 | 41 | + (NSDictionary *) RCGenerateDiscussionModel:(RCDiscussion *)discussion; 42 | 43 | + (NSDictionary *) RCGenerateUserInfoModel:(RCUserInfo *)userInfo; 44 | 45 | +(NSMutableArray *)RCGenerateGroupList:(NSArray *)grouplist; 46 | 47 | + (NSData*)compressedImageAndScalingSize:(UIImage*)image targetSize:(CGSize)targetSize percent:(CGFloat)percent; 48 | + (UIImage*)imageByScalingAndCropSize:(UIImage *)image targetSize:(CGSize)targetSize; 49 | + (NSString *) RCTransferConversationTypeToString:(RCConversationType) type; 50 | + (NSString *) transferNULLToExptyString:(NSString *)value; 51 | + (void)postLocalNotification:(NSString*)msg; 52 | + (void)cancelLocalNotification; 53 | + (NSString *)formatNotificationMessage:(RCMessageContent *)messageContent; 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCAMRDataConverter.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014-2015, RongCloud. 3 | * All rights reserved. 4 | * 5 | * All the contents are the copyright of RongCloud Network Technology Co.Ltd. 6 | * Unless otherwise credited. http://rongcloud.cn 7 | * 8 | */ 9 | 10 | // RCAMRDataConverter.h 11 | // Created by Heq.Shinoda on 14-6-17. 12 | 13 | #ifndef __RCAMRDataConverter 14 | #define __RCAMRDataConverter 15 | 16 | #include "interf_dec.h" 17 | #include "interf_enc.h" 18 | #import 19 | #include 20 | #include 21 | #include 22 | 23 | /*! 24 | AMR格式与WAV格式音频转换工具类 25 | */ 26 | @interface RCAMRDataConverter : NSObject 27 | 28 | /*! 29 | 获取AMR格式与WAV格式音频转换工具类单例 30 | 31 | @return AMR格式与WAV格式音频转换工具类单例 32 | */ 33 | + (RCAMRDataConverter *)sharedAMRDataConverter; 34 | 35 | /*! 36 | 将AMR格式的音频数据转化为WAV格式的音频数据 37 | 38 | @param data AMR格式的音频数据,必须是AMR-NB的格式 39 | @return WAV格式的音频数据 40 | */ 41 | - (NSData *)decodeAMRToWAVE:(NSData *)data; 42 | 43 | /*! 44 | 将AMR格式的音频数据转化为WAV格式的音频数据 45 | 46 | @param data AMR格式的音频数据,必须是AMR-NB的格式 47 | @return WAV格式的音频数据 48 | */ 49 | - (NSData *)decodeAMRToWAVEWithoutHeader:(NSData *)data; 50 | 51 | /*! 52 | 将WAV格式的音频数据转化为AMR格式的音频数据(8KHz采样) 53 | 54 | @param data WAV格式的音频数据 55 | @param nChannels 声道数 56 | @param nBitsPerSample 采样位数(精度) 57 | @return AMR-NB格式的音频数据 58 | 59 | @discussion 60 | 此方法为工具类方法,您可以使用此方法将任意WAV音频转换为AMR-NB格式的音频。 61 | 62 | @warning 63 | 如果您想和SDK自带的语音消息保持一致和互通,考虑到跨平台和传输的原因,SDK对于WAV音频有所限制. 64 | 具体可以参考RCVoiceMessage中的音频参数说明(nChannels为1,nBitsPerSample为16)。 65 | */ 66 | - (NSData *)encodeWAVEToAMR:(NSData *)data channel:(int)nChannels nBitsPerSample:(int)nBitsPerSample; 67 | @end 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCBurnMessageService.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCBurnMessageService.h 3 | // RongIMLib 4 | // 5 | // Created by Zhaoqianyu on 2018/5/9. 6 | // Copyright © 2018年 RongCloud. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RCMessage.h" 11 | #import "RCIMClient.h" 12 | 13 | /** 14 | IMLib阅后即焚监听器 15 | @discussion 16 | 请参考RCIMClient的setRCMessageDestructDelegate:方法。 17 | 18 | @warning 19 | 可以设置并实现此Delegate监听消息焚烧;如果您使用IMKit,请直接注册RCIM中的RCKitMessageDestructingNotification通知,而不要使用此监听器,否则会导致IMKit中无法自动更新UI! 20 | */ 21 | @protocol RCMessageDestructDelegate 22 | 23 | /** 24 | 消息正在焚烧 25 | 26 | @param message 消息对象 27 | @param remainDuration 剩余焚烧时间 28 | */ 29 | - (void)onMessageDestructing: (RCMessage *)message remainDuration: (long long)remainDuration; 30 | 31 | @end 32 | 33 | /** 34 | 消息阅后即焚管理类 35 | */ 36 | @interface RCBurnMessageService : NSObject 37 | 38 | /** 39 | 焚烧消息管理类单例 40 | 41 | @return 单例 42 | */ 43 | + (instancetype)sharedService; 44 | 45 | /** 46 | 设置IMLib阅后即焚监听器 47 | 48 | @param delegate 阅后即焚监听器 49 | */ 50 | - (void)setRCMessageDestructDelegate: (id)delegate; 51 | 52 | /** 53 | 将消息加入焚烧倒计时队列 54 | 55 | @param message 消息 56 | */ 57 | - (void)addBurnMessage: (RCMessage *)message; 58 | 59 | /** 60 | 将多个消息加入焚烧倒计时队列 61 | 62 | @param messages 消息数组 63 | */ 64 | - (void)addBurnMessages: (NSArray *)messages; 65 | 66 | /** 67 | 获取正在焚烧消息的剩余时间,如果返回nil代表该消息没有处在焚烧队列中 68 | 69 | @param burnMessageUId 消息UId 70 | @return 消息剩余时间 71 | */ 72 | - (NSNumber *)burnMessageRemainDuration: (NSString *)burnMessageUId; 73 | 74 | /** 75 | 检测该消息是否应该添加到焚烧队列中 76 | 77 | @param message 消息 78 | @return 该消息是否焚烧结束被删除,返回NO代表被删除 79 | */ 80 | - (BOOL)beginBurnMessageIfNeed:(RCMessage *)message; 81 | 82 | /** 83 | 接收到焚烧回执消息的处理(用于非阅读回执方式焚烧的消息) 84 | 85 | @param message 消息数据模型 86 | @return 返回YES代表是该类型消息开始处理,返回NO不是该类型消息 87 | */ 88 | - (BOOL)didHoldBurnNoticeMessage:(RCMessage *)message; 89 | 90 | @end 91 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCCSLeaveMessage.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCCSLeaveMessage.h 3 | // RongIMLib 4 | // 5 | // Created by 张改红 on 2016/12/7. 6 | // Copyright © 2016年 RongCloud. All rights reserved. 7 | // 8 | 9 | #import 10 | #define RCCSLeaveMessageTypeIdentifier @"RC:CsLM" 11 | @interface RCCSLeaveMessage : RCMessageContent 12 | @property(nonatomic, strong) NSDictionary *leaveMessageDic; 13 | @end 14 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCCSLeaveMessageItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCCSLeaveMessageItem.h 3 | // RongIMLib 4 | // 5 | // Created by 张改红 on 2016/12/6. 6 | // Copyright © 2016年 RongCloud. All rights reserved. 7 | // 8 | 9 | #import 10 | //客服留言配置model 11 | @interface RCCSLeaveMessageItem : NSObject 12 | //信息名 13 | @property(nonatomic, copy) NSString *title; 14 | //信息名对应的key值,在用户填了信息之后,需要把信息和此key对应构成字典 15 | @property(nonatomic, copy) NSString *name; 16 | //输入区域是单行还是多行:@"text" 单行;@"textarea":多行 17 | @property(nonatomic, copy) NSString *type; 18 | //输入区域默认提示信息 19 | @property(nonatomic, copy) NSString *defaultText; 20 | //是否是必填项 21 | @property(nonatomic, assign) BOOL required; 22 | //需要验证的类型 23 | @property(nonatomic, copy) NSString *verification; 24 | //验证后提示信息 25 | @property(nonatomic, strong) NSArray *message; 26 | //最大字数限制 27 | @property(nonatomic, assign) int max; 28 | 29 | + (instancetype)modelWithDic:(NSDictionary *)dic; 30 | - (instancetype)initWithDic:(NSDictionary *)dic; 31 | @end 32 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCCSPullLeaveMessage.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCCSLeaveMessage.h 3 | // RongIMLib 4 | // 5 | // Created by 张改红 on 2016/12/6. 6 | // Copyright © 2016年 RongCloud. All rights reserved. 7 | // 8 | 9 | #import 10 | #define RCCSPullLeaveMessageTypeIdentifier @"RC:CsPLM" 11 | @interface RCCSPullLeaveMessage : RCMessageContent 12 | @property(nonatomic, copy) NSString *content; 13 | @end 14 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCChatRoomInfo.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCChatRoomInfo.h 3 | // RongIMLib 4 | // 5 | // Created by 岑裕 on 16/1/11. 6 | // Copyright © 2016年 RongCloud. All rights reserved. 7 | // 8 | 9 | #import "RCStatusDefine.h" 10 | #import 11 | 12 | /*! 13 | 聊天室信息类 14 | */ 15 | @interface RCChatRoomInfo : NSObject 16 | 17 | /*! 18 | 聊天室ID 19 | */ 20 | @property(nonatomic, copy) NSString *targetId; 21 | 22 | /*! 23 | 包含的成员信息类型 24 | */ 25 | @property(nonatomic, assign) RCChatRoomMemberOrder memberOrder; 26 | 27 | /*! 28 | 聊天室中的部分成员信息RCChatRoomMemberInfo列表 29 | 30 | @discussion 31 | 如果成员类型为RC_ChatRoom_Member_Asc,则为最早加入的成员列表,按成员加入时间升序排列; 32 | 如果成员类型为RC_ChatRoom_Member_Desc,则为最晚加入的成员列表,按成员加入时间降序排列。 33 | */ 34 | @property(nonatomic, strong) NSArray *memberInfoArray; 35 | 36 | /*! 37 | 当前聊天室的成员总数 38 | */ 39 | @property(nonatomic, assign) int totalMemberCount; 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCChatRoomMemberInfo.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCChatRoomMemberInfo.h 3 | // RongIMLib 4 | // 5 | // Created by 岑裕 on 16/1/10. 6 | // Copyright © 2016年 RongCloud. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /*! 12 | 聊天室成员信息类 13 | */ 14 | @interface RCChatRoomMemberInfo : NSObject 15 | 16 | /*! 17 | 用户ID 18 | */ 19 | @property(nonatomic, copy) NSString *userId; 20 | 21 | /*! 22 | 加入时间(Unix时间戳,毫秒) 23 | */ 24 | @property(nonatomic, assign) long long joinTime; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCCommandMessage.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCCommandMessage.h 3 | // RongIMLib 4 | // 5 | // Created by 张改红 on 15/12/2. 6 | // Copyright © 2015年 RongCloud. All rights reserved. 7 | // 8 | #import "RCMessageContent.h" 9 | 10 | /*! 11 | 命令消息的类型名 12 | */ 13 | #define RCCommandMessageIdentifier @"RC:CmdMsg" 14 | 15 | /*! 16 | 命令消息类 17 | 18 | @discussion 命令消息类,此消息不存储不计入未读消息数。 19 | 与RCCommandNotificationMessage的区别是,此消息不存储,也不会在界面上显示。 20 | */ 21 | @interface RCCommandMessage : RCMessageContent 22 | 23 | /*! 24 | 命令的名称 25 | */ 26 | @property(nonatomic, copy) NSString *name; 27 | 28 | /*! 29 | 命令的扩展数据 30 | 31 | @discussion 命令的扩展数据,可以为任意字符串,如存放您定义的json数据。 32 | */ 33 | @property(nonatomic, copy) NSString *data; 34 | 35 | /*! 36 | 初始化命令消息 37 | 38 | @param name 命令的名称 39 | @param data 命令的扩展数据 40 | @return 命令消息对象 41 | */ 42 | + (instancetype)messageWithName:(NSString *)name data:(NSString *)data; 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCCommandNotificationMessage.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014-2015, RongCloud. 3 | * All rights reserved. 4 | * 5 | * All the contents are the copyright of RongCloud Network Technology Co.Ltd. 6 | * Unless otherwise credited. http://rongcloud.cn 7 | * 8 | */ 9 | 10 | // RCCommandNotificationMessage.h 11 | // Created by xugang on 14/11/28. 12 | 13 | #import "RCMessageContent.h" 14 | 15 | /*! 16 | 命令提醒消息的类型名 17 | */ 18 | #define RCCommandNotificationMessageIdentifier @"RC:CmdNtf" 19 | 20 | /*! 21 | 命令提醒消息类 22 | 23 | @discussion 命令消息类,此消息会进行存储,但不计入未读消息数。 24 | 与RCCommandMessage的区别是,此消息会进行存储并在界面上显示。 25 | */ 26 | @interface RCCommandNotificationMessage : RCMessageContent 27 | 28 | /*! 29 | 命令提醒的名称 30 | */ 31 | @property(nonatomic, copy) NSString *name; 32 | 33 | /*! 34 | 命令提醒消息的扩展数据 35 | 36 | @discussion 命令提醒消息的扩展数据,可以为任意字符串,如存放您定义的json数据。 37 | */ 38 | @property(nonatomic, copy) NSString *data; 39 | 40 | /*! 41 | 初始化命令提醒消息 42 | 43 | @param name 命令的名称 44 | @param data 命令的扩展数据 45 | @return 命令提醒消息对象 46 | */ 47 | + (instancetype)notificationWithName:(NSString *)name data:(NSString *)data; 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCContactNotificationMessage.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014-2015, RongCloud. 3 | * All rights reserved. 4 | * 5 | * All the contents are the copyright of RongCloud Network Technology Co.Ltd. 6 | * Unless otherwise credited. http://rongcloud.cn 7 | * 8 | */ 9 | 10 | // RCContactNotificationMessage.h 11 | // Created by xugang on 14/11/28. 12 | 13 | #import "RCMessageContent.h" 14 | 15 | /*! 16 | 好友请求消息的类型名 17 | */ 18 | #define RCContactNotificationMessageIdentifier @"RC:ContactNtf" 19 | 20 | /*! 21 | 请求添加好友 22 | */ 23 | #define ContactNotificationMessage_ContactOperationRequest @"Request" 24 | /*! 25 | 同意添加好友的请求 26 | */ 27 | #define ContactNotificationMessage_ContactOperationAcceptResponse @"AcceptResponse" 28 | /*! 29 | 拒绝添加好友的请求 30 | */ 31 | #define ContactNotificationMessage_ContactOperationRejectResponse @"RejectResponse" 32 | 33 | /*! 34 | 好友请求消息类 35 | 36 | @discussion 好友请求消息类,此消息会进行存储,但不计入未读消息数。 37 | */ 38 | @interface RCContactNotificationMessage : RCMessageContent 39 | 40 | /*! 41 | 好友请求的当前操作名 42 | 43 | @discussion 44 | 好友请求当前的操作名称,您可以使用预定义好的操作名,也可以是您自己定义的任何操作名。 45 | 预定义的操作名:ContactNotificationMessage_ContactOperationRequest、ContactNotificationMessage_ContactOperationAcceptResponse、ContactNotificationMessage_ContactOperationRejectResponse。 46 | */ 47 | @property(nonatomic, copy) NSString *operation; 48 | 49 | /*! 50 | 当前操作发起用户的用户ID 51 | */ 52 | @property(nonatomic, copy) NSString *sourceUserId; 53 | 54 | /*! 55 | 当前操作目标用户的用户ID 56 | */ 57 | @property(nonatomic, copy) NSString *targetUserId; 58 | 59 | /*! 60 | 当前操作的消息内容 61 | 62 | @discussion 当前操作的消息内容,如同意、拒绝的理由等。 63 | */ 64 | @property(nonatomic, copy) NSString *message; 65 | 66 | /*! 67 | 当前操作的附加信息 68 | */ 69 | @property(nonatomic, copy) NSString *extra; 70 | 71 | /*! 72 | 初始化好友请求消息 73 | 74 | @param operation 好友请求当前的操作名 75 | @param sourceUserId 当前操作发起用户的用户ID 76 | @param targetUserId 当前操作目标用户的用户ID 77 | @param message 当前操作的消息内容 78 | @param extra 当前操作的附加信息 79 | @return 好友请求消息对象 80 | 81 | @discussion 融云不介入您的好友关系,所有的好友关系都由您的服务器自己维护。 82 | 所以好友请求的操作名和消息内容、扩展信息您均可以自己定制,只要您发送方和接收方针对具体字段内容做好UI显示即可。 83 | */ 84 | + (instancetype)notificationWithOperation:(NSString *)operation 85 | sourceUserId:(NSString *)sourceUserId 86 | targetUserId:(NSString *)targetUserId 87 | message:(NSString *)message 88 | extra:(NSString *)extra; 89 | 90 | @end 91 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCConversation.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014-2015, RongCloud. 3 | * All rights reserved. 4 | * 5 | * All the contents are the copyright of RongCloud Network Technology Co.Ltd. 6 | * Unless otherwise credited. http://rongcloud.cn 7 | * 8 | */ 9 | 10 | // RCConversation.h 11 | // Created by Heq.Shinoda on 14-6-13. 12 | 13 | #import "RCMessageContent.h" 14 | #import 15 | 16 | /*! 17 | 会话类 18 | 19 | @discussion 会话类,包含会话的所有属性。 20 | */ 21 | @interface RCConversation : NSObject 22 | 23 | /*! 24 | 会话类型 25 | */ 26 | @property(nonatomic, assign) RCConversationType conversationType; 27 | 28 | /*! 29 | 目标会话ID 30 | */ 31 | @property(nonatomic, copy) NSString *targetId; 32 | 33 | /*! 34 | 会话的标题 35 | */ 36 | @property(nonatomic, copy) NSString *conversationTitle; 37 | 38 | /*! 39 | 会话中的未读消息数量 40 | */ 41 | @property(nonatomic, assign) int unreadMessageCount; 42 | 43 | /*! 44 | 是否置顶,默认值为NO 45 | 46 | @discussion 47 | 如果设置了置顶,在IMKit的RCConversationListViewController中会将此会话置顶显示。 48 | */ 49 | @property(nonatomic, assign) BOOL isTop; 50 | 51 | /*! 52 | 会话中最后一条消息的接收状态 53 | */ 54 | @property(nonatomic, assign) RCReceivedStatus receivedStatus; 55 | 56 | /*! 57 | 会话中最后一条消息的发送状态 58 | */ 59 | @property(nonatomic, assign) RCSentStatus sentStatus; 60 | 61 | /*! 62 | 会话中最后一条消息的接收时间(Unix时间戳、毫秒) 63 | */ 64 | @property(nonatomic, assign) long long receivedTime; 65 | 66 | /*! 67 | 会话中最后一条消息的发送时间(Unix时间戳、毫秒) 68 | */ 69 | @property(nonatomic, assign) long long sentTime; 70 | 71 | /*! 72 | 会话中存在的草稿 73 | */ 74 | @property(nonatomic, copy) NSString *draft; 75 | 76 | /*! 77 | 会话中最后一条消息的类型名 78 | */ 79 | @property(nonatomic, copy) NSString *objectName; 80 | 81 | /*! 82 | 会话中最后一条消息的发送者用户ID 83 | */ 84 | @property(nonatomic, copy) NSString *senderUserId; 85 | 86 | /*! 87 | 会话中最后一条消息的发送者的用户名(已废弃,请勿使用) 88 | 89 | @warning **已废弃,请勿使用。** 90 | */ 91 | @property(nonatomic, copy) NSString *senderUserName __deprecated_msg("已废弃,请勿使用。"); 92 | 93 | /*! 94 | 会话中最后一条消息的消息ID 95 | */ 96 | @property(nonatomic, assign) long lastestMessageId; 97 | 98 | /*! 99 | 会话中最后一条消息的内容 100 | */ 101 | @property(nonatomic, strong) RCMessageContent *lastestMessage; 102 | 103 | /*! 104 | 会话中最后一条消息的方向 105 | */ 106 | @property(nonatomic, assign) RCMessageDirection lastestMessageDirection; 107 | 108 | /*! 109 | 会话中最后一条消息的json Dictionary 110 | 111 | @discussion 此字段存放最后一条消息内容中未编码的json数据。 112 | SDK内置的消息,如果消息解码失败,默认会将消息的内容存放到此字段;如果编码和解码正常,此字段会置为nil。 113 | */ 114 | @property(nonatomic, strong) NSDictionary *jsonDict; 115 | 116 | /*! 117 | 最后一条消息的全局唯一ID 118 | 119 | @discussion 服务器消息唯一ID(在同一个Appkey下全局唯一) 120 | */ 121 | @property(nonatomic, copy) NSString *lastestMessageUId; 122 | 123 | /*! 124 | 会话中是否存在被@的消息 125 | 126 | @discussion 在清除会话未读数(clearMessagesUnreadStatus:targetId:)的时候,会将此状态置成 NO。 127 | */ 128 | @property(nonatomic, assign) BOOL hasUnreadMentioned; 129 | 130 | /*! 131 | RCConversation初始化方法(已废弃,请勿使用) 132 | 133 | @param json 会话的json Dictionary 134 | @return 会话对象 135 | 136 | @warning **已废弃,请勿使用。** 137 | */ 138 | + (instancetype)conversationWithProperties:(NSDictionary *)json __deprecated_msg("已废弃,请勿使用。"); 139 | 140 | @end 141 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCCustomerServiceConfig.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCCustomerServiceConfig.h 3 | // RongIMLib 4 | // 5 | // Created by litao on 16/2/25. 6 | // Copyright © 2016年 RongCloud. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RCStatusDefine.h" 11 | #import "RCCSLeaveMessageItem.h" 12 | // onResult:(void(^)(int isSuccess, NSString *errMsg))resultBlock 13 | // onBlocked:(void(^)(void))blockedBlock 14 | // onCompanyInfo:(void(^)(NSString *companyName, NSString 15 | // *companyUrl))companyInfoBlockInfo 16 | // onKeyboardType:(void(^)(RCCSInputType keyboardType))keyboardTypeBlock 17 | // onQuit:(void(^)(NSString *quitMsg))quitBlock; 18 | 19 | @interface RCCustomerServiceConfig : NSObject 20 | /*! 21 | * 是否被客服加为黑名单 22 | */ 23 | @property(nonatomic) BOOL isBlack; 24 | 25 | /*! 26 | * 公司名称 27 | */ 28 | @property(nonatomic, copy) NSString *companyName; 29 | 30 | /*! 31 | * 公司的Url 32 | */ 33 | @property(nonatomic, copy) NSString *companyUrl; 34 | 35 | /*! 36 | * 机器人会话是否不需要评价 37 | */ 38 | @property(nonatomic, assign) BOOL robotSessionNoEva; 39 | 40 | /*! 41 | * 人工服务会话是否不需要评价 42 | */ 43 | @property(nonatomic, assign) BOOL humanSessionNoEva; 44 | 45 | /*! 46 | * 人工服务的评价选项,array的数据是RCEvaluateItem类型 47 | */ 48 | @property(nonatomic, strong) NSArray *humanEvaluateItems; 49 | 50 | @property(nonatomic) int adminTipTime; 51 | @property(nonatomic, copy) NSString *adminTipWord; 52 | 53 | @property(nonatomic) int userTipTime; 54 | @property(nonatomic, copy) NSString *userTipWord; 55 | /*! 56 | * 评价时机 57 | */ 58 | @property(nonatomic, assign) RCCSEvaEntryPoint evaEntryPoint; 59 | 60 | /*! 61 | * 评价类型 62 | 如果 evaType 为 RCCSEvaSeparately,发送机器人评价消息调用RCIMClient中evaluateCustomerService: knownledgeId: robotValue: suggest: 63 | 发送人工评价消息调用RCIMClient中 64 | evaluateCustomerService:dialogId:starValue:suggest:resolveStatus:tagText:extra: 65 | 66 | 如果 evaType 为 EVA_UNIFIED,发送评价消息调用RCIMClient中 67 | evaluateCustomerService: dialogId: starValue: suggest: resolveStatus: 68 | */ 69 | @property(nonatomic, assign) RCCSEvaType evaType; 70 | 71 | /*! 72 | * 是否显示解决状态:0.不显示;1显示 73 | */ 74 | @property(nonatomic, assign) int reportResolveStatus; 75 | 76 | /*! 77 | * 留言样式:0.默认跳转留言界面;1.跳转url留言 78 | */ 79 | @property(nonatomic, assign) RCCSLMType leaveMessageType; 80 | 81 | /*! 82 | * 是否支持地图发送:0.支持;1.不支持 83 | */ 84 | @property(nonatomic, assign) int disableLocation; 85 | 86 | /*! 87 | * 自定义留言 88 | */ 89 | @property(nonatomic, copy) NSString *leaveMessageWebUrl; 90 | 91 | /*! 92 | * 默认留言样式 93 | */ 94 | @property(nonatomic, copy) NSArray *leaveMessageNativeInfo; 95 | 96 | /*! 97 | * 通告内容 98 | */ 99 | @property(nonatomic, copy) NSString *announceMsg; 100 | 101 | /*! 102 | * 通告链接 url 103 | */ 104 | @property(nonatomic, copy) NSString *announceClickUrl; 105 | @end 106 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCCustomerServiceGroupItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCCustomerGroupItem.h 3 | // RongIMLib 4 | // 5 | // Created by 张改红 on 16/7/19. 6 | // Copyright © 2016年 RongCloud. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RCCustomerServiceGroupItem : NSObject 12 | @property(nonatomic, copy) NSString *groupId; 13 | @property(nonatomic, copy) NSString *name; 14 | @property(nonatomic, assign) BOOL online; 15 | @end 16 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCCustomerServiceInfo.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCCustomerServiceInfo.h 3 | // RongIMLib 4 | // 5 | // Created by litao on 16/5/10. 6 | // Copyright © 2016年 RongCloud. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RCCustomerServiceInfo : NSObject 12 | @property(nonatomic, copy) NSString *userId; //用户唯一标识 13 | @property(nonatomic, copy) NSString *nickName; //用户昵称 14 | @property(nonatomic, copy) NSString *loginName; //用户登录名 15 | @property(nonatomic, copy) NSString *name; //用户名称 16 | @property(nonatomic, copy) NSString *grade; //用户等级 17 | @property(nonatomic, copy) NSString *gender; //用户性别 18 | @property(nonatomic, copy) NSString *birthday; //用户生日 19 | @property(nonatomic, copy) NSString *age; //年龄 20 | @property(nonatomic, copy) NSString *profession; //职业 21 | @property(nonatomic, copy) NSString *portraitUrl; //头像 22 | @property(nonatomic, copy) NSString *province; //省份 23 | @property(nonatomic, copy) NSString *city; //城市 24 | @property(nonatomic, copy) NSString *memo; //备注 25 | 26 | @property(nonatomic, copy) NSString *mobileNo; //电话号码 27 | @property(nonatomic, copy) NSString *email; //邮箱 28 | @property(nonatomic, copy) NSString *address; //地址 29 | @property(nonatomic, copy) NSString *QQ; // QQ号 30 | @property(nonatomic, copy) NSString *weibo; //微博 31 | @property(nonatomic, copy) NSString *weixin; //微信 32 | 33 | @property(nonatomic, copy) NSString *page; //页面信息 34 | @property(nonatomic, copy) NSString *referrer; //来源 35 | @property(nonatomic, copy) NSString *enterUrl; // 36 | @property(nonatomic, copy) NSString *skillId; 37 | @property(nonatomic, strong) NSArray *listUrl; 38 | @property(nonatomic, copy) NSString *define; //自定义信息 39 | @property(nonatomic, copy) NSString *productId; //商品id 40 | 41 | - (NSData *)encode; 42 | @end 43 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCDiscussion.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014-2015, RongCloud. 3 | * All rights reserved. 4 | * 5 | * All the contents are the copyright of RongCloud Network Technology Co.Ltd. 6 | * Unless otherwise credited. http://rongcloud.cn 7 | * 8 | */ 9 | 10 | // RCDiscussion.h 11 | // Created by Heq.Shinoda on 14-6-23. 12 | 13 | #ifndef __RCDiscussion 14 | #define __RCDiscussion 15 | 16 | #import 17 | 18 | /*! 19 | 讨论组类 20 | */ 21 | @interface RCDiscussion : NSObject 22 | 23 | /*! 24 | 讨论组ID 25 | */ 26 | @property(nonatomic, copy) NSString *discussionId; 27 | 28 | /*! 29 | 讨论组名称 30 | */ 31 | @property(nonatomic, copy) NSString *discussionName; 32 | 33 | /*! 34 | 讨论组的创建者的用户ID 35 | */ 36 | @property(nonatomic, copy) NSString *creatorId; 37 | 38 | /*! 39 | 讨论组成员的用户ID列表 40 | */ 41 | @property(nonatomic, strong) NSArray *memberIdList; 42 | 43 | /*! 44 | 讨论组是否开放加人权限 45 | 46 | @discussion 是否允许非创建者添加用户,0表示允许,1表示不允许,默认值为0。 47 | */ 48 | @property(nonatomic, assign) int inviteStatus; 49 | 50 | /*! 51 | 讨论组的会话类型(已废弃,请勿使用) 52 | 53 | @warning **已废弃,请勿使用。** 54 | */ 55 | @property(nonatomic, assign) __deprecated_msg("已废弃,请勿使用。") int conversationType; 56 | 57 | /*! 58 | 讨论组是否允许消息提醒(已废弃,请勿使用) 59 | 60 | @warning **已废弃,请勿使用。** 61 | */ 62 | @property(nonatomic, assign) __deprecated_msg("已废弃,请勿使用。") int pushMessageNotificationStatus; 63 | 64 | /*! 65 | 讨论组初始化方法 66 | 67 | @param discussionId 讨论组ID 68 | @param discussionName 讨论组名称 69 | @param creatorId 创建者的用户ID 70 | @param conversationType 会话类型 71 | @param memberIdList 讨论组成员的用户ID列表 72 | @param inviteStatus 是否开放加人权限 73 | @param pushMessageNotificationStatus 是否允许消息提醒 74 | @return 讨论组对象 75 | */ 76 | - (instancetype)initWithDiscussionId:(NSString *)discussionId 77 | discussionName:(NSString *)discussionName 78 | creatorId:(NSString *)creatorId 79 | conversationType:(int)conversationType 80 | memberIdList:(NSArray *)memberIdList 81 | inviteStatus:(int)inviteStatus 82 | msgNotificationStatus:(int)pushMessageNotificationStatus; 83 | 84 | @end 85 | #endif 86 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCDiscussionNotificationMessage.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014-2015, RongCloud. 3 | * All rights reserved. 4 | * 5 | * All the contents are the copyright of RongCloud Network Technology Co.Ltd. 6 | * Unless otherwise credited. http://rongcloud.cn 7 | * 8 | */ 9 | 10 | // RCDiscussionNotification.h 11 | // Created by Heq.Shinoda on 14-6-26. 12 | 13 | #import "RCMessageContent.h" 14 | 15 | /*! 16 | 讨论组通知消息的类型名 17 | */ 18 | #define RCDiscussionNotificationTypeIdentifier @"RC:DizNtf" 19 | 20 | /*! 21 | 讨论组通知的类型 22 | */ 23 | typedef NS_ENUM(NSInteger, RCDiscussionNotificationType) { 24 | /*! 25 | 有成员加入讨论组的通知 26 | */ 27 | RCInviteDiscussionNotification = 1, 28 | /*! 29 | 有成员退出讨论组的通知 30 | */ 31 | RCQuitDiscussionNotification, 32 | /*! 33 | 讨论组名称发生变更的通知 34 | */ 35 | RCRenameDiscussionTitleNotification, 36 | /*! 37 | 有成员被踢出讨论组的通知 38 | */ 39 | RCRemoveDiscussionMemberNotification, 40 | /*! 41 | 讨论组加入权限的变更 42 | */ 43 | RCSwichInvitationAccessNotification 44 | }; 45 | 46 | /*! 47 | 讨论组通知消息类 48 | 49 | @discussion 讨论组通知消息类,此消息会进行存储,但不计入未读消息数。 50 | */ 51 | @interface RCDiscussionNotificationMessage : RCMessageContent 52 | 53 | /*! 54 | 讨论组通知的类型 55 | */ 56 | @property(nonatomic, assign) RCDiscussionNotificationType type; 57 | 58 | /*! 59 | 操作者的用户ID 60 | */ 61 | @property(nonatomic, copy) NSString *operatorId; 62 | 63 | /*! 64 | 讨论组通知的扩展信息 65 | */ 66 | @property(nonatomic, copy) NSString *extension; 67 | 68 | /*! 69 | 初始化讨论组通知消息 70 | 71 | @param type 讨论组通知的扩展信息 72 | @param operatorId 操作者的用户ID 73 | @param extension 讨论组通知的扩展信息 74 | @return 讨论组通知对象 75 | */ 76 | + (instancetype)notificationWithType:(RCDiscussionNotificationType)type 77 | operator:(NSString *)operatorId 78 | extension:(NSString *)extension; 79 | 80 | @end 81 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCDownloadItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCEDownloadItem.h 3 | // RongEnterpriseApp 4 | // 5 | // Created by zhaobingdong on 2018/5/15. 6 | // Copyright © 2018年 rongcloud. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | /** 13 | 下载状态枚举 14 | 15 | - RCDownloadItemStateWaiting: 等待 16 | - RCDownloadItemStateChecking: 正在检测是否支持 Range 17 | - RCDownloadItemStateRunning: 正在下载 18 | - RCDownloadItemStateSuspended: 暂停 19 | - RCDownloadItemStateCanceled: 已取消 20 | - RCDownloadItemStateCompleted: 完成 21 | - RCDownloadItemStateFailed: 失败 22 | */ 23 | typedef NS_ENUM(NSInteger, RCDownloadItemState) { 24 | RCDownloadItemStateWaiting = 0, 25 | RCDownloadItemStateChecking, 26 | RCDownloadItemStateRunning, 27 | RCDownloadItemStateSuspended, 28 | RCDownloadItemStateCanceled, 29 | RCDownloadItemStateCompleted, 30 | RCDownloadItemStateFailed 31 | }; 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | @class RCDownloadItem; 35 | @protocol RCDownloadItemDelegate 36 | 37 | /** 38 | 下载任务状态变化时调用 39 | 40 | @param item 下载任务对象 41 | @param state 状态 42 | */ 43 | - (void)downloadItem:(RCDownloadItem*)item state:(RCDownloadItemState)state; 44 | 45 | /** 46 | 下载进度上报时调用 47 | 48 | @param item 下载任务 49 | @param progress 下载进度 50 | */ 51 | - (void)downloadItem:(RCDownloadItem*)item progress:(float)progress; 52 | 53 | /** 54 | 任务结束时调用 55 | 56 | @param item 下载任务 57 | @param error 错误信息对象,成功时为nil 58 | @param path 下载完成后文件的路径,此路径为相对路径,相对于沙盒根目录 NSHomeDirectory 59 | */ 60 | - (void)downloadItem:(RCDownloadItem*)item didCompleteWithError:(NSError*)error filePath:(nullable NSString*)path; 61 | @end 62 | 63 | 64 | @interface RCDownloadItem : NSObject 65 | 66 | /** 67 | 下载状态 68 | */ 69 | @property (nonatomic,assign,readonly) RCDownloadItemState state; 70 | 71 | 72 | /** 73 | 文件总大小 单位字节 74 | */ 75 | @property (nonatomic,assign,readonly) long long totalLength; 76 | 77 | /** 78 | 文件当前的大小 79 | */ 80 | @property (nonatomic,assign,readonly) long long currentLength; 81 | 82 | 83 | /** 84 | 文件对应的网络 URL 85 | */ 86 | @property (nonatomic,strong,readonly) NSURL *URL; 87 | 88 | /** 89 | 标识是否可恢复下载。 YES 表示可恢复,支持 Range。 NO 表示不支持 Range。 90 | */ 91 | @property (nonatomic,assign,readonly) BOOL resumable; 92 | 93 | 94 | /** 95 | 下载任务的标识符 96 | */ 97 | @property (nonatomic,copy,readonly) NSString* identify; 98 | 99 | /** 100 | 下载任务的代理对象 101 | */ 102 | @property (nonatomic,weak) id delegate; 103 | 104 | 105 | + (instancetype)new NS_UNAVAILABLE; 106 | 107 | /** 108 | 开始下载 109 | */ 110 | - (void)downLoad; 111 | 112 | /** 113 | 暂停下载 114 | */ 115 | - (void)suspend; 116 | 117 | /** 118 | 恢复下载 119 | */ 120 | - (void)resume; 121 | 122 | 123 | /** 124 | 取消下载 125 | */ 126 | - (void)cancel; 127 | 128 | @end 129 | NS_ASSUME_NONNULL_END 130 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCEvaluateItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCEvaluateItem.h 3 | // RongIMLib 4 | // 5 | // Created by litao on 16/4/29. 6 | // Copyright © 2016年 RongCloud. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RCEvaluateItem : NSObject 12 | @property(nonatomic, copy) NSString *describe; // description 13 | @property(nonatomic) int value; 14 | @end 15 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCFileMessage.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCFileMessage.h 3 | // RongIMLib 4 | // 5 | // Created by 珏王 on 16/5/23. 6 | // Copyright © 2016年 RongCloud. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /*! 12 | 文件消息的类型名 13 | */ 14 | #define RCFileMessageTypeIdentifier @"RC:FileMsg" 15 | 16 | @interface RCFileMessage : RCMediaMessageContent 17 | 18 | /*! 19 | 文件名 20 | */ 21 | @property(nonatomic, copy) NSString *name; 22 | 23 | /*! 24 | 文件大小,单位为Byte 25 | */ 26 | @property(nonatomic, assign) long long size; 27 | 28 | /*! 29 | 文件类型 30 | */ 31 | @property(nonatomic, copy) NSString *type; 32 | 33 | /*! 34 | 文件的网络地址 35 | */ 36 | @property(nonatomic, copy) NSString *fileUrl; 37 | 38 | /*! 39 | 文件的本地路径 40 | */ 41 | @property(nonatomic, copy) NSString *localPath; 42 | 43 | /*! 44 | 附加信息 45 | */ 46 | @property(nonatomic, copy) NSString *extra; 47 | 48 | /*! 49 | 初始化文件消息 50 | 51 | @param localPath 文件的本地路径 52 | @return 文件消息对象 53 | */ 54 | + (instancetype)messageWithFile:(NSString *)localPath; 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCFileUtility.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014-2015, RongCloud. 3 | * All rights reserved. 4 | * 5 | * All the contents are the copyright of RongCloud Network Technology Co.Ltd. 6 | * Unless otherwise credited. http://rongcloud.cn 7 | * 8 | */ 9 | 10 | // RCFileUtility.h 11 | 12 | #ifndef __RCFileUtility 13 | #define __RCFileUtility 14 | 15 | #import "RCStatusDefine.h" 16 | 17 | @interface RCFileUtility : NSObject 18 | 19 | /*! 20 | 设置文件媒体类型 21 | 22 | @return 文件类型 23 | */ 24 | + (NSString *)getMimeType:(RCMediaType)fileType; 25 | 26 | /*! 27 | 获取上传文件名称 28 | 29 | @return 文件媒体类型 30 | */ 31 | + (NSString *)generateKey:(NSString *)mimeType; 32 | 33 | /*! 34 | 生成下载的文件路径 35 | 36 | @return 文件名称 37 | */ 38 | + (NSString *)getFileName:(NSString *)imgUrl 39 | conversationType:(RCConversationType)conversationType 40 | mediaType:(RCMediaType)mediaType 41 | targetId:(NSString *)targetId; 42 | 43 | + (NSString *)getFileKey:(NSString *)fileUri; 44 | 45 | + (NSString *)getMediaDir:(RCMediaType)fileType; 46 | 47 | + (NSString *)getCateDir:(RCConversationType)categoryId; 48 | 49 | + (BOOL)isFileExist:(NSString *)fileName; 50 | 51 | + (BOOL)saveFile:(NSString *)filePath content:(NSData *)content; 52 | 53 | + (NSString *)getUniqueFileName:(NSString *)baseFileName; 54 | 55 | @end 56 | #endif 57 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCFwLog.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCFwLog.h 3 | // MacLogTest 4 | // 5 | // Created by ZhangLei on 26/02/2018. 6 | // Copyright © 2018 RongCloud. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #define __FILE_STRING__ [NSString stringWithUTF8String:__FILE__] 12 | #define __GET_FILENAME__ [__FILE_STRING__ substringFromIndex:[__FILE_STRING__ rangeOfString:@"/" options:NSBackwardsSearch].location + 1] 13 | 14 | #define RCLogF(k, ...) [[RCFwLog getInstance] write:RC_Level_F type:RC_Type_DEB tag:__GET_FILENAME__ keys:k, ##__VA_ARGS__] 15 | #define RCLogE(k, ...) [[RCFwLog getInstance] write:RC_Level_E type:RC_Type_DEB tag:__GET_FILENAME__ keys:k, ##__VA_ARGS__] 16 | #define RCLogW(k, ...) [[RCFwLog getInstance] write:RC_Level_W type:RC_Type_DEB tag:__GET_FILENAME__ keys:k, ##__VA_ARGS__] 17 | #define RCLogI(k, ...) [[RCFwLog getInstance] write:RC_Level_I type:RC_Type_DEB tag:__GET_FILENAME__ keys:k, ##__VA_ARGS__] 18 | #define RCLogD(k, ...) [[RCFwLog getInstance] write:RC_Level_D type:RC_Type_DEB tag:__GET_FILENAME__ keys:k, ##__VA_ARGS__] 19 | #define RCLogV(k, ...) [[RCFwLog getInstance] write:RC_Level_V type:RC_Type_DEB tag:__GET_FILENAME__ keys:k, ##__VA_ARGS__] 20 | 21 | #define FwLogF(p, t, k, ...) [[RCFwLog getInstance] write:RC_Level_F type:p tag:t keys:k, ##__VA_ARGS__] 22 | #define FwLogE(p, t, k, ...) [[RCFwLog getInstance] write:RC_Level_E type:p tag:t keys:k, ##__VA_ARGS__] 23 | #define FwLogW(p, t, k, ...) [[RCFwLog getInstance] write:RC_Level_W type:p tag:t keys:k, ##__VA_ARGS__] 24 | #define FwLogI(p, t, k, ...) [[RCFwLog getInstance] write:RC_Level_I type:p tag:t keys:k, ##__VA_ARGS__] 25 | #define FwLogD(p, t, k, ...) [[RCFwLog getInstance] write:RC_Level_D type:p tag:t keys:k, ##__VA_ARGS__] 26 | #define FwLogV(p, t, k, ...) [[RCFwLog getInstance] write:RC_Level_V type:p tag:t keys:k, ##__VA_ARGS__] 27 | 28 | typedef NS_ENUM(NSUInteger, RCFwLogLevel) { RC_Level_F = 1, RC_Level_E = 2, RC_Level_W = 3, RC_Level_I = 4, RC_Level_D = 5, RC_Level_V = 6 }; 29 | 30 | typedef NS_OPTIONS(NSUInteger, LogType) { 31 | RC_Type_APP = 1 << 0, // User interface. 32 | RC_Type_PTC = 1 << 1, // Protocol. 33 | RC_Type_ENV = 1 << 2, 34 | RC_Type_DET = 1 << 3, 35 | RC_Type_CON = 1 << 4, 36 | RC_Type_RCO = 1 << 5, 37 | RC_Type_CRM = 1 << 6, 38 | RC_Type_MSG = 1 << 7, // Message. 39 | RC_Type_MED = 1 << 8, // Media file. 40 | RC_Type_LOG = 1 << 9, 41 | RC_Type_DEB = 1 << 10, // Debug log. 42 | RC_Type_CRS = 1 << 11 // Crash stack. 43 | }; 44 | 45 | @interface RCFwLog : NSObject 46 | 47 | // should be call init first, otherwise getInstance will return nil. 48 | + (void)init:(NSString *)appKey sdkVer:(NSString *)sdkVer; 49 | + (instancetype)getInstance; 50 | 51 | + (void)setLogMonitor:(NSInteger)value; 52 | + (void)setToken:(NSString *)token; 53 | + (void)setUserId:(NSString *)userId; 54 | + (void)setLogListener:(void (^)(NSString *log))logBlock; 55 | + (void)setConsoleLogLevel:(RCFwLogLevel)level; 56 | + (NSString *)getIpWithHost:(NSString *)hostName; 57 | - (void)write:(RCFwLogLevel)level 58 | type:(LogType)type 59 | tag:(NSString *)tag 60 | keys:(NSString *)keys, ... NS_FORMAT_FUNCTION(4, 5); 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCGroup.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014-2015, RongCloud. 3 | * All rights reserved. 4 | * 5 | * All the contents are the copyright of RongCloud Network Technology Co.Ltd. 6 | * Unless otherwise credited. http://rongcloud.cn 7 | * 8 | */ 9 | 10 | // RCGroup.h 11 | // Created by Heq.Shinoda on 14-9-6. 12 | 13 | #import 14 | 15 | /*! 16 | 群组信息类 17 | */ 18 | @interface RCGroup : NSObject 19 | 20 | /*! 21 | 群组ID 22 | */ 23 | @property(nonatomic, copy) NSString *groupId; 24 | 25 | /*! 26 | 群组名称 27 | */ 28 | @property(nonatomic, copy) NSString *groupName; 29 | 30 | /*! 31 | 群组头像的URL 32 | */ 33 | @property(nonatomic, copy) NSString *portraitUri; 34 | 35 | /*! 36 | 群组信息的初始化方法 37 | 38 | @param groupId 群组ID 39 | @param groupName 群组名称 40 | @param portraitUri 群组头像的URL 41 | @return 群组信息对象 42 | */ 43 | - (instancetype)initWithGroupId:(NSString *)groupId groupName:(NSString *)groupName portraitUri:(NSString *)portraitUri; 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCGroupNotificationMessage.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014-2015, RongCloud. 3 | * All rights reserved. 4 | * 5 | * All the contents are the copyright of RongCloud Network Technology Co.Ltd. 6 | * Unless otherwise credited. http://rongcloud.cn 7 | * 8 | */ 9 | 10 | // RCGroupNotificationMessage.h 11 | // Created by xugang on 14/11/24. 12 | 13 | #import "RCMessageContent.h" 14 | 15 | /*! 16 | 群组通知消息的类型名 17 | */ 18 | #define RCGroupNotificationMessageIdentifier @"RC:GrpNtf" 19 | 20 | /*! 21 | 有成员加入群组的通知 22 | */ 23 | #define GroupNotificationMessage_GroupOperationAdd @"Add" 24 | /*! 25 | 有成员退出群组的通知 26 | */ 27 | #define GroupNotificationMessage_GroupOperationQuit @"Quit" 28 | /*! 29 | 有成员被踢出群组的通知 30 | */ 31 | #define GroupNotificationMessage_GroupOperationKicked @"Kicked" 32 | /*! 33 | 群组名称发生变更的通知 34 | */ 35 | #define GroupNotificationMessage_GroupOperationRename @"Rename" 36 | /*! 37 | 群组公告发生变更的通知 38 | */ 39 | #define GroupNotificationMessage_GroupOperationBulletin @"Bulletin" 40 | 41 | /*! 42 | 群组通知消息类 43 | 44 | @discussion 群组通知消息类,此消息会进行存储,但不计入未读消息数。 45 | */ 46 | @interface RCGroupNotificationMessage : RCMessageContent 47 | 48 | /*! 49 | 群组通知的当前操作名 50 | 51 | @discussion 52 | 群组通知的当前操作名称,您可以使用预定义好的操作名,也可以是您自己定义的任何操作名。 53 | 预定义的操作名:GroupNotificationMessage_GroupOperationAdd、GroupNotificationMessage_GroupOperationQuit、GroupNotificationMessage_GroupOperationKicked、GroupNotificationMessage_GroupOperationRename、GroupNotificationMessage_GroupOperationBulletin。 54 | */ 55 | @property(nonatomic, copy) NSString *operation; 56 | 57 | /*! 58 | 当前操作发起用户的用户ID 59 | */ 60 | @property(nonatomic, copy) NSString *operatorUserId; 61 | 62 | /*! 63 | 当前操作的目标对象 64 | 65 | @discussion 66 | 当前操作的目标对象,如被当前操作目标用户的用户ID或变更后的群主名称等。 67 | */ 68 | @property(nonatomic, copy) NSString *data; 69 | 70 | /*! 71 | 当前操作的消息内容 72 | */ 73 | @property(nonatomic, copy) NSString *message; 74 | 75 | /*! 76 | 当前操作的附加信息 77 | */ 78 | @property(nonatomic, copy) NSString *extra; 79 | 80 | /*! 81 | 初始化群组通知消息 82 | 83 | @param operation 群组通知的当前操作名 84 | @param operatorUserId 当前操作发起用户的用户ID 85 | @param data 当前操作的目标对象 86 | @param message 当前操作的消息内容 87 | @param extra 当前操作的附加信息 88 | @return 群组通知消息对象 89 | 90 | @discussion 群组关系有开发者文虎,所有的群组操作都由您的服务器自己管理和维护。 91 | 所以群组通知的操作名和目标对象、消息内容、扩展信息您均可以自己定制,只要您发送方和接收方针对具体字段内容做好UI显示即可。 92 | */ 93 | + (instancetype)notificationWithOperation:(NSString *)operation 94 | operatorUserId:(NSString *)operatorUserId 95 | data:(NSString *)data 96 | message:(NSString *)message 97 | extra:(NSString *)extra; 98 | 99 | @end 100 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCImageMessage.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014-2015, RongCloud. 3 | * All rights reserved. 4 | * 5 | * All the contents are the copyright of RongCloud Network Technology Co.Ltd. 6 | * Unless otherwise credited. http://rongcloud.cn 7 | * 8 | */ 9 | 10 | // RCImageMessage.h 11 | // Created by Heq.Shinoda on 14-6-13. 12 | 13 | #import "RCMediaMessageContent.h" 14 | #import 15 | 16 | /*! 17 | 图片消息的类型名 18 | */ 19 | #define RCImageMessageTypeIdentifier @"RC:ImgMsg" 20 | 21 | /*! 22 | 图片消息类 23 | 24 | @discussion 图片消息类,此消息会进行存储并计入未读消息数。 25 | */ 26 | @interface RCImageMessage : RCMediaMessageContent 27 | 28 | /*! 29 | 图片消息的URL地址 30 | 31 | @discussion 发送方此字段为图片的本地路径,接收方此字段为网络URL地址。 32 | */ 33 | @property(nonatomic, copy) NSString *imageUrl; 34 | 35 | /*! 36 | 图片的本地路径 37 | */ 38 | @property(nonatomic, copy) NSString *localPath; 39 | 40 | /*! 41 | 图片消息的缩略图 42 | */ 43 | @property(nonatomic, strong) UIImage *thumbnailImage; 44 | 45 | /*! 46 | 是否发送原图 47 | 48 | @discussion 在发送图片的时候,是否发送原图,默认值为NO。 49 | */ 50 | @property(nonatomic, getter=isFull) BOOL full; 51 | 52 | /*! 53 | 图片消息的附加信息 54 | */ 55 | @property(nonatomic, copy) NSString *extra; 56 | 57 | /*! 58 | 图片消息的原始图片信息 59 | */ 60 | @property(nonatomic, strong) UIImage *originalImage; 61 | 62 | /*! 63 | 图片消息的原始图片信息 64 | */ 65 | @property(nonatomic, strong, readonly) NSData *originalImageData; 66 | 67 | /*! 68 | 初始化图片消息 69 | 70 | @param image 原始图片 71 | @return 图片消息对象 72 | */ 73 | + (instancetype)messageWithImage:(UIImage *)image; 74 | 75 | /*! 76 | 初始化图片消息 77 | 78 | @param imageURI 图片的本地路径 79 | @return 图片消息对象 80 | */ 81 | + (instancetype)messageWithImageURI:(NSString *)imageURI; 82 | 83 | /*! 84 | 初始化图片消息 85 | 86 | @param imageData 图片的原始数据 87 | @return 图片消息对象 88 | */ 89 | + (instancetype)messageWithImageData:(NSData *)imageData; 90 | 91 | @end 92 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCInformationNotificationMessage.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014-2015, RongCloud. 3 | * All rights reserved. 4 | * 5 | * All the contents are the copyright of RongCloud Network Technology Co.Ltd. 6 | * Unless otherwise credited. http://rongcloud.cn 7 | * 8 | */ 9 | 10 | // RCInformationNotificationMessage.h 11 | // Created by xugang on 14/12/4. 12 | 13 | #import "RCMessageContent.h" 14 | 15 | /*! 16 | 通知消息的类型名 17 | */ 18 | #define RCInformationNotificationMessageIdentifier @"RC:InfoNtf" 19 | 20 | /*! 21 | 通知消息类 22 | 23 | @discussion 通知消息类,此消息会进行存储,但不计入未读消息数。 24 | */ 25 | @interface RCInformationNotificationMessage : RCMessageContent 26 | 27 | /*! 28 | 通知的内容 29 | */ 30 | @property(nonatomic, copy) NSString *message; 31 | 32 | /*! 33 | 通知的附加信息 34 | */ 35 | @property(nonatomic, copy) NSString *extra; 36 | 37 | /*! 38 | 初始化通知消息 39 | 40 | @param message 通知的内容 41 | @param extra 通知的附加信息 42 | @return 通知消息对象 43 | */ 44 | + (instancetype)notificationWithMessage:(NSString *)message extra:(NSString *)extra; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCLocationMessage.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014-2015, RongCloud. 3 | * All rights reserved. 4 | * 5 | * All the contents are the copyright of RongCloud Network Technology Co.Ltd. 6 | * Unless otherwise credited. http://rongcloud.cn 7 | * 8 | */ 9 | 10 | // RCLocationMessage.h 11 | // Created by Heq.Shinoda on 14-6-13. 12 | 13 | #import "RCMessageContent.h" 14 | #import 15 | #import 16 | 17 | /*! 18 | 地理位置消息的类型名 19 | */ 20 | #define RCLocationMessageTypeIdentifier @"RC:LBSMsg" 21 | 22 | /*! 23 | 地理位置消息类 24 | 25 | @discussion 地理位置消息类,此消息会进行存储并计入未读消息数。 26 | */ 27 | @interface RCLocationMessage : RCMessageContent 28 | 29 | /*! 30 | 地理位置的二维坐标 31 | */ 32 | @property(nonatomic, assign) CLLocationCoordinate2D location; 33 | 34 | /*! 35 | 地理位置的名称 36 | */ 37 | @property(nonatomic, copy) NSString *locationName; 38 | 39 | /*! 40 | 地理位置的缩略图 41 | */ 42 | @property(nonatomic, strong) UIImage *thumbnailImage; 43 | 44 | /*! 45 | 地理位置的附加信息 46 | */ 47 | @property(nonatomic, copy) NSString *extra; 48 | 49 | /*! 50 | 初始化地理位置消息 51 | 52 | @param image 地理位置的缩略图 53 | @param location 地理位置的二维坐标 54 | @param locationName 地理位置的名称 55 | @return 地理位置消息的对象 56 | */ 57 | + (instancetype)messageWithLocationImage:(UIImage *)image 58 | location:(CLLocationCoordinate2D)location 59 | locationName:(NSString *)locationName; 60 | 61 | @end 62 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCMediaMessageContent.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCMediaMessageContent.h 3 | // RongIMLib 4 | // 5 | // Created by lichenfeng on 2018/11/22. 6 | // Copyright © 2018年 RongCloud. All rights reserved. 7 | // 8 | 9 | #import "RCMessageContent.h" 10 | 11 | /** 12 | 媒体类型消息的父类 13 | 14 | @discussion SDK中所有媒体类型消息(图片、文件等)均继承此类,开发者如需将自定义的媒体类型消息上传到融云默认的服务器时必须继承此类(SDK负责媒体消息的上传及上传成功后的发送,开发者自行处理消息接收后的展示)。 15 | 以下属性需要子类在encode、decode方法中和扩展的属性一同进行处理 16 | */ 17 | @interface RCMediaMessageContent : RCMessageContent 18 | 19 | /** 20 | 媒体内容的本地路径(此属性必须有值) 21 | */ 22 | @property(nonatomic, copy) NSString *localPath; 23 | 24 | /** 25 | 媒体内容上传服务器后的网络地址(上传成功后SDK会为该属性赋值) 26 | */ 27 | @property(nonatomic, copy) NSString *remoteUrl; 28 | 29 | /** 30 | 媒体内容的文件名(如不传使用SDK中downloadMediaMessage方法下载后会默认生成一个名称) 31 | */ 32 | @property(nonatomic, copy) NSString *name; 33 | @end 34 | 35 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCMentionedInfo.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCMentionedInfo.h 3 | // RongIMLib 4 | // 5 | // Created by 杜立召 on 16/7/6. 6 | // Copyright © 2016年 RongCloud. All rights reserved. 7 | // 8 | 9 | #import "RCStatusDefine.h" 10 | #import 11 | 12 | /*! 13 | 消息中的@提醒信息 14 | */ 15 | @interface RCMentionedInfo : NSObject 16 | 17 | /*! 18 | @提醒的类型 19 | */ 20 | @property(nonatomic, assign) RCMentionedType type; 21 | 22 | /*! 23 | @的用户ID列表 24 | 25 | @discussion 如果type是@所有人,则可以传nil 26 | */ 27 | @property(nonatomic, strong) NSArray *userIdList; 28 | 29 | /*! 30 | 包含@提醒的消息,本地通知和远程推送显示的内容 31 | */ 32 | @property(nonatomic, copy) NSString *mentionedContent; 33 | 34 | /*! 35 | 是否@了我 36 | */ 37 | @property(nonatomic, readonly) BOOL isMentionedMe; 38 | 39 | /*! 40 | 初始化@提醒信息 41 | 42 | @param type @提醒的类型 43 | @param userIdList @的用户ID列表 44 | @param mentionedContent @ Push 内容 45 | 46 | @return @提醒信息的对象 47 | */ 48 | - (instancetype)initWithMentionedType:(RCMentionedType)type 49 | userIdList:(NSArray *)userIdList 50 | mentionedContent:(NSString *)mentionedContent; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCMessage.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014-2015, RongCloud. 3 | * All rights reserved. 4 | * 5 | * All the contents are the copyright of RongCloud Network Technology Co.Ltd. 6 | * Unless otherwise credited. http://rongcloud.cn 7 | * 8 | */ 9 | 10 | // RCMessage.h 11 | // Created by Heq.Shinoda on 14-6-13. 12 | 13 | #ifndef __RCMessage 14 | #define __RCMessage 15 | #import "RCMessageContent.h" 16 | #import "RCReadReceiptInfo.h" 17 | #import "RCStatusDefine.h" 18 | #import 19 | 20 | /*! 21 | 消息实体类 22 | 23 | @discussion 消息实体类,包含消息的所有属性。 24 | */ 25 | @interface RCMessage : NSObject 26 | 27 | /*! 28 | 会话类型 29 | */ 30 | @property(nonatomic, assign) RCConversationType conversationType; 31 | 32 | /*! 33 | 目标会话ID 34 | */ 35 | @property(nonatomic, copy) NSString *targetId; 36 | 37 | /*! 38 | 消息的ID 39 | 40 | @discussion 本地存储的消息的唯一值(数据库索引唯一值) 41 | */ 42 | @property(nonatomic, assign) long messageId; 43 | 44 | /*! 45 | 消息的方向 46 | */ 47 | @property(nonatomic, assign) RCMessageDirection messageDirection; 48 | 49 | /*! 50 | 消息的发送者ID 51 | */ 52 | @property(nonatomic, copy) NSString *senderUserId; 53 | 54 | /*! 55 | 消息的接收状态 56 | */ 57 | @property(nonatomic, assign) RCReceivedStatus receivedStatus; 58 | 59 | /*! 60 | 消息的发送状态 61 | */ 62 | @property(nonatomic, assign) RCSentStatus sentStatus; 63 | 64 | /*! 65 | 消息的接收时间(Unix时间戳、毫秒) 66 | */ 67 | @property(nonatomic, assign) long long receivedTime; 68 | 69 | /*! 70 | 消息的发送时间(Unix时间戳、毫秒) 71 | */ 72 | @property(nonatomic, assign) long long sentTime; 73 | 74 | /*! 75 | 消息的类型名 76 | */ 77 | @property(nonatomic, copy) NSString *objectName; 78 | 79 | /*! 80 | 消息的内容 81 | */ 82 | @property(nonatomic, strong) RCMessageContent *content; 83 | 84 | /*! 85 | 消息的附加字段 86 | */ 87 | @property(nonatomic, copy) NSString *extra; 88 | 89 | /*! 90 | 全局唯一ID 91 | 92 | @discussion 服务器消息唯一ID(在同一个Appkey下全局唯一) 93 | */ 94 | @property(nonatomic, copy) NSString *messageUId; 95 | 96 | /*! 97 | 阅读回执状态 98 | */ 99 | @property(nonatomic, strong) RCReadReceiptInfo *readReceiptInfo; 100 | 101 | /*! 102 | RCMessage初始化方法 103 | 104 | @param conversationType 会话类型 105 | @param targetId 目标会话ID 106 | @param messageDirection 消息的方向 107 | @param messageId 消息的ID 108 | @param content 消息的内容 109 | */ 110 | - (instancetype)initWithType:(RCConversationType)conversationType 111 | targetId:(NSString *)targetId 112 | direction:(RCMessageDirection)messageDirection 113 | messageId:(long)messageId 114 | content:(RCMessageContent *)content; 115 | 116 | /*! 117 | RCMessage初始化方法(已废弃,请勿使用) 118 | 119 | @param jsonData 消息的JSON Dictionary 120 | @return 消息实体对象 121 | 122 | @warning **已废弃,请勿使用。** 123 | */ 124 | + (instancetype)messageWithJSON:(NSDictionary *)jsonData __deprecated_msg("已废弃,请勿使用。"); 125 | 126 | @end 127 | #endif 128 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCMessageContent.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014-2015, RongCloud. 3 | * All rights reserved. 4 | * 5 | * All the contents are the copyright of RongCloud Network Technology Co.Ltd. 6 | * Unless otherwise credited. http://rongcloud.cn 7 | * 8 | */ 9 | 10 | // RCMessageContent.h 11 | // Created by Heq.Shinoda on 14-6-13. 12 | 13 | #ifndef __RCMessageContent 14 | #define __RCMessageContent 15 | 16 | #import "RCMentionedInfo.h" 17 | #import "RCStatusDefine.h" 18 | #import "RCUserInfo.h" 19 | #import 20 | 21 | /*! 22 | 消息内容的编解码协议 23 | 24 | @discussion 用于标示消息内容的类型,进行消息的编码和解码。 25 | 所有自定义消息必须实现此协议,否则将无法正常传输和使用。 26 | */ 27 | @protocol RCMessageCoding 28 | @required 29 | 30 | /*! 31 | 将消息内容序列化,编码成为可传输的json数据 32 | 33 | @discussion 34 | 消息内容通过此方法,将消息中的所有数据,编码成为json数据,返回的json数据将用于网络传输。 35 | */ 36 | - (NSData *)encode; 37 | 38 | /*! 39 | 将json数据的内容反序列化,解码生成可用的消息内容 40 | 41 | @param data 消息中的原始json数据 42 | 43 | @discussion 44 | 网络传输的json数据,会通过此方法解码,获取消息内容中的所有数据,生成有效的消息内容。 45 | */ 46 | - (void)decodeWithData:(NSData *)data; 47 | 48 | /*! 49 | 返回消息的类型名 50 | 51 | @return 消息的类型名 52 | 53 | @discussion 您定义的消息类型名,需要在各个平台上保持一致,以保证消息互通。 54 | 55 | @warning 请勿使用@"RC:"开头的类型名,以免和SDK默认的消息名称冲突 56 | */ 57 | + (NSString *)getObjectName; 58 | 59 | /*! 60 | 返回可搜索的关键内容列表 61 | 62 | @return 返回可搜索的关键内容列表 63 | 64 | @discussion 这里返回的关键内容列表将用于消息搜索,自定义消息必须要实现此接口才能进行搜索。 65 | */ 66 | - (NSArray *)getSearchableWords; 67 | @end 68 | 69 | /*! 70 | 消息内容的存储协议 71 | 72 | @discussion 用于确定消息内容的存储策略。 73 | 所有自定义消息必须实现此协议,否则将无法正常存储和使用。 74 | */ 75 | @protocol RCMessagePersistentCompatible 76 | @required 77 | 78 | /*! 79 | 返回消息的存储策略 80 | 81 | @return 消息的存储策略 82 | 83 | @discussion 指明此消息类型在本地是否存储、是否计入未读消息数。 84 | */ 85 | + (RCMessagePersistent)persistentFlag; 86 | @end 87 | 88 | /*! 89 | 消息内容摘要的协议 90 | 91 | @discussion 用于在会话列表和本地通知中显示消息的摘要。 92 | */ 93 | @protocol RCMessageContentView 94 | @optional 95 | 96 | /*! 97 | 返回在会话列表和本地通知中显示的消息内容摘要 98 | 99 | @return 会话列表和本地通知中显示的消息内容摘要 100 | 101 | @discussion 102 | 如果您使用IMKit,当会话的最后一条消息为自定义消息时,需要通过此方法获取在会话列表展现的内容摘要; 103 | 当App在后台收到消息时,需要通过此方法获取在本地通知中展现的内容摘要。 104 | */ 105 | - (NSString *)conversationDigest; 106 | 107 | @end 108 | 109 | /*! 110 | 消息内容的基类 111 | 112 | @discussion 此类为消息实体类RCMessage中的消息内容content的基类。 113 | 所有的消息内容均为此类的子类,包括SDK自带的消息(如RCTextMessage、RCImageMessage等)和用户自定义的消息。 114 | 所有的自定义消息必须继承此类,并实现RCMessageCoding和RCMessagePersistentCompatible、RCMessageContentView协议。 115 | */ 116 | @interface RCMessageContent : NSObject 117 | 118 | /*! 119 | 消息内容中携带的发送者的用户信息 120 | 121 | @discussion 122 | 如果您使用IMKit,可以通过RCIM的enableMessageAttachUserInfo属性设置在每次发送消息中携带发送者的用户信息。 123 | */ 124 | @property(nonatomic, strong) RCUserInfo *senderUserInfo; 125 | 126 | /*! 127 | 消息中的@提醒信息 128 | */ 129 | @property(nonatomic, strong) RCMentionedInfo *mentionedInfo; 130 | 131 | /** 132 | 将用户信息编码到字典中 133 | 134 | @param userInfo 要编码的用户信息 135 | @return 存有用户信息的 Dictionary 136 | */ 137 | - (NSDictionary *)encodeUserInfo:(RCUserInfo *)userInfo; 138 | 139 | /*! 140 | 将消息内容中携带的用户信息解码 141 | 142 | @param dictionary 用户信息的Dictionary 143 | */ 144 | - (void)decodeUserInfo:(NSDictionary *)dictionary; 145 | 146 | /** 147 | 将@提醒信息编码到字典中 148 | 149 | @param mentionedInfo 要编码的@信息 150 | @return 存有@信息的 Dictionary 151 | */ 152 | - (NSDictionary *)encodeMentionedInfo:(RCMentionedInfo *)mentionedInfo; 153 | 154 | /*! 155 | 将消息内容中携带的@提醒信息解码 156 | 157 | @param dictionary @提醒信息的Dictionary 158 | */ 159 | - (void)decodeMentionedInfo:(NSDictionary *)dictionary; 160 | 161 | /*! 162 | 消息内容的原始json数据 163 | 164 | @discussion 此字段存放消息内容中未编码的json数据。 165 | SDK内置的消息,如果消息解码失败,默认会将消息的内容存放到此字段;如果编码和解码正常,此字段会置为nil。 166 | */ 167 | @property(nonatomic, strong, setter=setRawJSONData:) NSData *rawJSONData; 168 | 169 | @end 170 | #endif 171 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCProfileNotificationMessage.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014-2015, RongCloud. 3 | * All rights reserved. 4 | * 5 | * All the contents are the copyright of RongCloud Network Technology Co.Ltd. 6 | * Unless otherwise credited. http://rongcloud.cn 7 | * 8 | */ 9 | 10 | // RCProfileNotificationMessage.h 11 | // Created by xugang on 14/11/28. 12 | 13 | #import "RCMessageContent.h" 14 | 15 | /*! 16 | 公众服务账号信息变更消息的类型名 17 | */ 18 | #define RCProfileNotificationMessageIdentifier @"RC:ProfileNtf" 19 | 20 | /*! 21 | 公众服务账号信息变更消息类 22 | 23 | @discussion 公众服务账号信息变更消息类,此消息会进行存储,但不计入未读消息数。 24 | */ 25 | @interface RCProfileNotificationMessage : RCMessageContent 26 | 27 | /*! 28 | 公众服务账号信息变更的操作名 29 | */ 30 | @property(nonatomic, copy) NSString *operation; 31 | 32 | /*! 33 | 信息变更的数据,可以为任意格式,如json数据。 34 | */ 35 | @property(nonatomic, copy) NSString *data; 36 | 37 | /*! 38 | 信息变更的附加信息 39 | */ 40 | @property(nonatomic, copy) NSString *extra; 41 | 42 | /*! 43 | 初始化公众服务账号信息变更消息 44 | 45 | @param operation 信息变更的操作名 46 | @param data 信息变更的数据 47 | @param extra 信息变更的附加信息 48 | @return 公众服务账号信息变更消息的对象 49 | */ 50 | + (instancetype)notificationWithOperation:(NSString *)operation data:(NSString *)data extra:(NSString *)extra; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCPublicServiceCommandMessage.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCPublicServiceCommandMessage.h 3 | // RongIMLib 4 | // 5 | // Created by litao on 15/6/23. 6 | // Copyright (c) 2015年 RongCloud. All rights reserved. 7 | // 8 | 9 | #import "RCMessageContent.h" 10 | #import "RCPublicServiceMenuItem.h" 11 | 12 | /*! 13 | 公众服务请求消息的类型名 14 | */ 15 | #define RCPublicServiceCommandMessageTypeIdentifier @"RC:PSCmd" 16 | 17 | /*! 18 | 公众服务请求消息类 19 | 20 | @discussion 公众服务请求消息类,此消息不存储,也不计入未读消息数。 21 | 此消息仅用于客户端公共服务账号中的菜单,向服务器发送请求。 22 | */ 23 | @interface RCPublicServiceCommandMessage : RCMessageContent 24 | 25 | /*! 26 | 请求的名称 27 | */ 28 | @property(nonatomic, copy) NSString *command; 29 | 30 | /*! 31 | 请求的内容 32 | */ 33 | @property(nonatomic, copy) NSString *data; 34 | 35 | /*! 36 | 请求的扩展数据 37 | */ 38 | @property(nonatomic, copy) NSString *extra; 39 | 40 | /*! 41 | 初始化公众服务请求消息 42 | 43 | @param item 公众服务菜单项 44 | @return 公众服务请求消息对象 45 | */ 46 | + (instancetype)messageFromMenuItem:(RCPublicServiceMenuItem *)item; 47 | 48 | /*! 49 | 初始化公众服务请求消息 50 | 51 | @param command 请求的名称 52 | @param data 请求的内容 53 | @return 公众服务请求消息对象 54 | */ 55 | + (instancetype)messageWithCommand:(NSString *)command data:(NSString *)data; 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCPublicServiceMenu.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014-2015, RongCloud. 3 | * All rights reserved. 4 | * 5 | * All the contents are the copyright of RongCloud Network Technology Co.Ltd. 6 | * Unless otherwise credited. http://rongcloud.cn 7 | * 8 | */ 9 | 10 | // RCPublicServiceMenu.h 11 | // Created by litao on 15/4/14. 12 | 13 | #import "RCPublicServiceMenuItem.h" 14 | #import 15 | 16 | /*! 17 | 公众服务账号菜单类 18 | 19 | @discussion 20 | 公众服务菜单类,其中包含若干数量的菜单项,每个菜单项可能还包含子菜单项。 21 | 公众服务菜单的树状结构如下所示: 22 | Menu -> MenuItem1 23 | MenuItem2 -> MenuItem2.1 24 | MenuItem2.2 25 | MenuItem3 -> MenuItem3.1 26 | MenuItem3.2 27 | MenuItem3.3 28 | */ 29 | @interface RCPublicServiceMenu : NSObject 30 | 31 | /*! 32 | 菜单中包含的所有菜单项RCPublicServiceMenuItem数组 33 | */ 34 | @property(nonatomic, strong) NSArray *menuItems; 35 | 36 | /*! 37 | 将公众服务菜单下的所有菜单项解码(已废弃,请勿使用) 38 | 39 | @param jsonDictionary 公众服务菜单项Json组成的数组 40 | 41 | @warning **已废弃,请勿使用。** 42 | */ 43 | - (void)decodeWithJsonDictionaryArray:(NSArray *)jsonDictionary __deprecated_msg("已废弃,请勿使用。"); 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCPublicServiceMenuItem.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014-2015, RongCloud. 3 | * All rights reserved. 4 | * 5 | * All the contents are the copyright of RongCloud Network Technology Co.Ltd. 6 | * Unless otherwise credited. http://rongcloud.cn 7 | * 8 | */ 9 | 10 | // RCPublicServiceMenuItem.h 11 | // Created by litao on 15/4/14. 12 | 13 | #import "RCStatusDefine.h" 14 | #import 15 | 16 | /*! 17 | 公众服务的菜单项 18 | */ 19 | @interface RCPublicServiceMenuItem : NSObject 20 | 21 | /*! 22 | 菜单的ID 23 | */ 24 | @property(nonatomic, copy) NSString *id; 25 | 26 | /*! 27 | 菜单的标题 28 | */ 29 | @property(nonatomic, copy) NSString *name; 30 | 31 | /*! 32 | 菜单的URL链接 33 | */ 34 | @property(nonatomic, copy) NSString *url; 35 | 36 | /*! 37 | 菜单的类型 38 | */ 39 | @property(nonatomic) RCPublicServiceMenuItemType type; 40 | 41 | /*! 42 | 菜单中的子菜单 43 | 44 | @discussion 子菜单为RCPublicServiceMenuItem的数组 45 | */ 46 | @property(nonatomic, strong) NSArray *subMenuItems; 47 | 48 | /*! 49 | 将菜单项的json数组解码(已废弃,请勿使用) 50 | 51 | @param jsonArray 由菜单项原始Json数据组成的数组 52 | @return 公众服务菜单项RCPublicServiceMenuItem的数组 53 | 54 | @warning **已废弃,请勿使用。** 55 | */ 56 | + (NSArray *)menuItemsFromJsonArray:(NSArray *)jsonArray __deprecated_msg("已废弃,请勿使用。"); 57 | 58 | @end 59 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCPublicServiceMultiRichContentMessage.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014-2015, RongCloud. 3 | * All rights reserved. 4 | * 5 | * All the contents are the copyright of RongCloud Network Technology Co.Ltd. 6 | * Unless otherwise credited. http://rongcloud.cn 7 | * 8 | */ 9 | 10 | // RCPublicServiceMultiRichContentMessage.h 11 | // Created by litao on 15/4/13. 12 | 13 | #import "RCMessageContent.h" 14 | 15 | /*! 16 | 公众服务的多图文消息的类型名 17 | */ 18 | #define RCPublicServiceRichContentTypeIdentifier @"RC:PSMultiImgTxtMsg" 19 | 20 | /*! 21 | 公众服务的多图文消息类 22 | 23 | @discussion 公众服务的多图文消息类,此消息会进行存储并计入未读消息数。 24 | */ 25 | @interface RCPublicServiceMultiRichContentMessage : RCMessageContent 26 | 27 | /*! 28 | 多图文消息的内容RCRichContentItem数组 29 | */ 30 | @property(nonatomic, strong) NSArray *richContents; 31 | 32 | /*! 33 | 多图文消息的附加信息 34 | */ 35 | @property(nonatomic, copy) NSString *extra; 36 | 37 | 38 | /** 39 | 多图文消息被选中的项的索引, -1 表示选中全部 40 | */ 41 | @property (nonatomic,assign,readonly) NSInteger selectedItemIndex; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCPublicServiceProfile.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014-2015, RongCloud. 3 | * All rights reserved. 4 | * 5 | * All the contents are the copyright of RongCloud Network Technology Co.Ltd. 6 | * Unless otherwise credited. http://rongcloud.cn 7 | * 8 | */ 9 | 10 | // RCPublicServiceProfile.h 11 | // Created by litao on 15/4/9. 12 | 13 | #import "RCPublicServiceMenu.h" 14 | #import "RCStatusDefine.h" 15 | #import 16 | #import 17 | 18 | /*! 19 | 公众服务账号信息 20 | */ 21 | @interface RCPublicServiceProfile : NSObject 22 | 23 | /*! 24 | 公众服务账号的名称 25 | */ 26 | @property(nonatomic, copy) NSString *name; 27 | 28 | /*! 29 | 公众服务账号的描述 30 | */ 31 | @property(nonatomic, copy) NSString *introduction; 32 | 33 | /*! 34 | 公众服务账号的ID 35 | */ 36 | @property(nonatomic, copy) NSString *publicServiceId; 37 | 38 | /*! 39 | 公众服务账号头像URL 40 | */ 41 | @property(nonatomic, copy) NSString *portraitUrl; 42 | 43 | /*! 44 | 公众服务账号的所有者 45 | 46 | @discussion 当前版本暂不支持。 47 | */ 48 | @property(nonatomic, copy) NSString *owner; 49 | 50 | /*! 51 | 公众服务账号所有者的URL 52 | 53 | @discussion 当前版本暂不支持。 54 | */ 55 | @property(nonatomic, copy) NSString *ownerUrl; 56 | 57 | /*! 58 | 公众服务账号的联系电话 59 | 60 | @discussion 当前版本暂不支持。 61 | */ 62 | @property(nonatomic, copy) NSString *publicServiceTel; 63 | 64 | /*! 65 | 公众服务账号历史消息 66 | 67 | @discussion 当前版本暂不支持。 68 | */ 69 | @property(nonatomic, copy) NSString *histroyMsgUrl; 70 | 71 | /*! 72 | 公众服务账号地理位置 73 | 74 | @discussion 当前版本暂不支持。 75 | */ 76 | @property(nonatomic, strong) CLLocation *location; 77 | 78 | /*! 79 | 公众服务账号经营范围 80 | 81 | @discussion 当前版本暂不支持。 82 | */ 83 | @property(nonatomic, copy) NSString *scope; 84 | 85 | /*! 86 | 公众服务账号类型 87 | */ 88 | @property(nonatomic) RCPublicServiceType publicServiceType; 89 | 90 | /*! 91 | 是否关注该公众服务账号 92 | */ 93 | @property(nonatomic, getter=isFollowed) BOOL followed; 94 | 95 | /*! 96 | 公众服务账号菜单 97 | */ 98 | @property(nonatomic, strong) RCPublicServiceMenu *menu; 99 | 100 | /*! 101 | 公众服务账号的全局属性 102 | 103 | @discussion 此公众服务账号是否设置为所有用户均关注。 104 | */ 105 | @property(nonatomic, getter=isGlobal) BOOL global; 106 | 107 | /*! 108 | 公众服务账号信息的json数据 109 | */ 110 | @property(nonatomic, strong) NSDictionary *jsonDict; 111 | 112 | /** 113 | 是否禁用公众号菜单 114 | */ 115 | @property (nonatomic,assign) BOOL disableMenu; 116 | 117 | /** 118 | 是否禁用输入框 119 | */ 120 | @property (nonatomic,assign) BOOL disableInput; 121 | 122 | /*! 123 | 初始化公众服务账号信息 124 | 125 | @param jsonContent 公众账号信息的json数据 126 | */ 127 | - (void)initContent:(NSString *)jsonContent; 128 | 129 | @end 130 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCPublicServiceRichContentMessage.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014-2015, RongCloud. 3 | * All rights reserved. 4 | * 5 | * All the contents are the copyright of RongCloud Network Technology Co.Ltd. 6 | * Unless otherwise credited. http://rongcloud.cn 7 | * 8 | */ 9 | 10 | // RCPublicServiceMultiRichContentMessage.h 11 | // Created by litao on 15/4/15. 12 | 13 | #import "RCMessageContent.h" 14 | #import "RCRichContentItem.h" 15 | 16 | /*! 17 | 公众服务图文消息的类型名 18 | */ 19 | #define RCSingleNewsMessageTypeIdentifier @"RC:PSImgTxtMsg" 20 | 21 | /*! 22 | 公众服务图文消息类 23 | 24 | @discussion 公众服务图文消息类,此消息会进行存储并计入未读消息数。 25 | */ 26 | @interface RCPublicServiceRichContentMessage : RCMessageContent 27 | 28 | /*! 29 | 公众服务图文信息条目RCRichContentItem内容 30 | */ 31 | @property(nonatomic, strong) RCRichContentItem *richContent; 32 | 33 | /*! 34 | 图文消息的附加信息 35 | */ 36 | @property(nonatomic, copy) NSString *extra; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCPushProfile.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCPushProfile.h 3 | // RongIMLib 4 | // 5 | // Created by 杜立召 on 16/12/26. 6 | // Copyright © 2016年 RongCloud. All rights reserved. 7 | // 8 | 9 | #import "RCStatusDefine.h" 10 | #import 11 | 12 | @interface RCPushProfile : NSObject 13 | 14 | //是否显示远程推送的内容 15 | @property(nonatomic, assign, readonly) BOOL isShowPushContent; 16 | 17 | //远程推送的语言 18 | @property(nonatomic, assign, readonly) RCPushLauguage pushLauguage; 19 | 20 | //其他端在线时,手机是否接收远程推送(多个手机端登录,最后一个会接收) 21 | @property(nonatomic, assign, readonly) BOOL receiveStatus; 22 | 23 | /** 24 | 设置是否显示远程推送的内容 25 | 26 | @param isShowPushContent 是否显示推送的具体内容( YES显示 NO 不显示) 27 | @param successBlock 成功回调 28 | @param errorBlock 失败回调 29 | */ 30 | - (void)updateShowPushContentStatus:(BOOL)isShowPushContent 31 | success:(void (^)(void))successBlock 32 | error:(void (^)(RCErrorCode status))errorBlock; 33 | 34 | /** 35 | 设置推送内容的自然语言 36 | 37 | @param pushLauguage 设置推送内容的自然语言 (目前只支持中文和英文) 38 | @param successBlock 成功回调 39 | @param errorBlock 失败回调 40 | */ 41 | - (void)setPushLauguage:(RCPushLauguage)pushLauguage 42 | success:(void (^)(void))successBlock 43 | error:(void (^)(RCErrorCode status))errorBlock; 44 | 45 | 46 | /** 47 | 设置 Web 端在线时,手机端是否接收推送 48 | 49 | @param receiveStatus 是否接收推送( YES 接收 NO 不接收) 50 | @param successBlock 成功回调 51 | @param errorBlock 失败回调 52 | */ 53 | - (void)setPushReceiveStatus:(BOOL)receiveStatus 54 | success:(void (^)(void))successBlock 55 | error:(void (^)(RCErrorCode status))errorBlock; 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCReadReceiptInfo.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCReadReceiptInfo.h 3 | // RongIMLib 4 | // 5 | // Created by 杜立召 on 16/8/29. 6 | // Copyright © 2016年 RongCloud. All rights reserved. 7 | // 8 | #import "RCStatusDefine.h" 9 | #import 10 | 11 | @interface RCReadReceiptInfo : NSObject 12 | 13 | /*! 14 | 是否需要回执消息 15 | */ 16 | @property(nonatomic, assign) BOOL isReceiptRequestMessage; 17 | 18 | /** 19 | * 是否已经发送回执 20 | */ 21 | @property(nonatomic, assign) BOOL hasRespond; 22 | 23 | /*! 24 | 发送回执的用户ID列表 25 | */ 26 | @property(nonatomic, strong) NSMutableDictionary *userIdList; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCRealTimeLocationCommonDefine.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCRealTimeLocationCommonDefine.h 3 | // RongIMLib 4 | // 5 | // Created by LiFei on 2018/3/8. 6 | // Copyright © 2018年 RongCloud. All rights reserved. 7 | // 8 | 9 | #ifndef RCRealTimeLocationCommonDefine_h 10 | #define RCRealTimeLocationCommonDefine_h 11 | 12 | /** 13 | 坐标体系类型 14 | 15 | - RCRealTimeLocationTypeWGS84: WGS-84 16 | - RCRealTimeLocationTypeGCJ02: GCJ-02 17 | - RCRealTimeLocationTypeBD09: BD-09 18 | */ 19 | typedef NS_ENUM(NSUInteger, RCRealTimeLocationType) { 20 | RCRealTimeLocationTypeWGS84 = 1, 21 | RCRealTimeLocationTypeGCJ02 = 2, 22 | RCRealTimeLocationTypeBD09 = 3 23 | }; 24 | 25 | /*! 26 | 实时位置共享状态 27 | */ 28 | typedef NS_ENUM(NSInteger, RCRealTimeLocationStatus) { 29 | /*! 30 | 实时位置共享,初始状态 31 | */ 32 | RC_REAL_TIME_LOCATION_STATUS_IDLE, 33 | /*! 34 | 实时位置共享,接收状态 35 | */ 36 | RC_REAL_TIME_LOCATION_STATUS_INCOMING, 37 | /*! 38 | 实时位置共享,发起状态 39 | */ 40 | RC_REAL_TIME_LOCATION_STATUS_OUTGOING, 41 | /*! 42 | 实时位置共享,共享状态 43 | */ 44 | RC_REAL_TIME_LOCATION_STATUS_CONNECTED 45 | }; 46 | 47 | /*! 48 | 实时位置共享错误码 49 | */ 50 | typedef NS_ENUM(NSInteger, RCRealTimeLocationErrorCode) { 51 | /*! 52 | 当前设备不支持实时位置共享 53 | */ 54 | RC_REAL_TIME_LOCATION_NOT_SUPPORT, 55 | /*! 56 | 当前会话不支持实时位置共享 57 | */ 58 | RC_REAL_TIME_LOCATION_CONVERSATION_NOT_SUPPORT, 59 | /*! 60 | 当前会话超出了参与者人数限制 61 | */ 62 | RC_REAL_TIME_LOCATION_EXCEED_MAX_PARTICIPANT, 63 | /*! 64 | 获取当前会话信息失败 65 | */ 66 | RC_REAL_TIME_LOCATION_GET_CONVERSATION_FAILURE 67 | }; 68 | 69 | #endif /* RCRealTimeLocationCommonDefine_h */ 70 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCRealTimeLocationEndMessage.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCRealTimeLocationEndMessage.h 3 | // RongIMLib 4 | // 5 | // Created by 杜立召 on 15/8/13. 6 | // Copyright (c) 2015年 RongCloud. All rights reserved. 7 | // 8 | 9 | #import "RCMessageContent.h" 10 | 11 | /*! 12 | 实时位置共享的结束消息的类型名 13 | */ 14 | #define RCRealTimeLocationEndMessageTypeIdentifier @"RC:RLEnd" 15 | 16 | /*! 17 | 实时位置共享的结束消息类 18 | 19 | @discussion 实时位置共享的结束消息类,此消息会进行存储并计入未读消息数。 20 | */ 21 | @interface RCRealTimeLocationEndMessage : RCMessageContent 22 | 23 | /*! 24 | 结束消息的附加信息 25 | */ 26 | @property(nonatomic, copy) NSString *extra; 27 | 28 | /*! 29 | 初始化实时位置共享的结束消息 30 | 31 | @param extra 附加信息 32 | @return 初始化实时位置共享的结束消息对象 33 | */ 34 | + (instancetype)messageWithExtra:(NSString *)extra; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCRealTimeLocationManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCRealTimeLocationManager.h 3 | // RongIMLib 4 | // 5 | // Created by litao on 15/7/14. 6 | // Copyright (c) 2015年 RongCloud. All rights reserved. 7 | // 8 | 9 | #import "RCIMClient.h" 10 | #import "RCRealTimeLocationCommonDefine.h" 11 | #import 12 | #import 13 | 14 | /*! 15 | 实时位置共享监听器 16 | */ 17 | @protocol RCRealTimeLocationObserver 18 | @optional 19 | 20 | /*! 21 | 实时位置共享状态改变的回调 22 | 23 | @param status 当前实时位置共享的状态 24 | */ 25 | - (void)onRealTimeLocationStatusChange:(RCRealTimeLocationStatus)status; 26 | 27 | /*! 28 | 参与者位置发生变化的回调 29 | 30 | @param location 参与者的当前位置 31 | @param userId 位置发生变化的参与者的用户ID 32 | 33 | @warning **已废弃,请改用 onReceiveLocation:type:fromUserId: 接口。** 34 | */ 35 | - (void)onReceiveLocation:(CLLocation *)location 36 | fromUserId:(NSString *)userId __deprecated_msg("已废弃,请勿使用。"); 37 | 38 | /*! 39 | 参与者位置发生变化的回调 40 | 41 | @param location 参与者的当前位置 42 | @param type 坐标体系类型 43 | @param userId 位置发生变化的参与者的用户ID 44 | */ 45 | - (void)onReceiveLocation:(CLLocation *)location 46 | type:(RCRealTimeLocationType)type 47 | fromUserId:(NSString *)userId; 48 | 49 | /*! 50 | 有参与者加入实时位置共享的回调 51 | 52 | @param userId 加入实时位置共享的参与者的用户ID 53 | */ 54 | - (void)onParticipantsJoin:(NSString *)userId; 55 | 56 | /*! 57 | 有参与者退出实时位置共享的回调 58 | 59 | @param userId 退出实时位置共享的参与者的用户ID 60 | */ 61 | - (void)onParticipantsQuit:(NSString *)userId; 62 | 63 | /*! 64 | 更新位置信息失败的回调 65 | 66 | @param description 失败信息 67 | */ 68 | - (void)onUpdateLocationFailed:(NSString *)description; 69 | 70 | /*! 71 | 发起实时位置共享失败后执行 72 | 73 | @param messageId 发起失败的消息ID 74 | */ 75 | - (void)onStartRealTimeLocationFailed:(long)messageId; 76 | 77 | @end 78 | 79 | /*! 80 | 实时位置共享代理 81 | */ 82 | @protocol RCRealTimeLocationProxy 83 | 84 | /*! 85 | 发起实时位置共享 86 | */ 87 | - (void)startRealTimeLocation; 88 | 89 | /*! 90 | 加入实时位置共享 91 | */ 92 | - (void)joinRealTimeLocation; 93 | 94 | /*! 95 | 退出实时位置共享 96 | */ 97 | - (void)quitRealTimeLocation; 98 | 99 | /*! 100 | 注册实时位置共享监听 101 | 102 | @param delegate 实时位置共享监听 103 | */ 104 | - (void)addRealTimeLocationObserver:(id)delegate; 105 | 106 | /*! 107 | 移除实时位置共享监听 108 | 109 | @param delegate 实时位置共享监听 110 | */ 111 | - (void)removeRealTimeLocationObserver:(id)delegate; 112 | 113 | /*! 114 | 获取当前实时位置共享的参与者列表 115 | 116 | @return 当前参与者列表 117 | */ 118 | - (NSArray *)getParticipants; 119 | 120 | /*! 121 | 获取当前实时位置共享状态 122 | 123 | @return 当前实时位置共享状态 124 | */ 125 | - (RCRealTimeLocationStatus)getStatus; 126 | 127 | /*! 128 | 获取参与者的当前位置 129 | 130 | @param userId 需要获取参与者的用户ID 131 | 132 | @return 该参与者的位置信息 133 | */ 134 | - (CLLocation *)getLocation:(NSString *)userId; 135 | 136 | @end 137 | 138 | /*! 139 | 实时位置共享管理类 140 | */ 141 | @interface RCRealTimeLocationManager : NSObject 142 | 143 | /*! 144 | 获取实时位置共享的核心类单例 145 | 146 | @return 实时位置共享的核心类单例 147 | */ 148 | + (instancetype)sharedManager; 149 | 150 | /*! 151 | 获取实时位置共享的代理 152 | 153 | @param conversationType 会话类型 154 | @param targetId 目标会话ID 155 | @param successBlock 获取代理成功的处理 156 | @param errorBlock 获取代理失败的处理 157 | */ 158 | - (void)getRealTimeLocationProxy:(RCConversationType)conversationType 159 | targetId:(NSString *)targetId 160 | success:(void (^)(id locationShare))successBlock 161 | error:(void (^)(RCRealTimeLocationErrorCode status))errorBlock; 162 | 163 | @end 164 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCRealTimeLocationStartMessage.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCRealTimeLocationStartMessage.h 3 | // RongIMLib 4 | // 5 | // Created by litao on 15/7/14. 6 | // Copyright (c) 2015年 RongCloud. All rights reserved. 7 | // 8 | 9 | #import "RCMessageContent.h" 10 | 11 | /*! 12 | 实时位置共享的发起消息的类型名 13 | */ 14 | #define RCRealTimeLocationStartMessageTypeIdentifier @"RC:RLStart" 15 | 16 | /*! 17 | 实时位置共享的发起消息类 18 | 19 | @discussion 实时位置共享的发起消息类,此消息会进行存储并计入未读消息数。 20 | */ 21 | @interface RCRealTimeLocationStartMessage : RCMessageContent 22 | 23 | /*! 24 | 发起消息的附加信息 25 | */ 26 | @property(nonatomic, copy) NSString *extra; 27 | 28 | /*! 29 | 初始化实时位置共享的发起消息 30 | 31 | @param extra 附加信息 32 | @return 初始化实时位置共享的发起消息对象 33 | */ 34 | + (instancetype)messageWithExtra:(NSString *)extra; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCRecallNotificationMessage.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCRecallNotificationMessage.h 3 | // RongIMLib 4 | // 5 | // Created by litao on 16/7/15. 6 | // Copyright © 2016年 RongCloud. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /*! 12 | 撤回通知消息的类型名 13 | */ 14 | #define RCRecallNotificationMessageIdentifier @"RC:RcNtf" 15 | 16 | /*! 17 | 撤回通知消息类 18 | */ 19 | @interface RCRecallNotificationMessage : RCMessageContent 20 | 21 | /*! 22 | 发起撤回操作的用户ID 23 | */ 24 | @property(nonatomic, copy) NSString *operatorId; 25 | 26 | /*! 27 | 撤回的时间(毫秒) 28 | */ 29 | @property(nonatomic, assign) long long recallTime; 30 | 31 | /*! 32 | 原消息的消息类型名 33 | */ 34 | @property(nonatomic, copy) NSString *originalObjectName; 35 | 36 | /*! 37 | 是否是管理员操作 38 | */ 39 | @property(nonatomic, assign) BOOL isAdmin; 40 | @end 41 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCResumeableDownloader.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCEResumeableDownloader.h 3 | // RongEnterpriseApp 4 | // 5 | // Created by zhaobingdong on 2018/5/15. 6 | // Copyright © 2018年 rongcloud. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RCDownloadItem.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | @class RCMessage; 14 | @protocol RCResumeableDownloaderDelegate 15 | 16 | 17 | /** 18 | 下载完成后调用 19 | 20 | @param item 下载任务实例 21 | @param path 下载任务完成后的文件路径 22 | @discussion 通过 itemWithMessageId: 方法获取到写下载项,不会调用该方法 23 | */ 24 | - (void)downloadItem:(RCDownloadItem*)item filePath:(NSString*)path; 25 | 26 | @end 27 | 28 | 29 | @interface RCResumeableDownloader : NSObject 30 | 31 | /** 32 | 创建 RCResumeableDownloader 实例 33 | 34 | @return 返回 RCResumeableDownloader 实例 35 | */ 36 | + (instancetype)defaultInstance; 37 | 38 | 39 | /** 40 | 销毁 RCResumeableDownloader 实例 41 | @discussion 切换用户时调用,退出登录时调用。 42 | */ 43 | + (void)free; 44 | 45 | 46 | @property(nonatomic,weak)id delegate; 47 | 48 | /** 49 | 根据消息id 获取 RCDownloadItem 实例 50 | 51 | @param msgId 消息id 52 | @return 返回 RCDownloadItem 实例 53 | @discussion 仅支持文件消息,文件消息下载完成后,会自动更新消息的 content 54 | */ 55 | - (RCDownloadItem*)itemWithMessageId:(long)msgId; 56 | 57 | 58 | /** 59 | 根据开发者指定的标识符来获取 RCDownloadItem 实例 60 | 61 | @param identify 标识符 62 | @param url 下载地址 63 | @param name 文件名 64 | @return 返回 RCDownloadItem 的实例 65 | @discussion 开发者需要保证该标识符 identify 的唯一性,确保每一个存活的下载任务的标识符是不同的 66 | 实际下载后文件名可能会与不一致,如果存储下载文件目录下已有该文件,会在文件名后添加(1)。 67 | 例如 a.txt 最终下载的文件名会变为 a(1).txt 或者 a(2).txt 68 | */ 69 | - (RCDownloadItem*)itemWithIdentify:(NSString*)identify 70 | url:(NSString*)url 71 | fileName:(NSString*)name; 72 | 73 | @end 74 | 75 | NS_ASSUME_NONNULL_END 76 | 77 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCRichContentItem.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014-2015, RongCloud. 3 | * All rights reserved. 4 | * 5 | * All the contents are the copyright of RongCloud Network Technology Co.Ltd. 6 | * Unless otherwise credited. http://rongcloud.cn 7 | * 8 | */ 9 | 10 | // RCRichContentItem.h 11 | // Created by Dulizhao on 15/4/21. 12 | 13 | #import 14 | 15 | /*! 16 | 公众服务图文信息条目类 17 | 18 | @discussion 图文消息类,此消息会进行存储并计入未读消息数。 19 | */ 20 | @interface RCRichContentItem : NSObject 21 | 22 | /*! 23 | 图文信息条目的标题 24 | */ 25 | @property(nonatomic, copy) NSString *title; 26 | 27 | /*! 28 | 图文信息条目的内容摘要 29 | */ 30 | @property(nonatomic, copy) NSString *digest; 31 | 32 | /*! 33 | 图文信息条目的图片URL 34 | */ 35 | @property(nonatomic, copy) NSString *imageURL; 36 | 37 | /*! 38 | 图文信息条目中包含的需要跳转到的URL 39 | */ 40 | @property(nonatomic, copy) NSString *url; 41 | 42 | /*! 43 | 图文信息条目的扩展信息 44 | */ 45 | @property(nonatomic, copy) NSString *extra; 46 | 47 | /*! 48 | 初始化公众服务图文信息条目 49 | 50 | @param title 图文信息条目的标题 51 | @param digest 图文信息条目的内容摘要 52 | @param imageURL 图文信息条目的图片URL 53 | @param extra 图文信息条目的扩展信息 54 | @return 图文信息条目对象 55 | */ 56 | + (instancetype)messageWithTitle:(NSString *)title 57 | digest:(NSString *)digest 58 | imageURL:(NSString *)imageURL 59 | extra:(NSString *)extra; 60 | 61 | /*! 62 | 初始化公众服务图文信息条目 63 | 64 | @param title 图文信息条目的标题 65 | @param digest 图文信息条目的内容摘要 66 | @param imageURL 图文信息条目的图片URL 67 | @param url 图文信息条目中包含的需要跳转到的URL 68 | @param extra 图文信息条目的扩展信息 69 | @return 图文信息条目对象 70 | */ 71 | + (instancetype)messageWithTitle:(NSString *)title 72 | digest:(NSString *)digest 73 | imageURL:(NSString *)imageURL 74 | url:(NSString *)url 75 | extra:(NSString *)extra; 76 | 77 | @end 78 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCRichContentMessage.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014-2015, RongCloud. 3 | * All rights reserved. 4 | * 5 | * All the contents are the copyright of RongCloud Network Technology Co.Ltd. 6 | * Unless otherwise credited. http://rongcloud.cn 7 | * 8 | */ 9 | 10 | // RCRichContentMessage.h 11 | // Created by Gang Li on 10/17/14. 12 | 13 | #import "RCMessageContent.h" 14 | #import 15 | 16 | /*! 17 | 图文消息的类型名 18 | */ 19 | #define RCRichContentMessageTypeIdentifier @"RC:ImgTextMsg" 20 | 21 | /*! 22 | 图文消息类 23 | 24 | @discussion 图文消息类,此消息会进行存储并计入未读消息数。 25 | */ 26 | @interface RCRichContentMessage : RCMessageContent 27 | 28 | /*! 29 | 图文消息的标题 30 | */ 31 | @property(nonatomic, copy) NSString *title; 32 | 33 | /*! 34 | 图文消息的内容摘要 35 | */ 36 | @property(nonatomic, copy) NSString *digest; 37 | 38 | /*! 39 | 图文消息图片URL 40 | */ 41 | @property(nonatomic, copy) NSString *imageURL; 42 | 43 | /*! 44 | 图文消息中包含的需要跳转到的URL 45 | */ 46 | @property(nonatomic, copy) NSString *url; 47 | 48 | /*! 49 | 图文消息的扩展信息 50 | */ 51 | @property(nonatomic, copy) NSString *extra; 52 | 53 | /*! 54 | 初始化图文消息 55 | 56 | @param title 图文消息的标题 57 | @param digest 图文消息的内容摘要 58 | @param imageURL 图文消息的图片URL 59 | @param extra 图文消息的扩展信息 60 | @return 图文消息对象 61 | */ 62 | + (instancetype)messageWithTitle:(NSString *)title 63 | digest:(NSString *)digest 64 | imageURL:(NSString *)imageURL 65 | extra:(NSString *)extra; 66 | 67 | /*! 68 | 初始化图文消息 69 | 70 | @param title 图文消息的标题 71 | @param digest 图文消息的内容摘要 72 | @param imageURL 图文消息的图片URL 73 | @param url 图文消息中包含的需要跳转到的URL 74 | @param extra 图文消息的扩展信息 75 | @return 图文消息对象 76 | */ 77 | + (instancetype)messageWithTitle:(NSString *)title 78 | digest:(NSString *)digest 79 | imageURL:(NSString *)imageURL 80 | url:(NSString *)url 81 | extra:(NSString *)extra; 82 | 83 | @end 84 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCSearchConversationResult.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCSearchConversationResult.h 3 | // RongIMLib 4 | // 5 | // Created by 杜立召 on 16/9/29. 6 | // Copyright © 2016年 RongCloud. All rights reserved. 7 | // 8 | 9 | #import "RCConversation.h" 10 | #import 11 | 12 | /*! 13 | 搜索的会话结果 14 | */ 15 | @interface RCSearchConversationResult : NSObject 16 | 17 | /*! 18 | 会话 19 | */ 20 | @property(nonatomic, strong) RCConversation *conversation; 21 | 22 | /* 23 | 匹配的条数 24 | */ 25 | @property(nonatomic, assign) int matchCount; 26 | @end 27 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCSightMessage.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCSightMessage.h 3 | // RongIMLib 4 | // 5 | // Created by LiFei on 2016/12/1. 6 | // Copyright © 2016年 RongCloud. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | /*! 13 | 小视频消息的类型名 14 | */ 15 | #define RCSightMessageTypeIdentifier @"RC:SightMsg" 16 | @class AVAsset; 17 | /** 18 | 小视频消息类 19 | 20 | @discussion 小视频消息类,此消息会进行存储并计入未读消息数。 21 | */ 22 | @interface RCSightMessage : RCMediaMessageContent 23 | 24 | /*! 25 | 本地URL地址 26 | */ 27 | @property(nonatomic, copy) NSString *localPath; 28 | 29 | /*! 30 | 网络URL地址 31 | */ 32 | @property(nonatomic, readonly) NSString *sightUrl; 33 | 34 | /** 35 | 视频时长,以秒为单位 36 | */ 37 | @property(nonatomic, assign, readonly) NSUInteger duration; 38 | 39 | /** 40 | 小视频文件名 41 | */ 42 | @property(nonatomic, copy) NSString *name; 43 | 44 | /** 45 | 文件大小 46 | */ 47 | @property(nonatomic, assign, readonly) long long size; 48 | 49 | /*! 50 | 缩略图 51 | */ 52 | @property(nonatomic, strong, readonly) UIImage *thumbnailImage; 53 | 54 | /** 55 | 开发者使用的扩展字段 56 | */ 57 | @property(nonatomic, copy) NSString *extra; 58 | 59 | 60 | /** 61 | 创建小视频消息的便利构造方法 62 | 63 | @param path 视频文件本地路径 64 | @param image 视频首帧缩略图 65 | @param duration 视频时长, 单位秒 66 | @return 视频消息实例变量 67 | */ 68 | + (instancetype)messageWithLocalPath:(NSString *)path 69 | thumbnail:(UIImage *)image 70 | duration:(NSUInteger)duration; 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCStatusMessage.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014-2015, RongCloud. 3 | * All rights reserved. 4 | * 5 | * All the contents are the copyright of RongCloud Network Technology Co.Ltd. 6 | * Unless otherwise credited. http://rongcloud.cn 7 | * 8 | */ 9 | 10 | // RCStatusMessage.h 11 | // Created by Heq.Shinoda on 14-6-13. 12 | 13 | #import "RCMessageContent.h" 14 | 15 | @interface RCStatusMessage : RCMessageContent 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCTSMutableDictionary.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCTSMutableDictionary.h 3 | // RongIMKit 4 | // 5 | // Created by 岑裕 on 16/5/12. 6 | // Copyright © 2016年 RongCloud. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RCTSMutableDictionary : NSMutableDictionary 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCTextMessage.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014-2015, RongCloud. 3 | * All rights reserved. 4 | * 5 | * All the contents are the copyright of RongCloud Network Technology Co.Ltd. 6 | * Unless otherwise credited. http://rongcloud.cn 7 | * 8 | */ 9 | 10 | // RCTextMessage.h 11 | // Created by Heq.Shinoda on 14-6-13. 12 | 13 | #import "RCMessageContent.h" 14 | 15 | /*! 16 | 文本消息的类型名 17 | */ 18 | #define RCTextMessageTypeIdentifier @"RC:TxtMsg" 19 | 20 | /*! 21 | 文本消息类 22 | 23 | @discussion 文本消息类,此消息会进行存储并计入未读消息数。 24 | */ 25 | @interface RCTextMessage : RCMessageContent 26 | 27 | /*! 28 | 文本消息的内容 29 | */ 30 | @property(nonatomic, copy) NSString *content; 31 | 32 | /*! 33 | 文本消息的附加信息 34 | */ 35 | @property(nonatomic, copy) NSString *extra; 36 | 37 | /*! 38 | 初始化文本消息 39 | 40 | @param content 文本消息的内容 41 | @return 文本消息对象 42 | */ 43 | + (instancetype)messageWithContent:(NSString *)content; 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCUnknownMessage.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014-2015, RongCloud. 3 | * All rights reserved. 4 | * 5 | * All the contents are the copyright of RongCloud Network Technology Co.Ltd. 6 | * Unless otherwise credited. http://rongcloud.cn 7 | * 8 | */ 9 | 10 | // RCUnknownMessage.h 11 | // Created by xugang on 15/1/24. 12 | 13 | #import "RCMessageContent.h" 14 | 15 | /*! 16 | 未知消息的类型名 17 | */ 18 | #define RCUnknownMessageTypeIdentifier @"RC:UnknownMsg" 19 | 20 | /*! 21 | 未知消息类 22 | 23 | @discussion 所有未注册的消息类型,在IMKit中都会作为此类消息处理和显示。 24 | */ 25 | @interface RCUnknownMessage : RCMessageContent 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCUploadImageStatusListener.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCUploadImageStatusListener.h 3 | // RongIMLib 4 | // 5 | // Created by litao on 15/8/28. 6 | // Copyright (c) 2015年 RongCloud. All rights reserved. 7 | // 8 | 9 | #import "RCMessage.h" 10 | #import 11 | 12 | /*! 13 | 图片上传进度更新的IMKit监听 14 | 15 | @discussion 此监听用于IMKit发送图片消息(上传到指定服务器)。 16 | App在上传图片时,需要在监听中调用updateBlock、successBlock与errorBlock,通知IMKit 17 | SDK当前上传图片的进度和状态,SDK会更新UI。 18 | */ 19 | @interface RCUploadImageStatusListener : NSObject 20 | 21 | /*! 22 | 上传的图片消息的消息实体 23 | */ 24 | @property(nonatomic, strong) RCMessage *currentMessage; 25 | 26 | /*! 27 | 更新上传进度需要调用的block [progress:当前上传的进度,0 <= progress < 100] 28 | */ 29 | @property(nonatomic, strong) void (^updateBlock)(int progress); 30 | 31 | /*! 32 | 上传成功需要调用的block [imageUrl:图片的网络URL] 33 | */ 34 | @property(nonatomic, strong) void (^successBlock)(NSString *imageUrl); 35 | 36 | /*! 37 | 上传成功需要调用的block [errorCode:上传失败的错误码,非0整数] 38 | */ 39 | @property(nonatomic, strong) void (^errorBlock)(RCErrorCode errorCode); 40 | 41 | /*! 42 | 初始化图片上传进度更新的IMKit监听 43 | 44 | @param message 图片消息的消息实体 45 | @param progressBlock 更新上传进度需要调用的block 46 | @param successBlock 上传成功需要调用的block 47 | @param errorBlock 上传失败需要调用的block 48 | 49 | @return 图片上传进度更新的IMKit监听对象 50 | */ 51 | - (instancetype)initWithMessage:(RCMessage *)message 52 | uploadProgress:(void (^)(int progress))progressBlock 53 | uploadSuccess:(void (^)(NSString *imageUrl))successBlock 54 | uploadError:(void (^)(RCErrorCode errorCode))errorBlock; 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCUploadMediaStatusListener.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCUploadMediaStatusListener.h 3 | // RongIMLib 4 | // 5 | // Created by litao on 15/8/28. 6 | // Copyright (c) 2015年 RongCloud. All rights reserved. 7 | // 8 | 9 | #import "RCMessage.h" 10 | #import 11 | 12 | /*! 13 | 媒体文件上传进度更新的IMKit监听 14 | 15 | @discussion 此监听用于IMKit发送媒体文件消息(上传到指定服务器)。 16 | App在上传媒体文件时,需要在监听中调用updateBlock、successBlock与errorBlock,通知IMKit 17 | SDK当前上传媒体文件的进度和状态,SDK会更新UI。 18 | */ 19 | @interface RCUploadMediaStatusListener : NSObject 20 | 21 | /*! 22 | 上传的媒体文件消息的消息实体 23 | */ 24 | @property(nonatomic, strong) RCMessage *currentMessage; 25 | 26 | /*! 27 | 更新上传进度需要调用的block [progress:当前上传的进度,0 <= progress < 100] 28 | */ 29 | @property(nonatomic, strong) void (^updateBlock)(int progress); 30 | 31 | /*! 32 | 上传成功需要调用的block。 33 | content:上传成功之后,需要发送的消息内容。 34 | 您可以使用currentMessage,把其中content属性对应的url字段设置成您上传成功的网络URL。 35 | 请参考下面代码。 36 | 37 | 升级说明:如果您之前使用了此接口,请参考下面代码把参数从 url 替换成 message。 38 | if ([currentMessage.content isKindOfClass:[RCImageMessage class]]) { 39 | RCImageMessage *content = (RCImageMessage *)currentMessage.content; 40 | content.imageUrl = remoteUrl; 41 | successBlock(content); 42 | } else if ([currentMessage.content isKindOfClass:[RCFileMessage class]]) { 43 | RCFileMessage *content = (RCFilemessage *)currentMessage.content; 44 | content.fileUrl = remoteUrl; 45 | successBlock(content); 46 | } 47 | */ 48 | @property(nonatomic, strong) void (^successBlock)(RCMessageContent *content); 49 | 50 | /*! 51 | 上传成功需要调用的block [errorCode:上传失败的错误码,非0整数] 52 | */ 53 | @property(nonatomic, strong) void (^errorBlock)(RCErrorCode errorCode); 54 | 55 | /*! 56 | 上传取消需要调用的block 57 | */ 58 | @property(nonatomic, strong) void (^cancelBlock)(void); 59 | 60 | /*! 61 | 初始化媒体文件上传进度更新的IMKit监听 62 | 63 | @param message 媒体文件消息的消息实体 64 | @param progressBlock 更新上传进度需要调用的block 65 | @param successBlock 上传成功需要调用的block 66 | @param errorBlock 上传失败需要调用的block 67 | @param cancelBlock 上传取消需要调用的block(如果未实现,传nil即可) 68 | 69 | @return 媒体文件上传进度更新的IMKit监听对象 70 | */ 71 | - (instancetype)initWithMessage:(RCMessage *)message 72 | uploadProgress:(void (^)(int progress))progressBlock 73 | uploadSuccess:(void (^)(RCMessageContent *content))successBlock 74 | uploadError:(void (^)(RCErrorCode errorCode))errorBlock 75 | uploadCancel:(void (^)(void))cancelBlock; 76 | 77 | /*! 78 | 取消当前上传 79 | 80 | @discussion 如果您实现取消正在上传的媒体消息功能,则必须实现此回调。 81 | 您需要在取消成功之后,调用cancelBlock通知SDK,SDK会自动更新UI。 82 | */ 83 | - (void)cancelUpload; 84 | 85 | @end 86 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCUserInfo.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014-2015, RongCloud. 3 | * All rights reserved. 4 | * 5 | * All the contents are the copyright of RongCloud Network Technology Co.Ltd. 6 | * Unless otherwise credited. http://rongcloud.cn 7 | * 8 | */ 9 | 10 | // RCUserInfo.h 11 | // Created by Heq.Shinoda on 14-6-16. 12 | 13 | #import 14 | 15 | /*! 16 | 用户信息类 17 | */ 18 | @interface RCUserInfo : NSObject 19 | 20 | /*! 21 | 用户ID 22 | */ 23 | @property(nonatomic, copy) NSString *userId; 24 | 25 | /*! 26 | 用户名称 27 | */ 28 | @property(nonatomic, copy) NSString *name; 29 | 30 | /*! 31 | 用户头像的URL 32 | */ 33 | @property(nonatomic, copy) NSString *portraitUri; 34 | 35 | /** 36 | 用户信息附加字段 37 | */ 38 | @property(nonatomic, copy) NSString *extra; 39 | 40 | /*! 41 | 用户信息的初始化方法 42 | 43 | @param userId 用户ID 44 | @param username 用户名称 45 | @param portrait 用户头像的URL 46 | @return 用户信息对象 47 | */ 48 | - (instancetype)initWithUserId:(NSString *)userId name:(NSString *)username portrait:(NSString *)portrait; 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCUserOnlineStatusInfo.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCUserOnlineStatusInfo.h 3 | // RongIMLib 4 | // 5 | // Created by 杜立召 on 16/9/26. 6 | // Copyright © 2016年 RongCloud. All rights reserved. 7 | // 8 | 9 | #import "RCStatusDefine.h" 10 | #import 11 | 12 | /*! 13 | 用户在线状态 14 | */ 15 | @interface RCUserOnlineStatusInfo : NSObject 16 | 17 | /*! 18 | 在线的平台 19 | */ 20 | @property(nonatomic, assign) RCPlatform platform; 21 | 22 | /*! 23 | 融云服务在线状态 24 | 25 | @discussion 0表示离线,1表示在线 26 | */ 27 | @property(nonatomic, assign) int rcServiceStatus; 28 | 29 | /*! 30 | 用户自定义的在线状态(1 < customerStatus <= 255) 31 | 32 | @discussion 33 | 如果没有通过RCIMClient的setUserOnlineStatus:success:error:设置自定义的在线状态,默认的在线状态值为1,若离线则为0。 34 | */ 35 | @property(nonatomic, assign) int customerStatus; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCUserTypingStatus.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCUserTypingStatus.h 3 | // RongIMLib 4 | // 5 | // Created by 岑裕 on 16/1/8. 6 | // Copyright © 2016年 RongCloud. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /*! 12 | 用户输入状态类 13 | */ 14 | @interface RCUserTypingStatus : NSObject 15 | 16 | /*! 17 | 当前正在输入的用户ID 18 | */ 19 | @property(nonatomic, copy) NSString *userId; 20 | 21 | /*! 22 | 当前正在输入的消息类型名 23 | 24 | @discussion 25 | contentType为用户当前正在编辑的消息类型名,即RCMessageContent中getObjectName的返回值。 26 | 如文本消息,应该传类型名"RC:TxtMsg"。 27 | */ 28 | @property(nonatomic, copy) NSString *contentType; 29 | 30 | /*! 31 | 初始化用户输入状态对象 32 | 33 | @param userId 当前正在输入的用户ID 34 | @param objectName 当前正在输入的消息类型名 35 | 36 | @return 用户输入状态对象 37 | */ 38 | - (instancetype)initWithUserId:(NSString *)userId contentType:(NSString *)objectName; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCVoiceMessage.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014-2015, RongCloud. 3 | * All rights reserved. 4 | * 5 | * All the contents are the copyright of RongCloud Network Technology Co.Ltd. 6 | * Unless otherwise credited. http://rongcloud.cn 7 | * 8 | */ 9 | 10 | // RCVoiceMessage.h 11 | // Created by Heq.Shinoda on 14-6-13. 12 | 13 | #import "RCMessageContent.h" 14 | 15 | /*! 16 | 语音消息的类型名 17 | */ 18 | #define RCVoiceMessageTypeIdentifier @"RC:VcMsg" 19 | 20 | /*! 21 | 语音消息类 22 | 23 | @discussion 语音消息类,此消息会进行存储并计入未读消息数。 24 | */ 25 | @interface RCVoiceMessage : RCMessageContent 26 | 27 | /*! 28 | wav格式的音频数据 29 | */ 30 | @property(nonatomic, strong) NSData *wavAudioData; 31 | 32 | /*! 33 | 语音消息的时长 34 | */ 35 | @property(nonatomic, assign) long duration; 36 | 37 | /*! 38 | 语音消息的附加信息 39 | */ 40 | @property(nonatomic, copy) NSString *extra; 41 | 42 | /*! 43 | 初始化语音消息 44 | 45 | @param audioData wav格式的音频数据 46 | @param duration 语音消息的时长(单位:秒) 47 | @return 语音消息对象 48 | 49 | @discussion 50 | 如果您不是使用IMKit中的录音功能,则在初始化语音消息的时候,需要确保以下几点。 51 | 1. audioData必须是单声道的wav格式音频数据; 52 | 2. audioData的采样率必须是8000Hz,采样位数(精度)必须为16位。 53 | 54 | 您可以参考IMKit中的录音参数: 55 | NSDictionary *settings = @{AVFormatIDKey: @(kAudioFormatLinearPCM), 56 | AVSampleRateKey: @8000.00f, 57 | AVNumberOfChannelsKey: @1, 58 | AVLinearPCMBitDepthKey: @16, 59 | AVLinearPCMIsNonInterleaved: @NO, 60 | AVLinearPCMIsFloatKey: @NO, 61 | AVLinearPCMIsBigEndianKey: @NO}; 62 | */ 63 | + (instancetype)messageWithAudio:(NSData *)audioData duration:(long)duration; 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RCWatchKitStatusDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCWatchKitStatusDelegate.h 3 | // RongIMLib 4 | // 5 | // Created by litao on 15/6/4. 6 | // Copyright (c) 2015年 RongCloud. All rights reserved. 7 | // 8 | 9 | #ifndef RongIMLib_RCwatchKitStatusDelegate_h 10 | #define RongIMLib_RCwatchKitStatusDelegate_h 11 | 12 | /*! 13 | 用于Apple Watch的IMLib事务监听器 14 | 15 | @discussion 此协议定义了IMLib在状态变化和各种活动时的回调,主要用于Apple 16 | Watch。 17 | */ 18 | @protocol RCWatchKitStatusDelegate 19 | 20 | @optional 21 | 22 | #pragma mark 连接状态 23 | /*! 24 | 连接状态发生变化的回调 25 | 26 | @param status SDK与融云服务器的连接状态 27 | */ 28 | - (void)notifyWatchKitConnectionStatusChanged:(RCConnectionStatus)status; 29 | 30 | #pragma mark 消息接收与发送 31 | 32 | /*! 33 | 收到消息的回调 34 | 35 | @param receivedMsg 收到的消息实体 36 | */ 37 | - (void)notifyWatchKitReceivedMessage:(RCMessage *)receivedMsg; 38 | 39 | /*! 40 | 向外发送消息的回调 41 | 42 | @param message 待发送消息 43 | */ 44 | - (void)notifyWatchKitSendMessage:(RCMessage *)message; 45 | 46 | /*! 47 | 发送消息完成的回调 48 | 49 | @param messageId 消息ID 50 | @param status 完成的状态吗。0表示成功,非0表示失败 51 | */ 52 | - (void)notifyWatchKitSendMessageCompletion:(long)messageId status:(RCErrorCode)status; 53 | 54 | /*! 55 | 上传图片进度更新的回调 56 | 57 | @param progress 进度 58 | @param messageId 消息ID 59 | */ 60 | - (void)notifyWatchKitUploadFileProgress:(int)progress messageId:(long)messageId; 61 | 62 | #pragma mark 消息与会话操作 63 | /*! 64 | 删除会话的回调 65 | 66 | @param conversationTypeList 会话类型的数组 67 | */ 68 | - (void)notifyWatchKitClearConversations:(NSArray *)conversationTypeList; 69 | 70 | /*! 71 | 删除消息的回调 72 | 73 | @param conversationType 会话类型 74 | @param targetId 目标会话ID 75 | */ 76 | - (void)notifyWatchKitClearMessages:(RCConversationType)conversationType targetId:(NSString *)targetId; 77 | 78 | /*! 79 | 删除消息的回调 80 | 81 | @param messageIds 消息ID的数组 82 | */ 83 | - (void)notifyWatchKitDeleteMessages:(NSArray *)messageIds; 84 | 85 | /*! 86 | 清除未读消息数的回调 87 | 88 | @param conversationType 会话类型 89 | @param targetId 目标会话ID 90 | */ 91 | - (void)notifyWatchKitClearUnReadStatus:(RCConversationType)conversationType targetId:(NSString *)targetId; 92 | 93 | #pragma mark 讨论组 94 | 95 | /*! 96 | 创建讨论组的回调 97 | 98 | @param name 讨论组名称 99 | @param userIdList 成员的用户ID列表 100 | */ 101 | - (void)notifyWatchKitCreateDiscussion:(NSString *)name userIdList:(NSArray *)userIdList; 102 | 103 | /*! 104 | 创建讨论组成功的回调 105 | 106 | @param discussionId 讨论组的ID 107 | */ 108 | - (void)notifyWatchKitCreateDiscussionSuccess:(NSString *)discussionId; 109 | 110 | /*! 111 | 创建讨论组失败 112 | 113 | @param errorCode 创建失败的错误码 114 | */ 115 | - (void)notifyWatchKitCreateDiscussionError:(RCErrorCode)errorCode; 116 | 117 | /*! 118 | 讨论组加人的回调 119 | 120 | @param discussionId 讨论组的ID 121 | @param userIdList 添加成员的用户ID列表 122 | 123 | @discussion 加人的结果可以通过notifyWatchKitDiscussionOperationCompletion获得。 124 | */ 125 | - (void)notifyWatchKitAddMemberToDiscussion:(NSString *)discussionId userIdList:(NSArray *)userIdList; 126 | 127 | /*! 128 | 讨论组踢人的回调 129 | 130 | @param discussionId 讨论组ID 131 | @param userId 用户ID 132 | 133 | @discussion 踢人的结果可以通过notifyWatchKitDiscussionOperationCompletion获得。 134 | */ 135 | - (void)notifyWatchKitRemoveMemberFromDiscussion:(NSString *)discussionId userId:(NSString *)userId; 136 | 137 | /*! 138 | 退出讨论组的回调 139 | 140 | @param discussionId 讨论组ID 141 | 142 | @discussion 创建的结果可以通过notifyWatchKitDiscussionOperationCompletion获得。 143 | */ 144 | - (void)notifyWatchKitQuitDiscussion:(NSString *)discussionId; 145 | 146 | /*! 147 | 讨论组操作的回调。tag:100-邀请;101-踢人;102-退出。status:0成功,非0失败 148 | 149 | @param tag 讨论组的操作类型。100为加人,101为踢人,102为退出 150 | @param status 操作的结果。0表示成功,非0表示失败 151 | */ 152 | - (void)notifyWatchKitDiscussionOperationCompletion:(int)tag status:(RCErrorCode)status; 153 | 154 | @end 155 | #endif 156 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/RongIMLib.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014-2015, RongCloud. 3 | * All rights reserved. 4 | * 5 | * All the contents are the copyright of RongCloud Network Technology Co.Ltd. 6 | * Unless otherwise credited. http://rongcloud.cn 7 | * 8 | */ 9 | 10 | // RongIMLib.h 11 | // Created by xugang on 14/12/11. 12 | 13 | #import 14 | 15 | //! Project version number for RongIMLib. 16 | FOUNDATION_EXPORT double RongIMLibVersionNumber; 17 | 18 | //! Project version string for RongIMLib. 19 | FOUNDATION_EXPORT const unsigned char RongIMLibVersionString[]; 20 | 21 | /// IMLib核心类 22 | #import 23 | #import 24 | /// 会话相关类 25 | #import 26 | #import 27 | #import 28 | #import 29 | #import 30 | /// 消息相关类 31 | #import 32 | #import 33 | #import 34 | #import 35 | #import 36 | #import 37 | #import 38 | #import 39 | #import 40 | #import 41 | #import 42 | #import 43 | #import 44 | #import 45 | #import 46 | #import 47 | #import 48 | #import 49 | #import 50 | #import 51 | #import 52 | #import 53 | #import 54 | #import 55 | #import 56 | /// 工具类 57 | #import 58 | #import 59 | #import 60 | #import 61 | #import 62 | ///客服 63 | #import 64 | #import 65 | #import 66 | 67 | /// 其他 68 | #import 69 | #import 70 | #import 71 | #import 72 | #import 73 | #import 74 | #import 75 | #import 76 | #import 77 | #import 78 | 79 | #import 80 | #import 81 | #import 82 | #import 83 | 84 | // log 85 | #import 86 | 87 | //Downlad 88 | #import 89 | #import 90 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/interf_dec.h: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------------ 2 | * Copyright (C) 2009 Martin Storsjo 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | * express or implied. 14 | * See the License for the specific language governing permissions 15 | * and limitations under the License. 16 | * ------------------------------------------------------------------- 17 | */ 18 | 19 | #ifndef OPENCORE_AMRNB_INTERF_DEC_H 20 | #define OPENCORE_AMRNB_INTERF_DEC_H 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | void *Decoder_Interface_init(void); 27 | void Decoder_Interface_exit(void *state); 28 | void Decoder_Interface_Decode(void *state, const unsigned char *in, short *out, int bfi); 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Headers/interf_enc.h: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------------ 2 | * Copyright (C) 2009 Martin Storsjo 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | * express or implied. 14 | * See the License for the specific language governing permissions 15 | * and limitations under the License. 16 | * ------------------------------------------------------------------- 17 | */ 18 | 19 | #ifndef OPENCORE_AMRNB_INTERF_ENC_H 20 | #define OPENCORE_AMRNB_INTERF_ENC_H 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | #ifndef AMRNB_WRAPPER_INTERNAL 27 | /* Copied from enc/src/gsmamr_enc.h */ 28 | enum Mode { 29 | MR475 = 0, /* 4.75 kbps */ 30 | MR515, /* 5.15 kbps */ 31 | MR59, /* 5.90 kbps */ 32 | MR67, /* 6.70 kbps */ 33 | MR74, /* 7.40 kbps */ 34 | MR795, /* 7.95 kbps */ 35 | MR102, /* 10.2 kbps */ 36 | MR122, /* 12.2 kbps */ 37 | MRDTX, /* DTX */ 38 | N_MODES /* Not Used */ 39 | }; 40 | #endif 41 | 42 | void *Encoder_Interface_init(int dtx); 43 | void Encoder_Interface_exit(void *state); 44 | int Encoder_Interface_Encode(void *state, enum Mode mode, const short *speech, unsigned char *out, int forceSpeech); 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TaleAi/flutter_rongcloud_im/5b298204a5dde362c3db78bba772123e70e066b5/ios/Libs/RongIMLib.framework/Info.plist -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module RongIMLib { 2 | umbrella header "RongIMLib.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /ios/Libs/RongIMLib.framework/RongIMLib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TaleAi/flutter_rongcloud_im/5b298204a5dde362c3db78bba772123e70e066b5/ios/Libs/RongIMLib.framework/RongIMLib -------------------------------------------------------------------------------- /ios/Libs/libopencore-amrnb.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TaleAi/flutter_rongcloud_im/5b298204a5dde362c3db78bba772123e70e066b5/ios/Libs/libopencore-amrnb.a -------------------------------------------------------------------------------- /ios/flutter_rongcloud_im.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 3 | # 4 | Pod::Spec.new do |s| 5 | s.name = 'flutter_rongcloud_im' 6 | s.version = '0.0.1' 7 | s.summary = 'A new Flutter rongcloud im plugin.' 8 | s.description = <<-DESC 9 | A new Flutter rongcloud im plugin. 10 | DESC 11 | s.homepage = 'http://ninefrost.com' 12 | s.license = { :file => '../LICENSE' } 13 | s.author = { 'Your Company' => 'email@example.com' } 14 | s.source = { :path => '.' } 15 | s.source_files = 'Classes/**/*' 16 | s.public_header_files = 'Classes/**/*.h' 17 | s.static_framework = true 18 | s.dependency 'Flutter' 19 | 20 | s.frameworks = ["AssetsLibrary", "AudioToolbox", "AVFoundation", "CFNetwork", "CoreAudio", "CoreGraphics", "CoreLocation", "CoreMedia", "CoreTelephony", "CoreVideo", "ImageIO", "MapKit", "OpenGLES", "QuartzCore", "SystemConfiguration", "UIKit", "Photos", "SafariServices"] 21 | s.libraries = ["c++", "c++abi", "sqlite3.0", "stdc++", "xml2", "z"] 22 | s.preserve_paths = "Libs/*.a" 23 | s.preserve_paths = "Libs/*.framework" 24 | s.vendored_libraries = "**/*.a" 25 | s.vendored_frameworks="**/*.framework" 26 | s.ios.deployment_target = "9.3" 27 | end 28 | 29 | -------------------------------------------------------------------------------- /lib/generated/i18n.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter/foundation.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | // ignore_for_file: non_constant_identifier_names 7 | // ignore_for_file: camel_case_types 8 | // ignore_for_file: prefer_single_quotes 9 | 10 | //This file is automatically generated. DO NOT EDIT, all your changes would be lost. 11 | class S implements WidgetsLocalizations { 12 | const S(); 13 | 14 | static const GeneratedLocalizationsDelegate delegate = 15 | GeneratedLocalizationsDelegate(); 16 | 17 | static S of(BuildContext context) => Localizations.of(context, S); 18 | 19 | @override 20 | TextDirection get textDirection => TextDirection.ltr; 21 | 22 | } 23 | 24 | class $en extends S { 25 | const $en(); 26 | } 27 | 28 | class GeneratedLocalizationsDelegate extends LocalizationsDelegate { 29 | const GeneratedLocalizationsDelegate(); 30 | 31 | List get supportedLocales { 32 | return const [ 33 | Locale("en", ""), 34 | ]; 35 | } 36 | 37 | LocaleListResolutionCallback listResolution({Locale fallback}) { 38 | return (List locales, Iterable supported) { 39 | if (locales == null || locales.isEmpty) { 40 | return fallback ?? supported.first; 41 | } else { 42 | return _resolve(locales.first, fallback, supported); 43 | } 44 | }; 45 | } 46 | 47 | LocaleResolutionCallback resolution({Locale fallback}) { 48 | return (Locale locale, Iterable supported) { 49 | return _resolve(locale, fallback, supported); 50 | }; 51 | } 52 | 53 | Locale _resolve(Locale locale, Locale fallback, Iterable supported) { 54 | if (locale == null || !isSupported(locale)) { 55 | return fallback ?? supported.first; 56 | } 57 | 58 | final Locale languageLocale = Locale(locale.languageCode, ""); 59 | if (supported.contains(locale)) { 60 | return locale; 61 | } else if (supported.contains(languageLocale)) { 62 | return languageLocale; 63 | } else { 64 | final Locale fallbackLocale = fallback ?? supported.first; 65 | return fallbackLocale; 66 | } 67 | } 68 | 69 | @override 70 | Future load(Locale locale) { 71 | final String lang = getLang(locale); 72 | if (lang != null) { 73 | switch (lang) { 74 | case "en": 75 | return SynchronousFuture(const $en()); 76 | default: 77 | // NO-OP. 78 | } 79 | } 80 | return SynchronousFuture(const S()); 81 | } 82 | 83 | @override 84 | bool isSupported(Locale locale) => 85 | locale != null && supportedLocales.contains(locale); 86 | 87 | @override 88 | bool shouldReload(GeneratedLocalizationsDelegate old) => false; 89 | } 90 | 91 | String getLang(Locale l) => l == null 92 | ? null 93 | : l.countryCode != null && l.countryCode.isEmpty 94 | ? l.languageCode 95 | : l.toString(); 96 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_rongcloud_im 2 | description: A new Flutter rongcloud im plugin. 3 | version: 0.0.1 4 | author: 5 | homepage: 6 | 7 | environment: 8 | sdk: ">=2.0.0-dev.68.0 <3.0.0" 9 | 10 | dependencies: 11 | flutter: 12 | sdk: flutter 13 | 14 | # For information on the generic Dart part of this file, see the 15 | # following page: https://www.dartlang.org/tools/pub/pubspec 16 | 17 | # The following section is specific to Flutter. 18 | flutter: 19 | # This section identifies this Flutter project as a plugin project. 20 | # The androidPackage and pluginClass identifiers should not ordinarily 21 | # be modified. They are used by the tooling to maintain consistency when 22 | # adding or updating assets for this project. 23 | plugin: 24 | androidPackage: com.ninefrost.flutterrongcloudim 25 | pluginClass: FlutterRongcloudImPlugin 26 | 27 | # To add assets to your plugin package, add an assets section, like this: 28 | # assets: 29 | # - images/a_dot_burr.jpeg 30 | # - images/a_dot_ham.jpeg 31 | # 32 | # For details regarding assets in packages, see 33 | # https://flutter.io/assets-and-images/#from-packages 34 | # 35 | # An image asset can refer to one or more resolution-specific "variants", see 36 | # https://flutter.io/assets-and-images/#resolution-aware. 37 | 38 | # To add custom fonts to your plugin package, add a fonts section here, 39 | # in this "flutter" section. Each entry in this list should have a 40 | # "family" key with the font family name, and a "fonts" key with a 41 | # list giving the asset and other descriptors for the font. For 42 | # example: 43 | # fonts: 44 | # - family: Schyler 45 | # fonts: 46 | # - asset: fonts/Schyler-Regular.ttf 47 | # - asset: fonts/Schyler-Italic.ttf 48 | # style: italic 49 | # - family: Trajan Pro 50 | # fonts: 51 | # - asset: fonts/TrajanPro.ttf 52 | # - asset: fonts/TrajanPro_Bold.ttf 53 | # weight: 700 54 | # 55 | # For details regarding fonts in packages, see 56 | # https://flutter.io/custom-fonts/#from-packages 57 | -------------------------------------------------------------------------------- /res/values/strings_en.arb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TaleAi/flutter_rongcloud_im/5b298204a5dde362c3db78bba772123e70e066b5/res/values/strings_en.arb --------------------------------------------------------------------------------