vukoye / xmpp_dart

Lightweight XMPP client library written in Dart
Apache License 2.0
83 stars 64 forks source link

XmppStone

Lightweight XMPP client library written completely in Dart. My intention is to write simple to use library for future XMPP client based on Flutter.

Supported documents:

Partly supported:

Actively working on:

Latest news

Usage

import 'package:xmpp_stone/xmpp_stone.dart' as xmpp;

main() {
  xmpp.Connection connection = new xmpp.Connection("user@domain", "password", 5222);
  connection.open();
}

Features

1. Logging

Log level

Client can set logging level of the library with command:

Log.logLevel = LogLevel.VERBOSE;
XMPP traffic logging

Xmpp traffic can be enabled or disabled with:

Log.logXmpp = false

2. Message Archive Management

Feature is work in progress, API is subject to change.

Initial implementation of Message Archive Management.

RST is not yet implemented.

Usage:

mamManager.queryAll();
mamManager.queryByTime(start: startTime, end: endTime, jid: buddyJid);
mamManager.queryById(beforeId: beforeId, afterId: afterId, jid: buddyJid});

Checking capabilities of the server:

mamManager.isQueryByDateSupported
mamManager.isQueryByIdSupported
mamManager.isQueryByJidSupported