diff --git a/.github/.codecov.yml b/.github/.codecov.yml
deleted file mode 100644
index 45e2131..0000000
--- a/.github/.codecov.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-coverage:
- status:
- project:
- default: false # disable the default status that measures entire project
- pkg: # declare a new status context "pkg"
- paths:
- - pkg/* # only include coverage in "pkg/" folder
- informational: true # Always pass check
- patch: off # disable the commit only checks
\ No newline at end of file
diff --git a/.github/workflows/auto-assign-issue.yml b/.github/workflows/auto-assign-issue.yml
deleted file mode 100644
index 7afebe0..0000000
--- a/.github/workflows/auto-assign-issue.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-name: Assign issue to comment author
-on:
- issue_comment:
- types: [created]
-jobs:
- assign-issue:
- if: contains(github.event.comment.body, '/assign') || contains(github.event.comment.body, '/accept')
- runs-on: ubuntu-latest
- permissions:
- issues: write
- steps:
- - name: Checkout code
- uses: actions/checkout@v3
-
- - name: Assign the issue
- run: |
- export LETASE_MILESTONES=$(curl "https://api.github.com/repos/$OWNER/$REPO/milestones" | jq -r 'last(.[]).title')
- gh issue edit ${{ github.event.issue.number }} --add-assignee "${{ github.event.comment.user.login }}"
- gh issue edit ${{ github.event.issue.number }} --add-label "triage/accepted"
- gh issue edit ${{ github.event.issue.number }} --milestone "$LETASE_MILESTONES"
- gh issue comment $ISSUE --body "@${{ github.event.comment.user.login }} Glad to see you accepted this issue🤲, this issue has been assigned to you.
I set the milestones for this issue to $LETASE_MILESTONES, we are looking forward to your PR!"
- env:
- GH_TOKEN: ${{ secrets.REDBOT_GITHUB_TOKEN }}
- ISSUE: ${{ github.event.issue.html_url }}
- OWNER: ${{ github.repository_owner }}
- REPO: ${{ github.event.repository.name }}
\ No newline at end of file
diff --git a/.github/workflows/auto-invite.yml b/.github/workflows/auto-invite.yml
deleted file mode 100644
index 9d8effb..0000000
--- a/.github/workflows/auto-invite.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-name: Invite users to join our group
-on:
- issue_comment:
- types:
- - created
-jobs:
- issue_comment:
- name: Invite users to join our group
- if: ${{ github.event.comment.body == '/invite' || github.event.comment.body == '/close' || github.event.comment.body == '/comment' }}
- runs-on: ubuntu-latest
- permissions:
- issues: write
- steps:
-
- - name: Invite user to join our group
- uses: peter-evans/create-or-update-comment@v1
- with:
- token: ${{ secrets.BOT_GITHUB_TOKEN }}
- issue-number: ${{ github.event.issue.number }}
- body: |
- We value close connections with our users, developers, and contributors here at Open-IM-Server. With a large community and maintainer team, we're always here to help and support you. Whether you're looking to join our community or have any questions or suggestions, we welcome you to get in touch with us.
-
- Our most recommended way to get in touch is through [Slack](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg). Even if you're in China, Slack is usually not blocked by firewalls, making it an easy way to connect with us. Our Slack community is the ideal place to discuss and share ideas and suggestions with other users and developers of Open-IM-Server. You can ask technical questions, seek help, or share your experiences with other users of Open-IM-Server.
-
- In addition to Slack, we also offer the following ways to get in touch:
-
- + We also have Slack channels for you to communicate and discuss. To join, visit https://slack.com/ and join our [👀 Open-IM-Server slack](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg) team channel.
- + Get in touch with us on [Gmail](https://mail.google.com/mail/u/0/?fs=1&tf=cm&to=winxu81@gmail.com). If you have any questions or issues that need resolving, or any suggestions and feedback for our open source projects, please feel free to contact us via email.
- + Read our [blog](https://doc.rentsoft.cn/). Our blog is a great place to stay up-to-date with Open-IM-Server projects and trends. On the blog, we share our latest developments, tech trends, and other interesting information.
- + Add [Wechat](https://github.com/OpenIMSDK/OpenIM-Docs/blob/main/docs/images/WechatIMG20.jpeg) and indicate that you are a user or developer of Open-IM-Server. We will process your request as soon as possible.
-
- - name: Close Issue
- uses: peter-evans/close-issue@v3
- with:
- token: ${{ secrets.BOT_GITHUB_TOKEN }}
- issue-number: ${{ github.event.issue.number }}
- comment: 🤖 Auto-closing issue, if you still need help please reopen the issue or ask for help in the community above
- labels: |
- triage/accepted
\ No newline at end of file
diff --git a/.github/workflows/check-coverage.yml b/.github/workflows/check-coverage.yml
deleted file mode 100644
index b4a6a69..0000000
--- a/.github/workflows/check-coverage.yml
+++ /dev/null
@@ -1,46 +0,0 @@
-# name: Check-Coverage
-
-
-# on:
-# workflow_dispatch:
-# push:
-# branches: [ "main" ]
-# paths-ignore:
-# - "docs/**"
-# - "**/*.md"
-# - "**/*.yaml"
-# - "CONTRIBUTORS"
-# - "CHANGELOG/**"
-# pull_request:
-# branches: [ "*" ]
-# paths-ignore:
-# - "docs/**"
-# - "**/*.md"
-# - "**/*.yaml"
-# - "CONTRIBUTORS"
-# - "CHANGELOG/**"
-# env:
-# # Common versions
-# GO_VERSION: "1.20"
-
-# jobs:
-# coverage:
-# runs-on: ubuntu-20.04
-# steps:
-# - name: Checkout
-# uses: actions/checkout@v3
-
-# - name: Setup Golang with cache
-# uses: magnetikonline/action-golang-cache@v3
-# with:
-# go-version: ${{ env.GO_VERSION }}
-# token: ${{ secrets.BOT_GITHUB_TOKEN }}
-
-# - name: Install Dependencies
-# run: sudo apt update && sudo apt install -y libgpgme-dev libbtrfs-dev libdevmapper-dev
-
-# - name: Run Cover
-# run: make cover
-
-# - name: Upload Coverage to Codecov
-# uses: codecov/codecov-action@v3
diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml
deleted file mode 100644
index 65497a1..0000000
--- a/.github/workflows/cla.yml
+++ /dev/null
@@ -1,48 +0,0 @@
-name: "OpenIM CLA Assistant"
-on:
- issue_comment:
- types: [created]
- pull_request_target:
- types: [opened,closed,synchronize]
-
-# explicitly configure permissions, in case your GITHUB_TOKEN workflow permissions are set to read-only in repository settings
-permissions:
- actions: write
- contents: write
- pull-requests: write
- statuses: write
-
-env:
- # Define Open-IM-Server variables here
- OPEN_IM_SERVER_REMOTE_ORGANIZATION: openim-sigs
- REMOTE_REPOSITORY: cla
- OPEN_IM_SERVER_CLA_DOCUMENT: https://github.com/openim-sigs/cla/blob/main/README.md
- OPEN_IM_SERVER_SIGNATURES_PATH: signatures/${{ github.event.repository.name }}/cla.json
-
- OPEN_IM_SERVER_ALLOWLIST: kubbot,bot*
-
-jobs:
- CLAAssistant:
- runs-on: ubuntu-latest
- steps:
- - name: "CLA Assistant"
- if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
- uses: contributor-assistant/github-action@v2.3.0
- env:
- GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
- PERSONAL_ACCESS_TOKEN: ${{ secrets.REDBOT_GITHUB_TOKEN }}
- with:
- path-to-signatures: ${{ env.OPEN_IM_SERVER_SIGNATURES_PATH }}
- path-to-document: ${{ env.OPEN_IM_SERVER_CLA_DOCUMENT }}
- branch: 'main'
- allowlist: ${{ env.OPEN_IM_SERVER_ALLOWLIST }}
-
- remote-organization-name: ${{ env.OPEN_IM_SERVER_REMOTE_ORGANIZATION }}
- remote-repository-name: ${{ env.REMOTE_REPOSITORY }}
-
- create-file-commit-message: '📚 Docs: Creating file for storing ${{ github.event.repository.name }} CLA Signatures'
- custom-notsigned-prcomment: '💕 Thank you for your contribution and please kindly read and sign our [🎯https://github.com/openim-sigs/cla/blob/main/README.md](https://github.com/openim-sigs/cla/blob/main/README.md)
'
- custom-pr-sign-comment: 'I have read the CLA Document and I hereby sign the CLA'
- custom-allsigned-prcomment: '🤖 All Contributors have signed the [${{ github.event.repository.name }} CLA](https://github.com/openim-sigs/cla/blob/main/README.md).
The signed information is recorded [🤖here](https://github.com/openim-sigs/cla/tree/main/signatures/${{ env.OPEN_IM_SERVER_ALLOWLIST }}/cla.json)'
- # lock-pullrequest-aftermerge: false - if you don't want this bot to automatically lock the pull request after merging (default - true)
- # use-dco-flag: true - If you are using DCO instead of CLA
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
deleted file mode 100644
index 38508b7..0000000
--- a/.github/workflows/codeql-analysis.yml
+++ /dev/null
@@ -1,71 +0,0 @@
-# For most projects, this workflow file will not need changing; you simply need
-# to commit it to your repository.
-#
-# You may wish to alter this file to override the set of languages analyzed,
-# or to provide custom queries or build logic.
-#
-# ******** NOTE ********
-# We have attempted to detect the languages in your repository. Please check
-# the `language` matrix defined below to confirm you have the correct set of
-# supported CodeQL languages.
-#
-name: "CodeQL"
-
-on:
- push:
- branches: [ main ]
- pull_request:
- # The branches below must be a subset of the branches above
- branches: "*"
-# schedule:
-# - cron: '23 2 * * 2'
-
-jobs:
- analyze:
- name: Analyze
- runs-on: ubuntu-latest
- permissions:
- actions: read
- contents: read
- security-events: write
-
- strategy:
- fail-fast: false
- matrix:
- language: [ 'go' ]
- # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
- # Learn more:
- # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@v2
-
- # Initializes the CodeQL tools for scanning.
- - name: Initialize CodeQL
- uses: github/codeql-action/init@v1
- with:
- languages: ${{ matrix.language }}
- # If you wish to specify custom queries, you can do so here or in a config file.
- # By default, queries listed here will override any specified in a config file.
- # Prefix the list here with "+" to use these queries and those in the config file.
- # queries: ./path/to/local/query, your-org/your-repo/queries@main
-
- # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
- # If this step fails, then you should remove it and run the build manually (see below)
- - name: Autobuild
- uses: github/codeql-action/autobuild@v1
-
- # ℹ️ Command-line programs to run using the OS shell.
- # 📚 https://git.io/JvXDl
-
- # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
- # and modify them (or add more) to build your code if your project
- # uses a compiled language
-
- #- run: |
- # make bootstrap
- # make release
-
- - name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v1
diff --git a/.github/workflows/gosec.yml b/.github/workflows/gosec.yml
deleted file mode 100644
index 60f42ae..0000000
--- a/.github/workflows/gosec.yml
+++ /dev/null
@@ -1,30 +0,0 @@
-# name: Run gosec
-
-# # gosec is a source code security audit tool for the Go language. It performs a static
-# # analysis of the Go code, looking for potential security problems. The main functions of gosec are:
-# # 1. Find common security vulnerabilities, such as SQL injection, command injection, and cross-site scripting (XSS).
-# # 2. Audit codes according to common security standards and find non-standard codes.
-# # 3. Assist the Go language engineer to write safe and reliable code.
-
-# on:
-# push:
-# branches: "*"
-# pull_request:
-# branches: "*"
-# paths-ignore:
-# - '*.md'
-# - '*.yml'
-# - '.github'
-
-# jobs:
-# golang-security-action:
-# runs-on: ubuntu-latest
-# env:
-# GO111MODULE: on
-# steps:
-# - name: Check out code
-# uses: actions/checkout@v3
-# - name: Run Gosec Security Scanner
-# uses: securego/gosec@master
-# with:
-# args: ./...
\ No newline at end of file
diff --git a/.github/workflows/help-comment-issue.yml b/.github/workflows/help-comment-issue.yml
deleted file mode 100644
index b1414d7..0000000
--- a/.github/workflows/help-comment-issue.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-name: Good frist issue add comment
-on:
- issues:
- types:
- - labeled
-jobs:
- add-comment:
- if: github.event.label.name == 'help wanted' || github.event.label.name == 'good first issue'
- runs-on: ubuntu-latest
- permissions:
- issues: write
- steps:
- - name: Add comment
- uses: peter-evans/create-or-update-comment@v3
- with:
- issue-number: ${{ github.event.issue.number }}
- token: ${{ secrets.BOT_GITHUB_TOKEN }}
- body: |
- This issue is available for anyone to work on. **Make sure to reference this issue in your pull request.** :sparkles: Thank you for your contribution! :sparkles:
- [Join slack 🤖](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg) to connect and communicate with our developers.
- If you wish to accept this assignment, please leave a comment in the comments section: `/accept`.🎯
diff --git a/.github/workflows/issue-robot.yml b/.github/workflows/issue-robot.yml
deleted file mode 100644
index 74927a0..0000000
--- a/.github/workflows/issue-robot.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-name: 'issue translator'
-on:
- issue_comment:
- types: [created]
- issues:
- types: [opened]
-
-jobs:
- build:
- runs-on: ubuntu-latest
- steps:
- - uses: usthe/issues-translate-action@v2.7
- with:
- # it is not necessary to decide whether you need to modify the issue header content
- IS_MODIFY_TITLE: true
- BOT_GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
- # Required, input your bot github token
\ No newline at end of file
diff --git a/.github/workflows/link-pr.yml b/.github/workflows/link-pr.yml
deleted file mode 100644
index 844dd5f..0000000
--- a/.github/workflows/link-pr.yml
+++ /dev/null
@@ -1,47 +0,0 @@
-# name: Github Rebot for Link check error
-
-# on:
-# pull_request:
-# branches: [ main ]
-# paths:
-# - '**.md'
-# - 'docs/**'
-# - '.lycheeignore'
-# push:
-# branches: [ main ]
-
-# schedule:
-# - cron: '0 11 * * *'
-
-# jobs:
-# linkChecker:
-# runs-on: ubuntu-latest
-# steps:
-# - uses: actions/checkout@v3
-
-# - name: Link Checker
-# id: lychee
-# uses: lycheeverse/lychee-action@v1.7.0
-# with:
-# # For parameter description, see https://github.com/lycheeverse/lychee#commandline-parameters
-# # Actions Link address -> https://github.com/lycheeverse/lychee-action
-# # -E, --exclude-all-private Exclude all private IPs from checking.
-# # -i, --insecure Proceed for server connections considered insecure (invalid TLS)
-# # -n, --no-progress Do not show progress bar.
-# # -t, --timeout Website timeout in seconds from connect to response finished [default:20]
-# # --max-concurrency Maximum number of concurrent network requests [default: 128]
-# # -a --accept Comma-separated list of accepted status codes for valid links
-# # docs/.vitepress/dist the site directory to check
-# # ./*.md all markdown files in the root directory
-# args: --verbose -E -i --no-progress --exclude-path './CHANGELOG' './**/*.md'
-# env:
-# GITHUB_TOKEN: ${{secrets.GH_PAT}}
-
-# - name: Create Issue From File
-# if: env.lychee_exit_code != 0
-# uses: peter-evans/create-issue-from-file@v4
-# with:
-# title: Bug reports for links in OpenIM docs
-# content-filepath: ./lychee/out.md
-# labels: kind/documentation, triage/unresolved, report
-# token: ${{ secrets.BOT_GITHUB_TOKEN }}
diff --git a/.github/workflows/opencommit.yml b/.github/workflows/opencommit.yml
deleted file mode 100644
index d3d5250..0000000
--- a/.github/workflows/opencommit.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-name: 'OpenCommit Action'
-
-on:
- push:
- # this list of branches is often enough,
- # but you may still ignore other public branches
- branches-ignore: [main master dev development release]
-
-jobs:
- opencommit:
- timeout-minutes: 10
- name: OpenCommit
- runs-on: ubuntu-latest
- permissions: write-all
- steps:
- - name: Setup Node.js Environment
- uses: actions/setup-node@v2
- with:
- node-version: '16'
- - uses: actions/checkout@v3
- with:
- fetch-depth: 0
- - uses: di-sukharev/opencommit@github-action-v1.0.4
- with:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
- env:
- # set openAI api key in repo actions secrets,
- # for openAI keys go to: https://platform.openai.com/account/api-keys
- # for repo secret go to: https://github.com/kuebcub/settings/secrets/actions
- OCO_OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
-
- # customization
- OCO_OPENAI_MAX_TOKENS: 500
- OCO_OPENAI_BASE_PATH: ''
- OCO_DESCRIPTION: false
- OCO_EMOJI: false
- OCO_MODEL: gpt-3.5-turbo
- OCO_LANGUAGE: en
\ No newline at end of file
diff --git a/.github/workflows/project-progress.yml b/.github/workflows/project-progress.yml
deleted file mode 100644
index ad721a3..0000000
--- a/.github/workflows/project-progress.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-# GitHub recommends pinning actions to a commit SHA.
-# To get a newer version, you will need to update the SHA.
-# You can also reference a tag or branch, but the action may change without warning.
-
-name: Move assigned card
-on:
- issues:
- types:
- - assigned
- pull_request:
- types:
- - assigned
-
-jobs:
- move-assigned-card:
- runs-on: ubuntu-latest
- steps:
- - uses: alex-page/github-project-automation-plus@v0.8.3
- with:
- project: OpenIM 2023 Sprint 🔥
- column: In Progress
- repo-token: ${{ secrets.BOT_GITHUB_TOKEN }}
\ No newline at end of file
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
deleted file mode 100644
index c4f1907..0000000
--- a/.github/workflows/release.yml
+++ /dev/null
@@ -1,64 +0,0 @@
-name: OpenIM Server Release
-
-on:
- push:
- # run only against tags
- tags:
- - '*'
-
-permissions:
- contents: write
- packages: write
- issues: write
-
-jobs:
- goreleaser:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- with:
- fetch-depth: 0
- - run: git fetch --force --tags
- - uses: actions/setup-go@v4
- with:
- go-version: stable
- # More assembly might be required: Docker logins, GPG, etc. It all depends
- # on your needs.
- - uses: goreleaser/goreleaser-action@v4
- with:
- # either 'goreleaser' (default) or 'goreleaser-pro':
- distribution: goreleaser
- version: latest
- args: release --clean
- env:
- GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
- # Your GoReleaser Pro key, if you are using the 'goreleaser-pro'
- # distribution:
- # GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
-
- goreleaser-check-pkgs:
- runs-on: ubuntu-latest
- env:
- DOCKER_CLI_EXPERIMENTAL: "enabled"
- needs: [ goreleaser ]
- if: github.ref == 'refs/heads/main'
- strategy:
- matrix:
- format: [ deb, rpm, apk ]
- steps:
- - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- with:
- fetch-depth: 0
- - uses: arduino/setup-task@e26d8975574116b0097a1161e0fe16ba75d84c1c # v1
- with:
- version: 3.x
- repo-token: ${{ secrets.GITHUB_TOKEN }}
- - uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2
- - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
- with:
- path: |
- ./_output/dist/*.deb
- ./_output/dist/*.rpm
- ./_output/dist/*.apk
- key: ${{ github.ref }}
- - run: task goreleaser:test:${{ matrix.format }}
\ No newline at end of file
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
deleted file mode 100644
index 2cad62c..0000000
--- a/.github/workflows/stale.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-# 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: '0 8 * * *'
-
-jobs:
- stale:
-
- runs-on: ubuntu-latest
- permissions:
- issues: write
- pull-requests: write
-
- steps:
- - uses: actions/stale@v5
- with:
- repo-token: ${{ secrets.BOT_GITHUB_TOKEN }}
- days-before-stale: 60
- days-before-close: 7
- stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
- stale-pr-message: 'This issue is stale because it has been open 60 days with no activity.'
- close-issue-message: 'This issue was closed because it has been stalled for 7 days with no activity.'
- close-pr-message: 'This PR was closed because it has been stalled for 7 days with no activity. You can reopen it if you want.'
- stale-pr-label: lifecycle/stale
- stale-issue-label: lifecycle/stale
- exempt-issue-labels: 'openim'
- exempt-pr-labels: 'openim'
- exempt-draft-pr: true
diff --git a/.gitignore b/.gitignore
index 6b70f4e..df0c0a2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,37 +1,16 @@
-# Prerequisites
-*.d
-
-# Compiled Object files
-*.slo
-*.lo
*.o
*.obj
-
-# Precompiled Headers
+*.h
*.gch
*.pch
-
-# Compiled Dynamic libraries
*.so
*.dylib
*.dll
-
-# Fortran module files
-*.mod
-*.smod
-
-# Compiled Static libraries
-*.lai
-*.la
*.a
*.lib
-
-# Executables
*.exe
*.out
*.app
/vendor
-/openimsdk.h
-/openimsdk.dll
/build
/.vscode
diff --git a/CMakeLists.txt b/CMakeLists.txt
deleted file mode 100644
index b048433..0000000
--- a/CMakeLists.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-cmake_minimum_required(VERSION 3.20)
-project(openim-sdk-cpp)
-set(CMAKE_CXX_STANDARD 11)
-include_directories(${CMAKE_SOURCE_DIR}/gen)
-link_directories(${CMAKE_SOURCE_DIR}/gen)
-file(GLOB INCLUDES "include/*.h")
-file(GLOB SOURCES "src/*.cpp")
-
-add_library(openimsdk_wrapper STATIC ${SOURCES} ${INCLUDES})
-target_include_directories(openimsdk_wrapper PUBLIC include)
-target_link_libraries(openimsdk_wrapper openimsdk)
-add_subdirectory(examples)
-
diff --git a/README.md b/README.md
index 6726ffe..8a694dd 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,13 @@
# openim-sdk-cpp
-openim-sdk-core
\ No newline at end of file
+Based on the secondary closure of [openim-sdk-core](https://github.com/openimsdk/openim-sdk-core), export the library of the corresponding platform
+
+# scripts
+
+```bash
+gen_win_dll.bat # gen windows .dll
+gen_android_so.bat # gen android .so
+gen_ios_dylib.sh # gen ios .a
+gen_linux_so.sh # gen linux .so
+gen_mac_dylib.sh # gen mac .dylib
+```
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
deleted file mode 100644
index 4f74c00..0000000
--- a/examples/CMakeLists.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-cmake_minimum_required(VERSION 3.20)
-
-file(GLOB EXAMPLE_INCLUDES "*.h")
-file(GLOB EXAMPLE_SOURCES "*.cpp")
-add_executable(example ${EXAMPLE_SOURCES} ${EXAMPLE_INCLUDES})
-target_link_libraries(example openimsdk_wrapper)
-
-
-add_custom_command(TARGET example PRE_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/gen/openimsdk.dll $/)
\ No newline at end of file
diff --git a/examples/main.cpp b/examples/main.cpp
deleted file mode 100644
index cc26b98..0000000
--- a/examples/main.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-#include
-#include "IMSDK.h"
-using namespace OpenIM;
-
-int main()
-{
- InitSDK();
- std::cout << "helloworld" << std::endl;
- return 0;
-}
\ No newline at end of file
diff --git a/gen/export.go b/export.go
similarity index 86%
rename from gen/export.go
rename to export.go
index 70f0f8f..962a23d 100644
--- a/gen/export.go
+++ b/export.go
@@ -66,21 +66,21 @@ func NewConnCallback() *ConnCallback {
func (c ConnCallback) OnConnecting() {
DispatorMsg(Msg_Connecting, Empty{})
}
-
func (c ConnCallback) OnConnectSuccess() {
DispatorMsg(Msg_ConnectSuccess, Empty{})
}
-
func (c ConnCallback) OnConnectFailed(errCode int32, errMsg string) {
DispatorMsg(Msg_ConnectFailed, Error{ErrCode: errCode, ErrMsg: errMsg})
}
-
func (c ConnCallback) OnKickedOffline() {
DispatorMsg(Msg_KickedOffline, Empty{})
}
func (c ConnCallback) OnUserTokenExpired() {
DispatorMsg(Msg_UserTokenExpired, Empty{})
}
+func (c ConnCallback) OnUserTokenInvalid(errMsg string) {
+ DispatorMsg(Msg_UserTokenInvalid, Error{ErrCode: 0, ErrMsg: errMsg})
+}
type ConversationCallback struct {
}
@@ -88,14 +88,29 @@ type ConversationCallback struct {
func NewConversationCallback() *ConversationCallback {
return &ConversationCallback{}
}
-func (c ConversationCallback) OnSyncServerStart() {
- DispatorMsg(Msg_SyncServerStart, Empty{})
-}
-func (c ConversationCallback) OnSyncServerFinish() {
- DispatorMsg(Msg_SyncServerFinish, Empty{})
-}
-func (c ConversationCallback) OnSyncServerFailed() {
- DispatorMsg(Msg_SyncServerFailed, Empty{})
+func (c ConversationCallback) OnSyncServerStart(reinstalled bool) {
+ DispatorMsg(Msg_SyncServerStart, struct {
+ Reinstalled bool `json:"reinstalled"`
+ }{
+ Reinstalled: reinstalled,
+ })
+}
+func (c ConversationCallback) OnSyncServerFinish(reinstalled bool) {
+ DispatorMsg(Msg_SyncServerFinish, struct {
+ Reinstalled bool `json:"reinstalled"`
+ }{
+ Reinstalled: reinstalled,
+ })
+}
+func (c ConversationCallback) OnSyncServerProgress(progress int) {
+ DispatorMsg(Msg_SyncServerProgress, Progress{Progress: progress})
+}
+func (c ConversationCallback) OnSyncServerFailed(reinstalled bool) {
+ DispatorMsg(Msg_SyncServerFailed, struct {
+ Reinstalled bool `json:"reinstalled"`
+ }{
+ Reinstalled: reinstalled,
+ })
}
func (c ConversationCallback) OnNewConversation(conversationList string) {
DispatorMsg(Msg_NewConversation, conversationList)
@@ -253,11 +268,18 @@ type UserCallback struct {
func (u UserCallback) OnSelfInfoUpdated(userInfo string) {
DispatorMsg(Msg_SelfInfoUpdated, userInfo)
}
-
func (u UserCallback) OnUserStatusChanged(statusMap string) {
DispatorMsg(Msg_UserStatusChanged, statusMap)
}
-
+func (u UserCallback) OnUserCommandAdd(userCommand string) {
+ DispatorMsg(Msg_UserCommandAdd, userCommand)
+}
+func (u UserCallback) OnUserCommandDelete(userCommand string) {
+ DispatorMsg(Msg_UserCommandDelete, userCommand)
+}
+func (u UserCallback) OnUserCommandUpdate(userCommand string) {
+ DispatorMsg(Msg_UserCommandUpdate, userCommand)
+}
func NewUserCallback() *UserCallback {
return &UserCallback{}
}
@@ -510,28 +532,16 @@ func get_multiple_conversation(operationID *C.char, conversationIDList *C.char)
open_im_sdk.GetMultipleConversation(baseCallback, C.GoString(operationID), C.GoString(conversationIDList))
}
-//export set_conversation_msg_destruct_time
-func set_conversation_msg_destruct_time(operationID *C.char, conversationID *C.char, msgDestructTime C.longlong) {
- baseCallback := NewBaseCallback(operationID, DataType_Empty)
- open_im_sdk.SetConversationMsgDestructTime(baseCallback, C.GoString(operationID), C.GoString(conversationID), int64(msgDestructTime))
-}
-
-//export set_conversation_is_msg_destruct
-func set_conversation_is_msg_destruct(operationID *C.char, conversationID *C.char, isMsgDestruct C.int) {
- baseCallback := NewBaseCallback(operationID, DataType_Empty)
- open_im_sdk.SetConversationIsMsgDestruct(baseCallback, C.GoString(operationID), C.GoString(conversationID), parseBool(int(isMsgDestruct)))
-}
-
//export hide_conversation
func hide_conversation(operationID *C.char, conversationID *C.char) {
baseCallback := NewBaseCallback(operationID, DataType_Empty)
open_im_sdk.HideConversation(baseCallback, C.GoString(operationID), C.GoString(conversationID))
}
-//export get_conversation_recv_message_opt
-func get_conversation_recv_message_opt(operationID *C.char, conversationIDList *C.char) {
- baseCallback := NewBaseCallback(operationID, DataType_GetConversationRecvMessageOptResp_List)
- open_im_sdk.GetConversationRecvMessageOpt(baseCallback, C.GoString(operationID), C.GoString(conversationIDList))
+//export set_conversation
+func set_conversation(operationID *C.char, conversationID, req *C.char) {
+ baseCallback := NewBaseCallback(operationID, DataType_Empty)
+ open_im_sdk.SetConversation(baseCallback, C.GoString(operationID), C.GoString(conversationID), C.GoString(req))
}
//export set_conversation_draft
@@ -540,37 +550,6 @@ func set_conversation_draft(operationID *C.char, conversationID *C.char, draftTe
open_im_sdk.SetConversationDraft(baseCallback, C.GoString(operationID), C.GoString(conversationID), C.GoString(draftText))
}
-//export reset_conversation_group_at_type
-func reset_conversation_group_at_type(operationID *C.char, conversationID *C.char) {
- baseCallback := NewBaseCallback(operationID, DataType_Empty)
- open_im_sdk.ResetConversationGroupAtType(baseCallback, C.GoString(operationID), C.GoString(conversationID))
-}
-
-//export pin_conversation
-func pin_conversation(operationID *C.char, conversationID *C.char, isPinned C.int) {
- baseCallback := NewBaseCallback(operationID, DataType_Empty)
- open_im_sdk.PinConversation(baseCallback, C.GoString(operationID), C.GoString(conversationID), parseBool(int(isPinned)))
-}
-
-//export set_conversation_private_chat
-func set_conversation_private_chat(operationID *C.char, conversationID *C.char, isPrivate C.int) {
- baseCallback := NewBaseCallback(operationID, DataType_Empty)
- open_im_sdk.SetConversationPrivateChat(baseCallback, C.GoString(operationID), C.GoString(conversationID),
- parseBool(int(isPrivate)))
-}
-
-//export set_conversation_burn_duration
-func set_conversation_burn_duration(operationID *C.char, conversationID *C.char, duration C.int) {
- baseCallback := NewBaseCallback(operationID, DataType_Empty)
- open_im_sdk.SetConversationBurnDuration(baseCallback, C.GoString(operationID), C.GoString(conversationID), int32(duration))
-}
-
-//export set_conversation_recv_message_opt
-func set_conversation_recv_message_opt(operationID *C.char, conversationID *C.char, opt C.int) {
- baseCallback := NewBaseCallback(operationID, DataType_Empty)
- open_im_sdk.SetConversationRecvMessageOpt(baseCallback, C.GoString(operationID), C.GoString(conversationID), int(opt))
-}
-
//export get_total_unread_msg_count
func get_total_unread_msg_count(operationID *C.char) {
baseCallback := NewBaseCallback(operationID, DataType_Int)
@@ -588,17 +567,17 @@ func get_conversation_id_by_session_type(operationID *C.char, sourceID *C.char,
}
//export send_message
-func send_message(operationID, message, recvID, groupID, offlinePushInfo *C.char) {
+func send_message(operationID, message, recvID, groupID, offlinePushInfo *C.char, isOnlineOnly C.int) {
sendMsgCallback := NewSendMessageCallback(operationID)
open_im_sdk.SendMessage(sendMsgCallback, C.GoString(operationID), C.GoString(message), C.GoString(recvID),
- C.GoString(groupID), C.GoString(offlinePushInfo))
+ C.GoString(groupID), C.GoString(offlinePushInfo), parseBool(int(isOnlineOnly)))
}
//export send_message_not_oss
-func send_message_not_oss(operationID, message, recvID, groupID, offlinePushInfo *C.char) {
+func send_message_not_oss(operationID, message, recvID, groupID, offlinePushInfo *C.char, isOnlineOnly C.int) {
sendMsgCallback := NewSendMessageCallback(operationID)
open_im_sdk.SendMessageNotOss(sendMsgCallback, C.GoString(operationID), C.GoString(message), C.GoString(recvID),
- C.GoString(groupID), C.GoString(offlinePushInfo))
+ C.GoString(groupID), C.GoString(offlinePushInfo), parseBool(int(isOnlineOnly)))
}
//export find_message_list
@@ -711,42 +690,18 @@ func get_users_info(operationID *C.char, userIDs *C.char) {
open_im_sdk.GetUsersInfo(baseCallback, C.GoString(operationID), C.GoString(userIDs))
}
-//export get_users_info_with_cache
-func get_users_info_with_cache(operationID *C.char, userIDs *C.char, groupID *C.char) {
- baseCallback := NewBaseCallback(operationID, DataType_FullUserInfoWithCache_List)
- open_im_sdk.GetUsersInfoWithCache(baseCallback, C.GoString(operationID), C.GoString(userIDs), C.GoString(groupID))
-}
-
-//export get_users_info_from_srv
-func get_users_info_from_srv(operationID *C.char, userIDs *C.char) {
- baseCallback := NewBaseCallback(operationID, DataType_LocalUser_List)
- open_im_sdk.GetUsersInfoFromSrv(baseCallback, C.GoString(operationID), C.GoString(userIDs))
-}
-
//export set_self_info
func set_self_info(operationID *C.char, userInfo *C.char) {
baseCallback := NewBaseCallback(operationID, DataType_Empty)
open_im_sdk.SetSelfInfo(baseCallback, C.GoString(operationID), C.GoString(userInfo))
}
-//export set_global_recv_message_opt
-func set_global_recv_message_opt(operationID *C.char, opt C.int) {
- baseCallback := NewBaseCallback(operationID, DataType_Empty)
- open_im_sdk.SetGlobalRecvMessageOpt(baseCallback, C.GoString(operationID), int(opt))
-}
-
//export get_self_user_info
func get_self_user_info(operationID *C.char) {
baseCallback := NewBaseCallback(operationID, DataType_LocalUser)
open_im_sdk.GetSelfUserInfo(baseCallback, C.GoString(operationID))
}
-//export update_msg_sender_info
-func update_msg_sender_info(operationID *C.char, nickname *C.char, faceURL *C.char) {
- baseCallback := NewBaseCallback(operationID, DataType_Empty)
- open_im_sdk.UpdateMsgSenderInfo(baseCallback, C.GoString(operationID), C.GoString(nickname), C.GoString(faceURL))
-}
-
//export subscribe_users_status
func subscribe_users_status(operationID *C.char, userIDs *C.char) {
baseCallback := NewBaseCallback(operationID, DataType_OnlineStatus_List)
@@ -774,21 +729,21 @@ func get_user_status(operationID *C.char, userIDs *C.char) {
// =====================================================friend===============================================
//
//export get_specified_friends_info
-func get_specified_friends_info(operationID *C.char, userIDList *C.char) {
+func get_specified_friends_info(operationID *C.char, userIDList *C.char, filterBlack C.int) {
baseCallback := NewBaseCallback(operationID, DataType_FullUserInfo_List)
- open_im_sdk.GetSpecifiedFriendsInfo(baseCallback, C.GoString(operationID), C.GoString(userIDList))
+ open_im_sdk.GetSpecifiedFriendsInfo(baseCallback, C.GoString(operationID), C.GoString(userIDList), parseBool(int(filterBlack)))
}
//export get_friend_list
-func get_friend_list(operationID *C.char) {
+func get_friend_list(operationID *C.char, filterBlack C.int) {
baseCallback := NewBaseCallback(operationID, DataType_FullUserInfo_List)
- open_im_sdk.GetFriendList(baseCallback, C.GoString(operationID))
+ open_im_sdk.GetFriendList(baseCallback, C.GoString(operationID), parseBool(int(filterBlack)))
}
//export get_friend_list_page
-func get_friend_list_page(operationID *C.char, offset C.int, count C.int) {
+func get_friend_list_page(operationID *C.char, offset C.int, count C.int, filterBlack C.int) {
baseCallback := NewBaseCallback(operationID, DataType_FullUserInfo_List)
- open_im_sdk.GetFriendListPage(baseCallback, C.GoString(operationID), int32(offset), int32(count))
+ open_im_sdk.GetFriendListPage(baseCallback, C.GoString(operationID), int32(offset), int32(count), parseBool(int(filterBlack)))
}
//export search_friends
@@ -797,6 +752,12 @@ func search_friends(operationID *C.char, searchParam *C.char) {
open_im_sdk.SearchFriends(baseCallback, C.GoString(operationID), C.GoString(searchParam))
}
+//export update_friends
+func update_friends(operationID *C.char, req *C.char) {
+ baseCallback := NewBaseCallback(operationID, DataType_Empty)
+ open_im_sdk.UpdateFriends(baseCallback, C.GoString(operationID), C.GoString(req))
+}
+
//export check_friend
func check_friend(operationID *C.char, userIDList *C.char) {
baseCallback := NewBaseCallback(operationID, DataType_UserIDResult_List)
@@ -809,12 +770,6 @@ func add_friend(operationID *C.char, userIDReqMsg *C.char) {
open_im_sdk.AddFriend(baseCallback, C.GoString(operationID), C.GoString(userIDReqMsg))
}
-//export set_friend_remark
-func set_friend_remark(operationID *C.char, userIDRemark *C.char) {
- baseCallback := NewBaseCallback(operationID, DataType_Empty)
- open_im_sdk.SetFriendRemark(baseCallback, C.GoString(operationID), C.GoString(userIDRemark))
-}
-
//export delete_friend
func delete_friend(operationID *C.char, friendUserID *C.char) {
baseCallback := NewBaseCallback(operationID, DataType_Empty)
@@ -914,15 +869,6 @@ func change_group_member_mute(operationID, groupId, userId *C.char, mutedSeconds
int(mutedSeconds))
}
-// SetGroupMemberRoleLevel sets the role level of a group member
-//
-//export set_group_member_role_level
-func set_group_member_role_level(operationID, groupId, userId *C.char, roleLevel C.int) {
- baseCallback := NewBaseCallback(operationID, DataType_Empty)
- open_im_sdk.SetGroupMemberRoleLevel(baseCallback, C.GoString(operationID), C.GoString(groupId),
- C.GoString(userId), int(roleLevel))
-}
-
// SetGroupMemberInfo sets the information of a group member
//
//export set_group_member_info
@@ -963,30 +909,6 @@ func set_group_info(operationID, groupInfo *C.char) {
open_im_sdk.SetGroupInfo(baseCallback, C.GoString(operationID), C.GoString(groupInfo))
}
-// SetGroupVerification sets the verification mode of a group
-//
-//export set_group_verification
-func set_group_verification(operationID, groupId *C.char, verification C.int) {
- baseCallback := NewBaseCallback(operationID, DataType_Empty)
- open_im_sdk.SetGroupVerification(baseCallback, C.GoString(operationID), C.GoString(groupId), int32(verification))
-}
-
-// SetGroupLookMemberInfo sets the member information visibility of a group
-//
-//export set_group_look_member_info
-func set_group_look_member_info(operationID, groupId *C.char, cRule C.int) {
- baseCallback := NewBaseCallback(operationID, DataType_Empty)
- open_im_sdk.SetGroupLookMemberInfo(baseCallback, C.GoString(operationID), C.GoString(groupId), int32(cRule))
-}
-
-// SetGroupApplyMemberFriend sets the friend rule for group applicants
-//
-//export set_group_apply_member_friend
-func set_group_apply_member_friend(operationID, groupId *C.char, cRule C.int) {
- baseCallback := NewBaseCallback(operationID, DataType_Empty)
- open_im_sdk.SetGroupApplyMemberFriend(baseCallback, C.GoString(operationID), C.GoString(groupId), int32(cRule))
-}
-
// GetGroupMemberList retrieves the list of group members
//
//export get_group_member_list
@@ -1084,15 +1006,6 @@ func refuse_group_application(operationID, groupId, fromUserId, handleMsg *C.cha
C.GoString(fromUserId), C.GoString(handleMsg))
}
-// SetGroupMemberNickname sets the nickname of a group member
-//
-//export set_group_member_nickname
-func set_group_member_nickname(operationID, groupId, userId, groupMemberNickname *C.char) {
- baseCallback := NewBaseCallback(operationID, DataType_Empty)
- open_im_sdk.SetGroupMemberNickname(baseCallback, C.GoString(operationID), C.GoString(groupId),
- C.GoString(userId), C.GoString(groupMemberNickname))
-}
-
// SearchGroupMembers searches for group members
//
//export search_group_members
diff --git a/gen/gen_win_dll.bat b/gen/gen_win_dll.bat
deleted file mode 100644
index ab04da2..0000000
--- a/gen/gen_win_dll.bat
+++ /dev/null
@@ -1,6 +0,0 @@
-set CGO_ENABLED=1
-go build -buildmode=c-shared -trimpath -ldflags="-s -w" -o openimsdk.dll export.go protocol.go message.go
-
-
-
-@REM g++ -shared -fPIC -o openimsdkcc.dll openimsdkcc.cc openimsdk.dll
\ No newline at end of file
diff --git a/gen/go.mod b/gen/go.mod
deleted file mode 100644
index 6bde0f1..0000000
--- a/gen/go.mod
+++ /dev/null
@@ -1,36 +0,0 @@
-module github.com/openimsdk/openim-sdk-cpp
-
-go 1.18
-
-require github.com/openimsdk/openim-sdk-core/v3 v3.5.1-alpha.8
-
-require (
- github.com/OpenIMSDK/protocol v0.0.40 // indirect
- github.com/OpenIMSDK/tools v0.0.24 // indirect
- github.com/bwmarrin/snowflake v0.3.0 // indirect
- github.com/golang/protobuf v1.5.3 // indirect
- github.com/google/go-cmp v0.5.9 // indirect
- github.com/gorilla/websocket v1.4.2 // indirect
- github.com/jinzhu/copier v0.3.5 // indirect
- github.com/jinzhu/inflection v1.0.0 // indirect
- github.com/jinzhu/now v1.1.5 // indirect
- github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible // indirect
- github.com/lestrrat-go/strftime v1.0.6 // indirect
- github.com/mattn/go-sqlite3 v1.14.12 // indirect
- github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect
- github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
- github.com/pkg/errors v0.9.1 // indirect
- go.uber.org/atomic v1.7.0 // indirect
- go.uber.org/multierr v1.6.0 // indirect; indirecv3.5.1-alpha.8t
- go.uber.org/zap v1.24.0 // indirect
- golang.org/x/image v0.14.0 // indirect
- golang.org/x/net v0.19.0 // indirect
- golang.org/x/sys v0.15.0 // indirect
- golang.org/x/text v0.14.0 // indirect
- google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753 // indirect
- google.golang.org/grpc v1.56.2 // indirect
- google.golang.org/protobuf v1.31.0 // indirect
- gorm.io/driver/sqlite v1.3.6 // indirect
- gorm.io/gorm v1.23.8 // indirect
- nhooyr.io/websocket v1.8.10 // indirect
-)
diff --git a/gen/go.sum b/gen/go.sum
deleted file mode 100644
index 367d1f2..0000000
--- a/gen/go.sum
+++ /dev/null
@@ -1,79 +0,0 @@
-github.com/OpenIMSDK/protocol v0.0.40 h1:1/Oij6RSAaePCPrWGwp9Cyz976/8Uxr94hM5M5FXzlg=
-github.com/OpenIMSDK/protocol v0.0.40/go.mod h1:F25dFrwrIx3lkNoiuf6FkCfxuwf8L4Z8UIsdTHP/r0Y=
-github.com/OpenIMSDK/tools v0.0.24 h1:P8n7ZtsZEbm4W3dQAem29O+bigzy6YPXxFzd/D8Vh3U=
-github.com/OpenIMSDK/tools v0.0.24/go.mod h1:eg+q4A34Qmu73xkY0mt37FHGMCMfC6CtmOnm0kFEGFI=
-github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
-github.com/bwmarrin/snowflake v0.3.0 h1:xm67bEhkKh6ij1790JB83OujPR5CzNe8QuQqAgISZN0=
-github.com/bwmarrin/snowflake v0.3.0/go.mod h1:NdZxfVWX+oR6y2K0o6qAYv6gIOP9rjG0/E9WsDpxqwE=
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
-github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
-github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
-github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
-github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
-github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
-github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
-github.com/jinzhu/copier v0.3.5 h1:GlvfUwHk62RokgqVNvYsku0TATCF7bAHVwEXoBh3iJg=
-github.com/jinzhu/copier v0.3.5/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg=
-github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
-github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
-github.com/jinzhu/now v1.1.4/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
-github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
-github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
-github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4=
-github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc h1:RKf14vYWi2ttpEmkA4aQ3j4u9dStX2t4M8UM6qqNsG8=
-github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc/go.mod h1:kopuH9ugFRkIXf3YoqHKyrJ9YfUFsckUU9S7B+XP+is=
-github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible h1:Y6sqxHMyB1D2YSzWkLibYKgg+SwmyFU9dF2hn6MdTj4=
-github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible/go.mod h1:ZQnN8lSECaebrkQytbHj4xNgtg8CR7RYXnPok8e0EHA=
-github.com/lestrrat-go/strftime v1.0.6 h1:CFGsDEt1pOpFNU+TJB0nhz9jl+K0hZSLE205AhTIGQQ=
-github.com/lestrrat-go/strftime v1.0.6/go.mod h1:f7jQKgV5nnJpYgdEasS+/y7EsTb8ykN2z68n3TtcTaw=
-github.com/mattn/go-sqlite3 v1.14.12 h1:TJ1bhYJPV44phC+IMu1u2K/i5RriLTPe+yc68XDJ1Z0=
-github.com/mattn/go-sqlite3 v1.14.12/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
-github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ=
-github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8=
-github.com/openimsdk/openim-sdk-core/v3 v3.5.1-alpha.8 h1:kPjlkSHX7PsBz0Af+Jk1PB4sraup7mbmmwyA3f8uEBI=
-github.com/openimsdk/openim-sdk-core/v3 v3.5.1-alpha.8/go.mod h1:d2aVHT6pSYthQQd+/4JaruHPTLsQV2D+eQisRQkoP3I=
-github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc=
-github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
-github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
-github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY=
-go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=
-go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
-go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI=
-go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
-go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
-go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60=
-go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg=
-golang.org/x/image v0.14.0 h1:tNgSxAFe3jC4uYqvZdTr84SZoM1KfwdC9SKIFrLjFn4=
-golang.org/x/image v0.14.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE=
-golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c=
-golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U=
-golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
-golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
-golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
-golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
-golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753 h1:XUODHrpzJEUeWmVo/jfNTLj0YyVveOo28oE6vkFbkO4=
-google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM=
-google.golang.org/grpc v1.56.2 h1:fVRFRnXvU+x6C4IlHZewvJOVHoOv1TUuQyoRsYnB4bI=
-google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s=
-google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
-google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
-google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
-google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
-gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
-gorm.io/driver/sqlite v1.3.6 h1:Fi8xNYCUplOqWiPa3/GuCeowRNBRGTf62DEmhMDHeQQ=
-gorm.io/driver/sqlite v1.3.6/go.mod h1:Sg1/pvnKtbQ7jLXxfZa+jSHvoX8hoZA8cn4xllOMTgE=
-gorm.io/gorm v1.23.4/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk=
-gorm.io/gorm v1.23.8 h1:h8sGJ+biDgBA1AD1Ha9gFCx7h8npU7AsLdlkX0n2TpE=
-gorm.io/gorm v1.23.8/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk=
-nhooyr.io/websocket v1.8.10 h1:mv4p+MnGrLDcPlBoWsvPP7XCzTYMXP9F9eIGoKbgx7Q=
-nhooyr.io/websocket v1.8.10/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c=
diff --git a/gen/gen_android_so.bat b/gen_android_so.bat
similarity index 95%
rename from gen/gen_android_so.bat
rename to gen_android_so.bat
index e4825e5..de2455b 100644
--- a/gen/gen_android_so.bat
+++ b/gen_android_so.bat
@@ -1,4 +1,6 @@
set NDK_PATH=D:\Android\SDK\ndk\21.3.6528147
+@REM First set the NDK_PATH environment variable
+
set SO_NAME=libopenimsdk
set OUT_PATH=android\
diff --git a/gen/gen_ios_dylib.sh b/gen_ios_dylib.sh
similarity index 100%
rename from gen/gen_ios_dylib.sh
rename to gen_ios_dylib.sh
diff --git a/gen/gen_linux_so.sh b/gen_linux_so.sh
similarity index 100%
rename from gen/gen_linux_so.sh
rename to gen_linux_so.sh
diff --git a/gen/gen_mac_dylib.sh b/gen_mac_dylib.sh
similarity index 100%
rename from gen/gen_mac_dylib.sh
rename to gen_mac_dylib.sh
diff --git a/gen_win_dll.bat b/gen_win_dll.bat
new file mode 100644
index 0000000..d5f1071
--- /dev/null
+++ b/gen_win_dll.bat
@@ -0,0 +1,2 @@
+set CGO_ENABLED=1
+go build -buildmode=c-shared -trimpath -ldflags="-s -w" -o openimsdk.dll export.go protocol.go message.go
\ No newline at end of file
diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000..ec1687e
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,37 @@
+module github.com/openimsdk/openim-sdk-cpp
+
+go 1.21
+
+require github.com/openimsdk/openim-sdk-core/v3 v3.8.1
+
+require (
+ github.com/openimsdk/protocol v0.0.72-alpha.24 // indirect
+ github.com/openimsdk/tools v0.0.50-alpha.14 // indirect
+ golang.org/x/sync v0.6.0 // indirect
+)
+
+require (
+ github.com/golang/protobuf v1.5.4 // indirect
+ github.com/google/go-cmp v0.6.0 // indirect
+ github.com/gorilla/websocket v1.4.2 // indirect
+ github.com/jinzhu/copier v0.4.0 // indirect
+ github.com/jinzhu/inflection v1.0.0 // indirect
+ github.com/jinzhu/now v1.1.5 // indirect
+ github.com/lestrrat-go/strftime v1.0.6 // indirect
+ github.com/mattn/go-sqlite3 v1.14.22 // indirect
+ github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
+ github.com/pkg/errors v0.9.1 // indirect
+ go.uber.org/atomic v1.7.0 // indirect
+ go.uber.org/multierr v1.6.0 // indirect; indirecv3.5.1-alpha.8t
+ go.uber.org/zap v1.24.0 // indirect
+ golang.org/x/image v0.15.0 // indirect
+ golang.org/x/net v0.22.0 // indirect
+ golang.org/x/sys v0.18.0 // indirect
+ golang.org/x/text v0.14.0 // indirect
+ google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect
+ google.golang.org/grpc v1.62.1 // indirect
+ google.golang.org/protobuf v1.33.0 // indirect
+ gorm.io/driver/sqlite v1.5.5 // indirect
+ gorm.io/gorm v1.25.10 // indirect
+ nhooyr.io/websocket v1.8.10 // indirect
+)
diff --git a/go.sum b/go.sum
new file mode 100644
index 0000000..ce3bf67
--- /dev/null
+++ b/go.sum
@@ -0,0 +1,75 @@
+github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
+github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
+github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
+github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
+github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
+github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
+github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
+github.com/jinzhu/copier v0.4.0 h1:w3ciUoD19shMCRargcpm0cm91ytaBhDvuRpz1ODO/U8=
+github.com/jinzhu/copier v0.4.0/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg=
+github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
+github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
+github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
+github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
+github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4=
+github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc=
+github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc h1:RKf14vYWi2ttpEmkA4aQ3j4u9dStX2t4M8UM6qqNsG8=
+github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc/go.mod h1:kopuH9ugFRkIXf3YoqHKyrJ9YfUFsckUU9S7B+XP+is=
+github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible h1:Y6sqxHMyB1D2YSzWkLibYKgg+SwmyFU9dF2hn6MdTj4=
+github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible/go.mod h1:ZQnN8lSECaebrkQytbHj4xNgtg8CR7RYXnPok8e0EHA=
+github.com/lestrrat-go/strftime v1.0.6 h1:CFGsDEt1pOpFNU+TJB0nhz9jl+K0hZSLE205AhTIGQQ=
+github.com/lestrrat-go/strftime v1.0.6/go.mod h1:f7jQKgV5nnJpYgdEasS+/y7EsTb8ykN2z68n3TtcTaw=
+github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU=
+github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
+github.com/openimsdk/openim-sdk-core/v3 v3.8.1 h1:oI+pGKC0WhFI32aeGlsYILyE9VY2XSpvrCfMtKq6UjI=
+github.com/openimsdk/openim-sdk-core/v3 v3.8.1/go.mod h1:RH16NC8BTyGM53Sjxe8lpzkTemWvehfgeLvOKY4IUps=
+github.com/openimsdk/protocol v0.0.72-alpha.24 h1:1Dl8TEZVXhdmve+ewoLkJa2wbFBIHqPgjvr9u/J66JM=
+github.com/openimsdk/protocol v0.0.72-alpha.24/go.mod h1:OZQA9FR55lseYoN2Ql1XAHYKHJGu7OMNkUbuekrKCM8=
+github.com/openimsdk/tools v0.0.50-alpha.14 h1:7mqOwJWHcG181KvkmU+oJn9ZpYNoUykt9WtuOQg4sDU=
+github.com/openimsdk/tools v0.0.50-alpha.14/go.mod h1:h1cYmfyaVtgFbKmb1Cfsl8XwUOMTt8ubVUQrdGtsUh4=
+github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc=
+github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
+github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
+github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
+github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
+github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
+go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=
+go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
+go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI=
+go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
+go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
+go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
+go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60=
+go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg=
+golang.org/x/image v0.15.0 h1:kOELfmgrmJlw4Cdb7g/QGuB3CvDrXbqEIww/pNtNBm8=
+golang.org/x/image v0.15.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE=
+golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc=
+golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
+golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
+golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
+golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
+golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
+golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:NnYq6UN9ReLM9/Y01KWNOWyI5xQ9kbIms5GGJVwS/Yc=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY=
+google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk=
+google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE=
+google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
+google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
+gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
+gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gorm.io/driver/sqlite v1.5.5 h1:7MDMtUZhV065SilG62E0MquljeArQZNfJnjd9i9gx3E=
+gorm.io/driver/sqlite v1.5.5/go.mod h1:6NgQ7sQWAIFsPrJJl1lSNSu2TABh0ZZ/zm5fosATavE=
+gorm.io/gorm v1.25.10 h1:dQpO+33KalOA+aFYGlK+EfxcI5MbO7EP2yYygwh9h+s=
+gorm.io/gorm v1.25.10/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
+nhooyr.io/websocket v1.8.10 h1:mv4p+MnGrLDcPlBoWsvPP7XCzTYMXP9F9eIGoKbgx7Q=
+nhooyr.io/websocket v1.8.10/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c=
diff --git a/include/imsdk.h b/include/imsdk.h
deleted file mode 100644
index a8dce6e..0000000
--- a/include/imsdk.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#include "openimsdk.h"
-
-namespace OpenIM
-{
- enum PlatformID
- {
-
- };
-
- void InitSDK();
-}
\ No newline at end of file
diff --git a/gen/message.go b/message.go
similarity index 96%
rename from gen/message.go
rename to message.go
index a05007b..b72fe7d 100644
--- a/gen/message.go
+++ b/message.go
@@ -8,9 +8,11 @@ const (
Msg_ConnectFailed
Msg_KickedOffline
Msg_UserTokenExpired
+ Msg_UserTokenInvalid
Msg_SyncServerStart
Msg_SyncServerFinish
+ Msg_SyncServerProgress
Msg_SyncServerFailed
Msg_NewConversation
Msg_ConversationChanged
@@ -57,6 +59,9 @@ const (
Msg_SelfInfoUpdated
Msg_UserStatusChanged
+ Msg_UserCommandAdd
+ Msg_UserCommandDelete
+ Msg_UserCommandUpdate
Msg_SendMessage_Error
Msg_SendMessage_Success
@@ -105,6 +110,7 @@ const (
type Empty struct {
}
+
type Error struct {
OperationID string `json:"operationId"`
ErrCode int32 `json:"errCode"`
diff --git a/gen/protocol.go b/protocol.go
similarity index 100%
rename from gen/protocol.go
rename to protocol.go
diff --git a/scripts/githooks/commit-msg b/scripts/githooks/commit-msg
deleted file mode 100644
index efff13f..0000000
--- a/scripts/githooks/commit-msg
+++ /dev/null
@@ -1,92 +0,0 @@
-#!/usr/bin/env bash
-# Copyright © 2023 OpenIMSDK.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ==============================================================================
-#
-# Store this file as .git/hooks/commit-msg in your repository in order to
-# enforce checking for proper commit message format before actual commits.
-# You may need to make the scripts executable by 'chmod +x .git/hooks/commit-msg'.
-
-# commit-msg use go-gitlint tool, install go-gitlint via `go get github.com/llorllale/go-gitlint/cmd/go-gitlint`
-# go-gitlint --msg-file="$1"
-
-# An example hook scripts to check the commit log message.
-# Called by "git commit" with one argument, the name of the file
-# that has the commit message. The hook should exit with non-zero
-# status after issuing an appropriate message if it wants to stop the
-# commit. The hook is allowed to edit the commit message file.
-
-YELLOW="\e[93m"
-GREEN="\e[32m"
-RED="\e[31m"
-ENDCOLOR="\e[0m"
-
-printMessage() {
- printf "${YELLOW}OpenIM : $1${ENDCOLOR}\n"
-}
-
-printSuccess() {
- printf "${GREEN}OpenIM : $1${ENDCOLOR}\n"
-}
-
-printError() {
- printf "${RED}OpenIM : $1${ENDCOLOR}\n"
-}
-
-printMessage "Running the OpenIM commit-msg hook."
-
-# This example catches duplicate Signed-off-by lines.
-
-test "" = "$(grep '^Signed-off-by: ' "$1" |
- sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {
- echo >&2 Duplicate Signed-off-by lines.
- exit 1
-}
-
-# TODO: go-gitlint dir set
-OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/../..
-GITLINT_DIR="$OPENIM_ROOT/_output/tools/go-gitlint"
-
-$GITLINT_DIR \
- --msg-file=$1 \
- --subject-regex="^(build|chore|ci|docs|feat|feature|fix|perf|refactor|revert|style|bot|test)(.*)?:\s?.*" \
- --subject-maxlen=150 \
- --subject-minlen=10 \
- --body-regex=".*" \
- --max-parents=1
-
-if [ $? -ne 0 ]
-then
- if ! command -v $GITLINT_DIR &>/dev/null; then
- printError "$GITLINT_DIR not found. Please run 'make tools' OR 'make tools.verify.go-gitlint' make verto install it."
- fi
- printError "Please fix your commit message to match kubecub coding standards"
- printError "https://gist.github.com/cubxxw/126b72104ac0b0ca484c9db09c3e5694#file-githook-md"
- exit 1
-fi
-
-### Add Sign-off-by line to the end of the commit message
-# Get local git config
-NAME=$(git config user.name)
-EMAIL=$(git config user.email)
-
-# Check if the commit message contains a sign-off line
-grep -qs "^Signed-off-by: " "$1"
-SIGNED_OFF_BY_EXISTS=$?
-
-# Add "Signed-off-by" line if it doesn't exist
-if [ $SIGNED_OFF_BY_EXISTS -ne 0 ]; then
- echo -e "\nSigned-off-by: $NAME <$EMAIL>" >> "$1"
-fi
\ No newline at end of file
diff --git a/scripts/githooks/commit-msg.sh b/scripts/githooks/commit-msg.sh
deleted file mode 100644
index d2d9664..0000000
--- a/scripts/githooks/commit-msg.sh
+++ /dev/null
@@ -1,92 +0,0 @@
-#!/usr/bin/env bash
-# Copyright © 2023 OpenIMSDK.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ==============================================================================
-#
-# Store this file as .git/hooks/commit-msg in your repository in order to
-# enforce checking for proper commit message format before actual commits.
-# You may need to make the scripts executable by 'chmod +x .git/hooks/commit-msg'.
-
-# commit-msg use go-gitlint tool, install go-gitlint via `go get github.com/llorllale/go-gitlint/cmd/go-gitlint`
-# go-gitlint --msg-file="$1"
-
-# An example hook scripts to check the commit log message.
-# Called by "git commit" with one argument, the name of the file
-# that has the commit message. The hook should exit with non-zero
-# status after issuing an appropriate message if it wants to stop the
-# commit. The hook is allowed to edit the commit message file.
-
-YELLOW="\e[93m"
-GREEN="\e[32m"
-RED="\e[31m"
-ENDCOLOR="\e[0m"
-
-printMessage() {
- printf "${YELLOW}OpenIM : $1${ENDCOLOR}\n"
-}
-
-printSuccess() {
- printf "${GREEN}OpenIM : $1${ENDCOLOR}\n"
-}
-
-printError() {
- printf "${RED}OpenIM : $1${ENDCOLOR}\n"
-}
-
-printMessage "Running the OpenIM commit-msg hook."
-
-# This example catches duplicate Signed-off-by lines.
-
-test "" = "$(grep '^Signed-off-by: ' "$1" |
-sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {
-echo >&2 Duplicate Signed-off-by lines.
-exit 1
-}
-
-# TODO: go-gitlint dir set
-OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/../..
-GITLINT_DIR="$OPENIM_ROOT/_output/tools/go-gitlint"
-
-$GITLINT_DIR \
---msg-file=$1 \
---subject-regex="^(build|chore|ci|docs|feat|feature|fix|perf|refactor|revert|style|bot|test)(.*)?:\s?.*" \
---subject-maxlen=150 \
---subject-minlen=10 \
---body-regex=".*" \
---max-parents=1
-
-if [ $? -ne 0 ]
-then
-if ! command -v $GITLINT_DIR &>/dev/null; then
- printError "$GITLINT_DIR not found. Please run 'make tools' OR 'make tools.verify.go-gitlint' make verto install it."
-fi
-printError "Please fix your commit message to match kubecub coding standards"
-printError "https://gist.github.com/cubxxw/126b72104ac0b0ca484c9db09c3e5694#file-githook-md"
-exit 1
-fi
-
-### Add Sign-off-by line to the end of the commit message
-# Get local git config
-NAME=$(git config user.name)
-EMAIL=$(git config user.email)
-
-# Check if the commit message contains a sign-off line
-grep -qs "^Signed-off-by: " "$1"
-SIGNED_OFF_BY_EXISTS=$?
-
-# Add "Signed-off-by" line if it doesn't exist
-if [ $SIGNED_OFF_BY_EXISTS -ne 0 ]; then
-echo -e "\nSigned-off-by: $NAME <$EMAIL>" >> "$1"
-fi
\ No newline at end of file
diff --git a/scripts/githooks/pre-commit b/scripts/githooks/pre-commit
deleted file mode 100644
index 7fd2159..0000000
--- a/scripts/githooks/pre-commit
+++ /dev/null
@@ -1,111 +0,0 @@
-#!/usr/bin/env bash
-# Copyright © 2023 OpenIMSDK.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ==============================================================================
-# This is a pre-commit hook that ensures attempts to commit files that are
-# are larger than $limit to your _local_ repo fail, with a helpful error message.
-
-# You can override the default limit of 2MB by supplying the environment variable:
-# GIT_FILE_SIZE_LIMIT=50000000 git commit -m "test: this commit is allowed file sizes up to 50MB"
-#
-# ==============================================================================
-#
-
-LC_ALL=C
-
-local_branch="$(git rev-parse --abbrev-ref HEAD)"
-valid_branch_regex="^(main|master|develop|release(-[a-zA-Z0-9._-]+)?)$|(feature|feat|openim|hotfix|test|bug|bot|refactor|revert|ci|cicd|style|)\/[a-z0-9._-]+$|^HEAD$"
-
-YELLOW="\e[93m"
-GREEN="\e[32m"
-RED="\e[31m"
-ENDCOLOR="\e[0m"
-
-printMessage() {
- printf "${YELLOW}openim : $1${ENDCOLOR}\n"
-}
-
-printSuccess() {
- printf "${GREEN}openim : $1${ENDCOLOR}\n"
-}
-
-printError() {
- printf "${RED}openim : $1${ENDCOLOR}\n"
-}
-
-printMessage "Running local openim pre-commit hook."
-
-# flutter format .
-# https://gist.github.com/cubxxw/126b72104ac0b0ca484c9db09c3e5694#file-githook-md
-# TODO! GIT_FILE_SIZE_LIMIT=50000000 git commit -m "test: this commit is allowed file sizes up to 50MB"
-# Maximum file size limit in bytes
-limit=${GIT_FILE_SIZE_LIMIT:-2000000} # Default 2MB
-limitInMB=$(( $limit / 1000000 ))
-
-function file_too_large(){
- filename=$0
- filesize=$(( $1 / 2**20 ))
-
- cat < /dev/null 2>&1
-then
- against=HEAD
-else
- against="$empty_tree"
-fi
-
-# Set split so that for loop below can handle spaces in file names by splitting on line breaks
-IFS='
-'
-
-shouldFail=false
-for file in $( git diff-index --cached --name-only $against ); do
- file_size=$(([ ! -f $file ] && echo 0) || (ls -la $file | awk '{ print $5 }'))
- if [ "$file_size" -gt "$limit" ]; then
- printError "File $file is $(( $file_size / 10**6 )) MB, which is larger than our configured limit of $limitInMB MB"
- shouldFail=true
- fi
-done
-
-if $shouldFail
-then
- printMessage "If you really need to commit this file, you can override the size limit by setting the GIT_FILE_SIZE_LIMIT environment variable, e.g. GIT_FILE_SIZE_LIMIT=42000000 for 42MB. Or, commit with the --no-verify switch to skip the check entirely."
- printError "Commit aborted"
- exit 1;
-fi
-
-if [[ ! $local_branch =~ $valid_branch_regex ]]
-then
- printError "There is something wrong with your branch name. Branch names in this project must adhere to this contract: $valid_branch_regex.
-Your commit will be rejected. You should rename your branch to a valid name(feat/name OR bug/name) and try again."
- printError "For more on this, read on: https://gist.github.com/cubxxw/126b72104ac0b0ca484c9db09c3e5694"
- exit 1
-fi
\ No newline at end of file
diff --git a/scripts/githooks/pre-commit.sh b/scripts/githooks/pre-commit.sh
deleted file mode 100644
index d8396b5..0000000
--- a/scripts/githooks/pre-commit.sh
+++ /dev/null
@@ -1,111 +0,0 @@
-#!/usr/bin/env bash
-# Copyright © 2023 OpenIMSDK.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ==============================================================================
-# This is a pre-commit hook that ensures attempts to commit files that are
-# are larger than $limit to your _local_ repo fail, with a helpful error message.
-
-# You can override the default limit of 2MB by supplying the environment variable:
-# GIT_FILE_SIZE_LIMIT=50000000 git commit -m "test: this commit is allowed file sizes up to 50MB"
-#
-# ==============================================================================
-#
-
-LC_ALL=C
-
-local_branch="$(git rev-parse --abbrev-ref HEAD)"
-valid_branch_regex="^(main|master|develop|release(-[a-zA-Z0-9._-]+)?)$|(feature|feat|openim|hotfix|test|bug|bot|refactor|revert|ci|cicd|style|)\/[a-z0-9._-]+$|^HEAD$"
-
-YELLOW="\e[93m"
-GREEN="\e[32m"
-RED="\e[31m"
-ENDCOLOR="\e[0m"
-
-printMessage() {
- printf "${YELLOW}openim : $1${ENDCOLOR}\n"
-}
-
-printSuccess() {
- printf "${GREEN}openim : $1${ENDCOLOR}\n"
-}
-
-printError() {
- printf "${RED}openim : $1${ENDCOLOR}\n"
-}
-
-printMessage "Running local openim pre-commit hook."
-
-# flutter format .
-# https://gist.github.com/cubxxw/126b72104ac0b0ca484c9db09c3e5694#file-githook-md
-# TODO! GIT_FILE_SIZE_LIMIT=50000000 git commit -m "test: this commit is allowed file sizes up to 50MB"
-# Maximum file size limit in bytes
-limit=${GIT_FILE_SIZE_LIMIT:-2000000} # Default 2MB
-limitInMB=$(( $limit / 1000000 ))
-
-function file_too_large(){
- filename=$0
- filesize=$(( $1 / 2**20 ))
-
- cat < /dev/null 2>&1
-then
- against=HEAD
-else
- against="$empty_tree"
-fi
-
-# Set split so that for loop below can handle spaces in file names by splitting on line breaks
-IFS='
-'
-
-shouldFail=false
-for file in $( git diff-index --cached --name-only $against ); do
- file_size=$(([ ! -f $file ] && echo 0) || (ls -la $file | awk '{ print $5 }'))
- if [ "$file_size" -gt "$limit" ]; then
- printError "File $file is $(( $file_size / 10**6 )) MB, which is larger than our configured limit of $limitInMB MB"
- shouldFail=true
- fi
-done
-
-if $shouldFail
-then
- printMessage "If you really need to commit this file, you can override the size limit by setting the GIT_FILE_SIZE_LIMIT environment variable, e.g. GIT_FILE_SIZE_LIMIT=42000000 for 42MB. Or, commit with the --no-verify switch to skip the check entirely."
- printError "Commit aborted"
- exit 1;
-fi
-
-if [[ ! $local_branch =~ $valid_branch_regex ]]
-then
- printError "There is something wrong with your branch name. Branch names in this project must adhere to this contract: $valid_branch_regex.
-Your commit will be rejected. You should rename your branch to a valid name(feat/name OR fix/name) and try again."
- printError "For more on this, read on: https://gist.github.com/cubxxw/126b72104ac0b0ca484c9db09c3e5694"
- exit 1
-fi
\ No newline at end of file
diff --git a/scripts/githooks/pre-push b/scripts/githooks/pre-push
deleted file mode 100644
index 2985313..0000000
--- a/scripts/githooks/pre-push
+++ /dev/null
@@ -1,119 +0,0 @@
-#!/usr/bin/env bash
-# Copyright © 2023 OpenIMSDK.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ==============================================================================
-#
-
-YELLOW="\e[93m"
-GREEN="\e[32m"
-RED="\e[31m"
-ENDCOLOR="\e[0m"
-
-local_branch="$(git rev-parse --abbrev-ref HEAD)"
-valid_branch_regex="^(main|master|develop|release(-[a-zA-Z0-9._-]+)?)$|(feature|feat|openim|hotfix|test|bug|ci|cicd|style|)\/[a-z0-9._-]+$|^HEAD$"
-
-printMessage() {
- printf "${YELLOW}OpenIM : $1${ENDCOLOR}\n"
-}
-
-printSuccess() {
- printf "${GREEN}OpenIM : $1${ENDCOLOR}\n"
-}
-
-printError() {
- printf "${RED}OpenIM : $1${ENDCOLOR}\n"
-}
-
-printMessage "Running local OpenIM pre-push hook."
-
-if [[ `git status --porcelain` ]]; then
- printError "This scripts needs to run against committed code only. Please commit or stash you changes."
- exit 1
-fi
-
-COLOR_SUFFIX="\033[0m"
-
-BLACK_PREFIX="\033[30m"
-RED_PREFIX="\033[31m"
-GREEN_PREFIX="\033[32m"
-BACKGROUND_GREEN="\033[33m"
-BLUE_PREFIX="\033[34m"
-PURPLE_PREFIX="\033[35m"
-SKY_BLUE_PREFIX="\033[36m"
-WHITE_PREFIX="\033[37m"
-BOLD_PREFIX="\033[1m"
-UNDERLINE_PREFIX="\033[4m"
-ITALIC_PREFIX="\033[3m"
-
-# Function to print colored text
-print_color() {
- local text=$1
- local color=$2
- echo -e "${color}${text}${COLOR_SUFFIX}"
-}
-
-# Function to print section separator
-print_separator() {
- print_color "==========================================================" ${PURPLE_PREFIX}
-}
-
-# Get current time
-time=$(date +"%Y-%m-%d %H:%M:%S")
-
-# Print section separator
-print_separator
-
-# Print time of submission
-print_color "PTIME: ${time}" "${BOLD_PREFIX}${CYAN_PREFIX}"
-echo ""
-author=$(git config user.name)
-repository=$(basename -s .git $(git config --get remote.origin.url))
-
-# Print additional information if needed
-print_color "Repository: ${repository}" "${BLUE_PREFIX}"
-echo ""
-
-print_color "Author: ${author}" "${PURPLE_PREFIX}"
-
-# Print section separator
-print_separator
-
-file_list=$(git diff --name-status HEAD @{u})
-added_files=$(grep -c '^A' <<< "$file_list")
-modified_files=$(grep -c '^M' <<< "$file_list")
-deleted_files=$(grep -c '^D' <<< "$file_list")
-
-print_color "Added Files: ${added_files}" "${BACKGROUND_GREEN}"
-print_color "Modified Files: ${modified_files}" "${BACKGROUND_GREEN}"
-print_color "Deleted Files: ${deleted_files}" "${BACKGROUND_GREEN}"
-
-if [[ ! $local_branch =~ $valid_branch_regex ]]
-then
- printError "There is something wrong with your branch name. Branch names in this project must adhere to this contract: $valid_branch_regex.
-Your commit will be rejected. You should rename your branch to a valid name(feat/name OR bug/name) and try again."
- printError "For more on this, read on: https://gist.github.com/cubxxw/126b72104ac0b0ca484c9db09c3e5694"
- exit 1
-fi
-
-#
-#printMessage "Running the Flutter analyzer"
-#flutter analyze
-#
-#if [ $? -ne 0 ]; then
-# printError "Flutter analyzer error"
-# exit 1
-#fi
-#
-#printMessage "Finished running the Flutter analyzer"
diff --git a/scripts/githooks/pre-push.sh b/scripts/githooks/pre-push.sh
deleted file mode 100644
index 9bd9389..0000000
--- a/scripts/githooks/pre-push.sh
+++ /dev/null
@@ -1,119 +0,0 @@
-#!/usr/bin/env bash
-# Copyright © 2023 OpenIMSDK.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ==============================================================================
-#
-
-YELLOW="\e[93m"
-GREEN="\e[32m"
-RED="\e[31m"
-ENDCOLOR="\e[0m"
-
-local_branch="$(git rev-parse --abbrev-ref HEAD)"
-valid_branch_regex="^(main|master|develop|release(-[a-zA-Z0-9._-]+)?)$|(feature|feat|openim|hotfix|test|bug|ci|cicd|style|)\/[a-z0-9._-]+$|^HEAD$"
-
-printMessage() {
- printf "${YELLOW}OpenIM : $1${ENDCOLOR}\n"
-}
-
-printSuccess() {
- printf "${GREEN}OpenIM : $1${ENDCOLOR}\n"
-}
-
-printError() {
- printf "${RED}OpenIM : $1${ENDCOLOR}\n"
-}
-
-printMessage "Running local OpenIM pre-push hook."
-
-if [[ $(git status --porcelain) ]]; then
- printError "This scripts needs to run against committed code only. Please commit or stash you changes."
- exit 1
-fi
-
-COLOR_SUFFIX="\033[0m"
-
-BLACK_PREFIX="\033[30m"
-RED_PREFIX="\033[31m"
-GREEN_PREFIX="\033[32m"
-BACKGROUND_GREEN="\033[33m"
-BLUE_PREFIX="\033[34m"
-PURPLE_PREFIX="\033[35m"
-SKY_BLUE_PREFIX="\033[36m"
-WHITE_PREFIX="\033[37m"
-BOLD_PREFIX="\033[1m"
-UNDERLINE_PREFIX="\033[4m"
-ITALIC_PREFIX="\033[3m"
-
-# Function to print colored text
-print_color() {
- local text=$1
- local color=$2
- echo -e "${color}${text}${COLOR_SUFFIX}"
-}
-
-# Function to print section separator
-print_separator() {
- print_color "==========================================================" ${PURPLE_PREFIX}
-}
-
-# Get current time
-time=$(date +"%Y-%m-%d %H:%M:%S")
-
-# Print section separator
-print_separator
-
-# Print time of submission
-print_color "PTIME: ${time}" "${BOLD_PREFIX}${CYAN_PREFIX}"
-echo ""
-author=$(git config user.name)
-repository=$(basename -s .git $(git config --get remote.origin.url))
-
-# Print additional information if needed
-print_color "Repository: ${repository}" "${BLUE_PREFIX}"
-echo ""
-
-print_color "Author: ${author}" "${PURPLE_PREFIX}"
-
-# Print section separator
-print_separator
-
-file_list=$(git diff --name-status HEAD @{u})
-added_files=$(grep -c '^A' <<< "$file_list")
-modified_files=$(grep -c '^M' <<< "$file_list")
-deleted_files=$(grep -c '^D' <<< "$file_list")
-
-print_color "Added Files: ${added_files}" "${BACKGROUND_GREEN}"
-print_color "Modified Files: ${modified_files}" "${BACKGROUND_GREEN}"
-print_color "Deleted Files: ${deleted_files}" "${BACKGROUND_GREEN}"
-
-if [[ ! $local_branch =~ $valid_branch_regex ]]
-then
- printError "There is something wrong with your branch name. Branch names in this project must adhere to this contract: $valid_branch_regex.
-Your commit will be rejected. You should rename your branch to a valid name(feat/name OR fix/name) and try again."
- printError "For more on this, read on: https://gist.github.com/cubxxw/126b72104ac0b0ca484c9db09c3e5694"
- exit 1
-fi
-
-#
-#printMessage "Running the Flutter analyzer"
-#flutter analyze
-#
-#if [ $? -ne 0 ]; then
-# printError "Flutter analyzer error"
-# exit 1
-#fi
-#
-#printMessage "Finished running the Flutter analyzer"
diff --git a/src/imsdk.cpp b/src/imsdk.cpp
deleted file mode 100644
index 5727da9..0000000
--- a/src/imsdk.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-#include "imsdk.h"
-
-#include
-#include
-#include "json.hpp"
-using json = nlohmann::json;
-
-char *GetOperationId(const char *prefix)
-{
- static int operationIndex = 0;
- operationIndex = operationIndex + 1;
- std::stringstream ss;
- ss << prefix << "_" << operationIndex;
- return (char *)ss.str().c_str();
-}
-
-void OpenIM::InitSDK()
-{
- init_sdk(GetOperationId("init_sdk"), "");
-}
\ No newline at end of file
diff --git a/src/json.hpp b/src/json.hpp
deleted file mode 100644
index 8b72ea6..0000000
--- a/src/json.hpp
+++ /dev/null
@@ -1,24765 +0,0 @@
-// __ _____ _____ _____
-// __| | __| | | | JSON for Modern C++
-// | | |__ | | | | | | version 3.11.3
-// |_____|_____|_____|_|___| https://github.com/nlohmann/json
-//
-// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann
-// SPDX-License-Identifier: MIT
-
-/****************************************************************************\
- * Note on documentation: The source files contain links to the online *
- * documentation of the public API at https://json.nlohmann.me. This URL *
- * contains the most recent documentation and should also be applicable to *
- * previous versions; documentation for deprecated functions is not *
- * removed, but marked deprecated. See "Generate documentation" section in *
- * file docs/README.md. *
-\****************************************************************************/
-
-#ifndef INCLUDE_NLOHMANN_JSON_HPP_
-#define INCLUDE_NLOHMANN_JSON_HPP_
-
-#include // all_of, find, for_each
-#include // nullptr_t, ptrdiff_t, size_t
-#include // hash, less
-#include // initializer_list
-#ifndef JSON_NO_IO
- #include // istream, ostream
-#endif // JSON_NO_IO
-#include // random_access_iterator_tag
-#include // unique_ptr
-#include // string, stoi, to_string
-#include // declval, forward, move, pair, swap
-#include // vector
-
-// #include
-// __ _____ _____ _____
-// __| | __| | | | JSON for Modern C++
-// | | |__ | | | | | | version 3.11.3
-// |_____|_____|_____|_|___| https://github.com/nlohmann/json
-//
-// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann
-// SPDX-License-Identifier: MIT
-
-
-
-#include
-
-// #include
-// __ _____ _____ _____
-// __| | __| | | | JSON for Modern C++
-// | | |__ | | | | | | version 3.11.3
-// |_____|_____|_____|_|___| https://github.com/nlohmann/json
-//
-// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann
-// SPDX-License-Identifier: MIT
-
-
-
-// This file contains all macro definitions affecting or depending on the ABI
-
-#ifndef JSON_SKIP_LIBRARY_VERSION_CHECK
- #if defined(NLOHMANN_JSON_VERSION_MAJOR) && defined(NLOHMANN_JSON_VERSION_MINOR) && defined(NLOHMANN_JSON_VERSION_PATCH)
- #if NLOHMANN_JSON_VERSION_MAJOR != 3 || NLOHMANN_JSON_VERSION_MINOR != 11 || NLOHMANN_JSON_VERSION_PATCH != 3
- #warning "Already included a different version of the library!"
- #endif
- #endif
-#endif
-
-#define NLOHMANN_JSON_VERSION_MAJOR 3 // NOLINT(modernize-macro-to-enum)
-#define NLOHMANN_JSON_VERSION_MINOR 11 // NOLINT(modernize-macro-to-enum)
-#define NLOHMANN_JSON_VERSION_PATCH 3 // NOLINT(modernize-macro-to-enum)
-
-#ifndef JSON_DIAGNOSTICS
- #define JSON_DIAGNOSTICS 0
-#endif
-
-#ifndef JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON
- #define JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON 0
-#endif
-
-#if JSON_DIAGNOSTICS
- #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS _diag
-#else
- #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS
-#endif
-
-#if JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON
- #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON _ldvcmp
-#else
- #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON
-#endif
-
-#ifndef NLOHMANN_JSON_NAMESPACE_NO_VERSION
- #define NLOHMANN_JSON_NAMESPACE_NO_VERSION 0
-#endif
-
-// Construct the namespace ABI tags component
-#define NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b) json_abi ## a ## b
-#define NLOHMANN_JSON_ABI_TAGS_CONCAT(a, b) \
- NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b)
-
-#define NLOHMANN_JSON_ABI_TAGS \
- NLOHMANN_JSON_ABI_TAGS_CONCAT( \
- NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS, \
- NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON)
-
-// Construct the namespace version component
-#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) \
- _v ## major ## _ ## minor ## _ ## patch
-#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(major, minor, patch) \
- NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch)
-
-#if NLOHMANN_JSON_NAMESPACE_NO_VERSION
-#define NLOHMANN_JSON_NAMESPACE_VERSION
-#else
-#define NLOHMANN_JSON_NAMESPACE_VERSION \
- NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(NLOHMANN_JSON_VERSION_MAJOR, \
- NLOHMANN_JSON_VERSION_MINOR, \
- NLOHMANN_JSON_VERSION_PATCH)
-#endif
-
-// Combine namespace components
-#define NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) a ## b
-#define NLOHMANN_JSON_NAMESPACE_CONCAT(a, b) \
- NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b)
-
-#ifndef NLOHMANN_JSON_NAMESPACE
-#define NLOHMANN_JSON_NAMESPACE \
- nlohmann::NLOHMANN_JSON_NAMESPACE_CONCAT( \
- NLOHMANN_JSON_ABI_TAGS, \
- NLOHMANN_JSON_NAMESPACE_VERSION)
-#endif
-
-#ifndef NLOHMANN_JSON_NAMESPACE_BEGIN
-#define NLOHMANN_JSON_NAMESPACE_BEGIN \
- namespace nlohmann \
- { \
- inline namespace NLOHMANN_JSON_NAMESPACE_CONCAT( \
- NLOHMANN_JSON_ABI_TAGS, \
- NLOHMANN_JSON_NAMESPACE_VERSION) \
- {
-#endif
-
-#ifndef NLOHMANN_JSON_NAMESPACE_END
-#define NLOHMANN_JSON_NAMESPACE_END \
- } /* namespace (inline namespace) NOLINT(readability/namespace) */ \
- } // namespace nlohmann
-#endif
-
-// #include
-// __ _____ _____ _____
-// __| | __| | | | JSON for Modern C++
-// | | |__ | | | | | | version 3.11.3
-// |_____|_____|_____|_|___| https://github.com/nlohmann/json
-//
-// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann
-// SPDX-License-Identifier: MIT
-
-
-
-#include // transform
-#include // array
-#include // forward_list
-#include // inserter, front_inserter, end
-#include