diff --git a/v2alpha/cmd/goupnp2srvgen/main.go b/v2alpha/cmd/goupnp2srvgen/main.go index 12d0750..ce69770 100644 --- a/v2alpha/cmd/goupnp2srvgen/main.go +++ b/v2alpha/cmd/goupnp2srvgen/main.go @@ -211,6 +211,9 @@ type ServiceManifest struct { ServiceType string `toml:"type"` // Path within the DCP spec ZIP file e.g. "xml data files/service/Foo1.xml". Path string `toml:"path"` + + // DocumentURL is the URL to the documentation for the service. + DocumentURL string `toml:"document_url"` } type tmplArgs struct { diff --git a/v2alpha/srv/inetgw2/lanhostcfgmgmt1/lanhostcfgmgmt1.go b/v2alpha/srv/inetgw2/lanhostcfgmgmt1/lanhostcfgmgmt1.go index a902ffc..94b61c4 100755 --- a/v2alpha/srv/inetgw2/lanhostcfgmgmt1/lanhostcfgmgmt1.go +++ b/v2alpha/srv/inetgw2/lanhostcfgmgmt1/lanhostcfgmgmt1.go @@ -1,4 +1,6 @@ // Package lanhostcfgmgmt1 provides types for the "urn:schemas-upnp-org:service:LANHostConfigManagement:1" service. +// +// Documented at https://openconnectivity.org/wp-content/uploads/2015/11/UPnP-gw-LANHostConfigManagement-v1-Service.pdf. package lanhostcfgmgmt1 import ( diff --git a/v2alpha/srv/inetgw2/wanpppconn1/wanpppconn1.go b/v2alpha/srv/inetgw2/wanpppconn1/wanpppconn1.go index beecb15..b134f3b 100644 --- a/v2alpha/srv/inetgw2/wanpppconn1/wanpppconn1.go +++ b/v2alpha/srv/inetgw2/wanpppconn1/wanpppconn1.go @@ -1,4 +1,6 @@ // Package wanpppconn1 provides types for the "urn:schemas-upnp-org:service:WANPPPConnection:1" service. +// +// Documented at https://openconnectivity.org/wp-content/uploads/2015/11/UPnP_IGD_WANPPPConnection-1.0.pdf. package wanpppconn1 import ( diff --git a/v2alpha/srv/srv.gotemplate b/v2alpha/srv/srv.gotemplate index 6c1fd37..73c307d 100644 --- a/v2alpha/srv/srv.gotemplate +++ b/v2alpha/srv/srv.gotemplate @@ -1,6 +1,10 @@ {{define "service"}} {{- $Imps := .Imps -}} // Package {{.Manifest.Package}} provides types for the {{quote .Manifest.ServiceType}} service. +{{- with .Manifest.DocumentURL}} +// +// Documented at {{.}}. +{{- end}} package {{.Manifest.Package}} import ( diff --git a/v2alpha/srv/srvmanifests.toml b/v2alpha/srv/srvmanifests.toml index e35f422..9ac16f4 100644 --- a/v2alpha/srv/srvmanifests.toml +++ b/v2alpha/srv/srvmanifests.toml @@ -1,11 +1,14 @@ [[dcp]] spec_zip_path = "standardizeddcps/Internet Gateway_2/UPnP-gw-IGD-TestFiles-20101210.zip" output_dir = "inetgw2" +# https://openconnectivity.org/wp-content/uploads/2015/11/UPnP-gw-InternetGatewayDevice-v2-Device-20100910.pdf [[dcp.service]] package = "lanhostcfgmgmt1" type = "urn:schemas-upnp-org:service:LANHostConfigManagement:1" path = "xml data files/service/LANHostConfigManagement1.xml" +document_url = "https://openconnectivity.org/wp-content/uploads/2015/11/UPnP-gw-LANHostConfigManagement-v1-Service.pdf" [[dcp.service]] package = "wanpppconn1" type = "urn:schemas-upnp-org:service:WANPPPConnection:1" path = "xml data files/service/WANPPPConnection1.xml" +document_url = "https://openconnectivity.org/wp-content/uploads/2015/11/UPnP_IGD_WANPPPConnection-1.0.pdf"