mirror of
				https://github.com/RetroShare/RetroShare.git
				synced 2025-10-31 14:49:14 -04:00 
			
		
		
		
	* Updated message definitions.
- only base & peers are vaguely complete, the others are work in progress. - gxs is a crazy idea: to expose the generic gxs interface, so anyone can write an external GXS service. * Added Makefile to generate python and c++ code. git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5462 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
		
							parent
							
								
									b67f66faa0
								
							
						
					
					
						commit
						5a1115e6e4
					
				
					 7 changed files with 645 additions and 17 deletions
				
			
		
							
								
								
									
										30
									
								
								rsctrl/src/Makefile
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								rsctrl/src/Makefile
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,30 @@ | |||
| 
 | ||||
| EXEC = protoc | ||||
| #PROTO = base.proto  files.proto  gxs.proto  msgs.proto  peers.proto  system.proto
 | ||||
| PROTO = base.proto peers.proto | ||||
| 
 | ||||
| PROTOPATH = ./definition | ||||
| CDESTPATH = ./gencc | ||||
| #CDESTPATH = ../../retroshare-nogui/src/rpc/proto/gencc
 | ||||
| PYDESTPATH = ./genpy | ||||
| 
 | ||||
| CLIST = $(PROTO:%.proto=%.cc) | ||||
| CCODE = $(patsubst %.proto,$(CDESTPATH)/%.pb.cc, $(PROTO)) | ||||
| HCODE = $(patsubst %.proto,$(CDESTPATH)/%.pb.h, $(PROTO)) | ||||
| PYCODE = $(patsubst %.proto,$(PYDESTPATH)/%_pb2.py, $(PROTO)) | ||||
| 
 | ||||
| 
 | ||||
| all: allc | ||||
| 	echo $(CCODE) | ||||
| 	echo $(PYCODE) | ||||
| 
 | ||||
| allc: $(CCODE) $(PYCODE) | ||||
| 
 | ||||
| $(CDESTPATH)/%.pb.cc : $(PROTOPATH)/%.proto | ||||
| 	$(EXEC) --proto_path=$(PROTOPATH) --cpp_out=$(CDESTPATH) $< | ||||
| 
 | ||||
| $(PYDESTPATH)/%_pb2.py : $(PROTOPATH)/%.proto | ||||
| 	$(EXEC) --proto_path=$(PROTOPATH) --python_out=$(PYDESTPATH) $< | ||||
| 
 | ||||
| clean: | ||||
| 	-/bin/rm $(CCODE) $(HCODE) $(PYCODE) | ||||
|  | @ -1,4 +1,4 @@ | |||
| package rsctrl.base: | ||||
| package rsctrl.base; | ||||
| 
 | ||||
| /////////////////////////////////////////////////////////////// | ||||
| // These are basic Messages, which are used as building blocks | ||||
|  | @ -6,6 +6,22 @@ package rsctrl.base: | |||
| // They should not be sent RAW, but should be wrapped in another msg. | ||||
| /////////////////////////////////////////////////////////////// | ||||
| 
 | ||||
| /////////////////////////////////////////////////////////////// | ||||
| // Expected PackageIds. | ||||
| 
 | ||||
| enum ExtensionId { BASE = 0; } | ||||
| 
 | ||||
| enum PackageId {  | ||||
|   PEERS = 1;  | ||||
|   SYSTEM = 2; | ||||
|   FILES = 3; | ||||
|   MSGS = 4; | ||||
| 
 | ||||
|   // THEORETICAL ONES. | ||||
|   GXS = 1000;  | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| /////////////////////////////////////////////////////////////// | ||||
| // Basic Status Response, should be in all responses | ||||
| 
 | ||||
|  | @ -59,3 +75,45 @@ message Dir { | |||
|   repeated File files = 4; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| /////////////////////////////////////////////////////////////// | ||||
| // System Status | ||||
| 
 | ||||
| message SystemStatus { | ||||
|   enum NetCode { | ||||
|     BAD_UNKNOWN  	= 0; | ||||
|     BAD_OFFLINE  	= 1; | ||||
|     BAD_NATSYM 		= 2; | ||||
|     BAD_NODHT_NAT  	= 3; | ||||
|     WARNING_RESTART  	= 4; | ||||
|     WARNING_NATTED  	= 5; | ||||
|     WARNING_NODHT  	= 6; | ||||
|     GOOD  	 	= 7; | ||||
|     ADV_FORWARD  	= 8; | ||||
|   } | ||||
| 
 | ||||
|   required NetCode net_status = 1; | ||||
|   optional string msg = 2; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| /////////////////////////////////////////////////////////////// | ||||
| // Bandwidth Measurements. | ||||
| 
 | ||||
| message Bandwidth { | ||||
|   required float up = 1;   // kB/s | ||||
|   required float down = 2; // kB/s | ||||
|   optional string name = 3; // e.g. DHT, UDP, TCP, Stun, or Total. | ||||
| } | ||||
| 
 | ||||
| message BandwidthSet { | ||||
|   repeated Bandwidth bandwidths = 1; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| /////////////////////////////////////////////////////////////// | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										113
									
								
								rsctrl/src/definition/files.proto
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										113
									
								
								rsctrl/src/definition/files.proto
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,113 @@ | |||
| package rsctrl.files; | ||||
| 
 | ||||
| import "base.proto"; | ||||
| 
 | ||||
| /////////////////////////////////////////////////////////////// | ||||
| // Mirror most of rsFiles functionality. | ||||
| // | ||||
| // Share Directories. | ||||
| // Searches | ||||
| // List Transfers. | ||||
| // Control Transfers. | ||||
| /////////////////////////////////////////////////////////////// | ||||
| 
 | ||||
| enum RequestMsgIds { | ||||
|     MsgId_RequestPeers = 1; | ||||
|     MsgId_RequestAddPeer = 2; | ||||
|     MsgId_RequestModifyPeer = 3; | ||||
| } | ||||
| 
 | ||||
| enum ResponseMsgIds { | ||||
|     MsgId_ResponsePeerList = 1; | ||||
|     MsgId_ResponseAddPeer = 2; | ||||
|     MsgId_ResponseModifyPeer = 3; | ||||
| } | ||||
| 
 | ||||
| /////////////////////////////////////////////////////////////// | ||||
| 
 | ||||
| // REQUEST: RequestPeers | ||||
| message RequestPeers { | ||||
| 
 | ||||
|   // About Who? | ||||
|   enum SetOption { | ||||
|     OWNID   = 1; | ||||
|     LISTED  = 2;  | ||||
|     ONLINE  = 3;  | ||||
|     FRIENDS = 4; | ||||
|     VALID   = 5; 	 | ||||
|     SIGNED  = 6; 	 | ||||
|     ALL     = 7; 	 | ||||
|   } | ||||
| 
 | ||||
|   // What do you want? | ||||
|   enum InfoOption { | ||||
|     NAMEONLY = 1; | ||||
|     BASIC    = 2; | ||||
|     LOCATION = 3; | ||||
|     ALLINFO  = 4; | ||||
|   } | ||||
| 
 | ||||
|   required SetOption set = 1; | ||||
|   required InfoOption info = 2; | ||||
|   repeated string gpg_ids = 3; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| // RESPONSE: ResponsePeerList | ||||
| message ResponsePeerList { | ||||
|   required rsctrl.base.Status status = 1; | ||||
|   repeated rsctrl.base.Person peers = 2; | ||||
| } | ||||
| 
 | ||||
| /////////////////////////////////////////////////////////////// | ||||
| 
 | ||||
| // REQUEST: RequestAddPeer | ||||
| message RequestAddPeer { | ||||
| 
 | ||||
|   enum AddCmd { | ||||
|     NOOP = 0; 		// No op. | ||||
|     ADD = 1; 		// Add existing from gpg_id. | ||||
|     REMOVE = 2; 	// Remove existing from gpg_id. | ||||
|     IMPORT = 3; 	// Import from cert, with gpg_id. | ||||
|     EXAMINE = 4; 	// Examine cert, but no action. | ||||
|   } | ||||
| 
 | ||||
|   required string gpg_id = 1; | ||||
|   required AddCmd cmd = 2; | ||||
|   optional string cert = 3; | ||||
| } | ||||
| 
 | ||||
| // RESPONSE: ResponseAddPeer | ||||
| message ResponseAddPeer { | ||||
|   required rsctrl.base.Status status = 1; | ||||
|   repeated rsctrl.base.Person peers = 2; | ||||
| } | ||||
| 
 | ||||
| /////////////////////////////////////////////////////////////// | ||||
| 
 | ||||
| // REQUEST: RequestModifyPeer | ||||
| message RequestModifyPeer { | ||||
| 
 | ||||
|   enum ModCmd { | ||||
|     NOOP    		= 0; 	 | ||||
|     ADDRESS 		= 1; | ||||
|     DYNDNS  		= 2; | ||||
|     //SOMETHING_ELSE  	= 0x0000010;  | ||||
|     //SOMETHING_ELSE  	= 0x0000020;  | ||||
|     //SOMETHING_ELSE  	= 0x0000040;  | ||||
|     //SOMETHING_ELSE  	= 0x0000080;  | ||||
|   } | ||||
| 
 | ||||
|   required ModCmd cmd = 1;  | ||||
|   //required int64 cmd = 1; // Could we OR the Cmds together? | ||||
|   repeated rsctrl.base.Person peers = 2; | ||||
| } | ||||
| 
 | ||||
| // RESPONSE: ResponseModifyPeer | ||||
| message ResponseModifyPeer { | ||||
|   required rsctrl.base.Status status = 1; | ||||
|   repeated rsctrl.base.Person peers = 2; | ||||
| } | ||||
| 
 | ||||
| /////////////////////////////////////////////////////////////// | ||||
| 
 | ||||
							
								
								
									
										261
									
								
								rsctrl/src/definition/gxs.proto
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										261
									
								
								rsctrl/src/definition/gxs.proto
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,261 @@ | |||
| package rsctrl.gxs; | ||||
| 
 | ||||
| import "base.proto"; | ||||
| 
 | ||||
| /////////////////////////////////////////////////////////////// | ||||
| // Base Messages for GXS Interface. | ||||
| /////////////////////////////////////////////////////////////// | ||||
| 
 | ||||
| enum RequestMsgIds { | ||||
|     MsgId_RequestPeers = 1; | ||||
|     MsgId_RequestAddPeer = 2; | ||||
|     MsgId_RequestModifyPeer = 3; | ||||
| } | ||||
| 
 | ||||
| enum ResponseMsgIds { | ||||
|     MsgId_ResponsePeerList = 1; | ||||
|     MsgId_ResponseAddPeer = 2; | ||||
|     MsgId_ResponseModifyPeer = 3; | ||||
| } | ||||
| 
 | ||||
| /////////////////////////////////////////////////////////////// | ||||
| /////////////////////////////////////////////////////////////// | ||||
| 
 | ||||
| // BASE DATA TYPES | ||||
| 
 | ||||
| message Service { | ||||
|   // | ||||
|   required uint32 service_id = 1; | ||||
|   optional string service_name = 2; | ||||
| } | ||||
| 
 | ||||
| message GroupMeta { | ||||
| 
 | ||||
|   // FLAGS as ENUMs. | ||||
|   enum GroupFlags { | ||||
|     GF_FLAG1  = 1; | ||||
|     GF_FLAG2  = 2; | ||||
|     GF_FLAG3  = 4; | ||||
|     GF_FLAG4  = 8; | ||||
|   } | ||||
| 
 | ||||
|   enum SignFlags { | ||||
|     SF_FLAG1  = 1; | ||||
|     SF_FLAG2  = 2; | ||||
|   } | ||||
| 
 | ||||
|   enum SubscribeFlags { | ||||
|     SUBF_FLAG1  = 1; | ||||
|     SUBF_FLAG2  = 2; | ||||
|   } | ||||
| 
 | ||||
|   enum StatusFlags { | ||||
|     STATF_FLAG1  = 1; | ||||
|     STATF_FLAG2  = 2; | ||||
|   } | ||||
| 
 | ||||
|   // THIS IS FIXED: From NETWORK. | ||||
|   required string group_id		= 1; | ||||
|   required string group_name		= 2; | ||||
|   required uint32 group_flags		= 3; | ||||
|   required uint32 sign_flags		= 4; | ||||
| 
 | ||||
|   required uint32 publish_ts		= 5; | ||||
|   optional string author_id 		= 6; | ||||
| 
 | ||||
|   // BELOW HERE IS LOCAL DATA, THAT IS NOT FROM MSG. | ||||
| 
 | ||||
|   required uint32 subscribe_flags 	= 7; | ||||
|   required uint32 group_status 		= 8; | ||||
| 
 | ||||
|   optional string service_string 	= 9; | ||||
| 
 | ||||
|   optional uint32 pop 			= 10; // USED? | ||||
|   optional uint32 msg_count 		= 11; // ??? | ||||
|   optional int32  last_post		= 12; // ??? | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| message GroupGenericData { | ||||
|   required GroupMeta meta 	= 1; | ||||
|   required string  encoded_data = 2; | ||||
| } | ||||
|    | ||||
| 
 | ||||
| message MsgMeta { | ||||
| 
 | ||||
|   // FLAGS as ENUMs. | ||||
|   enum GroupFlags { | ||||
|     GF_FLAG1  = 1; | ||||
|     GF_FLAG2  = 2; | ||||
|     GF_FLAG3  = 4; | ||||
|     GF_FLAG4  = 8; | ||||
|   } | ||||
| 
 | ||||
|   enum SignFlags { | ||||
|     SF_FLAG1  = 1; | ||||
|     SF_FLAG2  = 2; | ||||
|   } | ||||
| 
 | ||||
|   enum SubscribeFlags { | ||||
|     SUBF_FLAG1  = 1; | ||||
|     SUBF_FLAG2  = 2; | ||||
|   } | ||||
| 
 | ||||
|   enum StatusFlags { | ||||
|     STATF_FLAG1  = 1; | ||||
|     STATF_FLAG2  = 2; | ||||
|   } | ||||
| 
 | ||||
|   // THIS IS FIXED: From NETWORK. | ||||
|   required string group_id		= 1; | ||||
|   required string msg_id		= 2; | ||||
| 
 | ||||
|   required string thread_id		= 3; | ||||
|   required uint32 parent_id		= 4; | ||||
|   required uint32 origmsg_id		= 5; | ||||
| 
 | ||||
|   optional string author_id 		= 6; | ||||
| 
 | ||||
|   required uint32 publish_ts		= 7; | ||||
|   required uint32 msg_name		= 8; | ||||
| 
 | ||||
|   required uint32 msg_flags		= 9; | ||||
| 
 | ||||
|   // BELOW HERE IS LOCAL DATA, THAT IS NOT FROM MSG. | ||||
| 
 | ||||
|   required uint32 msg_status 		= 10; | ||||
|   required uint32 child_ts	 	= 11; | ||||
|   optional string service_string 	= 12; | ||||
| } | ||||
| 
 | ||||
| message MsgGenericData { | ||||
|   required MsgMeta meta 	= 1; | ||||
|   required string  encoded_data = 2; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| /////////////////////////////////////////////////////////////// | ||||
| /////////////////////////////////////////////////////////////// | ||||
| 
 | ||||
| message Filter { | ||||
|   required uint32 options 		= 1; | ||||
| 
 | ||||
|   optional uint32 status_filter		= 2; | ||||
|   optional uint32 status_mask 		= 3; | ||||
| 
 | ||||
|   optional uint32 req_type 		= 4; | ||||
| 
 | ||||
|   optional uint32 subscribe_filter	= 5; | ||||
| 
 | ||||
|   optional int32  before		= 6; | ||||
|   optional int32  after			= 7; | ||||
| } | ||||
| 
 | ||||
| message MsgSet { | ||||
|   required string group_id		= 1; | ||||
|   repeated string msg_id		= 2; | ||||
| } | ||||
| 
 | ||||
| message GroupMsgSet { | ||||
|   repeated MsgSet groups		= 1; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| /////////////////////////////////////////////////////////////// | ||||
| /////////////////////////////////////////////////////////////// | ||||
| 
 | ||||
| // REQUEST: RequestGroupInfo | ||||
| message RequestGroupInfo { | ||||
| 
 | ||||
|   required Service service 		= 1; | ||||
|    | ||||
|   required uint32 ans_type 		= 2; | ||||
|   required Filter options		= 3; | ||||
|   repeated string group_ids 		= 4; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| // RESPONSE: ResponseGroupList | ||||
| message ResponseGroupList { | ||||
| 
 | ||||
|   required rsctrl.base.Status status 	= 1; | ||||
| 
 | ||||
|   required Service service 		= 2; | ||||
|   repeated string group_ids		= 3; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| // RESPONSE: ResponseGroupMeta | ||||
| message ResponseGroupMeta { | ||||
| 
 | ||||
|   required rsctrl.base.Status status 	= 1; | ||||
| 
 | ||||
|   required Service service 		= 2; | ||||
|   repeated GroupMeta meta		= 3; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| // RESPONSE: ResponseGroupData | ||||
| message ResponseGroupData { | ||||
| 
 | ||||
|   required rsctrl.base.Status status 	= 1; | ||||
| 
 | ||||
|   required Service service 		= 2; | ||||
|   repeated GroupGenericData data	= 3; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| /////////////////////////////////////////////////////////////// | ||||
| 
 | ||||
| // REQUEST: RequestMsgInfo | ||||
| message RequestMsgInfo { | ||||
| 
 | ||||
|   required Service service 		= 1; | ||||
|    | ||||
|   required uint32 ans_type 		= 2; | ||||
|   required Filter options		= 3; | ||||
|   repeated GroupMsgSet msgs		= 4; | ||||
| } | ||||
| 
 | ||||
| // REQUEST: RequestMsgRelatedInfo | ||||
| message RequestMsgRelatedInfo { | ||||
| 
 | ||||
|   required Service service 		= 1; | ||||
|    | ||||
|   required uint32 ans_type 		= 2; | ||||
|   required Filter options		= 3; | ||||
|   repeated GroupMsgSet msgs		= 4; | ||||
| } | ||||
| 
 | ||||
| // RESPONSE: ResponseMsgList | ||||
| message ResponseMsgList { | ||||
| 
 | ||||
|   required rsctrl.base.Status status 	= 1; | ||||
| 
 | ||||
|   required Service service 		= 2; | ||||
|   repeated GroupMsgSet msgs		= 3; | ||||
| } | ||||
| 
 | ||||
| // RESPONSE: ResponseMsgMeta | ||||
| message ResponseMsgMeta { | ||||
| 
 | ||||
|   required rsctrl.base.Status status 	= 1; | ||||
| 
 | ||||
|   required Service service 		= 2; | ||||
|   repeated MsgMeta meta			= 3; | ||||
| } | ||||
| 
 | ||||
| // RESPONSE: ResponseMsgData | ||||
| message ResponseMsgData { | ||||
| 
 | ||||
|   required rsctrl.base.Status status 	= 1; | ||||
| 
 | ||||
|   required Service service 		= 2; | ||||
|   repeated MsgGenericData data		= 3; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| /////////////////////////////////////////////////////////////// | ||||
| /////////////////////////////////////////////////////////////// | ||||
| 
 | ||||
							
								
								
									
										108
									
								
								rsctrl/src/definition/msgs.proto
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										108
									
								
								rsctrl/src/definition/msgs.proto
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,108 @@ | |||
| package rsctrl.msgs; | ||||
| 
 | ||||
| import "base.proto"; | ||||
| 
 | ||||
| /////////////////////////////////////////////////////////////// | ||||
| // Access, and Control your Friends / Peers and related Settings. | ||||
| /////////////////////////////////////////////////////////////// | ||||
| 
 | ||||
| enum RequestMsgIds { | ||||
|     MsgId_RequestPeers = 1; | ||||
|     MsgId_RequestAddPeer = 2; | ||||
|     MsgId_RequestModifyPeer = 3; | ||||
| } | ||||
| 
 | ||||
| enum ResponseMsgIds { | ||||
|     MsgId_ResponsePeerList = 1; | ||||
|     MsgId_ResponseAddPeer = 2; | ||||
|     MsgId_ResponseModifyPeer = 3; | ||||
| } | ||||
| 
 | ||||
| /////////////////////////////////////////////////////////////// | ||||
| 
 | ||||
| // REQUEST: RequestPeers | ||||
| message RequestPeers { | ||||
| 
 | ||||
|   // About Who? | ||||
|   enum SetOption { | ||||
|     OWNID   = 1; | ||||
|     LISTED  = 2;  | ||||
|     ONLINE  = 3;  | ||||
|     FRIENDS = 4; | ||||
|     VALID   = 5; 	 | ||||
|     SIGNED  = 6; 	 | ||||
|     ALL     = 7; 	 | ||||
|   } | ||||
| 
 | ||||
|   // What do you want? | ||||
|   enum InfoOption { | ||||
|     NAMEONLY = 1; | ||||
|     BASIC    = 2; | ||||
|     LOCATION = 3; | ||||
|     ALLINFO  = 4; | ||||
|   } | ||||
| 
 | ||||
|   required SetOption set = 1; | ||||
|   required InfoOption info = 2; | ||||
|   repeated string gpg_ids = 3; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| // RESPONSE: ResponsePeerList | ||||
| message ResponsePeerList { | ||||
|   required rsctrl.base.Status status = 1; | ||||
|   repeated rsctrl.base.Person peers = 2; | ||||
| } | ||||
| 
 | ||||
| /////////////////////////////////////////////////////////////// | ||||
| 
 | ||||
| // REQUEST: RequestAddPeer | ||||
| message RequestAddPeer { | ||||
| 
 | ||||
|   enum AddCmd { | ||||
|     NOOP = 0; 		// No op. | ||||
|     ADD = 1; 		// Add existing from gpg_id. | ||||
|     REMOVE = 2; 	// Remove existing from gpg_id. | ||||
|     IMPORT = 3; 	// Import from cert, with gpg_id. | ||||
|     EXAMINE = 4; 	// Examine cert, but no action. | ||||
|   } | ||||
| 
 | ||||
|   required string gpg_id = 1; | ||||
|   required AddCmd cmd = 2; | ||||
|   optional string cert = 3; | ||||
| } | ||||
| 
 | ||||
| // RESPONSE: ResponseAddPeer | ||||
| message ResponseAddPeer { | ||||
|   required rsctrl.base.Status status = 1; | ||||
|   repeated rsctrl.base.Person peers = 2; | ||||
| } | ||||
| 
 | ||||
| /////////////////////////////////////////////////////////////// | ||||
| 
 | ||||
| // REQUEST: RequestModifyPeer | ||||
| message RequestModifyPeer { | ||||
| 
 | ||||
|   enum ModCmd { | ||||
|     NOOP    		= 0; 	 | ||||
|     ADDRESS 		= 1; | ||||
|     DYNDNS  		= 2; | ||||
|     //SOMETHING_ELSE  	= 0x0000010;  | ||||
|     //SOMETHING_ELSE  	= 0x0000020;  | ||||
|     //SOMETHING_ELSE  	= 0x0000040;  | ||||
|     //SOMETHING_ELSE  	= 0x0000080;  | ||||
|   } | ||||
| 
 | ||||
|   required ModCmd cmd = 1;  | ||||
|   //required int64 cmd = 1; // Could we OR the Cmds together? | ||||
|   repeated rsctrl.base.Person peers = 2; | ||||
| } | ||||
| 
 | ||||
| // RESPONSE: ResponseModifyPeer | ||||
| message ResponseModifyPeer { | ||||
|   required rsctrl.base.Status status = 1; | ||||
|   repeated rsctrl.base.Person peers = 2; | ||||
| } | ||||
| 
 | ||||
| /////////////////////////////////////////////////////////////// | ||||
| 
 | ||||
|  | @ -1,21 +1,21 @@ | |||
| package rsctrl.peers: | ||||
| package rsctrl.peers; | ||||
| 
 | ||||
| import "base.proto"; | ||||
| 
 | ||||
| /////////////////////////////////////////////////////////////// | ||||
| // Access, and Control your Friends / Peers and related Settings. | ||||
| /////////////////////////////////////////////////////////////// | ||||
| 
 | ||||
| enum ExtensionId { BASE = 0; } | ||||
| enum PackageId { PEERS = 1; } | ||||
| 
 | ||||
| enum RequestMsgIds { | ||||
|     RequestPeers = 1; | ||||
|     RequestAddPeer = 2; | ||||
|     RequestModifyPeer = 2; | ||||
|     MsgId_RequestPeers = 1; | ||||
|     MsgId_RequestAddPeer = 2; | ||||
|     MsgId_RequestModifyPeer = 3; | ||||
| } | ||||
| 
 | ||||
| enum ResponseMsgIds { | ||||
|     ResponsePeerList = 1; | ||||
|     ResponseAddPeer = 2; | ||||
|     ResponseModifyPeer = 2; | ||||
|     MsgId_ResponsePeerList = 1; | ||||
|     MsgId_ResponseAddPeer = 2; | ||||
|     MsgId_ResponseModifyPeer = 3; | ||||
| } | ||||
| 
 | ||||
| /////////////////////////////////////////////////////////////// | ||||
|  | @ -25,11 +25,13 @@ message RequestPeers { | |||
| 
 | ||||
|   // About Who? | ||||
|   enum SetOption { | ||||
|     LISTED  = 1;  | ||||
|     ONLINE  = 2;  | ||||
|     FRIENDS = 3; | ||||
|     VALID   = 4; 	 | ||||
|     ALL     = 5; 	 | ||||
|     OWNID   = 1; | ||||
|     LISTED  = 2;  | ||||
|     ONLINE  = 3;  | ||||
|     FRIENDS = 4; | ||||
|     VALID   = 5; 	 | ||||
|     SIGNED  = 6; 	 | ||||
|     ALL     = 7; 	 | ||||
|   } | ||||
| 
 | ||||
|   // What do you want? | ||||
|  | @ -37,7 +39,7 @@ message RequestPeers { | |||
|     NAMEONLY = 1; | ||||
|     BASIC    = 2; | ||||
|     LOCATION = 3; | ||||
|     ALL      = 4; | ||||
|     ALLINFO  = 4; | ||||
|   } | ||||
| 
 | ||||
|   required SetOption set = 1; | ||||
|  |  | |||
							
								
								
									
										56
									
								
								rsctrl/src/definition/system.proto
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								rsctrl/src/definition/system.proto
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,56 @@ | |||
| package rsctrl.peers; | ||||
| 
 | ||||
| import "base.proto"; | ||||
| 
 | ||||
| /////////////////////////////////////////////////////////////// | ||||
| // Configuration and Stats. | ||||
| /////////////////////////////////////////////////////////////// | ||||
| 
 | ||||
| enum RequestMsgIds { | ||||
|     MsgId_RequestSystemStatus = 1; | ||||
|     //MsgId_RequestNetConfig = 2; | ||||
| } | ||||
| 
 | ||||
| enum ResponseMsgIds { | ||||
|     MsgId_ResponseSystemStatus = 1; | ||||
|     //MsgId_ResponseNetConfig = 2; | ||||
| } | ||||
| 
 | ||||
| /////////////////////////////////////////////////////////////// | ||||
| 
 | ||||
| // REQUEST: RequestSystemStatus | ||||
| message RequestSystemStatus { | ||||
|   // Nothing here? | ||||
| } | ||||
| 
 | ||||
| // RESPONSE: ResponseSystemStatus | ||||
| message ResponseSystemStatus { | ||||
| 
 | ||||
|   enum NetCode { | ||||
|     BAD_UNKNOWN         = 0; | ||||
|     BAD_OFFLINE         = 1; | ||||
|     BAD_NATSYM          = 2; | ||||
|     BAD_NODHT_NAT       = 3; | ||||
|     WARNING_RESTART     = 4; | ||||
|     WARNING_NATTED      = 5; | ||||
|     WARNING_NODHT       = 6; | ||||
|     GOOD                = 7; | ||||
|     ADV_FORWARD         = 8; | ||||
|   } | ||||
| 
 | ||||
|   // Status of response. | ||||
|   required rsctrl.base.Status status = 1; | ||||
| 
 | ||||
|   // Peers. | ||||
|   required uint32 peer_count = 2; | ||||
|   required uint32 online_count = 3; | ||||
| 
 | ||||
|   // Basic Network Information. | ||||
|   required NetCode net_status = 4; | ||||
|   required rsctrl.base.Bandwidth bw_total = 5; | ||||
| } | ||||
| 
 | ||||
| /////////////////////////////////////////////////////////////// | ||||
| /////////////////////////////////////////////////////////////// | ||||
| /////////////////////////////////////////////////////////////// | ||||
| 
 | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 drbob
						drbob