-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnotesmimeentity.go
376 lines (298 loc) · 13.7 KB
/
notesmimeentity.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
/* https://help.hcl-software.com/dom_designer/14.0.0/basic/H_NOTESMIMEENTITY_CLASS_OVERVIEW.html */
package domigo
import (
"github.com/monstermichl/domigo/internal/com"
ole "github.com/go-ole/go-ole"
)
type NotesMIMEEntityEncoding = Long
const (
NOTESMIMEENTITY_ENC_BASE64 NotesMIMEEntityEncoding = 1727
NOTESMIMEENTITY_ENC_EXTENSION NotesMIMEEntityEncoding = 1731
NOTESMIMEENTITY_ENC_IDENTITY_7BIT NotesMIMEEntityEncoding = 1728
NOTESMIMEENTITY_ENC_IDENTITY_8BIT NotesMIMEEntityEncoding = 1729
NOTESMIMEENTITY_ENC_IDENTITY_BINARY NotesMIMEEntityEncoding = 1730
NOTESMIMEENTITY_ENC_NONE NotesMIMEEntityEncoding = 1725
NOTESMIMEENTITY_ENC_QUOTED_PRINTABLE NotesMIMEEntityEncoding = 1726
)
type NotesMIMEEntity struct {
NotesStruct
}
func newNotesMIMEEntity(dispatchPtr *ole.IDispatch) NotesMIMEEntity {
return NotesMIMEEntity{newNotesStruct(dispatchPtr)}
}
/* --------------------------------- Properties --------------------------------- */
/* https://help.hcl-software.com/dom_designer/14.0.0/basic/H_BOUNDARYEND_PROPERTY_MIMEENTITY.html */
func (m NotesMIMEEntity) BoundaryEnd() (String, error) {
return getComProperty[String](m, "BoundaryEnd")
}
/* https://help.hcl-software.com/dom_designer/14.0.0/basic/H_BOUNDARYSTART_PROPERTY_MIMEENTITY.html */
func (m NotesMIMEEntity) BoundaryStart() (String, error) {
return getComProperty[String](m, "BoundaryStart")
}
/* https://help.hcl-software.com/dom_designer/14.0.0/basic/H_CHARSET_PROPERTY_MIMEENTITY.html */
func (m NotesMIMEEntity) Charset() (String, error) {
return getComProperty[String](m, "Charset")
}
/* https://help.hcl-software.com/dom_designer/14.0.0/basic/H_CONTENTASTEXT_PROPERTY_MIMEENTITY.html */
func (m NotesMIMEEntity) ContentAsText() (String, error) {
return getComProperty[String](m, "ContentAsText")
}
/* https://help.hcl-software.com/dom_designer/14.0.0/basic/H_CONTENTSUBTYPE_PROPERTY_MIMEENTITY.html */
func (m NotesMIMEEntity) ContentSubType() (String, error) {
return getComProperty[String](m, "ContentSubType")
}
/* https://help.hcl-software.com/dom_designer/14.0.0/basic/H_CONTENTTYPE_PROPERTY_MIMEENTITY.html */
func (m NotesMIMEEntity) ContentType() (String, error) {
return getComProperty[String](m, "ContentType")
}
/* https://help.hcl-software.com/dom_designer/14.0.0/basic/H_ENCODING_PROPERTY_MIMEENTITY.html */
func (m NotesMIMEEntity) Encoding() (NotesMIMEEntityEncoding, error) {
return getComProperty[NotesMIMEEntityEncoding](m, "Encoding")
}
/* https://help.hcl-software.com/dom_designer/14.0.0/basic/H_HEADEROBJECTS_PROPERTY_MIMEENTITY.html */
func (m NotesMIMEEntity) HeaderObjects() ([]NotesMIMEHeader, error) {
return com.GetObjectArrayProperty(m.com(), newNotesMIMEHeader, "HeaderObjects")
}
/* https://help.hcl-software.com/dom_designer/14.0.0/basic/H_HEADERS_PROPERTY_MIMEENTITY.html */
func (m NotesMIMEEntity) Headers() (String, error) {
return getComProperty[String](m, "Headers")
}
/* https://help.hcl-software.com/dom_designer/14.0.0/basic/H_PREAMBLE_PROPERTY_MIMEENTITY.html */
func (m NotesMIMEEntity) Preamble() (String, error) {
return getComProperty[String](m, "Preamble")
}
/* https://help.hcl-software.com/dom_designer/14.0.0/basic/H_PREAMBLE_PROPERTY_MIMEENTITY.html */
func (m NotesMIMEEntity) SetPreamble(v String) error {
return putComProperty(m, "Preamble", v)
}
/* --------------------------------- Methods ------------------------------------ */
/* https://help.hcl-software.com/dom_designer/14.0.0/basic/H_CREATECHILDENTITY_METHOD_MIMEENTITY.html */
type notesMIMEEntityCreateChildEntityParams struct {
nextSibling *NotesMIMEEntity
}
type notesMIMEEntityCreateChildEntityParam func(*notesMIMEEntityCreateChildEntityParams)
func WithNotesMIMEEntityCreateChildEntityNextSibling(nextSibling NotesMIMEEntity) notesMIMEEntityCreateChildEntityParam {
return func(c *notesMIMEEntityCreateChildEntityParams) {
c.nextSibling = &nextSibling
}
}
func (m NotesMIMEEntity) CreateChildEntity(params ...notesMIMEEntityCreateChildEntityParam) (NotesMIMEEntity, error) {
paramsStruct := ¬esMIMEEntityCreateChildEntityParams{}
paramsOrdered := []interface{}{}
for _, p := range params {
p(paramsStruct)
}
if paramsStruct.nextSibling != nil {
paramsOrdered = append(paramsOrdered, *paramsStruct.nextSibling)
}
return callComObjectMethod(m, newNotesMIMEEntity, "CreateChildEntity", paramsOrdered...)
}
/* https://help.hcl-software.com/dom_designer/14.0.0/basic/H_CREATEHEADER_METHOD_MIMEENTITY.html */
func (m NotesMIMEEntity) CreateHeader(headerName String) (NotesMIMEHeader, error) {
return callComObjectMethod(m, newNotesMIMEHeader, "CreateHeader", headerName)
}
/* https://help.hcl-software.com/dom_designer/14.0.0/basic/H_CREATEPARENTENTITY_METHOD_MIMEENTITY.html */
func (m NotesMIMEEntity) CreateParentEntity() (NotesMIMEEntity, error) {
return callComObjectMethod(m, newNotesMIMEEntity, "CreateParentEntity")
}
/* https://help.hcl-software.com/dom_designer/14.0.0/basic/H_DECODECONTENT_METHOD_MIMEENTITY.html */
func (m NotesMIMEEntity) DecodeContent() error {
return callComVoidMethod(m, "DecodeContent")
}
/* https://help.hcl-software.com/dom_designer/14.0.0/basic/H_ENCODECONTENT_METHOD_MIMEENTITY.html */
func (m NotesMIMEEntity) EncodeContent(encoding NotesMIMEEntityEncoding) error {
return callComVoidMethod(m, "EncodeContent", encoding)
}
/* https://help.hcl-software.com/dom_designer/14.0.0/basic/H_GETCONTENTASBYTES_METHOD_MIMEENTITY.html */
type notesMIMEEntityGetContentAsBytesParams struct {
decoded *Boolean
}
type notesMIMEEntityGetContentAsBytesParam func(*notesMIMEEntityGetContentAsBytesParams)
func WithNotesMIMEEntityGetContentAsBytesDecoded(decoded Boolean) notesMIMEEntityGetContentAsBytesParam {
return func(c *notesMIMEEntityGetContentAsBytesParams) {
c.decoded = &decoded
}
}
func (m NotesMIMEEntity) GetContentAsBytes(stream NotesStream, params ...notesMIMEEntityGetContentAsBytesParam) error {
paramsStruct := ¬esMIMEEntityGetContentAsBytesParams{}
paramsOrdered := []interface{}{stream}
for _, p := range params {
p(paramsStruct)
}
if paramsStruct.decoded != nil {
paramsOrdered = append(paramsOrdered, *paramsStruct.decoded)
}
return callComVoidMethod(m, "GetContentAsBytes", paramsOrdered...)
}
/* https://help.hcl-software.com/dom_designer/14.0.0/basic/H_GETCONTENTASTEXT_METHOD_MIMEENTITY.html */
type notesMIMEEntityGetContentAsTextParams struct {
decoded *Boolean
}
type notesMIMEEntityGetContentAsTextParam func(*notesMIMEEntityGetContentAsTextParams)
func WithNotesMIMEEntityGetContentAsTextDecoded(decoded Boolean) notesMIMEEntityGetContentAsTextParam {
return func(c *notesMIMEEntityGetContentAsTextParams) {
c.decoded = &decoded
}
}
func (m NotesMIMEEntity) GetContentAsText(stream NotesStream, params ...notesMIMEEntityGetContentAsTextParam) error {
paramsStruct := ¬esMIMEEntityGetContentAsTextParams{}
paramsOrdered := []interface{}{stream}
for _, p := range params {
p(paramsStruct)
}
if paramsStruct.decoded != nil {
paramsOrdered = append(paramsOrdered, *paramsStruct.decoded)
}
return callComVoidMethod(m, "GetContentAsText", paramsOrdered...)
}
/* https://help.hcl-software.com/dom_designer/14.0.0/basic/H_GETENTITYASTEXT_METHOD_MIMEENTITY.html */
type notesMIMEEntityGetEntityAsTextParams struct {
headerFilters *[]String
inclusive *Boolean
}
type notesMIMEEntityGetEntityAsTextParam func(*notesMIMEEntityGetEntityAsTextParams)
func WithNotesMIMEEntityGetEntityAsTextHeaderFilters(headerFilters []String) notesMIMEEntityGetEntityAsTextParam {
return func(c *notesMIMEEntityGetEntityAsTextParams) {
c.headerFilters = &headerFilters
}
}
func WithNotesMIMEEntityGetEntityAsTextInclusive(inclusive Boolean) notesMIMEEntityGetEntityAsTextParam {
return func(c *notesMIMEEntityGetEntityAsTextParams) {
c.inclusive = &inclusive
}
}
func (m NotesMIMEEntity) GetEntityAsText(stream NotesStream, params ...notesMIMEEntityGetEntityAsTextParam) error {
paramsStruct := ¬esMIMEEntityGetEntityAsTextParams{}
paramsOrdered := []interface{}{stream}
for _, p := range params {
p(paramsStruct)
}
if paramsStruct.headerFilters != nil {
paramsOrdered = append(paramsOrdered, *paramsStruct.headerFilters)
if paramsStruct.inclusive != nil {
paramsOrdered = append(paramsOrdered, *paramsStruct.inclusive)
}
}
return callComVoidMethod(m, "GetEntityAsText", paramsOrdered...)
}
/* https://help.hcl-software.com/dom_designer/14.0.0/basic/H_GETFIRSTCHILDENTITY_METHOD_MIMEENTITY.html */
func (m NotesMIMEEntity) GetFirstChildEntity() (NotesMIMEEntity, error) {
return callComObjectMethod(m, newNotesMIMEEntity, "GetFirstChildEntity")
}
/* https://help.hcl-software.com/dom_designer/14.0.0/basic/H_GETNEXTENTITY_METHOD_MIMEENTITY.html */
type notesMIMEEntityGetNextEntityParams struct {
search *Integer
}
type notesMIMEEntityGetNextEntityParam func(*notesMIMEEntityGetNextEntityParams)
func WithNotesMIMEEntityGetNextEntitySearch(search Integer) notesMIMEEntityGetNextEntityParam {
return func(c *notesMIMEEntityGetNextEntityParams) {
c.search = &search
}
}
func (m NotesMIMEEntity) GetNextEntity(params ...notesMIMEEntityGetNextEntityParam) (NotesMIMEEntity, error) {
paramsStruct := ¬esMIMEEntityGetNextEntityParams{}
paramsOrdered := []interface{}{}
for _, p := range params {
p(paramsStruct)
}
if paramsStruct.search != nil {
paramsOrdered = append(paramsOrdered, *paramsStruct.search)
}
return callComObjectMethod(m, newNotesMIMEEntity, "GetNextEntity", paramsOrdered...)
}
/* https://help.hcl-software.com/dom_designer/14.0.0/basic/H_GETNEXTSIBLING_METHOD_MIMEENTITY.html */
func (m NotesMIMEEntity) GetNextSibling() (NotesMIMEEntity, error) {
return callComObjectMethod(m, newNotesMIMEEntity, "GetNextSibling")
}
/* https://help.hcl-software.com/dom_designer/14.0.0/basic/H_GETNTHHEADER_METHOD_MIMEENTITY.html */
type notesMIMEEntityGetNthHeaderParams struct {
instance *Integer
}
type notesMIMEEntityGetNthHeaderParam func(*notesMIMEEntityGetNthHeaderParams)
func WithNotesMIMEEntityGetNthHeaderInstance(instance Integer) notesMIMEEntityGetNthHeaderParam {
return func(c *notesMIMEEntityGetNthHeaderParams) {
c.instance = &instance
}
}
func (m NotesMIMEEntity) GetNthHeader(headerName String, params ...notesMIMEEntityGetNthHeaderParam) (NotesMIMEHeader, error) {
paramsStruct := ¬esMIMEEntityGetNthHeaderParams{}
paramsOrdered := []interface{}{headerName}
for _, p := range params {
p(paramsStruct)
}
if paramsStruct.instance != nil {
paramsOrdered = append(paramsOrdered, *paramsStruct.instance)
}
return callComObjectMethod(m, newNotesMIMEHeader, "GetNthHeader", paramsOrdered...)
}
/* https://help.hcl-software.com/dom_designer/14.0.0/basic/H_GETPARENTENTITY_METHOD_MIMEENTITY.html */
func (m NotesMIMEEntity) GetParentEntity() (NotesMIMEEntity, error) {
return callComObjectMethod(m, newNotesMIMEEntity, "GetParentEntity")
}
/* https://help.hcl-software.com/dom_designer/14.0.0/basic/H_GETPREVENTITY_METHOD_MIMEENTITY.html */
type notesMIMEEntityGetPrevEntityParams struct {
search *Integer
}
type notesMIMEEntityGetPrevEntityParam func(*notesMIMEEntityGetPrevEntityParams)
func WithNotesMIMEEntityGetPrevEntitySearch(search Integer) notesMIMEEntityGetPrevEntityParam {
return func(c *notesMIMEEntityGetPrevEntityParams) {
c.search = &search
}
}
func (m NotesMIMEEntity) GetPrevEntity(params ...notesMIMEEntityGetPrevEntityParam) (NotesMIMEEntity, error) {
paramsStruct := ¬esMIMEEntityGetPrevEntityParams{}
paramsOrdered := []interface{}{}
for _, p := range params {
p(paramsStruct)
}
if paramsStruct.search != nil {
paramsOrdered = append(paramsOrdered, *paramsStruct.search)
}
return callComObjectMethod(m, newNotesMIMEEntity, "GetPrevEntity", paramsOrdered...)
}
/* https://help.hcl-software.com/dom_designer/14.0.0/basic/H_GETPREVSIBLING_METHOD_MIMEENTITY.html */
func (m NotesMIMEEntity) GetPrevSibling() (NotesMIMEEntity, error) {
return callComObjectMethod(m, newNotesMIMEEntity, "GetPrevSibling")
}
/* https://help.hcl-software.com/dom_designer/14.0.0/basic/H_GETSOMEHEADERS_METHOD_MIMEENTITY.html */
type notesMIMEEntityGetSomeHeadersParams struct {
headerFilters *[]String
inclusive *Boolean
}
type notesMIMEEntityGetSomeHeadersParam func(*notesMIMEEntityGetSomeHeadersParams)
func WithNotesMIMEEntityGetSomeHeadersHeaderFilters(headerFilters []String) notesMIMEEntityGetSomeHeadersParam {
return func(c *notesMIMEEntityGetSomeHeadersParams) {
c.headerFilters = &headerFilters
}
}
func WithNotesMIMEEntityGetSomeHeadersInclusive(inclusive Boolean) notesMIMEEntityGetSomeHeadersParam {
return func(c *notesMIMEEntityGetSomeHeadersParams) {
c.inclusive = &inclusive
}
}
func (m NotesMIMEEntity) GetSomeHeaders(params ...notesMIMEEntityGetSomeHeadersParam) (String, error) {
paramsStruct := ¬esMIMEEntityGetSomeHeadersParams{}
paramsOrdered := []interface{}{}
for _, p := range params {
p(paramsStruct)
}
if paramsStruct.headerFilters != nil {
paramsOrdered = append(paramsOrdered, *paramsStruct.headerFilters)
if paramsStruct.inclusive != nil {
paramsOrdered = append(paramsOrdered, *paramsStruct.inclusive)
}
}
return callComMethod[String](m, "GetSomeHeaders", paramsOrdered...)
}
/* https://help.hcl-software.com/dom_designer/14.0.0/basic/H_REMOVE_METHOD_MIMEENTITY.html */
func (m NotesMIMEEntity) Remove() error {
return callComVoidMethod(m, "Remove")
}
/* https://help.hcl-software.com/dom_designer/14.0.0/basic/H_SETCONTENTFROMBYTES_METHOD_MIMEENTITY.html */
func (m NotesMIMEEntity) SetContentFromBytes(stream NotesStream, contentType String, encoding NotesMIMEEntityEncoding) error {
return callComVoidMethod(m, "SetContentFromBytes", stream, contentType, encoding)
}
/* https://help.hcl-software.com/dom_designer/14.0.0/basic/H_SETCONTENTFROMTEXT_METHOD_MIMEENTITY.html */
func (m NotesMIMEEntity) SetContentFromText(stream NotesStream, contentType String, encoding NotesMIMEEntityEncoding) error {
return callComVoidMethod(m, "SetContentFromText", stream, contentType, encoding)
}