Commit Graph
100 Commits
Author SHA1 Message Date
John Beisley 23b5557105 Add documentation links to service docs. 2022-06-13 18:06:03 +01:00
John Beisley befb173f08 Rename package for LANHostConfigManagement:1. 2022-06-13 17:47:17 +01:00
John Beisley 6617fb84e1 Format generated source code. 2022-06-13 17:44:15 +01:00
John Beisley dd6d6a16d3 Merge branch 'main' of github.com:huin/goupnp 2022-06-13 07:31:14 +01:00
John Beisley 0ff7949387 Remove trailing newline from generated code. 2022-06-13 07:31:03 +01:00
John Beisley 9cff43d4b3 First two generated service code packages. 2022-06-13 07:30:53 +01:00
John Beisley d15a929f14 Code generation outputs to files. 2022-06-13 07:28:26 +01:00
John Beisley ba6ba2725f Fix go.mod. 2022-06-11 08:40:59 +01:00
John Beisley 16c9ddb4ff Fix broken envelope test. 2022-06-10 18:13:54 +01:00
John Beisley 656e810e54 Integrate soap.Action type with soap/client. 2022-06-10 17:54:04 +01:00
John Beisley be592a92bd Rename some fields in TOML DCP manifest. 2022-06-10 07:24:33 +01:00
John Beisley 9d4879e3c6 Move DCP spec manifests out to a TOML file. 2022-06-10 07:20:09 +01:00
John Beisley 3db7296aeb Generate documentation comments from service template. 2022-06-08 18:13:28 +01:00
John Beisley 91c176e495 Add action container structs with descriptor methods. 2022-06-08 17:53:24 +01:00
John Beisley 0536e2c588 Fix import quoting in service template. 2022-06-08 07:30:01 +01:00
John Beisley 9b16826229 Refactor service template. 2022-06-08 07:05:49 +01:00
John Beisley ef53d14055 Remove redundant blank lines in generated code. 2022-06-06 18:07:30 +01:00
John Beisley 5a32790ea4 Use manifest package name in generated code. 2022-06-06 18:03:17 +01:00
John Beisley 89dd64b3ce Remove debug generation code. 2022-06-06 18:01:18 +01:00
John Beisley e3e16da35f Initial code to generate service code. 2022-06-06 18:00:39 +01:00
John Beisley 0e8fff04df Rename goupnp2dcpgen to goupnpsrvgen. 2022-05-27 07:10:15 +01:00
John Beisley b2bea13720 Rename description packages to replace "scpd" with "srvdesc". 2022-05-27 07:00:09 +01:00
John Beisley 2145a9306f Add optional field to xmlscpd.Action. 2022-05-25 19:42:48 +01:00
John Beisley 60c40bba41 Fix minor error in goupnp2dcpgen. 2022-05-25 19:41:31 +01:00
John Beisley 4dd2213715 Some initial experimentation with SCPD reading. 2022-05-25 18:27:18 +01:00
John Beisley cc75a26e13 Test and fix edge cases in map args. 2022-03-31 19:54:33 +01:00
John Beisley f69c4d0ee2 First draft supporting maps as action args. 2022-03-31 18:09:53 +01:00
John Beisley 5d0813cf55 Rearrange Client.as a helper function.
This narrows the API surface of the `Client` type.
2022-03-29 07:36:18 +01:00
John Beisley ca91893cc0 Fix breakage from merge. 2022-03-26 18:27:03 +00:00
John Beisley 5c7f90426b Merge branch 'main' of github.com:huin/goupnp into main 2022-03-26 18:22:02 +00:00
John Beisley 767078168a Clean up SOAP client API. 2022-03-26 18:17:39 +00:00
John Beisley d4fdaef967 Fix how envelopes are marshalled and unmarshalled.
Previously the arguments would be wrapped an additional XML element.
2022-03-26 18:17:06 +00:00
John Beisley f8d565399b Ignore experiments under v2alpha/cmd. 2022-03-26 18:14:59 +00:00
John Beisley 87f0bd1614 Use envelope.NewAction in client_test. 2022-03-26 11:22:07 +00:00
John Beisley cd9f2cabb7 Add type assertion for client.HttpClient. 2022-03-26 11:19:07 +00:00
John Beisley 030c9c12ee Add omitted TestStructWrapped test for URIField. 2022-03-26 11:10:48 +00:00
John Beisley f9b2a90864 Add types TestStructWrapped. 2022-03-26 10:55:00 +00:00
John Beisley 22e29aa8ba Add envelope.NewAction. 2022-03-26 10:29:10 +00:00
John Beisley c43feb1f5a Add ErrFault error marker. 2022-03-26 08:33:56 +00:00
John Beisley 39b68767e6 Merge branch 'main' of github.com:huin/goupnp into main 2022-03-26 08:05:48 +00:00
John Beisley 25f9eb3415 Use any instead of interface{} in v2alpha. 2022-03-26 08:05:43 +00:00
John Beisley 8c07ff7bf4 fix: vscode workspace 2022-03-24 21:35:10 +00:00
John Beisley 69bbc8fbe6 Remove unused hack function. 2022-03-24 19:46:39 +00:00
John Beisley 5fc0a95ef3 chore: add go.work and v2alpha/go.mod. 2022-03-24 19:46:39 +00:00
John Beisley db322868c5 Add notes about v2alpha. 2022-03-24 19:46:39 +00:00
John Beisley 59a727e571 Rename v2 to v2alpha.
Any incremental development on this should be clearly labeled as
unstable.
2022-03-24 19:46:39 +00:00
John Beisley 0a37edf714 Add a basic SOAP client. 2022-03-24 19:46:39 +00:00
John Beisley 06ea566a85 Replace test panic with t.Fatal. 2022-03-24 19:46:39 +00:00
John Beisley f40df26801 v2/soap/envelope - tidy and improve tests. 2022-03-24 19:46:39 +00:00
John Beisley a16ad1252e First draft of v2/soap/envelope package. 2022-03-24 19:46:39 +00:00
John Beisley 8223a6b37c FIx zero padding on years. 2022-03-24 19:46:39 +00:00
John Beisley 32bfaa2f8e Fix max range on Fixed14_4.SetParts. 2022-03-24 19:46:39 +00:00
John Beisley e5fcf16e62 Implement error-free marshalText methods. 2022-03-24 19:46:39 +00:00
John Beisley d5f9ab1f20 SOAP types now implement more standard interfaces.
Specifically TextMarshaler and TextUnmarshaller. These adapt better to
use in xml/encoding.
2022-03-24 19:46:39 +00:00
John Beisley 104873f511 Move wanFirewallURNFix definition out to package. 2022-03-24 19:46:39 +00:00
John Beisley ec3f59b630 Factor code template into a file.
This allows code regeneration without rebuilding the generator binary.
2022-03-24 19:46:39 +00:00
John Beisley bbdad2bb54 Remove separate module for v2. 2022-03-24 19:46:39 +00:00
John Beisley 58b047e43b Complete move to naive date/time types.
These types no longer assume the local timezone as a default, instead
accepting a time.Location when converting to a time.Time.
2022-03-24 19:46:39 +00:00
John Beisley 002eac2274 Refactor Date type for reuse in other types' Unmarshal. 2022-03-24 19:46:39 +00:00
John Beisley 62cb85ae6a Remove DateLocal.
Fix tests to check Date type.
2022-03-24 19:46:39 +00:00
John Beisley 01b23aa7e6 Replace Fixed14_4Float with a integer version.
This type avoids loss of precision, and is likely what was
intended by having 14.4 fixed point.

Conversions to/from float64 are provided.
2022-03-24 19:46:39 +00:00
John Beisley 688314d831 Create v2/soap/types, refactored from v1. 2022-03-24 19:46:39 +00:00
John Beisley 29c1eac5a2 Add top level folder to workspace. 2022-03-24 19:46:39 +00:00
John Beisley ab6e83ae0a Create v2 module as subdirectory. 2022-03-24 19:46:39 +00:00
John Beisley 7ef673455a v2/soap/envelope - tidy and improve tests. 2022-03-24 19:46:39 +00:00
John Beisley 577aa76695 First draft of v2/soap/envelope package. 2022-03-24 19:46:39 +00:00
John Beisley fcd69d183b FIx zero padding on years. 2022-03-24 19:46:39 +00:00
John Beisley cc93611581 Fix max range on Fixed14_4.SetParts. 2022-03-24 19:46:39 +00:00
John Beisley e043d6666b Implement error-free marshalText methods. 2022-03-24 19:46:39 +00:00
John Beisley 6183f45568 SOAP types now implement more standard interfaces.
Specifically TextMarshaler and TextUnmarshaller. These adapt better to
use in xml/encoding.
2022-03-24 19:46:39 +00:00
John Beisley f320faf4bc Consolidate V1 SOAP type data into the SOAP package. 2022-03-24 19:46:39 +00:00
John Beisley a37fadc3ba Factor code template into a file.
This allows code regeneration without rebuilding the generator binary.
2022-03-24 19:46:39 +00:00
John Beisley 0668181616 Remove separate module for v2. 2022-03-24 19:46:39 +00:00
John Beisley 0f6ea5004c Complete move to naive date/time types.
These types no longer assume the local timezone as a default, instead
accepting a time.Location when converting to a time.Time.
2022-03-24 19:46:39 +00:00
John Beisley 500ae47278 Refactor Date type for reuse in other types' Unmarshal. 2022-03-24 19:46:39 +00:00
John Beisley 7913f413b8 Remove DateLocal.
Fix tests to check Date type.
2022-03-24 19:46:39 +00:00
John Beisley 2186162cd7 Replace Fixed14_4Float with a integer version.
This type avoids loss of precision, and is likely what was
intended by having 14.4 fixed point.

Conversions to/from float64 are provided.
2022-03-24 19:46:39 +00:00
John Beisley 47e825446b Create v2/soap/types, refactored from v1. 2022-03-24 19:46:39 +00:00
John Beisley 0926402f8c Create v2 module as subdirectory. 2022-03-24 19:46:39 +00:00
John Beisley ca81a64b42 Reorder items in generated source files.
Ideally they would always have been sorted as such, but this seems more
critical in migrating from one service definition to another where the ordering might
change.
2022-03-13 09:02:29 +00:00
John Beisley 5a0d4bd7ee Add *Ctx methods for calling SOAP methods.
Fixes #42.
2021-07-11 14:53:32 +01:00
John Beisley 9eb592fa19 Minor fixes to goupnpdcpgen.
Most importantly fix to run on Windows.
2021-07-11 14:44:55 +01:00
John Beisley 6145404ab1 Add method SOAPCliet.PerformActionCtx. 2021-07-11 14:15:35 +01:00
John Beisley a666909a2f Fix trivial go vet problems. 2021-07-04 10:59:33 +01:00
John Beisley 33cdcbb30d Fix #41 - collisions with same USN as multiple locations. 2021-06-26 17:01:14 +01:00
John Beisley e7fc2c5b62 Fix inconsistent indents in GUIDE.md examples. 2021-02-21 12:36:27 +00:00
John Beisley 86667cb88e Add a guide for using internet gateway clients.
This attempts to help with #36.
2021-02-21 12:34:13 +00:00
John Beisley 36abb0b21b Discover devices on all the host's capable network interfaces. 2020-05-16 11:59:03 +01:00
John Beisley 0c863b7f0d Add a command to display all SSDP discoveries on local network. 2020-05-16 11:58:37 +01:00
John Beisley 271feae8ac Fix minor bug in how errors are displayed in codegen. 2020-05-10 09:48:28 +01:00
John Beisley 3a3eb33b84 Bump go.mod to 1.14. 2020-05-10 09:48:02 +01:00
John Beisley 656e61dfad Switch to generate code with go generate. 2018-10-13 15:04:17 +01:00
John Beisley 8bf4a8083e Add Go module files. 2018-10-13 13:40:44 +01:00
John Beisley c178604dd5 Add Sublime Text project file. 2018-10-13 13:37:27 +01:00
John Beisley e25a5cc217 Fix formatting of an error message. 2018-03-04 21:56:41 +00:00
John Beisley 71cfb6bbcb Add correct spelling for RequestSCPD, mentioned in issue #23. 2018-03-04 21:55:55 +00:00
John Beisley 991e174e2e Add workaround for SOAP server XML decoding limitations. 2017-11-07 18:19:10 -05:00
John Beisley 29fc54a4c0 Remove spurious spaces from between req/resp struct members in generated code. 2017-11-05 13:50:25 +00:00
John Beisley 8087be8632 Use better way to remove trailing whitespace between lines. 2017-11-05 13:46:14 +00:00
John Beisley efdc90f04d Emphasize generated nature of code more. 2017-11-05 13:40:23 +00:00