summaryrefslogtreecommitdiff
path: root/jwebmail.proto
diff options
context:
space:
mode:
authorJannis M. Hoffmann <jannis@fehcom.de>2024-11-21 21:14:40 +0100
committerJannis M. Hoffmann <jannis@fehcom.de>2024-11-21 21:14:40 +0100
commit48c2945172b88c35c187d298a35bf26716af4e91 (patch)
tree2af21ddb4dcacd191e07fef156609b7c1488ebaf /jwebmail.proto
parent6ed535387df0dffa72a10e601b8ea37c99345d84 (diff)
Switch to varlink as IPC protocol
This is a lot! Whole new design on top of a statefult varlink interface. You can now handle multiple request response cycles over a single connection. The error responses are lot more refined than just status codes with optional messages and finally part of the protocol. TODO: A lot of error handling needs to be improved.
Diffstat (limited to 'jwebmail.proto')
-rw-r--r--jwebmail.proto165
1 files changed, 0 insertions, 165 deletions
diff --git a/jwebmail.proto b/jwebmail.proto
deleted file mode 100644
index e4cba3b..0000000
--- a/jwebmail.proto
+++ /dev/null
@@ -1,165 +0,0 @@
-syntax = "proto3";
-
-package jwebmail;
-
-message MIMEHeader {
-
- enum ContentDisposition {
- CONTENT_DISPOSITION_NONE = 0;
- CONTENT_DISPOSITION_INLINE = 1;
- CONTENT_DISPOSITION_ATTACHMENT = 2;
- }
-
- string maintype = 1;
- string subtype = 2;
- ContentDisposition contentdispo = 3;
- optional string file_name = 4;
-}
-
-message MailHeader {
-
- message MailAddr {
- optional string name = 1;
- string address = 2;
- }
-
- string send_date = 1;
- repeated MailAddr written_from = 2;
- optional MailAddr sender = 3;
- repeated MailAddr reply_to = 4;
- repeated MailAddr send_to = 5;
- repeated MailAddr cc = 6;
- repeated MailAddr bcc = 7;
- string subject = 8;
- repeated string comments = 9;
- repeated string keywords = 10;
- MIMEHeader mime = 11;
-}
-
-message ListMailHeader {
- uint64 byte_size = 1;
- bool unread = 2;
- string rec_date = 3;
- string mid = 4;
- MailHeader header = 5;
-}
-
-message MailBody {
- message Multipart {
- optional string preamble = 1;
- repeated MIMEPart parts = 2;
- optional string epilogue = 3;
- }
-
- oneof Body {
- string discrete = 1;
- Multipart multipart = 2;
- Mail mail = 3;
- }
-}
-
-message Mail {
- MailHeader head = 1;
- MailBody body = 2;
-}
-
-message MIMEPart {
- MIMEHeader mime_header = 1;
- MailBody body = 2;
-}
-
-// Request-Response pairs
-
-message ListReq {
- string folder = 1;
- int32 start = 2;
- int32 end = 3;
- string sort = 4;
-}
-
-message ListResp {
- repeated ListMailHeader mail_heads = 1;
-}
-
-message StatsReq {
- string folder = 1;
-}
-
-message StatsResp {
- uint32 mail_count = 1;
- uint32 unread_count = 2;
- uint64 byte_size = 3;
-}
-
-message ShowReq {
- string folder = 1;
- string mid = 2;
-}
-
-message ShowResp {
- Mail mail = 1;
-}
-
-message RawReq {
- string folder = 1;
- string mid = 2;
- optional string path = 3;
-}
-
-message RawResp {
- MIMEHeader header = 1;
- bytes body = 2;
-}
-
-message SearchReq {
- string folder = 1;
- string pattern = 2;
-}
-
-message SearchResp {
- repeated ListMailHeader found = 1;
-}
-
-message FoldersReq {
-}
-
-message FoldersResp {
- repeated string folders = 1;
-}
-
-message MoveReq {
- string mid = 1;
- string from_f = 2;
- string to_f = 3;
-}
-
-message MoveResp {
-}
-
-message RemoveReq {
- string folder = 1;
- string mid = 2;
-}
-
-message RemoveResp {
-}
-
-message AddFolderReq {
- string name = 1;
-}
-
-message AddFolderResp {
- int32 status = 1;
-}
-
-service MailService {
- rpc List(ListReq) returns (ListResp);
- rpc Stats(StatsReq) returns (StatsResp);
- rpc Show(ShowReq) returns (ShowResp);
- rpc Raw(RawReq) returns (RawResp);
- rpc Search(SearchReq) returns (SearchResp);
- rpc Folders(FoldersReq) returns (FoldersResp);
- rpc Move(MoveReq) returns (MoveResp);
- rpc Remove(RemoveReq) returns (RemoveResp);
- rpc AddFolder(AddFolderReq) returns (AddFolderResp);
-}