2021-06-15 00:28:45 +00:00
|
|
|
import 'package:flutter/src/services/text_input.dart';
|
|
|
|
|
2021-01-12 06:21:18 +00:00
|
|
|
abstract class Cwtch {
|
2021-03-23 22:42:10 +00:00
|
|
|
// ignore: non_constant_identifier_names
|
2021-06-15 19:58:50 +00:00
|
|
|
Future<void> Start();
|
2021-06-11 21:28:20 +00:00
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
Future<void> ReconnectCwtchForeground();
|
2021-01-12 06:21:18 +00:00
|
|
|
|
2021-03-23 22:42:10 +00:00
|
|
|
// ignore: non_constant_identifier_names
|
2021-01-12 06:21:18 +00:00
|
|
|
void SelectProfile(String onion);
|
2021-03-23 22:42:10 +00:00
|
|
|
// ignore: non_constant_identifier_names
|
2021-01-22 07:56:30 +00:00
|
|
|
void CreateProfile(String nick, String pass);
|
2021-03-23 22:42:10 +00:00
|
|
|
// ignore: non_constant_identifier_names
|
2021-01-26 22:39:22 +00:00
|
|
|
void LoadProfiles(String pass);
|
2021-06-15 00:28:45 +00:00
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void DeleteProfile(String onion, String pass);
|
2021-04-08 05:07:01 +00:00
|
|
|
|
2021-04-13 22:29:23 +00:00
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void ResetTor();
|
|
|
|
|
2021-04-08 05:07:01 +00:00
|
|
|
// todo: remove these
|
2021-03-23 22:42:10 +00:00
|
|
|
// ignore: non_constant_identifier_names
|
2021-03-04 21:21:40 +00:00
|
|
|
void SendProfileEvent(String onion, String jsonEvent);
|
2021-03-23 22:42:10 +00:00
|
|
|
// ignore: non_constant_identifier_names
|
2021-03-10 17:40:14 +00:00
|
|
|
void SendAppEvent(String jsonEvent);
|
2021-01-12 06:21:18 +00:00
|
|
|
|
2021-04-08 05:07:01 +00:00
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void AcceptContact(String profileOnion, String contactHandle);
|
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void BlockContact(String profileOnion, String contactHandle);
|
|
|
|
|
2021-03-23 22:42:10 +00:00
|
|
|
// ignore: non_constant_identifier_names
|
2021-05-25 00:11:39 +00:00
|
|
|
Future<dynamic> GetMessage(String profile, String handle, int index);
|
2021-03-23 22:42:10 +00:00
|
|
|
// ignore: non_constant_identifier_names
|
2021-06-09 19:57:22 +00:00
|
|
|
void UpdateMessageFlags(String profile, String handle, int index, int flags);
|
|
|
|
// ignore: non_constant_identifier_names
|
2021-04-08 05:07:01 +00:00
|
|
|
void SendMessage(String profile, String handle, String message);
|
2021-05-11 04:34:04 +00:00
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void SendInvitation(String profile, String handle, String target);
|
2021-03-23 22:42:10 +00:00
|
|
|
|
2021-06-15 00:28:45 +00:00
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void LeaveConversation(String profile, String handle);
|
|
|
|
|
2021-05-28 09:14:21 +00:00
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void CreateGroup(String profile, String server, String groupName);
|
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void LeaveGroup(String profile, String groupID);
|
|
|
|
|
2021-04-22 21:15:27 +00:00
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void ImportBundle(String profile, String bundle);
|
2021-04-23 19:57:30 +00:00
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void SetGroupAttribute(String profile, String groupHandle, String key, String value);
|
2021-04-28 22:26:49 +00:00
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void RejectInvite(String profileOnion, String groupHandle);
|
2021-04-22 21:15:27 +00:00
|
|
|
|
2021-06-16 21:25:08 +00:00
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void Shutdown();
|
|
|
|
|
2021-03-23 22:42:10 +00:00
|
|
|
void dispose();
|
2021-03-10 17:40:14 +00:00
|
|
|
}
|