TinodeService class
This class contains basic functionality and logic to generate and send tinode packages
Constructors
- TinodeService()
- Creates a new instance of TinodeService
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
onCtrlMessage
↔ PublishSubject<
CtrlMessage> -
This event will be triggered when a
ctrl
message is receivedgetter/setter pair -
onDataMessage
↔ PublishSubject<
DataMessage> -
This event will be triggered when a
data
message is receivedgetter/setter pair - onInfoMessage ↔ PublishSubject
-
This event will be triggered when a
info
message is receivedgetter/setter pair -
onMetaMessage
↔ PublishSubject<
MetaMessage> -
This event will be triggered when a
meta
message is receivedgetter/setter pair -
onPresMessage
↔ PublishSubject<
PresMessage> -
This event will be triggered when a
pres
message is receivedgetter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
account(
String userId, String scheme, String secret, bool login, AccountParams? params) → Future - Create or update an account
-
createMessage(
String topicName, dynamic data, bool? echo) → Message - Create message draft without sending it to the server
-
deleteCredential(
String method, String value) → Future - Delete credential. Always sent on 'me' topic
-
deleteCurrentUser(
bool hard) → Future - Request to delete account of the current user
-
deleteMessages(
String topicName, List< DelRange> ranges, bool hard) → Future - Delete some or all messages in a topic
-
deleteSubscription(
String topicName, String userId) → Future - Delete subscription. Requires Share permission
-
deleteTopic(
String topicName, bool hard) → Future - Delete the topic all together. Requires Owner permission
-
getMeta(
String topicName, GetQuery params) → Future - Request topic metadata
-
getTopic(
String? topicName) → Topic? -
handleCtrlMessage(
CtrlMessage? ctrl) → void -
Process a packet if the packet type is
ctrl
-
handleDataMessage(
DataMessage? data) → void -
Process a packet if the packet type is
data
-
handleInfoMessage(
InfoMessage? info) → void -
Process a packet if the packet type is
info
-
handleMetaMessage(
MetaMessage? meta) → void -
Process a packet if the packet type is
meta
-
handlePresMessage(
PresMessage? pres) → void -
Process a packet if the packet type is
pres
-
hello(
{String? deviceToken}) → Future - Say hello and set some initial configuration
-
isMe(
String userId) → bool - Check if the given user ID is equal to the current user's user id
-
leave(
String topicName, bool unsubscribe) → Future - Detach and optionally unsubscribe from the topic
-
login(
String scheme, String secret, Map< String, dynamic> ? cred) → Future<CtrlMessage> - Authenticate current session
-
newChannel(
) → Topic -
newGroupTopicName(
bool isChan) → String -
newTopic(
) → Topic -
newTopicWith(
String peerUserId) → Topic -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
note(
String topicName, String what, int seq) → Future - Notify server that a message or messages were read or received. Does NOT return promise
-
noteKeyPress(
String topicName) → Future - Broadcast a key-press notification to topic subscribers
-
publishMessage(
Message message) → Future -
Publish message to topic. The message should be created by
createMessage
-
setMeta(
String topicName, SetParams params) → Future - Update topic's metadata: description, subscriptions
-
subscribe(
String? topicName, GetQuery getParams, SetParams? setParams) → Future - Send a topic subscription request
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited