NetworkManager.proto 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. syntax = "proto3";account
  2. import "gRPC_Model/general.proto";
  3. option go_package = "./gRPC_Model";
  4. message NetworkManagerDeviceStatus{
  5. string Device = 1;
  6. string Type = 2;
  7. string State = 3;
  8. string IP4Connectivity = 4;
  9. string IP6Connectivity = 5;
  10. string Connection = 6;
  11. string ConUUID = 7;
  12. }
  13. message NetworkManagerDeviceStatusList{
  14. repeated NetworkManagerDeviceStatus Value= 1;
  15. }
  16. message Ethernet{
  17. optional string MacAddress = 1;
  18. optional string Id = 2;
  19. string Ipv4Addresses = 3;
  20. optional string Ipv4Method = 4;
  21. repeated string DNS = 5;
  22. string Gateway = 6;
  23. }
  24. message Hotspot{
  25. string IfName = 1;
  26. string SSID = 2;
  27. string Password =3;
  28. }
  29. message DeviceInterfaceName{
  30. string Value = 1;
  31. }
  32. service NetworkManager{
  33. // 所有设备的状态信息
  34. rpc DeviceStatus(Empty)returns(NetworkManagerDeviceStatusList);
  35. // 以太网相关
  36. rpc EthernetSetStaticIP(Ethernet) returns (Empty);
  37. rpc EthernetInfo(DeviceInterfaceName) returns (Ethernet);
  38. // Wifi 相关
  39. rpc CreateHotspot(Hotspot)returns(Empty);
  40. rpc ChangeHotspot(Hotspot)returns(Empty);
  41. rpc OpenHotspot(Empty)returns(Empty);
  42. rpc HotspotInfo(Empty)returns(Hotspot);
  43. }