mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-26 16:09:35 -05:00
Some changes to chat.proto
- Changed ENUMs to include type in the name. - made non-essential member of ChatMessage optional. - Fixed some incorrect numbering. Enabled chat in core.proto & Makefile. git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5507 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
9c2f7f39e7
commit
9ad322d379
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
EXEC = protoc
|
EXEC = protoc
|
||||||
#PROTO = core.proto files.proto gxs.proto msgs.proto peers.proto system.proto
|
#PROTO = core.proto peers.proto system.proto chat.proto files.proto gxs.proto msgs.proto
|
||||||
PROTO = core.proto peers.proto system.proto
|
PROTO = core.proto peers.proto system.proto chat.proto
|
||||||
|
|
||||||
PROTOPATH = ./definition
|
PROTOPATH = ./definition
|
||||||
#CDESTPATH = ./gencc
|
#CDESTPATH = ./gencc
|
||||||
|
@ -4,6 +4,12 @@ import "core.proto";
|
|||||||
|
|
||||||
///////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////
|
||||||
// Private, Group and Chat Lobby RPC.
|
// Private, Group and Chat Lobby RPC.
|
||||||
|
//
|
||||||
|
// OTHER COMMANDS TO ADD?
|
||||||
|
// Status Strings.
|
||||||
|
// Invite Friends to Private Lobbies.
|
||||||
|
// Chat History.
|
||||||
|
// ???
|
||||||
///////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
enum RequestMsgIds {
|
enum RequestMsgIds {
|
||||||
@ -18,7 +24,8 @@ enum RequestMsgIds {
|
|||||||
enum ResponseMsgIds {
|
enum ResponseMsgIds {
|
||||||
// STANDARD RESPONSES.
|
// STANDARD RESPONSES.
|
||||||
MsgId_ResponseChatLobbies = 1;
|
MsgId_ResponseChatLobbies = 1;
|
||||||
MsgId_ResponseRegisterEvents = 2;
|
MsgId_ResponseSetLobbyNickname = 4;
|
||||||
|
MsgId_ResponseRegisterEvents = 5;
|
||||||
MsgId_ResponseSendMessage = 6;
|
MsgId_ResponseSendMessage = 6;
|
||||||
|
|
||||||
// EVENTS
|
// EVENTS
|
||||||
@ -33,8 +40,8 @@ enum ResponseMsgIds {
|
|||||||
// Which seem very similar??
|
// Which seem very similar??
|
||||||
|
|
||||||
enum LobbyPrivacyLevel {
|
enum LobbyPrivacyLevel {
|
||||||
PRIVATE = 1;
|
PRIVACY_PRIVATE = 1;
|
||||||
PUBLIC = 2;
|
PRIVACY_PUBLIC = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum ChatType {
|
enum ChatType {
|
||||||
@ -51,9 +58,9 @@ message ChatLobbyInfo {
|
|||||||
required string lobby_nickname = 4; // empty for none set.
|
required string lobby_nickname = 4; // empty for none set.
|
||||||
|
|
||||||
enum LobbyState {
|
enum LobbyState {
|
||||||
JOINED = 1;
|
LOBBYSTATE_JOINED = 1;
|
||||||
INVITED = 2;
|
LOBBYSTATE_INVITED = 2;
|
||||||
PUBLIC = 3;
|
LOBBYSTATE_PUBLIC = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
required LobbyPrivacyLevel privacy_level = 5;
|
required LobbyPrivacyLevel privacy_level = 5;
|
||||||
@ -64,22 +71,28 @@ message ChatLobbyInfo {
|
|||||||
required uint32 last_activity = 9;
|
required uint32 last_activity = 9;
|
||||||
|
|
||||||
repeated string participating_friends = 10; // SSL_IDS?
|
repeated string participating_friends = 10; // SSL_IDS?
|
||||||
repeated string nick_names = 11;
|
repeated string nicknames = 11;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
message ChatMessage {
|
message ChatId {
|
||||||
|
|
||||||
required ChatType chat_type = 1;
|
required ChatType chat_type = 1;
|
||||||
required string chat_id = 2;
|
required string chat_id = 2;
|
||||||
|
|
||||||
required string peer_nickname = 3;
|
}
|
||||||
required uint32 chatflags = 4;
|
|
||||||
|
|
||||||
required uint32 sendTime = 5;
|
message ChatMessage {
|
||||||
required uint32 recvTime = 6;
|
|
||||||
|
required ChatId id = 1;
|
||||||
|
required string msg = 2;
|
||||||
|
|
||||||
|
optional string peer_nickname = 3;
|
||||||
|
optional uint32 chat_flags = 4;
|
||||||
|
|
||||||
|
optional uint32 send_time = 5;
|
||||||
|
optional uint32 recv_time = 6;
|
||||||
|
|
||||||
required string msg = 7;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -99,15 +112,14 @@ message ResponseChatLobbies {
|
|||||||
// REQUEST: RequestChatLobbies
|
// REQUEST: RequestChatLobbies
|
||||||
message RequestChatLobbies {
|
message RequestChatLobbies {
|
||||||
|
|
||||||
enum LobbyType {
|
enum LobbySet {
|
||||||
ALL = 1;
|
LOBBYSET_ALL = 1;
|
||||||
NEW = 2;
|
LOBBYSET_JOINED = 2;
|
||||||
INVITED = 3;
|
LOBBYSET_INVITED = 3;
|
||||||
PRIVATE = 4;
|
LOBBYSET_PUBLIC = 4;
|
||||||
PUBLIC = 5;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
required LobbyType lobby_type = 1;
|
required LobbySet lobby_set = 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,7 +136,7 @@ message RequestCreateLobby {
|
|||||||
|
|
||||||
required LobbyPrivacyLevel privacy_level = 4;
|
required LobbyPrivacyLevel privacy_level = 4;
|
||||||
|
|
||||||
repeated string invited_friends = 3; // SSL_IDS?
|
repeated string invited_friends = 3; // SSL_IDS
|
||||||
}
|
}
|
||||||
|
|
||||||
// RESPONSE: ResponseChatLobbies
|
// RESPONSE: ResponseChatLobbies
|
||||||
@ -151,7 +163,7 @@ message RequestJoinOrLeaveLobby {
|
|||||||
|
|
||||||
// Set Nickname.
|
// Set Nickname.
|
||||||
// Get is done via requesting ChatLobby Info.
|
// Get is done via requesting ChatLobby Info.
|
||||||
// Empty lobby_ids => default id.
|
// Empty lobby_ids => default Nickname.
|
||||||
|
|
||||||
// REQUEST: RequestSetLobbyNickname
|
// REQUEST: RequestSetLobbyNickname
|
||||||
message RequestSetLobbyNickname {
|
message RequestSetLobbyNickname {
|
||||||
@ -159,19 +171,24 @@ message RequestSetLobbyNickname {
|
|||||||
repeated string lobby_ids = 2;
|
repeated string lobby_ids = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// RESPONSE: ResponseChatLobbies
|
// RESPONSE: ResponseSetLobbyNickname
|
||||||
|
// Didnt think the whole Lobby status was necessary.
|
||||||
|
message ResponseSetLobbyNickname {
|
||||||
|
required rsctrl.core.Status status = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// Request Chat Events.
|
// Request Chat Events.
|
||||||
// This is done by registering for events.
|
// This is done by registering for events.
|
||||||
|
|
||||||
// REQUEST: ReqestRegisterEvents
|
// REQUEST: RequestRegisterEvents
|
||||||
message RequestRegisterEvents {
|
message RequestRegisterEvents {
|
||||||
|
|
||||||
enum RegisterAction {
|
enum RegisterAction {
|
||||||
REGISTER = 1;
|
REGISTER = 1;
|
||||||
DEREGISTER = 1;
|
DEREGISTER = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
required RegisterAction action = 1;
|
required RegisterAction action = 1;
|
||||||
@ -195,12 +212,9 @@ message EventChatMessage {
|
|||||||
///////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////
|
||||||
// Send Message.
|
// Send Message.
|
||||||
|
|
||||||
// Request Chat Events.
|
|
||||||
// This is done by registering for events.
|
|
||||||
|
|
||||||
// REQUEST: RequestSendMessage
|
// REQUEST: RequestSendMessage
|
||||||
message RequestSendMessage {
|
message RequestSendMessage {
|
||||||
required ChatMessage msg = 2;
|
required ChatMessage msg = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// RESPONSE: ResponseSendMessage
|
// RESPONSE: ResponseSendMessage
|
||||||
@ -209,4 +223,21 @@ 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;
|
||||||
|
//}
|
||||||
|
//
|
||||||
|
///////////////////////////////////////////////////////////////
|
||||||
|
///////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@ -14,8 +14,8 @@ enum ExtensionId { CORE = 0; }
|
|||||||
enum PackageId {
|
enum PackageId {
|
||||||
PEERS = 1;
|
PEERS = 1;
|
||||||
SYSTEM = 2;
|
SYSTEM = 2;
|
||||||
|
CHAT = 3;
|
||||||
// BELOW HERE IS STILL BEING DESIGNED.
|
// BELOW HERE IS STILL BEING DESIGNED.
|
||||||
//CHAT = 3;
|
|
||||||
//FILES = 4;
|
//FILES = 4;
|
||||||
//MSGS = 5;
|
//MSGS = 5;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user