Changed base.proto & namespace to "core", as base is a reserved keyword in C#

* Started specifying the search protocol in files.proto
 * Added Create Msgs in gxs.proto.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5466 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2012-08-24 22:33:24 +00:00
parent 7694bc8bf3
commit 1d35dc2915
7 changed files with 177 additions and 62 deletions

View File

@ -1,7 +1,7 @@
EXEC = protoc EXEC = protoc
#PROTO = base.proto files.proto gxs.proto msgs.proto peers.proto system.proto #PROTO = core.proto files.proto gxs.proto msgs.proto peers.proto system.proto
PROTO = base.proto peers.proto PROTO = core.proto peers.proto
PROTOPATH = ./definition PROTOPATH = ./definition
CDESTPATH = ./gencc CDESTPATH = ./gencc

View File

@ -1,4 +1,4 @@
package rsctrl.base; package rsctrl.core;
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////
// These are basic Messages, which are used as building blocks // These are basic Messages, which are used as building blocks
@ -9,7 +9,7 @@ package rsctrl.base;
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////
// Expected PackageIds. // Expected PackageIds.
enum ExtensionId { BASE = 0; } enum ExtensionId { CORE = 0; }
enum PackageId { enum PackageId {
PEERS = 1; PEERS = 1;

View File

@ -1,6 +1,6 @@
package rsctrl.files; package rsctrl.files;
import "base.proto"; import "core.proto";
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////
// Mirror most of rsFiles functionality. // Mirror most of rsFiles functionality.
@ -24,42 +24,130 @@ enum ResponseMsgIds {
} }
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////
// SEARCH (start).
// REQUEST: RequestPeers // REQUEST: RequestBasicSearch
message RequestPeers { message RequestBasicSearch {
// About Who? repeated string terms = 1;
enum SetOption { }
OWNID = 1;
LISTED = 2;
ONLINE = 3;
FRIENDS = 4;
VALID = 5;
SIGNED = 6;
ALL = 7;
}
// What do you want? // REQUEST: RequestAdvSearch
enum InfoOption { message RequestAdvSearch {
NAMEONLY = 1;
BASIC = 2;
LOCATION = 3;
ALLINFO = 4;
}
required SetOption set = 1; repeated string terms = 1;
required InfoOption info = 2;
repeated string gpg_ids = 3;
} }
// RESPONSE: ResponsePeerList // RESPONSE: ResponseSearchId
message ResponsePeerList { message ResponseSearchId {
required rsctrl.base.Status status = 1;
repeated rsctrl.base.Person peers = 2; required rsctrl.core.Status status = 1;
required string search_id = 2;
} }
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////
// SEARCH (list)
// REQUEST: RequestSearchResults
message RequestSearchResults {
enum SetCmd {
ALLIDS = 1; // All
LISTED = 2; // Only Search Ids in the Vector.
}
required SetCmd set = 1;
repeated string search_ids = 2;
}
// Building Block
message SearchHit {
enum LocFlag {
LOCAL = 1; // We Have it.
FRIEND = 2; // Browsable
NETWORK = 4; // Network.
}
required rsctrl.core.File file = 1;
required int no_hits = 2
required LocFlag loc = 3;
}
message SearchSet {
required string search_id = 1;
enum SearchType {
BASIC = 1; // Stuff.
ADVANCED = 2; // Stuff.
}
// One of these will be filled in depending on flag.
required SearchType search_type = 2;
optional RequestBasicSearch basic_req = 3;
optional RequestAdvSearch adv_req = 4;
repeated SearchHit = 5;
}
// RESPONSE: ResponseSearchResults
message ResponseSearchResults {
required rsctrl.core.Status status = 1;
repeated SearchSet searches = 2;
}
///////////////////////////////////////////////////////////////
// SEARCH (cancel)
// REQUEST: RequestCloseSearch
message RequestCloseSearch {
required string search_id = 2;
}
// RESPONSE: ResponseSearchId
// As before.
///////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////
// SHARED FILES
// REQUEST: RequestListShares
message RequestListShares {
required int depth = 1; // HOW Many Directories to drill down.
repeated string ShareLocation = 2;
}
message ShareLocation {
required string ssl_id = 1;
required string path = 2;
}
message
// REQUEST: RequestChangeShares
// REQUEST: RequestLiCloseSearch
// REQUEST: RequestCloseSearch
// REQUEST: RequestAddPeer // REQUEST: RequestAddPeer
message RequestAddPeer { message RequestAddPeer {
@ -79,8 +167,8 @@ message RequestAddPeer {
// RESPONSE: ResponseAddPeer // RESPONSE: ResponseAddPeer
message ResponseAddPeer { message ResponseAddPeer {
required rsctrl.base.Status status = 1; required rsctrl.core.Status status = 1;
repeated rsctrl.base.Person peers = 2; repeated rsctrl.core.Person peers = 2;
} }
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////
@ -100,13 +188,13 @@ message RequestModifyPeer {
required ModCmd cmd = 1; required ModCmd cmd = 1;
//required int64 cmd = 1; // Could we OR the Cmds together? //required int64 cmd = 1; // Could we OR the Cmds together?
repeated rsctrl.base.Person peers = 2; repeated rsctrl.core.Person peers = 2;
} }
// RESPONSE: ResponseModifyPeer // RESPONSE: ResponseModifyPeer
message ResponseModifyPeer { message ResponseModifyPeer {
required rsctrl.base.Status status = 1; required rsctrl.core.Status status = 1;
repeated rsctrl.base.Person peers = 2; repeated rsctrl.core.Person peers = 2;
} }
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////

View File

@ -1,6 +1,6 @@
package rsctrl.gxs; package rsctrl.gxs;
import "base.proto"; import "core.proto";
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////
// Base Messages for GXS Interface. // Base Messages for GXS Interface.
@ -179,7 +179,7 @@ message RequestGroupInfo {
// RESPONSE: ResponseGroupList // RESPONSE: ResponseGroupList
message ResponseGroupList { message ResponseGroupList {
required rsctrl.base.Status status = 1; required rsctrl.core.Status status = 1;
required Service service = 2; required Service service = 2;
repeated string group_ids = 3; repeated string group_ids = 3;
@ -189,7 +189,7 @@ message ResponseGroupList {
// RESPONSE: ResponseGroupMeta // RESPONSE: ResponseGroupMeta
message ResponseGroupMeta { message ResponseGroupMeta {
required rsctrl.base.Status status = 1; required rsctrl.core.Status status = 1;
required Service service = 2; required Service service = 2;
repeated GroupMeta meta = 3; repeated GroupMeta meta = 3;
@ -199,7 +199,7 @@ message ResponseGroupMeta {
// RESPONSE: ResponseGroupData // RESPONSE: ResponseGroupData
message ResponseGroupData { message ResponseGroupData {
required rsctrl.base.Status status = 1; required rsctrl.core.Status status = 1;
required Service service = 2; required Service service = 2;
repeated GroupGenericData data = 3; repeated GroupGenericData data = 3;
@ -231,7 +231,7 @@ message RequestMsgRelatedInfo {
// RESPONSE: ResponseMsgList // RESPONSE: ResponseMsgList
message ResponseMsgList { message ResponseMsgList {
required rsctrl.base.Status status = 1; required rsctrl.core.Status status = 1;
required Service service = 2; required Service service = 2;
repeated GroupMsgSet msgs = 3; repeated GroupMsgSet msgs = 3;
@ -240,7 +240,7 @@ message ResponseMsgList {
// RESPONSE: ResponseMsgMeta // RESPONSE: ResponseMsgMeta
message ResponseMsgMeta { message ResponseMsgMeta {
required rsctrl.base.Status status = 1; required rsctrl.core.Status status = 1;
required Service service = 2; required Service service = 2;
repeated MsgMeta meta = 3; repeated MsgMeta meta = 3;
@ -249,7 +249,7 @@ message ResponseMsgMeta {
// RESPONSE: ResponseMsgData // RESPONSE: ResponseMsgData
message ResponseMsgData { message ResponseMsgData {
required rsctrl.base.Status status = 1; required rsctrl.core.Status status = 1;
required Service service = 2; required Service service = 2;
repeated MsgGenericData data = 3; repeated MsgGenericData data = 3;
@ -259,3 +259,29 @@ message ResponseMsgData {
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////
// REQUEST: RequestCreateGroup
message RequestCreateGroup {
required Service service = 1;
repeated GroupGenericData data = 2;
}
// RESPONSE: ResponseMsgMeta
// As defined above.
// REQUEST: RequestCreateMsg
message RequestCreateMsg {
required Service service = 1;
repeated MsgGenericData data = 2;
}
// RESPONSE: ResponseMsgMeta
// As defined above.

View File

@ -1,6 +1,6 @@
package rsctrl.msgs; package rsctrl.msgs;
import "base.proto"; import "core.proto";
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////
// Access, and Control your Friends / Peers and related Settings. // Access, and Control your Friends / Peers and related Settings.
@ -50,8 +50,8 @@ message RequestPeers {
// RESPONSE: ResponsePeerList // RESPONSE: ResponsePeerList
message ResponsePeerList { message ResponsePeerList {
required rsctrl.base.Status status = 1; required rsctrl.core.Status status = 1;
repeated rsctrl.base.Person peers = 2; repeated rsctrl.core.Person peers = 2;
} }
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////
@ -74,8 +74,8 @@ message RequestAddPeer {
// RESPONSE: ResponseAddPeer // RESPONSE: ResponseAddPeer
message ResponseAddPeer { message ResponseAddPeer {
required rsctrl.base.Status status = 1; required rsctrl.core.Status status = 1;
repeated rsctrl.base.Person peers = 2; repeated rsctrl.core.Person peers = 2;
} }
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////
@ -95,13 +95,13 @@ message RequestModifyPeer {
required ModCmd cmd = 1; required ModCmd cmd = 1;
//required int64 cmd = 1; // Could we OR the Cmds together? //required int64 cmd = 1; // Could we OR the Cmds together?
repeated rsctrl.base.Person peers = 2; repeated rsctrl.core.Person peers = 2;
} }
// RESPONSE: ResponseModifyPeer // RESPONSE: ResponseModifyPeer
message ResponseModifyPeer { message ResponseModifyPeer {
required rsctrl.base.Status status = 1; required rsctrl.core.Status status = 1;
repeated rsctrl.base.Person peers = 2; repeated rsctrl.core.Person peers = 2;
} }
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////

View File

@ -1,6 +1,6 @@
package rsctrl.peers; package rsctrl.peers;
import "base.proto"; import "core.proto";
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////
// Access, and Control your Friends / Peers and related Settings. // Access, and Control your Friends / Peers and related Settings.
@ -50,8 +50,8 @@ message RequestPeers {
// RESPONSE: ResponsePeerList // RESPONSE: ResponsePeerList
message ResponsePeerList { message ResponsePeerList {
required rsctrl.base.Status status = 1; required rsctrl.core.Status status = 1;
repeated rsctrl.base.Person peers = 2; repeated rsctrl.core.Person peers = 2;
} }
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////
@ -74,8 +74,8 @@ message RequestAddPeer {
// RESPONSE: ResponseAddPeer // RESPONSE: ResponseAddPeer
message ResponseAddPeer { message ResponseAddPeer {
required rsctrl.base.Status status = 1; required rsctrl.core.Status status = 1;
repeated rsctrl.base.Person peers = 2; repeated rsctrl.core.Person peers = 2;
} }
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////
@ -95,13 +95,13 @@ message RequestModifyPeer {
required ModCmd cmd = 1; required ModCmd cmd = 1;
//required int64 cmd = 1; // Could we OR the Cmds together? //required int64 cmd = 1; // Could we OR the Cmds together?
repeated rsctrl.base.Person peers = 2; repeated rsctrl.core.Person peers = 2;
} }
// RESPONSE: ResponseModifyPeer // RESPONSE: ResponseModifyPeer
message ResponseModifyPeer { message ResponseModifyPeer {
required rsctrl.base.Status status = 1; required rsctrl.core.Status status = 1;
repeated rsctrl.base.Person peers = 2; repeated rsctrl.core.Person peers = 2;
} }
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////

View File

@ -1,6 +1,6 @@
package rsctrl.peers; package rsctrl.peers;
import "base.proto"; import "core.proto";
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////
// Configuration and Stats. // Configuration and Stats.
@ -39,7 +39,7 @@ message ResponseSystemStatus {
} }
// Status of response. // Status of response.
required rsctrl.base.Status status = 1; required rsctrl.core.Status status = 1;
// Peers. // Peers.
required uint32 peer_count = 2; required uint32 peer_count = 2;
@ -47,7 +47,8 @@ message ResponseSystemStatus {
// Basic Network Information. // Basic Network Information.
required NetCode net_status = 4; required NetCode net_status = 4;
required rsctrl.base.Bandwidth bw_total = 5;
required rsctrl.core.Bandwidth bw_total = 5;
} }
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////