48 lines
855 B
Plaintext
48 lines
855 B
Plaintext
[Error]
|
|
enum NativeError {
|
|
"Initialization",
|
|
"Database",
|
|
"Network",
|
|
};
|
|
|
|
enum MessageAck {
|
|
"Received",
|
|
"Seen",
|
|
"Sent",
|
|
};
|
|
|
|
dictionary MessagePreview {
|
|
string sender;
|
|
string text;
|
|
timestamp date;
|
|
MessageAck ack;
|
|
};
|
|
|
|
dictionary Dialog {
|
|
string id;
|
|
string title;
|
|
MessagePreview? last_message;
|
|
boolean pinned;
|
|
};
|
|
|
|
interface LoginProcedure {
|
|
constructor();
|
|
[Throws=NativeError]
|
|
void request_login_code(string phone);
|
|
[Throws=NativeError]
|
|
void sign_in(string code);
|
|
};
|
|
|
|
namespace talaria {
|
|
[Throws=NativeError]
|
|
void init_database(string path);
|
|
[Throws=NativeError]
|
|
void init_client();
|
|
[Throws=NativeError]
|
|
boolean need_login();
|
|
[Throws=NativeError]
|
|
sequence<Dialog> get_dialogs();
|
|
[Throws=NativeError]
|
|
void send_message(string packed, string text);
|
|
};
|