2021-06-24 23:10:45 +00:00
|
|
|
import 'package:flutter/src/services/text_input.dart';
|
|
|
|
|
|
|
|
abstract class Cwtch {
|
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
Future<void> Start();
|
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
Future<void> ReconnectCwtchForeground();
|
|
|
|
|
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void SelectProfile(String onion);
|
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void CreateProfile(String nick, String pass);
|
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void LoadProfiles(String pass);
|
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void DeleteProfile(String onion, String pass);
|
|
|
|
|
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void ResetTor();
|
|
|
|
|
|
|
|
// todo: remove these
|
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void SendProfileEvent(String onion, String jsonEvent);
|
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void SendAppEvent(String jsonEvent);
|
|
|
|
|
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void AcceptContact(String profileOnion, String contactHandle);
|
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void BlockContact(String profileOnion, String contactHandle);
|
|
|
|
|
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
Future<dynamic> GetMessage(String profile, String handle, int index);
|
|
|
|
// ignore: non_constant_identifier_names
|
2021-07-05 19:31:16 +00:00
|
|
|
Future<dynamic> GetMessageByContentHash(String profile, String handle, String contentHash);
|
|
|
|
// ignore: non_constant_identifier_names
|
2021-06-24 23:10:45 +00:00
|
|
|
void UpdateMessageFlags(String profile, String handle, int index, int flags);
|
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void SendMessage(String profile, String handle, String message);
|
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void SendInvitation(String profile, String handle, String target);
|
|
|
|
|
2021-09-21 21:57:40 +00:00
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void ShareFile(String profile, String handle, String filepath);
|
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void DownloadFile(String profile, String handle, String filepath, String manifestpath, String filekey);
|
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void CreateDownloadableFile(String profile, String handle, String filenameSuggestion, String filekey);
|
2021-09-29 20:31:01 +00:00
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void CheckDownloadStatus(String profile, String fileKey);
|
2021-09-21 21:57:40 +00:00
|
|
|
|
2021-06-24 23:10:45 +00:00
|
|
|
// ignore: non_constant_identifier_names
|
2021-08-27 20:46:13 +00:00
|
|
|
void ArchiveConversation(String profile, String handle);
|
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void DeleteContact(String profile, String handle);
|
2021-06-24 23:10:45 +00:00
|
|
|
|
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void CreateGroup(String profile, String server, String groupName);
|
|
|
|
|
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void ImportBundle(String profile, String bundle);
|
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void SetGroupAttribute(String profile, String groupHandle, String key, String value);
|
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void RejectInvite(String profileOnion, String groupHandle);
|
2021-10-14 01:24:07 +00:00
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void SetProfileAttribute(String profile, String key, String val);
|
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void SetContactAttribute(String profile, String contact, String key, String val);
|
|
|
|
|
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void LoadServers(String password);
|
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void CreateServer(String password);
|
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void DeleteServer(String serverOnion, String password);
|
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void LaunchServers();
|
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void LaunchServer(String serverOnion);
|
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void ShutdownServer(String serverOnion);
|
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void ShutdownServers();
|
2021-06-24 23:10:45 +00:00
|
|
|
|
|
|
|
// ignore: non_constant_identifier_names
|
|
|
|
void Shutdown();
|
|
|
|
|
|
|
|
void dispose();
|
|
|
|
}
|