diff --git a/rsctrl/src/Makefile b/rsctrl/src/Makefile index b6305a374..82f721f0b 100644 --- a/rsctrl/src/Makefile +++ b/rsctrl/src/Makefile @@ -15,7 +15,7 @@ HCODE = $(patsubst %.proto,$(CDESTPATH)/%.pb.h, $(PROTO)) PYCODE = $(patsubst %.proto,$(PYDESTPATH)/%_pb2.py, $(PROTO)) -all: allc +all: allc python_proto allc: $(CCODE) echo $(CCODE) diff --git a/rsctrl/src/definition/chat.proto b/rsctrl/src/definition/chat.proto index 4b6b2eb5c..0c0b8465b 100644 --- a/rsctrl/src/definition/chat.proto +++ b/rsctrl/src/definition/chat.proto @@ -19,6 +19,7 @@ enum RequestMsgIds { MsgId_RequestSetLobbyNickname = 4; MsgId_RequestRegisterEvents = 5; MsgId_RequestSendMessage = 6; + MsgId_RequestChatHistory = 7; } enum ResponseMsgIds { @@ -27,6 +28,7 @@ enum ResponseMsgIds { MsgId_ResponseSetLobbyNickname = 4; MsgId_ResponseRegisterEvents = 5; MsgId_ResponseSendMessage = 6; + MsgId_ResponseChatHistory = 7; // EVENTS MsgId_EventLobbyInvite = 101; @@ -223,21 +225,22 @@ message ResponseSendMessage { } /////////////////////////////////////////////////////////////// -//// Chat History. -//// THIS IS NOT IMPLEMENTED YET, DONT USE. -// -//// REQUEST: RequestChatHistory -//message RequestChatHistory { -// required ChatId id = 1; /* lobby or chat, group id */ -// required bool incoming = 2; -//} -// -//// RESPONSE: ResponseChatHistory -//message ResponseChatHistory { -// required rsctrl.core.Status status = 1; -// repeated ChatMessage msg = 2; -//} -// +// Chat History. +// INITIALLY THIS WILL ONLY WORK WITH PRIVATE CHATS. +// NEED TO EXTEND INTERNALS TO HANDLE LOBBIES. + +// REQUEST: RequestChatHistory +message RequestChatHistory { + required ChatId id = 1; /* lobby or chat, group id */ +} + +// RESPONSE: ResponseChatHistory +message ResponseChatHistory { + required rsctrl.core.Status status = 1; + required ChatId id = 2; /* lobby or chat, group id */ + repeated ChatMessage msgs = 3; +} + /////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////// diff --git a/rsctrl/src/definition/core.proto b/rsctrl/src/definition/core.proto index 69443af5d..c9ef85508 100644 --- a/rsctrl/src/definition/core.proto +++ b/rsctrl/src/definition/core.proto @@ -74,10 +74,11 @@ message Location { message Person { enum Relationship { - FRIEND = 1; - FRIEND_OF_MANY_FRIENDS = 2; // 3+ at the moment. - FRIEND_OF_FRIENDS = 3; // 1 or 2. - UNKNOWN = 4; + YOURSELF = 1; + FRIEND = 2; + FRIEND_OF_MANY_FRIENDS = 3; // 3+ at the moment. + FRIEND_OF_FRIENDS = 4; // 1 or 2. + UNKNOWN = 5; } required string gpg_id = 1; diff --git a/rsctrl/src/definition/search.proto b/rsctrl/src/definition/search.proto index 6aecdb49f..d058a6195 100644 --- a/rsctrl/src/definition/search.proto +++ b/rsctrl/src/definition/search.proto @@ -33,7 +33,7 @@ message SearchHit { required rsctrl.core.File file = 1; required uint32 loc = 2; // OR of LocFlag so uint field required uint32 no_hits = 3; // NOT USED YET. - + repeated string alt_names = 4; } message SearchSet { @@ -100,8 +100,8 @@ message RequestListSearches { // Empty search_ids => all results. message RequestSearchResults { + optional uint32 result_limit = 1; repeated uint32 search_ids = 2; - } // RESPONSE: ResponseSearchResults