- C++ 90.8%
- Objective-C 4.7%
- C 2.2%
- CMake 1.9%
- Cap'n Proto 0.2%
- Other 0.2%
| cmake | ||
| docs | ||
| examples | ||
| interfaces | ||
| src | ||
| tests | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| all.pro | ||
| CHANGELOG.md | ||
| CMakeLists.txt | ||
| LICENSE | ||
| README.md | ||
Matrix Client Library
For make release
- Update the version number in
Application.hfile - Update the
CHANGELOGfile
Dependencies
mtxclient: Matrix Client Library - linksqlitecpp: Database - linkQt: Frameworklmdb&lmdbxx: TODO - Should be replacedcmark: To convert markdown to htmlspdlog: Loggernlohmann_json: JSON library - TODO : Maybe we have to replace it with Qt Built-in Json library
How to build
mkdir build
cd build
qmake ..
make
Build Options
1. Building as shared or static
The library will be built as shared library, we can set -DSTATIC_LIB=ON and run cmake to build as static:
cmake -DSTATIC_LIB=ON ..
2. Building with examples
The examples won't be built as default, so you can run qmake as follow to build them:
cmake -DBUILD_EXAMPLES=ON ..
3. Building without tests
The tests won't be built as default, so you can run qmake as follow to enable the building the tests:
cmake -DBUILD_TESTS=ON ..
4. Building with CIBA authentication support
cmake -DCIBA_AUTHENTICATION=ON ..
5. PantherX Accounts And Secrets service integration
In order to have the support for PantherX Online Accounts and Secret services integration, we need to build the library with the following flag: -DPX_ACCOUNTS_INTEGRATION=ON
cmake -DCIBA_AUTHENTICATION=ON ..
Integration
1. create instance
Client *client;
client = Client::instance();
2. Enable/Disable logs
The logs is enabled as default with info level. We can disable it via:
client->enableLogger(false);
We can enable debug logs as well with this line:
client->enableLogger(true, true);
The second true is related to enable debug logs.
3. Login with password
client->loginWithPassword(deviceName, userId, password, serverAddress);
the result will be informed with 2 signal Client::loginOk and Client::loginErrorOccurred
4. Client process should be start
client->start();
if client is not loged in already will recieve Client::dropToLogin signale
5. Get Room Lists
std::map<QString, RoomInfo> Client::joinedRoomList()
Stored files/folders
Config:~/.config/matrix-client-library/APP_NAME.confDB:~/.local/share/matrix-client-library/APP_NAME/APP_NAME_HASH/Log:~/.local/share/matrix-client-library/APP_NAME/matrix-client-library.logCache(qml and media):~/.cache/matrix-client-library/APP_NAME/Cache Info:~/.cache/matrix-client-library/APP_NAME/info