cohn.proto 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /* cohn.proto/Open GoPro, Version 2.0 (C) Copyright 2021 GoPro, Inc. (http://gopro.com/OpenGoPro). */
  2. /* This copyright was auto-generated on Mon Nov 4 18:00:55 UTC 2024 */
  3. /***********************************************************************************************************************
  4. *
  5. * This file is automatically generated!!! Do not modify manually.
  6. *
  7. **********************************************************************************************************************/
  8. /**
  9. * Defines the structure of protobuf messages for Camera On the Home Network
  10. */
  11. syntax = "proto2";
  12. package open_gopro;
  13. import "response_generic.proto";
  14. enum EnumCOHNStatus {
  15. COHN_UNPROVISIONED = 0;
  16. COHN_PROVISIONED = 1;
  17. }
  18. enum EnumCOHNNetworkState {
  19. COHN_STATE_Init = 0;
  20. COHN_STATE_Error = 1;
  21. COHN_STATE_Exit = 2;
  22. COHN_STATE_Idle = 5;
  23. COHN_STATE_NetworkConnected = 27;
  24. COHN_STATE_NetworkDisconnected = 28;
  25. COHN_STATE_ConnectingToNetwork = 29;
  26. COHN_STATE_Invalid = 30;
  27. }
  28. /**
  29. * Get the current COHN status.
  30. *
  31. * Response: @ref NotifyCOHNStatus
  32. *
  33. * Additionally, asynchronous updates can also be registered to return more @ref NotifyCOHNStatus when a value
  34. * changes.
  35. */
  36. message RequestGetCOHNStatus {
  37. optional bool register_cohn_status = 1; // 1 to register, 0 to unregister
  38. }
  39. /*
  40. * Current COHN status triggered by a @ref RequestGetCOHNStatus
  41. */
  42. message NotifyCOHNStatus {
  43. optional EnumCOHNStatus status = 1; // Current COHN status
  44. optional EnumCOHNNetworkState state = 2; // Current COHN network state
  45. optional string username = 3; // Username used for http basic auth header
  46. optional string password = 4; // Password used for http basic auth header
  47. optional string ipaddress = 5; // Camera's IP address on the local network
  48. optional bool enabled = 6; // Is COHN currently enabled?
  49. optional string ssid = 7; // Currently connected SSID
  50. optional string macaddress = 8; // MAC address of the wifi adapter
  51. }
  52. /**
  53. * Create the Camera On the Home Network SSL/TLS certificate.
  54. *
  55. * Returns a @ref ResponseGeneric with the status of the creation
  56. */
  57. message RequestCreateCOHNCert {
  58. optional bool override = 1; // Override current provisioning and create new cert
  59. }
  60. /**
  61. * Clear the COHN certificate.
  62. *
  63. * Returns a @ref ResponseGeneric with the status of the clear
  64. */
  65. message RequestClearCOHNCert {}
  66. /**
  67. * Get the COHN certificate.
  68. *
  69. * Returns a @ref ResponseCOHNCert
  70. */
  71. message RequestCOHNCert {}
  72. /*
  73. * COHN Certificate response triggered by @ref RequestCOHNCert
  74. */
  75. message ResponseCOHNCert {
  76. optional EnumResultGeneric result = 1; // Was request successful?
  77. optional string cert = 2; // Root CA cert (ASCII text)
  78. }
  79. /**
  80. * Configure a COHN Setting
  81. *
  82. * Returns a @ref ResponseGeneric
  83. */
  84. message RequestSetCOHNSetting {
  85. /**
  86. * 1 to enable COHN, 0 to disable COHN
  87. *
  88. * When set to 1, STA Mode connection will be dropped and camera will not automatically re-connect for COHN.
  89. */
  90. optional bool cohn_active = 1;
  91. }