slidge-whatsapp 0.2.6__cp312-cp312-manylinux_2_36_aarch64.whl → 0.3.0b0__cp312-cp312-manylinux_2_36_aarch64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. slidge_whatsapp/contact.py +13 -3
  2. slidge_whatsapp/event.go +115 -39
  3. slidge_whatsapp/gateway.go +7 -63
  4. slidge_whatsapp/gateway.py +2 -3
  5. slidge_whatsapp/generated/_whatsapp.cpython-312-aarch64-linux-gnu.h +169 -152
  6. slidge_whatsapp/generated/_whatsapp.cpython-312-aarch64-linux-gnu.so +0 -0
  7. slidge_whatsapp/generated/build.py +134 -120
  8. slidge_whatsapp/generated/whatsapp.c +1511 -1239
  9. slidge_whatsapp/generated/whatsapp.go +1263 -1152
  10. slidge_whatsapp/generated/whatsapp.py +1171 -1046
  11. slidge_whatsapp/generated/whatsapp_go.h +169 -152
  12. slidge_whatsapp/go.mod +18 -15
  13. slidge_whatsapp/go.sum +38 -32
  14. slidge_whatsapp/group.py +34 -30
  15. slidge_whatsapp/media/media.go +6 -2
  16. slidge_whatsapp/session.go +33 -16
  17. slidge_whatsapp/session.py +46 -14
  18. slidge_whatsapp/vendor/github.com/beeper/argo-go/LICENSE +9 -0
  19. slidge_whatsapp/vendor/github.com/beeper/argo-go/block/blockreader.go +329 -0
  20. slidge_whatsapp/vendor/github.com/beeper/argo-go/block/blockwriter.go +417 -0
  21. slidge_whatsapp/vendor/github.com/beeper/argo-go/codec/decoder.go +652 -0
  22. slidge_whatsapp/vendor/github.com/beeper/argo-go/codec/encoder.go +985 -0
  23. slidge_whatsapp/vendor/github.com/beeper/argo-go/header/header.go +135 -0
  24. slidge_whatsapp/vendor/github.com/beeper/argo-go/internal/util/util.go +133 -0
  25. slidge_whatsapp/vendor/github.com/beeper/argo-go/label/label.go +384 -0
  26. slidge_whatsapp/vendor/github.com/beeper/argo-go/label/wiremarkers.go +37 -0
  27. slidge_whatsapp/vendor/github.com/beeper/argo-go/pkg/bitset/bitset.go +197 -0
  28. slidge_whatsapp/vendor/github.com/beeper/argo-go/pkg/buf/buf.go +420 -0
  29. slidge_whatsapp/vendor/github.com/beeper/argo-go/pkg/varint/varint.go +246 -0
  30. slidge_whatsapp/vendor/github.com/beeper/argo-go/wire/wire.go +614 -0
  31. slidge_whatsapp/vendor/github.com/beeper/argo-go/wirecodec/decode.go +341 -0
  32. slidge_whatsapp/vendor/github.com/elliotchance/orderedmap/v3/LICENSE +21 -0
  33. slidge_whatsapp/vendor/github.com/elliotchance/orderedmap/v3/list.go +95 -0
  34. slidge_whatsapp/vendor/github.com/elliotchance/orderedmap/v3/orderedmap.go +187 -0
  35. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/fitz.go +1 -0
  36. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/fitz_cgo.go +3 -0
  37. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/fitz_nocgo.go +4 -5
  38. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/purego_darwin.go +11 -1
  39. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/purego_linux.go +10 -0
  40. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/purego_windows.go +12 -0
  41. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/.gitignore +0 -2
  42. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/CHANGELOG.md +30 -0
  43. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/COPYRIGHT.txt +6 -1
  44. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/README.md +14 -17
  45. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/abi.go +1 -1
  46. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/abi2.go +7 -0
  47. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/LICENSE +21 -0
  48. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/darwin_amd64/libffi.8.dylib +0 -0
  49. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/darwin_arm64/libffi.8.dylib +0 -0
  50. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/windows_amd64/libffi-8.dll +0 -0
  51. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/cif.go +15 -0
  52. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/cif_arm64.go +16 -0
  53. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed.go +49 -0
  54. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed_darwin_amd64.go +10 -0
  55. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed_darwin_arm64.go +10 -0
  56. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed_windows_amd64.go +10 -0
  57. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/ffi.go +51 -13
  58. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/init.go +22 -9
  59. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/README.md +2 -0
  60. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.c +3096 -1651
  61. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.h +188 -128
  62. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3_opt_userauth.go +13 -140
  63. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3ext.h +4 -0
  64. slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.23.go +2 -2
  65. slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.25.go +37 -0
  66. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/LICENSE +19 -0
  67. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/argmap.go +37 -0
  68. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/collections.go +148 -0
  69. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/comment.go +31 -0
  70. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/decode.go +216 -0
  71. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/definition.go +110 -0
  72. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/directive.go +43 -0
  73. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/document.go +89 -0
  74. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/dumper.go +159 -0
  75. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/fragment.go +41 -0
  76. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/operation.go +32 -0
  77. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/path.go +72 -0
  78. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/selection.go +41 -0
  79. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/source.go +19 -0
  80. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/type.go +68 -0
  81. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/value.go +122 -0
  82. slidge_whatsapp/vendor/go.mau.fi/util/exhttp/handleerrors.go +60 -26
  83. slidge_whatsapp/vendor/go.mau.fi/util/exhttp/json.go +1 -6
  84. slidge_whatsapp/vendor/go.mau.fi/util/exhttp/networkerror.go +2 -1
  85. slidge_whatsapp/vendor/go.mau.fi/util/exstrings/stringutil.go +104 -0
  86. slidge_whatsapp/vendor/go.mau.fi/util/exsync/event.go +19 -3
  87. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/.pre-commit-config.yaml +3 -3
  88. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/decode.go +1 -1
  89. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/hash.go +1 -1
  90. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate.go +5 -1
  91. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/argo/argo-wire-type-store.argo +63 -0
  92. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/argo/argo.go +62 -0
  93. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/argo/name-to-queryids.json +306 -0
  94. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/armadillomessage.go +40 -7
  95. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/binary/encoder.go +1 -1
  96. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/call.go +2 -1
  97. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/client.go +79 -45
  98. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/connectionevents.go +13 -6
  99. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/download-to-file.go +19 -12
  100. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/download.go +26 -6
  101. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/errors.go +3 -0
  102. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/group.go +99 -27
  103. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/internals.go +54 -26
  104. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/keepalive.go +1 -0
  105. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/message.go +208 -57
  106. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/msgsecret.go +2 -14
  107. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/newsletter.go +83 -7
  108. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/notification.go +17 -8
  109. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/pair-code.go +2 -2
  110. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/presence.go +15 -6
  111. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/extra.go +7 -0
  112. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloAddMessage/InstamadilloAddMessage.pb.go +983 -0
  113. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloAddMessage/InstamadilloAddMessage.proto +85 -0
  114. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloAddMessage/extra.go +3 -0
  115. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeActionLog/InstamadilloCoreTypeActionLog.pb.go +197 -0
  116. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeActionLog/InstamadilloCoreTypeActionLog.proto +13 -0
  117. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeAdminMessage/InstamadilloCoreTypeAdminMessage.pb.go +279 -0
  118. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeAdminMessage/InstamadilloCoreTypeAdminMessage.proto +21 -0
  119. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeCollection/InstamadilloCoreTypeCollection.pb.go +137 -0
  120. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeCollection/InstamadilloCoreTypeCollection.proto +10 -0
  121. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeLink/InstamadilloCoreTypeLink.pb.go +313 -0
  122. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeLink/InstamadilloCoreTypeLink.proto +27 -0
  123. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeMedia/InstamadilloCoreTypeMedia.pb.go +1299 -0
  124. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeMedia/InstamadilloCoreTypeMedia.proto +112 -0
  125. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeText/InstamadilloCoreTypeText.pb.go +514 -0
  126. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeText/InstamadilloCoreTypeText.proto +47 -0
  127. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloDeleteMessage/InstamadilloDeleteMessage.pb.go +123 -0
  128. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloDeleteMessage/InstamadilloDeleteMessage.proto +7 -0
  129. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloDeleteMessage/extra.go +3 -0
  130. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloSupplementMessage/InstamadilloSupplementMessage.pb.go +720 -0
  131. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloSupplementMessage/InstamadilloSupplementMessage.proto +59 -0
  132. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloSupplementMessage/extra.go +3 -0
  133. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloTransportPayload/InstamadilloTransportPayload.pb.go +365 -0
  134. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloTransportPayload/InstamadilloTransportPayload.proto +33 -0
  135. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloXmaContentRef/InstamadilloXmaContentRef.pb.go +1238 -0
  136. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloXmaContentRef/InstamadilloXmaContentRef.proto +105 -0
  137. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloXMA/WAArmadilloXMA.pb.go +16 -4
  138. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloXMA/WAArmadilloXMA.proto +3 -0
  139. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waBotMetadata/WABotMetadata.pb.go +5156 -0
  140. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waBotMetadata/WABotMetadata.proto +516 -0
  141. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/WACompanionReg.pb.go +46 -10
  142. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/WACompanionReg.proto +4 -0
  143. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.pb.go +8975 -11209
  144. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.proto +193 -421
  145. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.pb.go +52 -23
  146. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.proto +3 -0
  147. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waLidMigrationSyncPayload/WAWebProtobufLidMigrationSyncPayload.pb.go +198 -0
  148. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waLidMigrationSyncPayload/WAWebProtobufLidMigrationSyncPayload.proto +14 -0
  149. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgTransport/extra.go +7 -6
  150. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.pb.go +952 -0
  151. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.proto +88 -0
  152. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.pb.go +1143 -463
  153. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.proto +60 -0
  154. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.pb.go +60 -38
  155. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.proto +3 -0
  156. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.pb.go +11 -3
  157. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.proto +2 -0
  158. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/receipt.go +20 -7
  159. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/reportingfields.json +1 -0
  160. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/reportingtoken.go +176 -0
  161. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/retry.go +10 -2
  162. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/send.go +38 -21
  163. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/sendfb.go +1 -0
  164. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/clientpayload.go +1 -1
  165. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/noop.go +3 -2
  166. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/container.go +9 -6
  167. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/store.go +25 -5
  168. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/00-latest-schema.sql +4 -2
  169. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/10-chat-db-lid-migration-ts.sql +2 -0
  170. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/store.go +5 -1
  171. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/call.go +1 -0
  172. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/events/events.go +13 -2
  173. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/jid.go +2 -1
  174. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/message.go +1 -0
  175. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/user.go +2 -0
  176. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/user.go +14 -8
  177. slidge_whatsapp/vendor/golang.org/x/crypto/curve25519/curve25519.go +1 -1
  178. slidge_whatsapp/vendor/golang.org/x/net/http2/config.go +44 -2
  179. slidge_whatsapp/vendor/golang.org/x/net/http2/frame.go +8 -8
  180. slidge_whatsapp/vendor/golang.org/x/net/http2/gotrack.go +14 -3
  181. slidge_whatsapp/vendor/golang.org/x/net/http2/http2.go +7 -29
  182. slidge_whatsapp/vendor/golang.org/x/net/http2/server.go +53 -71
  183. slidge_whatsapp/vendor/golang.org/x/net/http2/transport.go +20 -74
  184. slidge_whatsapp/vendor/golang.org/x/sys/unix/affinity_linux.go +1 -3
  185. slidge_whatsapp/vendor/golang.org/x/sys/unix/mkerrors.sh +3 -0
  186. slidge_whatsapp/vendor/golang.org/x/sys/unix/syscall_darwin.go +1 -55
  187. slidge_whatsapp/vendor/golang.org/x/sys/unix/syscall_solaris.go +1 -1
  188. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux.go +47 -16
  189. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +3 -0
  190. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +3 -0
  191. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go +3 -0
  192. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +3 -0
  193. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go +3 -0
  194. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go +3 -0
  195. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +3 -0
  196. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +3 -0
  197. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +3 -0
  198. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go +3 -0
  199. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +3 -0
  200. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +3 -0
  201. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go +3 -0
  202. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +3 -0
  203. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go +3 -0
  204. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go +4 -4
  205. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go +1 -0
  206. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go +1 -0
  207. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go +1 -0
  208. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go +1 -0
  209. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go +1 -0
  210. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go +1 -0
  211. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go +1 -0
  212. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go +1 -0
  213. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go +1 -0
  214. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go +1 -0
  215. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go +1 -0
  216. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go +1 -0
  217. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go +1 -0
  218. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go +1 -0
  219. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go +1 -0
  220. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux.go +168 -12
  221. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_386.go +17 -1
  222. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go +16 -0
  223. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go +18 -2
  224. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go +16 -0
  225. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go +16 -0
  226. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go +17 -1
  227. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go +16 -0
  228. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go +16 -0
  229. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go +17 -1
  230. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go +18 -2
  231. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go +16 -0
  232. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go +16 -0
  233. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go +16 -0
  234. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go +16 -0
  235. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go +16 -0
  236. slidge_whatsapp/vendor/golang.org/x/sys/windows/types_windows.go +6 -0
  237. slidge_whatsapp/vendor/golang.org/x/sys/windows/zsyscall_windows.go +483 -483
  238. slidge_whatsapp/vendor/google.golang.org/protobuf/encoding/protowire/wire.go +25 -1
  239. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb +0 -0
  240. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/filedesc/editions.go +10 -5
  241. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/filedesc/presence.go +33 -0
  242. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/genid/api_gen.go +6 -0
  243. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go +68 -22
  244. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/impl/codec_message_opaque.go +2 -1
  245. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/impl/message_opaque.go +8 -37
  246. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/impl/presence.go +0 -3
  247. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/version/version.go +1 -1
  248. slidge_whatsapp/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go +8 -0
  249. slidge_whatsapp/vendor/modules.txt +57 -23
  250. {slidge_whatsapp-0.2.6.dist-info → slidge_whatsapp-0.3.0b0.dist-info}/METADATA +2 -2
  251. {slidge_whatsapp-0.2.6.dist-info → slidge_whatsapp-0.3.0b0.dist-info}/RECORD +254 -174
  252. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/abi_amd64.go +0 -7
  253. slidge_whatsapp/vendor/golang.org/x/net/http2/config_go124.go +0 -61
  254. slidge_whatsapp/vendor/golang.org/x/net/http2/config_pre_go124.go +0 -16
  255. slidge_whatsapp/vendor/golang.org/x/net/http2/timer.go +0 -20
  256. {slidge_whatsapp-0.2.6.dist-info → slidge_whatsapp-0.3.0b0.dist-info}/LICENSE +0 -0
  257. {slidge_whatsapp-0.2.6.dist-info → slidge_whatsapp-0.3.0b0.dist-info}/WHEEL +0 -0
  258. {slidge_whatsapp-0.2.6.dist-info → slidge_whatsapp-0.3.0b0.dist-info}/entry_points.txt +0 -0
@@ -1013,86 +1013,6 @@ DefaultUserServer = "s.whatsapp.net"
1013
1013
 
1014
1014
  # ---- Structs ---
1015
1015
 
1016
- # Python type for struct whatsapp.Presence
1017
- class Presence(go.GoClass):
1018
- """Precence represents a contact's general state of activity, and is periodically updated as\ncontacts start or stop paying attention to their client of choice.\n"""
1019
- def __init__(self, *args, **kwargs):
1020
- """
1021
- handle=A Go-side object is always initialized with an explicit handle=arg
1022
- otherwise parameters can be unnamed in order of field names or named fields
1023
- in which case a new Go object is constructed first
1024
- """
1025
- if len(kwargs) == 1 and 'handle' in kwargs:
1026
- self.handle = kwargs['handle']
1027
- _whatsapp.IncRef(self.handle)
1028
- elif len(args) == 1 and isinstance(args[0], go.GoClass):
1029
- self.handle = args[0].handle
1030
- _whatsapp.IncRef(self.handle)
1031
- else:
1032
- self.handle = _whatsapp.whatsapp_Presence_CTor()
1033
- _whatsapp.IncRef(self.handle)
1034
- if 0 < len(args):
1035
- self.JID = args[0]
1036
- if "JID" in kwargs:
1037
- self.JID = kwargs["JID"]
1038
- if 1 < len(args):
1039
- self.Kind = args[1]
1040
- if "Kind" in kwargs:
1041
- self.Kind = kwargs["Kind"]
1042
- if 2 < len(args):
1043
- self.LastSeen = args[2]
1044
- if "LastSeen" in kwargs:
1045
- self.LastSeen = kwargs["LastSeen"]
1046
- def __del__(self):
1047
- _whatsapp.DecRef(self.handle)
1048
- def __str__(self):
1049
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1050
- sv = 'whatsapp.Presence{'
1051
- first = True
1052
- for v in pr:
1053
- if callable(v[1]):
1054
- continue
1055
- if first:
1056
- first = False
1057
- else:
1058
- sv += ', '
1059
- sv += v[0] + '=' + str(v[1])
1060
- return sv + '}'
1061
- def __repr__(self):
1062
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1063
- sv = 'whatsapp.Presence ( '
1064
- for v in pr:
1065
- if not callable(v[1]):
1066
- sv += v[0] + '=' + str(v[1]) + ', '
1067
- return sv + ')'
1068
- @property
1069
- def JID(self):
1070
- return _whatsapp.whatsapp_Presence_JID_Get(self.handle)
1071
- @JID.setter
1072
- def JID(self, value):
1073
- if isinstance(value, go.GoClass):
1074
- _whatsapp.whatsapp_Presence_JID_Set(self.handle, value.handle)
1075
- else:
1076
- _whatsapp.whatsapp_Presence_JID_Set(self.handle, value)
1077
- @property
1078
- def Kind(self):
1079
- return _whatsapp.whatsapp_Presence_Kind_Get(self.handle)
1080
- @Kind.setter
1081
- def Kind(self, value):
1082
- if isinstance(value, go.GoClass):
1083
- _whatsapp.whatsapp_Presence_Kind_Set(self.handle, value.handle)
1084
- else:
1085
- _whatsapp.whatsapp_Presence_Kind_Set(self.handle, value)
1086
- @property
1087
- def LastSeen(self):
1088
- return _whatsapp.whatsapp_Presence_LastSeen_Get(self.handle)
1089
- @LastSeen.setter
1090
- def LastSeen(self, value):
1091
- if isinstance(value, go.GoClass):
1092
- _whatsapp.whatsapp_Presence_LastSeen_Set(self.handle, value.handle)
1093
- else:
1094
- _whatsapp.whatsapp_Presence_LastSeen_Set(self.handle, value)
1095
-
1096
1016
  # Python type for struct whatsapp.ChatState
1097
1017
  class ChatState(go.GoClass):
1098
1018
  """A ChatState represents the activity of a contact within a certain discussion, for instance,\nwhether the contact is currently composing a message. This is separate to the concept of a\nPresence, which is the contact's general state across all discussions.\n"""
@@ -1173,9 +1093,9 @@ class ChatState(go.GoClass):
1173
1093
  else:
1174
1094
  _whatsapp.whatsapp_ChatState_GroupJID_Set(self.handle, value)
1175
1095
 
1176
- # Python type for struct whatsapp.Group
1177
- class Group(go.GoClass):
1178
- """A Group represents a named, many-to-many chat space which may be joined or left at will. All\nfields apart from the group JID are considered to be optional, and may not be set in cases where\ngroup information is being updated against previous assumed state. Groups in WhatsApp are\ngenerally invited to out-of-band with respect to overarching adaptor; see the documentation for\n[Session.GetGroups] for more information.\n"""
1096
+ # Python type for struct whatsapp.Connect
1097
+ class Connect(go.GoClass):
1098
+ """Connect represents event data related to a connection to WhatsApp being established, or failing\nto do so (based on the [Connect.Error] result).\n"""
1179
1099
  def __init__(self, *args, **kwargs):
1180
1100
  """
1181
1101
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1189,33 +1109,21 @@ class Group(go.GoClass):
1189
1109
  self.handle = args[0].handle
1190
1110
  _whatsapp.IncRef(self.handle)
1191
1111
  else:
1192
- self.handle = _whatsapp.whatsapp_Group_CTor()
1112
+ self.handle = _whatsapp.whatsapp_Connect_CTor()
1193
1113
  _whatsapp.IncRef(self.handle)
1194
1114
  if 0 < len(args):
1195
1115
  self.JID = args[0]
1196
1116
  if "JID" in kwargs:
1197
1117
  self.JID = kwargs["JID"]
1198
1118
  if 1 < len(args):
1199
- self.Name = args[1]
1200
- if "Name" in kwargs:
1201
- self.Name = kwargs["Name"]
1202
- if 2 < len(args):
1203
- self.Subject = args[2]
1204
- if "Subject" in kwargs:
1205
- self.Subject = kwargs["Subject"]
1206
- if 3 < len(args):
1207
- self.Nickname = args[3]
1208
- if "Nickname" in kwargs:
1209
- self.Nickname = kwargs["Nickname"]
1210
- if 4 < len(args):
1211
- self.Participants = args[4]
1212
- if "Participants" in kwargs:
1213
- self.Participants = kwargs["Participants"]
1119
+ self.Error = args[1]
1120
+ if "Error" in kwargs:
1121
+ self.Error = kwargs["Error"]
1214
1122
  def __del__(self):
1215
1123
  _whatsapp.DecRef(self.handle)
1216
1124
  def __str__(self):
1217
1125
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1218
- sv = 'whatsapp.Group{'
1126
+ sv = 'whatsapp.Connect{'
1219
1127
  first = True
1220
1128
  for v in pr:
1221
1129
  if callable(v[1]):
@@ -1228,60 +1136,33 @@ class Group(go.GoClass):
1228
1136
  return sv + '}'
1229
1137
  def __repr__(self):
1230
1138
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1231
- sv = 'whatsapp.Group ( '
1139
+ sv = 'whatsapp.Connect ( '
1232
1140
  for v in pr:
1233
1141
  if not callable(v[1]):
1234
1142
  sv += v[0] + '=' + str(v[1]) + ', '
1235
1143
  return sv + ')'
1236
1144
  @property
1237
1145
  def JID(self):
1238
- return _whatsapp.whatsapp_Group_JID_Get(self.handle)
1146
+ return _whatsapp.whatsapp_Connect_JID_Get(self.handle)
1239
1147
  @JID.setter
1240
1148
  def JID(self, value):
1241
1149
  if isinstance(value, go.GoClass):
1242
- _whatsapp.whatsapp_Group_JID_Set(self.handle, value.handle)
1243
- else:
1244
- _whatsapp.whatsapp_Group_JID_Set(self.handle, value)
1245
- @property
1246
- def Name(self):
1247
- return _whatsapp.whatsapp_Group_Name_Get(self.handle)
1248
- @Name.setter
1249
- def Name(self, value):
1250
- if isinstance(value, go.GoClass):
1251
- _whatsapp.whatsapp_Group_Name_Set(self.handle, value.handle)
1252
- else:
1253
- _whatsapp.whatsapp_Group_Name_Set(self.handle, value)
1254
- @property
1255
- def Subject(self):
1256
- return GroupSubject(handle=_whatsapp.whatsapp_Group_Subject_Get(self.handle))
1257
- @Subject.setter
1258
- def Subject(self, value):
1259
- if isinstance(value, go.GoClass):
1260
- _whatsapp.whatsapp_Group_Subject_Set(self.handle, value.handle)
1261
- else:
1262
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1263
- @property
1264
- def Nickname(self):
1265
- return _whatsapp.whatsapp_Group_Nickname_Get(self.handle)
1266
- @Nickname.setter
1267
- def Nickname(self, value):
1268
- if isinstance(value, go.GoClass):
1269
- _whatsapp.whatsapp_Group_Nickname_Set(self.handle, value.handle)
1150
+ _whatsapp.whatsapp_Connect_JID_Set(self.handle, value.handle)
1270
1151
  else:
1271
- _whatsapp.whatsapp_Group_Nickname_Set(self.handle, value)
1152
+ _whatsapp.whatsapp_Connect_JID_Set(self.handle, value)
1272
1153
  @property
1273
- def Participants(self):
1274
- return Slice_whatsapp_GroupParticipant(handle=_whatsapp.whatsapp_Group_Participants_Get(self.handle))
1275
- @Participants.setter
1276
- def Participants(self, value):
1154
+ def Error(self):
1155
+ return _whatsapp.whatsapp_Connect_Error_Get(self.handle)
1156
+ @Error.setter
1157
+ def Error(self, value):
1277
1158
  if isinstance(value, go.GoClass):
1278
- _whatsapp.whatsapp_Group_Participants_Set(self.handle, value.handle)
1159
+ _whatsapp.whatsapp_Connect_Error_Set(self.handle, value.handle)
1279
1160
  else:
1280
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1161
+ _whatsapp.whatsapp_Connect_Error_Set(self.handle, value)
1281
1162
 
1282
- # Python type for struct whatsapp.LinkedDevice
1283
- class LinkedDevice(go.GoClass):
1284
- """A LinkedDevice represents a unique pairing session between the gateway and WhatsApp. It is not\nunique to the underlying \"main\" device (or phone number), as multiple linked devices may be paired\nwith any main device.\n"""
1163
+ # Python type for struct whatsapp.EventPayload
1164
+ class EventPayload(go.GoClass):
1165
+ """EventPayload represents the collected payloads for all event types handled by the overarching\nsession adapter handler. Only specific fields will be populated in events emitted by internal\nhandlers, see documentation for specific types for more information.\n"""
1285
1166
  def __init__(self, *args, **kwargs):
1286
1167
  """
1287
1168
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1295,17 +1176,57 @@ class LinkedDevice(go.GoClass):
1295
1176
  self.handle = args[0].handle
1296
1177
  _whatsapp.IncRef(self.handle)
1297
1178
  else:
1298
- self.handle = _whatsapp.whatsapp_LinkedDevice_CTor()
1179
+ self.handle = _whatsapp.whatsapp_EventPayload_CTor()
1299
1180
  _whatsapp.IncRef(self.handle)
1300
1181
  if 0 < len(args):
1301
- self.ID = args[0]
1302
- if "ID" in kwargs:
1303
- self.ID = kwargs["ID"]
1182
+ self.QRCode = args[0]
1183
+ if "QRCode" in kwargs:
1184
+ self.QRCode = kwargs["QRCode"]
1185
+ if 1 < len(args):
1186
+ self.PairDeviceID = args[1]
1187
+ if "PairDeviceID" in kwargs:
1188
+ self.PairDeviceID = kwargs["PairDeviceID"]
1189
+ if 2 < len(args):
1190
+ self.Connect = args[2]
1191
+ if "Connect" in kwargs:
1192
+ self.Connect = kwargs["Connect"]
1193
+ if 3 < len(args):
1194
+ self.LoggedOut = args[3]
1195
+ if "LoggedOut" in kwargs:
1196
+ self.LoggedOut = kwargs["LoggedOut"]
1197
+ if 4 < len(args):
1198
+ self.Contact = args[4]
1199
+ if "Contact" in kwargs:
1200
+ self.Contact = kwargs["Contact"]
1201
+ if 5 < len(args):
1202
+ self.Presence = args[5]
1203
+ if "Presence" in kwargs:
1204
+ self.Presence = kwargs["Presence"]
1205
+ if 6 < len(args):
1206
+ self.Message = args[6]
1207
+ if "Message" in kwargs:
1208
+ self.Message = kwargs["Message"]
1209
+ if 7 < len(args):
1210
+ self.ChatState = args[7]
1211
+ if "ChatState" in kwargs:
1212
+ self.ChatState = kwargs["ChatState"]
1213
+ if 8 < len(args):
1214
+ self.Receipt = args[8]
1215
+ if "Receipt" in kwargs:
1216
+ self.Receipt = kwargs["Receipt"]
1217
+ if 9 < len(args):
1218
+ self.Group = args[9]
1219
+ if "Group" in kwargs:
1220
+ self.Group = kwargs["Group"]
1221
+ if 10 < len(args):
1222
+ self.Call = args[10]
1223
+ if "Call" in kwargs:
1224
+ self.Call = kwargs["Call"]
1304
1225
  def __del__(self):
1305
1226
  _whatsapp.DecRef(self.handle)
1306
1227
  def __str__(self):
1307
1228
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1308
- sv = 'whatsapp.LinkedDevice{'
1229
+ sv = 'whatsapp.EventPayload{'
1309
1230
  first = True
1310
1231
  for v in pr:
1311
1232
  if callable(v[1]):
@@ -1318,168 +1239,114 @@ class LinkedDevice(go.GoClass):
1318
1239
  return sv + '}'
1319
1240
  def __repr__(self):
1320
1241
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1321
- sv = 'whatsapp.LinkedDevice ( '
1242
+ sv = 'whatsapp.EventPayload ( '
1322
1243
  for v in pr:
1323
1244
  if not callable(v[1]):
1324
1245
  sv += v[0] + '=' + str(v[1]) + ', '
1325
1246
  return sv + ')'
1326
1247
  @property
1327
- def ID(self):
1328
- """ID is an opaque string identifying this LinkedDevice to the Session. Noted that this string
1329
- is currently equivalent to a password, and needs to be protected accordingly.
1330
- """
1331
- return _whatsapp.whatsapp_LinkedDevice_ID_Get(self.handle)
1332
- @ID.setter
1333
- def ID(self, value):
1248
+ def QRCode(self):
1249
+ return _whatsapp.whatsapp_EventPayload_QRCode_Get(self.handle)
1250
+ @QRCode.setter
1251
+ def QRCode(self, value):
1334
1252
  if isinstance(value, go.GoClass):
1335
- _whatsapp.whatsapp_LinkedDevice_ID_Set(self.handle, value.handle)
1253
+ _whatsapp.whatsapp_EventPayload_QRCode_Set(self.handle, value.handle)
1336
1254
  else:
1337
- _whatsapp.whatsapp_LinkedDevice_ID_Set(self.handle, value)
1338
- def JID(self):
1339
- """JID() object
1340
-
1341
- JID returns the WhatsApp JID corresponding to the LinkedDevice ID. Empty or invalid device IDs
1342
- may return invalid JIDs, and this function does not handle errors.
1343
- """
1344
- return go.types_JID(handle=_whatsapp.whatsapp_LinkedDevice_JID(self.handle))
1345
-
1346
- # Python type for struct whatsapp.Location
1347
- class Location(go.GoClass):
1348
- """A Location represents additional metadata given to location messages.\n"""
1349
- def __init__(self, *args, **kwargs):
1350
- """
1351
- handle=A Go-side object is always initialized with an explicit handle=arg
1352
- otherwise parameters can be unnamed in order of field names or named fields
1353
- in which case a new Go object is constructed first
1354
- """
1355
- if len(kwargs) == 1 and 'handle' in kwargs:
1356
- self.handle = kwargs['handle']
1357
- _whatsapp.IncRef(self.handle)
1358
- elif len(args) == 1 and isinstance(args[0], go.GoClass):
1359
- self.handle = args[0].handle
1360
- _whatsapp.IncRef(self.handle)
1255
+ _whatsapp.whatsapp_EventPayload_QRCode_Set(self.handle, value)
1256
+ @property
1257
+ def PairDeviceID(self):
1258
+ return _whatsapp.whatsapp_EventPayload_PairDeviceID_Get(self.handle)
1259
+ @PairDeviceID.setter
1260
+ def PairDeviceID(self, value):
1261
+ if isinstance(value, go.GoClass):
1262
+ _whatsapp.whatsapp_EventPayload_PairDeviceID_Set(self.handle, value.handle)
1361
1263
  else:
1362
- self.handle = _whatsapp.whatsapp_Location_CTor()
1363
- _whatsapp.IncRef(self.handle)
1364
- if 0 < len(args):
1365
- self.Latitude = args[0]
1366
- if "Latitude" in kwargs:
1367
- self.Latitude = kwargs["Latitude"]
1368
- if 1 < len(args):
1369
- self.Longitude = args[1]
1370
- if "Longitude" in kwargs:
1371
- self.Longitude = kwargs["Longitude"]
1372
- if 2 < len(args):
1373
- self.Accuracy = args[2]
1374
- if "Accuracy" in kwargs:
1375
- self.Accuracy = kwargs["Accuracy"]
1376
- if 3 < len(args):
1377
- self.IsLive = args[3]
1378
- if "IsLive" in kwargs:
1379
- self.IsLive = kwargs["IsLive"]
1380
- if 4 < len(args):
1381
- self.Name = args[4]
1382
- if "Name" in kwargs:
1383
- self.Name = kwargs["Name"]
1384
- if 5 < len(args):
1385
- self.Address = args[5]
1386
- if "Address" in kwargs:
1387
- self.Address = kwargs["Address"]
1388
- if 6 < len(args):
1389
- self.URL = args[6]
1390
- if "URL" in kwargs:
1391
- self.URL = kwargs["URL"]
1392
- def __del__(self):
1393
- _whatsapp.DecRef(self.handle)
1394
- def __str__(self):
1395
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1396
- sv = 'whatsapp.Location{'
1397
- first = True
1398
- for v in pr:
1399
- if callable(v[1]):
1400
- continue
1401
- if first:
1402
- first = False
1403
- else:
1404
- sv += ', '
1405
- sv += v[0] + '=' + str(v[1])
1406
- return sv + '}'
1407
- def __repr__(self):
1408
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1409
- sv = 'whatsapp.Location ( '
1410
- for v in pr:
1411
- if not callable(v[1]):
1412
- sv += v[0] + '=' + str(v[1]) + ', '
1413
- return sv + ')'
1264
+ _whatsapp.whatsapp_EventPayload_PairDeviceID_Set(self.handle, value)
1414
1265
  @property
1415
- def Latitude(self):
1416
- return _whatsapp.whatsapp_Location_Latitude_Get(self.handle)
1417
- @Latitude.setter
1418
- def Latitude(self, value):
1266
+ def Connect(self):
1267
+ return Connect(handle=_whatsapp.whatsapp_EventPayload_Connect_Get(self.handle))
1268
+ @Connect.setter
1269
+ def Connect(self, value):
1419
1270
  if isinstance(value, go.GoClass):
1420
- _whatsapp.whatsapp_Location_Latitude_Set(self.handle, value.handle)
1271
+ _whatsapp.whatsapp_EventPayload_Connect_Set(self.handle, value.handle)
1421
1272
  else:
1422
- _whatsapp.whatsapp_Location_Latitude_Set(self.handle, value)
1273
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1423
1274
  @property
1424
- def Longitude(self):
1425
- return _whatsapp.whatsapp_Location_Longitude_Get(self.handle)
1426
- @Longitude.setter
1427
- def Longitude(self, value):
1275
+ def LoggedOut(self):
1276
+ return LoggedOut(handle=_whatsapp.whatsapp_EventPayload_LoggedOut_Get(self.handle))
1277
+ @LoggedOut.setter
1278
+ def LoggedOut(self, value):
1428
1279
  if isinstance(value, go.GoClass):
1429
- _whatsapp.whatsapp_Location_Longitude_Set(self.handle, value.handle)
1280
+ _whatsapp.whatsapp_EventPayload_LoggedOut_Set(self.handle, value.handle)
1430
1281
  else:
1431
- _whatsapp.whatsapp_Location_Longitude_Set(self.handle, value)
1282
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1432
1283
  @property
1433
- def Accuracy(self):
1434
- return _whatsapp.whatsapp_Location_Accuracy_Get(self.handle)
1435
- @Accuracy.setter
1436
- def Accuracy(self, value):
1284
+ def Contact(self):
1285
+ return Contact(handle=_whatsapp.whatsapp_EventPayload_Contact_Get(self.handle))
1286
+ @Contact.setter
1287
+ def Contact(self, value):
1437
1288
  if isinstance(value, go.GoClass):
1438
- _whatsapp.whatsapp_Location_Accuracy_Set(self.handle, value.handle)
1289
+ _whatsapp.whatsapp_EventPayload_Contact_Set(self.handle, value.handle)
1439
1290
  else:
1440
- _whatsapp.whatsapp_Location_Accuracy_Set(self.handle, value)
1291
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1441
1292
  @property
1442
- def IsLive(self):
1443
- return _whatsapp.whatsapp_Location_IsLive_Get(self.handle)
1444
- @IsLive.setter
1445
- def IsLive(self, value):
1293
+ def Presence(self):
1294
+ return Presence(handle=_whatsapp.whatsapp_EventPayload_Presence_Get(self.handle))
1295
+ @Presence.setter
1296
+ def Presence(self, value):
1446
1297
  if isinstance(value, go.GoClass):
1447
- _whatsapp.whatsapp_Location_IsLive_Set(self.handle, value.handle)
1298
+ _whatsapp.whatsapp_EventPayload_Presence_Set(self.handle, value.handle)
1448
1299
  else:
1449
- _whatsapp.whatsapp_Location_IsLive_Set(self.handle, value)
1300
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1450
1301
  @property
1451
- def Name(self):
1452
- """Optional fields given for named locations.
1453
- """
1454
- return _whatsapp.whatsapp_Location_Name_Get(self.handle)
1455
- @Name.setter
1456
- def Name(self, value):
1302
+ def Message(self):
1303
+ return Message(handle=_whatsapp.whatsapp_EventPayload_Message_Get(self.handle))
1304
+ @Message.setter
1305
+ def Message(self, value):
1457
1306
  if isinstance(value, go.GoClass):
1458
- _whatsapp.whatsapp_Location_Name_Set(self.handle, value.handle)
1307
+ _whatsapp.whatsapp_EventPayload_Message_Set(self.handle, value.handle)
1459
1308
  else:
1460
- _whatsapp.whatsapp_Location_Name_Set(self.handle, value)
1309
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1461
1310
  @property
1462
- def Address(self):
1463
- return _whatsapp.whatsapp_Location_Address_Get(self.handle)
1464
- @Address.setter
1465
- def Address(self, value):
1311
+ def ChatState(self):
1312
+ return ChatState(handle=_whatsapp.whatsapp_EventPayload_ChatState_Get(self.handle))
1313
+ @ChatState.setter
1314
+ def ChatState(self, value):
1466
1315
  if isinstance(value, go.GoClass):
1467
- _whatsapp.whatsapp_Location_Address_Set(self.handle, value.handle)
1316
+ _whatsapp.whatsapp_EventPayload_ChatState_Set(self.handle, value.handle)
1468
1317
  else:
1469
- _whatsapp.whatsapp_Location_Address_Set(self.handle, value)
1318
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1470
1319
  @property
1471
- def URL(self):
1472
- return _whatsapp.whatsapp_Location_URL_Get(self.handle)
1473
- @URL.setter
1474
- def URL(self, value):
1320
+ def Receipt(self):
1321
+ return Receipt(handle=_whatsapp.whatsapp_EventPayload_Receipt_Get(self.handle))
1322
+ @Receipt.setter
1323
+ def Receipt(self, value):
1475
1324
  if isinstance(value, go.GoClass):
1476
- _whatsapp.whatsapp_Location_URL_Set(self.handle, value.handle)
1325
+ _whatsapp.whatsapp_EventPayload_Receipt_Set(self.handle, value.handle)
1477
1326
  else:
1478
- _whatsapp.whatsapp_Location_URL_Set(self.handle, value)
1327
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1328
+ @property
1329
+ def Group(self):
1330
+ return Group(handle=_whatsapp.whatsapp_EventPayload_Group_Get(self.handle))
1331
+ @Group.setter
1332
+ def Group(self, value):
1333
+ if isinstance(value, go.GoClass):
1334
+ _whatsapp.whatsapp_EventPayload_Group_Set(self.handle, value.handle)
1335
+ else:
1336
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1337
+ @property
1338
+ def Call(self):
1339
+ return Call(handle=_whatsapp.whatsapp_EventPayload_Call_Get(self.handle))
1340
+ @Call.setter
1341
+ def Call(self, value):
1342
+ if isinstance(value, go.GoClass):
1343
+ _whatsapp.whatsapp_EventPayload_Call_Set(self.handle, value.handle)
1344
+ else:
1345
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1479
1346
 
1480
- # Python type for struct whatsapp.Poll
1481
- class Poll(go.GoClass):
1482
- """A Poll represents a multiple-choice question, on which each choice might be voted for one or more\ntimes.\n"""
1347
+ # Python type for struct whatsapp.LoggedOut
1348
+ class LoggedOut(go.GoClass):
1349
+ """LoggedOut repreents event data related to an explicit or implicit log-out event.\n"""
1483
1350
  def __init__(self, *args, **kwargs):
1484
1351
  """
1485
1352
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1493,21 +1360,17 @@ class Poll(go.GoClass):
1493
1360
  self.handle = args[0].handle
1494
1361
  _whatsapp.IncRef(self.handle)
1495
1362
  else:
1496
- self.handle = _whatsapp.whatsapp_Poll_CTor()
1363
+ self.handle = _whatsapp.whatsapp_LoggedOut_CTor()
1497
1364
  _whatsapp.IncRef(self.handle)
1498
1365
  if 0 < len(args):
1499
- self.Title = args[0]
1500
- if "Title" in kwargs:
1501
- self.Title = kwargs["Title"]
1502
- if 1 < len(args):
1503
- self.Options = args[1]
1504
- if "Options" in kwargs:
1505
- self.Options = kwargs["Options"]
1366
+ self.Reason = args[0]
1367
+ if "Reason" in kwargs:
1368
+ self.Reason = kwargs["Reason"]
1506
1369
  def __del__(self):
1507
1370
  _whatsapp.DecRef(self.handle)
1508
1371
  def __str__(self):
1509
1372
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1510
- sv = 'whatsapp.Poll{'
1373
+ sv = 'whatsapp.LoggedOut{'
1511
1374
  first = True
1512
1375
  for v in pr:
1513
1376
  if callable(v[1]):
@@ -1520,33 +1383,24 @@ class Poll(go.GoClass):
1520
1383
  return sv + '}'
1521
1384
  def __repr__(self):
1522
1385
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1523
- sv = 'whatsapp.Poll ( '
1386
+ sv = 'whatsapp.LoggedOut ( '
1524
1387
  for v in pr:
1525
1388
  if not callable(v[1]):
1526
1389
  sv += v[0] + '=' + str(v[1]) + ', '
1527
1390
  return sv + ')'
1528
1391
  @property
1529
- def Title(self):
1530
- return _whatsapp.whatsapp_Poll_Title_Get(self.handle)
1531
- @Title.setter
1532
- def Title(self, value):
1533
- if isinstance(value, go.GoClass):
1534
- _whatsapp.whatsapp_Poll_Title_Set(self.handle, value.handle)
1535
- else:
1536
- _whatsapp.whatsapp_Poll_Title_Set(self.handle, value)
1537
- @property
1538
- def Options(self):
1539
- return Slice_whatsapp_PollOption(handle=_whatsapp.whatsapp_Poll_Options_Get(self.handle))
1540
- @Options.setter
1541
- def Options(self, value):
1392
+ def Reason(self):
1393
+ return _whatsapp.whatsapp_LoggedOut_Reason_Get(self.handle)
1394
+ @Reason.setter
1395
+ def Reason(self, value):
1542
1396
  if isinstance(value, go.GoClass):
1543
- _whatsapp.whatsapp_Poll_Options_Set(self.handle, value.handle)
1397
+ _whatsapp.whatsapp_LoggedOut_Reason_Set(self.handle, value.handle)
1544
1398
  else:
1545
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1399
+ _whatsapp.whatsapp_LoggedOut_Reason_Set(self.handle, value)
1546
1400
 
1547
- # Python type for struct whatsapp.Attachment
1548
- class Attachment(go.GoClass):
1549
- """A Attachment represents additional binary data (e.g. images, videos, documents) provided alongside\na message, for display or storage on the recepient client.\n"""
1401
+ # Python type for struct whatsapp.Preview
1402
+ class Preview(go.GoClass):
1403
+ """A Preview represents a short description for a URL provided in a message body, as usually derived\nfrom the content of the page pointed at.\n"""
1550
1404
  def __init__(self, *args, **kwargs):
1551
1405
  """
1552
1406
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1560,29 +1414,33 @@ class Attachment(go.GoClass):
1560
1414
  self.handle = args[0].handle
1561
1415
  _whatsapp.IncRef(self.handle)
1562
1416
  else:
1563
- self.handle = _whatsapp.whatsapp_Attachment_CTor()
1417
+ self.handle = _whatsapp.whatsapp_Preview_CTor()
1564
1418
  _whatsapp.IncRef(self.handle)
1565
1419
  if 0 < len(args):
1566
- self.MIME = args[0]
1567
- if "MIME" in kwargs:
1568
- self.MIME = kwargs["MIME"]
1420
+ self.Kind = args[0]
1421
+ if "Kind" in kwargs:
1422
+ self.Kind = kwargs["Kind"]
1569
1423
  if 1 < len(args):
1570
- self.Filename = args[1]
1571
- if "Filename" in kwargs:
1572
- self.Filename = kwargs["Filename"]
1424
+ self.URL = args[1]
1425
+ if "URL" in kwargs:
1426
+ self.URL = kwargs["URL"]
1573
1427
  if 2 < len(args):
1574
- self.Caption = args[2]
1575
- if "Caption" in kwargs:
1576
- self.Caption = kwargs["Caption"]
1428
+ self.Title = args[2]
1429
+ if "Title" in kwargs:
1430
+ self.Title = kwargs["Title"]
1577
1431
  if 3 < len(args):
1578
- self.Data = args[3]
1579
- if "Data" in kwargs:
1580
- self.Data = kwargs["Data"]
1432
+ self.Description = args[3]
1433
+ if "Description" in kwargs:
1434
+ self.Description = kwargs["Description"]
1435
+ if 4 < len(args):
1436
+ self.Thumbnail = args[4]
1437
+ if "Thumbnail" in kwargs:
1438
+ self.Thumbnail = kwargs["Thumbnail"]
1581
1439
  def __del__(self):
1582
1440
  _whatsapp.DecRef(self.handle)
1583
1441
  def __str__(self):
1584
1442
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1585
- sv = 'whatsapp.Attachment{'
1443
+ sv = 'whatsapp.Preview{'
1586
1444
  first = True
1587
1445
  for v in pr:
1588
1446
  if callable(v[1]):
@@ -1595,57 +1453,60 @@ class Attachment(go.GoClass):
1595
1453
  return sv + '}'
1596
1454
  def __repr__(self):
1597
1455
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1598
- sv = 'whatsapp.Attachment ( '
1456
+ sv = 'whatsapp.Preview ( '
1599
1457
  for v in pr:
1600
1458
  if not callable(v[1]):
1601
1459
  sv += v[0] + '=' + str(v[1]) + ', '
1602
1460
  return sv + ')'
1603
1461
  @property
1604
- def MIME(self):
1605
- return _whatsapp.whatsapp_Attachment_MIME_Get(self.handle)
1606
- @MIME.setter
1607
- def MIME(self, value):
1462
+ def Kind(self):
1463
+ return _whatsapp.whatsapp_Preview_Kind_Get(self.handle)
1464
+ @Kind.setter
1465
+ def Kind(self, value):
1608
1466
  if isinstance(value, go.GoClass):
1609
- _whatsapp.whatsapp_Attachment_MIME_Set(self.handle, value.handle)
1467
+ _whatsapp.whatsapp_Preview_Kind_Set(self.handle, value.handle)
1610
1468
  else:
1611
- _whatsapp.whatsapp_Attachment_MIME_Set(self.handle, value)
1469
+ _whatsapp.whatsapp_Preview_Kind_Set(self.handle, value)
1612
1470
  @property
1613
- def Filename(self):
1614
- return _whatsapp.whatsapp_Attachment_Filename_Get(self.handle)
1615
- @Filename.setter
1616
- def Filename(self, value):
1471
+ def URL(self):
1472
+ return _whatsapp.whatsapp_Preview_URL_Get(self.handle)
1473
+ @URL.setter
1474
+ def URL(self, value):
1617
1475
  if isinstance(value, go.GoClass):
1618
- _whatsapp.whatsapp_Attachment_Filename_Set(self.handle, value.handle)
1476
+ _whatsapp.whatsapp_Preview_URL_Set(self.handle, value.handle)
1619
1477
  else:
1620
- _whatsapp.whatsapp_Attachment_Filename_Set(self.handle, value)
1478
+ _whatsapp.whatsapp_Preview_URL_Set(self.handle, value)
1621
1479
  @property
1622
- def Caption(self):
1623
- return _whatsapp.whatsapp_Attachment_Caption_Get(self.handle)
1624
- @Caption.setter
1625
- def Caption(self, value):
1480
+ def Title(self):
1481
+ return _whatsapp.whatsapp_Preview_Title_Get(self.handle)
1482
+ @Title.setter
1483
+ def Title(self, value):
1626
1484
  if isinstance(value, go.GoClass):
1627
- _whatsapp.whatsapp_Attachment_Caption_Set(self.handle, value.handle)
1485
+ _whatsapp.whatsapp_Preview_Title_Set(self.handle, value.handle)
1628
1486
  else:
1629
- _whatsapp.whatsapp_Attachment_Caption_Set(self.handle, value)
1487
+ _whatsapp.whatsapp_Preview_Title_Set(self.handle, value)
1630
1488
  @property
1631
- def Data(self):
1632
- return go.Slice_byte(handle=_whatsapp.whatsapp_Attachment_Data_Get(self.handle))
1633
- @Data.setter
1634
- def Data(self, value):
1489
+ def Description(self):
1490
+ return _whatsapp.whatsapp_Preview_Description_Get(self.handle)
1491
+ @Description.setter
1492
+ def Description(self, value):
1635
1493
  if isinstance(value, go.GoClass):
1636
- _whatsapp.whatsapp_Attachment_Data_Set(self.handle, value.handle)
1494
+ _whatsapp.whatsapp_Preview_Description_Set(self.handle, value.handle)
1495
+ else:
1496
+ _whatsapp.whatsapp_Preview_Description_Set(self.handle, value)
1497
+ @property
1498
+ def Thumbnail(self):
1499
+ return go.Slice_byte(handle=_whatsapp.whatsapp_Preview_Thumbnail_Get(self.handle))
1500
+ @Thumbnail.setter
1501
+ def Thumbnail(self, value):
1502
+ if isinstance(value, go.GoClass):
1503
+ _whatsapp.whatsapp_Preview_Thumbnail_Set(self.handle, value.handle)
1637
1504
  else:
1638
1505
  raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1639
- def GetSpec(self, ctx):
1640
- """GetSpec(object ctx) object, str
1641
-
1642
- GetSpec returns metadata for this attachment, as derived from the underlying attachment data.
1643
- """
1644
- return go.Ptr_media_Spec(handle=_whatsapp.whatsapp_Attachment_GetSpec(self.handle, ctx.handle))
1645
1506
 
1646
- # Python type for struct whatsapp.Call
1647
- class Call(go.GoClass):
1648
- """A Call represents an incoming or outgoing voice/video call made over WhatsApp. Full support for\ncalls is currently not implemented, and this structure contains the bare minimum data required\nfor notifying on missed calls.\n"""
1507
+ # Python type for struct whatsapp.Session
1508
+ class Session(go.GoClass):
1509
+ """A Session represents a connection (active or not) between a linked device and WhatsApp. Active\nsessions need to be established by logging in, after which incoming events will be forwarded to\nthe adapter event handler, and outgoing events will be forwarded to WhatsApp.\n"""
1649
1510
  def __init__(self, *args, **kwargs):
1650
1511
  """
1651
1512
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1659,25 +1520,13 @@ class Call(go.GoClass):
1659
1520
  self.handle = args[0].handle
1660
1521
  _whatsapp.IncRef(self.handle)
1661
1522
  else:
1662
- self.handle = _whatsapp.whatsapp_Call_CTor()
1523
+ self.handle = _whatsapp.whatsapp_Session_CTor()
1663
1524
  _whatsapp.IncRef(self.handle)
1664
- if 0 < len(args):
1665
- self.State = args[0]
1666
- if "State" in kwargs:
1667
- self.State = kwargs["State"]
1668
- if 1 < len(args):
1669
- self.JID = args[1]
1670
- if "JID" in kwargs:
1671
- self.JID = kwargs["JID"]
1672
- if 2 < len(args):
1673
- self.Timestamp = args[2]
1674
- if "Timestamp" in kwargs:
1675
- self.Timestamp = kwargs["Timestamp"]
1676
1525
  def __del__(self):
1677
1526
  _whatsapp.DecRef(self.handle)
1678
1527
  def __str__(self):
1679
1528
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1680
- sv = 'whatsapp.Call{'
1529
+ sv = 'whatsapp.Session{'
1681
1530
  first = True
1682
1531
  for v in pr:
1683
1532
  if callable(v[1]):
@@ -1690,42 +1539,167 @@ class Call(go.GoClass):
1690
1539
  return sv + '}'
1691
1540
  def __repr__(self):
1692
1541
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1693
- sv = 'whatsapp.Call ( '
1542
+ sv = 'whatsapp.Session ( '
1694
1543
  for v in pr:
1695
1544
  if not callable(v[1]):
1696
1545
  sv += v[0] + '=' + str(v[1]) + ', '
1697
1546
  return sv + ')'
1698
- @property
1699
- def State(self):
1700
- return _whatsapp.whatsapp_Call_State_Get(self.handle)
1701
- @State.setter
1702
- def State(self, value):
1703
- if isinstance(value, go.GoClass):
1704
- _whatsapp.whatsapp_Call_State_Set(self.handle, value.handle)
1705
- else:
1706
- _whatsapp.whatsapp_Call_State_Set(self.handle, value)
1707
- @property
1708
- def JID(self):
1709
- return _whatsapp.whatsapp_Call_JID_Get(self.handle)
1710
- @JID.setter
1711
- def JID(self, value):
1712
- if isinstance(value, go.GoClass):
1713
- _whatsapp.whatsapp_Call_JID_Set(self.handle, value.handle)
1714
- else:
1715
- _whatsapp.whatsapp_Call_JID_Set(self.handle, value)
1716
- @property
1717
- def Timestamp(self):
1718
- return _whatsapp.whatsapp_Call_Timestamp_Get(self.handle)
1719
- @Timestamp.setter
1720
- def Timestamp(self, value):
1721
- if isinstance(value, go.GoClass):
1722
- _whatsapp.whatsapp_Call_Timestamp_Set(self.handle, value.handle)
1723
- else:
1724
- _whatsapp.whatsapp_Call_Timestamp_Set(self.handle, value)
1547
+ def Login(self):
1548
+ """Login() str
1549
+
1550
+ Login attempts to authenticate the given [Session], either by re-using the [LinkedDevice] attached
1551
+ or by initiating a pairing session for a new linked device. Callers are expected to have set an
1552
+ event handler in order to receive any incoming events from the underlying WhatsApp session.
1553
+ """
1554
+ return _whatsapp.whatsapp_Session_Login(self.handle)
1555
+ def Logout(self):
1556
+ """Logout() str
1557
+
1558
+ Logout disconnects and removes the current linked device locally and initiates a logout remotely.
1559
+ """
1560
+ return _whatsapp.whatsapp_Session_Logout(self.handle)
1561
+ def Disconnect(self):
1562
+ """Disconnect() str
1563
+
1564
+ Disconnects detaches the current connection to WhatsApp without removing any linked device state.
1565
+ """
1566
+ return _whatsapp.whatsapp_Session_Disconnect(self.handle)
1567
+ def PairPhone(self, phone):
1568
+ """PairPhone(str phone) str, str
1569
+
1570
+ PairPhone returns a one-time code from WhatsApp, used for pairing this [Session] against the
1571
+ user's primary device, as identified by the given phone number. This will return an error if the
1572
+ [Session] is already paired, or if the phone number given is empty or invalid.
1573
+ """
1574
+ return _whatsapp.whatsapp_Session_PairPhone(self.handle, phone)
1575
+ def SendMessage(self, message):
1576
+ """SendMessage(object message) str
1577
+
1578
+ SendMessage processes the given Message and sends a WhatsApp message for the kind and contact JID
1579
+ specified within. In general, different message kinds require different fields to be set; see the
1580
+ documentation for the [Message] type for more information.
1581
+ """
1582
+ return _whatsapp.whatsapp_Session_SendMessage(self.handle, message.handle)
1583
+ def GenerateMessageID(self):
1584
+ """GenerateMessageID() str
1585
+
1586
+ GenerateMessageID returns a valid, pseudo-random message ID for use in outgoing messages.
1587
+ """
1588
+ return _whatsapp.whatsapp_Session_GenerateMessageID(self.handle)
1589
+ def SendChatState(self, state):
1590
+ """SendChatState(object state) str
1591
+
1592
+ SendChatState sends the given chat state notification (e.g. composing message) to WhatsApp for the
1593
+ contact specified within.
1594
+ """
1595
+ return _whatsapp.whatsapp_Session_SendChatState(self.handle, state.handle)
1596
+ def SendReceipt(self, receipt):
1597
+ """SendReceipt(object receipt) str
1598
+
1599
+ SendReceipt sends a read receipt to WhatsApp for the message IDs specified within.
1600
+ """
1601
+ return _whatsapp.whatsapp_Session_SendReceipt(self.handle, receipt.handle)
1602
+ def SendPresence(self, presence, statusMessage):
1603
+ """SendPresence(int presence, str statusMessage) str
1604
+
1605
+ SendPresence sets the activity state and (optional) status message for the current session and
1606
+ user. An error is returned if setting availability fails for any reason.
1607
+ """
1608
+ return _whatsapp.whatsapp_Session_SendPresence(self.handle, presence, statusMessage)
1609
+ def GetContacts(self, refresh):
1610
+ """GetContacts(bool refresh) []object, str
1611
+
1612
+ GetContacts subscribes to the WhatsApp roster currently stored in the Session's internal state.
1613
+ If `refresh` is `true`, FetchRoster will pull application state from the remote service and
1614
+ synchronize any contacts found with the adapter.
1615
+ """
1616
+ return Slice_whatsapp_Contact(handle=_whatsapp.whatsapp_Session_GetContacts(self.handle, refresh))
1617
+ def GetGroups(self):
1618
+ """GetGroups() []object, str
1619
+
1620
+ GetGroups returns a list of all group-chats currently joined in WhatsApp, along with additional
1621
+ information on present participants.
1622
+ """
1623
+ return Slice_whatsapp_Group(handle=_whatsapp.whatsapp_Session_GetGroups(self.handle))
1624
+ def CreateGroup(self, name, participants):
1625
+ """CreateGroup(str name, []str participants) object, str
1626
+
1627
+ CreateGroup attempts to create a new WhatsApp group for the given human-readable name and
1628
+ participant JIDs given.
1629
+ """
1630
+ return Group(handle=_whatsapp.whatsapp_Session_CreateGroup(self.handle, name, participants.handle))
1631
+ def LeaveGroup(self, resourceID):
1632
+ """LeaveGroup(str resourceID) str
1633
+
1634
+ LeaveGroup attempts to remove our own user from the given WhatsApp group, for the JID given.
1635
+ """
1636
+ return _whatsapp.whatsapp_Session_LeaveGroup(self.handle, resourceID)
1637
+ def GetAvatar(self, resourceID, avatarID):
1638
+ """GetAvatar(str resourceID, str avatarID) object, str
1639
+
1640
+ GetAvatar fetches a profile picture for the Contact or Group JID given. If a non-empty `avatarID`
1641
+ is also given, GetAvatar will return an empty [Avatar] instance with no error if the remote state
1642
+ for the given ID has not changed.
1643
+ """
1644
+ return Avatar(handle=_whatsapp.whatsapp_Session_GetAvatar(self.handle, resourceID, avatarID))
1645
+ def SetAvatar(self, resourceID, avatar):
1646
+ """SetAvatar(str resourceID, []int avatar) str, str
1647
+
1648
+ SetAvatar updates the profile picture for the Contact or Group JID given; it can also update the
1649
+ profile picture for our own user by providing an empty JID. The unique picture ID is returned,
1650
+ typically used as a cache reference or in providing to future calls for [Session.GetAvatar].
1651
+ """
1652
+ return _whatsapp.whatsapp_Session_SetAvatar(self.handle, resourceID, avatar.handle)
1653
+ def SetGroupName(self, resourceID, name):
1654
+ """SetGroupName(str resourceID, str name) str
1655
+
1656
+ SetGroupName updates the name of a WhatsApp group for the Group JID given.
1657
+ """
1658
+ return _whatsapp.whatsapp_Session_SetGroupName(self.handle, resourceID, name)
1659
+ def SetGroupTopic(self, resourceID, topic):
1660
+ """SetGroupTopic(str resourceID, str topic) str
1661
+
1662
+ SetGroupName updates the topic of a WhatsApp group for the Group JID given.
1663
+ """
1664
+ return _whatsapp.whatsapp_Session_SetGroupTopic(self.handle, resourceID, topic)
1665
+ def UpdateGroupParticipants(self, resourceID, participants):
1666
+ """UpdateGroupParticipants(str resourceID, []object participants) []object, str
1667
+
1668
+ UpdateGroupParticipants processes changes to the given group's participants, including additions,
1669
+ removals, and changes to privileges. Participant JIDs given must be part of the authenticated
1670
+ session's roster at least, and must also be active group participants for other types of changes.
1671
+ """
1672
+ return Slice_whatsapp_GroupParticipant(handle=_whatsapp.whatsapp_Session_UpdateGroupParticipants(self.handle, resourceID, participants.handle))
1673
+ def FindContact(self, phone):
1674
+ """FindContact(str phone) object, str
1675
+
1676
+ FindContact attempts to check for a registered contact on WhatsApp corresponding to the given
1677
+ phone number, returning a concrete instance if found; typically, only the contact JID is set. No
1678
+ error is returned if no contact was found, but any unexpected errors will otherwise be returned
1679
+ directly.
1680
+ """
1681
+ return Contact(handle=_whatsapp.whatsapp_Session_FindContact(self.handle, phone))
1682
+ def RequestMessageHistory(self, resourceID, oldestMessage):
1683
+ """RequestMessageHistory(str resourceID, object oldestMessage) str
1684
+
1685
+ RequestMessageHistory sends and asynchronous request for message history related to the given
1686
+ resource (e.g. Contact or Group JID), ending at the oldest message given. Messages returned from
1687
+ history should then be handled as a `HistorySync` event of type `ON_DEMAND`, in the session-wide
1688
+ event handler. An error will be returned if requesting history fails for any reason.
1689
+ """
1690
+ return _whatsapp.whatsapp_Session_RequestMessageHistory(self.handle, resourceID, oldestMessage.handle)
1691
+ def SetEventHandler(self, h, goRun=False):
1692
+ """SetEventHandler(callable h)
1693
+
1694
+ SetEventHandler assigns the given handler function for propagating internal events into the Python
1695
+ gateway. Note that the event handler function is not entirely safe to use directly, and all calls
1696
+ should instead be sent to the [Gateway] via its internal call channel.
1697
+ """
1698
+ _whatsapp.whatsapp_Session_SetEventHandler(self.handle, h, goRun)
1725
1699
 
1726
- # Python type for struct whatsapp.Gateway
1727
- class Gateway(go.GoClass):
1728
- """A Gateway represents a persistent process for establishing individual sessions between linked\ndevices and WhatsApp.\n"""
1700
+ # Python type for struct whatsapp.Avatar
1701
+ class Avatar(go.GoClass):
1702
+ """A Avatar represents a small image set for a Contact or Group.\n"""
1729
1703
  def __init__(self, *args, **kwargs):
1730
1704
  """
1731
1705
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1739,29 +1713,21 @@ class Gateway(go.GoClass):
1739
1713
  self.handle = args[0].handle
1740
1714
  _whatsapp.IncRef(self.handle)
1741
1715
  else:
1742
- self.handle = _whatsapp.whatsapp_Gateway_CTor()
1716
+ self.handle = _whatsapp.whatsapp_Avatar_CTor()
1743
1717
  _whatsapp.IncRef(self.handle)
1744
1718
  if 0 < len(args):
1745
- self.DBPath = args[0]
1746
- if "DBPath" in kwargs:
1747
- self.DBPath = kwargs["DBPath"]
1719
+ self.ID = args[0]
1720
+ if "ID" in kwargs:
1721
+ self.ID = kwargs["ID"]
1748
1722
  if 1 < len(args):
1749
- self.Name = args[1]
1750
- if "Name" in kwargs:
1751
- self.Name = kwargs["Name"]
1752
- if 2 < len(args):
1753
- self.LogLevel = args[2]
1754
- if "LogLevel" in kwargs:
1755
- self.LogLevel = kwargs["LogLevel"]
1756
- if 3 < len(args):
1757
- self.TempDir = args[3]
1758
- if "TempDir" in kwargs:
1759
- self.TempDir = kwargs["TempDir"]
1723
+ self.URL = args[1]
1724
+ if "URL" in kwargs:
1725
+ self.URL = kwargs["URL"]
1760
1726
  def __del__(self):
1761
1727
  _whatsapp.DecRef(self.handle)
1762
1728
  def __str__(self):
1763
1729
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1764
- sv = 'whatsapp.Gateway{'
1730
+ sv = 'whatsapp.Avatar{'
1765
1731
  first = True
1766
1732
  for v in pr:
1767
1733
  if callable(v[1]):
@@ -1774,72 +1740,33 @@ class Gateway(go.GoClass):
1774
1740
  return sv + '}'
1775
1741
  def __repr__(self):
1776
1742
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1777
- sv = 'whatsapp.Gateway ( '
1743
+ sv = 'whatsapp.Avatar ( '
1778
1744
  for v in pr:
1779
1745
  if not callable(v[1]):
1780
1746
  sv += v[0] + '=' + str(v[1]) + ', '
1781
1747
  return sv + ')'
1782
1748
  @property
1783
- def DBPath(self):
1784
- return _whatsapp.whatsapp_Gateway_DBPath_Get(self.handle)
1785
- @DBPath.setter
1786
- def DBPath(self, value):
1787
- if isinstance(value, go.GoClass):
1788
- _whatsapp.whatsapp_Gateway_DBPath_Set(self.handle, value.handle)
1789
- else:
1790
- _whatsapp.whatsapp_Gateway_DBPath_Set(self.handle, value)
1791
- @property
1792
- def Name(self):
1793
- return _whatsapp.whatsapp_Gateway_Name_Get(self.handle)
1794
- @Name.setter
1795
- def Name(self, value):
1796
- if isinstance(value, go.GoClass):
1797
- _whatsapp.whatsapp_Gateway_Name_Set(self.handle, value.handle)
1798
- else:
1799
- _whatsapp.whatsapp_Gateway_Name_Set(self.handle, value)
1800
- @property
1801
- def LogLevel(self):
1802
- return _whatsapp.whatsapp_Gateway_LogLevel_Get(self.handle)
1803
- @LogLevel.setter
1804
- def LogLevel(self, value):
1749
+ def ID(self):
1750
+ return _whatsapp.whatsapp_Avatar_ID_Get(self.handle)
1751
+ @ID.setter
1752
+ def ID(self, value):
1805
1753
  if isinstance(value, go.GoClass):
1806
- _whatsapp.whatsapp_Gateway_LogLevel_Set(self.handle, value.handle)
1754
+ _whatsapp.whatsapp_Avatar_ID_Set(self.handle, value.handle)
1807
1755
  else:
1808
- _whatsapp.whatsapp_Gateway_LogLevel_Set(self.handle, value)
1756
+ _whatsapp.whatsapp_Avatar_ID_Set(self.handle, value)
1809
1757
  @property
1810
- def TempDir(self):
1811
- return _whatsapp.whatsapp_Gateway_TempDir_Get(self.handle)
1812
- @TempDir.setter
1813
- def TempDir(self, value):
1758
+ def URL(self):
1759
+ return _whatsapp.whatsapp_Avatar_URL_Get(self.handle)
1760
+ @URL.setter
1761
+ def URL(self, value):
1814
1762
  if isinstance(value, go.GoClass):
1815
- _whatsapp.whatsapp_Gateway_TempDir_Set(self.handle, value.handle)
1763
+ _whatsapp.whatsapp_Avatar_URL_Set(self.handle, value.handle)
1816
1764
  else:
1817
- _whatsapp.whatsapp_Gateway_TempDir_Set(self.handle, value)
1818
- def Init(self):
1819
- """Init() str
1820
-
1821
- Init performs initialization procedures for the Gateway, and is expected to be run before any
1822
- calls to [Gateway.Session].
1823
- """
1824
- return _whatsapp.whatsapp_Gateway_Init(self.handle)
1825
- def NewSession(self, device):
1826
- """NewSession(object device) object
1827
-
1828
- NewSession returns a new [Session] for the LinkedDevice given. If the linked device does not have
1829
- a valid ID, a pair operation will be required, as described in [Session.Login].
1830
- """
1831
- return Session(handle=_whatsapp.whatsapp_Gateway_NewSession(self.handle, device.handle))
1832
- def CleanupSession(self, device):
1833
- """CleanupSession(object device) str
1834
-
1835
- CleanupSession will remove all invalid and obsolete references to the given device, and should be
1836
- used when pairing a new device or unregistering from the Gateway.
1837
- """
1838
- return _whatsapp.whatsapp_Gateway_CleanupSession(self.handle, device.handle)
1765
+ _whatsapp.whatsapp_Avatar_URL_Set(self.handle, value)
1839
1766
 
1840
- # Python type for struct whatsapp.GroupParticipant
1841
- class GroupParticipant(go.GoClass):
1842
- """A GroupParticipant represents a contact who is currently joined in a given group. Participants in\nWhatsApp can always be derived back to their individual [Contact]; there are no anonymous groups\nin WhatsApp.\n"""
1767
+ # Python type for struct whatsapp.GroupSubject
1768
+ class GroupSubject(go.GoClass):
1769
+ """A GroupSubject represents the user-defined group description and attached metadata thereof, for a\ngiven [Group].\n"""
1843
1770
  def __init__(self, *args, **kwargs):
1844
1771
  """
1845
1772
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1853,25 +1780,25 @@ class GroupParticipant(go.GoClass):
1853
1780
  self.handle = args[0].handle
1854
1781
  _whatsapp.IncRef(self.handle)
1855
1782
  else:
1856
- self.handle = _whatsapp.whatsapp_GroupParticipant_CTor()
1783
+ self.handle = _whatsapp.whatsapp_GroupSubject_CTor()
1857
1784
  _whatsapp.IncRef(self.handle)
1858
1785
  if 0 < len(args):
1859
- self.JID = args[0]
1860
- if "JID" in kwargs:
1861
- self.JID = kwargs["JID"]
1786
+ self.Subject = args[0]
1787
+ if "Subject" in kwargs:
1788
+ self.Subject = kwargs["Subject"]
1862
1789
  if 1 < len(args):
1863
- self.Affiliation = args[1]
1864
- if "Affiliation" in kwargs:
1865
- self.Affiliation = kwargs["Affiliation"]
1790
+ self.SetAt = args[1]
1791
+ if "SetAt" in kwargs:
1792
+ self.SetAt = kwargs["SetAt"]
1866
1793
  if 2 < len(args):
1867
- self.Action = args[2]
1868
- if "Action" in kwargs:
1869
- self.Action = kwargs["Action"]
1794
+ self.SetBy = args[2]
1795
+ if "SetBy" in kwargs:
1796
+ self.SetBy = kwargs["SetBy"]
1870
1797
  def __del__(self):
1871
1798
  _whatsapp.DecRef(self.handle)
1872
1799
  def __str__(self):
1873
1800
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1874
- sv = 'whatsapp.GroupParticipant{'
1801
+ sv = 'whatsapp.GroupSubject{'
1875
1802
  first = True
1876
1803
  for v in pr:
1877
1804
  if callable(v[1]):
@@ -1884,42 +1811,42 @@ class GroupParticipant(go.GoClass):
1884
1811
  return sv + '}'
1885
1812
  def __repr__(self):
1886
1813
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1887
- sv = 'whatsapp.GroupParticipant ( '
1814
+ sv = 'whatsapp.GroupSubject ( '
1888
1815
  for v in pr:
1889
1816
  if not callable(v[1]):
1890
1817
  sv += v[0] + '=' + str(v[1]) + ', '
1891
1818
  return sv + ')'
1892
1819
  @property
1893
- def JID(self):
1894
- return _whatsapp.whatsapp_GroupParticipant_JID_Get(self.handle)
1895
- @JID.setter
1896
- def JID(self, value):
1820
+ def Subject(self):
1821
+ return _whatsapp.whatsapp_GroupSubject_Subject_Get(self.handle)
1822
+ @Subject.setter
1823
+ def Subject(self, value):
1897
1824
  if isinstance(value, go.GoClass):
1898
- _whatsapp.whatsapp_GroupParticipant_JID_Set(self.handle, value.handle)
1825
+ _whatsapp.whatsapp_GroupSubject_Subject_Set(self.handle, value.handle)
1899
1826
  else:
1900
- _whatsapp.whatsapp_GroupParticipant_JID_Set(self.handle, value)
1827
+ _whatsapp.whatsapp_GroupSubject_Subject_Set(self.handle, value)
1901
1828
  @property
1902
- def Affiliation(self):
1903
- return _whatsapp.whatsapp_GroupParticipant_Affiliation_Get(self.handle)
1904
- @Affiliation.setter
1905
- def Affiliation(self, value):
1829
+ def SetAt(self):
1830
+ return _whatsapp.whatsapp_GroupSubject_SetAt_Get(self.handle)
1831
+ @SetAt.setter
1832
+ def SetAt(self, value):
1906
1833
  if isinstance(value, go.GoClass):
1907
- _whatsapp.whatsapp_GroupParticipant_Affiliation_Set(self.handle, value.handle)
1834
+ _whatsapp.whatsapp_GroupSubject_SetAt_Set(self.handle, value.handle)
1908
1835
  else:
1909
- _whatsapp.whatsapp_GroupParticipant_Affiliation_Set(self.handle, value)
1836
+ _whatsapp.whatsapp_GroupSubject_SetAt_Set(self.handle, value)
1910
1837
  @property
1911
- def Action(self):
1912
- return _whatsapp.whatsapp_GroupParticipant_Action_Get(self.handle)
1913
- @Action.setter
1914
- def Action(self, value):
1838
+ def SetBy(self):
1839
+ return _whatsapp.whatsapp_GroupSubject_SetBy_Get(self.handle)
1840
+ @SetBy.setter
1841
+ def SetBy(self, value):
1915
1842
  if isinstance(value, go.GoClass):
1916
- _whatsapp.whatsapp_GroupParticipant_Action_Set(self.handle, value.handle)
1843
+ _whatsapp.whatsapp_GroupSubject_SetBy_Set(self.handle, value.handle)
1917
1844
  else:
1918
- _whatsapp.whatsapp_GroupParticipant_Action_Set(self.handle, value)
1845
+ _whatsapp.whatsapp_GroupSubject_SetBy_Set(self.handle, value)
1919
1846
 
1920
- # Python type for struct whatsapp.GroupSubject
1921
- class GroupSubject(go.GoClass):
1922
- """A GroupSubject represents the user-defined group description and attached metadata thereof, for a\ngiven [Group].\n"""
1847
+ # Python type for struct whatsapp.Location
1848
+ class Location(go.GoClass):
1849
+ """A Location represents additional metadata given to location messages.\n"""
1923
1850
  def __init__(self, *args, **kwargs):
1924
1851
  """
1925
1852
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1933,25 +1860,41 @@ class GroupSubject(go.GoClass):
1933
1860
  self.handle = args[0].handle
1934
1861
  _whatsapp.IncRef(self.handle)
1935
1862
  else:
1936
- self.handle = _whatsapp.whatsapp_GroupSubject_CTor()
1863
+ self.handle = _whatsapp.whatsapp_Location_CTor()
1937
1864
  _whatsapp.IncRef(self.handle)
1938
1865
  if 0 < len(args):
1939
- self.Subject = args[0]
1940
- if "Subject" in kwargs:
1941
- self.Subject = kwargs["Subject"]
1866
+ self.Latitude = args[0]
1867
+ if "Latitude" in kwargs:
1868
+ self.Latitude = kwargs["Latitude"]
1942
1869
  if 1 < len(args):
1943
- self.SetAt = args[1]
1944
- if "SetAt" in kwargs:
1945
- self.SetAt = kwargs["SetAt"]
1870
+ self.Longitude = args[1]
1871
+ if "Longitude" in kwargs:
1872
+ self.Longitude = kwargs["Longitude"]
1946
1873
  if 2 < len(args):
1947
- self.SetByJID = args[2]
1948
- if "SetByJID" in kwargs:
1949
- self.SetByJID = kwargs["SetByJID"]
1874
+ self.Accuracy = args[2]
1875
+ if "Accuracy" in kwargs:
1876
+ self.Accuracy = kwargs["Accuracy"]
1877
+ if 3 < len(args):
1878
+ self.IsLive = args[3]
1879
+ if "IsLive" in kwargs:
1880
+ self.IsLive = kwargs["IsLive"]
1881
+ if 4 < len(args):
1882
+ self.Name = args[4]
1883
+ if "Name" in kwargs:
1884
+ self.Name = kwargs["Name"]
1885
+ if 5 < len(args):
1886
+ self.Address = args[5]
1887
+ if "Address" in kwargs:
1888
+ self.Address = kwargs["Address"]
1889
+ if 6 < len(args):
1890
+ self.URL = args[6]
1891
+ if "URL" in kwargs:
1892
+ self.URL = kwargs["URL"]
1950
1893
  def __del__(self):
1951
1894
  _whatsapp.DecRef(self.handle)
1952
1895
  def __str__(self):
1953
1896
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1954
- sv = 'whatsapp.GroupSubject{'
1897
+ sv = 'whatsapp.Location{'
1955
1898
  first = True
1956
1899
  for v in pr:
1957
1900
  if callable(v[1]):
@@ -1964,42 +1907,80 @@ class GroupSubject(go.GoClass):
1964
1907
  return sv + '}'
1965
1908
  def __repr__(self):
1966
1909
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1967
- sv = 'whatsapp.GroupSubject ( '
1910
+ sv = 'whatsapp.Location ( '
1968
1911
  for v in pr:
1969
1912
  if not callable(v[1]):
1970
1913
  sv += v[0] + '=' + str(v[1]) + ', '
1971
1914
  return sv + ')'
1972
1915
  @property
1973
- def Subject(self):
1974
- return _whatsapp.whatsapp_GroupSubject_Subject_Get(self.handle)
1975
- @Subject.setter
1976
- def Subject(self, value):
1916
+ def Latitude(self):
1917
+ return _whatsapp.whatsapp_Location_Latitude_Get(self.handle)
1918
+ @Latitude.setter
1919
+ def Latitude(self, value):
1977
1920
  if isinstance(value, go.GoClass):
1978
- _whatsapp.whatsapp_GroupSubject_Subject_Set(self.handle, value.handle)
1921
+ _whatsapp.whatsapp_Location_Latitude_Set(self.handle, value.handle)
1979
1922
  else:
1980
- _whatsapp.whatsapp_GroupSubject_Subject_Set(self.handle, value)
1923
+ _whatsapp.whatsapp_Location_Latitude_Set(self.handle, value)
1981
1924
  @property
1982
- def SetAt(self):
1983
- return _whatsapp.whatsapp_GroupSubject_SetAt_Get(self.handle)
1984
- @SetAt.setter
1985
- def SetAt(self, value):
1925
+ def Longitude(self):
1926
+ return _whatsapp.whatsapp_Location_Longitude_Get(self.handle)
1927
+ @Longitude.setter
1928
+ def Longitude(self, value):
1986
1929
  if isinstance(value, go.GoClass):
1987
- _whatsapp.whatsapp_GroupSubject_SetAt_Set(self.handle, value.handle)
1930
+ _whatsapp.whatsapp_Location_Longitude_Set(self.handle, value.handle)
1988
1931
  else:
1989
- _whatsapp.whatsapp_GroupSubject_SetAt_Set(self.handle, value)
1932
+ _whatsapp.whatsapp_Location_Longitude_Set(self.handle, value)
1933
+ @property
1934
+ def Accuracy(self):
1935
+ return _whatsapp.whatsapp_Location_Accuracy_Get(self.handle)
1936
+ @Accuracy.setter
1937
+ def Accuracy(self, value):
1938
+ if isinstance(value, go.GoClass):
1939
+ _whatsapp.whatsapp_Location_Accuracy_Set(self.handle, value.handle)
1940
+ else:
1941
+ _whatsapp.whatsapp_Location_Accuracy_Set(self.handle, value)
1942
+ @property
1943
+ def IsLive(self):
1944
+ return _whatsapp.whatsapp_Location_IsLive_Get(self.handle)
1945
+ @IsLive.setter
1946
+ def IsLive(self, value):
1947
+ if isinstance(value, go.GoClass):
1948
+ _whatsapp.whatsapp_Location_IsLive_Set(self.handle, value.handle)
1949
+ else:
1950
+ _whatsapp.whatsapp_Location_IsLive_Set(self.handle, value)
1951
+ @property
1952
+ def Name(self):
1953
+ """Optional fields given for named locations.
1954
+ """
1955
+ return _whatsapp.whatsapp_Location_Name_Get(self.handle)
1956
+ @Name.setter
1957
+ def Name(self, value):
1958
+ if isinstance(value, go.GoClass):
1959
+ _whatsapp.whatsapp_Location_Name_Set(self.handle, value.handle)
1960
+ else:
1961
+ _whatsapp.whatsapp_Location_Name_Set(self.handle, value)
1962
+ @property
1963
+ def Address(self):
1964
+ return _whatsapp.whatsapp_Location_Address_Get(self.handle)
1965
+ @Address.setter
1966
+ def Address(self, value):
1967
+ if isinstance(value, go.GoClass):
1968
+ _whatsapp.whatsapp_Location_Address_Set(self.handle, value.handle)
1969
+ else:
1970
+ _whatsapp.whatsapp_Location_Address_Set(self.handle, value)
1990
1971
  @property
1991
- def SetByJID(self):
1992
- return _whatsapp.whatsapp_GroupSubject_SetByJID_Get(self.handle)
1993
- @SetByJID.setter
1994
- def SetByJID(self, value):
1972
+ def URL(self):
1973
+ return _whatsapp.whatsapp_Location_URL_Get(self.handle)
1974
+ @URL.setter
1975
+ def URL(self, value):
1995
1976
  if isinstance(value, go.GoClass):
1996
- _whatsapp.whatsapp_GroupSubject_SetByJID_Set(self.handle, value.handle)
1977
+ _whatsapp.whatsapp_Location_URL_Set(self.handle, value.handle)
1997
1978
  else:
1998
- _whatsapp.whatsapp_GroupSubject_SetByJID_Set(self.handle, value)
1979
+ _whatsapp.whatsapp_Location_URL_Set(self.handle, value)
1999
1980
 
2000
- # Python type for struct whatsapp.Preview
2001
- class Preview(go.GoClass):
2002
- """A Preview represents a short description for a URL provided in a message body, as usually derived\nfrom the content of the page pointed at.\n"""
1981
+ # Python type for struct whatsapp.PollOption
1982
+ class PollOption(go.GoClass):
1983
+ """A PollOption represents an individual choice within a broader poll.\n"""
2003
1984
  def __init__(self, *args, **kwargs):
2004
1985
  """
2005
1986
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2013,33 +1994,17 @@ class Preview(go.GoClass):
2013
1994
  self.handle = args[0].handle
2014
1995
  _whatsapp.IncRef(self.handle)
2015
1996
  else:
2016
- self.handle = _whatsapp.whatsapp_Preview_CTor()
1997
+ self.handle = _whatsapp.whatsapp_PollOption_CTor()
2017
1998
  _whatsapp.IncRef(self.handle)
2018
1999
  if 0 < len(args):
2019
- self.Kind = args[0]
2020
- if "Kind" in kwargs:
2021
- self.Kind = kwargs["Kind"]
2022
- if 1 < len(args):
2023
- self.URL = args[1]
2024
- if "URL" in kwargs:
2025
- self.URL = kwargs["URL"]
2026
- if 2 < len(args):
2027
- self.Title = args[2]
2000
+ self.Title = args[0]
2028
2001
  if "Title" in kwargs:
2029
2002
  self.Title = kwargs["Title"]
2030
- if 3 < len(args):
2031
- self.Description = args[3]
2032
- if "Description" in kwargs:
2033
- self.Description = kwargs["Description"]
2034
- if 4 < len(args):
2035
- self.Thumbnail = args[4]
2036
- if "Thumbnail" in kwargs:
2037
- self.Thumbnail = kwargs["Thumbnail"]
2038
2003
  def __del__(self):
2039
2004
  _whatsapp.DecRef(self.handle)
2040
2005
  def __str__(self):
2041
2006
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2042
- sv = 'whatsapp.Preview{'
2007
+ sv = 'whatsapp.PollOption{'
2043
2008
  first = True
2044
2009
  for v in pr:
2045
2010
  if callable(v[1]):
@@ -2052,60 +2017,24 @@ class Preview(go.GoClass):
2052
2017
  return sv + '}'
2053
2018
  def __repr__(self):
2054
2019
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2055
- sv = 'whatsapp.Preview ( '
2020
+ sv = 'whatsapp.PollOption ( '
2056
2021
  for v in pr:
2057
2022
  if not callable(v[1]):
2058
2023
  sv += v[0] + '=' + str(v[1]) + ', '
2059
2024
  return sv + ')'
2060
2025
  @property
2061
- def Kind(self):
2062
- return _whatsapp.whatsapp_Preview_Kind_Get(self.handle)
2063
- @Kind.setter
2064
- def Kind(self, value):
2065
- if isinstance(value, go.GoClass):
2066
- _whatsapp.whatsapp_Preview_Kind_Set(self.handle, value.handle)
2067
- else:
2068
- _whatsapp.whatsapp_Preview_Kind_Set(self.handle, value)
2069
- @property
2070
- def URL(self):
2071
- return _whatsapp.whatsapp_Preview_URL_Get(self.handle)
2072
- @URL.setter
2073
- def URL(self, value):
2074
- if isinstance(value, go.GoClass):
2075
- _whatsapp.whatsapp_Preview_URL_Set(self.handle, value.handle)
2076
- else:
2077
- _whatsapp.whatsapp_Preview_URL_Set(self.handle, value)
2078
- @property
2079
2026
  def Title(self):
2080
- return _whatsapp.whatsapp_Preview_Title_Get(self.handle)
2027
+ return _whatsapp.whatsapp_PollOption_Title_Get(self.handle)
2081
2028
  @Title.setter
2082
2029
  def Title(self, value):
2083
2030
  if isinstance(value, go.GoClass):
2084
- _whatsapp.whatsapp_Preview_Title_Set(self.handle, value.handle)
2085
- else:
2086
- _whatsapp.whatsapp_Preview_Title_Set(self.handle, value)
2087
- @property
2088
- def Description(self):
2089
- return _whatsapp.whatsapp_Preview_Description_Get(self.handle)
2090
- @Description.setter
2091
- def Description(self, value):
2092
- if isinstance(value, go.GoClass):
2093
- _whatsapp.whatsapp_Preview_Description_Set(self.handle, value.handle)
2094
- else:
2095
- _whatsapp.whatsapp_Preview_Description_Set(self.handle, value)
2096
- @property
2097
- def Thumbnail(self):
2098
- return go.Slice_byte(handle=_whatsapp.whatsapp_Preview_Thumbnail_Get(self.handle))
2099
- @Thumbnail.setter
2100
- def Thumbnail(self, value):
2101
- if isinstance(value, go.GoClass):
2102
- _whatsapp.whatsapp_Preview_Thumbnail_Set(self.handle, value.handle)
2031
+ _whatsapp.whatsapp_PollOption_Title_Set(self.handle, value.handle)
2103
2032
  else:
2104
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2033
+ _whatsapp.whatsapp_PollOption_Title_Set(self.handle, value)
2105
2034
 
2106
- # Python type for struct whatsapp.Avatar
2107
- class Avatar(go.GoClass):
2108
- """A Avatar represents a small image set for a Contact or Group.\n"""
2035
+ # Python type for struct whatsapp.Presence
2036
+ class Presence(go.GoClass):
2037
+ """Precence represents a contact's general state of activity, and is periodically updated as\ncontacts start or stop paying attention to their client of choice.\n"""
2109
2038
  def __init__(self, *args, **kwargs):
2110
2039
  """
2111
2040
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2119,21 +2048,25 @@ class Avatar(go.GoClass):
2119
2048
  self.handle = args[0].handle
2120
2049
  _whatsapp.IncRef(self.handle)
2121
2050
  else:
2122
- self.handle = _whatsapp.whatsapp_Avatar_CTor()
2051
+ self.handle = _whatsapp.whatsapp_Presence_CTor()
2123
2052
  _whatsapp.IncRef(self.handle)
2124
2053
  if 0 < len(args):
2125
- self.ID = args[0]
2126
- if "ID" in kwargs:
2127
- self.ID = kwargs["ID"]
2054
+ self.JID = args[0]
2055
+ if "JID" in kwargs:
2056
+ self.JID = kwargs["JID"]
2128
2057
  if 1 < len(args):
2129
- self.URL = args[1]
2130
- if "URL" in kwargs:
2131
- self.URL = kwargs["URL"]
2058
+ self.Kind = args[1]
2059
+ if "Kind" in kwargs:
2060
+ self.Kind = kwargs["Kind"]
2061
+ if 2 < len(args):
2062
+ self.LastSeen = args[2]
2063
+ if "LastSeen" in kwargs:
2064
+ self.LastSeen = kwargs["LastSeen"]
2132
2065
  def __del__(self):
2133
2066
  _whatsapp.DecRef(self.handle)
2134
2067
  def __str__(self):
2135
2068
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2136
- sv = 'whatsapp.Avatar{'
2069
+ sv = 'whatsapp.Presence{'
2137
2070
  first = True
2138
2071
  for v in pr:
2139
2072
  if callable(v[1]):
@@ -2146,33 +2079,42 @@ class Avatar(go.GoClass):
2146
2079
  return sv + '}'
2147
2080
  def __repr__(self):
2148
2081
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2149
- sv = 'whatsapp.Avatar ( '
2082
+ sv = 'whatsapp.Presence ( '
2150
2083
  for v in pr:
2151
2084
  if not callable(v[1]):
2152
2085
  sv += v[0] + '=' + str(v[1]) + ', '
2153
2086
  return sv + ')'
2154
2087
  @property
2155
- def ID(self):
2156
- return _whatsapp.whatsapp_Avatar_ID_Get(self.handle)
2157
- @ID.setter
2158
- def ID(self, value):
2088
+ def JID(self):
2089
+ return _whatsapp.whatsapp_Presence_JID_Get(self.handle)
2090
+ @JID.setter
2091
+ def JID(self, value):
2159
2092
  if isinstance(value, go.GoClass):
2160
- _whatsapp.whatsapp_Avatar_ID_Set(self.handle, value.handle)
2093
+ _whatsapp.whatsapp_Presence_JID_Set(self.handle, value.handle)
2161
2094
  else:
2162
- _whatsapp.whatsapp_Avatar_ID_Set(self.handle, value)
2095
+ _whatsapp.whatsapp_Presence_JID_Set(self.handle, value)
2163
2096
  @property
2164
- def URL(self):
2165
- return _whatsapp.whatsapp_Avatar_URL_Get(self.handle)
2166
- @URL.setter
2167
- def URL(self, value):
2097
+ def Kind(self):
2098
+ return _whatsapp.whatsapp_Presence_Kind_Get(self.handle)
2099
+ @Kind.setter
2100
+ def Kind(self, value):
2168
2101
  if isinstance(value, go.GoClass):
2169
- _whatsapp.whatsapp_Avatar_URL_Set(self.handle, value.handle)
2102
+ _whatsapp.whatsapp_Presence_Kind_Set(self.handle, value.handle)
2170
2103
  else:
2171
- _whatsapp.whatsapp_Avatar_URL_Set(self.handle, value)
2104
+ _whatsapp.whatsapp_Presence_Kind_Set(self.handle, value)
2105
+ @property
2106
+ def LastSeen(self):
2107
+ return _whatsapp.whatsapp_Presence_LastSeen_Get(self.handle)
2108
+ @LastSeen.setter
2109
+ def LastSeen(self, value):
2110
+ if isinstance(value, go.GoClass):
2111
+ _whatsapp.whatsapp_Presence_LastSeen_Set(self.handle, value.handle)
2112
+ else:
2113
+ _whatsapp.whatsapp_Presence_LastSeen_Set(self.handle, value)
2172
2114
 
2173
- # Python type for struct whatsapp.EventPayload
2174
- class EventPayload(go.GoClass):
2175
- """EventPayload represents the collected payloads for all event types handled by the overarching\nsession adapter handler. Only specific fields will be populated in events emitted by internal\nhandlers, see documentation for specific types for more information.\n"""
2115
+ # Python type for struct whatsapp.Attachment
2116
+ class Attachment(go.GoClass):
2117
+ """A Attachment represents additional binary data (e.g. images, videos, documents) provided alongside\na message, for display or storage on the recepient client.\n"""
2176
2118
  def __init__(self, *args, **kwargs):
2177
2119
  """
2178
2120
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2186,53 +2128,29 @@ class EventPayload(go.GoClass):
2186
2128
  self.handle = args[0].handle
2187
2129
  _whatsapp.IncRef(self.handle)
2188
2130
  else:
2189
- self.handle = _whatsapp.whatsapp_EventPayload_CTor()
2131
+ self.handle = _whatsapp.whatsapp_Attachment_CTor()
2190
2132
  _whatsapp.IncRef(self.handle)
2191
2133
  if 0 < len(args):
2192
- self.QRCode = args[0]
2193
- if "QRCode" in kwargs:
2194
- self.QRCode = kwargs["QRCode"]
2134
+ self.MIME = args[0]
2135
+ if "MIME" in kwargs:
2136
+ self.MIME = kwargs["MIME"]
2195
2137
  if 1 < len(args):
2196
- self.PairDeviceID = args[1]
2197
- if "PairDeviceID" in kwargs:
2198
- self.PairDeviceID = kwargs["PairDeviceID"]
2138
+ self.Filename = args[1]
2139
+ if "Filename" in kwargs:
2140
+ self.Filename = kwargs["Filename"]
2199
2141
  if 2 < len(args):
2200
- self.Connect = args[2]
2201
- if "Connect" in kwargs:
2202
- self.Connect = kwargs["Connect"]
2142
+ self.Caption = args[2]
2143
+ if "Caption" in kwargs:
2144
+ self.Caption = kwargs["Caption"]
2203
2145
  if 3 < len(args):
2204
- self.Contact = args[3]
2205
- if "Contact" in kwargs:
2206
- self.Contact = kwargs["Contact"]
2207
- if 4 < len(args):
2208
- self.Presence = args[4]
2209
- if "Presence" in kwargs:
2210
- self.Presence = kwargs["Presence"]
2211
- if 5 < len(args):
2212
- self.Message = args[5]
2213
- if "Message" in kwargs:
2214
- self.Message = kwargs["Message"]
2215
- if 6 < len(args):
2216
- self.ChatState = args[6]
2217
- if "ChatState" in kwargs:
2218
- self.ChatState = kwargs["ChatState"]
2219
- if 7 < len(args):
2220
- self.Receipt = args[7]
2221
- if "Receipt" in kwargs:
2222
- self.Receipt = kwargs["Receipt"]
2223
- if 8 < len(args):
2224
- self.Group = args[8]
2225
- if "Group" in kwargs:
2226
- self.Group = kwargs["Group"]
2227
- if 9 < len(args):
2228
- self.Call = args[9]
2229
- if "Call" in kwargs:
2230
- self.Call = kwargs["Call"]
2146
+ self.Data = args[3]
2147
+ if "Data" in kwargs:
2148
+ self.Data = kwargs["Data"]
2231
2149
  def __del__(self):
2232
2150
  _whatsapp.DecRef(self.handle)
2233
2151
  def __str__(self):
2234
2152
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2235
- sv = 'whatsapp.EventPayload{'
2153
+ sv = 'whatsapp.Attachment{'
2236
2154
  first = True
2237
2155
  for v in pr:
2238
2156
  if callable(v[1]):
@@ -2245,101 +2163,133 @@ class EventPayload(go.GoClass):
2245
2163
  return sv + '}'
2246
2164
  def __repr__(self):
2247
2165
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2248
- sv = 'whatsapp.EventPayload ( '
2166
+ sv = 'whatsapp.Attachment ( '
2249
2167
  for v in pr:
2250
2168
  if not callable(v[1]):
2251
2169
  sv += v[0] + '=' + str(v[1]) + ', '
2252
2170
  return sv + ')'
2253
2171
  @property
2254
- def QRCode(self):
2255
- return _whatsapp.whatsapp_EventPayload_QRCode_Get(self.handle)
2256
- @QRCode.setter
2257
- def QRCode(self, value):
2258
- if isinstance(value, go.GoClass):
2259
- _whatsapp.whatsapp_EventPayload_QRCode_Set(self.handle, value.handle)
2260
- else:
2261
- _whatsapp.whatsapp_EventPayload_QRCode_Set(self.handle, value)
2262
- @property
2263
- def PairDeviceID(self):
2264
- return _whatsapp.whatsapp_EventPayload_PairDeviceID_Get(self.handle)
2265
- @PairDeviceID.setter
2266
- def PairDeviceID(self, value):
2267
- if isinstance(value, go.GoClass):
2268
- _whatsapp.whatsapp_EventPayload_PairDeviceID_Set(self.handle, value.handle)
2269
- else:
2270
- _whatsapp.whatsapp_EventPayload_PairDeviceID_Set(self.handle, value)
2271
- @property
2272
- def Connect(self):
2273
- return Connect(handle=_whatsapp.whatsapp_EventPayload_Connect_Get(self.handle))
2274
- @Connect.setter
2275
- def Connect(self, value):
2276
- if isinstance(value, go.GoClass):
2277
- _whatsapp.whatsapp_EventPayload_Connect_Set(self.handle, value.handle)
2278
- else:
2279
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2280
- @property
2281
- def Contact(self):
2282
- return Contact(handle=_whatsapp.whatsapp_EventPayload_Contact_Get(self.handle))
2283
- @Contact.setter
2284
- def Contact(self, value):
2172
+ def MIME(self):
2173
+ return _whatsapp.whatsapp_Attachment_MIME_Get(self.handle)
2174
+ @MIME.setter
2175
+ def MIME(self, value):
2285
2176
  if isinstance(value, go.GoClass):
2286
- _whatsapp.whatsapp_EventPayload_Contact_Set(self.handle, value.handle)
2177
+ _whatsapp.whatsapp_Attachment_MIME_Set(self.handle, value.handle)
2287
2178
  else:
2288
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2179
+ _whatsapp.whatsapp_Attachment_MIME_Set(self.handle, value)
2289
2180
  @property
2290
- def Presence(self):
2291
- return Presence(handle=_whatsapp.whatsapp_EventPayload_Presence_Get(self.handle))
2292
- @Presence.setter
2293
- def Presence(self, value):
2181
+ def Filename(self):
2182
+ return _whatsapp.whatsapp_Attachment_Filename_Get(self.handle)
2183
+ @Filename.setter
2184
+ def Filename(self, value):
2294
2185
  if isinstance(value, go.GoClass):
2295
- _whatsapp.whatsapp_EventPayload_Presence_Set(self.handle, value.handle)
2186
+ _whatsapp.whatsapp_Attachment_Filename_Set(self.handle, value.handle)
2296
2187
  else:
2297
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2188
+ _whatsapp.whatsapp_Attachment_Filename_Set(self.handle, value)
2298
2189
  @property
2299
- def Message(self):
2300
- return Message(handle=_whatsapp.whatsapp_EventPayload_Message_Get(self.handle))
2301
- @Message.setter
2302
- def Message(self, value):
2190
+ def Caption(self):
2191
+ return _whatsapp.whatsapp_Attachment_Caption_Get(self.handle)
2192
+ @Caption.setter
2193
+ def Caption(self, value):
2303
2194
  if isinstance(value, go.GoClass):
2304
- _whatsapp.whatsapp_EventPayload_Message_Set(self.handle, value.handle)
2195
+ _whatsapp.whatsapp_Attachment_Caption_Set(self.handle, value.handle)
2305
2196
  else:
2306
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2197
+ _whatsapp.whatsapp_Attachment_Caption_Set(self.handle, value)
2307
2198
  @property
2308
- def ChatState(self):
2309
- return ChatState(handle=_whatsapp.whatsapp_EventPayload_ChatState_Get(self.handle))
2310
- @ChatState.setter
2311
- def ChatState(self, value):
2199
+ def Data(self):
2200
+ return go.Slice_byte(handle=_whatsapp.whatsapp_Attachment_Data_Get(self.handle))
2201
+ @Data.setter
2202
+ def Data(self, value):
2312
2203
  if isinstance(value, go.GoClass):
2313
- _whatsapp.whatsapp_EventPayload_ChatState_Set(self.handle, value.handle)
2204
+ _whatsapp.whatsapp_Attachment_Data_Set(self.handle, value.handle)
2314
2205
  else:
2315
2206
  raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2316
- @property
2317
- def Receipt(self):
2318
- return Receipt(handle=_whatsapp.whatsapp_EventPayload_Receipt_Get(self.handle))
2319
- @Receipt.setter
2320
- def Receipt(self, value):
2321
- if isinstance(value, go.GoClass):
2322
- _whatsapp.whatsapp_EventPayload_Receipt_Set(self.handle, value.handle)
2207
+ def GetSpec(self, ctx):
2208
+ """GetSpec(object ctx) object, str
2209
+
2210
+ GetSpec returns metadata for this attachment, as derived from the underlying attachment data.
2211
+ """
2212
+ return go.Ptr_media_Spec(handle=_whatsapp.whatsapp_Attachment_GetSpec(self.handle, ctx.handle))
2213
+
2214
+ # Python type for struct whatsapp.Call
2215
+ class Call(go.GoClass):
2216
+ """A Call represents an incoming or outgoing voice/video call made over WhatsApp. Full support for\ncalls is currently not implemented, and this structure contains the bare minimum data required\nfor notifying on missed calls.\n"""
2217
+ def __init__(self, *args, **kwargs):
2218
+ """
2219
+ handle=A Go-side object is always initialized with an explicit handle=arg
2220
+ otherwise parameters can be unnamed in order of field names or named fields
2221
+ in which case a new Go object is constructed first
2222
+ """
2223
+ if len(kwargs) == 1 and 'handle' in kwargs:
2224
+ self.handle = kwargs['handle']
2225
+ _whatsapp.IncRef(self.handle)
2226
+ elif len(args) == 1 and isinstance(args[0], go.GoClass):
2227
+ self.handle = args[0].handle
2228
+ _whatsapp.IncRef(self.handle)
2323
2229
  else:
2324
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2230
+ self.handle = _whatsapp.whatsapp_Call_CTor()
2231
+ _whatsapp.IncRef(self.handle)
2232
+ if 0 < len(args):
2233
+ self.State = args[0]
2234
+ if "State" in kwargs:
2235
+ self.State = kwargs["State"]
2236
+ if 1 < len(args):
2237
+ self.JID = args[1]
2238
+ if "JID" in kwargs:
2239
+ self.JID = kwargs["JID"]
2240
+ if 2 < len(args):
2241
+ self.Timestamp = args[2]
2242
+ if "Timestamp" in kwargs:
2243
+ self.Timestamp = kwargs["Timestamp"]
2244
+ def __del__(self):
2245
+ _whatsapp.DecRef(self.handle)
2246
+ def __str__(self):
2247
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2248
+ sv = 'whatsapp.Call{'
2249
+ first = True
2250
+ for v in pr:
2251
+ if callable(v[1]):
2252
+ continue
2253
+ if first:
2254
+ first = False
2255
+ else:
2256
+ sv += ', '
2257
+ sv += v[0] + '=' + str(v[1])
2258
+ return sv + '}'
2259
+ def __repr__(self):
2260
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2261
+ sv = 'whatsapp.Call ( '
2262
+ for v in pr:
2263
+ if not callable(v[1]):
2264
+ sv += v[0] + '=' + str(v[1]) + ', '
2265
+ return sv + ')'
2325
2266
  @property
2326
- def Group(self):
2327
- return Group(handle=_whatsapp.whatsapp_EventPayload_Group_Get(self.handle))
2328
- @Group.setter
2329
- def Group(self, value):
2267
+ def State(self):
2268
+ return _whatsapp.whatsapp_Call_State_Get(self.handle)
2269
+ @State.setter
2270
+ def State(self, value):
2330
2271
  if isinstance(value, go.GoClass):
2331
- _whatsapp.whatsapp_EventPayload_Group_Set(self.handle, value.handle)
2272
+ _whatsapp.whatsapp_Call_State_Set(self.handle, value.handle)
2332
2273
  else:
2333
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2274
+ _whatsapp.whatsapp_Call_State_Set(self.handle, value)
2334
2275
  @property
2335
- def Call(self):
2336
- return Call(handle=_whatsapp.whatsapp_EventPayload_Call_Get(self.handle))
2337
- @Call.setter
2338
- def Call(self, value):
2276
+ def JID(self):
2277
+ return _whatsapp.whatsapp_Call_JID_Get(self.handle)
2278
+ @JID.setter
2279
+ def JID(self, value):
2339
2280
  if isinstance(value, go.GoClass):
2340
- _whatsapp.whatsapp_EventPayload_Call_Set(self.handle, value.handle)
2281
+ _whatsapp.whatsapp_Call_JID_Set(self.handle, value.handle)
2341
2282
  else:
2342
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2283
+ _whatsapp.whatsapp_Call_JID_Set(self.handle, value)
2284
+ @property
2285
+ def Timestamp(self):
2286
+ return _whatsapp.whatsapp_Call_Timestamp_Get(self.handle)
2287
+ @Timestamp.setter
2288
+ def Timestamp(self, value):
2289
+ if isinstance(value, go.GoClass):
2290
+ _whatsapp.whatsapp_Call_Timestamp_Set(self.handle, value.handle)
2291
+ else:
2292
+ _whatsapp.whatsapp_Call_Timestamp_Set(self.handle, value)
2343
2293
 
2344
2294
  # Python type for struct whatsapp.Contact
2345
2295
  class Contact(go.GoClass):
@@ -2408,6 +2358,184 @@ class Contact(go.GoClass):
2408
2358
  else:
2409
2359
  _whatsapp.whatsapp_Contact_Name_Set(self.handle, value)
2410
2360
 
2361
+ # Python type for struct whatsapp.Gateway
2362
+ class Gateway(go.GoClass):
2363
+ """A Gateway represents a persistent process for establishing individual sessions between linked\ndevices and WhatsApp.\n"""
2364
+ def __init__(self, *args, **kwargs):
2365
+ """
2366
+ handle=A Go-side object is always initialized with an explicit handle=arg
2367
+ otherwise parameters can be unnamed in order of field names or named fields
2368
+ in which case a new Go object is constructed first
2369
+ """
2370
+ if len(kwargs) == 1 and 'handle' in kwargs:
2371
+ self.handle = kwargs['handle']
2372
+ _whatsapp.IncRef(self.handle)
2373
+ elif len(args) == 1 and isinstance(args[0], go.GoClass):
2374
+ self.handle = args[0].handle
2375
+ _whatsapp.IncRef(self.handle)
2376
+ else:
2377
+ self.handle = _whatsapp.whatsapp_Gateway_CTor()
2378
+ _whatsapp.IncRef(self.handle)
2379
+ if 0 < len(args):
2380
+ self.DBPath = args[0]
2381
+ if "DBPath" in kwargs:
2382
+ self.DBPath = kwargs["DBPath"]
2383
+ if 1 < len(args):
2384
+ self.Name = args[1]
2385
+ if "Name" in kwargs:
2386
+ self.Name = kwargs["Name"]
2387
+ if 2 < len(args):
2388
+ self.LogLevel = args[2]
2389
+ if "LogLevel" in kwargs:
2390
+ self.LogLevel = kwargs["LogLevel"]
2391
+ if 3 < len(args):
2392
+ self.TempDir = args[3]
2393
+ if "TempDir" in kwargs:
2394
+ self.TempDir = kwargs["TempDir"]
2395
+ def __del__(self):
2396
+ _whatsapp.DecRef(self.handle)
2397
+ def __str__(self):
2398
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2399
+ sv = 'whatsapp.Gateway{'
2400
+ first = True
2401
+ for v in pr:
2402
+ if callable(v[1]):
2403
+ continue
2404
+ if first:
2405
+ first = False
2406
+ else:
2407
+ sv += ', '
2408
+ sv += v[0] + '=' + str(v[1])
2409
+ return sv + '}'
2410
+ def __repr__(self):
2411
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2412
+ sv = 'whatsapp.Gateway ( '
2413
+ for v in pr:
2414
+ if not callable(v[1]):
2415
+ sv += v[0] + '=' + str(v[1]) + ', '
2416
+ return sv + ')'
2417
+ @property
2418
+ def DBPath(self):
2419
+ return _whatsapp.whatsapp_Gateway_DBPath_Get(self.handle)
2420
+ @DBPath.setter
2421
+ def DBPath(self, value):
2422
+ if isinstance(value, go.GoClass):
2423
+ _whatsapp.whatsapp_Gateway_DBPath_Set(self.handle, value.handle)
2424
+ else:
2425
+ _whatsapp.whatsapp_Gateway_DBPath_Set(self.handle, value)
2426
+ @property
2427
+ def Name(self):
2428
+ return _whatsapp.whatsapp_Gateway_Name_Get(self.handle)
2429
+ @Name.setter
2430
+ def Name(self, value):
2431
+ if isinstance(value, go.GoClass):
2432
+ _whatsapp.whatsapp_Gateway_Name_Set(self.handle, value.handle)
2433
+ else:
2434
+ _whatsapp.whatsapp_Gateway_Name_Set(self.handle, value)
2435
+ @property
2436
+ def LogLevel(self):
2437
+ return _whatsapp.whatsapp_Gateway_LogLevel_Get(self.handle)
2438
+ @LogLevel.setter
2439
+ def LogLevel(self, value):
2440
+ if isinstance(value, go.GoClass):
2441
+ _whatsapp.whatsapp_Gateway_LogLevel_Set(self.handle, value.handle)
2442
+ else:
2443
+ _whatsapp.whatsapp_Gateway_LogLevel_Set(self.handle, value)
2444
+ @property
2445
+ def TempDir(self):
2446
+ return _whatsapp.whatsapp_Gateway_TempDir_Get(self.handle)
2447
+ @TempDir.setter
2448
+ def TempDir(self, value):
2449
+ if isinstance(value, go.GoClass):
2450
+ _whatsapp.whatsapp_Gateway_TempDir_Set(self.handle, value.handle)
2451
+ else:
2452
+ _whatsapp.whatsapp_Gateway_TempDir_Set(self.handle, value)
2453
+ def Init(self):
2454
+ """Init() str
2455
+
2456
+ Init performs initialization procedures for the Gateway, and is expected to be run before any
2457
+ calls to [Gateway.Session].
2458
+ """
2459
+ return _whatsapp.whatsapp_Gateway_Init(self.handle)
2460
+ def NewSession(self, device):
2461
+ """NewSession(object device) object
2462
+
2463
+ NewSession returns a new [Session] for the LinkedDevice given. If the linked device does not have
2464
+ a valid ID, a pair operation will be required, as described in [Session.Login].
2465
+ """
2466
+ return Session(handle=_whatsapp.whatsapp_Gateway_NewSession(self.handle, device.handle))
2467
+ def CleanupSession(self, device):
2468
+ """CleanupSession(object device) str
2469
+
2470
+ CleanupSession will remove all invalid and obsolete references to the given device, and should be
2471
+ used when pairing a new device or unregistering from the Gateway.
2472
+ """
2473
+ return _whatsapp.whatsapp_Gateway_CleanupSession(self.handle, device.handle)
2474
+
2475
+ # Python type for struct whatsapp.LinkedDevice
2476
+ class LinkedDevice(go.GoClass):
2477
+ """A LinkedDevice represents a unique pairing session between the gateway and WhatsApp. It is not\nunique to the underlying \"main\" device (or phone number), as multiple linked devices may be paired\nwith any main device.\n"""
2478
+ def __init__(self, *args, **kwargs):
2479
+ """
2480
+ handle=A Go-side object is always initialized with an explicit handle=arg
2481
+ otherwise parameters can be unnamed in order of field names or named fields
2482
+ in which case a new Go object is constructed first
2483
+ """
2484
+ if len(kwargs) == 1 and 'handle' in kwargs:
2485
+ self.handle = kwargs['handle']
2486
+ _whatsapp.IncRef(self.handle)
2487
+ elif len(args) == 1 and isinstance(args[0], go.GoClass):
2488
+ self.handle = args[0].handle
2489
+ _whatsapp.IncRef(self.handle)
2490
+ else:
2491
+ self.handle = _whatsapp.whatsapp_LinkedDevice_CTor()
2492
+ _whatsapp.IncRef(self.handle)
2493
+ if 0 < len(args):
2494
+ self.ID = args[0]
2495
+ if "ID" in kwargs:
2496
+ self.ID = kwargs["ID"]
2497
+ def __del__(self):
2498
+ _whatsapp.DecRef(self.handle)
2499
+ def __str__(self):
2500
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2501
+ sv = 'whatsapp.LinkedDevice{'
2502
+ first = True
2503
+ for v in pr:
2504
+ if callable(v[1]):
2505
+ continue
2506
+ if first:
2507
+ first = False
2508
+ else:
2509
+ sv += ', '
2510
+ sv += v[0] + '=' + str(v[1])
2511
+ return sv + '}'
2512
+ def __repr__(self):
2513
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2514
+ sv = 'whatsapp.LinkedDevice ( '
2515
+ for v in pr:
2516
+ if not callable(v[1]):
2517
+ sv += v[0] + '=' + str(v[1]) + ', '
2518
+ return sv + ')'
2519
+ @property
2520
+ def ID(self):
2521
+ """ID is an opaque string identifying this LinkedDevice to the Session. Noted that this string
2522
+ is currently equivalent to a password, and needs to be protected accordingly.
2523
+ """
2524
+ return _whatsapp.whatsapp_LinkedDevice_ID_Get(self.handle)
2525
+ @ID.setter
2526
+ def ID(self, value):
2527
+ if isinstance(value, go.GoClass):
2528
+ _whatsapp.whatsapp_LinkedDevice_ID_Set(self.handle, value.handle)
2529
+ else:
2530
+ _whatsapp.whatsapp_LinkedDevice_ID_Set(self.handle, value)
2531
+ def JID(self):
2532
+ """JID() object
2533
+
2534
+ JID returns the WhatsApp JID corresponding to the LinkedDevice ID. Empty or invalid device IDs
2535
+ may return invalid JIDs, and this function does not handle errors.
2536
+ """
2537
+ return go.types_JID(handle=_whatsapp.whatsapp_LinkedDevice_JID(self.handle))
2538
+
2411
2539
  # Python type for struct whatsapp.Message
2412
2540
  class Message(go.GoClass):
2413
2541
  """A Message represents one of many kinds of bidirectional communication payloads, for example, a\ntext message, a file (image, video) attachment, an emoji reaction, etc. Messages of different\nkinds are denoted as such, and re-use fields where the semantics overlap.\n"""
@@ -2491,17 +2619,25 @@ class Message(go.GoClass):
2491
2619
  if "Album" in kwargs:
2492
2620
  self.Album = kwargs["Album"]
2493
2621
  if 16 < len(args):
2494
- self.MentionJIDs = args[16]
2622
+ self.GroupInvite = args[16]
2623
+ if "GroupInvite" in kwargs:
2624
+ self.GroupInvite = kwargs["GroupInvite"]
2625
+ if 17 < len(args):
2626
+ self.MentionJIDs = args[17]
2495
2627
  if "MentionJIDs" in kwargs:
2496
2628
  self.MentionJIDs = kwargs["MentionJIDs"]
2497
- if 17 < len(args):
2498
- self.Receipts = args[17]
2629
+ if 18 < len(args):
2630
+ self.Receipts = args[18]
2499
2631
  if "Receipts" in kwargs:
2500
2632
  self.Receipts = kwargs["Receipts"]
2501
- if 18 < len(args):
2502
- self.Reactions = args[18]
2633
+ if 19 < len(args):
2634
+ self.Reactions = args[19]
2503
2635
  if "Reactions" in kwargs:
2504
2636
  self.Reactions = kwargs["Reactions"]
2637
+ if 20 < len(args):
2638
+ self.IsHistory = args[20]
2639
+ if "IsHistory" in kwargs:
2640
+ self.IsHistory = kwargs["IsHistory"]
2505
2641
  def __del__(self):
2506
2642
  _whatsapp.DecRef(self.handle)
2507
2643
  def __str__(self):
@@ -2669,6 +2805,15 @@ class Message(go.GoClass):
2669
2805
  else:
2670
2806
  raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2671
2807
  @property
2808
+ def GroupInvite(self):
2809
+ return Group(handle=_whatsapp.whatsapp_Message_GroupInvite_Get(self.handle))
2810
+ @GroupInvite.setter
2811
+ def GroupInvite(self, value):
2812
+ if isinstance(value, go.GoClass):
2813
+ _whatsapp.whatsapp_Message_GroupInvite_Set(self.handle, value.handle)
2814
+ else:
2815
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2816
+ @property
2672
2817
  def MentionJIDs(self):
2673
2818
  return go.Slice_string(handle=_whatsapp.whatsapp_Message_MentionJIDs_Get(self.handle))
2674
2819
  @MentionJIDs.setter
@@ -2695,10 +2840,19 @@ class Message(go.GoClass):
2695
2840
  _whatsapp.whatsapp_Message_Reactions_Set(self.handle, value.handle)
2696
2841
  else:
2697
2842
  raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2843
+ @property
2844
+ def IsHistory(self):
2845
+ return _whatsapp.whatsapp_Message_IsHistory_Get(self.handle)
2846
+ @IsHistory.setter
2847
+ def IsHistory(self, value):
2848
+ if isinstance(value, go.GoClass):
2849
+ _whatsapp.whatsapp_Message_IsHistory_Set(self.handle, value.handle)
2850
+ else:
2851
+ _whatsapp.whatsapp_Message_IsHistory_Set(self.handle, value)
2698
2852
 
2699
- # Python type for struct whatsapp.PollOption
2700
- class PollOption(go.GoClass):
2701
- """A PollOption represents an individual choice within a broader poll.\n"""
2853
+ # Python type for struct whatsapp.Poll
2854
+ class Poll(go.GoClass):
2855
+ """A Poll represents a multiple-choice question, on which each choice might be voted for one or more\ntimes.\n"""
2702
2856
  def __init__(self, *args, **kwargs):
2703
2857
  """
2704
2858
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2712,17 +2866,21 @@ class PollOption(go.GoClass):
2712
2866
  self.handle = args[0].handle
2713
2867
  _whatsapp.IncRef(self.handle)
2714
2868
  else:
2715
- self.handle = _whatsapp.whatsapp_PollOption_CTor()
2869
+ self.handle = _whatsapp.whatsapp_Poll_CTor()
2716
2870
  _whatsapp.IncRef(self.handle)
2717
2871
  if 0 < len(args):
2718
2872
  self.Title = args[0]
2719
2873
  if "Title" in kwargs:
2720
2874
  self.Title = kwargs["Title"]
2875
+ if 1 < len(args):
2876
+ self.Options = args[1]
2877
+ if "Options" in kwargs:
2878
+ self.Options = kwargs["Options"]
2721
2879
  def __del__(self):
2722
2880
  _whatsapp.DecRef(self.handle)
2723
2881
  def __str__(self):
2724
2882
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2725
- sv = 'whatsapp.PollOption{'
2883
+ sv = 'whatsapp.Poll{'
2726
2884
  first = True
2727
2885
  for v in pr:
2728
2886
  if callable(v[1]):
@@ -2735,24 +2893,33 @@ class PollOption(go.GoClass):
2735
2893
  return sv + '}'
2736
2894
  def __repr__(self):
2737
2895
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2738
- sv = 'whatsapp.PollOption ( '
2896
+ sv = 'whatsapp.Poll ( '
2739
2897
  for v in pr:
2740
2898
  if not callable(v[1]):
2741
2899
  sv += v[0] + '=' + str(v[1]) + ', '
2742
2900
  return sv + ')'
2743
2901
  @property
2744
2902
  def Title(self):
2745
- return _whatsapp.whatsapp_PollOption_Title_Get(self.handle)
2903
+ return _whatsapp.whatsapp_Poll_Title_Get(self.handle)
2746
2904
  @Title.setter
2747
2905
  def Title(self, value):
2748
2906
  if isinstance(value, go.GoClass):
2749
- _whatsapp.whatsapp_PollOption_Title_Set(self.handle, value.handle)
2907
+ _whatsapp.whatsapp_Poll_Title_Set(self.handle, value.handle)
2750
2908
  else:
2751
- _whatsapp.whatsapp_PollOption_Title_Set(self.handle, value)
2909
+ _whatsapp.whatsapp_Poll_Title_Set(self.handle, value)
2910
+ @property
2911
+ def Options(self):
2912
+ return Slice_whatsapp_PollOption(handle=_whatsapp.whatsapp_Poll_Options_Get(self.handle))
2913
+ @Options.setter
2914
+ def Options(self, value):
2915
+ if isinstance(value, go.GoClass):
2916
+ _whatsapp.whatsapp_Poll_Options_Set(self.handle, value.handle)
2917
+ else:
2918
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2752
2919
 
2753
- # Python type for struct whatsapp.Receipt
2754
- class Receipt(go.GoClass):
2755
- """A Receipt represents a notice of delivery or presentation for [Message] instances sent or\nreceived. Receipts can be delivered for many messages at once, but are generally all delivered\nunder one specific state at a time.\n"""
2920
+ # Python type for struct whatsapp.Album
2921
+ class Album(go.GoClass):
2922
+ """A Album message represents a collection of media files, typically images and videos.\n"""
2756
2923
  def __init__(self, *args, **kwargs):
2757
2924
  """
2758
2925
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2766,37 +2933,25 @@ class Receipt(go.GoClass):
2766
2933
  self.handle = args[0].handle
2767
2934
  _whatsapp.IncRef(self.handle)
2768
2935
  else:
2769
- self.handle = _whatsapp.whatsapp_Receipt_CTor()
2936
+ self.handle = _whatsapp.whatsapp_Album_CTor()
2770
2937
  _whatsapp.IncRef(self.handle)
2771
2938
  if 0 < len(args):
2772
- self.Kind = args[0]
2773
- if "Kind" in kwargs:
2774
- self.Kind = kwargs["Kind"]
2939
+ self.IsAlbum = args[0]
2940
+ if "IsAlbum" in kwargs:
2941
+ self.IsAlbum = kwargs["IsAlbum"]
2775
2942
  if 1 < len(args):
2776
- self.MessageIDs = args[1]
2777
- if "MessageIDs" in kwargs:
2778
- self.MessageIDs = kwargs["MessageIDs"]
2943
+ self.ImageCount = args[1]
2944
+ if "ImageCount" in kwargs:
2945
+ self.ImageCount = kwargs["ImageCount"]
2779
2946
  if 2 < len(args):
2780
- self.JID = args[2]
2781
- if "JID" in kwargs:
2782
- self.JID = kwargs["JID"]
2783
- if 3 < len(args):
2784
- self.GroupJID = args[3]
2785
- if "GroupJID" in kwargs:
2786
- self.GroupJID = kwargs["GroupJID"]
2787
- if 4 < len(args):
2788
- self.Timestamp = args[4]
2789
- if "Timestamp" in kwargs:
2790
- self.Timestamp = kwargs["Timestamp"]
2791
- if 5 < len(args):
2792
- self.IsCarbon = args[5]
2793
- if "IsCarbon" in kwargs:
2794
- self.IsCarbon = kwargs["IsCarbon"]
2947
+ self.VideoCount = args[2]
2948
+ if "VideoCount" in kwargs:
2949
+ self.VideoCount = kwargs["VideoCount"]
2795
2950
  def __del__(self):
2796
2951
  _whatsapp.DecRef(self.handle)
2797
2952
  def __str__(self):
2798
2953
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2799
- sv = 'whatsapp.Receipt{'
2954
+ sv = 'whatsapp.Album{'
2800
2955
  first = True
2801
2956
  for v in pr:
2802
2957
  if callable(v[1]):
@@ -2809,69 +2964,42 @@ class Receipt(go.GoClass):
2809
2964
  return sv + '}'
2810
2965
  def __repr__(self):
2811
2966
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2812
- sv = 'whatsapp.Receipt ( '
2967
+ sv = 'whatsapp.Album ( '
2813
2968
  for v in pr:
2814
2969
  if not callable(v[1]):
2815
2970
  sv += v[0] + '=' + str(v[1]) + ', '
2816
2971
  return sv + ')'
2817
2972
  @property
2818
- def Kind(self):
2819
- return _whatsapp.whatsapp_Receipt_Kind_Get(self.handle)
2820
- @Kind.setter
2821
- def Kind(self, value):
2822
- if isinstance(value, go.GoClass):
2823
- _whatsapp.whatsapp_Receipt_Kind_Set(self.handle, value.handle)
2824
- else:
2825
- _whatsapp.whatsapp_Receipt_Kind_Set(self.handle, value)
2826
- @property
2827
- def MessageIDs(self):
2828
- return go.Slice_string(handle=_whatsapp.whatsapp_Receipt_MessageIDs_Get(self.handle))
2829
- @MessageIDs.setter
2830
- def MessageIDs(self, value):
2831
- if isinstance(value, go.GoClass):
2832
- _whatsapp.whatsapp_Receipt_MessageIDs_Set(self.handle, value.handle)
2833
- else:
2834
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2835
- @property
2836
- def JID(self):
2837
- return _whatsapp.whatsapp_Receipt_JID_Get(self.handle)
2838
- @JID.setter
2839
- def JID(self, value):
2840
- if isinstance(value, go.GoClass):
2841
- _whatsapp.whatsapp_Receipt_JID_Set(self.handle, value.handle)
2842
- else:
2843
- _whatsapp.whatsapp_Receipt_JID_Set(self.handle, value)
2844
- @property
2845
- def GroupJID(self):
2846
- return _whatsapp.whatsapp_Receipt_GroupJID_Get(self.handle)
2847
- @GroupJID.setter
2848
- def GroupJID(self, value):
2973
+ def IsAlbum(self):
2974
+ return _whatsapp.whatsapp_Album_IsAlbum_Get(self.handle)
2975
+ @IsAlbum.setter
2976
+ def IsAlbum(self, value):
2849
2977
  if isinstance(value, go.GoClass):
2850
- _whatsapp.whatsapp_Receipt_GroupJID_Set(self.handle, value.handle)
2978
+ _whatsapp.whatsapp_Album_IsAlbum_Set(self.handle, value.handle)
2851
2979
  else:
2852
- _whatsapp.whatsapp_Receipt_GroupJID_Set(self.handle, value)
2980
+ _whatsapp.whatsapp_Album_IsAlbum_Set(self.handle, value)
2853
2981
  @property
2854
- def Timestamp(self):
2855
- return _whatsapp.whatsapp_Receipt_Timestamp_Get(self.handle)
2856
- @Timestamp.setter
2857
- def Timestamp(self, value):
2982
+ def ImageCount(self):
2983
+ return _whatsapp.whatsapp_Album_ImageCount_Get(self.handle)
2984
+ @ImageCount.setter
2985
+ def ImageCount(self, value):
2858
2986
  if isinstance(value, go.GoClass):
2859
- _whatsapp.whatsapp_Receipt_Timestamp_Set(self.handle, value.handle)
2987
+ _whatsapp.whatsapp_Album_ImageCount_Set(self.handle, value.handle)
2860
2988
  else:
2861
- _whatsapp.whatsapp_Receipt_Timestamp_Set(self.handle, value)
2989
+ _whatsapp.whatsapp_Album_ImageCount_Set(self.handle, value)
2862
2990
  @property
2863
- def IsCarbon(self):
2864
- return _whatsapp.whatsapp_Receipt_IsCarbon_Get(self.handle)
2865
- @IsCarbon.setter
2866
- def IsCarbon(self, value):
2991
+ def VideoCount(self):
2992
+ return _whatsapp.whatsapp_Album_VideoCount_Get(self.handle)
2993
+ @VideoCount.setter
2994
+ def VideoCount(self, value):
2867
2995
  if isinstance(value, go.GoClass):
2868
- _whatsapp.whatsapp_Receipt_IsCarbon_Set(self.handle, value.handle)
2996
+ _whatsapp.whatsapp_Album_VideoCount_Set(self.handle, value.handle)
2869
2997
  else:
2870
- _whatsapp.whatsapp_Receipt_IsCarbon_Set(self.handle, value)
2998
+ _whatsapp.whatsapp_Album_VideoCount_Set(self.handle, value)
2871
2999
 
2872
- # Python type for struct whatsapp.Session
2873
- class Session(go.GoClass):
2874
- """A Session represents a connection (active or not) between a linked device and WhatsApp. Active\nsessions need to be established by logging in, after which incoming events will be forwarded to\nthe adapter event handler, and outgoing events will be forwarded to WhatsApp.\n"""
3000
+ # Python type for struct whatsapp.Group
3001
+ class Group(go.GoClass):
3002
+ """A Group represents a named, many-to-many chat space which may be joined or left at will. All\nfields apart from the group JID are considered to be optional, and may not be set in cases where\ngroup information is being updated against previous assumed state. Groups in WhatsApp are\ngenerally invited to out-of-band with respect to overarching adaptor; see the documentation for\n[Session.GetGroups] for more information.\n"""
2875
3003
  def __init__(self, *args, **kwargs):
2876
3004
  """
2877
3005
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2885,186 +3013,112 @@ class Session(go.GoClass):
2885
3013
  self.handle = args[0].handle
2886
3014
  _whatsapp.IncRef(self.handle)
2887
3015
  else:
2888
- self.handle = _whatsapp.whatsapp_Session_CTor()
3016
+ self.handle = _whatsapp.whatsapp_Group_CTor()
2889
3017
  _whatsapp.IncRef(self.handle)
2890
- def __del__(self):
2891
- _whatsapp.DecRef(self.handle)
2892
- def __str__(self):
2893
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2894
- sv = 'whatsapp.Session{'
2895
- first = True
2896
- for v in pr:
2897
- if callable(v[1]):
2898
- continue
2899
- if first:
2900
- first = False
2901
- else:
2902
- sv += ', '
2903
- sv += v[0] + '=' + str(v[1])
2904
- return sv + '}'
2905
- def __repr__(self):
2906
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2907
- sv = 'whatsapp.Session ( '
2908
- for v in pr:
2909
- if not callable(v[1]):
2910
- sv += v[0] + '=' + str(v[1]) + ', '
2911
- return sv + ')'
2912
- def Login(self):
2913
- """Login() str
2914
-
2915
- Login attempts to authenticate the given [Session], either by re-using the [LinkedDevice] attached
2916
- or by initiating a pairing session for a new linked device. Callers are expected to have set an
2917
- event handler in order to receive any incoming events from the underlying WhatsApp session.
2918
- """
2919
- return _whatsapp.whatsapp_Session_Login(self.handle)
2920
- def Logout(self):
2921
- """Logout() str
2922
-
2923
- Logout disconnects and removes the current linked device locally and initiates a logout remotely.
2924
- """
2925
- return _whatsapp.whatsapp_Session_Logout(self.handle)
2926
- def Disconnect(self):
2927
- """Disconnect() str
2928
-
2929
- Disconnects detaches the current connection to WhatsApp without removing any linked device state.
2930
- """
2931
- return _whatsapp.whatsapp_Session_Disconnect(self.handle)
2932
- def PairPhone(self, phone):
2933
- """PairPhone(str phone) str, str
2934
-
2935
- PairPhone returns a one-time code from WhatsApp, used for pairing this [Session] against the
2936
- user's primary device, as identified by the given phone number. This will return an error if the
2937
- [Session] is already paired, or if the phone number given is empty or invalid.
2938
- """
2939
- return _whatsapp.whatsapp_Session_PairPhone(self.handle, phone)
2940
- def SendMessage(self, message):
2941
- """SendMessage(object message) str
2942
-
2943
- SendMessage processes the given Message and sends a WhatsApp message for the kind and contact JID
2944
- specified within. In general, different message kinds require different fields to be set; see the
2945
- documentation for the [Message] type for more information.
2946
- """
2947
- return _whatsapp.whatsapp_Session_SendMessage(self.handle, message.handle)
2948
- def GenerateMessageID(self):
2949
- """GenerateMessageID() str
2950
-
2951
- GenerateMessageID returns a valid, pseudo-random message ID for use in outgoing messages.
2952
- """
2953
- return _whatsapp.whatsapp_Session_GenerateMessageID(self.handle)
2954
- def SendChatState(self, state):
2955
- """SendChatState(object state) str
2956
-
2957
- SendChatState sends the given chat state notification (e.g. composing message) to WhatsApp for the
2958
- contact specified within.
2959
- """
2960
- return _whatsapp.whatsapp_Session_SendChatState(self.handle, state.handle)
2961
- def SendReceipt(self, receipt):
2962
- """SendReceipt(object receipt) str
2963
-
2964
- SendReceipt sends a read receipt to WhatsApp for the message IDs specified within.
2965
- """
2966
- return _whatsapp.whatsapp_Session_SendReceipt(self.handle, receipt.handle)
2967
- def SendPresence(self, presence, statusMessage):
2968
- """SendPresence(int presence, str statusMessage) str
2969
-
2970
- SendPresence sets the activity state and (optional) status message for the current session and
2971
- user. An error is returned if setting availability fails for any reason.
2972
- """
2973
- return _whatsapp.whatsapp_Session_SendPresence(self.handle, presence, statusMessage)
2974
- def GetContacts(self, refresh):
2975
- """GetContacts(bool refresh) []object, str
2976
-
2977
- GetContacts subscribes to the WhatsApp roster currently stored in the Session's internal state.
2978
- If `refresh` is `true`, FetchRoster will pull application state from the remote service and
2979
- synchronize any contacts found with the adapter.
2980
- """
2981
- return Slice_whatsapp_Contact(handle=_whatsapp.whatsapp_Session_GetContacts(self.handle, refresh))
2982
- def GetGroups(self):
2983
- """GetGroups() []object, str
2984
-
2985
- GetGroups returns a list of all group-chats currently joined in WhatsApp, along with additional
2986
- information on present participants.
2987
- """
2988
- return Slice_whatsapp_Group(handle=_whatsapp.whatsapp_Session_GetGroups(self.handle))
2989
- def CreateGroup(self, name, participants):
2990
- """CreateGroup(str name, []str participants) object, str
2991
-
2992
- CreateGroup attempts to create a new WhatsApp group for the given human-readable name and
2993
- participant JIDs given.
2994
- """
2995
- return Group(handle=_whatsapp.whatsapp_Session_CreateGroup(self.handle, name, participants.handle))
2996
- def LeaveGroup(self, resourceID):
2997
- """LeaveGroup(str resourceID) str
2998
-
2999
- LeaveGroup attempts to remove our own user from the given WhatsApp group, for the JID given.
3000
- """
3001
- return _whatsapp.whatsapp_Session_LeaveGroup(self.handle, resourceID)
3002
- def GetAvatar(self, resourceID, avatarID):
3003
- """GetAvatar(str resourceID, str avatarID) object, str
3004
-
3005
- GetAvatar fetches a profile picture for the Contact or Group JID given. If a non-empty `avatarID`
3006
- is also given, GetAvatar will return an empty [Avatar] instance with no error if the remote state
3007
- for the given ID has not changed.
3008
- """
3009
- return Avatar(handle=_whatsapp.whatsapp_Session_GetAvatar(self.handle, resourceID, avatarID))
3010
- def SetAvatar(self, resourceID, avatar):
3011
- """SetAvatar(str resourceID, []int avatar) str, str
3012
-
3013
- SetAvatar updates the profile picture for the Contact or Group JID given; it can also update the
3014
- profile picture for our own user by providing an empty JID. The unique picture ID is returned,
3015
- typically used as a cache reference or in providing to future calls for [Session.GetAvatar].
3016
- """
3017
- return _whatsapp.whatsapp_Session_SetAvatar(self.handle, resourceID, avatar.handle)
3018
- def SetGroupName(self, resourceID, name):
3019
- """SetGroupName(str resourceID, str name) str
3020
-
3021
- SetGroupName updates the name of a WhatsApp group for the Group JID given.
3022
- """
3023
- return _whatsapp.whatsapp_Session_SetGroupName(self.handle, resourceID, name)
3024
- def SetGroupTopic(self, resourceID, topic):
3025
- """SetGroupTopic(str resourceID, str topic) str
3026
-
3027
- SetGroupName updates the topic of a WhatsApp group for the Group JID given.
3028
- """
3029
- return _whatsapp.whatsapp_Session_SetGroupTopic(self.handle, resourceID, topic)
3030
- def UpdateGroupParticipants(self, resourceID, participants):
3031
- """UpdateGroupParticipants(str resourceID, []object participants) []object, str
3032
-
3033
- UpdateGroupParticipants processes changes to the given group's participants, including additions,
3034
- removals, and changes to privileges. Participant JIDs given must be part of the authenticated
3035
- session's roster at least, and must also be active group participants for other types of changes.
3036
- """
3037
- return Slice_whatsapp_GroupParticipant(handle=_whatsapp.whatsapp_Session_UpdateGroupParticipants(self.handle, resourceID, participants.handle))
3038
- def FindContact(self, phone):
3039
- """FindContact(str phone) object, str
3040
-
3041
- FindContact attempts to check for a registered contact on WhatsApp corresponding to the given
3042
- phone number, returning a concrete instance if found; typically, only the contact JID is set. No
3043
- error is returned if no contact was found, but any unexpected errors will otherwise be returned
3044
- directly.
3045
- """
3046
- return Contact(handle=_whatsapp.whatsapp_Session_FindContact(self.handle, phone))
3047
- def RequestMessageHistory(self, resourceID, oldestMessage):
3048
- """RequestMessageHistory(str resourceID, object oldestMessage) str
3049
-
3050
- RequestMessageHistory sends and asynchronous request for message history related to the given
3051
- resource (e.g. Contact or Group JID), ending at the oldest message given. Messages returned from
3052
- history should then be handled as a `HistorySync` event of type `ON_DEMAND`, in the session-wide
3053
- event handler. An error will be returned if requesting history fails for any reason.
3054
- """
3055
- return _whatsapp.whatsapp_Session_RequestMessageHistory(self.handle, resourceID, oldestMessage.handle)
3056
- def SetEventHandler(self, h, goRun=False):
3057
- """SetEventHandler(callable h)
3058
-
3059
- SetEventHandler assigns the given handler function for propagating internal events into the Python
3060
- gateway. Note that the event handler function is not entirely safe to use directly, and all calls
3061
- should instead be sent to the [Gateway] via its internal call channel.
3062
- """
3063
- _whatsapp.whatsapp_Session_SetEventHandler(self.handle, h, goRun)
3018
+ if 0 < len(args):
3019
+ self.JID = args[0]
3020
+ if "JID" in kwargs:
3021
+ self.JID = kwargs["JID"]
3022
+ if 1 < len(args):
3023
+ self.Name = args[1]
3024
+ if "Name" in kwargs:
3025
+ self.Name = kwargs["Name"]
3026
+ if 2 < len(args):
3027
+ self.Subject = args[2]
3028
+ if "Subject" in kwargs:
3029
+ self.Subject = kwargs["Subject"]
3030
+ if 3 < len(args):
3031
+ self.Nickname = args[3]
3032
+ if "Nickname" in kwargs:
3033
+ self.Nickname = kwargs["Nickname"]
3034
+ if 4 < len(args):
3035
+ self.Participants = args[4]
3036
+ if "Participants" in kwargs:
3037
+ self.Participants = kwargs["Participants"]
3038
+ if 5 < len(args):
3039
+ self.InviteCode = args[5]
3040
+ if "InviteCode" in kwargs:
3041
+ self.InviteCode = kwargs["InviteCode"]
3042
+ def __del__(self):
3043
+ _whatsapp.DecRef(self.handle)
3044
+ def __str__(self):
3045
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
3046
+ sv = 'whatsapp.Group{'
3047
+ first = True
3048
+ for v in pr:
3049
+ if callable(v[1]):
3050
+ continue
3051
+ if first:
3052
+ first = False
3053
+ else:
3054
+ sv += ', '
3055
+ sv += v[0] + '=' + str(v[1])
3056
+ return sv + '}'
3057
+ def __repr__(self):
3058
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
3059
+ sv = 'whatsapp.Group ( '
3060
+ for v in pr:
3061
+ if not callable(v[1]):
3062
+ sv += v[0] + '=' + str(v[1]) + ', '
3063
+ return sv + ')'
3064
+ @property
3065
+ def JID(self):
3066
+ return _whatsapp.whatsapp_Group_JID_Get(self.handle)
3067
+ @JID.setter
3068
+ def JID(self, value):
3069
+ if isinstance(value, go.GoClass):
3070
+ _whatsapp.whatsapp_Group_JID_Set(self.handle, value.handle)
3071
+ else:
3072
+ _whatsapp.whatsapp_Group_JID_Set(self.handle, value)
3073
+ @property
3074
+ def Name(self):
3075
+ return _whatsapp.whatsapp_Group_Name_Get(self.handle)
3076
+ @Name.setter
3077
+ def Name(self, value):
3078
+ if isinstance(value, go.GoClass):
3079
+ _whatsapp.whatsapp_Group_Name_Set(self.handle, value.handle)
3080
+ else:
3081
+ _whatsapp.whatsapp_Group_Name_Set(self.handle, value)
3082
+ @property
3083
+ def Subject(self):
3084
+ return GroupSubject(handle=_whatsapp.whatsapp_Group_Subject_Get(self.handle))
3085
+ @Subject.setter
3086
+ def Subject(self, value):
3087
+ if isinstance(value, go.GoClass):
3088
+ _whatsapp.whatsapp_Group_Subject_Set(self.handle, value.handle)
3089
+ else:
3090
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
3091
+ @property
3092
+ def Nickname(self):
3093
+ return _whatsapp.whatsapp_Group_Nickname_Get(self.handle)
3094
+ @Nickname.setter
3095
+ def Nickname(self, value):
3096
+ if isinstance(value, go.GoClass):
3097
+ _whatsapp.whatsapp_Group_Nickname_Set(self.handle, value.handle)
3098
+ else:
3099
+ _whatsapp.whatsapp_Group_Nickname_Set(self.handle, value)
3100
+ @property
3101
+ def Participants(self):
3102
+ return Slice_whatsapp_GroupParticipant(handle=_whatsapp.whatsapp_Group_Participants_Get(self.handle))
3103
+ @Participants.setter
3104
+ def Participants(self, value):
3105
+ if isinstance(value, go.GoClass):
3106
+ _whatsapp.whatsapp_Group_Participants_Set(self.handle, value.handle)
3107
+ else:
3108
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
3109
+ @property
3110
+ def InviteCode(self):
3111
+ return _whatsapp.whatsapp_Group_InviteCode_Get(self.handle)
3112
+ @InviteCode.setter
3113
+ def InviteCode(self, value):
3114
+ if isinstance(value, go.GoClass):
3115
+ _whatsapp.whatsapp_Group_InviteCode_Set(self.handle, value.handle)
3116
+ else:
3117
+ _whatsapp.whatsapp_Group_InviteCode_Set(self.handle, value)
3064
3118
 
3065
- # Python type for struct whatsapp.Album
3066
- class Album(go.GoClass):
3067
- """A Album message represents a collection of media files, typically images and videos.\n"""
3119
+ # Python type for struct whatsapp.GroupParticipant
3120
+ class GroupParticipant(go.GoClass):
3121
+ """A GroupParticipant represents a contact who is currently joined in a given group. Participants in\nWhatsApp can generally be derived back to their individual [Contact]; there are no anonymous groups\nin WhatsApp.\n"""
3068
3122
  def __init__(self, *args, **kwargs):
3069
3123
  """
3070
3124
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -3078,25 +3132,29 @@ class Album(go.GoClass):
3078
3132
  self.handle = args[0].handle
3079
3133
  _whatsapp.IncRef(self.handle)
3080
3134
  else:
3081
- self.handle = _whatsapp.whatsapp_Album_CTor()
3135
+ self.handle = _whatsapp.whatsapp_GroupParticipant_CTor()
3082
3136
  _whatsapp.IncRef(self.handle)
3083
3137
  if 0 < len(args):
3084
- self.IsAlbum = args[0]
3085
- if "IsAlbum" in kwargs:
3086
- self.IsAlbum = kwargs["IsAlbum"]
3138
+ self.JID = args[0]
3139
+ if "JID" in kwargs:
3140
+ self.JID = kwargs["JID"]
3087
3141
  if 1 < len(args):
3088
- self.ImageCount = args[1]
3089
- if "ImageCount" in kwargs:
3090
- self.ImageCount = kwargs["ImageCount"]
3142
+ self.Nickname = args[1]
3143
+ if "Nickname" in kwargs:
3144
+ self.Nickname = kwargs["Nickname"]
3091
3145
  if 2 < len(args):
3092
- self.VideoCount = args[2]
3093
- if "VideoCount" in kwargs:
3094
- self.VideoCount = kwargs["VideoCount"]
3146
+ self.Affiliation = args[2]
3147
+ if "Affiliation" in kwargs:
3148
+ self.Affiliation = kwargs["Affiliation"]
3149
+ if 3 < len(args):
3150
+ self.Action = args[3]
3151
+ if "Action" in kwargs:
3152
+ self.Action = kwargs["Action"]
3095
3153
  def __del__(self):
3096
3154
  _whatsapp.DecRef(self.handle)
3097
3155
  def __str__(self):
3098
3156
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
3099
- sv = 'whatsapp.Album{'
3157
+ sv = 'whatsapp.GroupParticipant{'
3100
3158
  first = True
3101
3159
  for v in pr:
3102
3160
  if callable(v[1]):
@@ -3109,42 +3167,51 @@ class Album(go.GoClass):
3109
3167
  return sv + '}'
3110
3168
  def __repr__(self):
3111
3169
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
3112
- sv = 'whatsapp.Album ( '
3170
+ sv = 'whatsapp.GroupParticipant ( '
3113
3171
  for v in pr:
3114
3172
  if not callable(v[1]):
3115
3173
  sv += v[0] + '=' + str(v[1]) + ', '
3116
3174
  return sv + ')'
3117
3175
  @property
3118
- def IsAlbum(self):
3119
- return _whatsapp.whatsapp_Album_IsAlbum_Get(self.handle)
3120
- @IsAlbum.setter
3121
- def IsAlbum(self, value):
3176
+ def JID(self):
3177
+ return _whatsapp.whatsapp_GroupParticipant_JID_Get(self.handle)
3178
+ @JID.setter
3179
+ def JID(self, value):
3122
3180
  if isinstance(value, go.GoClass):
3123
- _whatsapp.whatsapp_Album_IsAlbum_Set(self.handle, value.handle)
3181
+ _whatsapp.whatsapp_GroupParticipant_JID_Set(self.handle, value.handle)
3124
3182
  else:
3125
- _whatsapp.whatsapp_Album_IsAlbum_Set(self.handle, value)
3183
+ _whatsapp.whatsapp_GroupParticipant_JID_Set(self.handle, value)
3126
3184
  @property
3127
- def ImageCount(self):
3128
- return _whatsapp.whatsapp_Album_ImageCount_Get(self.handle)
3129
- @ImageCount.setter
3130
- def ImageCount(self, value):
3185
+ def Nickname(self):
3186
+ return _whatsapp.whatsapp_GroupParticipant_Nickname_Get(self.handle)
3187
+ @Nickname.setter
3188
+ def Nickname(self, value):
3131
3189
  if isinstance(value, go.GoClass):
3132
- _whatsapp.whatsapp_Album_ImageCount_Set(self.handle, value.handle)
3190
+ _whatsapp.whatsapp_GroupParticipant_Nickname_Set(self.handle, value.handle)
3133
3191
  else:
3134
- _whatsapp.whatsapp_Album_ImageCount_Set(self.handle, value)
3192
+ _whatsapp.whatsapp_GroupParticipant_Nickname_Set(self.handle, value)
3135
3193
  @property
3136
- def VideoCount(self):
3137
- return _whatsapp.whatsapp_Album_VideoCount_Get(self.handle)
3138
- @VideoCount.setter
3139
- def VideoCount(self, value):
3194
+ def Affiliation(self):
3195
+ return _whatsapp.whatsapp_GroupParticipant_Affiliation_Get(self.handle)
3196
+ @Affiliation.setter
3197
+ def Affiliation(self, value):
3140
3198
  if isinstance(value, go.GoClass):
3141
- _whatsapp.whatsapp_Album_VideoCount_Set(self.handle, value.handle)
3199
+ _whatsapp.whatsapp_GroupParticipant_Affiliation_Set(self.handle, value.handle)
3142
3200
  else:
3143
- _whatsapp.whatsapp_Album_VideoCount_Set(self.handle, value)
3201
+ _whatsapp.whatsapp_GroupParticipant_Affiliation_Set(self.handle, value)
3202
+ @property
3203
+ def Action(self):
3204
+ return _whatsapp.whatsapp_GroupParticipant_Action_Get(self.handle)
3205
+ @Action.setter
3206
+ def Action(self, value):
3207
+ if isinstance(value, go.GoClass):
3208
+ _whatsapp.whatsapp_GroupParticipant_Action_Set(self.handle, value.handle)
3209
+ else:
3210
+ _whatsapp.whatsapp_GroupParticipant_Action_Set(self.handle, value)
3144
3211
 
3145
- # Python type for struct whatsapp.Connect
3146
- class Connect(go.GoClass):
3147
- """Connect represents event data related to a connection to WhatsApp being established, or failing\nto do so (based on the [Connect.Error] result).\n"""
3212
+ # Python type for struct whatsapp.Receipt
3213
+ class Receipt(go.GoClass):
3214
+ """A Receipt represents a notice of delivery or presentation for [Message] instances sent or\nreceived. Receipts can be delivered for many messages at once, but are generally all delivered\nunder one specific state at a time.\n"""
3148
3215
  def __init__(self, *args, **kwargs):
3149
3216
  """
3150
3217
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -3158,21 +3225,37 @@ class Connect(go.GoClass):
3158
3225
  self.handle = args[0].handle
3159
3226
  _whatsapp.IncRef(self.handle)
3160
3227
  else:
3161
- self.handle = _whatsapp.whatsapp_Connect_CTor()
3228
+ self.handle = _whatsapp.whatsapp_Receipt_CTor()
3162
3229
  _whatsapp.IncRef(self.handle)
3163
3230
  if 0 < len(args):
3164
- self.JID = args[0]
3231
+ self.Kind = args[0]
3232
+ if "Kind" in kwargs:
3233
+ self.Kind = kwargs["Kind"]
3234
+ if 1 < len(args):
3235
+ self.MessageIDs = args[1]
3236
+ if "MessageIDs" in kwargs:
3237
+ self.MessageIDs = kwargs["MessageIDs"]
3238
+ if 2 < len(args):
3239
+ self.JID = args[2]
3165
3240
  if "JID" in kwargs:
3166
3241
  self.JID = kwargs["JID"]
3167
- if 1 < len(args):
3168
- self.Error = args[1]
3169
- if "Error" in kwargs:
3170
- self.Error = kwargs["Error"]
3242
+ if 3 < len(args):
3243
+ self.GroupJID = args[3]
3244
+ if "GroupJID" in kwargs:
3245
+ self.GroupJID = kwargs["GroupJID"]
3246
+ if 4 < len(args):
3247
+ self.Timestamp = args[4]
3248
+ if "Timestamp" in kwargs:
3249
+ self.Timestamp = kwargs["Timestamp"]
3250
+ if 5 < len(args):
3251
+ self.IsCarbon = args[5]
3252
+ if "IsCarbon" in kwargs:
3253
+ self.IsCarbon = kwargs["IsCarbon"]
3171
3254
  def __del__(self):
3172
3255
  _whatsapp.DecRef(self.handle)
3173
3256
  def __str__(self):
3174
3257
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
3175
- sv = 'whatsapp.Connect{'
3258
+ sv = 'whatsapp.Receipt{'
3176
3259
  first = True
3177
3260
  for v in pr:
3178
3261
  if callable(v[1]):
@@ -3185,29 +3268,65 @@ class Connect(go.GoClass):
3185
3268
  return sv + '}'
3186
3269
  def __repr__(self):
3187
3270
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
3188
- sv = 'whatsapp.Connect ( '
3271
+ sv = 'whatsapp.Receipt ( '
3189
3272
  for v in pr:
3190
3273
  if not callable(v[1]):
3191
3274
  sv += v[0] + '=' + str(v[1]) + ', '
3192
3275
  return sv + ')'
3193
3276
  @property
3277
+ def Kind(self):
3278
+ return _whatsapp.whatsapp_Receipt_Kind_Get(self.handle)
3279
+ @Kind.setter
3280
+ def Kind(self, value):
3281
+ if isinstance(value, go.GoClass):
3282
+ _whatsapp.whatsapp_Receipt_Kind_Set(self.handle, value.handle)
3283
+ else:
3284
+ _whatsapp.whatsapp_Receipt_Kind_Set(self.handle, value)
3285
+ @property
3286
+ def MessageIDs(self):
3287
+ return go.Slice_string(handle=_whatsapp.whatsapp_Receipt_MessageIDs_Get(self.handle))
3288
+ @MessageIDs.setter
3289
+ def MessageIDs(self, value):
3290
+ if isinstance(value, go.GoClass):
3291
+ _whatsapp.whatsapp_Receipt_MessageIDs_Set(self.handle, value.handle)
3292
+ else:
3293
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
3294
+ @property
3194
3295
  def JID(self):
3195
- return _whatsapp.whatsapp_Connect_JID_Get(self.handle)
3296
+ return _whatsapp.whatsapp_Receipt_JID_Get(self.handle)
3196
3297
  @JID.setter
3197
3298
  def JID(self, value):
3198
3299
  if isinstance(value, go.GoClass):
3199
- _whatsapp.whatsapp_Connect_JID_Set(self.handle, value.handle)
3300
+ _whatsapp.whatsapp_Receipt_JID_Set(self.handle, value.handle)
3200
3301
  else:
3201
- _whatsapp.whatsapp_Connect_JID_Set(self.handle, value)
3302
+ _whatsapp.whatsapp_Receipt_JID_Set(self.handle, value)
3202
3303
  @property
3203
- def Error(self):
3204
- return _whatsapp.whatsapp_Connect_Error_Get(self.handle)
3205
- @Error.setter
3206
- def Error(self, value):
3304
+ def GroupJID(self):
3305
+ return _whatsapp.whatsapp_Receipt_GroupJID_Get(self.handle)
3306
+ @GroupJID.setter
3307
+ def GroupJID(self, value):
3207
3308
  if isinstance(value, go.GoClass):
3208
- _whatsapp.whatsapp_Connect_Error_Set(self.handle, value.handle)
3309
+ _whatsapp.whatsapp_Receipt_GroupJID_Set(self.handle, value.handle)
3209
3310
  else:
3210
- _whatsapp.whatsapp_Connect_Error_Set(self.handle, value)
3311
+ _whatsapp.whatsapp_Receipt_GroupJID_Set(self.handle, value)
3312
+ @property
3313
+ def Timestamp(self):
3314
+ return _whatsapp.whatsapp_Receipt_Timestamp_Get(self.handle)
3315
+ @Timestamp.setter
3316
+ def Timestamp(self, value):
3317
+ if isinstance(value, go.GoClass):
3318
+ _whatsapp.whatsapp_Receipt_Timestamp_Set(self.handle, value.handle)
3319
+ else:
3320
+ _whatsapp.whatsapp_Receipt_Timestamp_Set(self.handle, value)
3321
+ @property
3322
+ def IsCarbon(self):
3323
+ return _whatsapp.whatsapp_Receipt_IsCarbon_Get(self.handle)
3324
+ @IsCarbon.setter
3325
+ def IsCarbon(self, value):
3326
+ if isinstance(value, go.GoClass):
3327
+ _whatsapp.whatsapp_Receipt_IsCarbon_Set(self.handle, value.handle)
3328
+ else:
3329
+ _whatsapp.whatsapp_Receipt_IsCarbon_Set(self.handle, value)
3211
3330
 
3212
3331
 
3213
3332
  # ---- Slices ---
@@ -3227,5 +3346,11 @@ def NewGateway():
3227
3346
 
3228
3347
 
3229
3348
  # ---- Functions ---
3349
+ def IsAnonymousJID(id):
3350
+ """IsAnonymousJID(str id) bool
3351
+
3352
+ IsAnonymousJID returns true if the JID given is not addressible, that is, if it's actually a LID.
3353
+ """
3354
+ return _whatsapp.whatsapp_IsAnonymousJID(id)
3230
3355
 
3231
3356