Compare commits
236 Commits
1.0.0
...
3.2.0-alph
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b07d104799 | ||
|
|
207e0807e9 | ||
|
|
373e4ddc82 | ||
|
|
b3c0b16092 | ||
|
|
8c50207f7c | ||
|
|
3bf9570d8d | ||
|
|
2a8a6ff7d9 | ||
|
|
9c8b9990c9 | ||
|
|
705863ba66 | ||
|
|
fd39b328bc | ||
|
|
90b96cb413 | ||
|
|
7894327b2c | ||
|
|
96e90d3c0a | ||
|
|
8cc844a408 | ||
|
|
9856ac8281 | ||
|
|
c9fd5d6dfb | ||
|
|
056581f52e | ||
|
|
af0ca0932f | ||
|
|
c0618458fa | ||
|
|
27eb0f78d2 | ||
|
|
169da36d0b | ||
|
|
6bd36c424a | ||
|
|
7995c4af1d | ||
|
|
5bdb9879a7 | ||
|
|
79cbae718c | ||
|
|
61fb9b7dd9 | ||
|
|
bd364ea2fd | ||
|
|
d43259d171 | ||
|
|
ce0c6ff832 | ||
|
|
1f6312d9d3 | ||
|
|
63e5ecf896 | ||
|
|
70a46ed151 | ||
|
|
f04d45f6b8 | ||
|
|
80c79d0fc6 | ||
|
|
4d8ba65f9b | ||
|
|
9df556b837 | ||
|
|
96d6b755cd | ||
|
|
3af726a6f7 | ||
|
|
041d6656bc | ||
|
|
43afb8775a | ||
|
|
39727feb8a | ||
|
|
c6d1669bdd | ||
|
|
02202051e1 | ||
|
|
d0a4530314 | ||
|
|
958c118e84 | ||
|
|
cdef7ffda8 | ||
|
|
bac4bd0884 | ||
|
|
377b07ef05 | ||
|
|
025487fbf3 | ||
|
|
ba3767da42 | ||
|
|
fc6fd3dd93 | ||
|
|
c6d9815e64 | ||
|
|
8e0c736d29 | ||
|
|
15854a2c27 | ||
|
|
3e1ee249c9 | ||
|
|
29eac1bf91 | ||
|
|
bea820ff27 | ||
|
|
a85062ce79 | ||
|
|
98b2774dc1 | ||
|
|
e823df62a8 | ||
|
|
2c40b626e4 | ||
|
|
3b5f47c9f0 | ||
|
|
4c540fbff5 | ||
|
|
b8a51374a3 | ||
|
|
099cb9849a | ||
|
|
025334d32f | ||
|
|
5adc50b963 | ||
|
|
ebbe5c882f | ||
|
|
eb3361c4b3 | ||
|
|
9c5aa56609 | ||
|
|
3e03460300 | ||
|
|
788ab524c2 | ||
|
|
eed59f468c | ||
|
|
d758f3fca1 | ||
|
|
b8ee9276a2 | ||
|
|
a77c86e87a | ||
|
|
c99d1e4d67 | ||
|
|
b53d4dfcfd | ||
|
|
bb49d6b27a | ||
|
|
2b78f83b20 | ||
|
|
38a899d32c | ||
|
|
0a0635bb71 | ||
|
|
c44575ec0e | ||
|
|
14624c717b | ||
|
|
0900df2aa2 | ||
|
|
cd06c3bb5a | ||
|
|
a6aea5496a | ||
|
|
72111053bd | ||
|
|
18f099c437 | ||
|
|
cff0a4cce2 | ||
|
|
e415961d64 | ||
|
|
b3aebeb318 | ||
|
|
c76bfeb07a | ||
|
|
a9343bf892 | ||
|
|
bf354c4103 | ||
|
|
644c52ae0e | ||
|
|
80048bcd18 | ||
|
|
cc6c1bdc22 | ||
|
|
7233b2e298 | ||
|
|
cd61ebba7f | ||
|
|
3a294dd856 | ||
|
|
45e0c82ea3 | ||
|
|
2de606d13e | ||
|
|
7a68e13398 | ||
|
|
4132338633 | ||
|
|
485bf58f14 | ||
|
|
6ad47216fb | ||
|
|
3c62315cfd | ||
|
|
7247f6b982 | ||
|
|
6a771f8035 | ||
|
|
4726055b6f | ||
|
|
2a9d4a0587 | ||
|
|
cce41e0991 | ||
|
|
599c25b099 | ||
|
|
6c3311cce1 | ||
|
|
9a359ca9a0 | ||
|
|
cc2211c36d | ||
|
|
ccf4d4fec1 | ||
|
|
0b8762a754 | ||
|
|
28a911022c | ||
|
|
996281e49a | ||
|
|
e2b546f400 | ||
|
|
8abc8e4399 | ||
|
|
ed20b4915a | ||
|
|
8b1f4dc320 | ||
|
|
f7416290fb | ||
|
|
f0b28099bf | ||
|
|
d5d11af7ce | ||
|
|
9cd717c67c | ||
|
|
c7218cb94c | ||
|
|
e4c78e0106 | ||
|
|
7457f182f3 | ||
|
|
952cb82417 | ||
|
|
3cb2c6d514 | ||
|
|
90be2f74ac | ||
|
|
53ef6c2173 | ||
|
|
373171aded | ||
|
|
58702fcbaf | ||
|
|
8b8c9d5923 | ||
|
|
d5e3947878 | ||
|
|
6edf9b74fa | ||
|
|
fcc8373560 | ||
|
|
7e8d72929a | ||
|
|
03fa70c585 | ||
|
|
8b4a35e6b7 | ||
|
|
71897bcb4e | ||
|
|
57340e52a7 | ||
|
|
197f0b482f | ||
|
|
e009224256 | ||
|
|
ad0563aee4 | ||
|
|
d120312ac9 | ||
|
|
d64b426c90 | ||
|
|
3a845dc40b | ||
|
|
700265c685 | ||
|
|
73b9eb776f | ||
|
|
372e573ea0 | ||
|
|
8ea08f9ce6 | ||
|
|
40b65f52a5 | ||
|
|
6c0676fbe5 | ||
|
|
80152e2314 | ||
|
|
2381d26729 | ||
|
|
b25f0d8547 | ||
|
|
f4e7eaf50e | ||
|
|
f40d4148a8 | ||
|
|
23fa27d2cc | ||
|
|
6a1dc1f62a | ||
|
|
07212474fe | ||
|
|
8655088af6 | ||
|
|
b7aa083f48 | ||
|
|
514fb53eca | ||
|
|
9345c6465a | ||
|
|
b05e68355e | ||
|
|
3746652552 | ||
|
|
e323eea8cd | ||
|
|
f111d0c69e | ||
|
|
ba661a516e | ||
|
|
43016d5e86 | ||
|
|
4c43d54a1a | ||
|
|
b71cd22dce | ||
|
|
f3261d2ce4 | ||
|
|
cd0865853b | ||
|
|
3b01a700c9 | ||
|
|
74b3747f23 | ||
|
|
24ff862476 | ||
|
|
64e91c8294 | ||
|
|
b33d047cfb | ||
|
|
2e52435041 | ||
|
|
e0071ca84b | ||
|
|
9d2e2ee0b2 | ||
|
|
7d7cf6ddfa | ||
|
|
4df97754c7 | ||
|
|
5555cfde7c | ||
|
|
39988a49cf | ||
|
|
9c176068c4 | ||
|
|
6ef237b1e6 | ||
|
|
ad3923e121 | ||
|
|
0607cd2928 | ||
|
|
760d65b9d0 | ||
|
|
46e28651ea | ||
|
|
b6aea0f7e1 | ||
|
|
e1a6ab3c79 | ||
|
|
c16fe12ca6 | ||
|
|
0fbfc70ef1 | ||
|
|
603188d98a | ||
|
|
51667e19d7 | ||
|
|
862bf46ace | ||
|
|
744268371f | ||
|
|
aa05465509 | ||
|
|
790dbafd6b | ||
|
|
6527295f1f | ||
|
|
27293375a4 | ||
|
|
401255df6e | ||
|
|
7fdc262b5f | ||
|
|
579e3dd236 | ||
|
|
232b5dd8f8 | ||
|
|
1ead087f08 | ||
|
|
b5f80cc052 | ||
|
|
a97048ea9d | ||
|
|
1aae155c58 | ||
|
|
39b2112e0e | ||
|
|
7cedb36001 | ||
|
|
e32598bb06 | ||
|
|
40190198d8 | ||
|
|
e18bbc567a | ||
|
|
0107919f97 | ||
|
|
ad346184cb | ||
|
|
d4bc4f7ae2 | ||
|
|
5bafe70ef4 | ||
|
|
4129d649cd | ||
|
|
ddd77fa307 | ||
|
|
90f715acea | ||
|
|
1fce0e4cae | ||
|
|
dbaad13dd1 | ||
|
|
0e147a033f | ||
|
|
15042ed2ea | ||
|
|
66c9b0f673 |
44
.github/ISSUE_TEMPLATE/bug-report.md
vendored
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
---
|
||||||
|
name: Bug report (BUG模板)
|
||||||
|
about: Create a bug report helping us fix it. (创建一个 BUG 报告以帮助我们进行修复)
|
||||||
|
title: "[BUG] Error with something"
|
||||||
|
labels: await investigate, bug
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Describe the bug**
|
||||||
|
<!-- A clear and concise description of what the bug is.
|
||||||
|
请用精炼的语句准确描述你遇到的BUG。-->
|
||||||
|
|
||||||
|
**How to reproduce**
|
||||||
|
<!-- Please **provide a minimum demo** rather than
|
||||||
|
**a full project or a incomplete pages**.
|
||||||
|
Otherwise, we won't accept your request.
|
||||||
|
请提供一个 **最简单的 demo** 用于复现,而不要提供 **整个项目或者不完整的页面**,
|
||||||
|
否则我们不会受理你的问题。-->
|
||||||
|
|
||||||
|
Steps to reproduce the behavior:
|
||||||
|
<!-- 描述复现步骤 -->
|
||||||
|
|
||||||
|
1. Go to '...'
|
||||||
|
2. Click on '....'
|
||||||
|
3. Scroll down to '....'
|
||||||
|
4. Error occurred.
|
||||||
|
|
||||||
|
**Expected behavior**
|
||||||
|
<!-- A clear and concise description of what you expected to happen.
|
||||||
|
描述你期望的行为。-->
|
||||||
|
|
||||||
|
**Screenshots (If contains)**
|
||||||
|
<!-- If applicable, add screenshots to help explain your problem.
|
||||||
|
如有相关截图,请提供它们用于解释问题所在。-->
|
||||||
|
|
||||||
|
**Version information**
|
||||||
|
- Device: *e.g. iPhone X*
|
||||||
|
- OS: *e.g. iOS 14.7.1*
|
||||||
|
- Package Version: *e.g. v1.0.9*
|
||||||
|
- Flutter Version: *e.g. v2.8.0*
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
<!-- Add any other context about the problem here.
|
||||||
|
在此提供更多的内容。 -->
|
||||||
30
.github/ISSUE_TEMPLATE/feature-request.md
vendored
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
---
|
||||||
|
name: Feature request (功能请求)
|
||||||
|
about: Request a new feature that the package didn't include. (请求一个依赖并未包含的功能)
|
||||||
|
title: "[Feature] Request a feature with something"
|
||||||
|
labels: feature, await investigate
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Version information**
|
||||||
|
- Device: *e.g. iPhone X*
|
||||||
|
- OS: *e.g. iOS 14.7.1*
|
||||||
|
- Package Version: *e.g. v1.0.9*
|
||||||
|
- Flutter Version: *e.g. v2.8.0*
|
||||||
|
|
||||||
|
**Is your feature request related to a problem?**
|
||||||
|
<!-- A clear and concise description if it's related to an exist problem.
|
||||||
|
如果与已有问题有关,请准确描述。-->
|
||||||
|
|
||||||
|
**Describe the solution you'd like**
|
||||||
|
<!-- A clear and concise description of what you want to happen.
|
||||||
|
描述你期望的解决方案。-->
|
||||||
|
|
||||||
|
**Describe alternatives you've considered**
|
||||||
|
<!-- A clear and concise description of any alternative solutions
|
||||||
|
or features you've considered.
|
||||||
|
准确描述其他解决方案或你的疑虑。 -->
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
<!-- Add any other context or screenshots about the feature request here.
|
||||||
|
请提供任何你认为需要的附加内容。 -->
|
||||||
27
.github/workflows/stale.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
|
||||||
|
#
|
||||||
|
# You can adjust the behavior by modifying this file.
|
||||||
|
# For more information, see:
|
||||||
|
# https://github.com/actions/stale
|
||||||
|
name: Mark stale issues and pull requests
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '33 21 * * *'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
stale:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/stale@v3
|
||||||
|
with:
|
||||||
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
stale-issue-message: 'Stale issue message'
|
||||||
|
stale-pr-message: 'Stale pull request message'
|
||||||
|
stale-issue-label: 'no-issue-activity'
|
||||||
|
stale-pr-label: 'no-pr-activity'
|
||||||
461
.idea/dbnavigator.xml
generated
Normal file
@@ -0,0 +1,461 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="DBNavigator.Project.DataEditorManager">
|
||||||
|
<record-view-column-sorting-type value="BY_INDEX" />
|
||||||
|
<value-preview-text-wrapping value="false" />
|
||||||
|
<value-preview-pinned value="false" />
|
||||||
|
</component>
|
||||||
|
<component name="DBNavigator.Project.DataExportManager">
|
||||||
|
<export-instructions>
|
||||||
|
<create-header value="true" />
|
||||||
|
<friendly-headers value="false" />
|
||||||
|
<quote-values-containing-separator value="true" />
|
||||||
|
<quote-all-values value="false" />
|
||||||
|
<value-separator value="" />
|
||||||
|
<file-name value="" />
|
||||||
|
<file-location value="" />
|
||||||
|
<scope value="GLOBAL" />
|
||||||
|
<destination value="FILE" />
|
||||||
|
<format value="EXCEL" />
|
||||||
|
<charset value="UTF-8" />
|
||||||
|
</export-instructions>
|
||||||
|
</component>
|
||||||
|
<component name="DBNavigator.Project.DatabaseBrowserManager">
|
||||||
|
<autoscroll-to-editor value="false" />
|
||||||
|
<autoscroll-from-editor value="true" />
|
||||||
|
<show-object-properties value="true" />
|
||||||
|
<loaded-nodes />
|
||||||
|
</component>
|
||||||
|
<component name="DBNavigator.Project.DatabaseFileManager">
|
||||||
|
<open-files />
|
||||||
|
</component>
|
||||||
|
<component name="DBNavigator.Project.EditorStateManager">
|
||||||
|
<last-used-providers />
|
||||||
|
</component>
|
||||||
|
<component name="DBNavigator.Project.ExecutionManager">
|
||||||
|
<retain-sticky-names value="false" />
|
||||||
|
</component>
|
||||||
|
<component name="DBNavigator.Project.MethodExecutionManager">
|
||||||
|
<method-browser />
|
||||||
|
<execution-history>
|
||||||
|
<group-entries value="true" />
|
||||||
|
<execution-inputs />
|
||||||
|
</execution-history>
|
||||||
|
<argument-values-cache />
|
||||||
|
</component>
|
||||||
|
<component name="DBNavigator.Project.ObjectDependencyManager">
|
||||||
|
<last-used-dependency-type value="INCOMING" />
|
||||||
|
</component>
|
||||||
|
<component name="DBNavigator.Project.ObjectQuickFilterManager">
|
||||||
|
<last-used-operator value="EQUAL" />
|
||||||
|
<filters />
|
||||||
|
</component>
|
||||||
|
<component name="DBNavigator.Project.ParserDiagnosticsManager">
|
||||||
|
<diagnostics-history />
|
||||||
|
</component>
|
||||||
|
<component name="DBNavigator.Project.ScriptExecutionManager" clear-outputs="true">
|
||||||
|
<recently-used-interfaces />
|
||||||
|
</component>
|
||||||
|
<component name="DBNavigator.Project.Settings">
|
||||||
|
<connections />
|
||||||
|
<browser-settings>
|
||||||
|
<general>
|
||||||
|
<display-mode value="TABBED" />
|
||||||
|
<navigation-history-size value="100" />
|
||||||
|
<show-object-details value="false" />
|
||||||
|
</general>
|
||||||
|
<filters>
|
||||||
|
<object-type-filter>
|
||||||
|
<object-type name="SCHEMA" enabled="true" />
|
||||||
|
<object-type name="USER" enabled="true" />
|
||||||
|
<object-type name="ROLE" enabled="true" />
|
||||||
|
<object-type name="PRIVILEGE" enabled="true" />
|
||||||
|
<object-type name="CHARSET" enabled="true" />
|
||||||
|
<object-type name="TABLE" enabled="true" />
|
||||||
|
<object-type name="VIEW" enabled="true" />
|
||||||
|
<object-type name="MATERIALIZED_VIEW" enabled="true" />
|
||||||
|
<object-type name="NESTED_TABLE" enabled="true" />
|
||||||
|
<object-type name="COLUMN" enabled="true" />
|
||||||
|
<object-type name="INDEX" enabled="true" />
|
||||||
|
<object-type name="CONSTRAINT" enabled="true" />
|
||||||
|
<object-type name="DATASET_TRIGGER" enabled="true" />
|
||||||
|
<object-type name="DATABASE_TRIGGER" enabled="true" />
|
||||||
|
<object-type name="SYNONYM" enabled="true" />
|
||||||
|
<object-type name="SEQUENCE" enabled="true" />
|
||||||
|
<object-type name="PROCEDURE" enabled="true" />
|
||||||
|
<object-type name="FUNCTION" enabled="true" />
|
||||||
|
<object-type name="PACKAGE" enabled="true" />
|
||||||
|
<object-type name="TYPE" enabled="true" />
|
||||||
|
<object-type name="TYPE_ATTRIBUTE" enabled="true" />
|
||||||
|
<object-type name="ARGUMENT" enabled="true" />
|
||||||
|
<object-type name="DIMENSION" enabled="true" />
|
||||||
|
<object-type name="CLUSTER" enabled="true" />
|
||||||
|
<object-type name="DBLINK" enabled="true" />
|
||||||
|
</object-type-filter>
|
||||||
|
</filters>
|
||||||
|
<sorting>
|
||||||
|
<object-type name="COLUMN" sorting-type="NAME" />
|
||||||
|
<object-type name="FUNCTION" sorting-type="NAME" />
|
||||||
|
<object-type name="PROCEDURE" sorting-type="NAME" />
|
||||||
|
<object-type name="ARGUMENT" sorting-type="POSITION" />
|
||||||
|
</sorting>
|
||||||
|
<default-editors>
|
||||||
|
<object-type name="VIEW" editor-type="SELECTION" />
|
||||||
|
<object-type name="PACKAGE" editor-type="SELECTION" />
|
||||||
|
<object-type name="TYPE" editor-type="SELECTION" />
|
||||||
|
</default-editors>
|
||||||
|
</browser-settings>
|
||||||
|
<navigation-settings>
|
||||||
|
<lookup-filters>
|
||||||
|
<lookup-objects>
|
||||||
|
<object-type name="SCHEMA" enabled="true" />
|
||||||
|
<object-type name="USER" enabled="false" />
|
||||||
|
<object-type name="ROLE" enabled="false" />
|
||||||
|
<object-type name="PRIVILEGE" enabled="false" />
|
||||||
|
<object-type name="CHARSET" enabled="false" />
|
||||||
|
<object-type name="TABLE" enabled="true" />
|
||||||
|
<object-type name="VIEW" enabled="true" />
|
||||||
|
<object-type name="MATERIALIZED VIEW" enabled="true" />
|
||||||
|
<object-type name="INDEX" enabled="true" />
|
||||||
|
<object-type name="CONSTRAINT" enabled="true" />
|
||||||
|
<object-type name="DATASET TRIGGER" enabled="true" />
|
||||||
|
<object-type name="DATABASE TRIGGER" enabled="true" />
|
||||||
|
<object-type name="SYNONYM" enabled="false" />
|
||||||
|
<object-type name="SEQUENCE" enabled="true" />
|
||||||
|
<object-type name="PROCEDURE" enabled="true" />
|
||||||
|
<object-type name="FUNCTION" enabled="true" />
|
||||||
|
<object-type name="PACKAGE" enabled="true" />
|
||||||
|
<object-type name="TYPE" enabled="true" />
|
||||||
|
<object-type name="DIMENSION" enabled="false" />
|
||||||
|
<object-type name="CLUSTER" enabled="false" />
|
||||||
|
<object-type name="DBLINK" enabled="true" />
|
||||||
|
</lookup-objects>
|
||||||
|
<force-database-load value="false" />
|
||||||
|
<prompt-connection-selection value="true" />
|
||||||
|
<prompt-schema-selection value="true" />
|
||||||
|
</lookup-filters>
|
||||||
|
</navigation-settings>
|
||||||
|
<dataset-grid-settings>
|
||||||
|
<general>
|
||||||
|
<enable-zooming value="true" />
|
||||||
|
<enable-column-tooltip value="true" />
|
||||||
|
</general>
|
||||||
|
<sorting>
|
||||||
|
<nulls-first value="true" />
|
||||||
|
<max-sorting-columns value="4" />
|
||||||
|
</sorting>
|
||||||
|
<tracking-columns>
|
||||||
|
<columnNames value="" />
|
||||||
|
<visible value="true" />
|
||||||
|
<editable value="false" />
|
||||||
|
</tracking-columns>
|
||||||
|
</dataset-grid-settings>
|
||||||
|
<dataset-editor-settings>
|
||||||
|
<text-editor-popup>
|
||||||
|
<active value="false" />
|
||||||
|
<active-if-empty value="false" />
|
||||||
|
<data-length-threshold value="100" />
|
||||||
|
<popup-delay value="1000" />
|
||||||
|
</text-editor-popup>
|
||||||
|
<values-actions-popup>
|
||||||
|
<show-popup-button value="true" />
|
||||||
|
<element-count-threshold value="1000" />
|
||||||
|
<data-length-threshold value="250" />
|
||||||
|
</values-actions-popup>
|
||||||
|
<general>
|
||||||
|
<fetch-block-size value="100" />
|
||||||
|
<fetch-timeout value="30" />
|
||||||
|
<trim-whitespaces value="true" />
|
||||||
|
<convert-empty-strings-to-null value="true" />
|
||||||
|
<select-content-on-cell-edit value="true" />
|
||||||
|
<large-value-preview-active value="true" />
|
||||||
|
</general>
|
||||||
|
<filters>
|
||||||
|
<prompt-filter-dialog value="true" />
|
||||||
|
<default-filter-type value="BASIC" />
|
||||||
|
</filters>
|
||||||
|
<qualified-text-editor text-length-threshold="300">
|
||||||
|
<content-types>
|
||||||
|
<content-type name="Text" enabled="true" />
|
||||||
|
<content-type name="Properties" enabled="true" />
|
||||||
|
<content-type name="XML" enabled="true" />
|
||||||
|
<content-type name="DTD" enabled="true" />
|
||||||
|
<content-type name="HTML" enabled="true" />
|
||||||
|
<content-type name="XHTML" enabled="true" />
|
||||||
|
<content-type name="Java" enabled="true" />
|
||||||
|
<content-type name="SQL" enabled="true" />
|
||||||
|
<content-type name="PL/SQL" enabled="true" />
|
||||||
|
<content-type name="JSON" enabled="true" />
|
||||||
|
<content-type name="JSON5" enabled="true" />
|
||||||
|
<content-type name="Groovy" enabled="true" />
|
||||||
|
<content-type name="AIDL" enabled="true" />
|
||||||
|
<content-type name="YAML" enabled="true" />
|
||||||
|
<content-type name="Manifest" enabled="true" />
|
||||||
|
</content-types>
|
||||||
|
</qualified-text-editor>
|
||||||
|
<record-navigation>
|
||||||
|
<navigation-target value="VIEWER" />
|
||||||
|
</record-navigation>
|
||||||
|
</dataset-editor-settings>
|
||||||
|
<code-editor-settings>
|
||||||
|
<general>
|
||||||
|
<show-object-navigation-gutter value="false" />
|
||||||
|
<show-spec-declaration-navigation-gutter value="true" />
|
||||||
|
<enable-spellchecking value="true" />
|
||||||
|
<enable-reference-spellchecking value="false" />
|
||||||
|
</general>
|
||||||
|
<confirmations>
|
||||||
|
<save-changes value="false" />
|
||||||
|
<revert-changes value="true" />
|
||||||
|
</confirmations>
|
||||||
|
</code-editor-settings>
|
||||||
|
<code-completion-settings>
|
||||||
|
<filters>
|
||||||
|
<basic-filter>
|
||||||
|
<filter-element type="RESERVED_WORD" id="keyword" selected="true" />
|
||||||
|
<filter-element type="RESERVED_WORD" id="function" selected="true" />
|
||||||
|
<filter-element type="RESERVED_WORD" id="parameter" selected="true" />
|
||||||
|
<filter-element type="RESERVED_WORD" id="datatype" selected="true" />
|
||||||
|
<filter-element type="RESERVED_WORD" id="exception" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="schema" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="role" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="user" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="privilege" selected="true" />
|
||||||
|
<user-schema>
|
||||||
|
<filter-element type="OBJECT" id="table" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="view" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="materialized view" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="index" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="constraint" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="trigger" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="synonym" selected="false" />
|
||||||
|
<filter-element type="OBJECT" id="sequence" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="procedure" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="function" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="package" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="type" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="dimension" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="cluster" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="dblink" selected="true" />
|
||||||
|
</user-schema>
|
||||||
|
<public-schema>
|
||||||
|
<filter-element type="OBJECT" id="table" selected="false" />
|
||||||
|
<filter-element type="OBJECT" id="view" selected="false" />
|
||||||
|
<filter-element type="OBJECT" id="materialized view" selected="false" />
|
||||||
|
<filter-element type="OBJECT" id="index" selected="false" />
|
||||||
|
<filter-element type="OBJECT" id="constraint" selected="false" />
|
||||||
|
<filter-element type="OBJECT" id="trigger" selected="false" />
|
||||||
|
<filter-element type="OBJECT" id="synonym" selected="false" />
|
||||||
|
<filter-element type="OBJECT" id="sequence" selected="false" />
|
||||||
|
<filter-element type="OBJECT" id="procedure" selected="false" />
|
||||||
|
<filter-element type="OBJECT" id="function" selected="false" />
|
||||||
|
<filter-element type="OBJECT" id="package" selected="false" />
|
||||||
|
<filter-element type="OBJECT" id="type" selected="false" />
|
||||||
|
<filter-element type="OBJECT" id="dimension" selected="false" />
|
||||||
|
<filter-element type="OBJECT" id="cluster" selected="false" />
|
||||||
|
<filter-element type="OBJECT" id="dblink" selected="false" />
|
||||||
|
</public-schema>
|
||||||
|
<any-schema>
|
||||||
|
<filter-element type="OBJECT" id="table" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="view" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="materialized view" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="index" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="constraint" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="trigger" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="synonym" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="sequence" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="procedure" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="function" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="package" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="type" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="dimension" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="cluster" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="dblink" selected="true" />
|
||||||
|
</any-schema>
|
||||||
|
</basic-filter>
|
||||||
|
<extended-filter>
|
||||||
|
<filter-element type="RESERVED_WORD" id="keyword" selected="true" />
|
||||||
|
<filter-element type="RESERVED_WORD" id="function" selected="true" />
|
||||||
|
<filter-element type="RESERVED_WORD" id="parameter" selected="true" />
|
||||||
|
<filter-element type="RESERVED_WORD" id="datatype" selected="true" />
|
||||||
|
<filter-element type="RESERVED_WORD" id="exception" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="schema" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="user" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="role" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="privilege" selected="true" />
|
||||||
|
<user-schema>
|
||||||
|
<filter-element type="OBJECT" id="table" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="view" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="materialized view" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="index" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="constraint" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="trigger" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="synonym" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="sequence" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="procedure" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="function" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="package" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="type" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="dimension" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="cluster" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="dblink" selected="true" />
|
||||||
|
</user-schema>
|
||||||
|
<public-schema>
|
||||||
|
<filter-element type="OBJECT" id="table" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="view" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="materialized view" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="index" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="constraint" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="trigger" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="synonym" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="sequence" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="procedure" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="function" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="package" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="type" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="dimension" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="cluster" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="dblink" selected="true" />
|
||||||
|
</public-schema>
|
||||||
|
<any-schema>
|
||||||
|
<filter-element type="OBJECT" id="table" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="view" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="materialized view" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="index" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="constraint" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="trigger" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="synonym" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="sequence" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="procedure" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="function" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="package" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="type" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="dimension" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="cluster" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="dblink" selected="true" />
|
||||||
|
</any-schema>
|
||||||
|
</extended-filter>
|
||||||
|
</filters>
|
||||||
|
<sorting enabled="true">
|
||||||
|
<sorting-element type="RESERVED_WORD" id="keyword" />
|
||||||
|
<sorting-element type="RESERVED_WORD" id="datatype" />
|
||||||
|
<sorting-element type="OBJECT" id="column" />
|
||||||
|
<sorting-element type="OBJECT" id="table" />
|
||||||
|
<sorting-element type="OBJECT" id="view" />
|
||||||
|
<sorting-element type="OBJECT" id="materialized view" />
|
||||||
|
<sorting-element type="OBJECT" id="index" />
|
||||||
|
<sorting-element type="OBJECT" id="constraint" />
|
||||||
|
<sorting-element type="OBJECT" id="trigger" />
|
||||||
|
<sorting-element type="OBJECT" id="synonym" />
|
||||||
|
<sorting-element type="OBJECT" id="sequence" />
|
||||||
|
<sorting-element type="OBJECT" id="procedure" />
|
||||||
|
<sorting-element type="OBJECT" id="function" />
|
||||||
|
<sorting-element type="OBJECT" id="package" />
|
||||||
|
<sorting-element type="OBJECT" id="type" />
|
||||||
|
<sorting-element type="OBJECT" id="dimension" />
|
||||||
|
<sorting-element type="OBJECT" id="cluster" />
|
||||||
|
<sorting-element type="OBJECT" id="dblink" />
|
||||||
|
<sorting-element type="OBJECT" id="schema" />
|
||||||
|
<sorting-element type="OBJECT" id="role" />
|
||||||
|
<sorting-element type="OBJECT" id="user" />
|
||||||
|
<sorting-element type="RESERVED_WORD" id="function" />
|
||||||
|
<sorting-element type="RESERVED_WORD" id="parameter" />
|
||||||
|
</sorting>
|
||||||
|
<format>
|
||||||
|
<enforce-code-style-case value="true" />
|
||||||
|
</format>
|
||||||
|
</code-completion-settings>
|
||||||
|
<execution-engine-settings>
|
||||||
|
<statement-execution>
|
||||||
|
<fetch-block-size value="100" />
|
||||||
|
<execution-timeout value="20" />
|
||||||
|
<debug-execution-timeout value="600" />
|
||||||
|
<focus-result value="false" />
|
||||||
|
<prompt-execution value="false" />
|
||||||
|
</statement-execution>
|
||||||
|
<script-execution>
|
||||||
|
<command-line-interfaces />
|
||||||
|
<execution-timeout value="300" />
|
||||||
|
</script-execution>
|
||||||
|
<method-execution>
|
||||||
|
<execution-timeout value="30" />
|
||||||
|
<debug-execution-timeout value="600" />
|
||||||
|
<parameter-history-size value="10" />
|
||||||
|
</method-execution>
|
||||||
|
</execution-engine-settings>
|
||||||
|
<operation-settings>
|
||||||
|
<transactions>
|
||||||
|
<uncommitted-changes>
|
||||||
|
<on-project-close value="ASK" />
|
||||||
|
<on-disconnect value="ASK" />
|
||||||
|
<on-autocommit-toggle value="ASK" />
|
||||||
|
</uncommitted-changes>
|
||||||
|
<multiple-uncommitted-changes>
|
||||||
|
<on-commit value="ASK" />
|
||||||
|
<on-rollback value="ASK" />
|
||||||
|
</multiple-uncommitted-changes>
|
||||||
|
</transactions>
|
||||||
|
<session-browser>
|
||||||
|
<disconnect-session value="ASK" />
|
||||||
|
<kill-session value="ASK" />
|
||||||
|
<reload-on-filter-change value="false" />
|
||||||
|
</session-browser>
|
||||||
|
<compiler>
|
||||||
|
<compile-type value="KEEP" />
|
||||||
|
<compile-dependencies value="ASK" />
|
||||||
|
<always-show-controls value="false" />
|
||||||
|
</compiler>
|
||||||
|
<debugger>
|
||||||
|
<debugger-type value="ASK" />
|
||||||
|
<use-generic-runners value="true" />
|
||||||
|
</debugger>
|
||||||
|
</operation-settings>
|
||||||
|
<ddl-file-settings>
|
||||||
|
<extensions>
|
||||||
|
<mapping file-type-id="VIEW" extensions="vw" />
|
||||||
|
<mapping file-type-id="TRIGGER" extensions="trg" />
|
||||||
|
<mapping file-type-id="PROCEDURE" extensions="prc" />
|
||||||
|
<mapping file-type-id="FUNCTION" extensions="fnc" />
|
||||||
|
<mapping file-type-id="PACKAGE" extensions="pkg" />
|
||||||
|
<mapping file-type-id="PACKAGE_SPEC" extensions="pks" />
|
||||||
|
<mapping file-type-id="PACKAGE_BODY" extensions="pkb" />
|
||||||
|
<mapping file-type-id="TYPE" extensions="tpe" />
|
||||||
|
<mapping file-type-id="TYPE_SPEC" extensions="tps" />
|
||||||
|
<mapping file-type-id="TYPE_BODY" extensions="tpb" />
|
||||||
|
</extensions>
|
||||||
|
<general>
|
||||||
|
<lookup-ddl-files value="true" />
|
||||||
|
<create-ddl-files value="false" />
|
||||||
|
<synchronize-ddl-files value="true" />
|
||||||
|
<use-qualified-names value="false" />
|
||||||
|
<make-scripts-rerunnable value="true" />
|
||||||
|
</general>
|
||||||
|
</ddl-file-settings>
|
||||||
|
<general-settings>
|
||||||
|
<regional-settings>
|
||||||
|
<date-format value="MEDIUM" />
|
||||||
|
<number-format value="UNGROUPED" />
|
||||||
|
<locale value="SYSTEM_DEFAULT" />
|
||||||
|
<use-custom-formats value="false" />
|
||||||
|
</regional-settings>
|
||||||
|
<environment>
|
||||||
|
<environment-types>
|
||||||
|
<environment-type id="development" name="Development" description="Development environment" color="-2430209/-12296320" readonly-code="false" readonly-data="false" />
|
||||||
|
<environment-type id="integration" name="Integration" description="Integration environment" color="-2621494/-12163514" readonly-code="true" readonly-data="false" />
|
||||||
|
<environment-type id="production" name="Production" description="Productive environment" color="-11574/-10271420" readonly-code="true" readonly-data="true" />
|
||||||
|
<environment-type id="other" name="Other" description="" color="-1576/-10724543" readonly-code="false" readonly-data="false" />
|
||||||
|
</environment-types>
|
||||||
|
<visibility-settings>
|
||||||
|
<connection-tabs value="true" />
|
||||||
|
<dialog-headers value="true" />
|
||||||
|
<object-editor-tabs value="true" />
|
||||||
|
<script-editor-tabs value="false" />
|
||||||
|
<execution-result-tabs value="true" />
|
||||||
|
</visibility-settings>
|
||||||
|
</environment>
|
||||||
|
</general-settings>
|
||||||
|
</component>
|
||||||
|
<component name="DBNavigator.Project.StatementExecutionManager">
|
||||||
|
<execution-variables />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
15
.idea/flutter_openim_sdk.iml
generated
@@ -15,6 +15,21 @@
|
|||||||
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/.dart_tool" />
|
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/.dart_tool" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/.pub" />
|
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/.pub" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/build" />
|
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/build" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/.pub" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/.dart_tool" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/build" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/.pub" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/.dart_tool" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/build" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/.dart_tool" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/.pub" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/build" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/build" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/.pub" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/.dart_tool" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/.dart_tool" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/.pub" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/build" />
|
||||||
</content>
|
</content>
|
||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="inheritedJdk" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
|||||||
1
.idea/libraries/Dart_SDK.xml
generated
@@ -20,7 +20,6 @@
|
|||||||
<root url="file://$USER_HOME$/Development/flutter/bin/cache/dart-sdk/lib/typed_data" />
|
<root url="file://$USER_HOME$/Development/flutter/bin/cache/dart-sdk/lib/typed_data" />
|
||||||
<root url="file://$USER_HOME$/Development/flutter/bin/cache/dart-sdk/lib/web_audio" />
|
<root url="file://$USER_HOME$/Development/flutter/bin/cache/dart-sdk/lib/web_audio" />
|
||||||
<root url="file://$USER_HOME$/Development/flutter/bin/cache/dart-sdk/lib/web_gl" />
|
<root url="file://$USER_HOME$/Development/flutter/bin/cache/dart-sdk/lib/web_gl" />
|
||||||
<root url="file://$USER_HOME$/Development/flutter/bin/cache/dart-sdk/lib/web_sql" />
|
|
||||||
</CLASSES>
|
</CLASSES>
|
||||||
<JAVADOC />
|
<JAVADOC />
|
||||||
<SOURCES />
|
<SOURCES />
|
||||||
|
|||||||
1
.idea/misc.xml
generated
@@ -3,4 +3,5 @@
|
|||||||
<component name="FrameworkDetectionExcludesConfiguration">
|
<component name="FrameworkDetectionExcludesConfiguration">
|
||||||
<type id="android" />
|
<type id="android" />
|
||||||
</component>
|
</component>
|
||||||
|
<component name="ProjectRootManager" version="2" project-jdk-name="Android API 25 Platform" project-jdk-type="Android SDK" />
|
||||||
</project>
|
</project>
|
||||||
1
.idea/modules.xml
generated
@@ -3,6 +3,7 @@
|
|||||||
<component name="ProjectModuleManager">
|
<component name="ProjectModuleManager">
|
||||||
<modules>
|
<modules>
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/flutter_openim_sdk.iml" filepath="$PROJECT_DIR$/.idea/flutter_openim_sdk.iml" />
|
<module fileurl="file://$PROJECT_DIR$/.idea/flutter_openim_sdk.iml" filepath="$PROJECT_DIR$/.idea/flutter_openim_sdk.iml" />
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/android/flutter_openim_sdk_android.iml" filepath="$PROJECT_DIR$/android/flutter_openim_sdk_android.iml" />
|
||||||
</modules>
|
</modules>
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
309
CHANGELOG.md
@@ -1,38 +1,340 @@
|
|||||||
|
## 3.0.0
|
||||||
|
|
||||||
|
- The super update is not compatible with the previous version
|
||||||
|
|
||||||
|
|
||||||
|
## 2.3.5+4
|
||||||
|
|
||||||
|
- Fix bug
|
||||||
|
|
||||||
|
## 2.3.5+3
|
||||||
|
|
||||||
|
- Fix bug for signaling
|
||||||
|
- Add networkChanged method
|
||||||
|
- Add setListenerForService method
|
||||||
|
|
||||||
|
## 2.3.5+2
|
||||||
|
|
||||||
|
- Add onRecvMessageExtensionsAdded method for OnAdvancedMsgListener
|
||||||
|
- Add addMessageReactionExtensions method for MessageManager
|
||||||
|
- Add getMessageListSomeReactionExtensions method for MessageManager
|
||||||
|
- Add isExternal field for MessageManager
|
||||||
|
- Add isReact method field MessageManager
|
||||||
|
- Add params isExternalExtensions for initSDK
|
||||||
|
|
||||||
|
## 2.3.5+1
|
||||||
|
|
||||||
|
- Add birthTime for UserInfo
|
||||||
|
- Add setMessageKvInfoListener method for MessageManager
|
||||||
|
- Add setMessageReactionExtensions method for MessageManager
|
||||||
|
- Add deleteMessageReactionExtensions method for MessageManager
|
||||||
|
- Add getMessageListReactionExtensions method for MessageManager
|
||||||
|
- Add onRecvMessageExtensionsChanged method for OnAdvancedMsgListener
|
||||||
|
- Add onRecvMessageExtensionsDeleted method for OnAdvancedMsgListener
|
||||||
|
- Add OnMessageKvInfoListener listener
|
||||||
|
- Add class KeyValue
|
||||||
|
- Add class UserExInfo
|
||||||
|
- Add class SingleTypeKeyInfoSum
|
||||||
|
- Add class MessageKv
|
||||||
|
- Add class TypeKeySetResult
|
||||||
|
- Add class MessageTypeKeyMapping
|
||||||
|
|
||||||
|
## 2.3.5
|
||||||
|
|
||||||
|
- Add setCustomBusinessListener method for MessageManager
|
||||||
|
- Add OnCustomBusinessListener listener
|
||||||
|
- Add message encryption config
|
||||||
|
- Add message compression config
|
||||||
|
- Add setGroupMemberInfo for GroupManager
|
||||||
|
|
||||||
|
## 2.3.4+6
|
||||||
|
|
||||||
|
- Add setAppBackgroundStatus method for IMManager
|
||||||
|
|
||||||
|
## 2.3.4+5
|
||||||
|
|
||||||
|
- Fix bug
|
||||||
|
- Add setOneConversationBurnDuration method for ConversationManager
|
||||||
|
- Add signalingSendCustomSignal method for SignalingManager
|
||||||
|
- Add onReceiveCustomSignal listener for OnSignalingListener
|
||||||
|
- Add burnDuration field for ConversationInfo
|
||||||
|
- Add burnDuration field for AttachedInfoElem
|
||||||
|
|
||||||
|
## 2.3.4+4
|
||||||
|
|
||||||
|
- Fix bug
|
||||||
|
- Replace maven repository address
|
||||||
|
|
||||||
|
## 2.3.4+3
|
||||||
|
|
||||||
|
- Fix bug
|
||||||
|
|
||||||
|
## 2.3.4+2
|
||||||
|
|
||||||
|
- Add streamChangedEvent listener for OnSignalingListener
|
||||||
|
- Add signalingJoinMeeting method for SignalingManager
|
||||||
|
- Add signalingCreateMeeting method for SignalingManager
|
||||||
|
- Add signalingOperateStream method for SignalingManager
|
||||||
|
- Add signalingGetMeetings method for SignalingManager
|
||||||
|
- Add signalingCloseRoom method for SignalingManager
|
||||||
|
- Add signalingUpdateMeetingInfo method for SignalingManager
|
||||||
|
- Update findMessageList method
|
||||||
|
- Add sendMessageNotOss method for MessageManager
|
||||||
|
- Add createImageMessageByURL method for MessageManager
|
||||||
|
- Add createSoundMessageByURL method for MessageManager
|
||||||
|
- Add createVideoMessageByURL method for MessageManager
|
||||||
|
- Add createFileMessageByURL method for MessageManager
|
||||||
|
|
||||||
|
## 2.3.4+1
|
||||||
|
|
||||||
|
- Add signalingGetTokenByRoomID method for SignalingManager
|
||||||
|
|
||||||
|
## 2.3.4
|
||||||
|
|
||||||
|
- Fix bug
|
||||||
|
- Add signalGetRoomByGroupID method for SignalingManager
|
||||||
|
- Add class RoomCallingInfo
|
||||||
|
- Add onRoomParticipantConnected listener for OnSignalingListener
|
||||||
|
- Add onRoomParticipantDisconnected listener for OnSignalingListener
|
||||||
|
- Add busyLineUserIDList field for SignalingCertificate
|
||||||
|
|
||||||
|
## 2.3.3
|
||||||
|
|
||||||
|
- Fix bug
|
||||||
|
|
||||||
|
## 2.3.2
|
||||||
|
|
||||||
|
- Fix bug
|
||||||
|
- Add createAdvancedQuoteMessage method for MessageManager
|
||||||
|
- Add createAdvancedTextMessage method for MessageManager
|
||||||
|
|
||||||
|
## 2.3.0+1
|
||||||
|
|
||||||
|
- Fix bug
|
||||||
|
- enum class MessageType new add customMsgNotTriggerConversation
|
||||||
|
- enum class MessageType new add customMsgOnlineOnly
|
||||||
|
- class IMManager new add updateFcmToken method
|
||||||
|
- class MessageManager new add findMessageList method
|
||||||
|
- initSDK method add encryptionKey param
|
||||||
|
|
||||||
|
## 2.3.0
|
||||||
|
|
||||||
|
- Fix bug
|
||||||
|
- Super group
|
||||||
|
- Add setGroupLookMemberInfo method for GroupManager
|
||||||
|
- Add setGroupApplyMemberFriend method for GroupManager
|
||||||
|
- Add getGroupOwnerAndAdmin method for GroupManager
|
||||||
|
- Add revokeMessageV2 method for MessageManager
|
||||||
|
- Add lookMemberInfo field for GroupInfo
|
||||||
|
- Add applyMemberFriend field for GroupInfo
|
||||||
|
- Add notificationUpdateTime field for GroupInfo
|
||||||
|
- Add notificationUserID field for GroupInfo
|
||||||
|
- Add inviterUserID field for GroupMembersInfo
|
||||||
|
- Add joinSource field for joinGroup method
|
||||||
|
- Add advanced revoke type
|
||||||
|
- Add recvMessageRevokedV2 callback for OnAdvancedMsgListener
|
||||||
|
- Add joinSource field for GroupApplicationInfo
|
||||||
|
- Add inviterUserID field for GroupApplicationInfo
|
||||||
|
- Add getAdvancedHistoryMessageList method for MessageManager
|
||||||
|
- Add searchGroupMembers method for GroupManager
|
||||||
|
|
||||||
|
## 2.2.0
|
||||||
|
|
||||||
|
1.Fix bug </br>
|
||||||
|
|
||||||
|
## 2.1.0+1
|
||||||
|
|
||||||
|
1.Add setGroupVerification method </br>
|
||||||
|
|
||||||
|
## 2.1.0
|
||||||
|
|
||||||
|
1.Fix bug </br>
|
||||||
|
2.Add getGroupMemberListByJoinTime method </br>
|
||||||
|
3.Add groupMemberCount field </br>
|
||||||
|
|
||||||
|
## 2.0.9+3
|
||||||
|
|
||||||
|
1.Fix bug </br>
|
||||||
|
2.Add setGlobalRecvMessageOpt method </br>
|
||||||
|
|
||||||
|
## 2.0.9+2
|
||||||
|
|
||||||
|
1.Fix bug </br>
|
||||||
|
2.Add searchOrganization method </br>
|
||||||
|
3.Add searchFriends method </br>
|
||||||
|
4.Add getDepartmentInfo method </br>
|
||||||
|
5.Add setGroupMemberRoleLevel method </br>
|
||||||
|
|
||||||
|
## 2.0.9+1
|
||||||
|
|
||||||
|
1.Fix bug </br>
|
||||||
|
|
||||||
|
## 2.0.9
|
||||||
|
|
||||||
|
1.Fix bug </br>
|
||||||
|
2.Add organization fuction </br>
|
||||||
|
3.Add uploadImage method </br>
|
||||||
|
4.Fix login slow bug </br>
|
||||||
|
|
||||||
|
## 2.0.8
|
||||||
|
|
||||||
|
1.Fix bug </br>
|
||||||
|
2.Change the sdk maven address </br>
|
||||||
|
3.Sync go IM sdk version number </br>
|
||||||
|
|
||||||
|
## 2.0.0+6
|
||||||
|
|
||||||
|
1.Fix bug </br>
|
||||||
|
2.Adapter ios emulator </br>
|
||||||
|
3.Add modify group nickname </br>
|
||||||
|
4.Update at message </br>
|
||||||
|
5.ConverstaionInfo new add isNotInGroup field</br>
|
||||||
|
6.Add at type </br>
|
||||||
|
7.Add work moments </br>
|
||||||
|
8.Add global search </br>
|
||||||
|
9.Add getHistoryMessageListReverse method </br>
|
||||||
|
10.Add getAtAllTag method </br>
|
||||||
|
11.Add resetConversationGroupAtType method </br>
|
||||||
|
12.Add searchGroups method </br>
|
||||||
|
|
||||||
|
## 2.0.0+5
|
||||||
|
|
||||||
|
1.Add notification parse </br>
|
||||||
|
2.Add deleteConversationFromLocalAndSvr method </br>
|
||||||
|
3.Add deleteMessageFromLocalAndSvr method </br>
|
||||||
|
4.Add deleteAllMsgFromLocal method </br>
|
||||||
|
5.Add deleteAllMsgFromLocalAndSvr method </br>
|
||||||
|
6.Add clearC2CHistoryMessageFromLocalAndSvr method </br>
|
||||||
|
7.Add clearGroupHistoryMessageFromLocalAndSvr method </br>
|
||||||
|
8.Add markMessageAsReadByConID method </br>
|
||||||
|
9.Add wakeUp method </br>
|
||||||
|
10.Add deleteAllConversationFromLocal method </br>
|
||||||
|
|
||||||
|
## 2.0.0+4
|
||||||
|
|
||||||
|
1.Add dismiss group </br>
|
||||||
|
2.Add search local message </br>
|
||||||
|
3.Add private chat </br>
|
||||||
|
4.Add group mute
|
||||||
|
|
||||||
|
## 2.0.0+3
|
||||||
|
|
||||||
|
1.Fix bug </br>
|
||||||
|
|
||||||
|
## 2.0.0+2
|
||||||
|
|
||||||
|
1.Fix some one crash </br>
|
||||||
|
2.Add signaling function </br>
|
||||||
|
3.Add group have read receipt
|
||||||
|
|
||||||
|
## 2.0.0+1
|
||||||
|
|
||||||
|
1.Fix multi-terminal synchronization bug fix for retracted messages </br>
|
||||||
|
2.Fix sending picture flashback bug </br>
|
||||||
|
3.Fix other bug
|
||||||
|
|
||||||
|
## 2.0.0
|
||||||
|
|
||||||
|
1.Refactor mobile sdk, server sdk (2022-2-21)
|
||||||
|
|
||||||
|
## 1.1.1
|
||||||
|
|
||||||
|
1.Update sdk maven url
|
||||||
|
|
||||||
|
## 1.1.0
|
||||||
|
|
||||||
|
1.Fix the problem of missing id in ios message progress
|
||||||
|
|
||||||
|
## 1.0.9
|
||||||
|
|
||||||
|
1.Upgrade sdk to 1.4.5.
|
||||||
|
|
||||||
|
## 1.0.8
|
||||||
|
|
||||||
|
1.Upgrade sdk to 1.4.4. </br>
|
||||||
|
2.Add changed conversation return changed data and no longer return all data. </br>
|
||||||
|
3.Add conversation paging method.
|
||||||
|
|
||||||
|
## 1.0.7
|
||||||
|
|
||||||
|
Upgrade sdk to 1.3.4 </br>
|
||||||
|
Add method setConversationRecvMessageOpt and getConversationRecvMessageOpt
|
||||||
|
|
||||||
|
## 1.0.6
|
||||||
|
|
||||||
|
Upgrade sdk to 1.2.9
|
||||||
|
|
||||||
|
## 1.0.5
|
||||||
|
|
||||||
|
Upgrade sdk to 1.2.8
|
||||||
|
|
||||||
|
## 1.0.4
|
||||||
|
|
||||||
|
New add clear c2c message and group message </br>
|
||||||
|
Update sdk to 1.1.9
|
||||||
|
|
||||||
|
## 1.0.3
|
||||||
|
|
||||||
|
Fix android message error bug </br>
|
||||||
|
Update SDK to 1.1.5 </br>
|
||||||
|
|
||||||
|
## 1.0.2
|
||||||
|
|
||||||
|
Upgrade sdk </br>
|
||||||
|
|
||||||
|
1. Android to 1.1.3 </br>
|
||||||
|
2. Ios replace framework </br>
|
||||||
|
|
||||||
|
## 1.0.1
|
||||||
|
|
||||||
|
Fix bug
|
||||||
|
|
||||||
## 1.0.0
|
## 1.0.0
|
||||||
|
|
||||||
Fix bug
|
Fix bug
|
||||||
|
|
||||||
## 0.0.9+5
|
## 0.0.9+5
|
||||||
|
|
||||||
1. Android upgrade sdk to 0.0.17 </br>
|
1. Android upgrade sdk to 0.0.17 </br>
|
||||||
2. New add createFileMessageFromFullPath method
|
2. Add createFileMessageFromFullPath method
|
||||||
|
|
||||||
## 0.0.9+4
|
## 0.0.9+4
|
||||||
|
|
||||||
Fix ios friendship params error
|
Fix ios friendship params error
|
||||||
|
|
||||||
## 0.0.9+3
|
## 0.0.9+3
|
||||||
|
|
||||||
Ios native remove method 'removeAdvancedMsgListener'
|
Ios native remove method 'removeAdvancedMsgListener'
|
||||||
|
|
||||||
## 0.0.9+2
|
## 0.0.9+2
|
||||||
|
|
||||||
1. Fix bug
|
1. Fix bug
|
||||||
2. Upgrade sdk
|
2. Upgrade sdk
|
||||||
|
|
||||||
## 0.0.9+1
|
## 0.0.9+1
|
||||||
|
|
||||||
Fix bug
|
Fix bug
|
||||||
|
|
||||||
## 0.0.9
|
## 0.0.9
|
||||||
|
|
||||||
Add ios support
|
Add ios support
|
||||||
|
|
||||||
## 0.0.8
|
## 0.0.8
|
||||||
|
|
||||||
Upgrade sdk to 0.0.14 </br>
|
Upgrade sdk to 0.0.14 </br>
|
||||||
Sending a message adds a retry mechanism
|
Sending a message adds a retry mechanism
|
||||||
|
|
||||||
## 0.0.7
|
## 0.0.7
|
||||||
|
|
||||||
1. Add a new method to obtain conversation id based on user id or group id </br>
|
1. Add a new method to obtain conversation id based on user id or group id </br>
|
||||||
2. Modify the type of conversation manager input parameter sessionType to int
|
2. Modify the type of conversation manager input parameter sessionType to int
|
||||||
|
|
||||||
## 0.0.6
|
## 0.0.6
|
||||||
|
|
||||||
Fix bug
|
Fix bug
|
||||||
|
|
||||||
## 0.0.5
|
## 0.0.5
|
||||||
|
|
||||||
Upgrade sdk </br>
|
Upgrade sdk </br>
|
||||||
Fix message error bug
|
Fix message error bug
|
||||||
|
|
||||||
@@ -41,11 +343,14 @@ Fix message error bug
|
|||||||
Replace the input parameters of the createCustomMessage method from Uint8List to Map
|
Replace the input parameters of the createCustomMessage method from Uint8List to Map
|
||||||
|
|
||||||
## 0.0.3
|
## 0.0.3
|
||||||
|
|
||||||
Upgrade sdk </br>
|
Upgrade sdk </br>
|
||||||
Fix bug </br>
|
Fix bug </br>
|
||||||
|
|
||||||
## 0.0.2
|
## 0.0.2
|
||||||
1. Move the markSingleMessageHasRead, markGroupMessageHasRead and getTotalUnreadMsgCount methods from the MessageManager class to the ConversationManager class. </br>
|
|
||||||
|
1. Move the markSingleMessageHasRead, markGroupMessageHasRead and getTotalUnreadMsgCount methods
|
||||||
|
from the MessageManager class to the ConversationManager class. </br>
|
||||||
2. Modify the parameters of the setFriendInfo method. </br>
|
2. Modify the parameters of the setFriendInfo method. </br>
|
||||||
3. Modify the parameters of the createGroup and setGroupInfo methods.
|
3. Modify the parameters of the createGroup and setGroupInfo methods.
|
||||||
|
|
||||||
|
|||||||
2122
README.zh-cn.md
@@ -1,37 +1,35 @@
|
|||||||
group 'io.openim.flutter_openim_sdk'
|
group 'io.openim.flutter_openim_sdk'
|
||||||
version '1.0'
|
version '1.0'
|
||||||
|
|
||||||
|
def dir = getCurrentProjectDir()
|
||||||
|
|
||||||
|
// 将aar放到libs,本地仓库替换远程仓库
|
||||||
|
def getCurrentProjectDir() {
|
||||||
|
String result = ""
|
||||||
|
rootProject.allprojects { project ->
|
||||||
|
if (project.properties.get("name").toString() == "flutter_openim_sdk") {
|
||||||
|
result = project.properties.get("projectDir").toString()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
|
|
||||||
maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter' }
|
|
||||||
maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' }
|
|
||||||
maven { url 'https://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
|
|
||||||
maven {
|
|
||||||
allowInsecureProtocol = true
|
|
||||||
url 'http://47.112.160.66:8081/repository/maven-releases'
|
|
||||||
}
|
|
||||||
// maven { url 'https://127.0.0.1:8081/repository/maven-releases' }
|
|
||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.5.1'
|
classpath 'com.android.tools.build:gradle:3.5.4'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rootProject.allprojects {
|
rootProject.allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
|
// 将aar放到libs,本地仓库替换远程仓库
|
||||||
maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter' }
|
// maven { url "$dir/libs" }
|
||||||
maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' }
|
maven { url 'https://open-im-online.rentsoft.cn:51000/repository/maven2/' }
|
||||||
maven { url 'https://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
|
|
||||||
maven {
|
|
||||||
allowInsecureProtocol = true
|
|
||||||
url 'http://47.112.160.66:8081/repository/maven-releases'
|
|
||||||
}
|
|
||||||
// maven { url 'http://127.0.0.1:8081/repository/maven-releases' }
|
|
||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
@@ -50,6 +48,9 @@ android {
|
|||||||
targetCompatibility JavaVersion.VERSION_1_8
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'io.openim:client-sdk:1.0.9@aar'
|
// 本地依赖,现将aar复制到libs/io/openim/core-sdk/0.0.1/ 下,命名core-sdk-0.0.1.aar
|
||||||
|
// implementation 'io.openim:core-sdk:0.0.1@aar'
|
||||||
|
implementation 'io.openim:core-sdk:3.2.0-alpha.0@aar'
|
||||||
}
|
}
|
||||||
9
android/libs/io/openim/core-sdk/0.0.1/core-sdk-0.0.1.pom
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<groupId>io.openim</groupId>
|
||||||
|
<artifactId>core-sdk</artifactId>
|
||||||
|
<version>0.0.1</version>
|
||||||
|
</project>
|
||||||
@@ -1,3 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="io.openim.flutter_openim_sdk">
|
package="io.openim.flutter_openim_sdk">
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
</manifest>
|
</manifest>
|
||||||
@@ -1,59 +1,71 @@
|
|||||||
package io.openim.flutter_openim_sdk;
|
package io.openim.flutter_openim_sdk;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
|
||||||
import io.flutter.Log;
|
import io.flutter.Log;
|
||||||
import io.flutter.embedding.engine.plugins.FlutterPlugin;
|
import io.flutter.embedding.engine.plugins.FlutterPlugin;
|
||||||
|
import io.flutter.embedding.engine.plugins.activity.ActivityAware;
|
||||||
|
import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding;
|
||||||
import io.flutter.plugin.common.MethodCall;
|
import io.flutter.plugin.common.MethodCall;
|
||||||
import io.flutter.plugin.common.MethodChannel;
|
import io.flutter.plugin.common.MethodChannel;
|
||||||
import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
|
import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
|
||||||
import io.flutter.plugin.common.MethodChannel.Result;
|
import io.flutter.plugin.common.MethodChannel.Result;
|
||||||
|
import io.openim.flutter_openim_sdk.connectivity.ConnectivityListener;
|
||||||
|
import io.openim.flutter_openim_sdk.connectivity.VisibilityListener;
|
||||||
import io.openim.flutter_openim_sdk.manager.ConversationManager;
|
import io.openim.flutter_openim_sdk.manager.ConversationManager;
|
||||||
import io.openim.flutter_openim_sdk.manager.FriendshipManager;
|
import io.openim.flutter_openim_sdk.manager.FriendshipManager;
|
||||||
import io.openim.flutter_openim_sdk.manager.GroupManager;
|
import io.openim.flutter_openim_sdk.manager.GroupManager;
|
||||||
import io.openim.flutter_openim_sdk.manager.IMManager;
|
import io.openim.flutter_openim_sdk.manager.IMManager;
|
||||||
import io.openim.flutter_openim_sdk.manager.MessageManager;
|
import io.openim.flutter_openim_sdk.manager.MessageManager;
|
||||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
import io.openim.flutter_openim_sdk.manager.UserManager;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* FlutterOpenimSdkPlugin
|
* FlutterOpenimSdkPlugin
|
||||||
*/
|
*/
|
||||||
public class FlutterOpenimSdkPlugin implements FlutterPlugin, MethodCallHandler {
|
public class FlutterOpenimSdkPlugin implements FlutterPlugin, MethodCallHandler, ActivityAware {
|
||||||
/// The MethodChannel that will the communication between Flutter and native Android
|
/// The MethodChannel that will the communication between Flutter and native Android
|
||||||
///
|
///
|
||||||
/// This local reference serves to register the plugin with the Flutter Engine and unregister it
|
/// This local reference serves to register the plugin with the Flutter Engine and unregister it
|
||||||
/// when the Flutter Engine is detached from the Activity
|
/// when the Flutter Engine is detached from the Activity
|
||||||
|
private static final String CHANNEL_NAME = "flutter_openim_sdk";
|
||||||
public static MethodChannel channel;
|
public static MethodChannel channel;
|
||||||
private static IMManager imManager;
|
private static IMManager imManager;
|
||||||
|
private static UserManager userManager;
|
||||||
private static FriendshipManager friendshipManager;
|
private static FriendshipManager friendshipManager;
|
||||||
private static MessageManager messageManager;
|
private static MessageManager messageManager;
|
||||||
private static ConversationManager conversationManager;
|
private static ConversationManager conversationManager;
|
||||||
private static GroupManager groupManager;
|
private static GroupManager groupManager;
|
||||||
|
private static Activity activity;
|
||||||
|
private static Context context;
|
||||||
|
private ConnectivityListener connectivityListener;
|
||||||
|
private VisibilityListener visibilityListener;
|
||||||
|
public static boolean isInitialized;
|
||||||
|
|
||||||
public FlutterOpenimSdkPlugin() {
|
public FlutterOpenimSdkPlugin() {
|
||||||
}
|
|
||||||
|
|
||||||
private FlutterOpenimSdkPlugin(Context context) {
|
|
||||||
FlutterOpenimSdkPlugin.imManager = new IMManager();
|
FlutterOpenimSdkPlugin.imManager = new IMManager();
|
||||||
|
FlutterOpenimSdkPlugin.userManager = new UserManager();
|
||||||
FlutterOpenimSdkPlugin.friendshipManager = new FriendshipManager();
|
FlutterOpenimSdkPlugin.friendshipManager = new FriendshipManager();
|
||||||
FlutterOpenimSdkPlugin.messageManager = new MessageManager();
|
FlutterOpenimSdkPlugin.messageManager = new MessageManager();
|
||||||
FlutterOpenimSdkPlugin.conversationManager = new ConversationManager();
|
FlutterOpenimSdkPlugin.conversationManager = new ConversationManager();
|
||||||
FlutterOpenimSdkPlugin.groupManager = new GroupManager();
|
FlutterOpenimSdkPlugin.groupManager = new GroupManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onAttachedToEngine(@NonNull FlutterPluginBinding flutterPluginBinding) {
|
public void onAttachedToEngine(@NonNull FlutterPluginBinding flutterPluginBinding) {
|
||||||
FlutterOpenimSdkPlugin.channel = new MethodChannel(flutterPluginBinding.getBinaryMessenger(), "flutter_openim_sdk");
|
channel = new MethodChannel(flutterPluginBinding.getBinaryMessenger(), CHANNEL_NAME);
|
||||||
FlutterOpenimSdkPlugin.channel.setMethodCallHandler(new FlutterOpenimSdkPlugin(flutterPluginBinding.getApplicationContext()));
|
context = flutterPluginBinding.getApplicationContext();
|
||||||
// channel.setMethodCallHandler(this);
|
channel.setMethodCallHandler(this);
|
||||||
|
connectivityListener = new ConnectivityListener(context);
|
||||||
|
visibilityListener = new VisibilityListener();
|
||||||
|
connectivityListener.register();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -64,22 +76,40 @@ public class FlutterOpenimSdkPlugin implements FlutterPlugin, MethodCallHandler
|
|||||||
@Override
|
@Override
|
||||||
public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) {
|
public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) {
|
||||||
FlutterOpenimSdkPlugin.channel.setMethodCallHandler(null);
|
FlutterOpenimSdkPlugin.channel.setMethodCallHandler(null);
|
||||||
|
connectivityListener.unregisterReceiver();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAttachedToActivity(@NonNull ActivityPluginBinding binding) {
|
||||||
|
visibilityListener.register(activity = binding.getActivity());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDetachedFromActivityForConfigChanges() {
|
||||||
|
visibilityListener.unregisterReceiver(activity);
|
||||||
|
activity = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onReattachedToActivityForConfigChanges(@NonNull ActivityPluginBinding binding) {
|
||||||
|
visibilityListener.register(activity = binding.getActivity());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDetachedFromActivity() {
|
||||||
|
visibilityListener.unregisterReceiver(activity);
|
||||||
|
activity = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
void parse(@NonNull MethodCall call, @NonNull Result result) {
|
void parse(@NonNull MethodCall call, @NonNull Result result) {
|
||||||
try {
|
try {
|
||||||
String managerName = CommonUtil.getParamValue(call, "ManagerName");
|
String managerName = call.argument("ManagerName");
|
||||||
Field field = FlutterOpenimSdkPlugin.class.getDeclaredField(managerName);
|
Field field = FlutterOpenimSdkPlugin.class.getDeclaredField(managerName);
|
||||||
Method method = field.get(new Object()).getClass().getDeclaredMethod(call.method, MethodCall.class, Result.class);
|
Method method = field.get(new Object()).getClass().getDeclaredMethod(call.method, MethodCall.class, Result.class);
|
||||||
Log.i("F-OpenIMSDK(flutter call native)", "{ class:" + managerName + ", method:" + method.getName() + " }");
|
Log.i("F-OpenIMSDK(flutter call native)", "{ class:" + managerName + ", method:" + method.getName() + " }");
|
||||||
method.invoke(field.get(new Object()), call, result);
|
method.invoke(field.get(new Object()), call, result);
|
||||||
} catch (NoSuchFieldException e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
|
||||||
} catch (NoSuchMethodException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
} catch (IllegalAccessException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
} catch (InvocationTargetException e) {
|
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,78 @@
|
|||||||
|
package io.openim.flutter_openim_sdk.connectivity;
|
||||||
|
|
||||||
|
import android.net.ConnectivityManager;
|
||||||
|
import android.net.Network;
|
||||||
|
import android.net.NetworkCapabilities;
|
||||||
|
import android.os.Build;
|
||||||
|
|
||||||
|
public class Connectivity {
|
||||||
|
static final String CONNECTIVITY_NONE = "none";
|
||||||
|
static final String CONNECTIVITY_WIFI = "wifi";
|
||||||
|
static final String CONNECTIVITY_MOBILE = "mobile";
|
||||||
|
static final String CONNECTIVITY_ETHERNET = "ethernet";
|
||||||
|
static final String CONNECTIVITY_BLUETOOTH = "bluetooth";
|
||||||
|
static final String CONNECTIVITY_VPN = "vpn";
|
||||||
|
private final ConnectivityManager connectivityManager;
|
||||||
|
|
||||||
|
public Connectivity(ConnectivityManager connectivityManager) {
|
||||||
|
this.connectivityManager = connectivityManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
String getNetworkType() {
|
||||||
|
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||||
|
Network network = connectivityManager.getActiveNetwork();
|
||||||
|
NetworkCapabilities capabilities = connectivityManager.getNetworkCapabilities(network);
|
||||||
|
if (capabilities == null) {
|
||||||
|
return CONNECTIVITY_NONE;
|
||||||
|
}
|
||||||
|
if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_WIFI)) {
|
||||||
|
return CONNECTIVITY_WIFI;
|
||||||
|
}
|
||||||
|
if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_ETHERNET)) {
|
||||||
|
return CONNECTIVITY_ETHERNET;
|
||||||
|
}
|
||||||
|
if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_VPN)) {
|
||||||
|
return CONNECTIVITY_VPN;
|
||||||
|
}
|
||||||
|
if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)) {
|
||||||
|
return CONNECTIVITY_MOBILE;
|
||||||
|
}
|
||||||
|
if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_BLUETOOTH)) {
|
||||||
|
return CONNECTIVITY_BLUETOOTH;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return getNetworkTypeLegacy();
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
|
private String getNetworkTypeLegacy() {
|
||||||
|
// handle type for Android versions less than Android 6
|
||||||
|
android.net.NetworkInfo info = connectivityManager.getActiveNetworkInfo();
|
||||||
|
if (info == null || !info.isConnected()) {
|
||||||
|
return CONNECTIVITY_NONE;
|
||||||
|
}
|
||||||
|
int type = info.getType();
|
||||||
|
switch (type) {
|
||||||
|
case ConnectivityManager.TYPE_BLUETOOTH:
|
||||||
|
return CONNECTIVITY_BLUETOOTH;
|
||||||
|
case ConnectivityManager.TYPE_ETHERNET:
|
||||||
|
return CONNECTIVITY_ETHERNET;
|
||||||
|
case ConnectivityManager.TYPE_WIFI:
|
||||||
|
case ConnectivityManager.TYPE_WIMAX:
|
||||||
|
return CONNECTIVITY_WIFI;
|
||||||
|
case ConnectivityManager.TYPE_VPN:
|
||||||
|
return CONNECTIVITY_VPN;
|
||||||
|
case ConnectivityManager.TYPE_MOBILE:
|
||||||
|
case ConnectivityManager.TYPE_MOBILE_DUN:
|
||||||
|
case ConnectivityManager.TYPE_MOBILE_HIPRI:
|
||||||
|
return CONNECTIVITY_MOBILE;
|
||||||
|
default:
|
||||||
|
return CONNECTIVITY_NONE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public ConnectivityManager getConnectivityManager() {
|
||||||
|
return connectivityManager;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
package io.openim.flutter_openim_sdk.connectivity;
|
||||||
|
|
||||||
|
|
||||||
|
import android.content.BroadcastReceiver;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.IntentFilter;
|
||||||
|
import android.net.ConnectivityManager;
|
||||||
|
import android.net.Network;
|
||||||
|
import android.os.Build;
|
||||||
|
|
||||||
|
import io.flutter.Log;
|
||||||
|
import io.openim.flutter_openim_sdk.FlutterOpenimSdkPlugin;
|
||||||
|
import open_im_sdk.Open_im_sdk;
|
||||||
|
|
||||||
|
|
||||||
|
public class ConnectivityListener implements open_im_sdk_callback.Base {
|
||||||
|
public static final String CONNECTIVITY_ACTION = "android.net.conn.CONNECTIVITY_CHANGE";
|
||||||
|
private Context context;
|
||||||
|
private ConnectivityManager connectivityManager;
|
||||||
|
private Connectivity connectivity;
|
||||||
|
private ConnectivityBroadcastReceiver receiver;
|
||||||
|
private ConnectivityManager.NetworkCallback networkCallback;
|
||||||
|
|
||||||
|
public ConnectivityListener(Context context) {
|
||||||
|
this.context = context;
|
||||||
|
this.connectivityManager =
|
||||||
|
(ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||||
|
this.connectivity = new Connectivity(connectivityManager);
|
||||||
|
this.receiver = new ConnectivityBroadcastReceiver(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void onChangedNetworkStatus() {
|
||||||
|
String status = connectivity.getNetworkType();
|
||||||
|
if (Connectivity.CONNECTIVITY_MOBILE.equals(status) || Connectivity.CONNECTIVITY_WIFI.equals(status)) {
|
||||||
|
Log.i("ConnectivityListener", "networkStatusChanged: " + status);
|
||||||
|
if (FlutterOpenimSdkPlugin.isInitialized) {
|
||||||
|
Open_im_sdk.networkStatusChanged(this, String.valueOf(System.currentTimeMillis()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void register() {
|
||||||
|
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||||
|
networkCallback = new ConnectivityManager.NetworkCallback() {
|
||||||
|
@Override
|
||||||
|
public void onAvailable(Network network) {
|
||||||
|
onChangedNetworkStatus();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLost(Network network) {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
connectivity.getConnectivityManager().registerDefaultNetworkCallback(networkCallback);
|
||||||
|
} else {
|
||||||
|
context.registerReceiver(receiver, new IntentFilter(CONNECTIVITY_ACTION));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void unregisterReceiver() {
|
||||||
|
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||||
|
if (networkCallback != null) {
|
||||||
|
connectivity.getConnectivityManager().unregisterNetworkCallback(networkCallback);
|
||||||
|
networkCallback = null;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
context.unregisterReceiver(receiver);
|
||||||
|
receiver = null;
|
||||||
|
} catch (Exception e) {
|
||||||
|
//listen never called, ignore the error
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(int i, String s) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess(String s) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class ConnectivityBroadcastReceiver extends BroadcastReceiver {
|
||||||
|
ConnectivityListener listener;
|
||||||
|
|
||||||
|
public ConnectivityBroadcastReceiver(ConnectivityListener listener) {
|
||||||
|
this.listener = listener;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onReceive(Context context, Intent intent) {
|
||||||
|
if (null != listener && CONNECTIVITY_ACTION.equals(intent.getAction())) {
|
||||||
|
listener.onChangedNetworkStatus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
package io.openim.flutter_openim_sdk.connectivity;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.app.Application;
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import io.flutter.Log;
|
||||||
|
import io.openim.flutter_openim_sdk.FlutterOpenimSdkPlugin;
|
||||||
|
import open_im_sdk.Open_im_sdk;
|
||||||
|
|
||||||
|
public class VisibilityListener implements Application.ActivityLifecycleCallbacks, open_im_sdk_callback.Base {
|
||||||
|
public void register(Activity activity) {
|
||||||
|
if (null != activity) {
|
||||||
|
activity.getApplication().registerActivityLifecycleCallbacks(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void unregisterReceiver(Activity activity) {
|
||||||
|
if (null != activity) {
|
||||||
|
activity.getApplication().unregisterActivityLifecycleCallbacks(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onActivityCreated(@NonNull Activity activity, @Nullable Bundle savedInstanceState) {
|
||||||
|
Log.i("VisibilityListener", "onActivityCreated");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onActivityStarted(@NonNull Activity activity) {
|
||||||
|
Log.i("VisibilityListener", "onActivityStarted");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onActivityResumed(@NonNull Activity activity) {
|
||||||
|
Log.i("VisibilityListener", "onActivityResumed");
|
||||||
|
if (FlutterOpenimSdkPlugin.isInitialized) {
|
||||||
|
Open_im_sdk.setAppBackgroundStatus(this, String.valueOf(System.currentTimeMillis()), false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onActivityPaused(@NonNull Activity activity) {
|
||||||
|
Log.i("VisibilityListener", "onActivityPaused");
|
||||||
|
if (FlutterOpenimSdkPlugin.isInitialized) {
|
||||||
|
Open_im_sdk.setAppBackgroundStatus(this, String.valueOf(System.currentTimeMillis()), true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onActivityStopped(@NonNull Activity activity) {
|
||||||
|
Log.i("VisibilityListener", "onActivityStopped");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onActivitySaveInstanceState(@NonNull Activity activity, @NonNull Bundle outState) {
|
||||||
|
Log.i("VisibilityListener", "onActivitySaveInstanceState");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onActivityDestroyed(@NonNull Activity activity) {
|
||||||
|
Log.i("VisibilityListener", "onActivityDestroyed");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(int i, String s) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess(String s) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
package io.openim.flutter_openim_sdk.listener;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
|
||||||
import open_im_sdk.OnAdvancedMsgListener;
|
|
||||||
|
|
||||||
public class AdvancedMsgListener implements OnAdvancedMsgListener {
|
|
||||||
final Map<String, String> values = new HashMap<>();
|
|
||||||
|
|
||||||
public AdvancedMsgListener(String listenerId) {
|
|
||||||
this.values.put("id", listenerId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onRecvC2CReadReceipt(String s) {
|
|
||||||
values.put("haveReadMessage", s);
|
|
||||||
CommonUtil.emitEvent("advancedMsgListener", "onRecvC2CReadReceipt", values);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onRecvMessageRevoked(String s) {
|
|
||||||
values.put("revokedMessage", s);
|
|
||||||
CommonUtil.emitEvent("advancedMsgListener", "onRecvMessageRevoked", values);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onRecvNewMessage(String s) {
|
|
||||||
values.put("newMessage", s);
|
|
||||||
CommonUtil.emitEvent("advancedMsgListener", "onRecvNewMessage", values);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
package io.openim.flutter_openim_sdk.listener;
|
|
||||||
|
|
||||||
|
|
||||||
import io.flutter.Log;
|
|
||||||
import io.flutter.plugin.common.MethodChannel;
|
|
||||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
|
||||||
import open_im_sdk.Base;
|
|
||||||
|
|
||||||
public class BaseListener implements Base {
|
|
||||||
|
|
||||||
MethodChannel.Result result;
|
|
||||||
|
|
||||||
public BaseListener(MethodChannel.Result result) {
|
|
||||||
this.result = result;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onError(long l, String s) {
|
|
||||||
Log.e("F-OpenIMSD(callback)", s);
|
|
||||||
CommonUtil.runMainThreadReturnError(result, l, s, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSuccess(String s) {
|
|
||||||
Log.i("F-OpenIMSDK(callback)", s);
|
|
||||||
CommonUtil.runMainThreadReturn(result, s);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
package io.openim.flutter_openim_sdk.listener;
|
|
||||||
|
|
||||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
|
||||||
import open_im_sdk.OnFriendshipListener;
|
|
||||||
|
|
||||||
public class FriendshipListener implements OnFriendshipListener {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBlackListAdd(String s) {
|
|
||||||
CommonUtil.emitEvent("friendListener", "onBlackListAdd", s);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBlackListDeleted(String s) {
|
|
||||||
CommonUtil.emitEvent("friendListener", "onBlackListDeleted", s);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFriendApplicationListAccept(String s) {
|
|
||||||
CommonUtil.emitEvent("friendListener", "onFriendApplicationListAccept", s);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFriendApplicationListAdded(String s) {
|
|
||||||
CommonUtil.emitEvent("friendListener", "onFriendApplicationListAdded", s);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFriendApplicationListDeleted(String s) {
|
|
||||||
CommonUtil.emitEvent("friendListener", "onFriendApplicationListDeleted", s);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFriendApplicationListReject(String s) {
|
|
||||||
CommonUtil.emitEvent("friendListener", "onFriendApplicationListReject", s);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFriendInfoChanged(String s) {
|
|
||||||
CommonUtil.emitEvent("friendListener", "onFriendInfoChanged", s);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFriendListAdded(String s) {
|
|
||||||
CommonUtil.emitEvent("friendListener", "onFriendListAdded", s);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFriendListDeleted(String s) {
|
|
||||||
CommonUtil.emitEvent("friendListener", "onFriendListDeleted", s);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
package io.openim.flutter_openim_sdk.listener;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
|
||||||
import open_im_sdk.OnGroupListener;
|
|
||||||
|
|
||||||
public class GroupListener implements OnGroupListener {
|
|
||||||
@Override
|
|
||||||
public void onApplicationProcessed(String s, String s1, int i, String s2) {
|
|
||||||
Map<String, Object> map = new HashMap<>();
|
|
||||||
map.put("groupId", s);
|
|
||||||
map.put("opUser", s1);
|
|
||||||
map.put("agreeOrReject", i);
|
|
||||||
map.put("opReason", s2);
|
|
||||||
CommonUtil.emitEvent("groupListener", "onApplicationProcessed", map);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onGroupCreated(String s) {
|
|
||||||
Map<String, Object> map = new HashMap<>();
|
|
||||||
map.put("groupId", s);
|
|
||||||
CommonUtil.emitEvent("groupListener", "onGroupCreated", map);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onGroupInfoChanged(String s, String s1) {
|
|
||||||
Map<String, Object> map = new HashMap<>();
|
|
||||||
map.put("groupId", s);
|
|
||||||
map.put("groupInfo", s1);
|
|
||||||
CommonUtil.emitEvent("groupListener", "onGroupInfoChanged", map);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onMemberEnter(String s, String s1) {
|
|
||||||
Map<String, Object> map = new HashMap<>();
|
|
||||||
map.put("groupId", s);
|
|
||||||
map.put("memberList", s1);
|
|
||||||
CommonUtil.emitEvent("groupListener", "onMemberEnter", map);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onMemberInvited(String s, String s1, String s2) {
|
|
||||||
Map<String, Object> map = new HashMap<>();
|
|
||||||
map.put("groupId", s);
|
|
||||||
map.put("opUser", s1);
|
|
||||||
map.put("memberList", s2);
|
|
||||||
CommonUtil.emitEvent("groupListener", "onMemberInvited", map);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onMemberKicked(String s, String s1, String s2) {
|
|
||||||
Map<String, Object> map = new HashMap<>();
|
|
||||||
map.put("groupId", s);
|
|
||||||
map.put("opUser", s1);
|
|
||||||
map.put("memberList", s2);
|
|
||||||
CommonUtil.emitEvent("groupListener", "onMemberKicked", map);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onMemberLeave(String s, String s1) {
|
|
||||||
Map<String, Object> map = new HashMap<>();
|
|
||||||
map.put("groupId", s);
|
|
||||||
map.put("member", s1);
|
|
||||||
CommonUtil.emitEvent("groupListener", "onMemberLeave", map);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onReceiveJoinApplication(String s, String s1, String s2) {
|
|
||||||
Map<String, Object> map = new HashMap<>();
|
|
||||||
map.put("groupId", s);
|
|
||||||
map.put("member", s1);
|
|
||||||
map.put("opReason", s2);
|
|
||||||
CommonUtil.emitEvent("groupListener", "onReceiveJoinApplication", map);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
package io.openim.flutter_openim_sdk.listener;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import io.flutter.plugin.common.MethodCall;
|
|
||||||
import io.flutter.plugin.common.MethodChannel;
|
|
||||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
|
||||||
import open_im_sdk.SendMsgCallBack;
|
|
||||||
|
|
||||||
public class MsgSendProgressListener implements SendMsgCallBack {
|
|
||||||
final private MethodChannel.Result result;
|
|
||||||
final private MethodCall call;
|
|
||||||
final Map<String, Object> values = new HashMap<>();
|
|
||||||
|
|
||||||
public MsgSendProgressListener(MethodChannel.Result result, MethodCall call) {
|
|
||||||
this.result = result;
|
|
||||||
this.call = call;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onError(long l, String s) {
|
|
||||||
CommonUtil.runMainThreadReturnError(result, l, s, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onProgress(long l) {
|
|
||||||
values.put("clientMsgID", CommonUtil.getSendMessageClientMsgID(call));
|
|
||||||
values.put("progress", l);
|
|
||||||
CommonUtil.emitEvent("msgSendProgressListener", "onProgress", values);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSuccess(String s) {
|
|
||||||
CommonUtil.runMainThreadReturn(result, s);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
package io.openim.flutter_openim_sdk.listener;
|
||||||
|
|
||||||
|
import android.util.ArrayMap;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||||
|
|
||||||
|
public class OnAdvancedMsgListener implements open_im_sdk_callback.OnAdvancedMsgListener {
|
||||||
|
private final String id;
|
||||||
|
|
||||||
|
public OnAdvancedMsgListener(String listenerId) {
|
||||||
|
this.id = listenerId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onMsgDeleted(String s) {
|
||||||
|
final Map<String, String> values = new ArrayMap<>();
|
||||||
|
values.put("id", id);
|
||||||
|
values.put("message", s);
|
||||||
|
CommonUtil.emitEvent("advancedMsgListener", "onMsgDeleted", values);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNewRecvMessageRevoked(String s) {
|
||||||
|
final Map<String, String> values = new ArrayMap<>();
|
||||||
|
values.put("id", id);
|
||||||
|
values.put("messageRevoked", s);
|
||||||
|
CommonUtil.emitEvent("advancedMsgListener", "onNewRecvMessageRevoked", values);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRecvC2CReadReceipt(String s) {
|
||||||
|
final Map<String, String> values = new ArrayMap<>();
|
||||||
|
values.put("id", id);
|
||||||
|
values.put("msgReceiptList", s);
|
||||||
|
CommonUtil.emitEvent("advancedMsgListener", "onRecvC2CReadReceipt", values);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRecvGroupReadReceipt(String s) {
|
||||||
|
final Map<String, String> values = new ArrayMap<>();
|
||||||
|
values.put("id", id);
|
||||||
|
values.put("groupMsgReceiptList", s);
|
||||||
|
CommonUtil.emitEvent("advancedMsgListener", "onRecvGroupReadReceipt", values);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRecvMessageExtensionsAdded(String s, String s1) {
|
||||||
|
final Map<String, String> values = new ArrayMap<>();
|
||||||
|
values.put("id", id);
|
||||||
|
values.put("msgID", s);
|
||||||
|
values.put("reactionExtensionList", s1);
|
||||||
|
CommonUtil.emitEvent("advancedMsgListener", "onRecvMessageExtensionsAdded", values);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRecvMessageExtensionsChanged(String s, String s1) {
|
||||||
|
final Map<String, String> values = new ArrayMap<>();
|
||||||
|
values.put("id", id);
|
||||||
|
values.put("msgID", s);
|
||||||
|
values.put("reactionExtensionList", s1);
|
||||||
|
CommonUtil.emitEvent("advancedMsgListener", "onRecvMessageExtensionsChanged", values);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRecvMessageExtensionsDeleted(String s, String s1) {
|
||||||
|
final Map<String, String> values = new ArrayMap<>();
|
||||||
|
values.put("id", id);
|
||||||
|
values.put("msgID", s);
|
||||||
|
values.put("reactionExtensionKeyList", s1);
|
||||||
|
CommonUtil.emitEvent("advancedMsgListener", "onRecvMessageExtensionsDeleted", values);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRecvNewMessage(String s) {
|
||||||
|
final Map<String, String> values = new ArrayMap<>();
|
||||||
|
values.put("id", id);
|
||||||
|
values.put("message", s);
|
||||||
|
CommonUtil.emitEvent("advancedMsgListener", "onRecvNewMessage", values);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRecvOfflineNewMessage(String s) {
|
||||||
|
final Map<String, String> values = new ArrayMap<>();
|
||||||
|
values.put("id", id);
|
||||||
|
values.put("message", s);
|
||||||
|
CommonUtil.emitEvent("advancedMsgListener", "onRecvOfflineNewMessage", values);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package io.openim.flutter_openim_sdk.listener;
|
||||||
|
|
||||||
|
|
||||||
|
import io.flutter.Log;
|
||||||
|
import io.flutter.plugin.common.MethodCall;
|
||||||
|
import io.flutter.plugin.common.MethodChannel;
|
||||||
|
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||||
|
import open_im_sdk_callback.Base;
|
||||||
|
|
||||||
|
public class OnBaseListener implements Base {
|
||||||
|
|
||||||
|
MethodChannel.Result result;
|
||||||
|
MethodCall call;
|
||||||
|
|
||||||
|
public OnBaseListener(MethodChannel.Result result, MethodCall call) {
|
||||||
|
this.result = result;
|
||||||
|
this.call = call;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(int l, String s) {
|
||||||
|
Log.i("F-OpenIMSDK(native call flutter)", "method: 【 " + call.method + " 】, onError: { code:" + l + ", message:" + s + "}");
|
||||||
|
CommonUtil.runMainThreadReturnError(result, l, s, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess(String s) {
|
||||||
|
Log.i("F-OpenIMSDK(native call flutter)", "method: 【 " + call.method + " 】, onSuccess: " + s);
|
||||||
|
CommonUtil.runMainThreadReturn(result, s);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package io.openim.flutter_openim_sdk.listener;
|
||||||
|
|
||||||
|
|
||||||
|
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||||
|
|
||||||
|
|
||||||
|
public class OnConnListener implements open_im_sdk_callback.OnConnListener {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onConnectFailed(int i, String s) {
|
||||||
|
CommonUtil.emitEvent("connectListener", "onConnectFailed", i, s, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onConnectSuccess() {
|
||||||
|
CommonUtil.emitEvent("connectListener", "onConnectSuccess", null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onConnecting() {
|
||||||
|
CommonUtil.emitEvent("connectListener", "onConnecting", null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onKickedOffline() {
|
||||||
|
CommonUtil.emitEvent("connectListener", "onKickedOffline", null);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onUserTokenExpired() {
|
||||||
|
CommonUtil.emitEvent("connectListener", "onUserTokenExpired", null);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
package io.openim.flutter_openim_sdk.listener;
|
package io.openim.flutter_openim_sdk.listener;
|
||||||
|
|
||||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||||
import open_im_sdk.OnConversationListener;
|
|
||||||
|
|
||||||
public class ConversationListener implements OnConversationListener {
|
|
||||||
|
|
||||||
|
public class OnConversationListener implements open_im_sdk_callback.OnConversationListener {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onConversationChanged(String s) {
|
public void onConversationChanged(String s) {
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package io.openim.flutter_openim_sdk.listener;
|
||||||
|
|
||||||
|
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||||
|
|
||||||
|
public class OnCustomBusinessListener implements open_im_sdk_callback.OnCustomBusinessListener {
|
||||||
|
@Override
|
||||||
|
public void onRecvCustomBusinessMessage(String s) {
|
||||||
|
CommonUtil.emitEvent("customBusinessListener", "onRecvCustomBusinessMessage", s);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package io.openim.flutter_openim_sdk.listener;
|
||||||
|
|
||||||
|
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||||
|
|
||||||
|
public class OnFriendshipListener implements open_im_sdk_callback.OnFriendshipListener {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBlackAdded(String s) {
|
||||||
|
CommonUtil.emitEvent("friendListener", "onBlackAdded", s);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBlackDeleted(String s) {
|
||||||
|
CommonUtil.emitEvent("friendListener", "onBlackDeleted", s);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFriendAdded(String s) {
|
||||||
|
CommonUtil.emitEvent("friendListener", "onFriendAdded", s);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFriendApplicationAccepted(String s) {
|
||||||
|
CommonUtil.emitEvent("friendListener", "onFriendApplicationAccepted", s);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFriendApplicationAdded(String s) {
|
||||||
|
CommonUtil.emitEvent("friendListener", "onFriendApplicationAdded", s);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFriendApplicationDeleted(String s) {
|
||||||
|
CommonUtil.emitEvent("friendListener", "onFriendApplicationDeleted", s);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFriendApplicationRejected(String s) {
|
||||||
|
CommonUtil.emitEvent("friendListener", "onFriendApplicationRejected", s);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFriendDeleted(String s) {
|
||||||
|
CommonUtil.emitEvent("friendListener", "onFriendDeleted", s);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFriendInfoChanged(String s) {
|
||||||
|
CommonUtil.emitEvent("friendListener", "onFriendInfoChanged", s);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package io.openim.flutter_openim_sdk.listener;
|
||||||
|
|
||||||
|
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||||
|
|
||||||
|
public class OnGroupListener implements open_im_sdk_callback.OnGroupListener {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onGroupApplicationAccepted(String s) {
|
||||||
|
CommonUtil.emitEvent("groupListener", "onGroupApplicationAccepted", s);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onGroupApplicationAdded(String s) {
|
||||||
|
CommonUtil.emitEvent("groupListener", "onGroupApplicationAdded", s);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onGroupApplicationDeleted(String s) {
|
||||||
|
CommonUtil.emitEvent("groupListener", "onGroupApplicationDeleted", s);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onGroupApplicationRejected(String s) {
|
||||||
|
CommonUtil.emitEvent("groupListener", "onGroupApplicationRejected", s);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onGroupDismissed(String s) {
|
||||||
|
CommonUtil.emitEvent("groupListener", "onGroupDismissed", s);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onGroupInfoChanged(String s) {
|
||||||
|
CommonUtil.emitEvent("groupListener", "onGroupInfoChanged", s);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onGroupMemberAdded(String s) {
|
||||||
|
CommonUtil.emitEvent("groupListener", "onGroupMemberAdded", s);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onGroupMemberDeleted(String s) {
|
||||||
|
CommonUtil.emitEvent("groupListener", "onGroupMemberDeleted", s);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onGroupMemberInfoChanged(String s) {
|
||||||
|
CommonUtil.emitEvent("groupListener", "onGroupMemberInfoChanged", s);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onJoinedGroupAdded(String s) {
|
||||||
|
CommonUtil.emitEvent("groupListener", "onJoinedGroupAdded", s);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onJoinedGroupDeleted(String s) {
|
||||||
|
CommonUtil.emitEvent("groupListener", "onJoinedGroupDeleted", s);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package io.openim.flutter_openim_sdk.listener;
|
||||||
|
|
||||||
|
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||||
|
|
||||||
|
public class OnListenerForService implements open_im_sdk_callback.OnListenerForService {
|
||||||
|
@Override
|
||||||
|
public void onFriendApplicationAccepted(String s) {
|
||||||
|
CommonUtil.emitEvent("listenerForService", "onFriendApplicationAccepted", s);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFriendApplicationAdded(String s) {
|
||||||
|
CommonUtil.emitEvent("listenerForService", "onFriendApplicationAdded", s);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onGroupApplicationAccepted(String s) {
|
||||||
|
CommonUtil.emitEvent("listenerForService", "onGroupApplicationAccepted", s);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onGroupApplicationAdded(String s) {
|
||||||
|
CommonUtil.emitEvent("listenerForService", "onGroupApplicationAdded", s);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRecvNewMessage(String s) {
|
||||||
|
CommonUtil.emitEvent("listenerForService", "onRecvNewMessage", s);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package io.openim.flutter_openim_sdk.listener;
|
||||||
|
|
||||||
|
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||||
|
|
||||||
|
public class OnMessageKvInfoListener implements open_im_sdk_callback.OnMessageKvInfoListener {
|
||||||
|
|
||||||
|
// 经过聚合后的kv,计算了总数,判断了是否包含自己
|
||||||
|
@Override
|
||||||
|
public void onMessageKvInfoChanged(String s) {
|
||||||
|
CommonUtil.emitEvent("messageKvInfoListener", "onMessageKvInfoChanged", s);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package io.openim.flutter_openim_sdk.listener;
|
||||||
|
|
||||||
|
import android.util.ArrayMap;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import io.flutter.plugin.common.MethodCall;
|
||||||
|
import io.flutter.plugin.common.MethodChannel;
|
||||||
|
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||||
|
import open_im_sdk_callback.SendMsgCallBack;
|
||||||
|
|
||||||
|
public class OnMsgSendListener implements SendMsgCallBack {
|
||||||
|
final private MethodChannel.Result result;
|
||||||
|
private Object clientMsgID;
|
||||||
|
|
||||||
|
public OnMsgSendListener(MethodChannel.Result result, MethodCall call) {
|
||||||
|
this.result = result;
|
||||||
|
Map<String, Object> args = call.argument("message");
|
||||||
|
if (null != args) {
|
||||||
|
this.clientMsgID = args.get("clientMsgID");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(int l, String s) {
|
||||||
|
CommonUtil.runMainThreadReturnError(result, l, s, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onProgress(long l) {
|
||||||
|
if (null != clientMsgID) {
|
||||||
|
final Map<String, Object> values = new ArrayMap<>();
|
||||||
|
values.put("clientMsgID", clientMsgID);
|
||||||
|
values.put("progress", l);
|
||||||
|
CommonUtil.emitEvent("msgSendProgressListener", "onProgress", values);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess(String s) {
|
||||||
|
CommonUtil.runMainThreadReturn(result, s);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,110 @@
|
|||||||
|
package io.openim.flutter_openim_sdk.listener;
|
||||||
|
|
||||||
|
import android.util.ArrayMap;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import io.flutter.plugin.common.MethodCall;
|
||||||
|
import io.flutter.plugin.common.MethodChannel;
|
||||||
|
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||||
|
import open_im_sdk_callback.UploadFileCallback;
|
||||||
|
|
||||||
|
public class OnUploadFileListener implements UploadFileCallback {
|
||||||
|
final private MethodChannel.Result result;
|
||||||
|
final private Object id;
|
||||||
|
|
||||||
|
public OnUploadFileListener(MethodChannel.Result result, MethodCall call) {
|
||||||
|
this.result = result;
|
||||||
|
this.id = call.argument("id");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void complete(long size, String url, long type) {
|
||||||
|
if (null != id) {
|
||||||
|
final Map<String, Object> values = new ArrayMap<>();
|
||||||
|
values.put("id", id);
|
||||||
|
values.put("size", size);
|
||||||
|
values.put("url", url);
|
||||||
|
values.put("type", type);
|
||||||
|
CommonUtil.emitEvent("uploadFileListener", "complete", values);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void hashPartComplete(String partHash, String fileHash) {
|
||||||
|
if (null != id) {
|
||||||
|
final Map<String, Object> values = new ArrayMap<>();
|
||||||
|
values.put("id", id);
|
||||||
|
values.put("partHash", partHash);
|
||||||
|
values.put("fileHash", fileHash);
|
||||||
|
CommonUtil.emitEvent("uploadFileListener", "hashPartComplete", values);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void hashPartProgress(long index, long size, String partHash) {
|
||||||
|
if (null != id) {
|
||||||
|
final Map<String, Object> values = new ArrayMap<>();
|
||||||
|
values.put("id", id);
|
||||||
|
values.put("index", index);
|
||||||
|
values.put("size", size);
|
||||||
|
values.put("partHash", partHash);
|
||||||
|
CommonUtil.emitEvent("uploadFileListener", "hashPartProgress", values);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void open(long size) {
|
||||||
|
if (null != id) {
|
||||||
|
final Map<String, Object> values = new ArrayMap<>();
|
||||||
|
values.put("id", id);
|
||||||
|
values.put("size", size);
|
||||||
|
CommonUtil.emitEvent("uploadFileListener", "open", values);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void partSize(long partSize, long num) {
|
||||||
|
if (null != id) {
|
||||||
|
final Map<String, Object> values = new ArrayMap<>();
|
||||||
|
values.put("id", id);
|
||||||
|
values.put("partSize", partSize);
|
||||||
|
values.put("num", num);
|
||||||
|
CommonUtil.emitEvent("uploadFileListener", "partSize", values);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uploadComplete(long fileSize, long streamSize, long storageSize) {
|
||||||
|
if (null != id) {
|
||||||
|
final Map<String, Object> values = new ArrayMap<>();
|
||||||
|
values.put("id", id);
|
||||||
|
values.put("fileSize", fileSize);
|
||||||
|
values.put("streamSize", streamSize);
|
||||||
|
values.put("storageSize", storageSize);
|
||||||
|
CommonUtil.emitEvent("uploadFileListener", "uploadProgress", values);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uploadID(String uploadID) {
|
||||||
|
if (null != id) {
|
||||||
|
final Map<String, Object> values = new ArrayMap<>();
|
||||||
|
values.put("id", id);
|
||||||
|
values.put("uploadID", uploadID);
|
||||||
|
CommonUtil.emitEvent("uploadFileListener", "uploadID", values);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uploadPartComplete(long index, long partSize, String partHash) {
|
||||||
|
if (null != id) {
|
||||||
|
final Map<String, Object> values = new ArrayMap<>();
|
||||||
|
values.put("id", id);
|
||||||
|
values.put("index", index);
|
||||||
|
values.put("partSize", partSize);
|
||||||
|
values.put("partHash", partHash);
|
||||||
|
CommonUtil.emitEvent("uploadFileListener", "uploadPartComplete", values);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package io.openim.flutter_openim_sdk.listener;
|
||||||
|
|
||||||
|
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||||
|
|
||||||
|
public class OnUserListener implements open_im_sdk_callback.OnUserListener {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSelfInfoUpdated(String s) {
|
||||||
|
CommonUtil.emitEvent("userListener", "onSelfInfoUpdated", s);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
package io.openim.flutter_openim_sdk.listener;
|
|
||||||
|
|
||||||
|
|
||||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
|
||||||
import open_im_sdk.IMSDKListener;
|
|
||||||
|
|
||||||
public class SDKListener implements IMSDKListener {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onConnectFailed(long l, String s) {
|
|
||||||
CommonUtil.emitEvent("initSDKListener", "onConnectFailed", l, s, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onConnectSuccess() {
|
|
||||||
CommonUtil.emitEvent("initSDKListener", "onConnectSuccess", null);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onConnecting() {
|
|
||||||
CommonUtil.emitEvent("initSDKListener", "onConnecting", null);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onKickedOffline() {
|
|
||||||
CommonUtil.emitEvent("initSDKListener", "onKickedOffline", null);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSelfInfoUpdated(String s) {
|
|
||||||
CommonUtil.emitEvent("initSDKListener", "onSelfInfoUpdated", s);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onUserTokenExpired() {
|
|
||||||
CommonUtil.emitEvent("initSDKListener", "onUserTokenExpired", null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package io.openim.flutter_openim_sdk.manager;
|
||||||
|
|
||||||
|
import io.flutter.plugin.common.MethodCall;
|
||||||
|
import io.openim.flutter_openim_sdk.util.JsonUtil;
|
||||||
|
|
||||||
|
class BaseManager {
|
||||||
|
|
||||||
|
static String jsonValue(MethodCall methodCall, String key) {
|
||||||
|
return JsonUtil.toString(methodCall.argument(key));
|
||||||
|
}
|
||||||
|
|
||||||
|
static String jsonValue(MethodCall methodCall) {
|
||||||
|
return JsonUtil.toString(methodCall.arguments);
|
||||||
|
}
|
||||||
|
|
||||||
|
static <T> T value(MethodCall methodCall, String key) {
|
||||||
|
return methodCall.argument(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Long int2long(MethodCall methodCall, String key) {
|
||||||
|
Object i = value(methodCall, key);
|
||||||
|
if (i instanceof Long) {
|
||||||
|
return (Long) i;
|
||||||
|
}
|
||||||
|
return Long.valueOf((Integer) i);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,68 +2,195 @@ package io.openim.flutter_openim_sdk.manager;
|
|||||||
|
|
||||||
import io.flutter.plugin.common.MethodCall;
|
import io.flutter.plugin.common.MethodCall;
|
||||||
import io.flutter.plugin.common.MethodChannel;
|
import io.flutter.plugin.common.MethodChannel;
|
||||||
import io.openim.flutter_openim_sdk.listener.BaseListener;
|
import io.openim.flutter_openim_sdk.listener.OnBaseListener;
|
||||||
import io.openim.flutter_openim_sdk.listener.ConversationListener;
|
import io.openim.flutter_openim_sdk.listener.OnConversationListener;
|
||||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||||
import open_im_sdk.Open_im_sdk;
|
import open_im_sdk.Open_im_sdk;
|
||||||
|
|
||||||
public class ConversationManager {
|
public class ConversationManager extends BaseManager {
|
||||||
|
|
||||||
public void setConversationListener(MethodCall methodCall, MethodChannel.Result result) {
|
public void setConversationListener(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.setConversationListener(new ConversationListener());
|
Open_im_sdk.setConversationListener(new OnConversationListener());
|
||||||
|
|
||||||
|
result.success(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void getAllConversationList(MethodCall methodCall, MethodChannel.Result result) {
|
public void getAllConversationList(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.getAllConversationList(new BaseListener(result));
|
Open_im_sdk.getAllConversationList(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void getConversationListSplit(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.getConversationListSplit(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
int2long(methodCall, "offset"),
|
||||||
|
int2long(methodCall, "count")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getOneConversation(MethodCall methodCall, MethodChannel.Result result) {
|
public void getOneConversation(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.getOneConversation(
|
Open_im_sdk.getOneConversation(
|
||||||
CommonUtil.getConversationSourceId(methodCall),
|
new OnBaseListener(result, methodCall),
|
||||||
CommonUtil.getConversationSessionType(methodCall),
|
value(methodCall, "operationID"),
|
||||||
new BaseListener(result));
|
value(methodCall, "sessionType"),
|
||||||
|
value(methodCall, "sourceID")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getMultipleConversation(MethodCall methodCall, MethodChannel.Result result) {
|
public void getMultipleConversation(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.getMultipleConversation(
|
Open_im_sdk.getMultipleConversation(
|
||||||
CommonUtil.getConversationIds(methodCall),
|
new OnBaseListener(result, methodCall),
|
||||||
new BaseListener(result));
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall, "conversationIDList")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteConversation(MethodCall methodCall, MethodChannel.Result result) {
|
|
||||||
Open_im_sdk.deleteConversation(CommonUtil.getConversationId(methodCall), new BaseListener(result));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setConversationDraft(MethodCall methodCall, MethodChannel.Result result) {
|
public void setConversationDraft(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.setConversationDraft(
|
Open_im_sdk.setConversationDraft(
|
||||||
CommonUtil.getConversationId(methodCall),
|
new OnBaseListener(result, methodCall),
|
||||||
CommonUtil.getConversationDraft(methodCall),
|
value(methodCall, "operationID"),
|
||||||
new BaseListener(result));
|
value(methodCall, "conversationID"),
|
||||||
|
value(methodCall, "draftText")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void pinConversation(MethodCall methodCall, MethodChannel.Result result) {
|
public void pinConversation(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.pinConversation(
|
Open_im_sdk.pinConversation(
|
||||||
CommonUtil.getConversationId(methodCall),
|
new OnBaseListener(result, methodCall),
|
||||||
CommonUtil.isPinnedConversation(methodCall),
|
value(methodCall, "operationID"),
|
||||||
new BaseListener(result));
|
value(methodCall, "conversationID"),
|
||||||
|
value(methodCall, "isPinned")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void markSingleMessageHasRead(MethodCall methodCall, MethodChannel.Result result) {
|
public void hideConversation(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.markSingleMessageHasRead(new BaseListener(result), CommonUtil.getSingleMessageUserid(methodCall));
|
Open_im_sdk.hideConversation(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "conversationID")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void markGroupMessageHasRead(MethodCall methodCall, MethodChannel.Result result) {
|
public void markConversationMessageAsRead(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.markGroupMessageHasRead(new BaseListener(result), CommonUtil.getGroupMessageGroupid(methodCall));
|
Open_im_sdk.markConversationMessageAsRead(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "conversationID")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getTotalUnreadMsgCount(MethodCall methodCall, MethodChannel.Result result) {
|
public void getTotalUnreadMsgCount(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.getTotalUnreadMsgCount(new BaseListener(result));
|
Open_im_sdk.getTotalUnreadMsgCount(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getConversationIDBySessionType(MethodCall methodCall, MethodChannel.Result result) {
|
public void getConversationIDBySessionType(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
CommonUtil.runMainThreadReturn(result,
|
CommonUtil.runMainThreadReturn(result, Open_im_sdk.getConversationIDBySessionType(
|
||||||
Open_im_sdk.getConversationIDBySessionType(CommonUtil.getConversationSourceId(methodCall),
|
value(methodCall, "operationID"),
|
||||||
CommonUtil.getConversationSessionType(methodCall)));
|
value(methodCall, "sourceID"),
|
||||||
|
int2long(methodCall, "sessionType")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setConversationRecvMessageOpt(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.setConversationRecvMessageOpt(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "conversationID"),
|
||||||
|
int2long(methodCall, "status")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void getConversationRecvMessageOpt(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.getConversationRecvMessageOpt(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall, "conversationIDList")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConversationPrivateChat(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.setConversationPrivateChat(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "conversationID"),
|
||||||
|
value(methodCall, "isPrivate")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void clearConversationAndDeleteAllMsg(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.clearConversationAndDeleteAllMsg(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "conversationID")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deleteConversationAndDeleteAllMsg(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.deleteConversationAndDeleteAllMsg(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "conversationID")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deleteAllConversationFromLocal(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.deleteAllConversationFromLocal(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void resetConversationGroupAtType(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.resetConversationGroupAtType(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "conversationID")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void getAtAllTag(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
CommonUtil.runMainThreadReturn(result, Open_im_sdk.getAtAllTag(value(methodCall, "operationID")));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGlobalRecvMessageOpt(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.setGlobalRecvMessageOpt(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
int2long(methodCall, "status")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConversationBurnDuration(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.setConversationBurnDuration(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "conversationID"),
|
||||||
|
value(methodCall, "burnDuration")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConversationIsMsgDestruct(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.setConversationIsMsgDestruct(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "conversationID"),
|
||||||
|
value(methodCall, "isMsgDestruct")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConversationMsgDestructTime(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.setConversationMsgDestructTime(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "conversationID"),
|
||||||
|
int2long(methodCall, "duration")
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,75 +2,124 @@ package io.openim.flutter_openim_sdk.manager;
|
|||||||
|
|
||||||
import io.flutter.plugin.common.MethodCall;
|
import io.flutter.plugin.common.MethodCall;
|
||||||
import io.flutter.plugin.common.MethodChannel;
|
import io.flutter.plugin.common.MethodChannel;
|
||||||
import io.openim.flutter_openim_sdk.listener.BaseListener;
|
import io.openim.flutter_openim_sdk.listener.OnBaseListener;
|
||||||
import io.openim.flutter_openim_sdk.listener.FriendshipListener;
|
import io.openim.flutter_openim_sdk.listener.OnFriendshipListener;
|
||||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
|
||||||
import open_im_sdk.Open_im_sdk;
|
import open_im_sdk.Open_im_sdk;
|
||||||
|
|
||||||
public class FriendshipManager {
|
public class FriendshipManager extends BaseManager {
|
||||||
|
|
||||||
|
|
||||||
public void setFriendListener(MethodCall methodCall, MethodChannel.Result result) {
|
public void setFriendListener(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.setFriendListener(new FriendshipListener());
|
Open_im_sdk.setFriendListener(new OnFriendshipListener());
|
||||||
|
|
||||||
|
result.success(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getFriendsInfo(MethodCall methodCall, MethodChannel.Result result) {
|
public void getFriendsInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.getFriendsInfo(new BaseListener(result), CommonUtil.getUidList(methodCall));
|
Open_im_sdk.getSpecifiedFriendsInfo(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall, "userIDList")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addFriend(MethodCall methodCall, MethodChannel.Result result) {
|
public void addFriend(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.addFriend(new BaseListener(result), CommonUtil.getSDKJsonParam(methodCall));
|
Open_im_sdk.addFriend(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getFriendApplicationList(MethodCall methodCall, MethodChannel.Result result) {
|
public void getFriendApplicationListAsRecipient(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.getFriendApplicationList(new BaseListener(result));
|
Open_im_sdk.getFriendApplicationListAsRecipient(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void getFriendApplicationListAsApplicant(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.getFriendApplicationListAsApplicant(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getFriendList(MethodCall methodCall, MethodChannel.Result result) {
|
public void getFriendList(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.getFriendList(new BaseListener(result));
|
Open_im_sdk.getFriendList(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFriendInfo(MethodCall methodCall, MethodChannel.Result result) {
|
public void setFriendRemark(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.setFriendInfo(CommonUtil.getSDKJsonParam(methodCall), new BaseListener(result));
|
Open_im_sdk.setFriendRemark(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addToBlackList(MethodCall methodCall, MethodChannel.Result result) {
|
public void addBlacklist(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.addToBlackList(new BaseListener(result), CommonUtil.getJsonUid(methodCall));
|
Open_im_sdk.addBlack(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "userID")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getBlackList(MethodCall methodCall, MethodChannel.Result result) {
|
public void getBlacklist(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.getBlackList(new BaseListener(result));
|
Open_im_sdk.getBlackList(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteFromBlackList(MethodCall methodCall, MethodChannel.Result result) {
|
public void removeBlacklist(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.deleteFromBlackList(new BaseListener(result), CommonUtil.getJsonUid(methodCall));
|
Open_im_sdk.removeBlack(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "userID")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void checkFriend(MethodCall methodCall, MethodChannel.Result result) {
|
public void checkFriend(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.checkFriend(new BaseListener(result), CommonUtil.getUidList(methodCall));
|
Open_im_sdk.checkFriend(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall, "userIDList")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteFromFriendList(MethodCall methodCall, MethodChannel.Result result) {
|
public void deleteFriend(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.deleteFromFriendList(CommonUtil.getJsonUid(methodCall), new BaseListener(result));
|
Open_im_sdk.deleteFriend(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "userID")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void acceptFriendApplication(MethodCall methodCall, MethodChannel.Result result) {
|
public void acceptFriendApplication(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.acceptFriendApplication(new BaseListener(result), CommonUtil.getJsonUid(methodCall));
|
Open_im_sdk.acceptFriendApplication(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void refuseFriendApplication(MethodCall methodCall, MethodChannel.Result result) {
|
public void refuseFriendApplication(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.refuseFriendApplication(new BaseListener(result), CommonUtil.getJsonUid(methodCall));
|
Open_im_sdk.refuseFriendApplication(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// public void forceSyncFriendApplication(MethodCall methodCall, MethodChannel.Result result) {
|
public void searchFriends(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
// Open_im_sdk.forceSyncFriendApplication();
|
Open_im_sdk.searchFriends(
|
||||||
// }
|
new OnBaseListener(result, methodCall),
|
||||||
//
|
value(methodCall, "operationID"),
|
||||||
// public void forceSyncFriend(MethodCall methodCall, MethodChannel.Result result) {
|
jsonValue(methodCall, "searchParam")
|
||||||
// Open_im_sdk.forceSyncFriend();
|
);
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// public void forceSyncBlackList(MethodCall methodCall, MethodChannel.Result result) {
|
|
||||||
// Open_im_sdk.forceSyncBlackList();
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,125 +2,266 @@ package io.openim.flutter_openim_sdk.manager;
|
|||||||
|
|
||||||
import io.flutter.plugin.common.MethodCall;
|
import io.flutter.plugin.common.MethodCall;
|
||||||
import io.flutter.plugin.common.MethodChannel;
|
import io.flutter.plugin.common.MethodChannel;
|
||||||
import io.openim.flutter_openim_sdk.listener.BaseListener;
|
import io.openim.flutter_openim_sdk.listener.OnBaseListener;
|
||||||
import io.openim.flutter_openim_sdk.listener.GroupListener;
|
import io.openim.flutter_openim_sdk.listener.OnGroupListener;
|
||||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
|
||||||
import open_im_sdk.Open_im_sdk;
|
import open_im_sdk.Open_im_sdk;
|
||||||
|
|
||||||
public class GroupManager {
|
public class GroupManager extends BaseManager {
|
||||||
|
|
||||||
public void setGroupListener(MethodCall methodCall, MethodChannel.Result result) {
|
public void setGroupListener(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.setGroupListener(new GroupListener());
|
Open_im_sdk.setGroupListener(new OnGroupListener());
|
||||||
|
|
||||||
|
result.success(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void inviteUserToGroup(MethodCall methodCall, MethodChannel.Result result) {
|
public void inviteUserToGroup(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.inviteUserToGroup(
|
Open_im_sdk.inviteUserToGroup(
|
||||||
CommonUtil.getGid(methodCall),
|
new OnBaseListener(result, methodCall),
|
||||||
CommonUtil.getGroupOpReason(methodCall),
|
value(methodCall, "operationID"),
|
||||||
CommonUtil.getUidList(methodCall),
|
value(methodCall, "groupID"),
|
||||||
new BaseListener(result));
|
value(methodCall, "reason"),
|
||||||
|
jsonValue(methodCall, "userIDList")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void kickGroupMember(MethodCall methodCall, MethodChannel.Result result) {
|
public void kickGroupMember(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.kickGroupMember(
|
Open_im_sdk.kickGroupMember(
|
||||||
CommonUtil.getGid(methodCall),
|
new OnBaseListener(result, methodCall),
|
||||||
CommonUtil.getGroupOpReason(methodCall),
|
value(methodCall, "operationID"),
|
||||||
CommonUtil.getUidList(methodCall),
|
value(methodCall, "groupID"),
|
||||||
new BaseListener(result));
|
value(methodCall, "reason"),
|
||||||
|
jsonValue(methodCall, "userIDList")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getGroupMembersInfo(MethodCall methodCall, MethodChannel.Result result) {
|
public void getGroupMembersInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.getGroupMembersInfo(
|
Open_im_sdk.getSpecifiedGroupMembersInfo(
|
||||||
CommonUtil.getGid(methodCall),
|
new OnBaseListener(result, methodCall),
|
||||||
CommonUtil.getUidList(methodCall),
|
value(methodCall, "operationID"),
|
||||||
new BaseListener(result));
|
value(methodCall, "groupID"),
|
||||||
|
jsonValue(methodCall, "userIDList")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getGroupMemberList(MethodCall methodCall, MethodChannel.Result result) {
|
public void getGroupMemberList(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.getGroupMemberList(
|
Open_im_sdk.getGroupMemberList(
|
||||||
CommonUtil.getGid(methodCall),
|
new OnBaseListener(result, methodCall),
|
||||||
CommonUtil.getGroupListFilter(methodCall),
|
value(methodCall, "operationID"),
|
||||||
CommonUtil.getGroupListNext(methodCall),
|
value(methodCall, "groupID"),
|
||||||
new BaseListener(result));
|
value(methodCall, "filter"),
|
||||||
|
value(methodCall, "offset"),
|
||||||
|
value(methodCall, "count")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void getJoinedGroupList(MethodCall methodCall, MethodChannel.Result result) {
|
public void getJoinedGroupList(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.getJoinedGroupList(new BaseListener(result));
|
Open_im_sdk.getJoinedGroupList(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createGroup(MethodCall methodCall, MethodChannel.Result result) {
|
public void createGroup(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.createGroup(
|
Open_im_sdk.createGroup(
|
||||||
CommonUtil.getGroupInfo(methodCall),
|
new OnBaseListener(result, methodCall),
|
||||||
CommonUtil.getGroupMemberRoleList(methodCall),
|
value(methodCall, "operationID"),
|
||||||
new BaseListener(result));
|
jsonValue(methodCall)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGroupInfo(MethodCall methodCall, MethodChannel.Result result) {
|
public void setGroupInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.setGroupInfo(
|
Open_im_sdk.setGroupInfo(
|
||||||
CommonUtil.getGroupInfo(methodCall),
|
new OnBaseListener(result, methodCall),
|
||||||
new BaseListener(result));
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall, "groupInfo")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getGroupsInfo(MethodCall methodCall, MethodChannel.Result result) {
|
public void getGroupsInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.getGroupsInfo(
|
Open_im_sdk.getSpecifiedGroupsInfo(
|
||||||
CommonUtil.getGidList(methodCall),
|
new OnBaseListener(result, methodCall),
|
||||||
new BaseListener(result));
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall, "groupIDList")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void joinGroup(MethodCall methodCall, MethodChannel.Result result) {
|
public void joinGroup(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.joinGroup(
|
Open_im_sdk.joinGroup(
|
||||||
CommonUtil.getGid(methodCall),
|
new OnBaseListener(result, methodCall),
|
||||||
CommonUtil.getGroupOpReason(methodCall),
|
value(methodCall, "operationID"),
|
||||||
new BaseListener(result));
|
value(methodCall, "groupID"),
|
||||||
|
value(methodCall, "reason"),
|
||||||
|
value(methodCall, "joinSource")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void quitGroup(MethodCall methodCall, MethodChannel.Result result) {
|
public void quitGroup(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.quitGroup(
|
Open_im_sdk.quitGroup(
|
||||||
CommonUtil.getGid(methodCall),
|
new OnBaseListener(result, methodCall),
|
||||||
new BaseListener(result));
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "groupID")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void transferGroupOwner(MethodCall methodCall, MethodChannel.Result result) {
|
public void transferGroupOwner(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.transferGroupOwner(
|
Open_im_sdk.transferGroupOwner(
|
||||||
CommonUtil.getGid(methodCall),
|
new OnBaseListener(result, methodCall),
|
||||||
CommonUtil.getUid(methodCall),
|
value(methodCall, "operationID"),
|
||||||
new BaseListener(result));
|
value(methodCall, "groupID"),
|
||||||
|
value(methodCall, "userID")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getGroupApplicationList(MethodCall methodCall, MethodChannel.Result result) {
|
public void getGroupApplicationListAsRecipient(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.getGroupApplicationList(new BaseListener(result));
|
Open_im_sdk.getGroupApplicationListAsRecipient(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void getGroupApplicationListAsApplicant(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.getGroupApplicationListAsApplicant(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void acceptGroupApplication(MethodCall methodCall, MethodChannel.Result result) {
|
public void acceptGroupApplication(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.acceptGroupApplication(
|
Open_im_sdk.acceptGroupApplication(
|
||||||
CommonUtil.getGroupApplicationInfo(methodCall),
|
new OnBaseListener(result, methodCall),
|
||||||
CommonUtil.getGroupOpReason(methodCall),
|
value(methodCall, "operationID"),
|
||||||
new BaseListener(result));
|
value(methodCall, "groupID"),
|
||||||
|
value(methodCall, "userID"),
|
||||||
|
value(methodCall, "handleMsg")
|
||||||
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void refuseGroupApplication(MethodCall methodCall, MethodChannel.Result result) {
|
public void refuseGroupApplication(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.refuseGroupApplication(
|
Open_im_sdk.refuseGroupApplication(
|
||||||
CommonUtil.getGroupApplicationInfo(methodCall),
|
new OnBaseListener(result, methodCall),
|
||||||
CommonUtil.getGroupOpReason(methodCall),
|
value(methodCall, "operationID"),
|
||||||
new BaseListener(result));
|
value(methodCall, "groupID"),
|
||||||
|
value(methodCall, "userID"),
|
||||||
|
value(methodCall, "handleMsg")
|
||||||
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// public void forceSyncApplyGroupRequest(MethodCall methodCall, MethodChannel.Result result) {
|
public void dismissGroup(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
// Open_im_sdk.forceSyncApplyGroupRequest();
|
Open_im_sdk.dismissGroup(
|
||||||
// }
|
new OnBaseListener(result, methodCall),
|
||||||
//
|
value(methodCall, "operationID"),
|
||||||
// public void forceSyncGroupRequest(MethodCall methodCall, MethodChannel.Result result) {
|
value(methodCall, "groupID")
|
||||||
// Open_im_sdk.forceSyncGroupRequest();
|
);
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// public void forceSyncJoinedGroup(MethodCall methodCall, MethodChannel.Result result) {
|
public void changeGroupMute(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
// Open_im_sdk.forceSyncJoinedGroup();
|
Open_im_sdk.changeGroupMute(
|
||||||
// }
|
new OnBaseListener(result, methodCall),
|
||||||
//
|
value(methodCall, "operationID"),
|
||||||
// public void forceSyncJoinedGroupMember(MethodCall methodCall, MethodChannel.Result result) {
|
value(methodCall, "groupID"),
|
||||||
// Open_im_sdk.forceSyncJoinedGroupMember();
|
value(methodCall, "mute")
|
||||||
// }
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void changeGroupMemberMute(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.changeGroupMemberMute(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "groupID"),
|
||||||
|
value(methodCall, "userID"),
|
||||||
|
int2long(methodCall, "seconds")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGroupMemberNickname(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.setGroupMemberNickname(new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "groupID"),
|
||||||
|
value(methodCall, "userID"),
|
||||||
|
value(methodCall, "groupNickname")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void searchGroups(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.searchGroups(new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall, "searchParam")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGroupMemberRoleLevel(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.setGroupMemberRoleLevel(new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "groupID"),
|
||||||
|
value(methodCall, "userID"),
|
||||||
|
int2long(methodCall, "roleLevel")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void getGroupMemberListByJoinTimeFilter(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.getGroupMemberListByJoinTimeFilter(new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "groupID"),
|
||||||
|
value(methodCall, "offset"),
|
||||||
|
value(methodCall, "count"),
|
||||||
|
int2long(methodCall, "joinTimeBegin"),
|
||||||
|
int2long(methodCall, "joinTimeEnd"),
|
||||||
|
jsonValue(methodCall, "excludeUserIDList")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGroupVerification(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.setGroupVerification(new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "groupID"),
|
||||||
|
value(methodCall, "needVerification")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGroupLookMemberInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.setGroupLookMemberInfo(new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "groupID"),
|
||||||
|
value(methodCall, "status")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGroupApplyMemberFriend(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.setGroupApplyMemberFriend(new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "groupID"),
|
||||||
|
value(methodCall, "status")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void getGroupMemberOwnerAndAdmin(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.getGroupMemberOwnerAndAdmin(new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "groupID")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void searchGroupMembers(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.searchGroupMembers(new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall, "searchParam")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGroupMemberInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.setGroupMemberInfo(new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall, "info")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void isJoinGroup(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.isJoinGroup(new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "groupID")
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -2,51 +2,86 @@ package io.openim.flutter_openim_sdk.manager;
|
|||||||
|
|
||||||
import io.flutter.plugin.common.MethodCall;
|
import io.flutter.plugin.common.MethodCall;
|
||||||
import io.flutter.plugin.common.MethodChannel;
|
import io.flutter.plugin.common.MethodChannel;
|
||||||
import io.openim.flutter_openim_sdk.listener.BaseListener;
|
import io.openim.flutter_openim_sdk.FlutterOpenimSdkPlugin;
|
||||||
import io.openim.flutter_openim_sdk.listener.SDKListener;
|
import io.openim.flutter_openim_sdk.listener.OnBaseListener;
|
||||||
|
import io.openim.flutter_openim_sdk.listener.OnConnListener;
|
||||||
|
import io.openim.flutter_openim_sdk.listener.OnUploadFileListener;
|
||||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||||
import open_im_sdk.Open_im_sdk;
|
import open_im_sdk.Open_im_sdk;
|
||||||
|
|
||||||
public class IMManager {
|
public class IMManager extends BaseManager {
|
||||||
|
|
||||||
public void initSDK(MethodCall methodCall, MethodChannel.Result result) {
|
public void initSDK(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
CommonUtil.runMainThreadReturn(result, Open_im_sdk.initSDK(CommonUtil.getSDKJsonParam(methodCall), new SDKListener()));
|
boolean initialized = Open_im_sdk.initSDK(
|
||||||
// CommonUtil.runMainThreadReturn(result, null);
|
new OnConnListener(),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall));
|
||||||
|
FlutterOpenimSdkPlugin.isInitialized = initialized;
|
||||||
|
CommonUtil.runMainThreadReturn(result, initialized);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void unInitSDK(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.unInitSDK(value(methodCall, "operationID"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void login(MethodCall methodCall, MethodChannel.Result result) {
|
public void login(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.login(CommonUtil.getUid(methodCall), CommonUtil.getToken(methodCall), new BaseListener(result));
|
Open_im_sdk.login(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "userID"),
|
||||||
|
value(methodCall, "token")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void logout(MethodCall methodCall, MethodChannel.Result result) {
|
public void logout(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.logout(new BaseListener(result));
|
Open_im_sdk.logout(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getLoginStatus(MethodCall methodCall, MethodChannel.Result result) {
|
public void getLoginStatus(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
CommonUtil.runMainThreadReturn(result, Open_im_sdk.getLoginStatus());
|
CommonUtil.runMainThreadReturn(result, Open_im_sdk.getLoginStatus(value(methodCall, "operationID")));
|
||||||
}
|
}
|
||||||
|
|
||||||
// public void getLoginUid(MethodCall methodCall, MethodChannel.Result result) {
|
public void uploadFile(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
// CommonUtil.runMainThreadReturn(result, Open_im_sdk.getLoginUid());
|
Open_im_sdk.uploadFile(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall),
|
||||||
|
new OnUploadFileListener(result, methodCall)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateFcmToken(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.updateFcmToken(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "fcmToken")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setAppBackgroundStatus(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.setAppBackgroundStatus(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "isBackground")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void networkStatusChanged(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.networkStatusChanged(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// public void setListenerForService(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
// Open_im_sdk.setListenerForService(new OnListenerForService());
|
||||||
|
//
|
||||||
|
// result.success(null);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
public void getUsersInfo(MethodCall methodCall, MethodChannel.Result result) {
|
|
||||||
Open_im_sdk.getUsersInfo(CommonUtil.getUidList(methodCall), new BaseListener(result));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSelfInfo(MethodCall methodCall, MethodChannel.Result result) {
|
|
||||||
Open_im_sdk.setSelfInfo(CommonUtil.getSDKJsonParam(methodCall), new BaseListener(result));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void forceSyncLoginUerInfo(MethodCall methodCall, MethodChannel.Result result) {
|
|
||||||
Open_im_sdk.forceSyncLoginUerInfo();
|
|
||||||
}
|
|
||||||
|
|
||||||
// public void forceReConn(MethodCall methodCall, MethodChannel.Result result) {
|
|
||||||
// Open_im_sdk.forceReConn();
|
|
||||||
// }
|
|
||||||
|
|
||||||
public void setSdkLog(MethodCall methodCall, MethodChannel.Result result) {
|
|
||||||
Open_im_sdk.setSdkLog(CommonUtil.getSDKLog(methodCall));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +1,28 @@
|
|||||||
package io.openim.flutter_openim_sdk.manager;
|
package io.openim.flutter_openim_sdk.manager;
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
|
||||||
|
|
||||||
import io.flutter.plugin.common.MethodCall;
|
import io.flutter.plugin.common.MethodCall;
|
||||||
import io.flutter.plugin.common.MethodChannel;
|
import io.flutter.plugin.common.MethodChannel;
|
||||||
import io.openim.flutter_openim_sdk.listener.AdvancedMsgListener;
|
import io.openim.flutter_openim_sdk.listener.OnAdvancedMsgListener;
|
||||||
import io.openim.flutter_openim_sdk.listener.BaseListener;
|
import io.openim.flutter_openim_sdk.listener.OnBaseListener;
|
||||||
import io.openim.flutter_openim_sdk.listener.MsgSendProgressListener;
|
import io.openim.flutter_openim_sdk.listener.OnCustomBusinessListener;
|
||||||
|
import io.openim.flutter_openim_sdk.listener.OnMessageKvInfoListener;
|
||||||
|
import io.openim.flutter_openim_sdk.listener.OnMsgSendListener;
|
||||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||||
import open_im_sdk.OnAdvancedMsgListener;
|
|
||||||
import open_im_sdk.Open_im_sdk;
|
import open_im_sdk.Open_im_sdk;
|
||||||
|
|
||||||
|
|
||||||
public class MessageManager {
|
public class MessageManager extends BaseManager {
|
||||||
private final static String KEY_ID = "id";
|
private final static String KEY_ID = "id";
|
||||||
|
|
||||||
// private final static Map<String, OnAdvancedMsgListener> listeners = new HashMap<>();
|
// private final static Map<String, OnAdvancedMsgListener> listeners = new HashMap<>();
|
||||||
private static boolean initializedListener = false;
|
/* private static boolean initializedListener = false;
|
||||||
private final static Map<String, AdvancedMsgListener> listeners = new ConcurrentHashMap<>();
|
private final static Map<String, AdvancedMsgListener> listeners = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
|
protected void clearListeners() {
|
||||||
|
initializedListener = false;
|
||||||
|
listeners.clear();
|
||||||
|
}
|
||||||
|
|
||||||
private final static OnAdvancedMsgListener sdkMsgListener = new OnAdvancedMsgListener() {
|
private final static OnAdvancedMsgListener sdkMsgListener = new OnAdvancedMsgListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onRecvC2CReadReceipt(String s) {
|
public void onRecvC2CReadReceipt(String s) {
|
||||||
@@ -44,6 +48,7 @@ public class MessageManager {
|
|||||||
|
|
||||||
public void addAdvancedMsgListener(MethodCall methodCall, MethodChannel.Result result) {
|
public void addAdvancedMsgListener(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
String key = methodCall.argument(KEY_ID);
|
String key = methodCall.argument(KEY_ID);
|
||||||
|
Open_im_sdk.addAdvancedMsgListener(new AdvancedMsgListener(key));
|
||||||
listeners.put(key, new AdvancedMsgListener(key));
|
listeners.put(key, new AdvancedMsgListener(key));
|
||||||
if (!initializedListener) {
|
if (!initializedListener) {
|
||||||
initializedListener = true;
|
initializedListener = true;
|
||||||
@@ -56,9 +61,9 @@ public class MessageManager {
|
|||||||
listeners.remove(key);
|
listeners.remove(key);
|
||||||
if (listeners.isEmpty()) {
|
if (listeners.isEmpty()) {
|
||||||
initializedListener = false;
|
initializedListener = false;
|
||||||
// Open_im_sdk.removeAdvancedMsgListener(sdkMsgListener);
|
Open_im_sdk.removeAdvancedMsgListener(sdkMsgListener);
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
/*
|
/*
|
||||||
|
|
||||||
public void addAdvancedMsgListener(MethodCall methodCall, MethodChannel.Result result) {
|
public void addAdvancedMsgListener(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
@@ -77,169 +82,401 @@ public class MessageManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
public void setAdvancedMsgListener(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
String key = methodCall.argument(KEY_ID);
|
||||||
|
Open_im_sdk.setAdvancedMsgListener(new OnAdvancedMsgListener(key));
|
||||||
|
|
||||||
public void sendMessage(MethodCall methodCall, MethodChannel.Result result) {
|
result.success(null);
|
||||||
MsgSendProgressListener listener = new MsgSendProgressListener(result, methodCall);
|
|
||||||
Open_im_sdk.sendMessage(listener,
|
|
||||||
CommonUtil.getSendMessageContent(methodCall),
|
|
||||||
CommonUtil.getSendMessageReceiver(methodCall),
|
|
||||||
CommonUtil.geSendMessageGroupId(methodCall),
|
|
||||||
CommonUtil.getSendMessageOnlineOnly(methodCall));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getHistoryMessageList(MethodCall methodCall, MethodChannel.Result result) {
|
public void sendMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.getHistoryMessageList(new BaseListener(result), CommonUtil.getSDKJsonParam(methodCall));
|
Open_im_sdk.sendMessage(
|
||||||
|
new OnMsgSendListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall, "message"),
|
||||||
|
value(methodCall, "userID"),
|
||||||
|
value(methodCall, "groupID"),
|
||||||
|
jsonValue(methodCall, "offlinePushInfo")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void revokeMessage(MethodCall methodCall, MethodChannel.Result result) {
|
public void revokeMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.revokeMessage(new BaseListener(result), CommonUtil.getSDKJsonParam(methodCall));
|
Open_im_sdk.revokeMessage(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "conversationID"),
|
||||||
|
value(methodCall, "clientMsgID")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteMessageFromLocalStorage(MethodCall methodCall, MethodChannel.Result result) {
|
public void deleteMessageFromLocalStorage(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.deleteMessageFromLocalStorage(new BaseListener(result), CommonUtil.getSDKJsonParam(methodCall));
|
Open_im_sdk.deleteMessageFromLocalStorage(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "conversationID"),
|
||||||
|
value(methodCall, "clientMsgID")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteMessages(MethodCall methodCall, MethodChannel.Result result) {
|
public void deleteMessageFromLocalAndSvr(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
// Open_im_sdk.deleteMessages(new BaseListener(result), CommonUtil.getSDKJsonParam(methodCall));
|
Open_im_sdk.deleteMessage(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "conversationID"),
|
||||||
|
value(methodCall, "clientMsgID")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deleteAllMsgFromLocal(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.deleteAllMsgFromLocal(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deleteAllMsgFromLocalAndSvr(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.deleteAllMsgFromLocalAndSvr(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void insertSingleMessageToLocalStorage(MethodCall methodCall, MethodChannel.Result result) {
|
public void insertSingleMessageToLocalStorage(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.insertSingleMessageToLocalStorage(new BaseListener(result),
|
Open_im_sdk.insertSingleMessageToLocalStorage(
|
||||||
CommonUtil.getSingleMessageContent(methodCall),
|
new OnBaseListener(result, methodCall),
|
||||||
CommonUtil.getSingleMessageUserid(methodCall),
|
value(methodCall, "operationID"),
|
||||||
CommonUtil.getSingleMessageSender(methodCall));
|
jsonValue(methodCall, "message"),
|
||||||
|
value(methodCall, "receiverID"),
|
||||||
|
value(methodCall, "senderID")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void findMessages(MethodCall methodCall, MethodChannel.Result result) {
|
public void insertGroupMessageToLocalStorage(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.findMessages(new BaseListener(result), CommonUtil.getMessageIdList(methodCall));
|
Open_im_sdk.insertGroupMessageToLocalStorage(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall, "message"),
|
||||||
|
value(methodCall, "groupID"),
|
||||||
|
value(methodCall, "senderID")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void markC2CMessageAsRead(MethodCall methodCall, MethodChannel.Result result) {
|
public void markMessagesAsReadByMsgID(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.markC2CMessageAsRead(new BaseListener(result),
|
Open_im_sdk.markMessagesAsReadByMsgID(
|
||||||
CommonUtil.getSingleMessageUserid(methodCall),
|
new OnBaseListener(result, methodCall),
|
||||||
CommonUtil.getMessageIdList(methodCall));
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "conversationID"),
|
||||||
|
jsonValue(methodCall, "messageIDList")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void typingStatusUpdate(MethodCall methodCall, MethodChannel.Result result) {
|
public void typingStatusUpdate(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.typingStatusUpdate(CommonUtil.getSingleMessageUserid(methodCall),
|
Open_im_sdk.typingStatusUpdate(
|
||||||
CommonUtil.getSingleMessageTyping(methodCall));
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "userID"),
|
||||||
|
value(methodCall, "msgTip")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createTextMessage(MethodCall methodCall, MethodChannel.Result result) {
|
public void createTextMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
CommonUtil.runMainThreadReturn(result,
|
CommonUtil.runMainThreadReturn(result,
|
||||||
Open_im_sdk.createTextMessage(
|
Open_im_sdk.createTextMessage(
|
||||||
CommonUtil.getMessageText(methodCall)));
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "text")));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createTextAtMessage(MethodCall methodCall, MethodChannel.Result result) {
|
public void createTextAtMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
CommonUtil.runMainThreadReturn(result,
|
CommonUtil.runMainThreadReturn(result,
|
||||||
Open_im_sdk.createTextAtMessage(
|
Open_im_sdk.createTextAtMessage(
|
||||||
CommonUtil.getMessageText(methodCall),
|
value(methodCall, "operationID"),
|
||||||
CommonUtil.getAtUserList(methodCall)));
|
value(methodCall, "text"),
|
||||||
|
jsonValue(methodCall, "atUserIDList"),
|
||||||
|
jsonValue(methodCall, "atUserInfoList"),
|
||||||
|
jsonValue(methodCall, "quoteMessage")
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createImageMessage(MethodCall methodCall, MethodChannel.Result result) {
|
public void createImageMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
CommonUtil.runMainThreadReturn(result,
|
CommonUtil.runMainThreadReturn(result,
|
||||||
Open_im_sdk.createImageMessage(
|
Open_im_sdk.createImageMessage(
|
||||||
CommonUtil.getImagePath(methodCall)));
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "imagePath")));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createImageMessageFromFullPath(MethodCall methodCall, MethodChannel.Result result) {
|
public void createImageMessageFromFullPath(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
CommonUtil.runMainThreadReturn(result,
|
CommonUtil.runMainThreadReturn(result,
|
||||||
Open_im_sdk.createImageMessageFromFullPath(
|
Open_im_sdk.createImageMessageFromFullPath(
|
||||||
CommonUtil.getImagePath(methodCall)));
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "imagePath")));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createSoundMessage(MethodCall methodCall, MethodChannel.Result result) {
|
public void createSoundMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
CommonUtil.runMainThreadReturn(result,
|
CommonUtil.runMainThreadReturn(result,
|
||||||
Open_im_sdk.createSoundMessage(
|
Open_im_sdk.createSoundMessage(
|
||||||
CommonUtil.getSoundPath(methodCall),
|
value(methodCall, "operationID"),
|
||||||
CommonUtil.getSoundDuration(methodCall)));
|
value(methodCall, "soundPath"),
|
||||||
|
int2long(methodCall, "duration")));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createSoundMessageFromFullPath(MethodCall methodCall, MethodChannel.Result result) {
|
public void createSoundMessageFromFullPath(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
CommonUtil.runMainThreadReturn(result,
|
CommonUtil.runMainThreadReturn(result,
|
||||||
Open_im_sdk.createSoundMessageFromFullPath(
|
Open_im_sdk.createSoundMessageFromFullPath(
|
||||||
CommonUtil.getSoundPath(methodCall),
|
value(methodCall, "operationID"),
|
||||||
CommonUtil.getSoundDuration(methodCall)));
|
value(methodCall, "soundPath"),
|
||||||
|
int2long(methodCall, "duration")));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createVideoMessage(MethodCall methodCall, MethodChannel.Result result) {
|
public void createVideoMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
CommonUtil.runMainThreadReturn(result,
|
CommonUtil.runMainThreadReturn(result,
|
||||||
Open_im_sdk.createVideoMessage(
|
Open_im_sdk.createVideoMessage(
|
||||||
CommonUtil.getVideoPath(methodCall),
|
value(methodCall, "operationID"),
|
||||||
CommonUtil.getVideoType(methodCall),
|
value(methodCall, "videoPath"),
|
||||||
CommonUtil.getVideoDuration(methodCall),
|
value(methodCall, "videoType"),
|
||||||
CommonUtil.getVideoSnapshotPath(methodCall)));
|
int2long(methodCall, "duration"),
|
||||||
|
value(methodCall, "snapshotPath")));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createVideoMessageFromFullPath(MethodCall methodCall, MethodChannel.Result result) {
|
public void createVideoMessageFromFullPath(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
CommonUtil.runMainThreadReturn(result,
|
CommonUtil.runMainThreadReturn(result,
|
||||||
Open_im_sdk.createVideoMessageFromFullPath(
|
Open_im_sdk.createVideoMessageFromFullPath(
|
||||||
CommonUtil.getVideoPath(methodCall),
|
value(methodCall, "operationID"),
|
||||||
CommonUtil.getVideoType(methodCall),
|
value(methodCall, "videoPath"),
|
||||||
CommonUtil.getVideoDuration(methodCall),
|
value(methodCall, "videoType"),
|
||||||
CommonUtil.getVideoSnapshotPath(methodCall)));
|
int2long(methodCall, "duration"),
|
||||||
|
value(methodCall, "snapshotPath")));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createFileMessage(MethodCall methodCall, MethodChannel.Result result) {
|
public void createFileMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
CommonUtil.runMainThreadReturn(result,
|
CommonUtil.runMainThreadReturn(result,
|
||||||
Open_im_sdk.createFileMessage(
|
Open_im_sdk.createFileMessage(
|
||||||
CommonUtil.getFilePath(methodCall),
|
value(methodCall, "operationID"),
|
||||||
CommonUtil.getFileName(methodCall)));
|
value(methodCall, "filePath"),
|
||||||
|
value(methodCall, "fileName")));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createFileMessageFromFullPath(MethodCall methodCall, MethodChannel.Result result) {
|
public void createFileMessageFromFullPath(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
CommonUtil.runMainThreadReturn(result,
|
CommonUtil.runMainThreadReturn(result,
|
||||||
Open_im_sdk.createFileMessageFromFullPath(
|
Open_im_sdk.createFileMessageFromFullPath(
|
||||||
CommonUtil.getFilePath(methodCall),
|
value(methodCall, "operationID"),
|
||||||
CommonUtil.getFileName(methodCall)));
|
value(methodCall, "filePath"),
|
||||||
|
value(methodCall, "fileName")));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createMergerMessage(MethodCall methodCall, MethodChannel.Result result) {
|
public void createMergerMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
CommonUtil.runMainThreadReturn(result,
|
CommonUtil.runMainThreadReturn(result,
|
||||||
Open_im_sdk.createMergerMessage(
|
Open_im_sdk.createMergerMessage(
|
||||||
CommonUtil.getMergerMessageList(methodCall),
|
value(methodCall, "operationID"),
|
||||||
CommonUtil.getMergerMessageTitle(methodCall),
|
jsonValue(methodCall, "messageList"),
|
||||||
CommonUtil.getSummaryList(methodCall)));
|
value(methodCall, "title"),
|
||||||
|
jsonValue(methodCall, "summaryList")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void createForwardMessage(MethodCall methodCall, MethodChannel.Result result) {
|
public void createForwardMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
CommonUtil.runMainThreadReturn(result,
|
CommonUtil.runMainThreadReturn(result,
|
||||||
Open_im_sdk.createForwardMessage(
|
Open_im_sdk.createForwardMessage(
|
||||||
CommonUtil.getForwardMessage(methodCall)));
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall, "message")));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createLocationMessage(MethodCall methodCall, MethodChannel.Result result) {
|
public void createLocationMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
CommonUtil.runMainThreadReturn(result, Open_im_sdk.createLocationMessage(
|
CommonUtil.runMainThreadReturn(result, Open_im_sdk.createLocationMessage(
|
||||||
CommonUtil.getMessageDes(methodCall),
|
value(methodCall, "operationID"),
|
||||||
CommonUtil.getLocationLongitude(methodCall),
|
value(methodCall, "description"),
|
||||||
CommonUtil.getLocationLatitude(methodCall)
|
value(methodCall, "longitude"),
|
||||||
|
value(methodCall, "latitude")
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createCustomMessage(MethodCall methodCall, MethodChannel.Result result) {
|
public void createCustomMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
CommonUtil.runMainThreadReturn(result, Open_im_sdk.createCustomMessage(
|
CommonUtil.runMainThreadReturn(result, Open_im_sdk.createCustomMessage(
|
||||||
CommonUtil.getCustomMessageData(methodCall),
|
value(methodCall, "operationID"),
|
||||||
CommonUtil.getCustomMessageExt(methodCall),
|
value(methodCall, "data"),
|
||||||
CommonUtil.getMessageDes(methodCall)
|
value(methodCall, "extension"),
|
||||||
|
value(methodCall, "description")
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createQuoteMessage(MethodCall methodCall, MethodChannel.Result result) {
|
public void createQuoteMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
CommonUtil.runMainThreadReturn(result, Open_im_sdk.createQuoteMessage(
|
CommonUtil.runMainThreadReturn(result, Open_im_sdk.createQuoteMessage(
|
||||||
CommonUtil.getQuoteMessageText(methodCall),
|
value(methodCall, "operationID"),
|
||||||
CommonUtil.getQuoteMessageBody(methodCall)
|
value(methodCall, "quoteText"),
|
||||||
|
jsonValue(methodCall, "quoteMessage")
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createCardMessage(MethodCall methodCall, MethodChannel.Result result) {
|
public void createCardMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
CommonUtil.runMainThreadReturn(result, Open_im_sdk.createCardMessage(
|
CommonUtil.runMainThreadReturn(result, Open_im_sdk.createCardMessage(
|
||||||
CommonUtil.getCardMessage(methodCall)
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall, "cardMessage")
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void forceSyncMsg(MethodCall methodCall, MethodChannel.Result result) {
|
public void createFaceMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.forceSyncMsg();
|
CommonUtil.runMainThreadReturn(result, Open_im_sdk.createFaceMessage(
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
int2long(methodCall, "index"),
|
||||||
|
value(methodCall, "data")
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void createAdvancedTextMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
CommonUtil.runMainThreadReturn(result,
|
||||||
|
Open_im_sdk.createAdvancedTextMessage(
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "text"),
|
||||||
|
jsonValue(methodCall, "richMessageInfoList")
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void createAdvancedQuoteMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
CommonUtil.runMainThreadReturn(result,
|
||||||
|
Open_im_sdk.createAdvancedQuoteMessage(
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "quoteText"),
|
||||||
|
jsonValue(methodCall, "quoteMessage"),
|
||||||
|
jsonValue(methodCall, "richMessageInfoList")
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void searchLocalMessages(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.searchLocalMessages(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall, "filter")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void clearConversationAndDeleteAllMsg(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.clearConversationAndDeleteAllMsg(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "conversationID")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void getAdvancedHistoryMessageList(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.getAdvancedHistoryMessageList(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void getAdvancedHistoryMessageListReverse(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.getAdvancedHistoryMessageListReverse(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void findMessageList(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.findMessageList(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall, "searchParams")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void sendMessageNotOss(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.sendMessageNotOss(
|
||||||
|
new OnMsgSendListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall, "message"),
|
||||||
|
value(methodCall, "userID"),
|
||||||
|
value(methodCall, "groupID"),
|
||||||
|
jsonValue(methodCall, "offlinePushInfo")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void createImageMessageByURL(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
CommonUtil.runMainThreadReturn(result,
|
||||||
|
Open_im_sdk.createImageMessageByURL(
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall, "sourcePicture"),
|
||||||
|
jsonValue(methodCall, "bigPicture"),
|
||||||
|
jsonValue(methodCall, "snapshotPicture")));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void createSoundMessageByURL(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
CommonUtil.runMainThreadReturn(result,
|
||||||
|
Open_im_sdk.createSoundMessageByURL(
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall, "soundElem")));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void createVideoMessageByURL(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
CommonUtil.runMainThreadReturn(result,
|
||||||
|
Open_im_sdk.createVideoMessageByURL(
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall, "videoElem")));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void createFileMessageByURL(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
CommonUtil.runMainThreadReturn(result,
|
||||||
|
Open_im_sdk.createFileMessageByURL(
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall, "fileElem")));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCustomBusinessListener(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.setCustomBusinessListener(new OnCustomBusinessListener());
|
||||||
|
|
||||||
|
result.success(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMessageKvInfoListener(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.setMessageKvInfoListener(new OnMessageKvInfoListener());
|
||||||
|
|
||||||
|
result.success(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
// public void setMessageReactionExtensions(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
// Open_im_sdk.setMessageReactionExtensions(
|
||||||
|
// new OnBaseListener(result, methodCall),
|
||||||
|
// value(methodCall, "operationID"),
|
||||||
|
// jsonValue(methodCall, "message"),
|
||||||
|
// jsonValue(methodCall, "list")
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public void deleteMessageReactionExtensions(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
// Open_im_sdk.deleteMessageReactionExtensions(
|
||||||
|
// new OnBaseListener(result, methodCall),
|
||||||
|
// value(methodCall, "operationID"),
|
||||||
|
// jsonValue(methodCall, "message"),
|
||||||
|
// jsonValue(methodCall, "list")
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public void getMessageListReactionExtensions(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
// Open_im_sdk.getMessageListReactionExtensions(
|
||||||
|
// new OnBaseListener(result, methodCall),
|
||||||
|
// value(methodCall, "operationID"),
|
||||||
|
// jsonValue(methodCall, "messageList")
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public void addMessageReactionExtensions(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
// Open_im_sdk.addMessageReactionExtensions(
|
||||||
|
// new OnBaseListener(result, methodCall),
|
||||||
|
// value(methodCall, "operationID"),
|
||||||
|
// jsonValue(methodCall, "message"),
|
||||||
|
// jsonValue(methodCall, "list")
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public void getMessageListSomeReactionExtensions(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
// Open_im_sdk.getMessageListSomeReactionExtensions(
|
||||||
|
// new OnBaseListener(result, methodCall),
|
||||||
|
// value(methodCall, "operationID"),
|
||||||
|
// jsonValue(methodCall, "messageList"),
|
||||||
|
// jsonValue(methodCall, "list")
|
||||||
|
// );
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package io.openim.flutter_openim_sdk.manager;
|
||||||
|
|
||||||
|
import io.flutter.plugin.common.MethodCall;
|
||||||
|
import io.flutter.plugin.common.MethodChannel;
|
||||||
|
import io.openim.flutter_openim_sdk.listener.OnBaseListener;
|
||||||
|
import io.openim.flutter_openim_sdk.listener.OnUserListener;
|
||||||
|
import open_im_sdk.Open_im_sdk;
|
||||||
|
|
||||||
|
public class UserManager extends BaseManager {
|
||||||
|
|
||||||
|
public void setUserListener(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.setUserListener(new OnUserListener());
|
||||||
|
|
||||||
|
result.success(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void getUsersInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.getUsersInfo(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall, "userIDList"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSelfInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.setSelfInfo(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void getSelfUserInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.getSelfUserInfo(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,11 +3,11 @@ package io.openim.flutter_openim_sdk.util;
|
|||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import androidx.collection.ArrayMap;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import io.flutter.Log;
|
import io.flutter.Log;
|
||||||
import io.flutter.plugin.common.MethodCall;
|
|
||||||
import io.flutter.plugin.common.MethodChannel;
|
import io.flutter.plugin.common.MethodChannel;
|
||||||
import io.openim.flutter_openim_sdk.FlutterOpenimSdkPlugin;
|
import io.openim.flutter_openim_sdk.FlutterOpenimSdkPlugin;
|
||||||
|
|
||||||
@@ -15,18 +15,6 @@ import io.openim.flutter_openim_sdk.FlutterOpenimSdkPlugin;
|
|||||||
public class CommonUtil {
|
public class CommonUtil {
|
||||||
private final static Handler MAIN_HANDLER = new Handler(Looper.getMainLooper());
|
private final static Handler MAIN_HANDLER = new Handler(Looper.getMainLooper());
|
||||||
|
|
||||||
public static <T> T getParamValue(MethodCall methodCall, String param) {
|
|
||||||
return methodCall.argument(param);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getSDKJsonParam(MethodCall methodCall, String key) {
|
|
||||||
return JsonUtil.toString(methodCall.argument(key));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getSDKJsonParam(MethodCall methodCall) {
|
|
||||||
return JsonUtil.toString(methodCall.arguments);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void runMainThreadReturn(final MethodChannel.Result result, final Object param) {
|
public static void runMainThreadReturn(final MethodChannel.Result result, final Object param) {
|
||||||
MAIN_HANDLER.post(() -> result.success(param));
|
MAIN_HANDLER.post(() -> result.success(param));
|
||||||
}
|
}
|
||||||
@@ -44,9 +32,9 @@ public class CommonUtil {
|
|||||||
runMainThreadReturnError(result, String.valueOf(errorCode), errorMessage, errorDetails);
|
runMainThreadReturnError(result, String.valueOf(errorCode), errorMessage, errorDetails);
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized static <T> void emitEvent(String method, String type, Long errCode, String errMsg, T data) {
|
public synchronized static <T> void emitEvent(String method, String type, Object errCode, String errMsg, T data) {
|
||||||
runMainThread(() -> {
|
runMainThread(() -> {
|
||||||
HashMap<String, Object> res = new HashMap<>();
|
Map<String, Object> res = new ArrayMap<>();
|
||||||
if (null != type) {
|
if (null != type) {
|
||||||
res.put("type", type);
|
res.put("type", type);
|
||||||
}
|
}
|
||||||
@@ -67,288 +55,4 @@ public class CommonUtil {
|
|||||||
public static <T> void emitEvent(String method, String type, T data) {
|
public static <T> void emitEvent(String method, String type, T data) {
|
||||||
emitEvent(method, type, null, null, data);
|
emitEvent(method, type, null, null, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////
|
|
||||||
//////////////////////////////////////
|
|
||||||
public static String getUid(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_UID);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getJsonUid(MethodCall methodCall) {
|
|
||||||
return getSDKJsonParam(methodCall, KEY_UID);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getToken(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_TOKEN);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getUidList(MethodCall methodCall) {
|
|
||||||
return getSDKJsonParam(methodCall, KEY_USER_IDS);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getMessageText(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_TEXT);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getAtUserList(MethodCall methodCall) {
|
|
||||||
return getSDKJsonParam(methodCall, KEY_AT_USER_LIST);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getImagePath(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_IMAGE_PATH);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getSoundPath(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_SOUND_PATH);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static long getSoundDuration(MethodCall methodCall) {
|
|
||||||
Integer i = getParamValue(methodCall, KEY_SOUND_DURATION);
|
|
||||||
return Long.valueOf(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getVideoPath(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_VIDEO_PATH);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getVideoType(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_VIDEO_TYPE);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static long getVideoDuration(MethodCall methodCall) {
|
|
||||||
Integer i = getParamValue(methodCall, KEY_VIDEO_DURATION);
|
|
||||||
return Long.valueOf(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getVideoSnapshotPath(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_VIDEO_SNAPSHOT_PATH);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getFilePath(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_FILE_PATH);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getFileName(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_FILE_NAME);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getMergerMessageList(MethodCall methodCall) {
|
|
||||||
return getSDKJsonParam(methodCall, KEY_MERGER_MESSAGE_LIST);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getMergerMessageTitle(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_MERGER_MESSAGE_TITLE);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getSummaryList(MethodCall methodCall) {
|
|
||||||
return getSDKJsonParam(methodCall, KEY_SUMMARY_LIST);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getForwardMessage(MethodCall methodCall) {
|
|
||||||
return getSDKJsonParam(methodCall, KEY_FORWARD_MESSAGE);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getSendMessageContent(MethodCall methodCall) {
|
|
||||||
return getSDKJsonParam(methodCall, KEY_SEND_MESSAGE_CONTENT);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Object getSendMessageClientMsgID(MethodCall methodCall) {
|
|
||||||
Map<String, Object> map = getParamValue(methodCall, KEY_SEND_MESSAGE_CONTENT);
|
|
||||||
return map.get(KEY_SEND_MESSAGE_CONTENT_CLIENT_ID);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getSendMessageReceiver(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_SEND_MESSAGE_RECEIVER);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String geSendMessageGroupId(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_SEND_MESSAGE_GROUP_ID);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean getSendMessageOnlineOnly(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_SEND_MESSAGE_ONLINE_ONLY);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getSingleMessageContent(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_SINGLE_MESSAGE_CONTENT);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getSingleMessageUserid(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_SINGLE_MESSAGE_USERID);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getGroupMessageGroupid(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_GROUP_MESSAGE_GROUPID);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getSingleMessageSender(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_SINGLE_MESSAGE_SENDER);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getSingleMessageTyping(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_SINGLE_MESSAGE_TYPING);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getMessageIdList(MethodCall methodCall) {
|
|
||||||
return getSDKJsonParam(methodCall, KEY_FIND_MESSAGE_IDS);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getConversationId(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_CONVERSATION_ID);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getConversationIds(MethodCall methodCall) {
|
|
||||||
return getSDKJsonParam(methodCall, KEY_CONVERSATION_IDS);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getConversationSourceId(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_CONVERSATION_SOURCE_ID);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int getConversationSessionType(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_CONVERSATION_SESSION_TYPE);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getConversationDraft(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_CONVERSATION_DRAFT);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean isPinnedConversation(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_CONVERSATION_PINNED);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getGid(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_GROUP_ID);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getGidList(MethodCall methodCall) {
|
|
||||||
return getSDKJsonParam(methodCall, KEY_GROUP_IDS);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getGroupOpReason(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_GROUP_OP_REASON);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int getGroupListFilter(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_GROUP_LIST_FILTER);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int getGroupListNext(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_GROUP_LIST_NEXT);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getGroupInfo(MethodCall methodCall) {
|
|
||||||
return getSDKJsonParam(methodCall, KEY_GROUP_INFO);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getGroupMemberRoleList(MethodCall methodCall) {
|
|
||||||
return getSDKJsonParam(methodCall, KEY_GROUP_MEMBER_ROLE_LIST);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getGroupApplicationInfo(MethodCall methodCall) {
|
|
||||||
return getSDKJsonParam(methodCall, KEY_GROUP_APPLICATION_INFO);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public static double getLocationLatitude(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_LOCATION_MESSAGE_LA);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static double getLocationLongitude(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_LOCATION_MESSAGE_LO);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getMessageDes(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_MESSAGE_DES);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getCustomMessageData(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_CUSTOM_MESSAGE_DATA);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getCustomMessageExt(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_CUSTOM_MESSAGE_EXT);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getQuoteMessageText(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_QUOTE_MESSAGE_TEXT);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getQuoteMessageBody(MethodCall methodCall) {
|
|
||||||
return getSDKJsonParam(methodCall, KEY_QUOTE_MESSAGE_BODY);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getCardMessage(MethodCall methodCall) {
|
|
||||||
return getSDKJsonParam(methodCall, KEY_CARD_MESSAGE);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int getSDKLog(MethodCall methodCall) {
|
|
||||||
return getParamValue(methodCall, KEY_SDK_LOG);
|
|
||||||
}
|
|
||||||
|
|
||||||
//login
|
|
||||||
final static String KEY_UID = "uid";
|
|
||||||
final static String KEY_TOKEN = "token";
|
|
||||||
//create message body
|
|
||||||
final static String KEY_TEXT = "text";
|
|
||||||
final static String KEY_AT_USER_LIST = "atUserList";
|
|
||||||
final static String KEY_IMAGE_PATH = "imagePath";
|
|
||||||
final static String KEY_SOUND_PATH = "soundPath";
|
|
||||||
final static String KEY_SOUND_DURATION = "duration";
|
|
||||||
final static String KEY_VIDEO_PATH = "videoPath";
|
|
||||||
final static String KEY_VIDEO_TYPE = "videoType";
|
|
||||||
final static String KEY_VIDEO_DURATION = "duration";
|
|
||||||
final static String KEY_VIDEO_SNAPSHOT_PATH = "snapshotPath";
|
|
||||||
final static String KEY_FILE_PATH = "filePath";
|
|
||||||
final static String KEY_FILE_NAME = "fileName";
|
|
||||||
final static String KEY_MERGER_MESSAGE_LIST = "messageList";
|
|
||||||
final static String KEY_MERGER_MESSAGE_TITLE = "title";
|
|
||||||
final static String KEY_SUMMARY_LIST = "summaryList";
|
|
||||||
final static String KEY_FORWARD_MESSAGE = "message";
|
|
||||||
final static String KEY_LOCATION_MESSAGE_LO = "longitude";
|
|
||||||
final static String KEY_LOCATION_MESSAGE_LA = "latitude";
|
|
||||||
final static String KEY_MESSAGE_DES = "description";
|
|
||||||
final static String KEY_CUSTOM_MESSAGE_DATA = "data";
|
|
||||||
final static String KEY_CUSTOM_MESSAGE_EXT = "extension";
|
|
||||||
final static String KEY_QUOTE_MESSAGE_TEXT = "quoteText";
|
|
||||||
final static String KEY_QUOTE_MESSAGE_BODY = "quoteMessage";
|
|
||||||
final static String KEY_CARD_MESSAGE = "cardMessage";
|
|
||||||
//send message
|
|
||||||
final static String KEY_SEND_MESSAGE_CONTENT = "message";
|
|
||||||
final static String KEY_SEND_MESSAGE_CONTENT_CLIENT_ID = "clientMsgID";
|
|
||||||
final static String KEY_SEND_MESSAGE_RECEIVER = "receiver";
|
|
||||||
final static String KEY_SEND_MESSAGE_GROUP_ID = "groupID";
|
|
||||||
final static String KEY_SEND_MESSAGE_ONLINE_ONLY = "onlineUserOnly";
|
|
||||||
//single chat
|
|
||||||
final static String KEY_SINGLE_MESSAGE_CONTENT = "message";
|
|
||||||
final static String KEY_SINGLE_MESSAGE_USERID = "userID";
|
|
||||||
final static String KEY_SINGLE_MESSAGE_SENDER = "sender";
|
|
||||||
final static String KEY_SINGLE_MESSAGE_TYPING = "typing";
|
|
||||||
//group chat
|
|
||||||
final static String KEY_GROUP_MESSAGE_GROUPID = "groupID";
|
|
||||||
// find message
|
|
||||||
final static String KEY_FIND_MESSAGE_IDS = "messageIDList";
|
|
||||||
// conversation
|
|
||||||
final static String KEY_CONVERSATION_ID = "conversationID";
|
|
||||||
final static String KEY_CONVERSATION_IDS = "conversationIDList";
|
|
||||||
final static String KEY_CONVERSATION_DRAFT = "draftText";
|
|
||||||
final static String KEY_CONVERSATION_PINNED = "isPinned";
|
|
||||||
final static String KEY_CONVERSATION_SOURCE_ID = "sourceID";
|
|
||||||
final static String KEY_CONVERSATION_SESSION_TYPE = "sessionType";
|
|
||||||
// user info
|
|
||||||
final static String KEY_USER_IDS = "uidList";
|
|
||||||
// group
|
|
||||||
final static String KEY_GROUP_ID = "gid";
|
|
||||||
final static String KEY_GROUP_IDS = "gidList";
|
|
||||||
final static String KEY_GROUP_OP_REASON = "reason";
|
|
||||||
// final static String KEY_GROUP_USER_ID = "uid";
|
|
||||||
// final static String KEY_GROUP_USER_IDS = "uidList";
|
|
||||||
final static String KEY_GROUP_LIST_FILTER = "filter";
|
|
||||||
final static String KEY_GROUP_LIST_NEXT = "next";
|
|
||||||
final static String KEY_GROUP_INFO = "gInfo";
|
|
||||||
final static String KEY_GROUP_MEMBER_ROLE_LIST = "memberList";
|
|
||||||
final static String KEY_GROUP_APPLICATION_INFO = "application";
|
|
||||||
//
|
|
||||||
final static String KEY_SDK_LOG = "sdkLog";
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,8 +4,9 @@ import org.json.JSONObject;
|
|||||||
|
|
||||||
public class JsonUtil {
|
public class JsonUtil {
|
||||||
public static String toString(Object o) {
|
public static String toString(Object o) {
|
||||||
|
if (o == null) return null;
|
||||||
if (o instanceof String) {
|
if (o instanceof String) {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("\"");
|
buffer.append("\"");
|
||||||
buffer.append(o);
|
buffer.append(o);
|
||||||
buffer.append("\"");
|
buffer.append("\"");
|
||||||
|
|||||||
@@ -21,6 +21,6 @@
|
|||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>1.0</string>
|
<string>1.0</string>
|
||||||
<key>MinimumOSVersion</key>
|
<key>MinimumOSVersion</key>
|
||||||
<string>9.0</string>
|
<string>11.0</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Uncomment this line to define a global platform for your project
|
# Uncomment this line to define a global platform for your project
|
||||||
# platform :ios, '9.0'
|
platform :ios, '11.0'
|
||||||
|
|
||||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||||
|
|||||||
29
example/ios/Podfile.lock
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
PODS:
|
||||||
|
- Flutter (1.0.0)
|
||||||
|
- flutter_openim_sdk (0.0.1):
|
||||||
|
- Flutter
|
||||||
|
- OpenIMSDKCore (= 3.0.0)
|
||||||
|
- "OpenIMSDKCore (3.0.0+1)"
|
||||||
|
|
||||||
|
DEPENDENCIES:
|
||||||
|
- Flutter (from `Flutter`)
|
||||||
|
- flutter_openim_sdk (from `.symlinks/plugins/flutter_openim_sdk/ios`)
|
||||||
|
|
||||||
|
SPEC REPOS:
|
||||||
|
trunk:
|
||||||
|
- OpenIMSDKCore
|
||||||
|
|
||||||
|
EXTERNAL SOURCES:
|
||||||
|
Flutter:
|
||||||
|
:path: Flutter
|
||||||
|
flutter_openim_sdk:
|
||||||
|
:path: ".symlinks/plugins/flutter_openim_sdk/ios"
|
||||||
|
|
||||||
|
SPEC CHECKSUMS:
|
||||||
|
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
|
||||||
|
flutter_openim_sdk: 12daf3769f8bf40001970304445b6155c146b7eb
|
||||||
|
OpenIMSDKCore: 2e38a5b9be23e588b5049ebd378161cf277e41a0
|
||||||
|
|
||||||
|
PODFILE CHECKSUM: 7368163408c647b7eb699d0d788ba6718e18fb8d
|
||||||
|
|
||||||
|
COCOAPODS: 1.11.2
|
||||||
@@ -3,14 +3,14 @@
|
|||||||
archiveVersion = 1;
|
archiveVersion = 1;
|
||||||
classes = {
|
classes = {
|
||||||
};
|
};
|
||||||
objectVersion = 46;
|
objectVersion = 54;
|
||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
||||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||||
6F7F8B794B6D663E7A65A104 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1971A63CCEC4B744C25980F8 /* Pods_Runner.framework */; };
|
|
||||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
||||||
|
79CF11091A38454F94DA1EB4 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2F48A41A58786A29BEEBCFE3 /* Pods_Runner.framework */; };
|
||||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
||||||
@@ -30,16 +30,16 @@
|
|||||||
/* End PBXCopyFilesBuildPhase section */
|
/* End PBXCopyFilesBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
076751BE520B721535096B75 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
|
|
||||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
||||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
||||||
1971A63CCEC4B744C25980F8 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
2F48A41A58786A29BEEBCFE3 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
3A6AB9CCD90A2F5C2CE719D0 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
|
||||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
||||||
|
3F8F3496860058CED33C418C /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
564E6205C72C7CB32AC49601 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
|
||||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||||
7CF14C3CACE83F04F858C9EC /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
85A1617DD2AFC45DFFDD8B11 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
||||||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
|
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
|
||||||
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
||||||
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
@@ -54,17 +54,17 @@
|
|||||||
isa = PBXFrameworksBuildPhase;
|
isa = PBXFrameworksBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
6F7F8B794B6D663E7A65A104 /* Pods_Runner.framework in Frameworks */,
|
79CF11091A38454F94DA1EB4 /* Pods_Runner.framework in Frameworks */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
/* End PBXFrameworksBuildPhase section */
|
/* End PBXFrameworksBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXGroup section */
|
/* Begin PBXGroup section */
|
||||||
4B877210D623EE0FDE18A08F /* Frameworks */ = {
|
0EDFEBEB76AE7FAFA44EF2AF /* Frameworks */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
1971A63CCEC4B744C25980F8 /* Pods_Runner.framework */,
|
2F48A41A58786A29BEEBCFE3 /* Pods_Runner.framework */,
|
||||||
);
|
);
|
||||||
name = Frameworks;
|
name = Frameworks;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
97C146F01CF9000F007C117D /* Runner */,
|
97C146F01CF9000F007C117D /* Runner */,
|
||||||
97C146EF1CF9000F007C117D /* Products */,
|
97C146EF1CF9000F007C117D /* Products */,
|
||||||
E653626F5A38799455FF26C4 /* Pods */,
|
E653626F5A38799455FF26C4 /* Pods */,
|
||||||
4B877210D623EE0FDE18A08F /* Frameworks */,
|
0EDFEBEB76AE7FAFA44EF2AF /* Frameworks */,
|
||||||
);
|
);
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
@@ -117,11 +117,10 @@
|
|||||||
E653626F5A38799455FF26C4 /* Pods */ = {
|
E653626F5A38799455FF26C4 /* Pods */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
7CF14C3CACE83F04F858C9EC /* Pods-Runner.debug.xcconfig */,
|
85A1617DD2AFC45DFFDD8B11 /* Pods-Runner.debug.xcconfig */,
|
||||||
3A6AB9CCD90A2F5C2CE719D0 /* Pods-Runner.release.xcconfig */,
|
3F8F3496860058CED33C418C /* Pods-Runner.release.xcconfig */,
|
||||||
076751BE520B721535096B75 /* Pods-Runner.profile.xcconfig */,
|
564E6205C72C7CB32AC49601 /* Pods-Runner.profile.xcconfig */,
|
||||||
);
|
);
|
||||||
name = Pods;
|
|
||||||
path = Pods;
|
path = Pods;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
@@ -132,14 +131,13 @@
|
|||||||
isa = PBXNativeTarget;
|
isa = PBXNativeTarget;
|
||||||
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||||
buildPhases = (
|
buildPhases = (
|
||||||
FA9CAD2EF743D14467F7D993 /* [CP] Check Pods Manifest.lock */,
|
DFE84742E2B41158E8703A14 /* [CP] Check Pods Manifest.lock */,
|
||||||
9740EEB61CF901F6004384FC /* Run Script */,
|
9740EEB61CF901F6004384FC /* Run Script */,
|
||||||
97C146EA1CF9000F007C117D /* Sources */,
|
97C146EA1CF9000F007C117D /* Sources */,
|
||||||
97C146EB1CF9000F007C117D /* Frameworks */,
|
97C146EB1CF9000F007C117D /* Frameworks */,
|
||||||
97C146EC1CF9000F007C117D /* Resources */,
|
97C146EC1CF9000F007C117D /* Resources */,
|
||||||
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
||||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
||||||
215A1CA82008A326A8ECBF65 /* [CP] Embed Pods Frameworks */,
|
|
||||||
);
|
);
|
||||||
buildRules = (
|
buildRules = (
|
||||||
);
|
);
|
||||||
@@ -156,7 +154,7 @@
|
|||||||
97C146E61CF9000F007C117D /* Project object */ = {
|
97C146E61CF9000F007C117D /* Project object */ = {
|
||||||
isa = PBXProject;
|
isa = PBXProject;
|
||||||
attributes = {
|
attributes = {
|
||||||
LastUpgradeCheck = 1020;
|
LastUpgradeCheck = 1300;
|
||||||
ORGANIZATIONNAME = "";
|
ORGANIZATIONNAME = "";
|
||||||
TargetAttributes = {
|
TargetAttributes = {
|
||||||
97C146ED1CF9000F007C117D = {
|
97C146ED1CF9000F007C117D = {
|
||||||
@@ -198,25 +196,9 @@
|
|||||||
/* End PBXResourcesBuildPhase section */
|
/* End PBXResourcesBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXShellScriptBuildPhase section */
|
/* Begin PBXShellScriptBuildPhase section */
|
||||||
215A1CA82008A326A8ECBF65 /* [CP] Embed Pods Frameworks */ = {
|
|
||||||
isa = PBXShellScriptBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
);
|
|
||||||
inputFileListPaths = (
|
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
|
||||||
);
|
|
||||||
name = "[CP] Embed Pods Frameworks";
|
|
||||||
outputFileListPaths = (
|
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
shellPath = /bin/sh;
|
|
||||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
|
||||||
showEnvVarsInLog = 0;
|
|
||||||
};
|
|
||||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
alwaysOutOfDate = 1;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
);
|
);
|
||||||
@@ -231,6 +213,7 @@
|
|||||||
};
|
};
|
||||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
alwaysOutOfDate = 1;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
);
|
);
|
||||||
@@ -243,7 +226,7 @@
|
|||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
||||||
};
|
};
|
||||||
FA9CAD2EF743D14467F7D993 /* [CP] Check Pods Manifest.lock */ = {
|
DFE84742E2B41158E8703A14 /* [CP] Check Pods Manifest.lock */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
@@ -303,6 +286,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
ARCHS = arm64;
|
||||||
CLANG_ANALYZER_NONNULL = YES;
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
@@ -340,7 +324,7 @@
|
|||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
SUPPORTED_PLATFORMS = iphoneos;
|
SUPPORTED_PLATFORMS = iphoneos;
|
||||||
@@ -353,13 +337,18 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
|
ARCHS = "$(ARCHS_STANDARD)";
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
|
DEVELOPMENT_TEAM = BDLHL8GNFV;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = io.openim.flutterOpenimSdkExample;
|
"$(inherited)",
|
||||||
|
"@executable_path/Frameworks",
|
||||||
|
);
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = cn.rentsoft.uni;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
@@ -371,6 +360,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
ARCHS = arm64;
|
||||||
CLANG_ANALYZER_NONNULL = YES;
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
@@ -414,7 +404,7 @@
|
|||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = YES;
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
@@ -426,6 +416,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
ARCHS = arm64;
|
||||||
CLANG_ANALYZER_NONNULL = YES;
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
@@ -463,11 +454,12 @@
|
|||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
SUPPORTED_PLATFORMS = iphoneos;
|
SUPPORTED_PLATFORMS = iphoneos;
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
SWIFT_COMPILATION_MODE = wholemodule;
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
VALIDATE_PRODUCT = YES;
|
VALIDATE_PRODUCT = YES;
|
||||||
};
|
};
|
||||||
@@ -477,13 +469,18 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
|
ARCHS = "$(ARCHS_STANDARD)";
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
|
DEVELOPMENT_TEAM = BDLHL8GNFV;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = io.openim.flutterOpenimSdkExample;
|
"$(inherited)",
|
||||||
|
"@executable_path/Frameworks",
|
||||||
|
);
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = cn.rentsoft.uni;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
@@ -496,13 +493,18 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
|
ARCHS = "$(ARCHS_STANDARD)";
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
|
DEVELOPMENT_TEAM = BDLHL8GNFV;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = io.openim.flutterOpenimSdkExample;
|
"$(inherited)",
|
||||||
|
"@executable_path/Frameworks",
|
||||||
|
);
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = cn.rentsoft.uni;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Scheme
|
<Scheme
|
||||||
LastUpgradeVersion = "1020"
|
LastUpgradeVersion = "1300"
|
||||||
version = "1.3">
|
version = "1.3">
|
||||||
<BuildAction
|
<BuildAction
|
||||||
parallelizeBuildables = "YES"
|
parallelizeBuildables = "YES"
|
||||||
|
|||||||
@@ -1,122 +1,103 @@
|
|||||||
{
|
{
|
||||||
"images" : [
|
"images" : [
|
||||||
{
|
{
|
||||||
"size" : "20x20",
|
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"filename" : "Icon-App-20x20@2x.png",
|
"scale" : "2x",
|
||||||
"scale" : "2x"
|
"size" : "20x20"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "20x20",
|
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"filename" : "Icon-App-20x20@3x.png",
|
"scale" : "3x",
|
||||||
"scale" : "3x"
|
"size" : "20x20"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "29x29",
|
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"filename" : "Icon-App-29x29@1x.png",
|
"scale" : "1x",
|
||||||
"scale" : "1x"
|
"size" : "29x29"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "29x29",
|
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"filename" : "Icon-App-29x29@2x.png",
|
"scale" : "2x",
|
||||||
"scale" : "2x"
|
"size" : "29x29"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "29x29",
|
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"filename" : "Icon-App-29x29@3x.png",
|
"scale" : "3x",
|
||||||
"scale" : "3x"
|
"size" : "29x29"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "40x40",
|
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"filename" : "Icon-App-40x40@2x.png",
|
"scale" : "2x",
|
||||||
"scale" : "2x"
|
"size" : "40x40"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "40x40",
|
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"filename" : "Icon-App-40x40@3x.png",
|
"scale" : "3x",
|
||||||
"scale" : "3x"
|
"size" : "40x40"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "60x60",
|
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"filename" : "Icon-App-60x60@2x.png",
|
"scale" : "2x",
|
||||||
"scale" : "2x"
|
"size" : "60x60"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "60x60",
|
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"filename" : "Icon-App-60x60@3x.png",
|
"scale" : "3x",
|
||||||
"scale" : "3x"
|
"size" : "60x60"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "20x20",
|
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"filename" : "Icon-App-20x20@1x.png",
|
"scale" : "1x",
|
||||||
"scale" : "1x"
|
"size" : "20x20"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "20x20",
|
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"filename" : "Icon-App-20x20@2x.png",
|
"scale" : "2x",
|
||||||
"scale" : "2x"
|
"size" : "20x20"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "29x29",
|
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"filename" : "Icon-App-29x29@1x.png",
|
"scale" : "1x",
|
||||||
"scale" : "1x"
|
"size" : "29x29"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "29x29",
|
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"filename" : "Icon-App-29x29@2x.png",
|
"scale" : "2x",
|
||||||
"scale" : "2x"
|
"size" : "29x29"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "40x40",
|
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"filename" : "Icon-App-40x40@1x.png",
|
"scale" : "1x",
|
||||||
"scale" : "1x"
|
"size" : "40x40"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "40x40",
|
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"filename" : "Icon-App-40x40@2x.png",
|
"scale" : "2x",
|
||||||
"scale" : "2x"
|
"size" : "40x40"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "76x76",
|
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"filename" : "Icon-App-76x76@1x.png",
|
"scale" : "1x",
|
||||||
"scale" : "1x"
|
"size" : "76x76"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "76x76",
|
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"filename" : "Icon-App-76x76@2x.png",
|
"scale" : "2x",
|
||||||
"scale" : "2x"
|
"size" : "76x76"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "83.5x83.5",
|
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"filename" : "Icon-App-83.5x83.5@2x.png",
|
"scale" : "2x",
|
||||||
"scale" : "2x"
|
"size" : "83.5x83.5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "1024x1024",
|
|
||||||
"idiom" : "ios-marketing",
|
"idiom" : "ios-marketing",
|
||||||
"filename" : "Icon-App-1024x1024@1x.png",
|
"scale" : "1x",
|
||||||
"scale" : "1x"
|
"size" : "1024x1024"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"info" : {
|
"info" : {
|
||||||
"version" : 1,
|
"author" : "xcode",
|
||||||
"author" : "xcode"
|
"version" : 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 564 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
@@ -2,22 +2,19 @@
|
|||||||
"images" : [
|
"images" : [
|
||||||
{
|
{
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"filename" : "LaunchImage.png",
|
|
||||||
"scale" : "1x"
|
"scale" : "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"filename" : "LaunchImage@2x.png",
|
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"filename" : "LaunchImage@3x.png",
|
|
||||||
"scale" : "3x"
|
"scale" : "3x"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"info" : {
|
"info" : {
|
||||||
"version" : 1,
|
"author" : "xcode",
|
||||||
"author" : "xcode"
|
"version" : 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 68 B |
|
Before Width: | Height: | Size: 68 B |
|
Before Width: | Height: | Size: 68 B |
@@ -2,6 +2,8 @@
|
|||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
|
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||||
|
<true/>
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
@@ -22,6 +24,8 @@
|
|||||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||||
<key>LSRequiresIPhoneOS</key>
|
<key>LSRequiresIPhoneOS</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||||
|
<true/>
|
||||||
<key>UILaunchStoryboardName</key>
|
<key>UILaunchStoryboardName</key>
|
||||||
<string>LaunchScreen</string>
|
<string>LaunchScreen</string>
|
||||||
<key>UIMainStoryboardFile</key>
|
<key>UIMainStoryboardFile</key>
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import 'dart:io';
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
||||||
|
|
||||||
@@ -15,8 +13,14 @@ class MyApp extends StatefulWidget {
|
|||||||
class _MyAppState extends State<MyApp> {
|
class _MyAppState extends State<MyApp> {
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
_initSDK();
|
|
||||||
super.initState();
|
super.initState();
|
||||||
|
OpenIM.iMManager.initSDK(
|
||||||
|
platformID: 1,
|
||||||
|
apiAddr: '',
|
||||||
|
wsAddr: '',
|
||||||
|
dataDir: '/',
|
||||||
|
objectStorage: 'minio',
|
||||||
|
listener: OnConnectListener());
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -28,81 +32,10 @@ class _MyAppState extends State<MyApp> {
|
|||||||
),
|
),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
TextButton(onPressed: _login, child: Text('login')),
|
TextButton(onPressed: () {}, child: Text('login')),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _login() {
|
|
||||||
if (OpenIM.iMManager.isInitialized)
|
|
||||||
OpenIM.iMManager.login(uid: '', token: '');
|
|
||||||
}
|
|
||||||
|
|
||||||
void _initSDK() async {
|
|
||||||
// Initialize SDK
|
|
||||||
OpenIM.iMManager
|
|
||||||
..initSDK(
|
|
||||||
platform: Platform.isAndroid ? IMPlatform.android : IMPlatform.ios,
|
|
||||||
ipApi: '',
|
|
||||||
ipWs: '',
|
|
||||||
dbPath: '',
|
|
||||||
listener: OnInitSDKListener(
|
|
||||||
onConnecting: () {},
|
|
||||||
onConnectFailed: (code, error) {},
|
|
||||||
onConnectSuccess: () {},
|
|
||||||
onKickedOffline: () {},
|
|
||||||
onUserSigExpired: () {},
|
|
||||||
onSelfInfoUpdated: (user) {},
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
// Add message listener (remove when not in use)
|
|
||||||
..messageManager.addAdvancedMsgListener(OnAdvancedMsgListener(
|
|
||||||
onRecvMessageRevoked: (msgId) {},
|
|
||||||
onRecvC2CReadReceipt: (list) {},
|
|
||||||
onRecvNewMessage: (msg) {},
|
|
||||||
))
|
|
||||||
|
|
||||||
// Set up message sending progress listener
|
|
||||||
..messageManager.setMsgSendProgressListener(OnMsgSendProgressListener(
|
|
||||||
onProgress: (msgId, progress) {},
|
|
||||||
))
|
|
||||||
|
|
||||||
// Set up friend relationship listener
|
|
||||||
..friendshipManager.setFriendshipListener(OnFriendshipListener(
|
|
||||||
onBlackListAdd: (u) {},
|
|
||||||
onBlackListDeleted: (u) {},
|
|
||||||
onFriendApplicationListAccept: (u) {},
|
|
||||||
onFriendApplicationListAdded: (u) {},
|
|
||||||
onFriendApplicationListDeleted: (u) {},
|
|
||||||
onFriendApplicationListReject: (u) {},
|
|
||||||
onFriendInfoChanged: (u) {},
|
|
||||||
onFriendListAdded: (u) {},
|
|
||||||
onFriendListDeleted: (u) {},
|
|
||||||
))
|
|
||||||
|
|
||||||
// Set up conversation listener
|
|
||||||
..conversationManager.setConversationListener(OnConversationListener(
|
|
||||||
onConversationChanged: (list) {},
|
|
||||||
onNewConversation: (list) {},
|
|
||||||
onTotalUnreadMessageCountChanged: (count) {},
|
|
||||||
onSyncServerFailed: () {},
|
|
||||||
onSyncServerFinish: () {},
|
|
||||||
onSyncServerStart: () {},
|
|
||||||
))
|
|
||||||
|
|
||||||
// Set up group listener
|
|
||||||
..groupManager.setGroupListener(OnGroupListener(
|
|
||||||
onApplicationProcessed: (groupId, opUser, agreeOrReject, opReason) {},
|
|
||||||
onGroupCreated: (groupId) {},
|
|
||||||
onGroupInfoChanged: (groupId, info) {},
|
|
||||||
onMemberEnter: (groupId, list) {},
|
|
||||||
onMemberInvited: (groupId, opUser, list) {},
|
|
||||||
onMemberKicked: (groupId, opUser, list) {},
|
|
||||||
onMemberLeave: (groupId, info) {},
|
|
||||||
onReceiveJoinApplication: (groupId, info, opReason) {},
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,58 +5,58 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: async
|
name: async
|
||||||
|
sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.8.1"
|
version: "2.10.0"
|
||||||
boolean_selector:
|
boolean_selector:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: boolean_selector
|
name: boolean_selector
|
||||||
|
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0"
|
version: "2.1.1"
|
||||||
characters:
|
characters:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: characters
|
name: characters
|
||||||
|
sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0"
|
version: "1.2.1"
|
||||||
charcode:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: charcode
|
|
||||||
url: "https://pub.flutter-io.cn"
|
|
||||||
source: hosted
|
|
||||||
version: "1.3.1"
|
|
||||||
clock:
|
clock:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: clock
|
name: clock
|
||||||
|
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0"
|
version: "1.1.1"
|
||||||
collection:
|
collection:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: collection
|
name: collection
|
||||||
|
sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.15.0"
|
version: "1.17.0"
|
||||||
cupertino_icons:
|
cupertino_icons:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: cupertino_icons
|
name: cupertino_icons
|
||||||
|
sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.3"
|
version: "1.0.5"
|
||||||
fake_async:
|
fake_async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: fake_async
|
name: fake_async
|
||||||
|
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.3.1"
|
||||||
flutter:
|
flutter:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description: flutter
|
description: flutter
|
||||||
@@ -68,33 +68,52 @@ packages:
|
|||||||
path: ".."
|
path: ".."
|
||||||
relative: true
|
relative: true
|
||||||
source: path
|
source: path
|
||||||
version: "0.0.9+1"
|
version: "3.0.0"
|
||||||
flutter_test:
|
flutter_test:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description: flutter
|
description: flutter
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.0"
|
version: "0.0.0"
|
||||||
|
js:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: js
|
||||||
|
sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
|
||||||
|
url: "https://pub.flutter-io.cn"
|
||||||
|
source: hosted
|
||||||
|
version: "0.6.5"
|
||||||
matcher:
|
matcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: matcher
|
name: matcher
|
||||||
|
sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.12.10"
|
version: "0.12.13"
|
||||||
|
material_color_utilities:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: material_color_utilities
|
||||||
|
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
|
||||||
|
url: "https://pub.flutter-io.cn"
|
||||||
|
source: hosted
|
||||||
|
version: "0.2.0"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
|
sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.7.0"
|
version: "1.8.0"
|
||||||
path:
|
path:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path
|
name: path
|
||||||
|
sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.0"
|
version: "1.8.2"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
@@ -104,58 +123,58 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: source_span
|
name: source_span
|
||||||
|
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.1"
|
version: "1.9.1"
|
||||||
stack_trace:
|
stack_trace:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stack_trace
|
name: stack_trace
|
||||||
|
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.10.0"
|
version: "1.11.0"
|
||||||
stream_channel:
|
stream_channel:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stream_channel
|
name: stream_channel
|
||||||
|
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0"
|
version: "2.1.1"
|
||||||
string_scanner:
|
string_scanner:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: string_scanner
|
name: string_scanner
|
||||||
|
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0"
|
version: "1.2.0"
|
||||||
term_glyph:
|
term_glyph:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: term_glyph
|
name: term_glyph
|
||||||
|
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.2.1"
|
||||||
test_api:
|
test_api:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
|
sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.4.2"
|
version: "0.4.16"
|
||||||
typed_data:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: typed_data
|
|
||||||
url: "https://pub.flutter-io.cn"
|
|
||||||
source: hosted
|
|
||||||
version: "1.3.0"
|
|
||||||
vector_math:
|
vector_math:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: vector_math
|
name: vector_math
|
||||||
|
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0"
|
version: "2.1.4"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=2.12.0 <3.0.0"
|
dart: ">=2.18.0 <3.0.0"
|
||||||
flutter: ">=1.20.0"
|
flutter: ">=1.20.0"
|
||||||
|
|||||||
@@ -1,14 +1,7 @@
|
|||||||
//
|
|
||||||
// BaseCallback.swift
|
|
||||||
// flutter_openim_sdk
|
|
||||||
//
|
|
||||||
// Created by willem on 2021/10/9.
|
|
||||||
//
|
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import OpenIMCore
|
import OpenIMCore
|
||||||
|
|
||||||
public class BaseCallback: NSObject, Open_im_sdkBaseProtocol {
|
public class BaseCallback: NSObject, Open_im_sdk_callbackBaseProtocol {
|
||||||
|
|
||||||
private let result:FlutterResult
|
private let result:FlutterResult
|
||||||
|
|
||||||
@@ -16,7 +9,7 @@ public class BaseCallback: NSObject, Open_im_sdkBaseProtocol {
|
|||||||
self.result = result
|
self.result = result
|
||||||
}
|
}
|
||||||
|
|
||||||
public func onError(_ errCode: Int, errMsg: String?) {
|
public func onError(_ errCode: Int32, errMsg: String?) {
|
||||||
print("BaseResult: " + errMsg!)
|
print("BaseResult: " + errMsg!)
|
||||||
safeMainAsync { self.result(FlutterError(code: "\(errCode)", message: errMsg, details: nil)) }
|
safeMainAsync { self.result(FlutterError(code: "\(errCode)", message: errMsg, details: nil)) }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
|
|
||||||
public class CommonUtil {
|
public class CommonUtil {
|
||||||
|
|
||||||
public static func emitEvent(channel: FlutterMethodChannel, method: String, type: String, errCode: Int?, errMsg: String?, data: Any?){
|
public static func emitEvent(channel: FlutterMethodChannel, method: String, type: String, errCode: Int32?, errMsg: String?, data: Any?){
|
||||||
safeMainAsync {
|
safeMainAsync {
|
||||||
var res: [String: Any] = [:]
|
var res: [String: Any] = [:]
|
||||||
res["type"] = type
|
res["type"] = type
|
||||||
|
|||||||
@@ -1,18 +1,17 @@
|
|||||||
//
|
|
||||||
// JsonUtil.swift
|
|
||||||
// Runner
|
|
||||||
//
|
|
||||||
// Created by z1u24 on 2021/6/28.
|
|
||||||
//
|
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public class JsonUtil {
|
public class JsonUtil {
|
||||||
|
|
||||||
public static func toString(object: AnyObject?)->String {
|
public static func toString(object: AnyObject?)->String {
|
||||||
|
|
||||||
|
if object is NSNull {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
if object == nil {
|
if object == nil {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
if object is String{
|
if object is String{
|
||||||
let s = object as! String
|
let s = object as! String
|
||||||
let b = s.replacingOccurrences(of: "\"", with: "\\\"")
|
let b = s.replacingOccurrences(of: "\"", with: "\\\"")
|
||||||
|
|||||||
@@ -1,10 +1,3 @@
|
|||||||
//
|
|
||||||
// BaseServiceManager.swift
|
|
||||||
// flutter_openim_sdk
|
|
||||||
//
|
|
||||||
// Created by willem on 2021/10/9.
|
|
||||||
//
|
|
||||||
|
|
||||||
import Flutter
|
import Flutter
|
||||||
import OpenIMCore
|
import OpenIMCore
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|||||||
@@ -1,10 +1,3 @@
|
|||||||
//
|
|
||||||
// ConversationManager.swift
|
|
||||||
// Runner
|
|
||||||
//
|
|
||||||
// Created by z1u24 on 2021/6/29.
|
|
||||||
//
|
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import OpenIMCore
|
import OpenIMCore
|
||||||
|
|
||||||
@@ -12,18 +5,27 @@ public class ConversationManager: BaseServiceManager {
|
|||||||
|
|
||||||
public override func registerHandlers() {
|
public override func registerHandlers() {
|
||||||
super.registerHandlers()
|
super.registerHandlers()
|
||||||
|
|
||||||
self["setConversationListener"] = setConversationListener
|
self["setConversationListener"] = setConversationListener
|
||||||
self["getAllConversationList"] = getAllConversationList
|
self["getAllConversationList"] = getAllConversationList
|
||||||
|
self["getConversationListSplit"] = getConversationListSplit
|
||||||
self["getOneConversation"] = getOneConversation
|
self["getOneConversation"] = getOneConversation
|
||||||
self["getMultipleConversation"] = getMultipleConversation
|
self["getMultipleConversation"] = getMultipleConversation
|
||||||
self["deleteConversation"] = deleteConversation
|
|
||||||
self["setConversationDraft"] = setConversationDraft
|
self["setConversationDraft"] = setConversationDraft
|
||||||
self["pinConversation"] = pinConversation
|
self["pinConversation"] = pinConversation
|
||||||
self["markSingleMessageHasRead"] = markSingleMessageHasRead
|
self["hideConversation"] = hideConversation
|
||||||
self["markGroupMessageHasRead"] = markGroupMessageHasRead
|
self["markConversationMessageAsRead"] = markConversationMessageAsRead
|
||||||
self["getTotalUnreadMsgCount"] = getTotalUnreadMsgCount
|
self["getTotalUnreadMsgCount"] = getTotalUnreadMsgCount
|
||||||
self["getConversationIDBySessionType"] = getConversationIDBySessionType
|
self["getConversationIDBySessionType"] = getConversationIDBySessionType
|
||||||
|
self["setConversationRecvMessageOpt"] = setConversationRecvMessageOpt
|
||||||
|
self["getConversationRecvMessageOpt"] = getConversationRecvMessageOpt
|
||||||
|
self["setConversationPrivateChat"] = setConversationPrivateChat
|
||||||
|
self["clearConversationAndDeleteAllMsg"] = clearConversationAndDeleteAllMsg
|
||||||
|
self["deleteConversationAndDeleteAllMsg"] = deleteConversationAndDeleteAllMsg
|
||||||
|
self["deleteAllConversationFromLocal"] = deleteAllConversationFromLocal
|
||||||
|
self["resetConversationGroupAtType"] = resetConversationGroupAtType
|
||||||
|
self["getAtAllTag"] = getAtAllTag
|
||||||
|
self["setGlobalRecvMessageOpt"] = setGlobalRecvMessageOpt
|
||||||
|
self["setConversationBurnDuration"] = setConversationBurnDuration
|
||||||
}
|
}
|
||||||
|
|
||||||
func setConversationListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func setConversationListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
@@ -32,49 +34,89 @@ public class ConversationManager: BaseServiceManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func getAllConversationList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func getAllConversationList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkGetAllConversationList(BaseCallback(result: result))
|
Open_im_sdkGetAllConversationList(BaseCallback(result: result), methodCall[string: "operationID"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func getConversationListSplit(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkGetConversationListSplit(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[int: "offset"], methodCall[int: "count"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func getOneConversation(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func getOneConversation(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkGetOneConversation(methodCall[string: "sourceID"], methodCall[int: "sessionType"], BaseCallback(result: result))
|
Open_im_sdkGetOneConversation(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[int32: "sessionType"], methodCall[string: "sourceID"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func getMultipleConversation(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func getMultipleConversation(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkGetMultipleConversation(methodCall[jsonString: "conversationIDList"], BaseCallback(result: result))
|
Open_im_sdkGetMultipleConversation(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "conversationIDList"])
|
||||||
}
|
|
||||||
|
|
||||||
func deleteConversation(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
|
||||||
Open_im_sdkDeleteConversation(methodCall[string: "conversationID"], BaseCallback(result: result))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func setConversationDraft(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func setConversationDraft(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkSetConversationDraft(methodCall[string: "conversationID"], methodCall[string: "draftText"], BaseCallback(result: result))
|
Open_im_sdkSetConversationDraft(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"], methodCall[string: "draftText"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func pinConversation(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func pinConversation(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkPinConversation(methodCall[string: "conversationID"], methodCall[bool: "isPinned"], BaseCallback(result: result))
|
Open_im_sdkPinConversation(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"], methodCall[bool: "isPinned"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func markSingleMessageHasRead(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func hideConversation(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkMarkSingleMessageHasRead(BaseCallback(result: result), methodCall[string: "userID"])
|
Open_im_sdkHideConversation(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func markGroupMessageHasRead(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func markConversationMessageAsRead(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkMarkGroupMessageHasRead(BaseCallback(result: result), methodCall[string: "groupID"])
|
Open_im_sdkMarkConversationMessageAsRead(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func getTotalUnreadMsgCount(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func getTotalUnreadMsgCount(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkGetTotalUnreadMsgCount(BaseCallback(result: result))
|
Open_im_sdkGetTotalUnreadMsgCount(BaseCallback(result: result), methodCall[string: "operationID"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func getConversationIDBySessionType(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func getConversationIDBySessionType(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
let conversationID = Open_im_sdkGetConversationIDBySessionType(methodCall[string: "sourceID"], methodCall[int: "sessionType"])
|
let conversationID = Open_im_sdkGetConversationIDBySessionType( methodCall[string: "operationID"],methodCall[string: "sourceID"], methodCall[int: "sessionType"])
|
||||||
callBack(result, conversationID)
|
callBack(result, conversationID)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func setConversationRecvMessageOpt(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkSetConversationRecvMessageOpt(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "conversationID"], methodCall[int: "status"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func getConversationRecvMessageOpt(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkGetConversationRecvMessageOpt(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "conversationIDList"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func setConversationPrivateChat(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkSetConversationPrivateChat(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"],methodCall[bool: "isPrivate"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func clearConversationAndDeleteAllMsg(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkClearConversationAndDeleteAllMsg(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func deleteConversationAndDeleteAllMsg(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkDeleteConversationAndDeleteAllMsg(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func deleteAllConversationFromLocal(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkDeleteAllConversationFromLocal(BaseCallback(result: result), methodCall[string: "operationID"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func resetConversationGroupAtType(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkResetConversationGroupAtType(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func getAtAllTag(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
callBack(result, Open_im_sdkGetAtAllTag(methodCall[string: "operationID"]))
|
||||||
|
}
|
||||||
|
|
||||||
|
func setGlobalRecvMessageOpt(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkSetGlobalRecvMessageOpt(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[int: "status"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func setConversationBurnDuration(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkSetConversationBurnDuration(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"], methodCall[int32: "burnDuration"])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class ConversationListener: NSObject, Open_im_sdkOnConversationListenerProtocol {
|
public class ConversationListener: NSObject, Open_im_sdk_callbackOnConversationListenerProtocol {
|
||||||
|
|
||||||
private let channel:FlutterMethodChannel
|
private let channel:FlutterMethodChannel
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,3 @@
|
|||||||
//
|
|
||||||
// FriendshipManager.swift
|
|
||||||
// Runner
|
|
||||||
//
|
|
||||||
// Created by z1u24 on 2021/6/29.
|
|
||||||
//
|
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import OpenIMCore
|
import OpenIMCore
|
||||||
|
|
||||||
@@ -15,19 +8,18 @@ public class FriendshipManager: BaseServiceManager {
|
|||||||
self["setFriendListener"] = setFriendListener
|
self["setFriendListener"] = setFriendListener
|
||||||
self["getFriendsInfo"] = getFriendsInfo
|
self["getFriendsInfo"] = getFriendsInfo
|
||||||
self["addFriend"] = addFriend
|
self["addFriend"] = addFriend
|
||||||
self["getFriendApplicationList"] = getFriendApplicationList
|
self["getFriendApplicationListAsRecipient"] = getFriendApplicationListAsRecipient
|
||||||
|
self["getFriendApplicationListAsApplicant"] = getFriendApplicationListAsApplicant
|
||||||
self["getFriendList"] = getFriendList
|
self["getFriendList"] = getFriendList
|
||||||
self["setFriendInfo"] = setFriendInfo
|
self["setFriendRemark"] = setFriendRemark
|
||||||
self["addToBlackList"] = addToBlackList
|
self["addBlacklist"] = addBlacklist
|
||||||
self["getBlackList"] = getBlackList
|
self["getBlacklist"] = getBlacklist
|
||||||
self["deleteFromBlackList"] = deleteFromBlackList
|
self["removeBlacklist"] = removeBlacklist
|
||||||
self["checkFriend"] = checkFriend
|
self["checkFriend"] = checkFriend
|
||||||
self["deleteFromFriendList"] = deleteFromFriendList
|
self["deleteFriend"] = deleteFriend
|
||||||
self["acceptFriendApplication"] = acceptFriendApplication
|
self["acceptFriendApplication"] = acceptFriendApplication
|
||||||
self["refuseFriendApplication"] = refuseFriendApplication
|
self["refuseFriendApplication"] = refuseFriendApplication
|
||||||
// self["forceSyncFriendApplication"] = forceSyncFriendApplication
|
self["searchFriends"] = searchFriends
|
||||||
// self["forceSyncFriend"] = forceSyncFriend
|
|
||||||
// self["forceSyncBlackList"] = forceSyncBlackList
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func setFriendListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func setFriendListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
@@ -36,111 +28,103 @@ public class FriendshipManager: BaseServiceManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func getFriendsInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func getFriendsInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkGetFriendsInfo(BaseCallback(result: result), methodCall[jsonString: "uidList"])
|
Open_im_sdkGetSpecifiedFriendsInfo(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "userIDList"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func addFriend(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func addFriend(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkAddFriend(BaseCallback(result: result), methodCall.toJsonString())
|
Open_im_sdkAddFriend(BaseCallback(result: result), methodCall[string: "operationID"], methodCall.toJsonString())
|
||||||
}
|
}
|
||||||
|
|
||||||
func getFriendApplicationList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func getFriendApplicationListAsRecipient(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkGetFriendApplicationList(BaseCallback(result: result))
|
Open_im_sdkGetFriendApplicationListAsRecipient(BaseCallback(result: result), methodCall[string: "operationID"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func getFriendApplicationListAsApplicant(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkGetFriendApplicationListAsApplicant(BaseCallback(result: result), methodCall[string: "operationID"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func getFriendList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func getFriendList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkGetFriendList(BaseCallback(result: result))
|
Open_im_sdkGetFriendList(BaseCallback(result: result), methodCall[string: "operationID"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func setFriendInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func setFriendRemark(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkSetFriendInfo(methodCall.toJsonString(), BaseCallback(result: result))
|
Open_im_sdkSetFriendRemark(BaseCallback(result: result), methodCall[string: "operationID"], methodCall.toJsonString())
|
||||||
}
|
}
|
||||||
|
|
||||||
func addToBlackList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func addBlacklist(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkAddToBlackList(BaseCallback(result: result), methodCall[jsonString: "uid"])
|
Open_im_sdkAddBlack(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "userID"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func getBlackList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func getBlacklist(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkGetBlackList(BaseCallback(result: result))
|
Open_im_sdkGetBlackList(BaseCallback(result: result), methodCall[string: "operationID"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func deleteFromBlackList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func removeBlacklist(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkDeleteFromBlackList(BaseCallback(result: result), methodCall[jsonString: "uid"])
|
Open_im_sdkRemoveBlack(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "userID"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func checkFriend(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func checkFriend(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkCheckFriend(BaseCallback(result: result), methodCall[jsonString: "uidList"])
|
Open_im_sdkCheckFriend(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "userIDList"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func deleteFromFriendList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func deleteFriend(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkDeleteFromFriendList(methodCall[jsonString: "uid"], BaseCallback(result: result))
|
Open_im_sdkDeleteFriend(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "userID"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func acceptFriendApplication(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func acceptFriendApplication(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkAcceptFriendApplication(BaseCallback(result: result), methodCall[jsonString: "uid"])
|
Open_im_sdkAcceptFriendApplication(BaseCallback(result: result), methodCall[string: "operationID"], methodCall.toJsonString())
|
||||||
}
|
}
|
||||||
|
|
||||||
func refuseFriendApplication(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func refuseFriendApplication(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkRefuseFriendApplication(BaseCallback(result: result), methodCall[jsonString: "uid"])
|
Open_im_sdkRefuseFriendApplication(BaseCallback(result: result), methodCall[string: "operationID"], methodCall.toJsonString())
|
||||||
}
|
}
|
||||||
|
|
||||||
// func forceSyncFriendApplication(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func searchFriends(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
// Open_im_sdkForceSyncFriendApplication()
|
Open_im_sdkSearchFriends(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "searchParam"])
|
||||||
// callBack(result)
|
}
|
||||||
// }
|
|
||||||
//
|
|
||||||
// func forceSyncFriend(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
|
||||||
// Open_im_sdkForceSyncFriend()
|
|
||||||
// callBack(result)
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// func forceSyncBlackList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
|
||||||
// Open_im_sdkForceSyncBlackList()
|
|
||||||
// callBack(result)
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class FriendshipListener: NSObject, Open_im_sdkOnFriendshipListenerProtocol {
|
public class FriendshipListener: NSObject, Open_im_sdk_callbackOnFriendshipListenerProtocol {
|
||||||
private let channel:FlutterMethodChannel
|
private let channel:FlutterMethodChannel
|
||||||
|
|
||||||
init(channel:FlutterMethodChannel) {
|
init(channel:FlutterMethodChannel) {
|
||||||
self.channel = channel
|
self.channel = channel
|
||||||
}
|
}
|
||||||
|
|
||||||
public func onBlackListAdd(_ userInfo: String?) {
|
public func onBlackAdded(_ blackInfo: String?) {
|
||||||
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onBlackListAdd", errCode: nil, errMsg: nil, data: userInfo)
|
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onBlackAdded", errCode: nil, errMsg: nil, data: blackInfo)
|
||||||
}
|
}
|
||||||
|
|
||||||
public func onBlackListDeleted(_ userInfo: String?) {
|
public func onBlackDeleted(_ blackInfo: String?) {
|
||||||
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onBlackListDeleted", errCode: nil, errMsg: nil, data: userInfo)
|
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onBlackDeleted", errCode: nil, errMsg: nil, data: blackInfo)
|
||||||
}
|
}
|
||||||
|
|
||||||
public func onFriendApplicationListAccept(_ applyUserInfo: String?) {
|
public func onFriendAdded(_ friendInfo: String?) {
|
||||||
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onFriendApplicationListAccept", errCode: nil, errMsg: nil, data: applyUserInfo)
|
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onFriendAdded", errCode: nil, errMsg: nil, data: friendInfo)
|
||||||
}
|
}
|
||||||
|
|
||||||
public func onFriendApplicationListAdded(_ applyUserInfo: String?) {
|
public func onFriendApplicationAccepted(_ friendApplication: String?) {
|
||||||
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onFriendApplicationListAdded", errCode: nil, errMsg: nil, data: applyUserInfo)
|
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onFriendApplicationAccepted", errCode: nil, errMsg: nil, data: friendApplication)
|
||||||
}
|
}
|
||||||
|
|
||||||
public func onFriendApplicationListDeleted(_ applyUserInfo: String?) {
|
public func onFriendApplicationAdded(_ friendApplication: String?) {
|
||||||
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onFriendApplicationListDeleted", errCode: nil, errMsg: nil, data: applyUserInfo)
|
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onFriendApplicationAdded", errCode: nil, errMsg: nil, data: friendApplication)
|
||||||
}
|
}
|
||||||
|
|
||||||
public func onFriendApplicationListReject(_ applyUserInfo: String?) {
|
public func onFriendApplicationDeleted(_ friendApplication: String?) {
|
||||||
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onFriendApplicationListReject", errCode: nil, errMsg: nil, data: applyUserInfo)
|
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onFriendApplicationDeleted", errCode: nil, errMsg: nil, data: friendApplication)
|
||||||
|
}
|
||||||
|
|
||||||
|
public func onFriendApplicationRejected(_ friendApplication: String?) {
|
||||||
|
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onFriendApplicationRejected", errCode: nil, errMsg: nil, data: friendApplication)
|
||||||
|
}
|
||||||
|
|
||||||
|
public func onFriendDeleted(_ friendInfo: String?) {
|
||||||
|
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onFriendDeleted", errCode: nil, errMsg: nil, data: friendInfo)
|
||||||
}
|
}
|
||||||
|
|
||||||
public func onFriendInfoChanged(_ friendInfo: String?) {
|
public func onFriendInfoChanged(_ friendInfo: String?) {
|
||||||
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onFriendInfoChanged", errCode: nil, errMsg: nil, data: friendInfo)
|
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onFriendInfoChanged", errCode: nil, errMsg: nil, data: friendInfo)
|
||||||
}
|
}
|
||||||
|
|
||||||
public func onFriendListAdded(_ friendInfo: String?) {
|
|
||||||
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onFriendListAdded", errCode: nil, errMsg: nil, data: friendInfo)
|
|
||||||
}
|
|
||||||
|
|
||||||
public func onFriendListDeleted(_ friendInfo: String?) {
|
|
||||||
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onFriendListDeleted", errCode: nil, errMsg: nil, data: friendInfo)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,3 @@
|
|||||||
//
|
|
||||||
// GroupManager.swift
|
|
||||||
// flutter_openim_sdk
|
|
||||||
//
|
|
||||||
// Created by z1u24 on 2021/7/5.
|
|
||||||
//
|
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import OpenIMCore
|
import OpenIMCore
|
||||||
|
|
||||||
@@ -24,13 +17,24 @@ public class GroupManager: BaseServiceManager {
|
|||||||
self["joinGroup"] = joinGroup
|
self["joinGroup"] = joinGroup
|
||||||
self["quitGroup"] = quitGroup
|
self["quitGroup"] = quitGroup
|
||||||
self["transferGroupOwner"] = transferGroupOwner
|
self["transferGroupOwner"] = transferGroupOwner
|
||||||
self["getGroupApplicationList"] = getGroupApplicationList
|
self["getGroupApplicationListAsRecipient"] = getGroupApplicationListAsRecipient
|
||||||
|
self["getGroupApplicationListAsApplicant"] = getGroupApplicationListAsApplicant
|
||||||
self["acceptGroupApplication"] = acceptGroupApplication
|
self["acceptGroupApplication"] = acceptGroupApplication
|
||||||
self["refuseGroupApplication"] = refuseGroupApplication
|
self["refuseGroupApplication"] = refuseGroupApplication
|
||||||
// self["forceSyncApplyGroupRequest"] = forceSyncApplyGroupRequest
|
self["dismissGroup"] = dismissGroup
|
||||||
// self["forceSyncGroupRequest"] = forceSyncGroupRequest
|
self["changeGroupMute"] = changeGroupMute
|
||||||
// self["forceSyncJoinedGroup"] = forceSyncJoinedGroup
|
self["changeGroupMemberMute"] = changeGroupMemberMute
|
||||||
// self["forceSyncJoinedGroupMember"] = forceSyncJoinedGroupMember
|
self["setGroupMemberNickname"] = setGroupMemberNickname
|
||||||
|
self["searchGroups"] = searchGroups
|
||||||
|
self["setGroupMemberRoleLevel"] = setGroupMemberRoleLevel
|
||||||
|
self["getGroupMemberListByJoinTimeFilter"] = getGroupMemberListByJoinTimeFilter
|
||||||
|
self["setGroupVerification"] = setGroupVerification
|
||||||
|
self["setGroupLookMemberInfo"] = setGroupLookMemberInfo
|
||||||
|
self["setGroupApplyMemberFriend"] = setGroupApplyMemberFriend
|
||||||
|
self["getGroupMemberOwnerAndAdmin"] = getGroupMemberOwnerAndAdmin
|
||||||
|
self["searchGroupMembers"] = searchGroupMembers
|
||||||
|
self["setGroupMemberInfo"] = setGroupMemberInfo
|
||||||
|
self["isJoinGroup"] = isJoinGroup
|
||||||
}
|
}
|
||||||
|
|
||||||
func setGroupListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func setGroupListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
@@ -39,86 +43,126 @@ public class GroupManager: BaseServiceManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func inviteUserToGroup(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func inviteUserToGroup(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkInviteUserToGroup(methodCall[string: "gid"], methodCall[string: "reason"],
|
Open_im_sdkInviteUserToGroup(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"], methodCall[string: "reason"],
|
||||||
methodCall[jsonString: "uidList"], BaseCallback(result: result))
|
methodCall[jsonString: "userIDList"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func kickGroupMember(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func kickGroupMember(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkKickGroupMember(methodCall[string: "gid"], methodCall[string: "reason"],
|
Open_im_sdkKickGroupMember(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"], methodCall[string: "reason"],
|
||||||
methodCall[jsonString: "uidList"], BaseCallback(result: result))
|
methodCall[jsonString: "userIDList"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func getGroupMembersInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func getGroupMembersInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkGetGroupMembersInfo(methodCall[string: "gid"], methodCall[jsonString: "uidList"], BaseCallback(result: result))
|
Open_im_sdkGetSpecifiedGroupMembersInfo(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"], methodCall[jsonString: "userIDList"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func getGroupMemberList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func getGroupMemberList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkGetGroupMemberList(methodCall[string: "gid"], methodCall[int32: "filter"],
|
Open_im_sdkGetGroupMemberList(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"], methodCall[int32: "filter"],
|
||||||
methodCall[int32: "next"], BaseCallback(result: result))
|
methodCall[int32: "offset"], methodCall[int32: "count"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func getJoinedGroupList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func getJoinedGroupList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkGetJoinedGroupList(BaseCallback(result: result))
|
Open_im_sdkGetJoinedGroupList(BaseCallback(result: result), methodCall[string: "operationID"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func createGroup(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func createGroup(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkCreateGroup(methodCall[jsonString: "gInfo"], methodCall[jsonString: "memberList"], BaseCallback(result: result))
|
Open_im_sdkCreateGroup(BaseCallback(result: result), methodCall[string: "operationID"], methodCall.toJsonString())
|
||||||
}
|
}
|
||||||
|
|
||||||
func setGroupInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func setGroupInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkSetGroupInfo(methodCall[jsonString: "gInfo"], BaseCallback(result: result))
|
Open_im_sdkSetGroupInfo(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "groupInfo"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func getGroupsInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func getGroupsInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkGetGroupsInfo(methodCall[jsonString: "gidList"], BaseCallback(result: result))
|
Open_im_sdkGetSpecifiedGroupsInfo(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "groupIDList"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func joinGroup(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func joinGroup(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkJoinGroup(methodCall[string: "gid"], methodCall[string: "reason"], BaseCallback(result: result))
|
Open_im_sdkJoinGroup(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"], methodCall[string: "reason"], methodCall[int32: "joinSource"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func quitGroup(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func quitGroup(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkQuitGroup(methodCall[string: "gid"], BaseCallback(result: result))
|
Open_im_sdkQuitGroup(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func transferGroupOwner(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func transferGroupOwner(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkTransferGroupOwner(methodCall[string: "gid"], methodCall[string: "uid"], BaseCallback(result: result))
|
Open_im_sdkTransferGroupOwner(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"], methodCall[string: "userID"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func getGroupApplicationList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func getGroupApplicationListAsRecipient(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkGetGroupApplicationList(BaseCallback(result: result))
|
Open_im_sdkGetGroupApplicationListAsRecipient(BaseCallback(result: result), methodCall[string: "operationID"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func getGroupApplicationListAsApplicant(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkGetGroupApplicationListAsApplicant(BaseCallback(result: result), methodCall[string: "operationID"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func acceptGroupApplication(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func acceptGroupApplication(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkAcceptGroupApplication(methodCall[jsonString: "application"], methodCall[string: "reason"], BaseCallback(result: result))
|
Open_im_sdkAcceptGroupApplication(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"], methodCall[string: "userID"], methodCall[string: "handleMsg"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func refuseGroupApplication(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func refuseGroupApplication(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkRefuseGroupApplication(methodCall[jsonString: "application"], methodCall[string: "reason"], BaseCallback(result: result))
|
Open_im_sdkRefuseGroupApplication(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"], methodCall[string: "userID"], methodCall[string: "handleMsg"])
|
||||||
}
|
}
|
||||||
|
|
||||||
// func forceSyncApplyGroupRequest(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
func dismissGroup(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
// Open_im_sdkForceSyncApplyGroupRequest()
|
Open_im_sdkDismissGroup(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"])
|
||||||
// callBack(result)
|
}
|
||||||
// }
|
|
||||||
//
|
|
||||||
// func forceSyncGroupRequest(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
|
||||||
// Open_im_sdkForceSyncGroupRequest()
|
|
||||||
// callBack(result)
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// func forceSyncJoinedGroup(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
|
||||||
// Open_im_sdkForceSyncJoinedGroup()
|
|
||||||
// callBack(result)
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// func forceSyncJoinedGroupMember(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
|
||||||
// Open_im_sdkForceSyncJoinedGroupMember()
|
|
||||||
// callBack(result)
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
func changeGroupMute(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkChangeGroupMute(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"], methodCall[bool: "mute"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func changeGroupMemberMute(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkChangeGroupMemberMute(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"], methodCall[string:"userID"],methodCall[int:"seconds"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func setGroupMemberNickname(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkSetGroupMemberNickname(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"], methodCall[string:"userID"],methodCall[string:"groupNickname"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func searchGroups(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkSearchGroups(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "searchParam"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func setGroupMemberRoleLevel(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkSetGroupMemberRoleLevel(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"], methodCall[string:"userID"],methodCall[int:"roleLevel"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func getGroupMemberListByJoinTimeFilter(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkGetGroupMemberListByJoinTimeFilter(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"], methodCall[int32: "offset"], methodCall[int32: "count"], methodCall[int64: "joinTimeBegin"], methodCall[int64: "joinTimeEnd"], methodCall[jsonString: "excludeUserIDList"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func setGroupVerification(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkSetGroupVerification(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"], methodCall[int32:"needVerification"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func setGroupLookMemberInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkSetGroupLookMemberInfo(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"], methodCall[int32:"status"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func setGroupApplyMemberFriend(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkSetGroupApplyMemberFriend(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"], methodCall[int32:"status"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func getGroupMemberOwnerAndAdmin(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkGetGroupMemberOwnerAndAdmin(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func searchGroupMembers(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkSearchGroupMembers(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "searchParam"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func setGroupMemberInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkSetGroupMemberInfo(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "info"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func isJoinGroup(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkIsJoinGroup(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public class GroupListener: NSObject, Open_im_sdkOnGroupListenerProtocol {
|
|
||||||
|
public class GroupListener: NSObject, Open_im_sdk_callbackOnGroupListenerProtocol {
|
||||||
|
|
||||||
private let channel:FlutterMethodChannel
|
private let channel:FlutterMethodChannel
|
||||||
|
|
||||||
@@ -126,73 +170,47 @@ public class GroupListener: NSObject, Open_im_sdkOnGroupListenerProtocol {
|
|||||||
self.channel = channel
|
self.channel = channel
|
||||||
}
|
}
|
||||||
|
|
||||||
public func onApplicationProcessed(_ groupId: String?, opUser: String?, agreeOrReject AgreeOrReject: Int32, opReason: String?) {
|
public func onGroupApplicationAccepted(_ s: String?) {
|
||||||
var values: [String: Any] = [:]
|
CommonUtil.emitEvent(channel: channel, method: "groupListener", type: "onGroupApplicationAccepted", errCode: nil, errMsg: nil, data: s)
|
||||||
values["groupId"] = groupId
|
|
||||||
values["opUser"] = opUser
|
|
||||||
values["agreeOrReject"] = AgreeOrReject
|
|
||||||
values["opReason"] = opReason
|
|
||||||
CommonUtil.emitEvent(channel: channel, method: "groupListener", type: "onApplicationProcessed", errCode: nil, errMsg: nil, data: values)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// public func onApplicationProcessed(_ s: String?,s1: String?,i: Int?,s2: String?) {
|
public func onGroupApplicationAdded(_ s: String?) {
|
||||||
// let values: NSMutableDictionary = NSMutableDictionary(capacity: 0)
|
CommonUtil.emitEvent(channel: channel, method: "groupListener", type: "onGroupApplicationAdded", errCode: nil, errMsg: nil, data: s)
|
||||||
// values.setValue(s, forKey: "groupId")
|
|
||||||
// values.setValue(s1, forKey: "opUser")
|
|
||||||
// values.setValue(i, forKey: "agreeOrReject")
|
|
||||||
// values.setValue(s2, forKey: "opReason")
|
|
||||||
// CommonUtil.emitEvent(channel: channel, method: "groupListener", type: "onApplicationProcessed", errCode: nil, errMsg: nil, data: values)
|
|
||||||
// }
|
|
||||||
|
|
||||||
public func onGroupCreated(_ s: String?) {
|
|
||||||
var values: [String: Any] = [:]
|
|
||||||
values["groupId"] = s
|
|
||||||
CommonUtil.emitEvent(channel: channel, method: "groupListener", type: "onGroupCreated", errCode: nil, errMsg: nil, data: values)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public func onGroupInfoChanged(_ s: String?, groupInfo s1: String?) {
|
public func onGroupApplicationDeleted(_ s: String?) {
|
||||||
var values: [String: Any] = [:]
|
CommonUtil.emitEvent(channel: channel, method: "groupListener", type: "onGroupApplicationDeleted", errCode: nil, errMsg: nil, data: s)
|
||||||
values["groupId"] = s
|
|
||||||
values["groupInfo"] = s1
|
|
||||||
CommonUtil.emitEvent(channel: channel, method: "groupListener", type: "onGroupInfoChanged", errCode: nil, errMsg: nil, data: values)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public func onMemberEnter(_ s: String?, memberList s1: String?) {
|
public func onGroupApplicationRejected(_ s: String?) {
|
||||||
var values: [String: Any] = [:]
|
CommonUtil.emitEvent(channel: channel, method: "groupListener", type: "onGroupApplicationRejected", errCode: nil, errMsg: nil, data: s)
|
||||||
values["groupId"] = s
|
|
||||||
values["memberList"] = s1
|
|
||||||
CommonUtil.emitEvent(channel: channel, method: "groupListener", type: "onMemberEnter", errCode: nil, errMsg: nil, data: values)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public func onMemberInvited(_ s: String?,opUser s1: String?, memberList s2: String?) {
|
public func onGroupDismissed(_ s: String?) {
|
||||||
var values: [String: Any] = [:]
|
CommonUtil.emitEvent(channel: channel, method: "groupListener", type: "onGroupDismissed", errCode: nil, errMsg: nil, data: s)
|
||||||
values["groupId"] = s
|
|
||||||
values["opUser"] = s1
|
|
||||||
values["memberList"] = s2
|
|
||||||
CommonUtil.emitEvent(channel: channel, method: "groupListener", type: "onMemberInvited", errCode: nil, errMsg: nil, data: values)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public func onMemberKicked(_ s: String?,opUser s1: String?,memberList s2: String?) {
|
public func onGroupInfoChanged(_ s: String?) {
|
||||||
var values: [String: Any] = [:]
|
CommonUtil.emitEvent(channel: channel, method: "groupListener", type: "onGroupInfoChanged", errCode: nil, errMsg: nil, data: s)
|
||||||
values["groupId"] = s
|
|
||||||
values["opUser"] = s1
|
|
||||||
values["memberList"] = s2
|
|
||||||
CommonUtil.emitEvent(channel: channel, method: "groupListener", type: "onMemberKicked", errCode: nil, errMsg: nil, data: values)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public func onMemberLeave(_ s: String?,member s1: String?) {
|
public func onGroupMemberAdded(_ s: String?) {
|
||||||
var values: [String: Any] = [:]
|
CommonUtil.emitEvent(channel: channel, method: "groupListener", type: "onGroupMemberAdded", errCode: nil, errMsg: nil, data: s)
|
||||||
values["groupId"] = s
|
|
||||||
values["member"] = s1
|
|
||||||
CommonUtil.emitEvent(channel: channel, method: "groupListener", type: "onMemberLeave", errCode: nil, errMsg: nil, data: values)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public func onReceiveJoinApplication(_ s: String?,member s1: String?,opReason s2: String?) {
|
public func onGroupMemberDeleted(_ s: String?) {
|
||||||
var values: [String: Any] = [:]
|
CommonUtil.emitEvent(channel: channel, method: "groupListener", type: "onGroupMemberDeleted", errCode: nil, errMsg: nil, data: s)
|
||||||
values["groupId"] = s
|
|
||||||
values["member"] = s1
|
|
||||||
values["opReason"] = s2
|
|
||||||
CommonUtil.emitEvent(channel: channel, method: "groupListener", type: "onReceiveJoinApplication", errCode: nil, errMsg: nil, data: values)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public func onGroupMemberInfoChanged(_ s: String?) {
|
||||||
|
CommonUtil.emitEvent(channel: channel, method: "groupListener", type: "onGroupMemberInfoChanged", errCode: nil, errMsg: nil, data: s)
|
||||||
|
}
|
||||||
|
|
||||||
|
public func onJoinedGroupAdded(_ s: String?) {
|
||||||
|
CommonUtil.emitEvent(channel: channel, method: "groupListener", type: "onJoinedGroupAdded", errCode: nil, errMsg: nil, data: s)
|
||||||
|
}
|
||||||
|
|
||||||
|
public func onJoinedGroupDeleted(_ s: String?) {
|
||||||
|
CommonUtil.emitEvent(channel: channel, method: "groupListener", type: "onJoinedGroupDeleted", errCode: nil, errMsg: nil, data: s)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,97 +1,202 @@
|
|||||||
//
|
|
||||||
// IMManager.swift
|
|
||||||
// Runner
|
|
||||||
//
|
|
||||||
// Created by z1u24 on 2021/6/28.
|
|
||||||
//
|
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import OpenIMCore
|
import OpenIMCore
|
||||||
|
|
||||||
public class IMMananger: BaseServiceManager {
|
public class IMMananger: BaseServiceManager {
|
||||||
|
|
||||||
|
let reachability = try? Reachability()
|
||||||
|
|
||||||
public override func registerHandlers() {
|
public override func registerHandlers() {
|
||||||
super.registerHandlers()
|
super.registerHandlers()
|
||||||
|
|
||||||
self["initSDK"] = initSDK
|
self["initSDK"] = initSDK
|
||||||
|
self["unInitSDK"] = unInitSDK
|
||||||
self["login"] = login
|
self["login"] = login
|
||||||
self["logout"] = logout
|
self["logout"] = logout
|
||||||
self["getLoginStatus"] = getLoginStatus
|
self["getLoginStatus"] = getLoginStatus
|
||||||
// self["getLoginUid"] = getLoginUid
|
self["uploadFile"] = uploadFile
|
||||||
self["getUsersInfo"] = getUsersInfo
|
self["updateFcmToken"] = updateFcmToken
|
||||||
self["setSelfInfo"] = setSelfInfo
|
self["setAppBackgroundStatus"] = setAppBackgroundStatus
|
||||||
self["forceSyncLoginUerInfo"] = forceSyncLoginUerInfo
|
self["networkStatusChanged"] = networkStatusChanged
|
||||||
// self["forceReConn"] = forceReConn
|
}
|
||||||
|
|
||||||
|
fileprivate func addObservers() {
|
||||||
|
NotificationCenter.default.addObserver(self,
|
||||||
|
selector: #selector(applicationWillEnterForeground),
|
||||||
|
name: UIApplication.willEnterForegroundNotification,
|
||||||
|
object: nil)
|
||||||
|
|
||||||
|
NotificationCenter.default.addObserver(self,
|
||||||
|
selector: #selector(applicationDidEnterBackground),
|
||||||
|
name: UIApplication.didEnterBackgroundNotification,
|
||||||
|
object: nil)
|
||||||
|
|
||||||
|
if let reachability {
|
||||||
|
do {
|
||||||
|
try reachability.startNotifier()
|
||||||
|
} catch (let e) {
|
||||||
|
print("reachability: \(e)")
|
||||||
|
}
|
||||||
|
|
||||||
|
reachability.whenReachable = { _ in
|
||||||
|
Open_im_sdkNetworkStatusChanged(BaseCallback(result: { _ in
|
||||||
|
}), UUID().uuidString)
|
||||||
|
}
|
||||||
|
reachability.whenUnreachable = { _ in
|
||||||
|
Open_im_sdkNetworkStatusChanged(BaseCallback(result: { _ in
|
||||||
|
}), UUID().uuidString)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@objc
|
||||||
|
fileprivate func applicationDidEnterBackground() {
|
||||||
|
Open_im_sdkSetAppBackgroundStatus(BaseCallback(result: { _ in
|
||||||
|
}), UUID().uuidString, true)
|
||||||
|
}
|
||||||
|
|
||||||
|
@objc
|
||||||
|
fileprivate func applicationWillEnterForeground() {
|
||||||
|
Open_im_sdkSetAppBackgroundStatus(BaseCallback(result: { _ in
|
||||||
|
}), UUID().uuidString, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
func initSDK(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func initSDK(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkInitSDK(methodCall.toJsonString(), SDKListener(channel: self.channel))
|
callBack(result, Open_im_sdkInitSDK(ConnListener(channel: self.channel), methodCall[string: "operationID"], methodCall.toJsonString()))
|
||||||
callBack(result)
|
addObservers()
|
||||||
|
}
|
||||||
|
|
||||||
|
func unInitSDK(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkUnInitSDK(methodCall[string: "operationID"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func login(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
func login(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||||
Open_im_sdkLogin(methodCall[string: "uid"], methodCall[string: "token"], BaseCallback(result: result))
|
Open_im_sdkLogin(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "userID"], methodCall[string: "token"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func logout(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
func logout(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||||
Open_im_sdkLogout(BaseCallback(result: result))
|
Open_im_sdkLogout(BaseCallback(result: result), methodCall[string: "operationID"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func getLoginStatus(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
func getLoginStatus(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||||
callBack(result, Open_im_sdkGetLoginStatus())
|
callBack(result, Open_im_sdkGetLoginStatus(methodCall[string: "operationID"]))
|
||||||
}
|
}
|
||||||
|
|
||||||
// func getLoginUid(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
func uploadFile(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||||
// callBack(result, Open_im_sdkGetLoginUser())
|
Open_im_sdkUploadFile(BaseCallback(result: result), methodCall[string: "operationID"], methodCall.toJsonString(), UploadFileListener(channel: self.channel,id: methodCall[string: "id"]))
|
||||||
// }
|
|
||||||
|
|
||||||
func getUsersInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
|
||||||
Open_im_sdkGetUsersInfo(methodCall[jsonString: "uidList"], BaseCallback(result: result))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func setSelfInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
func updateFcmToken(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||||
Open_im_sdkSetSelfInfo(methodCall.toJsonString(), BaseCallback(result: result))
|
Open_im_sdkUpdateFcmToken(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "fcmToken"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func forceSyncLoginUerInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
func setAppBackgroundStatus(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||||
Open_im_sdkForceSyncLoginUerInfo()
|
Open_im_sdkSetAppBackgroundStatus(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[bool: "isBackground"])
|
||||||
callBack(result)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// func forceReConn(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
func networkStatusChanged(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||||
// Open_im_sdkForceReConn()
|
Open_im_sdkNetworkStatusChanged(BaseCallback(result: result), methodCall[string: "operationID"])
|
||||||
// callBack(result)
|
}
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SDKListener: NSObject, Open_im_sdkIMSDKListenerProtocol {
|
public class ConnListener: NSObject, Open_im_sdk_callbackOnConnListenerProtocol {
|
||||||
private let channel:FlutterMethodChannel
|
private let channel:FlutterMethodChannel
|
||||||
|
|
||||||
init(channel:FlutterMethodChannel) {
|
init(channel:FlutterMethodChannel) {
|
||||||
self.channel = channel
|
self.channel = channel
|
||||||
}
|
}
|
||||||
|
|
||||||
public func onConnectFailed(_ errCode: Int, errMsg: String?) {
|
public func onConnectFailed(_ errCode: Int32, errMsg: String?) {
|
||||||
CommonUtil.emitEvent(channel: self.channel, method: "initSDKListener", type: "onConnectFailed", errCode: errCode, errMsg: errMsg, data: nil)
|
CommonUtil.emitEvent(channel: self.channel, method: "connectListener", type: "onConnectFailed", errCode: errCode, errMsg: errMsg, data: nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
public func onConnectSuccess() {
|
public func onConnectSuccess() {
|
||||||
CommonUtil.emitEvent(channel: self.channel, method: "initSDKListener", type: "onConnectSuccess", errCode: nil, errMsg: nil, data: nil)
|
CommonUtil.emitEvent(channel: self.channel, method: "connectListener", type: "onConnectSuccess", errCode: nil, errMsg: nil, data: nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
public func onConnecting() {
|
public func onConnecting() {
|
||||||
CommonUtil.emitEvent(channel: self.channel, method: "initSDKListener", type: "onConnecting", errCode: nil, errMsg: nil, data: nil)
|
CommonUtil.emitEvent(channel: self.channel, method: "connectListener", type: "onConnecting", errCode: nil, errMsg: nil, data: nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
public func onKickedOffline() {
|
public func onKickedOffline() {
|
||||||
CommonUtil.emitEvent(channel: self.channel, method: "initSDKListener", type: "onKickedOffline", errCode: nil, errMsg: nil, data: nil)
|
CommonUtil.emitEvent(channel: self.channel, method: "connectListener", type: "onKickedOffline", errCode: nil, errMsg: nil, data: nil)
|
||||||
}
|
|
||||||
|
|
||||||
public func onSelfInfoUpdated(_ userInfo: String?) {
|
|
||||||
CommonUtil.emitEvent(channel: self.channel, method: "initSDKListener", type: "onSelfInfoUpdated", errCode: nil, errMsg: nil, data: userInfo)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public func onUserTokenExpired() {
|
public func onUserTokenExpired() {
|
||||||
CommonUtil.emitEvent(channel: self.channel, method: "initSDKListener", type: "onUserTokenExpired", errCode: nil, errMsg: nil, data: nil)
|
CommonUtil.emitEvent(channel: self.channel, method: "connectListener", type: "onUserTokenExpired", errCode: nil, errMsg: nil, data: nil)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class UploadFileListener: NSObject, Open_im_sdk_callbackUploadFileCallbackProtocol {
|
||||||
|
|
||||||
|
private let channel:FlutterMethodChannel
|
||||||
|
private let id: String
|
||||||
|
|
||||||
|
init(channel:FlutterMethodChannel, id: String) {
|
||||||
|
self.channel = channel
|
||||||
|
self.id = id
|
||||||
|
}
|
||||||
|
public func complete(_ size: Int64, url: String?, typ: Int) {
|
||||||
|
var values: [String: Any] = [:]
|
||||||
|
values["id"] = id
|
||||||
|
values["size"] = size
|
||||||
|
values["url"] = url
|
||||||
|
values["type"] = typ
|
||||||
|
CommonUtil.emitEvent(channel: channel, method: "uploadFileListener", type: "complete", errCode: nil, errMsg: nil, data: values)
|
||||||
|
}
|
||||||
|
|
||||||
|
public func hashPartComplete(_ partsHash: String?, fileHash: String?) {
|
||||||
|
var values: [String: Any] = [:]
|
||||||
|
values["id"] = id
|
||||||
|
values["partHash"] = partsHash
|
||||||
|
values["fileHash"] = fileHash
|
||||||
|
CommonUtil.emitEvent(channel: channel, method: "uploadFileListener", type: "hashPartComplete", errCode: nil, errMsg: nil, data: values)
|
||||||
|
}
|
||||||
|
|
||||||
|
public func hashPartProgress(_ index: Int, size: Int64, partHash: String?) {
|
||||||
|
var values: [String: Any] = [:]
|
||||||
|
values["id"] = id
|
||||||
|
values["index"] = index
|
||||||
|
values["size"] = size
|
||||||
|
values["partHash"] = partHash
|
||||||
|
CommonUtil.emitEvent(channel: channel, method: "uploadFileListener", type: "hashPartProgress", errCode: nil, errMsg: nil, data: values)
|
||||||
|
}
|
||||||
|
|
||||||
|
public func open(_ size: Int64) {
|
||||||
|
var values: [String: Any] = [:]
|
||||||
|
values["id"] = id
|
||||||
|
values["size"] = size
|
||||||
|
CommonUtil.emitEvent(channel: channel, method: "uploadFileListener", type: "open", errCode: nil, errMsg: nil, data: values)
|
||||||
|
}
|
||||||
|
|
||||||
|
public func partSize(_ partSize: Int64, num: Int) {
|
||||||
|
var values: [String: Any] = [:]
|
||||||
|
values["id"] = id
|
||||||
|
values["partSize"] = partSize
|
||||||
|
values["num"] = num
|
||||||
|
CommonUtil.emitEvent(channel: channel, method: "uploadFileListener", type: "partSize", errCode: nil, errMsg: nil, data: values)
|
||||||
|
}
|
||||||
|
|
||||||
|
public func uploadComplete(_ fileSize: Int64, streamSize: Int64, storageSize: Int64) {
|
||||||
|
var values: [String: Any] = [:]
|
||||||
|
values["id"] = id
|
||||||
|
values["fileSize"] = fileSize
|
||||||
|
values["streamSize"] = streamSize
|
||||||
|
values["storageSize"] = storageSize
|
||||||
|
CommonUtil.emitEvent(channel: channel, method: "uploadFileListener", type: "uploadProgress", errCode: nil, errMsg: nil, data: values)
|
||||||
|
}
|
||||||
|
|
||||||
|
public func uploadID(_ uploadID: String?) {
|
||||||
|
var values: [String: Any] = [:]
|
||||||
|
values["id"] = id
|
||||||
|
values["uploadID"] = uploadID
|
||||||
|
CommonUtil.emitEvent(channel: channel, method: "uploadFileListener", type: "uploadID", errCode: nil, errMsg: nil, data: values)
|
||||||
|
}
|
||||||
|
|
||||||
|
public func uploadPartComplete(_ index: Int, partSize: Int64, partHash: String?) {
|
||||||
|
var values: [String: Any] = [:]
|
||||||
|
values["id"] = id
|
||||||
|
values["index"] = index
|
||||||
|
values["partSize"] = partSize
|
||||||
|
values["partHash"] = partHash
|
||||||
|
CommonUtil.emitEvent(channel: channel, method: "uploadFileListener", type: "uploadPartComplete", errCode: nil, errMsg: nil, data: values)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,30 +1,22 @@
|
|||||||
//
|
|
||||||
// MessageManager.swift
|
|
||||||
// Runner
|
|
||||||
//
|
|
||||||
// Created by z1u24 on 2021/6/29.
|
|
||||||
//
|
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import OpenIMCore
|
import OpenIMCore
|
||||||
|
|
||||||
public class MessageManager: BaseServiceManager {
|
public class MessageManager: BaseServiceManager {
|
||||||
private let KEY_ID: String = "id"
|
private let KEY_ID: String = "id"
|
||||||
private var listeners: [String: AdvancedMsgListener] = [:]
|
// private var listeners: [String: AdvancedMsgListener] = [:]
|
||||||
|
|
||||||
public override func registerHandlers() {
|
public override func registerHandlers() {
|
||||||
super.registerHandlers()
|
super.registerHandlers()
|
||||||
|
self["setAdvancedMsgListener"] = setAdvancedMsgListener
|
||||||
self["addAdvancedMsgListener"] = addAdvancedMsgListener
|
|
||||||
self["removeAdvancedMsgListener"] = removeAdvancedMsgListener
|
|
||||||
self["sendMessage"] = sendMessage
|
self["sendMessage"] = sendMessage
|
||||||
self["getHistoryMessageList"] = getHistoryMessageList
|
|
||||||
self["revokeMessage"] = revokeMessage
|
self["revokeMessage"] = revokeMessage
|
||||||
self["deleteMessageFromLocalStorage"] = deleteMessageFromLocalStorage
|
self["deleteMessageFromLocalStorage"] = deleteMessageFromLocalStorage
|
||||||
self["deleteMessages"] = deleteMessages
|
self["deleteMessageFromLocalAndSvr"] = deleteMessageFromLocalAndSvr
|
||||||
|
self["deleteAllMsgFromLocal"] = deleteAllMsgFromLocal
|
||||||
|
self["deleteAllMsgFromLocalAndSvr"] = deleteAllMsgFromLocalAndSvr
|
||||||
self["insertSingleMessageToLocalStorage"] = insertSingleMessageToLocalStorage
|
self["insertSingleMessageToLocalStorage"] = insertSingleMessageToLocalStorage
|
||||||
self["findMessages"] = findMessages
|
self["insertGroupMessageToLocalStorage"] = insertGroupMessageToLocalStorage
|
||||||
self["markC2CMessageAsRead"] = markC2CMessageAsRead
|
self["markMessagesAsReadByMsgID"] = markMessagesAsReadByMsgID
|
||||||
self["typingStatusUpdate"] = typingStatusUpdate
|
self["typingStatusUpdate"] = typingStatusUpdate
|
||||||
self["createTextMessage"] = createTextMessage
|
self["createTextMessage"] = createTextMessage
|
||||||
self["createTextAtMessage"] = createTextAtMessage
|
self["createTextAtMessage"] = createTextAtMessage
|
||||||
@@ -35,221 +27,361 @@ public class MessageManager: BaseServiceManager {
|
|||||||
self["createVideoMessage"] = createVideoMessage
|
self["createVideoMessage"] = createVideoMessage
|
||||||
self["createVideoMessageFromFullPath"] = createVideoMessageFromFullPath
|
self["createVideoMessageFromFullPath"] = createVideoMessageFromFullPath
|
||||||
self["createFileMessage"] = createFileMessage
|
self["createFileMessage"] = createFileMessage
|
||||||
|
self["createFileMessageFromFullPath"] = createFileMessageFromFullPath
|
||||||
self["createMergerMessage"] = createMergerMessage
|
self["createMergerMessage"] = createMergerMessage
|
||||||
self["createForwardMessage"] = createForwardMessage
|
self["createForwardMessage"] = createForwardMessage
|
||||||
self["createLocationMessage"] = createLocationMessage
|
self["createLocationMessage"] = createLocationMessage
|
||||||
self["createCustomMessage"] = createCustomMessage
|
self["createCustomMessage"] = createCustomMessage
|
||||||
self["createQuoteMessage"] = createQuoteMessage
|
self["createQuoteMessage"] = createQuoteMessage
|
||||||
self["createCardMessage"] = createCardMessage
|
self["createCardMessage"] = createCardMessage
|
||||||
self["forceSyncMsg"] = forceSyncMsg
|
self["createFaceMessage"] = createFaceMessage
|
||||||
|
self["createAdvancedTextMessage"] = createAdvancedTextMessage
|
||||||
|
self["createAdvancedQuoteMessage"] = createAdvancedQuoteMessage
|
||||||
|
|
||||||
|
self["searchLocalMessages"] = searchLocalMessages
|
||||||
|
self["clearConversationAndDeleteAllMsg"] = clearConversationAndDeleteAllMsg
|
||||||
|
|
||||||
|
self["getAdvancedHistoryMessageList"] = getAdvancedHistoryMessageList
|
||||||
|
self["getAdvancedHistoryMessageListReverse"] = getAdvancedHistoryMessageListReverse
|
||||||
|
|
||||||
|
self["findMessageList"] = findMessageList
|
||||||
|
|
||||||
|
self["sendMessageNotOss"] = sendMessageNotOss
|
||||||
|
self["createImageMessageByURL"] = createImageMessageByURL
|
||||||
|
self["createSoundMessageByURL"] = createSoundMessageByURL
|
||||||
|
self["createVideoMessageByURL"] = createVideoMessageByURL
|
||||||
|
self["createFileMessageByURL"] = createFileMessageByURL
|
||||||
|
self["setCustomBusinessListener"] = setCustomBusinessListener
|
||||||
|
self["setMessageKvInfoListener"] = setMessageKvInfoListener
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func addAdvancedMsgListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func setAdvancedMsgListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
let key = methodCall[string: KEY_ID]
|
let key = methodCall[string: KEY_ID]
|
||||||
if listeners[key] == nil {
|
let lis = AdvancedMsgListener(channel: channel, id: key)
|
||||||
let lis = AdvancedMsgListener(channel: channel, id: key)
|
Open_im_sdkSetAdvancedMsgListener(lis)
|
||||||
listeners[key] = lis
|
|
||||||
Open_im_sdkAddAdvancedMsgListener(lis)
|
|
||||||
print("=================add msg listener======\n\(lis)")
|
|
||||||
}
|
|
||||||
callBack(result)
|
|
||||||
}
|
|
||||||
|
|
||||||
func removeAdvancedMsgListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
|
||||||
let key = methodCall[string: KEY_ID]
|
|
||||||
if let lis = listeners[key] {
|
|
||||||
listeners[key] = nil
|
|
||||||
// Open_im_sdkRemoveAdvancedMsgListener(lis)
|
|
||||||
}
|
|
||||||
callBack(result)
|
callBack(result)
|
||||||
}
|
}
|
||||||
|
|
||||||
func sendMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func sendMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
let sendMsgProgressListener: SendMsgProgressListener = SendMsgProgressListener(channel: channel)
|
let sendMsgProgressListener: SendMsgProgressListener = SendMsgProgressListener(channel: channel,result: result,methodCall: methodCall)
|
||||||
sendMsgProgressListener.setCall(methodCall: methodCall)
|
Open_im_sdkSendMessage(sendMsgProgressListener, methodCall[string: "operationID"], methodCall[jsonString: "message"], methodCall[string: "userID"],
|
||||||
sendMsgProgressListener.setResult(result: result)
|
methodCall[string: "groupID"], methodCall[jsonString: "offlinePushInfo"])
|
||||||
print("===============sendMessage===============")
|
|
||||||
Open_im_sdkSendMessage(sendMsgProgressListener, methodCall[jsonString: "message"], methodCall[string: "receiver"],
|
|
||||||
methodCall[string: "groupID"], methodCall[bool: "onlineUserOnly"])
|
|
||||||
}
|
|
||||||
|
|
||||||
func getHistoryMessageList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
|
||||||
Open_im_sdkGetHistoryMessageList(BaseCallback(result: result), methodCall.toJsonString())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func revokeMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func revokeMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkRevokeMessage(BaseCallback(result: result), methodCall.toJsonString())
|
Open_im_sdkRevokeMessage(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"],methodCall[string: "clientMsgID"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func deleteMessageFromLocalStorage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func deleteMessageFromLocalStorage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkDeleteMessageFromLocalStorage(BaseCallback(result: result), methodCall.toJsonString())
|
Open_im_sdkDeleteMessageFromLocalStorage(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"],methodCall[string: "clientMsgID"])
|
||||||
}
|
}
|
||||||
|
|
||||||
// deprecated
|
func deleteMessageFromLocalAndSvr(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
func deleteMessages(methodCall: FlutterMethodCall, result: FlutterResult){
|
Open_im_sdkDeleteMessage(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"],methodCall[string: "clientMsgID"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func deleteAllMsgFromLocal(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkDeleteAllMsgFromLocal(BaseCallback(result: result), methodCall[string: "operationID"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func deleteAllMsgFromLocalAndSvr(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkDeleteAllMsgFromLocalAndSvr(BaseCallback(result: result), methodCall[string: "operationID"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func insertSingleMessageToLocalStorage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func insertSingleMessageToLocalStorage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkInsertSingleMessageToLocalStorage(BaseCallback(result: result), methodCall[jsonString: "message"],
|
Open_im_sdkInsertSingleMessageToLocalStorage(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "message"],
|
||||||
methodCall[string: "userID"], methodCall[string: "sender"])
|
methodCall[string: "receiverID"], methodCall[string: "senderID"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func findMessages(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func insertGroupMessageToLocalStorage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkFindMessages(BaseCallback(result: result), methodCall[jsonString: "messageIDList"])
|
Open_im_sdkInsertGroupMessageToLocalStorage(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "message"],
|
||||||
|
methodCall[string: "groupID"], methodCall[string: "senderID"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func markC2CMessageAsRead(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func markMessagesAsReadByMsgID(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkMarkC2CMessageAsRead(BaseCallback(result: result), methodCall[string: "userID"], methodCall[jsonString: "messageIDList"])
|
Open_im_sdkMarkMessagesAsReadByMsgID(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"], methodCall[jsonString: "messageIDList"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func typingStatusUpdate(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func typingStatusUpdate(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkTypingStatusUpdate(methodCall[string: "userID"], methodCall[string: "typing"])
|
Open_im_sdkTypingStatusUpdate(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "userID"], methodCall[string: "msgTip"])
|
||||||
callBack(result)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func createTextMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func createTextMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
callBack(result, Open_im_sdkCreateTextMessage(methodCall[string: "text"]))
|
callBack(result, Open_im_sdkCreateTextMessage(methodCall[string: "operationID"], methodCall[string: "text"]))
|
||||||
}
|
}
|
||||||
|
|
||||||
func createTextAtMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func createTextAtMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
callBack(result, Open_im_sdkCreateTextAtMessage(methodCall[string: "text"], methodCall[jsonString: "atUserList"]))
|
callBack(result, Open_im_sdkCreateTextAtMessage(methodCall[string: "operationID"], methodCall[string: "text"],
|
||||||
|
methodCall[jsonString: "atUserIDList"], methodCall[jsonString: "atUserInfoList"], methodCall[jsonString: "quoteMessage"]))
|
||||||
}
|
}
|
||||||
|
|
||||||
func createImageMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func createImageMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
callBack(result, Open_im_sdkCreateImageMessage(methodCall[string: "imagePath"]))
|
callBack(result, Open_im_sdkCreateImageMessage(methodCall[string: "operationID"], methodCall[string: "imagePath"]))
|
||||||
}
|
}
|
||||||
|
|
||||||
func createImageMessageFromFullPath(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func createImageMessageFromFullPath(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
callBack(result, Open_im_sdkCreateImageMessageFromFullPath(methodCall[string: "imagePath"]))
|
callBack(result, Open_im_sdkCreateImageMessageFromFullPath(methodCall[string: "operationID"], methodCall[string: "imagePath"]))
|
||||||
}
|
}
|
||||||
|
|
||||||
func createSoundMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func createSoundMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
callBack(result, Open_im_sdkCreateSoundMessage(methodCall[string: "soundPath"], methodCall[int64: "duration"]))
|
callBack(result, Open_im_sdkCreateSoundMessage(methodCall[string: "operationID"], methodCall[string: "soundPath"], methodCall[int64: "duration"]))
|
||||||
}
|
}
|
||||||
|
|
||||||
func createSoundMessageFromFullPath(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func createSoundMessageFromFullPath(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
callBack(result, Open_im_sdkCreateSoundMessageFromFullPath(methodCall[string: "soundPath"], methodCall[int64: "duration"]))
|
callBack(result, Open_im_sdkCreateSoundMessageFromFullPath(methodCall[string: "operationID"], methodCall[string: "soundPath"], methodCall[int64: "duration"]))
|
||||||
}
|
}
|
||||||
|
|
||||||
func createVideoMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func createVideoMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
let prama = Open_im_sdkCreateVideoMessage(methodCall[string: "videoPath"], methodCall[string: "videoType"],
|
let prama = Open_im_sdkCreateVideoMessage(methodCall[string: "operationID"], methodCall[string: "videoPath"], methodCall[string: "videoType"],
|
||||||
methodCall[int64: "duration"], methodCall[string: "snapshotPath"])
|
methodCall[int64: "duration"], methodCall[string: "snapshotPath"])
|
||||||
callBack(result, prama)
|
callBack(result, prama)
|
||||||
}
|
}
|
||||||
|
|
||||||
func createVideoMessageFromFullPath(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func createVideoMessageFromFullPath(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
let prama = Open_im_sdkCreateVideoMessageFromFullPath(methodCall[string: "videoPath"], methodCall[string: "videoType"],
|
let prama = Open_im_sdkCreateVideoMessageFromFullPath(methodCall[string: "operationID"], methodCall[string: "videoPath"], methodCall[string: "videoType"],
|
||||||
methodCall[int64: "duration"], methodCall[string: "snapshotPath"])
|
methodCall[int64: "duration"], methodCall[string: "snapshotPath"])
|
||||||
callBack(result, prama)
|
callBack(result, prama)
|
||||||
}
|
}
|
||||||
|
|
||||||
func createFileMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func createFileMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
callBack(result, Open_im_sdkCreateFileMessage(methodCall[string: "filePath"], methodCall[string: "fileName"]))
|
callBack(result, Open_im_sdkCreateFileMessage(methodCall[string: "operationID"], methodCall[string: "filePath"], methodCall[string: "fileName"]))
|
||||||
}
|
}
|
||||||
|
|
||||||
func createFileMessageFromFullPath(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func createFileMessageFromFullPath(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
callBack(result, Open_im_sdkCreateFileMessageFromFullPath(methodCall[string: "filePath"], methodCall[string: "fileName"]))
|
callBack(result, Open_im_sdkCreateFileMessageFromFullPath(methodCall[string: "operationID"], methodCall[string: "filePath"], methodCall[string: "fileName"]))
|
||||||
}
|
}
|
||||||
|
|
||||||
func createMergerMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func createMergerMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
let prama = Open_im_sdkCreateMergerMessage(methodCall[jsonString: "messageList"], methodCall[string: "title"],
|
let prama = Open_im_sdkCreateMergerMessage(methodCall[string: "operationID"], methodCall[jsonString: "messageList"], methodCall[string: "title"],
|
||||||
methodCall[jsonString: "summaryList"])
|
methodCall[jsonString: "summaryList"])
|
||||||
callBack(result, prama)
|
callBack(result, prama)
|
||||||
}
|
}
|
||||||
|
|
||||||
func createForwardMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func createForwardMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
callBack(result, Open_im_sdkCreateForwardMessage(methodCall[jsonString: "message"]))
|
callBack(result, Open_im_sdkCreateForwardMessage(methodCall[string: "operationID"], methodCall[jsonString: "message"]))
|
||||||
}
|
}
|
||||||
|
|
||||||
func createLocationMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func createLocationMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
let prama = Open_im_sdkCreateLocationMessage(methodCall[string: "description"],
|
let prama = Open_im_sdkCreateLocationMessage(methodCall[string: "operationID"], methodCall[string: "description"],
|
||||||
methodCall[double: "longitude"], methodCall[double: "latitude"])
|
methodCall[double: "longitude"], methodCall[double: "latitude"])
|
||||||
callBack(result, prama)
|
callBack(result, prama)
|
||||||
}
|
}
|
||||||
|
|
||||||
func createCustomMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func createCustomMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
let prama = Open_im_sdkCreateCustomMessage(methodCall[string: "data"],
|
let prama = Open_im_sdkCreateCustomMessage(methodCall[string: "operationID"], methodCall[string: "data"],
|
||||||
methodCall[string: "extension"], methodCall[string: "description"])
|
methodCall[string: "extension"], methodCall[string: "description"])
|
||||||
callBack(result, prama)
|
callBack(result, prama)
|
||||||
}
|
}
|
||||||
|
|
||||||
func createQuoteMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func createQuoteMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
let prama = Open_im_sdkCreateQuoteMessage(methodCall[string: "quoteText"], methodCall[jsonString: "quoteMessage"])
|
let prama = Open_im_sdkCreateQuoteMessage(methodCall[string: "operationID"], methodCall[string: "quoteText"], methodCall[jsonString: "quoteMessage"])
|
||||||
callBack(result, prama)
|
callBack(result, prama)
|
||||||
}
|
}
|
||||||
|
|
||||||
func createCardMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func createCardMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
callBack(result, Open_im_sdkCreateCardMessage(methodCall[jsonString: "cardMessage"]))
|
callBack(result, Open_im_sdkCreateCardMessage(methodCall[string: "operationID"], methodCall[jsonString: "cardMessage"]))
|
||||||
}
|
}
|
||||||
|
|
||||||
func forceSyncMsg(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func createFaceMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkForceSyncMsg()
|
callBack(result, Open_im_sdkCreateFaceMessage(methodCall[string: "operationID"], methodCall[int: "index"], methodCall[string: "data"]))
|
||||||
|
}
|
||||||
|
|
||||||
|
func createAdvancedTextMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
let prama = Open_im_sdkCreateAdvancedTextMessage(methodCall[string: "operationID"], methodCall[string: "text"], methodCall[jsonString: "richMessageInfoList"])
|
||||||
|
callBack(result, prama)
|
||||||
|
}
|
||||||
|
|
||||||
|
func createAdvancedQuoteMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
let prama = Open_im_sdkCreateAdvancedQuoteMessage(methodCall[string: "operationID"], methodCall[string: "quoteText"], methodCall[jsonString: "quoteMessage"], methodCall[jsonString: "richMessageInfoList"])
|
||||||
|
callBack(result, prama)
|
||||||
|
}
|
||||||
|
|
||||||
|
func searchLocalMessages(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkSearchLocalMessages(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "filter"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func clearConversationAndDeleteAllMsg(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkClearConversationAndDeleteAllMsg(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func getAdvancedHistoryMessageList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkGetAdvancedHistoryMessageList(BaseCallback(result: result), methodCall[string: "operationID"], methodCall.toJsonString())
|
||||||
|
}
|
||||||
|
|
||||||
|
func getAdvancedHistoryMessageListReverse(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkGetAdvancedHistoryMessageListReverse(BaseCallback(result: result), methodCall[string: "operationID"], methodCall.toJsonString())
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func findMessageList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkFindMessageList(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "searchParams"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func sendMessageNotOss(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
let sendMsgProgressListener: SendMsgProgressListener = SendMsgProgressListener(channel: channel,result: result,methodCall: methodCall)
|
||||||
|
Open_im_sdkSendMessageNotOss(sendMsgProgressListener, methodCall[string: "operationID"], methodCall[jsonString: "message"], methodCall[string: "userID"],
|
||||||
|
methodCall[string: "groupID"], methodCall[jsonString: "offlinePushInfo"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func createImageMessageByURL(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
callBack(result, Open_im_sdkCreateImageMessageByURL(methodCall[string: "operationID"], methodCall[jsonString: "sourcePicture"], methodCall[jsonString: "bigPicture"], methodCall[jsonString: "snapshotPicture"]))
|
||||||
|
}
|
||||||
|
|
||||||
|
func createSoundMessageByURL(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
callBack(result, Open_im_sdkCreateSoundMessageByURL(methodCall[string: "operationID"], methodCall[jsonString: "soundElem"]))
|
||||||
|
}
|
||||||
|
|
||||||
|
func createVideoMessageByURL(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
callBack(result, Open_im_sdkCreateVideoMessageByURL(methodCall[string: "operationID"], methodCall[jsonString: "videoElem"]))
|
||||||
|
}
|
||||||
|
|
||||||
|
func createFileMessageByURL(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
callBack(result, Open_im_sdkCreateFileMessageByURL(methodCall[string: "operationID"], methodCall[jsonString: "fileElem"]))
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCustomBusinessListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkSetCustomBusinessListener(CustomBusinessListener(channel: channel))
|
||||||
callBack(result)
|
callBack(result)
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SendMsgProgressListener: NSObject, Open_im_sdkSendMsgCallBackProtocol {
|
func setMessageKvInfoListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkSetMessageKvInfoListener(MessageKvInfoListener(channel: channel))
|
||||||
private let channel: FlutterMethodChannel
|
callBack(result)
|
||||||
private var result: FlutterResult?
|
|
||||||
private var call: FlutterMethodCall?
|
|
||||||
private var values: [String: Any] = [:]
|
|
||||||
|
|
||||||
init(channel: FlutterMethodChannel) {
|
|
||||||
self.channel = channel
|
|
||||||
}
|
|
||||||
|
|
||||||
func setResult(result: @escaping FlutterResult){
|
|
||||||
self.result = result
|
|
||||||
}
|
|
||||||
|
|
||||||
func setCall(methodCall: FlutterMethodCall){
|
|
||||||
self.call = methodCall
|
|
||||||
}
|
|
||||||
|
|
||||||
public func onError(_ errCode: Int, errMsg: String?) {
|
|
||||||
print("=================onError============\nerrcode:\(errCode),errMsg:\(errMsg!)")
|
|
||||||
DispatchQueue.main.async { self.result!(FlutterError(code: "\(errCode)", message: errMsg, details: nil)) }
|
|
||||||
}
|
|
||||||
|
|
||||||
public func onProgress(_ progress: Int) {
|
|
||||||
guard let call = call else {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
print("=================onProgress============\nprogress:\(progress)")
|
|
||||||
values["clientMsgID"] = call[string: "clientMsgID"]
|
|
||||||
values["progress"] = progress
|
|
||||||
CommonUtil.emitEvent(channel: channel, method: "msgSendProgressListener", type: "onProgress", errCode: nil, errMsg: nil, data: values)
|
|
||||||
}
|
|
||||||
|
|
||||||
public func onSuccess(_ data: String?) {
|
|
||||||
print("=================onSuccess============\nsuccess:\(data!)")
|
|
||||||
DispatchQueue.main.async { self.result!(data) }
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public class AdvancedMsgListener: NSObject, Open_im_sdkOnAdvancedMsgListenerProtocol {
|
|
||||||
private let channel: FlutterMethodChannel
|
|
||||||
private var values: [String: Any] = [:]
|
|
||||||
|
|
||||||
init(channel: FlutterMethodChannel, id: String) {
|
|
||||||
self.channel = channel
|
|
||||||
values["id"] = id
|
|
||||||
}
|
|
||||||
|
|
||||||
public func onRecvC2CReadReceipt(_ msgReceiptList: String?) {
|
|
||||||
values["haveReadMessage"] = msgReceiptList
|
|
||||||
CommonUtil.emitEvent(channel: channel, method: "advancedMsgListener", type: "onRecvC2CReadReceipt", errCode: nil, errMsg: nil, data: values)
|
|
||||||
}
|
|
||||||
|
|
||||||
public func onRecvMessageRevoked(_ msgId: String?) {
|
|
||||||
values["revokedMessage"] = msgId
|
|
||||||
CommonUtil.emitEvent(channel: channel, method: "advancedMsgListener", type: "onRecvMessageRevoked", errCode: nil, errMsg: nil, data: values)
|
|
||||||
}
|
|
||||||
|
|
||||||
public func onRecvNewMessage(_ message: String?) {
|
|
||||||
values["newMessage"] = message
|
|
||||||
CommonUtil.emitEvent(channel: channel, method: "advancedMsgListener", type: "onRecvNewMessage", errCode: nil, errMsg: nil, data: values)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class SendMsgProgressListener: NSObject, Open_im_sdk_callbackSendMsgCallBackProtocol {
|
||||||
|
private let channel: FlutterMethodChannel
|
||||||
|
private let result: FlutterResult
|
||||||
|
private let call: FlutterMethodCall
|
||||||
|
|
||||||
|
init(channel: FlutterMethodChannel, result: @escaping FlutterResult, methodCall: FlutterMethodCall) {
|
||||||
|
self.channel = channel
|
||||||
|
self.result = result
|
||||||
|
self.call = methodCall
|
||||||
|
}
|
||||||
|
|
||||||
|
public func onError(_ errCode: Int32, errMsg: String?) {
|
||||||
|
DispatchQueue.main.async { self.result(FlutterError(code: "\(errCode)", message: errMsg, details: nil)) }
|
||||||
|
}
|
||||||
|
|
||||||
|
public func onProgress(_ progress: Int) {
|
||||||
|
var values: [String: Any] = [:]
|
||||||
|
let message = call[dict: "message"]
|
||||||
|
values["clientMsgID"] = message["clientMsgID"]
|
||||||
|
values["progress"] = progress
|
||||||
|
CommonUtil.emitEvent(channel: channel, method: "msgSendProgressListener", type: "onProgress", errCode: nil, errMsg: nil, data: values)
|
||||||
|
}
|
||||||
|
|
||||||
|
public func onSuccess(_ data: String?) {
|
||||||
|
DispatchQueue.main.async { self.result(data) }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class AdvancedMsgListener: NSObject, Open_im_sdk_callbackOnAdvancedMsgListenerProtocol {
|
||||||
|
private let channel: FlutterMethodChannel
|
||||||
|
private let id: String
|
||||||
|
|
||||||
|
init(channel: FlutterMethodChannel, id: String) {
|
||||||
|
self.channel = channel
|
||||||
|
self.id = id
|
||||||
|
}
|
||||||
|
|
||||||
|
public func onMsgDeleted(_ message: String?) {
|
||||||
|
var values: [String: Any] = [:]
|
||||||
|
values["id"] = id
|
||||||
|
values["message"] = message
|
||||||
|
CommonUtil.emitEvent(channel: channel, method: "advancedMsgListener", type: "onMsgDeleted", errCode: nil, errMsg: nil, data: values);
|
||||||
|
}
|
||||||
|
|
||||||
|
public func onNewRecvMessageRevoked(_ messageRevoked: String?) {
|
||||||
|
var values: [String: Any] = [:]
|
||||||
|
values["id"] = id
|
||||||
|
values["messageRevoked"] = messageRevoked
|
||||||
|
CommonUtil.emitEvent(channel: channel, method: "advancedMsgListener", type: "onNewRecvMessageRevoked", errCode: nil, errMsg: nil, data: values)
|
||||||
|
}
|
||||||
|
|
||||||
|
public func onRecvC2CReadReceipt(_ msgReceiptList: String?) {
|
||||||
|
var values: [String: Any] = [:]
|
||||||
|
values["id"] = id
|
||||||
|
values["msgReceiptList"] = msgReceiptList
|
||||||
|
CommonUtil.emitEvent(channel: channel, method: "advancedMsgListener", type: "onRecvC2CReadReceipt", errCode: nil, errMsg: nil, data: values)
|
||||||
|
}
|
||||||
|
|
||||||
|
public func onRecvGroupReadReceipt(_ groupMsgReceiptList: String?) {
|
||||||
|
var values: [String: Any] = [:]
|
||||||
|
values["id"] = id
|
||||||
|
values["groupMsgReceiptList"] = groupMsgReceiptList
|
||||||
|
CommonUtil.emitEvent(channel: channel, method: "advancedMsgListener", type: "onRecvGroupReadReceipt", errCode: nil, errMsg: nil, data: values)
|
||||||
|
}
|
||||||
|
|
||||||
|
public func onRecvMessageExtensionsAdded(_ msgID: String?, reactionExtensionList: String?) {
|
||||||
|
var values: [String: Any] = [:]
|
||||||
|
values["id"] = id
|
||||||
|
values["msgID"] = msgID
|
||||||
|
values["reactionExtensionList"] = reactionExtensionList
|
||||||
|
CommonUtil.emitEvent(channel: channel, method: "advancedMsgListener", type: "onRecvMessageExtensionsAdded", errCode: nil, errMsg: nil, data: values)
|
||||||
|
}
|
||||||
|
|
||||||
|
public func onRecvMessageExtensionsChanged(_ msgID: String?, reactionExtensionList: String?) {
|
||||||
|
var values: [String: Any] = [:]
|
||||||
|
values["id"] = id
|
||||||
|
values["msgID"] = msgID
|
||||||
|
values["reactionExtensionList"] = reactionExtensionList
|
||||||
|
CommonUtil.emitEvent(channel: channel, method: "advancedMsgListener", type: "onRecvMessageExtensionsChanged", errCode: nil, errMsg: nil, data: values)
|
||||||
|
}
|
||||||
|
|
||||||
|
public func onRecvMessageExtensionsDeleted(_ msgID: String?, reactionExtensionKeyList: String?) {
|
||||||
|
var values: [String: Any] = [:]
|
||||||
|
values["id"] = id
|
||||||
|
values["msgID"] = msgID
|
||||||
|
values["reactionExtensionKeyList"] = reactionExtensionKeyList
|
||||||
|
CommonUtil.emitEvent(channel: channel, method: "advancedMsgListener", type: "onRecvMessageExtensionsDeleted", errCode: nil, errMsg: nil, data: values)
|
||||||
|
}
|
||||||
|
|
||||||
|
public func onRecvNewMessage(_ message: String?) {
|
||||||
|
var values: [String: Any] = [:]
|
||||||
|
values["id"] = id
|
||||||
|
values["message"] = message
|
||||||
|
CommonUtil.emitEvent(channel: channel, method: "advancedMsgListener", type: "onRecvNewMessage", errCode: nil, errMsg: nil, data: values)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public func onRecvOfflineNewMessage(_ message: String?) {
|
||||||
|
var values: [String: Any] = [:]
|
||||||
|
values["id"] = id
|
||||||
|
values["message"] = message
|
||||||
|
CommonUtil.emitEvent(channel: channel, method: "advancedMsgListener", type: "onRecvOfflineNewMessage", errCode: nil, errMsg: nil, data: values);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class CustomBusinessListener: NSObject, Open_im_sdk_callbackOnCustomBusinessListenerProtocol {
|
||||||
|
private let channel: FlutterMethodChannel
|
||||||
|
|
||||||
|
init(channel: FlutterMethodChannel) {
|
||||||
|
self.channel = channel
|
||||||
|
}
|
||||||
|
|
||||||
|
public func onRecvCustomBusinessMessage(_ s: String?) {
|
||||||
|
CommonUtil.emitEvent(channel: channel, method: "customBusinessListener", type: "onRecvCustomBusinessMessage", errCode: nil, errMsg: nil, data: s)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class MessageKvInfoListener: NSObject, Open_im_sdk_callbackOnMessageKvInfoListenerProtocol {
|
||||||
|
|
||||||
|
|
||||||
|
private let channel: FlutterMethodChannel
|
||||||
|
|
||||||
|
init(channel: FlutterMethodChannel) {
|
||||||
|
self.channel = channel
|
||||||
|
}
|
||||||
|
|
||||||
|
public func onMessageKvInfoChanged(_ s: String?) {
|
||||||
|
CommonUtil.emitEvent(channel: channel, method: "messageKvInfoListener", type: "onMessageKvInfoChanged", errCode: nil, errMsg: nil, data: s)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
59
ios/Classes/Module/OrganizationManager.swift
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
//import Foundation
|
||||||
|
//import OpenIMCore
|
||||||
|
//
|
||||||
|
//public class OrganizationManager: BaseServiceManager {
|
||||||
|
//
|
||||||
|
// public override func registerHandlers() {
|
||||||
|
// super.registerHandlers()
|
||||||
|
// self["setOrganizationListener"] = setOrganizationListener
|
||||||
|
// self["getSubDepartment"] = getSubDepartment
|
||||||
|
// self["getDepartmentMember"] = getDepartmentMember
|
||||||
|
// self["getUserInDepartment"] = getUserInDepartment
|
||||||
|
// self["getDepartmentMemberAndSubDepartment"] = getDepartmentMemberAndSubDepartment
|
||||||
|
// self["getDepartmentInfo"] = getDepartmentInfo
|
||||||
|
// self["searchOrganization"] = searchOrganization
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// func setOrganizationListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
// Open_im_sdkSetOrganizationListener(OrganizationListener(channel: channel))
|
||||||
|
// callBack(result)
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// func getSubDepartment(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||||
|
// Open_im_sdkGetSubDepartment(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "departmentID"], methodCall[int: "offset"], methodCall[int: "count"])
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// func getDepartmentMember(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||||
|
// Open_im_sdkGetDepartmentMember(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "departmentID"], methodCall[int: "offset"], methodCall[int: "count"])
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// func getUserInDepartment(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||||
|
// Open_im_sdkGetUserInDepartment(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "userID"])
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// func getDepartmentMemberAndSubDepartment(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||||
|
// Open_im_sdkGetDepartmentMemberAndSubDepartment(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "departmentID"])
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// func getDepartmentInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||||
|
// Open_im_sdkGetDepartmentInfo(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "departmentID"])
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// func searchOrganization(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||||
|
// Open_im_sdkSearchOrganization(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "searchParam"], methodCall[int: "offset"], methodCall[int: "count"])
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
//
|
||||||
|
//public class OrganizationListener: NSObject, Open_im_sdk_callbackOnOrganizationListenerProtocol {
|
||||||
|
//
|
||||||
|
// private let channel:FlutterMethodChannel
|
||||||
|
//
|
||||||
|
// init(channel:FlutterMethodChannel) {
|
||||||
|
// self.channel = channel
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public func onOrganizationUpdated() {
|
||||||
|
// CommonUtil.emitEvent(channel: self.channel, method: "organizationListener", type: "onOrganizationUpdated", errCode: nil, errMsg: nil, data: nil)
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//}
|
||||||
148
ios/Classes/Module/SignalingManager.swift
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
//import Foundation
|
||||||
|
//import OpenIMCore
|
||||||
|
//
|
||||||
|
//public class SignalingManager: BaseServiceManager {
|
||||||
|
//
|
||||||
|
// public override func registerHandlers() {
|
||||||
|
// super.registerHandlers()
|
||||||
|
// self["setSignalingListener"] = setSignalingListener
|
||||||
|
// self["signalingInvite"] = signalingInvite
|
||||||
|
// self["signalingInviteInGroup"] = signalingInviteInGroup
|
||||||
|
// self["signalingAccept"] = signalingAccept
|
||||||
|
// self["signalingReject"] = signalingReject
|
||||||
|
// self["signalingCancel"] = signalingCancel
|
||||||
|
// self["signalingHungUp"] = signalingHungUp
|
||||||
|
// self["signalingGetRoomByGroupID"] = signalingGetRoomByGroupID
|
||||||
|
// self["signalingGetTokenByRoomID"] = signalingGetTokenByRoomID
|
||||||
|
// self["signalingUpdateMeetingInfo"] = signalingUpdateMeetingInfo
|
||||||
|
// self["signalingCreateMeeting"] = signalingCreateMeeting
|
||||||
|
// self["signalingJoinMeeting"] = signalingJoinMeeting
|
||||||
|
// self["signalingOperateStream"] = signalingOperateStream
|
||||||
|
// self["signalingGetMeetings"] = signalingGetMeetings
|
||||||
|
// self["signalingCloseRoom"] = signalingCloseRoom
|
||||||
|
// self["signalingSendCustomSignal"] = signalingSendCustomSignal
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// func setSignalingListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
// Open_im_sdkSetSignalingListener(SignalingListener(channel: channel))
|
||||||
|
// callBack(result)
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// func signalingInvite(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
// Open_im_sdkSignalingInvite(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "signalingInfo"])
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// func signalingInviteInGroup(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
// Open_im_sdkSignalingInviteInGroup(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "signalingInfo"])
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// func signalingAccept(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
// Open_im_sdkSignalingAccept(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "signalingInfo"])
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// func signalingReject(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
// Open_im_sdkSignalingReject(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "signalingInfo"])
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// func signalingCancel(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
// Open_im_sdkSignalingCancel(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "signalingInfo"])
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// func signalingHungUp(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
// Open_im_sdkSignalingHungUp(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "signalingInfo"])
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// func signalingGetRoomByGroupID(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
// Open_im_sdkSignalingGetRoomByGroupID(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"])
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// func signalingGetTokenByRoomID(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
// Open_im_sdkSignalingGetTokenByRoomID(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "roomID"])
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// func signalingUpdateMeetingInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
// Open_im_sdkSignalingUpdateMeetingInfo(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "info"])
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// func signalingCreateMeeting(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
// Open_im_sdkSignalingCreateMeeting(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "info"])
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// func signalingJoinMeeting(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
// Open_im_sdkSignalingJoinMeeting(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "info"])
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// func signalingOperateStream(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
// Open_im_sdkSignalingOperateStream(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "streamType"], methodCall[string: "roomID"], methodCall[string: "userID"], methodCall[bool: "mute"], methodCall[bool: "muteAll"])
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// func signalingGetMeetings(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
// Open_im_sdkSignalingGetMeetings(BaseCallback(result: result), methodCall[string: "operationID"])
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// func signalingCloseRoom(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
// Open_im_sdkSignalingCloseRoom(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "roomID"])
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// func signalingSendCustomSignal(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
// Open_im_sdkSignalingSendCustomSignal(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "customInfo"], methodCall[string: "roomID"])
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
//public class SignalingListener: NSObject, Open_im_sdk_callbackOnSignalingListenerProtocol {
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// private let channel:FlutterMethodChannel
|
||||||
|
//
|
||||||
|
// init(channel:FlutterMethodChannel) {
|
||||||
|
// self.channel = channel
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public func onInvitationCancelled(_ s: String?) {
|
||||||
|
// CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onInvitationCancelled", errCode: nil, errMsg: nil, data: s)
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public func onInvitationTimeout(_ s: String?) {
|
||||||
|
// CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onInvitationTimeout", errCode: nil, errMsg: nil, data: s)
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public func onInviteeAccepted(_ s: String?) {
|
||||||
|
// CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onInviteeAccepted", errCode: nil, errMsg: nil, data: s)
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public func onInviteeAccepted(byOtherDevice s: String?) {
|
||||||
|
// CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onInviteeAcceptedByOtherDevice", errCode: nil, errMsg: nil, data: s)
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public func onInviteeRejected(_ s: String?) {
|
||||||
|
// CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onInviteeRejected", errCode: nil, errMsg: nil, data: s)
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public func onInviteeRejected(byOtherDevice s: String?) {
|
||||||
|
// CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onInviteeRejectedByOtherDevice", errCode: nil, errMsg: nil, data: s)
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public func onReceiveNewInvitation(_ s: String?) {
|
||||||
|
// CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onReceiveNewInvitation", errCode: nil, errMsg: nil, data: s)
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public func onHangUp(_ s: String?) {
|
||||||
|
// CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onHangUp", errCode: nil, errMsg: nil, data: s)
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public func onRoomParticipantConnected(_ s: String?) {
|
||||||
|
// CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onRoomParticipantConnected", errCode: nil, errMsg: nil, data: s)
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public func onRoomParticipantDisconnected(_ s: String?) {
|
||||||
|
// CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onRoomParticipantDisconnected", errCode: nil, errMsg: nil, data: s)
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public func onStreamChange(_ s: String?) {
|
||||||
|
// CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onStreamChange", errCode: nil, errMsg: nil, data: s)
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public func onReceiveCustomSignal(_ s: String?) {
|
||||||
|
// CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onReceiveCustomSignal", errCode: nil, errMsg: nil, data: s)
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//}
|
||||||
43
ios/Classes/Module/UserManager.swift
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
import Foundation
|
||||||
|
import OpenIMCore
|
||||||
|
|
||||||
|
public class UserManager: BaseServiceManager {
|
||||||
|
|
||||||
|
public override func registerHandlers() {
|
||||||
|
super.registerHandlers()
|
||||||
|
self["setUserListener"] = setUserListener
|
||||||
|
self["getUsersInfo"] = getUsersInfo
|
||||||
|
self["setSelfInfo"] = setSelfInfo
|
||||||
|
self["getSelfUserInfo"] = getSelfUserInfo
|
||||||
|
}
|
||||||
|
|
||||||
|
func setUserListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkSetUserListener(UserListener(channel: channel))
|
||||||
|
callBack(result)
|
||||||
|
}
|
||||||
|
|
||||||
|
func getUsersInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||||
|
Open_im_sdkGetUsersInfo(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "userIDList"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func setSelfInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||||
|
Open_im_sdkSetSelfInfo(BaseCallback(result: result), methodCall[string: "operationID"], methodCall.toJsonString())
|
||||||
|
}
|
||||||
|
|
||||||
|
func getSelfUserInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||||
|
Open_im_sdkGetSelfUserInfo(BaseCallback(result: result), methodCall[string: "operationID"])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class UserListener: NSObject, Open_im_sdk_callbackOnUserListenerProtocol {
|
||||||
|
|
||||||
|
private let channel:FlutterMethodChannel
|
||||||
|
|
||||||
|
init(channel:FlutterMethodChannel) {
|
||||||
|
self.channel = channel
|
||||||
|
}
|
||||||
|
|
||||||
|
public func onSelfInfoUpdated(_ userInfo: String?) {
|
||||||
|
CommonUtil.emitEvent(channel: self.channel, method: "userListener", type: "onSelfInfoUpdated", errCode: nil, errMsg: nil, data: userInfo)
|
||||||
|
}
|
||||||
|
}
|
||||||
44
ios/Classes/Module/WorkMomentsManager.swift
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
//import Foundation
|
||||||
|
//import OpenIMCore
|
||||||
|
//
|
||||||
|
//public class WorkMomentsManager: BaseServiceManager {
|
||||||
|
//
|
||||||
|
// public override func registerHandlers() {
|
||||||
|
// super.registerHandlers()
|
||||||
|
// self["setWorkMomentsListener"] = setWorkMomentsListener
|
||||||
|
// self["getWorkMomentsUnReadCount"] = getWorkMomentsUnReadCount
|
||||||
|
// self["getWorkMomentsNotification"] = getWorkMomentsNotification
|
||||||
|
// self["clearWorkMomentsNotification"] = clearWorkMomentsNotification
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// func setWorkMomentsListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
// Open_im_sdkSetWorkMomentsListener(WorkMomentsListener(channel: channel))
|
||||||
|
// callBack(result)
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// func getWorkMomentsUnReadCount(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||||
|
// Open_im_sdkGetWorkMomentsUnReadCount(BaseCallback(result: result), methodCall[string: "operationID"])
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// func getWorkMomentsNotification(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||||
|
// Open_im_sdkGetWorkMomentsNotification(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[int: "offset"], methodCall[int: "count"])
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// func clearWorkMomentsNotification(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||||
|
// Open_im_sdkClearWorkMomentsNotification(BaseCallback(result: result), methodCall[string: "operationID"])
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
//
|
||||||
|
//public class WorkMomentsListener: NSObject, Open_im_sdk_callbackOnWorkMomentsListenerProtocol {
|
||||||
|
//
|
||||||
|
// private let channel:FlutterMethodChannel
|
||||||
|
//
|
||||||
|
// init(channel:FlutterMethodChannel) {
|
||||||
|
// self.channel = channel
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public func onRecvNewNotification() {
|
||||||
|
// CommonUtil.emitEvent(channel: self.channel, method: "workMomentsListener", type: "OnRecvNewNotification", errCode: nil, errMsg: nil, data: nil)
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//}
|
||||||
405
ios/Classes/Reachability.swift
Normal file
@@ -0,0 +1,405 @@
|
|||||||
|
/*
|
||||||
|
Copyright (c) 2014, Ashley Mills
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice, this
|
||||||
|
list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer in the documentation
|
||||||
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
|
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import SystemConfiguration
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
public enum ReachabilityError: Error {
|
||||||
|
case failedToCreateWithAddress(sockaddr, Int32)
|
||||||
|
case failedToCreateWithHostname(String, Int32)
|
||||||
|
case unableToSetCallback(Int32)
|
||||||
|
case unableToSetDispatchQueue(Int32)
|
||||||
|
case unableToGetFlags(Int32)
|
||||||
|
}
|
||||||
|
|
||||||
|
@available(*, unavailable, renamed: "Notification.Name.reachabilityChanged")
|
||||||
|
public let ReachabilityChangedNotification = NSNotification.Name("ReachabilityChangedNotification")
|
||||||
|
|
||||||
|
public extension Notification.Name {
|
||||||
|
static let reachabilityChanged = Notification.Name("reachabilityChanged")
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Reachability {
|
||||||
|
|
||||||
|
public typealias NetworkReachable = (Reachability) -> ()
|
||||||
|
public typealias NetworkUnreachable = (Reachability) -> ()
|
||||||
|
|
||||||
|
@available(*, unavailable, renamed: "Connection")
|
||||||
|
public enum NetworkStatus: CustomStringConvertible {
|
||||||
|
case notReachable, reachableViaWiFi, reachableViaWWAN
|
||||||
|
public var description: String {
|
||||||
|
switch self {
|
||||||
|
case .reachableViaWWAN: return "Cellular"
|
||||||
|
case .reachableViaWiFi: return "WiFi"
|
||||||
|
case .notReachable: return "No Connection"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum Connection: CustomStringConvertible {
|
||||||
|
case unavailable, wifi, cellular
|
||||||
|
public var description: String {
|
||||||
|
switch self {
|
||||||
|
case .cellular: return "Cellular"
|
||||||
|
case .wifi: return "WiFi"
|
||||||
|
case .unavailable: return "No Connection"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@available(*, deprecated, renamed: "unavailable")
|
||||||
|
public static let none: Connection = .unavailable
|
||||||
|
}
|
||||||
|
|
||||||
|
public var whenReachable: NetworkReachable?
|
||||||
|
public var whenUnreachable: NetworkUnreachable?
|
||||||
|
|
||||||
|
@available(*, deprecated, renamed: "allowsCellularConnection")
|
||||||
|
public let reachableOnWWAN: Bool = true
|
||||||
|
|
||||||
|
/// Set to `false` to force Reachability.connection to .none when on cellular connection (default value `true`)
|
||||||
|
public var allowsCellularConnection: Bool
|
||||||
|
|
||||||
|
// The notification center on which "reachability changed" events are being posted
|
||||||
|
public var notificationCenter: NotificationCenter = NotificationCenter.default
|
||||||
|
|
||||||
|
@available(*, deprecated, renamed: "connection.description")
|
||||||
|
public var currentReachabilityString: String {
|
||||||
|
return "\(connection)"
|
||||||
|
}
|
||||||
|
|
||||||
|
@available(*, unavailable, renamed: "connection")
|
||||||
|
public var currentReachabilityStatus: Connection {
|
||||||
|
return connection
|
||||||
|
}
|
||||||
|
|
||||||
|
public var connection: Connection {
|
||||||
|
if flags == nil {
|
||||||
|
try? setReachabilityFlags()
|
||||||
|
}
|
||||||
|
|
||||||
|
switch flags?.connection {
|
||||||
|
case .unavailable?, nil: return .unavailable
|
||||||
|
case .cellular?: return allowsCellularConnection ? .cellular : .unavailable
|
||||||
|
case .wifi?: return .wifi
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fileprivate var isRunningOnDevice: Bool = {
|
||||||
|
#if targetEnvironment(simulator)
|
||||||
|
return false
|
||||||
|
#else
|
||||||
|
return true
|
||||||
|
#endif
|
||||||
|
}()
|
||||||
|
|
||||||
|
fileprivate(set) var notifierRunning = false
|
||||||
|
fileprivate let reachabilityRef: SCNetworkReachability
|
||||||
|
fileprivate let reachabilitySerialQueue: DispatchQueue
|
||||||
|
fileprivate let notificationQueue: DispatchQueue?
|
||||||
|
fileprivate(set) var flags: SCNetworkReachabilityFlags? {
|
||||||
|
didSet {
|
||||||
|
guard flags != oldValue else { return }
|
||||||
|
notifyReachabilityChanged()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
required public init(reachabilityRef: SCNetworkReachability,
|
||||||
|
queueQoS: DispatchQoS = .default,
|
||||||
|
targetQueue: DispatchQueue? = nil,
|
||||||
|
notificationQueue: DispatchQueue? = .main) {
|
||||||
|
self.allowsCellularConnection = true
|
||||||
|
self.reachabilityRef = reachabilityRef
|
||||||
|
self.reachabilitySerialQueue = DispatchQueue(label: "uk.co.ashleymills.reachability", qos: queueQoS, target: targetQueue)
|
||||||
|
self.notificationQueue = notificationQueue
|
||||||
|
}
|
||||||
|
|
||||||
|
public convenience init(hostname: String,
|
||||||
|
queueQoS: DispatchQoS = .default,
|
||||||
|
targetQueue: DispatchQueue? = nil,
|
||||||
|
notificationQueue: DispatchQueue? = .main) throws {
|
||||||
|
guard let ref = SCNetworkReachabilityCreateWithName(nil, hostname) else {
|
||||||
|
throw ReachabilityError.failedToCreateWithHostname(hostname, SCError())
|
||||||
|
}
|
||||||
|
self.init(reachabilityRef: ref, queueQoS: queueQoS, targetQueue: targetQueue, notificationQueue: notificationQueue)
|
||||||
|
}
|
||||||
|
|
||||||
|
public convenience init(queueQoS: DispatchQoS = .default,
|
||||||
|
targetQueue: DispatchQueue? = nil,
|
||||||
|
notificationQueue: DispatchQueue? = .main) throws {
|
||||||
|
var zeroAddress = sockaddr()
|
||||||
|
zeroAddress.sa_len = UInt8(MemoryLayout<sockaddr>.size)
|
||||||
|
zeroAddress.sa_family = sa_family_t(AF_INET)
|
||||||
|
|
||||||
|
guard let ref = SCNetworkReachabilityCreateWithAddress(nil, &zeroAddress) else {
|
||||||
|
throw ReachabilityError.failedToCreateWithAddress(zeroAddress, SCError())
|
||||||
|
}
|
||||||
|
|
||||||
|
self.init(reachabilityRef: ref, queueQoS: queueQoS, targetQueue: targetQueue, notificationQueue: notificationQueue)
|
||||||
|
}
|
||||||
|
|
||||||
|
deinit {
|
||||||
|
stopNotifier()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public extension Reachability {
|
||||||
|
|
||||||
|
// MARK: - *** Notifier methods ***
|
||||||
|
func startNotifier() throws {
|
||||||
|
guard !notifierRunning else { return }
|
||||||
|
|
||||||
|
let callback: SCNetworkReachabilityCallBack = { (reachability, flags, info) in
|
||||||
|
guard let info = info else { return }
|
||||||
|
|
||||||
|
// `weakifiedReachability` is guaranteed to exist by virtue of our
|
||||||
|
// retain/release callbacks which we provided to the `SCNetworkReachabilityContext`.
|
||||||
|
let weakifiedReachability = Unmanaged<ReachabilityWeakifier>.fromOpaque(info).takeUnretainedValue()
|
||||||
|
|
||||||
|
// The weak `reachability` _may_ no longer exist if the `Reachability`
|
||||||
|
// object has since been deallocated but a callback was already in flight.
|
||||||
|
weakifiedReachability.reachability?.flags = flags
|
||||||
|
}
|
||||||
|
|
||||||
|
let weakifiedReachability = ReachabilityWeakifier(reachability: self)
|
||||||
|
let opaqueWeakifiedReachability = Unmanaged<ReachabilityWeakifier>.passUnretained(weakifiedReachability).toOpaque()
|
||||||
|
|
||||||
|
var context = SCNetworkReachabilityContext(
|
||||||
|
version: 0,
|
||||||
|
info: UnsafeMutableRawPointer(opaqueWeakifiedReachability),
|
||||||
|
retain: { (info: UnsafeRawPointer) -> UnsafeRawPointer in
|
||||||
|
let unmanagedWeakifiedReachability = Unmanaged<ReachabilityWeakifier>.fromOpaque(info)
|
||||||
|
_ = unmanagedWeakifiedReachability.retain()
|
||||||
|
return UnsafeRawPointer(unmanagedWeakifiedReachability.toOpaque())
|
||||||
|
},
|
||||||
|
release: { (info: UnsafeRawPointer) -> Void in
|
||||||
|
let unmanagedWeakifiedReachability = Unmanaged<ReachabilityWeakifier>.fromOpaque(info)
|
||||||
|
unmanagedWeakifiedReachability.release()
|
||||||
|
},
|
||||||
|
copyDescription: { (info: UnsafeRawPointer) -> Unmanaged<CFString> in
|
||||||
|
let unmanagedWeakifiedReachability = Unmanaged<ReachabilityWeakifier>.fromOpaque(info)
|
||||||
|
let weakifiedReachability = unmanagedWeakifiedReachability.takeUnretainedValue()
|
||||||
|
let description = weakifiedReachability.reachability?.description ?? "nil"
|
||||||
|
return Unmanaged.passRetained(description as CFString)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
if !SCNetworkReachabilitySetCallback(reachabilityRef, callback, &context) {
|
||||||
|
stopNotifier()
|
||||||
|
throw ReachabilityError.unableToSetCallback(SCError())
|
||||||
|
}
|
||||||
|
|
||||||
|
if !SCNetworkReachabilitySetDispatchQueue(reachabilityRef, reachabilitySerialQueue) {
|
||||||
|
stopNotifier()
|
||||||
|
throw ReachabilityError.unableToSetDispatchQueue(SCError())
|
||||||
|
}
|
||||||
|
|
||||||
|
// Perform an initial check
|
||||||
|
try setReachabilityFlags()
|
||||||
|
|
||||||
|
notifierRunning = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func stopNotifier() {
|
||||||
|
defer { notifierRunning = false }
|
||||||
|
|
||||||
|
SCNetworkReachabilitySetCallback(reachabilityRef, nil, nil)
|
||||||
|
SCNetworkReachabilitySetDispatchQueue(reachabilityRef, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
// MARK: - *** Connection test methods ***
|
||||||
|
@available(*, deprecated, message: "Please use `connection != .none`")
|
||||||
|
var isReachable: Bool {
|
||||||
|
return connection != .unavailable
|
||||||
|
}
|
||||||
|
|
||||||
|
@available(*, deprecated, message: "Please use `connection == .cellular`")
|
||||||
|
var isReachableViaWWAN: Bool {
|
||||||
|
// Check we're not on the simulator, we're REACHABLE and check we're on WWAN
|
||||||
|
return connection == .cellular
|
||||||
|
}
|
||||||
|
|
||||||
|
@available(*, deprecated, message: "Please use `connection == .wifi`")
|
||||||
|
var isReachableViaWiFi: Bool {
|
||||||
|
return connection == .wifi
|
||||||
|
}
|
||||||
|
|
||||||
|
var description: String {
|
||||||
|
return flags?.description ?? "unavailable flags"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fileprivate extension Reachability {
|
||||||
|
|
||||||
|
func setReachabilityFlags() throws {
|
||||||
|
try reachabilitySerialQueue.sync { [unowned self] in
|
||||||
|
var flags = SCNetworkReachabilityFlags()
|
||||||
|
if !SCNetworkReachabilityGetFlags(self.reachabilityRef, &flags) {
|
||||||
|
self.stopNotifier()
|
||||||
|
throw ReachabilityError.unableToGetFlags(SCError())
|
||||||
|
}
|
||||||
|
|
||||||
|
self.flags = flags
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func notifyReachabilityChanged() {
|
||||||
|
let notify = { [weak self] in
|
||||||
|
guard let self = self else { return }
|
||||||
|
self.connection != .unavailable ? self.whenReachable?(self) : self.whenUnreachable?(self)
|
||||||
|
self.notificationCenter.post(name: .reachabilityChanged, object: self)
|
||||||
|
}
|
||||||
|
|
||||||
|
// notify on the configured `notificationQueue`, or the caller's (i.e. `reachabilitySerialQueue`)
|
||||||
|
notificationQueue?.async(execute: notify) ?? notify()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension SCNetworkReachabilityFlags {
|
||||||
|
|
||||||
|
typealias Connection = Reachability.Connection
|
||||||
|
|
||||||
|
var connection: Connection {
|
||||||
|
guard isReachableFlagSet else { return .unavailable }
|
||||||
|
|
||||||
|
// If we're reachable, but not on an iOS device (i.e. simulator), we must be on WiFi
|
||||||
|
#if targetEnvironment(simulator)
|
||||||
|
return .wifi
|
||||||
|
#else
|
||||||
|
var connection = Connection.unavailable
|
||||||
|
|
||||||
|
if !isConnectionRequiredFlagSet {
|
||||||
|
connection = .wifi
|
||||||
|
}
|
||||||
|
|
||||||
|
if isConnectionOnTrafficOrDemandFlagSet {
|
||||||
|
if !isInterventionRequiredFlagSet {
|
||||||
|
connection = .wifi
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if isOnWWANFlagSet {
|
||||||
|
connection = .cellular
|
||||||
|
}
|
||||||
|
|
||||||
|
return connection
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
var isOnWWANFlagSet: Bool {
|
||||||
|
#if os(iOS)
|
||||||
|
return contains(.isWWAN)
|
||||||
|
#else
|
||||||
|
return false
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
var isReachableFlagSet: Bool {
|
||||||
|
return contains(.reachable)
|
||||||
|
}
|
||||||
|
var isConnectionRequiredFlagSet: Bool {
|
||||||
|
return contains(.connectionRequired)
|
||||||
|
}
|
||||||
|
var isInterventionRequiredFlagSet: Bool {
|
||||||
|
return contains(.interventionRequired)
|
||||||
|
}
|
||||||
|
var isConnectionOnTrafficFlagSet: Bool {
|
||||||
|
return contains(.connectionOnTraffic)
|
||||||
|
}
|
||||||
|
var isConnectionOnDemandFlagSet: Bool {
|
||||||
|
return contains(.connectionOnDemand)
|
||||||
|
}
|
||||||
|
var isConnectionOnTrafficOrDemandFlagSet: Bool {
|
||||||
|
return !intersection([.connectionOnTraffic, .connectionOnDemand]).isEmpty
|
||||||
|
}
|
||||||
|
var isTransientConnectionFlagSet: Bool {
|
||||||
|
return contains(.transientConnection)
|
||||||
|
}
|
||||||
|
var isLocalAddressFlagSet: Bool {
|
||||||
|
return contains(.isLocalAddress)
|
||||||
|
}
|
||||||
|
var isDirectFlagSet: Bool {
|
||||||
|
return contains(.isDirect)
|
||||||
|
}
|
||||||
|
var isConnectionRequiredAndTransientFlagSet: Bool {
|
||||||
|
return intersection([.connectionRequired, .transientConnection]) == [.connectionRequired, .transientConnection]
|
||||||
|
}
|
||||||
|
|
||||||
|
var description: String {
|
||||||
|
let W = isOnWWANFlagSet ? "W" : "-"
|
||||||
|
let R = isReachableFlagSet ? "R" : "-"
|
||||||
|
let c = isConnectionRequiredFlagSet ? "c" : "-"
|
||||||
|
let t = isTransientConnectionFlagSet ? "t" : "-"
|
||||||
|
let i = isInterventionRequiredFlagSet ? "i" : "-"
|
||||||
|
let C = isConnectionOnTrafficFlagSet ? "C" : "-"
|
||||||
|
let D = isConnectionOnDemandFlagSet ? "D" : "-"
|
||||||
|
let l = isLocalAddressFlagSet ? "l" : "-"
|
||||||
|
let d = isDirectFlagSet ? "d" : "-"
|
||||||
|
|
||||||
|
return "\(W)\(R) \(c)\(t)\(i)\(C)\(D)\(l)\(d)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
`ReachabilityWeakifier` weakly wraps the `Reachability` class
|
||||||
|
in order to break retain cycles when interacting with CoreFoundation.
|
||||||
|
|
||||||
|
CoreFoundation callbacks expect a pair of retain/release whenever an
|
||||||
|
opaque `info` parameter is provided. These callbacks exist to guard
|
||||||
|
against memory management race conditions when invoking the callbacks.
|
||||||
|
|
||||||
|
#### Race Condition
|
||||||
|
|
||||||
|
If we passed `SCNetworkReachabilitySetCallback` a direct reference to our
|
||||||
|
`Reachability` class without also providing corresponding retain/release
|
||||||
|
callbacks, then a race condition can lead to crashes when:
|
||||||
|
- `Reachability` is deallocated on thread X
|
||||||
|
- A `SCNetworkReachability` callback(s) is already in flight on thread Y
|
||||||
|
|
||||||
|
#### Retain Cycle
|
||||||
|
|
||||||
|
If we pass `Reachability` to CoreFoundtion while also providing retain/
|
||||||
|
release callbacks, we would create a retain cycle once CoreFoundation
|
||||||
|
retains our `Reachability` class. This fixes the crashes and his how
|
||||||
|
CoreFoundation expects the API to be used, but doesn't play nicely with
|
||||||
|
Swift/ARC. This cycle would only be broken after manually calling
|
||||||
|
`stopNotifier()` — `deinit` would never be called.
|
||||||
|
|
||||||
|
#### ReachabilityWeakifier
|
||||||
|
|
||||||
|
By providing both retain/release callbacks and wrapping `Reachability` in
|
||||||
|
a weak wrapper, we:
|
||||||
|
- interact correctly with CoreFoundation, thereby avoiding a crash.
|
||||||
|
See "Memory Management Programming Guide for Core Foundation".
|
||||||
|
- don't alter the public API of `Reachability.swift` in any way
|
||||||
|
- still allow for automatic stopping of the notifier on `deinit`.
|
||||||
|
*/
|
||||||
|
private class ReachabilityWeakifier {
|
||||||
|
weak var reachability: Reachability?
|
||||||
|
init(reachability: Reachability) {
|
||||||
|
self.reachability = reachability
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,12 +2,15 @@ import Flutter
|
|||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
public class SwiftFlutterOpenimSdkPlugin: NSObject, FlutterPlugin {
|
public class SwiftFlutterOpenimSdkPlugin: NSObject, FlutterPlugin {
|
||||||
|
|
||||||
let imManager: IMMananger
|
let imManager: IMMananger
|
||||||
let conversationManager: ConversationManager
|
let conversationManager: ConversationManager
|
||||||
let friendshipManager: FriendshipManager
|
let friendshipManager: FriendshipManager
|
||||||
let messageManager: MessageManager
|
let messageManager: MessageManager
|
||||||
let groupManager: GroupManager
|
let groupManager: GroupManager
|
||||||
|
let userManger: UserManager
|
||||||
|
// let signalingManager: SignalingManager
|
||||||
|
// let workMomentsManager: WorkMomentsManager
|
||||||
|
// let organizationManager: OrganizationManager
|
||||||
|
|
||||||
init(channel: FlutterMethodChannel) {
|
init(channel: FlutterMethodChannel) {
|
||||||
self.imManager = IMMananger(channel: channel)
|
self.imManager = IMMananger(channel: channel)
|
||||||
@@ -15,6 +18,10 @@ public class SwiftFlutterOpenimSdkPlugin: NSObject, FlutterPlugin {
|
|||||||
self.friendshipManager = FriendshipManager(channel: channel)
|
self.friendshipManager = FriendshipManager(channel: channel)
|
||||||
self.messageManager = MessageManager(channel: channel)
|
self.messageManager = MessageManager(channel: channel)
|
||||||
self.groupManager = GroupManager(channel: channel)
|
self.groupManager = GroupManager(channel: channel)
|
||||||
|
self.userManger = UserManager(channel: channel)
|
||||||
|
// self.signalingManager = SignalingManager(channel: channel)
|
||||||
|
// self.workMomentsManager = WorkMomentsManager(channel: channel)
|
||||||
|
// self.organizationManager = OrganizationManager(channel: channel)
|
||||||
}
|
}
|
||||||
|
|
||||||
public static func register(with registrar: FlutterPluginRegistrar) {
|
public static func register(with registrar: FlutterPluginRegistrar) {
|
||||||
@@ -36,6 +43,14 @@ public class SwiftFlutterOpenimSdkPlugin: NSObject, FlutterPlugin {
|
|||||||
friendshipManager.handleMethod(call: call, result: result)
|
friendshipManager.handleMethod(call: call, result: result)
|
||||||
case "groupManager":
|
case "groupManager":
|
||||||
groupManager.handleMethod(call: call, result: result)
|
groupManager.handleMethod(call: call, result: result)
|
||||||
|
case "userManager":
|
||||||
|
userManger.handleMethod(call: call, result: result)
|
||||||
|
// case "signalingManager":
|
||||||
|
// signalingManager.handleMethod(call: call, result: result)
|
||||||
|
// case "workMomentsManager":
|
||||||
|
// workMomentsManager.handleMethod(call: call, result: result)
|
||||||
|
// case "organizationManager":
|
||||||
|
// organizationManager.handleMethod(call: call, result: result)
|
||||||
default:
|
default:
|
||||||
print("Handle ManagerName Error: \(managerName) not found")
|
print("Handle ManagerName Error: \(managerName) not found")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
|
|
||||||
// Objective-C API for talking to the following Go packages
|
|
||||||
//
|
|
||||||
// open_im_sdk/open_im_sdk
|
|
||||||
//
|
|
||||||
// File is generated by gomobile bind. Do not edit.
|
|
||||||
#ifndef __OpenIMCore_FRAMEWORK_H__
|
|
||||||
#define __OpenIMCore_FRAMEWORK_H__
|
|
||||||
|
|
||||||
#include "Open_im_sdk.objc.h"
|
|
||||||
#include "Universe.objc.h"
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
// Objective-C API for talking to Go package.
|
|
||||||
// gobind -lang=objc
|
|
||||||
//
|
|
||||||
// File is generated by gobind. Do not edit.
|
|
||||||
|
|
||||||
#ifndef __Universe_H__
|
|
||||||
#define __Universe_H__
|
|
||||||
|
|
||||||
@import Foundation;
|
|
||||||
#include "ref.h"
|
|
||||||
|
|
||||||
@protocol Universeerror;
|
|
||||||
@class Universeerror;
|
|
||||||
|
|
||||||
@protocol Universeerror <NSObject>
|
|
||||||
- (NSString* _Nonnull)error;
|
|
||||||
@end
|
|
||||||
|
|
||||||
@class Universeerror;
|
|
||||||
|
|
||||||
@interface Universeerror : NSError <goSeqRefInterface, Universeerror> {
|
|
||||||
}
|
|
||||||
@property(strong, readonly) _Nonnull id _ref;
|
|
||||||
|
|
||||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
|
||||||
- (NSString* _Nonnull)error;
|
|
||||||
@end
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
// Copyright 2015 The Go Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by a BSD-style
|
|
||||||
// license that can be found in the LICENSE file.
|
|
||||||
|
|
||||||
#ifndef __GO_REF_HDR__
|
|
||||||
#define __GO_REF_HDR__
|
|
||||||
|
|
||||||
#include <Foundation/Foundation.h>
|
|
||||||
|
|
||||||
// GoSeqRef is an object tagged with an integer for passing back and
|
|
||||||
// forth across the language boundary. A GoSeqRef may represent either
|
|
||||||
// an instance of a Go object, or an Objective-C object passed to Go.
|
|
||||||
// The explicit allocation of a GoSeqRef is used to pin a Go object
|
|
||||||
// when it is passed to Objective-C. The Go seq package maintains a
|
|
||||||
// reference to the Go object in a map keyed by the refnum along with
|
|
||||||
// a reference count. When the reference count reaches zero, the Go
|
|
||||||
// seq package will clear the corresponding entry in the map.
|
|
||||||
@interface GoSeqRef : NSObject {
|
|
||||||
}
|
|
||||||
@property(readonly) int32_t refnum;
|
|
||||||
@property(strong) id obj; // NULL when representing a Go object.
|
|
||||||
|
|
||||||
// new GoSeqRef object to proxy a Go object. The refnum must be
|
|
||||||
// provided from Go side.
|
|
||||||
- (instancetype)initWithRefnum:(int32_t)refnum obj:(id)obj;
|
|
||||||
|
|
||||||
- (int32_t)incNum;
|
|
||||||
|
|
||||||
@end
|
|
||||||
|
|
||||||
@protocol goSeqRefInterface
|
|
||||||
-(GoSeqRef*) _ref;
|
|
||||||
@end
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
framework module "OpenIMCore" {
|
|
||||||
header "ref.h"
|
|
||||||
header "Open_im_sdk.objc.h"
|
|
||||||
header "Universe.objc.h"
|
|
||||||
header "OpenIMCore.h"
|
|
||||||
|
|
||||||
export *
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
||||||
@@ -15,9 +15,11 @@ A new Flutter project.
|
|||||||
s.source = { :path => '.' }
|
s.source = { :path => '.' }
|
||||||
s.source_files = 'Classes/**/*'
|
s.source_files = 'Classes/**/*'
|
||||||
s.dependency 'Flutter'
|
s.dependency 'Flutter'
|
||||||
s.platform = :ios, '8.0'
|
s.platform = :ios, '11.0'
|
||||||
|
|
||||||
s.vendored_frameworks = 'Framework/*.framework'
|
s.dependency 'OpenIMSDKCore','3.2.0-alpha.0'
|
||||||
|
s.static_framework = true
|
||||||
|
# s.vendored_frameworks = 'Framework/*.framework'
|
||||||
# Flutter.framework does not contain a i386 slice.
|
# Flutter.framework does not contain a i386 slice.
|
||||||
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386 arm64' }
|
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386 arm64' }
|
||||||
s.swift_version = '5.0'
|
s.swift_version = '5.0'
|
||||||
|
|||||||
@@ -1,33 +1,41 @@
|
|||||||
library flutter_openim_sdk;
|
library flutter_openim_sdk;
|
||||||
|
|
||||||
export 'src/enum/conversation_type.dart';
|
export 'src/enum/conversation_type.dart';
|
||||||
export 'src/enum/group_role.dart';
|
export 'src/enum/group_at_type.dart';
|
||||||
|
export 'src/enum/group_role_level.dart';
|
||||||
|
export 'src/enum/group_type.dart';
|
||||||
|
export 'src/enum/group_verification.dart';
|
||||||
export 'src/enum/im_platform.dart';
|
export 'src/enum/im_platform.dart';
|
||||||
export 'src/enum/listener_type.dart';
|
export 'src/enum/listener_type.dart';
|
||||||
|
export 'src/enum/login_status.dart';
|
||||||
export 'src/enum/message_status.dart';
|
export 'src/enum/message_status.dart';
|
||||||
export 'src/enum/message_type.dart';
|
export 'src/enum/message_type.dart';
|
||||||
|
export 'src/enum/sdk_error_code.dart';
|
||||||
export 'src/listener/advanced_msg_listener.dart';
|
export 'src/listener/advanced_msg_listener.dart';
|
||||||
|
export 'src/listener/connect_listener.dart';
|
||||||
export 'src/listener/conversation_listener.dart';
|
export 'src/listener/conversation_listener.dart';
|
||||||
|
export 'src/listener/custom_business_listener.dart';
|
||||||
export 'src/listener/friendship_listener.dart';
|
export 'src/listener/friendship_listener.dart';
|
||||||
export 'src/listener/group_listener.dart';
|
export 'src/listener/group_listener.dart';
|
||||||
export 'src/listener/impl/advanced_msg_listener.dart';
|
export 'src/listener/listener_for_service.dart';
|
||||||
export 'src/listener/impl/conversation_listener.dart';
|
export 'src/listener/message_kv_info_listener.dart';
|
||||||
export 'src/listener/impl/friendship_listener.dart';
|
|
||||||
export 'src/listener/impl/group_listener.dart';
|
|
||||||
export 'src/listener/impl/init_sdk_listener.dart';
|
|
||||||
export 'src/listener/impl/msg_send_progress_listener.dart';
|
|
||||||
export 'src/listener/init_sdk_listener.dart';
|
|
||||||
export 'src/listener/msg_send_progress_listener.dart';
|
export 'src/listener/msg_send_progress_listener.dart';
|
||||||
|
export 'src/listener/upload_file_listener.dart';
|
||||||
|
export 'src/listener/user_listener.dart';
|
||||||
export 'src/manager/im_conversation_manager.dart';
|
export 'src/manager/im_conversation_manager.dart';
|
||||||
export 'src/manager/im_friendship_manager.dart';
|
export 'src/manager/im_friendship_manager.dart';
|
||||||
export 'src/manager/im_group_manager.dart';
|
export 'src/manager/im_group_manager.dart';
|
||||||
export 'src/manager/im_manager.dart';
|
export 'src/manager/im_manager.dart';
|
||||||
export 'src/manager/im_message_manager.dart';
|
export 'src/manager/im_message_manager.dart';
|
||||||
export 'src/manager/im_offline_push_manager.dart';
|
export 'src/manager/im_user_manager.dart';
|
||||||
export 'src/manager/im_signaling_manager.dart';
|
|
||||||
export 'src/manager/v2/im_message_manager_v2.dart';
|
|
||||||
export 'src/models/conversation_info.dart';
|
export 'src/models/conversation_info.dart';
|
||||||
export 'src/models/group_info.dart';
|
export 'src/models/group_info.dart';
|
||||||
|
export 'src/models/meeting_info.dart';
|
||||||
export 'src/models/message.dart';
|
export 'src/models/message.dart';
|
||||||
|
export 'src/models/notification_info.dart';
|
||||||
|
export 'src/models/organization_info.dart';
|
||||||
|
export 'src/models/search_info.dart';
|
||||||
|
export 'src/models/signaling_info.dart';
|
||||||
export 'src/models/user_info.dart';
|
export 'src/models/user_info.dart';
|
||||||
export 'src/openim.dart';
|
export 'src/openim.dart';
|
||||||
|
export 'src/utils.dart';
|
||||||
|
|||||||
@@ -1,4 +1,14 @@
|
|||||||
|
/// 会话类型
|
||||||
class ConversationType {
|
class ConversationType {
|
||||||
static const single_chat = 1;
|
/// 单聊
|
||||||
static const group_chat = 2;
|
static const single = 1;
|
||||||
|
|
||||||
|
/// 群
|
||||||
|
static const group = 2;
|
||||||
|
|
||||||
|
/// 大群
|
||||||
|
static const superGroup = 3;
|
||||||
|
|
||||||
|
/// 通知
|
||||||
|
static const notification = 4;
|
||||||
}
|
}
|
||||||
|
|||||||
17
lib/src/enum/group_at_type.dart
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
/// 会话强提示内容
|
||||||
|
class GroupAtType {
|
||||||
|
/// 取消所有提示,即调用了resetConversationGroupAtType方法
|
||||||
|
static const atNormal = 0;
|
||||||
|
|
||||||
|
/// @了我提示
|
||||||
|
static const atMe = 1;
|
||||||
|
|
||||||
|
/// @了所有人提示
|
||||||
|
static const atAll = 2;
|
||||||
|
|
||||||
|
/// @了所有人@了我
|
||||||
|
static const atAllAtMe = 3;
|
||||||
|
|
||||||
|
/// 群公告提示
|
||||||
|
static const groupNotification = 4;
|
||||||
|
}
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
class GroupRole {
|
|
||||||
static const member = 0;
|
|
||||||
static const owner = 1;
|
|
||||||
static const admin = 2;
|
|
||||||
}
|
|
||||||