Updated mdns to use protobufs (completely untested)

This commit is contained in:
Niklas Jensen
2026-01-30 14:56:15 +01:00
committed by nikguin04
parent e1f44a6f06
commit 72e2522dcd
9 changed files with 221 additions and 219 deletions
+25
View File
@@ -23,3 +23,28 @@ api.WifiNetwork.ssid max_size:33
api.WifiNetwork.password max_size:65
api.WifiSettings.hostname max_size:33
api.WifiSettings.wifi_networks max_count:5
api.MDNSTxtRecord.key max_size:32
api.MDNSTxtRecord.value max_size:64
api.MDNSServiceDef.service max_size:16
api.MDNSServiceDef.protocol max_size:8
api.MDNSServiceDef.txt_records max_count:4
api.MDNSSettings.hostname max_size:33
api.MDNSSettings.instance max_size:64
api.MDNSSettings.services max_count:4
api.MDNSSettings.global_txt_records max_count:4
api.MDNSStatus.hostname max_size:33
api.MDNSStatus.instance max_size:64
api.MDNSStatus.services max_count:4
api.MDNSStatus.global_txt_records max_count:4
api.MDNSQueryRequest.service max_size:16
api.MDNSQueryRequest.protocol max_size:8
api.MDNSQueryResult.name max_size:64
api.MDNSQueryResult.ip max_size:46
api.MDNSQueryResponse.services max_count:16
+56
View File
@@ -125,6 +125,55 @@ message CameraSettings {
message CameraSettingsRequest {}
// =============================================================================
// mDNS Settings - shared data types
// =============================================================================
message MDNSTxtRecord {
string key = 1;
string value = 2;
}
message MDNSServiceDef {
string service = 1;
string protocol = 2;
uint32 port = 3;
repeated MDNSTxtRecord txt_records = 4;
}
message MDNSSettings {
string hostname = 1;
string instance = 2;
repeated MDNSServiceDef services = 3;
repeated MDNSTxtRecord global_txt_records = 4;
}
message MDNSStatus {
bool started = 1;
string hostname = 2;
string instance = 3;
repeated MDNSServiceDef services = 4;
repeated MDNSTxtRecord global_txt_records = 5;
}
message MDNSSettingsRequest {}
message MDNSStatusRequest {}
message MDNSQueryRequest {
string service = 1;
string protocol = 2;
}
message MDNSQueryResult {
string name = 1;
string ip = 2;
uint32 port = 3;
}
message MDNSQueryResponse {
repeated MDNSQueryResult services = 1;
}
// =============================================================================
// File System - shared data types
// =============================================================================
@@ -175,6 +224,10 @@ message Request {
WifiSettingsRequest wifi_settings_request = 41;
CameraSettings camera_settings = 50;
CameraSettingsRequest camera_settings_request = 51;
MDNSSettings mdns_settings = 60;
MDNSSettingsRequest mdns_settings_request = 61;
MDNSStatusRequest mdns_status_request = 62;
MDNSQueryRequest mdns_query_request = 63;
}
}
@@ -191,5 +244,8 @@ message Response {
FileList file_list = 30;
WifiSettings wifi_settings = 40;
CameraSettings camera_settings = 50;
MDNSSettings mdns_settings = 60;
MDNSStatus mdns_status = 61;
MDNSQueryResponse mdns_query_response = 62;
}
}