From be592a92bdabeb2a44b6ea136d45dd8b7a8a761d Mon Sep 17 00:00:00 2001 From: John Beisley Date: Fri, 10 Jun 2022 07:24:33 +0100 Subject: [PATCH] Rename some fields in TOML DCP manifest. --- v2alpha/cmd/goupnp2srvgen/main.go | 12 ++++++------ v2alpha/srv/srvmanifests.toml | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/v2alpha/cmd/goupnp2srvgen/main.go b/v2alpha/cmd/goupnp2srvgen/main.go index fdd9c78..08aefe9 100644 --- a/v2alpha/cmd/goupnp2srvgen/main.go +++ b/v2alpha/cmd/goupnp2srvgen/main.go @@ -153,25 +153,25 @@ func processService( } type DCPSpecManifests struct { - DCPS []*DCPSpecManifest + DCPS []*DCPSpecManifest `toml:"dcp"` } type DCPSpecManifest struct { // Path is the file path within upnpresources.zip to the DCP spec ZIP file. - Path string + Path string `toml:"path"` // Services maps from a service name (e.g. "FooBar:1") to a path within the DCP spec ZIP file // (e.g. "xml data files/service/FooBar1.xml"). - Services []*ServiceManifest + Services []*ServiceManifest `toml:"service"` } type ServiceManifest struct { // Package is the Go package name to generate e.g. "foo1". - Package string + Package string `toml:"package"` // ServiceType is the SOAP namespace and service type that identifes the service e.g. // "urn:schemas-upnp-org:service:Foo:1" - ServiceType string + ServiceType string `toml:"type"` // Path within the DCP spec ZIP file e.g. "xml data files/service/Foo1.xml". - Path string + Path string `toml:"path"` } type tmplArgs struct { diff --git a/v2alpha/srv/srvmanifests.toml b/v2alpha/srv/srvmanifests.toml index dbc8e5b..6280b24 100644 --- a/v2alpha/srv/srvmanifests.toml +++ b/v2alpha/srv/srvmanifests.toml @@ -1,10 +1,10 @@ -[[DCPS]] -Path = "standardizeddcps/Internet Gateway_2/UPnP-gw-IGD-TestFiles-20101210.zip" -[[DCPS.Services]] -Package = "lanhostconfigmanagement1" -ServiceType = "urn:schemas-upnp-org:service:LANHostConfigManagement:1" -Path = "xml data files/service/LANHostConfigManagement1.xml" -[[DCPS.Services]] -Package = "wanpppconnection1" -ServiceType = "urn:schemas-upnp-org:service:WANPPPConnection:1" -Path = "xml data files/service/WANPPPConnection1.xml" +[[dcp]] +path = "standardizeddcps/Internet Gateway_2/UPnP-gw-IGD-TestFiles-20101210.zip" +[[dcp.service]] +package = "lanhostconfigmanagement1" +type = "urn:schemas-upnp-org:service:LANHostConfigManagement:1" +path = "xml data files/service/LANHostConfigManagement1.xml" +[[dcp.service]] +package = "wanpppconnection1" +type = "urn:schemas-upnp-org:service:WANPPPConnection:1" +path = "xml data files/service/WANPPPConnection1.xml"