Files
2025-10-06 18:27:50 +02:00

57 lines
1.2 KiB
Protocol Buffer

syntax = "proto3";
package settings;
// WiFi mode enumeration
enum WifiMode {
WIFI_MODE_UNSPECIFIED = 0;
WIFI_MODE_STATION = 1;
WIFI_MODE_AP = 2;
WIFI_MODE_AP_STATION = 3;
}
// Log level enumeration
enum LogLevel {
LOG_LEVEL_DEBUG = 0;
LOG_LEVEL_INFO = 1;
LOG_LEVEL_WARN = 2;
LOG_LEVEL_ERROR = 3;
}
// Settings data structure
message SettingsData {
string sync_server_url = 1;
string device_api_key = 2;
uint32 sync_interval_seconds = 3;
bool auto_sync = 4;
WifiMode wifi_mode = 5;
string station_ssid = 6;
string station_password = 7;
string ap_ssid = 8;
string ap_password = 9;
uint32 ap_channel = 10;
bool enable_fallback_ap = 11;
int64 updated_at = 12; // Unix timestamp in milliseconds
uint32 version = 13; // Settings version for change tracking
LogLevel log_level = 14;
}
// Request to get current settings
message GetSettingsRequest {
}
// Response with current settings
message GetSettingsResponse {
SettingsData settings = 1;
}
// Request to update settings
message UpdateSettingsRequest {
SettingsData settings = 1;
}
// Response to settings update
message UpdateSettingsResponse {
bool success = 1;
optional string error = 2;
}