1 {
2 File: OSServices/WSMethodInvocation.h
3
4 Contains: *** DEPRECATED *** WebServicesCore Method Invocation API
5
6 Copyright: (c) 2002-2011 Apple Inc. All rights reserved
7
8 Bugs?: For bug reports, consult the following page on
9 the World Wide Web:
10
11 http://bugs.freepascal.org
12
13 }
14 {
15 Modified for use with Free Pascal
16 Version 308
17 Please report any bugs to <gpc@microbizz.nl>
18 }
19
20 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
21 {$mode macpas}
22 {$modeswitch cblocks}
23 {$packenum 1}
24 {$macro on}
25 {$inline on}
26 {$calling mwpascal}
27
28 unit WSMethodInvocation;
29 interface
30 {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
31 {$setc GAP_INTERFACES_VERSION := $0308}
32
33 {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
34 {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
35 {$endc}
36
37 {$ifc defined CPUPOWERPC and defined CPUI386}
38 {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
39 {$endc}
40 {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
41 {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
42 {$endc}
43
44 {$ifc not defined __ppc__ and defined CPUPOWERPC32}
45 {$setc __ppc__ := 1}
46 {$elsec}
47 {$setc __ppc__ := 0}
48 {$endc}
49 {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
50 {$setc __ppc64__ := 1}
51 {$elsec}
52 {$setc __ppc64__ := 0}
53 {$endc}
54 {$ifc not defined __i386__ and defined CPUI386}
55 {$setc __i386__ := 1}
56 {$elsec}
57 {$setc __i386__ := 0}
58 {$endc}
59 {$ifc not defined __x86_64__ and defined CPUX86_64}
60 {$setc __x86_64__ := 1}
61 {$elsec}
62 {$setc __x86_64__ := 0}
63 {$endc}
64 {$ifc not defined __arm__ and defined CPUARM}
65 {$setc __arm__ := 1}
66 {$elsec}
67 {$setc __arm__ := 0}
68 {$endc}
69 {$ifc not defined __arm64__ and defined CPUAARCH64}
70 {$setc __arm64__ := 1}
71 {$elsec}
72 {$setc __arm64__ := 0}
73 {$endc}
74
75 {$ifc defined cpu64}
76 {$setc __LP64__ := 1}
77 {$elsec}
78 {$setc __LP64__ := 0}
79 {$endc}
80
81
82 {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
83 {$error Conflicting definitions for __ppc__ and __i386__}
84 {$endc}
85
86 {$ifc defined __ppc__ and __ppc__}
87 {$setc TARGET_CPU_PPC := TRUE}
88 {$setc TARGET_CPU_PPC64 := FALSE}
89 {$setc TARGET_CPU_X86 := FALSE}
90 {$setc TARGET_CPU_X86_64 := FALSE}
91 {$setc TARGET_CPU_ARM := FALSE}
92 {$setc TARGET_CPU_ARM64 := FALSE}
93 {$setc TARGET_OS_MAC := TRUE}
94 {$setc TARGET_OS_IPHONE := FALSE}
95 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
96 {$setc TARGET_OS_EMBEDDED := FALSE}
97 {$elifc defined __ppc64__ and __ppc64__}
98 {$setc TARGET_CPU_PPC := FALSE}
99 {$setc TARGET_CPU_PPC64 := TRUE}
100 {$setc TARGET_CPU_X86 := FALSE}
101 {$setc TARGET_CPU_X86_64 := FALSE}
102 {$setc TARGET_CPU_ARM := FALSE}
103 {$setc TARGET_CPU_ARM64 := FALSE}
104 {$setc TARGET_OS_MAC := TRUE}
105 {$setc TARGET_OS_IPHONE := FALSE}
106 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
107 {$setc TARGET_OS_EMBEDDED := FALSE}
108 {$elifc defined __i386__ and __i386__}
109 {$setc TARGET_CPU_PPC := FALSE}
110 {$setc TARGET_CPU_PPC64 := FALSE}
111 {$setc TARGET_CPU_X86 := TRUE}
112 {$setc TARGET_CPU_X86_64 := FALSE}
113 {$setc TARGET_CPU_ARM := FALSE}
114 {$setc TARGET_CPU_ARM64 := FALSE}
115 {$ifc defined iphonesim}
116 {$setc TARGET_OS_MAC := FALSE}
117 {$setc TARGET_OS_IPHONE := TRUE}
118 {$setc TARGET_IPHONE_SIMULATOR := TRUE}
119 {$elsec}
120 {$setc TARGET_OS_MAC := TRUE}
121 {$setc TARGET_OS_IPHONE := FALSE}
122 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
123 {$endc}
124 {$setc TARGET_OS_EMBEDDED := FALSE}
125 {$elifc defined __x86_64__ and __x86_64__}
126 {$setc TARGET_CPU_PPC := FALSE}
127 {$setc TARGET_CPU_PPC64 := FALSE}
128 {$setc TARGET_CPU_X86 := FALSE}
129 {$setc TARGET_CPU_X86_64 := TRUE}
130 {$setc TARGET_CPU_ARM := FALSE}
131 {$setc TARGET_CPU_ARM64 := FALSE}
132 {$ifc defined iphonesim}
133 {$setc TARGET_OS_MAC := FALSE}
134 {$setc TARGET_OS_IPHONE := TRUE}
135 {$setc TARGET_IPHONE_SIMULATOR := TRUE}
136 {$elsec}
137 {$setc TARGET_OS_MAC := TRUE}
138 {$setc TARGET_OS_IPHONE := FALSE}
139 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
140 {$endc}
141 {$setc TARGET_OS_EMBEDDED := FALSE}
142 {$elifc defined __arm__ and __arm__}
143 {$setc TARGET_CPU_PPC := FALSE}
144 {$setc TARGET_CPU_PPC64 := FALSE}
145 {$setc TARGET_CPU_X86 := FALSE}
146 {$setc TARGET_CPU_X86_64 := FALSE}
147 {$setc TARGET_CPU_ARM := TRUE}
148 {$setc TARGET_CPU_ARM64 := FALSE}
149 {$setc TARGET_OS_MAC := FALSE}
150 {$setc TARGET_OS_IPHONE := TRUE}
151 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
152 {$setc TARGET_OS_EMBEDDED := TRUE}
153 {$elifc defined __arm64__ and __arm64__}
154 {$setc TARGET_CPU_PPC := FALSE}
155 {$setc TARGET_CPU_PPC64 := FALSE}
156 {$setc TARGET_CPU_X86 := FALSE}
157 {$setc TARGET_CPU_X86_64 := FALSE}
158 {$setc TARGET_CPU_ARM := FALSE}
159 {$setc TARGET_CPU_ARM64 := TRUE}
160 {$ifc defined ios}
161 {$setc TARGET_OS_MAC := FALSE}
162 {$setc TARGET_OS_IPHONE := TRUE}
163 {$setc TARGET_OS_EMBEDDED := TRUE}
164 {$elsec}
165 {$setc TARGET_OS_MAC := TRUE}
166 {$setc TARGET_OS_IPHONE := FALSE}
167 {$setc TARGET_OS_EMBEDDED := FALSE}
168 {$endc}
169 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
170 {$elsec}
171 {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
172 {$endc}
173
174 {$ifc defined __LP64__ and __LP64__ }
175 {$setc TARGET_CPU_64 := TRUE}
176 {$elsec}
177 {$setc TARGET_CPU_64 := FALSE}
178 {$endc}
179
180 {$ifc defined FPC_BIG_ENDIAN}
181 {$setc TARGET_RT_BIG_ENDIAN := TRUE}
182 {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
183 {$elifc defined FPC_LITTLE_ENDIAN}
184 {$setc TARGET_RT_BIG_ENDIAN := FALSE}
185 {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
186 {$elsec}
187 {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
188 {$endc}
189 {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
190 {$setc CALL_NOT_IN_CARBON := FALSE}
191 {$setc OLDROUTINENAMES := FALSE}
192 {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
193 {$setc OPAQUE_UPP_TYPES := TRUE}
194 {$setc OTCARBONAPPLICATION := TRUE}
195 {$setc OTKERNEL := FALSE}
196 {$setc PM_USE_SESSION_APIS := TRUE}
197 {$setc TARGET_API_MAC_CARBON := TRUE}
198 {$setc TARGET_API_MAC_OS8 := FALSE}
199 {$setc TARGET_API_MAC_OSX := TRUE}
200 {$setc TARGET_CARBON := TRUE}
201 {$setc TARGET_CPU_68K := FALSE}
202 {$setc TARGET_CPU_MIPS := FALSE}
203 {$setc TARGET_CPU_SPARC := FALSE}
204 {$setc TARGET_OS_UNIX := FALSE}
205 {$setc TARGET_OS_WIN32 := FALSE}
206 {$setc TARGET_RT_MAC_68881 := FALSE}
207 {$setc TARGET_RT_MAC_CFM := FALSE}
208 {$setc TARGET_RT_MAC_MACHO := TRUE}
209 {$setc TYPED_FUNCTION_POINTERS := TRUE}
210 {$setc TYPE_BOOL := FALSE}
211 {$setc TYPE_EXTENDED := FALSE}
212 {$setc TYPE_LONGLONG := TRUE}
213 uses MacTypes,CFBase,CFArray,CFData,CFDictionary,CFRunLoop,CFXMLNode,WSTypes;
214 {$endc} {not MACOSALLINCLUDE}
215
216
217 {$ifc TARGET_OS_MAC}
218
219 {$ALIGN POWER}
220
221
222 {
223 WSMethodInvocation
224 }
225 {
226 Dictionary entry if the invocation result is not a fault. This is
227 always available in method responses, although for SOAP messages,
228 it may be more correctly to query the result dictionary for the
229 specific field you're interested in. What this really means is
230 that the dictionary returned by the invocation may contain more
231 than one value, wherein the result data is duplicated several
232 times. If you don't know what to ask for to dump the reply, you
233 can ask for this key. If you do know what you want, you should
234 request that field expliclty.
235
236 You can also specify the name of the reply parameter in the
237 invocation using kWSMethodInvocationResultParameterName. This will
238 add an alias for the given name to the result dictionary such that
239 kWSMethodInvocationResult will always return the correct
240 parameter. (This won't work for multi-value returns, however.)
241 }
242 var kWSMethodInvocationResult: CFStringRef; external name '_kWSMethodInvocationResult'; (* attribute const *)
243 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
244 {
245 Dictionary entries if the result is a fault
246 }
247
248 { a CFString }
249 var kWSFaultString: CFStringRef; external name '_kWSFaultString'; (* attribute const *)
250 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
251 { a CFNumber }
252 var kWSFaultCode: CFStringRef; external name '_kWSFaultCode'; (* attribute const *)
253 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
254 { a CFString or CFDictionary, or NULL }
255 var kWSFaultExtra: CFStringRef; external name '_kWSFaultExtra'; (* attribute const *)
256 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
257
258 {
259 If the result is a fault, and if the value of kWSFaultString in
260 the reply dictionary is kWSNetworkStreamFaultString, then
261 kWSFaultExtra will be a dictionary indicating the network error
262 and kWSFaultCode is ignored in this case. See
263 <CoreFoundation/CFStream.h> for details on what the domain and
264 error numbers mean.
265 }
266 var kWSNetworkStreamFaultString: CFStringRef; external name '_kWSNetworkStreamFaultString'; (* attribute const *)
267 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
268 { A CFString (for debug purposes only) }
269 var kWSStreamErrorMessage: CFStringRef; external name '_kWSStreamErrorMessage'; (* attribute const *)
270 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
271 { A CFNumberRef }
272 var kWSStreamErrorDomain: CFStringRef; external name '_kWSStreamErrorDomain'; (* attribute const *)
273 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
274 { A CFNumberRef }
275 var kWSStreamErrorError: CFStringRef; external name '_kWSStreamErrorError'; (* attribute const *)
276 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
277
278 {
279 For HTTP[S] based invocations, you can specify a CFHTTPMessageRef
280 as a property which will be used instead of creating a new
281 outgoing message. The CFHTTPMessageRef can contain header, proxy
282 and authentication information. The body of the message will be
283 ignored and replaced with the outgoing, serialized invocation.
284
285 After the invocation has executed, you can retrieve a copy of the
286 actual CFHTTPMessageRef, containing the details of the invocation
287 using kWSHTTPResponseMessage. Attempting to retrieve the response
288 message property before the invocation completes will result
289 return NULL.
290
291 See: <CFNetwork/CFHTTPMessage.h> for more information.
292 }
293 { CFHTTPMessageRef }
294 var kWSHTTPMessage: CFStringRef; external name '_kWSHTTPMessage'; (* attribute const *)
295 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
296 { CFHTTPMessageRef }
297 var kWSHTTPResponseMessage: CFStringRef; external name '_kWSHTTPResponseMessage'; (* attribute const *)
298 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
299 {
300 To avoid having to create an entire CFHTTPMessageRef, these properties are
301 individually settable. If they are set, they will override any CFHTTPMessageRef
302 previously specified.
303 }
304 { a CFDictionary of ( key (CFString), val (CFString) ) pairs }
305 var kWSHTTPExtraHeaders: CFStringRef; external name '_kWSHTTPExtraHeaders'; (* attribute const *)
306 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
307 { "http/1.1" }
308 var kWSHTTPVersion: CFStringRef; external name '_kWSHTTPVersion'; (* attribute const *)
309 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
310 { CFURLRef }
311 var kWSHTTPProxy: CFStringRef; external name '_kWSHTTPProxy'; (* attribute const *)
312 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
313 { kCFBooleanFalse }
314 var kWSHTTPFollowsRedirects: CFStringRef; external name '_kWSHTTPFollowsRedirects'; (* attribute const *)
315 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
316 {
317 SOCKS proxy support. WSMethodInvocation uses the same flags as
318 CFSocketStream.h in configuring SOCKS proxy support. You can set
319 the kCFStreamPropertySOCKSProxy property on the invocation and the
320 value will be applied to the underlying stream. See CFSocketStream.h
321 for more information and valid keys.
322 }
323 {
324 These debugging flags will populate the WSInvocationResultRef
325 with some potentially useful debugging output. The property
326 name of the flag is the same as the the field in the result
327 dictionary.
328 }
329 { kCFBooleanFalse }
330 var kWSDebugOutgoingHeaders: CFStringRef; external name '_kWSDebugOutgoingHeaders'; (* attribute const *)
331 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
332 { kCFBooleanFalse }
333 var kWSDebugOutgoingBody: CFStringRef; external name '_kWSDebugOutgoingBody'; (* attribute const *)
334 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
335 { kCFBooleanFalse }
336 var kWSDebugIncomingHeaders: CFStringRef; external name '_kWSDebugIncomingHeaders'; (* attribute const *)
337 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
338 { kCFBooleanFalse }
339 var kWSDebugIncomingBody: CFStringRef; external name '_kWSDebugIncomingBody'; (* attribute const *)
340 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
341 {
342 Extra properties for SOAP messages. These apply to the message
343 namespace and format itself. Individual message elements can
344 be modified using the kWSRecord constants below.
345 }
346 { CFStringRef }
347 var kWSSOAPMethodNamespaceURI: CFStringRef; external name '_kWSSOAPMethodNamespaceURI'; (* attribute const *)
348 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
349 { CFStringRef ( kWSSOAPStyleDoc, kWSSOAPStyleRPC ) }
350 var kWSSOAPBodyEncodingStyle: CFStringRef; external name '_kWSSOAPBodyEncodingStyle'; (* attribute const *)
351 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
352 var kWSSOAPStyleDoc: CFStringRef; external name '_kWSSOAPStyleDoc'; (* attribute const *)
353 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
354 var kWSSOAPStyleRPC: CFStringRef; external name '_kWSSOAPStyleRPC'; (* attribute const *)
355 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
356
357 {
358 For SOAP messages, this is an array of CFStringRefs which
359 contain valid XML header elements that are sent with the
360 message. These are only applicable to the Header of a SOAP
361 message.
362 }
363 { CFArrayRef }
364 var kWSSOAPMessageHeaders: CFStringRef; external name '_kWSSOAPMessageHeaders'; (* attribute const *)
365 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
366
367 {
368 When serializing a record (dictionary) these keys present in
369 the dictionary can modify the behavior of the serialization.
370 }
371 { CFArrayRef of CFStringRef }
372 var kWSRecordParameterOrder: CFStringRef; external name '_kWSRecordParameterOrder'; (* attribute const *)
373 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
374 { CFStringRef }
375 var kWSRecordNamespaceURI: CFStringRef; external name '_kWSRecordNamespaceURI'; (* attribute const *)
376 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
377 { CFStringRef }
378 var kWSRecordType: CFStringRef; external name '_kWSRecordType'; (* attribute const *)
379 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
380
381 {
382 Specifies that the result parameter will be found as this name. This
383 forces the deserializer to alias the named output parameter to kWSMethodInvocationResult
384 }
385 var kWSMethodInvocationResultParameterName: CFStringRef; external name '_kWSMethodInvocationResultParameterName'; (* attribute const *)
386 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
387 {
388 Specifies a timeout (as CFNumber) which specifies in seconds the
389 amount of time to wait for the invocation to complete. If the
390 invocation times out before the server results are returned,
391 a fault will be returned with the error code errWSTimeoutError.
392 }
393 var kWSMethodInvocationTimeoutValue: CFStringRef; external name '_kWSMethodInvocationTimeoutValue'; (* attribute const *)
394 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
395
396
397 {
398 * WSMethodInvocationRef
399 *
400 * Discussion:
401 * a WSMethodInvocationRef represents an object that can be executed
402 * to obtain a rsult from a web service. This is CFType and is
403 * therefore reference counted and and should be managed via
404 * CFRetain and CFRelease.
405 }
406 type
407 WSMethodInvocationRef = ^OpaqueWSMethodInvocationRef; { an opaque type }
408 OpaqueWSMethodInvocationRef = record end;
409
410
411 {
412 * WSMethodInvocationGetTypeID() *** DEPRECATED ***
413 *
414 * Mac OS X threading:
415 * Thread safe
416 *
417 * Availability:
418 * Mac OS X: in version 10.2 and later but deprecated in 10.8
419 * CarbonLib: not available
420 * Non-Carbon CFM: not available
421 }
WSMethodInvocationGetTypeIDnull422 function WSMethodInvocationGetTypeID: CFTypeID; external name '_WSMethodInvocationGetTypeID';
423 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
424
425
426 {
427 * WSMethodInvocationCreate() *** DEPRECATED ***
428 *
429 * Discussion:
430 * Creates a web services method invocation object. This object may
431 * be executed synchronously or scheduled on a run loop for
432 * asynchronous execution.
433 *
434 * Mac OS X threading:
435 * Thread safe
436 *
437 * Parameters:
438 *
439 * url:
440 * the endpoint of the service
441 *
442 * methodName:
443 * the name of the method to be called
444 *
445 * protocol:
446 * a string, defined above, that determines the type of invocation
447 * object to create (XML-RPC vs. SOAP)
448 *
449 * Result:
450 * A WSMethodInvocationRef object that can be passed to
451 * WSMethodInvocationInvoke or scheduled with a run loop.
452 *
453 * Availability:
454 * Mac OS X: in version 10.2 and later but deprecated in 10.8
455 * CarbonLib: not available
456 * Non-Carbon CFM: not available
457 }
WSMethodInvocationCreatenull458 function WSMethodInvocationCreate( url: CFURLRef; methodName: CFStringRef; protocol: CFStringRef ): WSMethodInvocationRef; external name '_WSMethodInvocationCreate';
459 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
460
461
462 {
463 * WSMethodInvocationCreateFromSerialization() *** DEPRECATED ***
464 *
465 * Discussion:
466 * Creates a web services method invocation object from a previously
467 * serialized contract.
468 *
469 * Mac OS X threading:
470 * Thread safe
471 *
472 * Parameters:
473 *
474 * contract:
475 * the result of a previously serialized WSMethodInvocationRef
476 *
477 * Result:
478 * A WSMethodInvocationRef object that can be passed to
479 * WSMethodInvocationInvoke or scheduled with a run loop.
480 *
481 * Availability:
482 * Mac OS X: in version 10.2 and later but deprecated in 10.8
483 * CarbonLib: not available
484 * Non-Carbon CFM: not available
485 }
WSMethodInvocationCreateFromSerializationnull486 function WSMethodInvocationCreateFromSerialization( contract: CFDataRef ): WSMethodInvocationRef; external name '_WSMethodInvocationCreateFromSerialization';
487 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
488
489
490 {
491 * WSMethodInvocationCopySerialization() *** DEPRECATED ***
492 *
493 * Discussion:
494 * Create a serialized version of the Method Invocation which can be
495 * reconstituted at a later time.
496 *
497 * Mac OS X threading:
498 * Thread safe
499 *
500 * Parameters:
501 *
502 * invocation:
503 * the invocation to serialize
504 *
505 * Result:
506 * a CFDataRef
507 *
508 * Availability:
509 * Mac OS X: in version 10.2 and later but deprecated in 10.8
510 * CarbonLib: not available
511 * Non-Carbon CFM: not available
512 }
WSMethodInvocationCopySerializationnull513 function WSMethodInvocationCopySerialization( invocation: WSMethodInvocationRef ): CFDataRef; external name '_WSMethodInvocationCopySerialization';
514 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
515
516
517 {
518 * WSMethodInvocationSetParameters() *** DEPRECATED ***
519 *
520 * Discussion:
521 * Set the parameters for a method invocation. The parameterOrder
522 * may be NULL, in which case the order of th parameters is
523 * undefined. If it is not NULL and the parameters dictionary
524 * contains more parameters than are specified by the order, the
525 * behavior is undefined. If the parameterOrder specifies more
526 * parameters than are present in the dictionary, the result is
527 * undefined.
528 *
529 * Mac OS X threading:
530 * Thread safe
531 *
532 * Parameters:
533 *
534 * invocation:
535 * the invocation object
536 *
537 * parameters:
538 * a CFDictionaryRef of CFString keys and CFTypeRef values.
539 *
540 * parameterOrder:
541 * a CFArrayRef of CFString parameter names.
542 *
543 * Availability:
544 * Mac OS X: in version 10.2 and later but deprecated in 10.8
545 * CarbonLib: not available
546 * Non-Carbon CFM: not available
547 }
548 procedure WSMethodInvocationSetParameters( invocation: WSMethodInvocationRef; parameters: CFDictionaryRef; parameterOrder: CFArrayRef { can be NULL } ); external name '_WSMethodInvocationSetParameters';
549 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
550
551
552 {
553 * WSMethodInvocationCopyParameters() *** DEPRECATED ***
554 *
555 * Discussion:
556 * Copies the parameters from the invocation. The resulting
557 * dictionary contains the parameter dictionary. The parameterOrder
558 * output parameter, if not NULL, will contain the order used to
559 * serialize the parameters.
560 *
561 * Mac OS X threading:
562 * Thread safe
563 *
564 * Parameters:
565 *
566 * invocation:
567 * the invocation
568 *
569 * parameterOrder:
570 * a pointer to a CFArray which will will receive the names, in
571 * their specified order, of the input parameter values. This
572 * parameter may be NULL.
573 *
574 * Result:
575 * a CFDictionaryRef
576 *
577 * Availability:
578 * Mac OS X: in version 10.2 and later but deprecated in 10.8
579 * CarbonLib: not available
580 * Non-Carbon CFM: not available
581 }
WSMethodInvocationCopyParametersnull582 function WSMethodInvocationCopyParameters( invocation: WSMethodInvocationRef; parameterOrder: CFArrayRefPtr { can be NULL } ): CFDictionaryRef; external name '_WSMethodInvocationCopyParameters';
583 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
584
585
586 {
587 * WSMethodInvocationSetProperty() *** DEPRECATED ***
588 *
589 * Discussion:
590 * Add "properties" to a method invocation. These properties can be
591 * user defined or one of the WebServicesCore declared properties
592 * (which may modify the behavior of the invocation.) All
593 * WebServicesCore declared properties will start with the string
594 * "kWS", eg, kWSHTTPFollowsRedirects. Properties are serialized
595 * along with the contract, so you may want to avoid sticking raw
596 * pointers in a CFNumber (for example).
597 *
598 * Mac OS X threading:
599 * Thread safe
600 *
601 * Parameters:
602 *
603 * invocation:
604 * the invocation
605 *
606 * propertyName:
607 * a CFStringRef name of the property to modify
608 *
609 * propertyValue:
610 * a CFTypeRef containing the new property value
611 *
612 * Result:
613 * none
614 *
615 * Availability:
616 * Mac OS X: in version 10.2 and later but deprecated in 10.8
617 * CarbonLib: not available
618 * Non-Carbon CFM: not available
619 }
620 procedure WSMethodInvocationSetProperty( invocation: WSMethodInvocationRef; propertyName: CFStringRef; propertyValue: CFTypeRef ); external name '_WSMethodInvocationSetProperty';
621 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
622
623
624 {
625 * WSMethodInvocationCopyProperty() *** DEPRECATED ***
626 *
627 * Discussion:
628 * Return a property from a invocation. If the result is NULL, the
629 * property doesn't exist. Being a "Copy" call, you must release
630 * the result.
631 *
632 * Mac OS X threading:
633 * Thread safe
634 *
635 * Parameters:
636 *
637 * invocation:
638 * the invocation
639 *
640 * propertyName:
641 * the name of the property to retreive
642 *
643 * Result:
644 * the CFTypeRef value of the property, or NULL if the property was
645 * not specified.
646 *
647 * Availability:
648 * Mac OS X: in version 10.2 and later but deprecated in 10.8
649 * CarbonLib: not available
650 * Non-Carbon CFM: not available
651 }
WSMethodInvocationCopyPropertynull652 function WSMethodInvocationCopyProperty( invocation: WSMethodInvocationRef; propertyName: CFStringRef ): CFTypeRef; external name '_WSMethodInvocationCopyProperty';
653 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
654
655
656 {
657 * WSMethodInvocationInvoke() *** DEPRECATED ***
658 *
659 * Discussion:
660 * Execute the invocation. If the call was successful, the result
661 * will contain the result of the invocation. If for some reason the
662 * invocation failed, including out of memory or invalid parameter
663 * errors, then the result will contain a fault structure. You must
664 * release the result when you're done with it.
665 *
666 * Mac OS X threading:
667 * Thread safe
668 *
669 * Parameters:
670 *
671 * invocation:
672 * the invocation
673 *
674 * Result:
675 * a CFDictionaryRef containing the result of the execution or a
676 * fault, and optional debug information.
677 *
678 * Availability:
679 * Mac OS X: in version 10.2 and later but deprecated in 10.8
680 * CarbonLib: not available
681 * Non-Carbon CFM: not available
682 }
683 { CF_RETURNS_RETAINED }
WSMethodInvocationInvokenull684 function WSMethodInvocationInvoke( invocation: WSMethodInvocationRef ): CFDictionaryRef; external name '_WSMethodInvocationInvoke';
685 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
686
687 {
688 These calls implemented the asynchronous variant of the WSMethodInvocationInvoke.
689
690 The strategy is to schedule the invocation on a given runloop.
691 When the invocation completes, it calls the specified callback with
692 the result of the execution. The callback is responsible for
693 releasing the result ref. Your code is responsible for
694 unscheduling the invocation from the run loop, whether it completes
695 or not.
696
697 You can re-schedule an invocation after it completes.
698
699 When you unschedule with the run loop, the CallBack is not called.
700
701 If a network error occurs, the kWSFaultString entry of the result
702 will contain some textual description of the error, kWSFaultCode
703 will contain kWSNetworkingFault and kWSFaultExtra will be a
704 dictionary containing two CFNumber values called kWSStreamErrorDomain
705 and kWSStreamErrorError.
706 }
707
708
709 {
710 * WSMethodInvocationCallBackProcPtr
711 *
712 * Discussion:
713 * Prototypes the callback made when an asynchronous invocation
714 * completes. This callback is passed a reference to the invocation
715 * just completed, a pointer to private data, and a dictionary that
716 * contains the return value or falut for this invocation. The
717 * callback is responsible for releasing the dictionary when it is
718 * no longer used.
719 *
720 * Parameters:
721 *
722 * invocation:
723 * the invocation just completed
724 *
725 * info:
726 * private callback data
727 *
728 * outRef:
729 * a CFDictionaryRef containing the result of the execution or a
730 * fault, and optional debug information.
731 }
732 type
733 WSMethodInvocationCallBackProcPtr = procedure( invocation: WSMethodInvocationRef; info: UnivPtr; outRef: CFDictionaryRef );
734
735
736
737 {
738 * WSMethodInvocationSetCallBack() *** DEPRECATED ***
739 *
740 * Discussion:
741 * sets the callback for an asynchronous method invocation. Call
742 * with a clientCB and context of NULL to clear the invocation
743 * callback.
744 *
745 * Mac OS X threading:
746 * Thread safe
747 *
748 * Parameters:
749 *
750 * invocation:
751 * the invocation
752 *
753 * clientCB:
754 * a ProcPtr to be called when the invocation completes.
755 *
756 * context:
757 * a pointer to a WSClientContext. The structure will be copied.
758 *
759 * Availability:
760 * Mac OS X: in version 10.2 and later but deprecated in 10.8
761 * CarbonLib: not available
762 * Non-Carbon CFM: not available
763 }
764 procedure WSMethodInvocationSetCallBack( invocation: WSMethodInvocationRef; clientCB: WSMethodInvocationCallBackProcPtr; var context: WSClientContext ); external name '_WSMethodInvocationSetCallBack';
765 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
766
767
768 {
769 * WSMethodInvocationScheduleWithRunLoop() *** DEPRECATED ***
770 *
771 * Discussion:
772 * Schedules the invocation to execute on the run loop.
773 *
774 * Mac OS X threading:
775 * Thread safe
776 *
777 * Parameters:
778 *
779 * invocation:
780 * the invocation.
781 *
782 * runLoop:
783 * the run loop upon which to scheduile the invocation.
784 *
785 * runLoopMode:
786 * the run loop mode.
787 *
788 * Availability:
789 * Mac OS X: in version 10.2 and later but deprecated in 10.8
790 * CarbonLib: not available
791 * Non-Carbon CFM: not available
792 }
793 procedure WSMethodInvocationScheduleWithRunLoop( invocation: WSMethodInvocationRef; runLoop: CFRunLoopRef; runLoopMode: CFStringRef ); external name '_WSMethodInvocationScheduleWithRunLoop';
794 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
795
796
797 {
798 * WSMethodInvocationUnscheduleFromRunLoop() *** DEPRECATED ***
799 *
800 * Discussion:
801 * Unschedules the invocation from a given run loop and
802 * mode. If the invocation has not yet completed,
803 * its callback will not be called.
804 *
805 * Mac OS X threading:
806 * Thread safe
807 *
808 * Parameters:
809 *
810 * invocation:
811 * the invocation.
812 *
813 * runLoop:
814 * the run loop upon which to scheduile the invocation.
815 *
816 * runLoopMode:
817 * the run loop mode.
818 *
819 * Availability:
820 * Mac OS X: in version 10.2 and later but deprecated in 10.8
821 * CarbonLib: not available
822 * Non-Carbon CFM: not available
823 }
824 procedure WSMethodInvocationUnscheduleFromRunLoop( invocation: WSMethodInvocationRef; runLoop: CFRunLoopRef; runLoopMode: CFStringRef ); external name '_WSMethodInvocationUnscheduleFromRunLoop';
825 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
826
827
828 {
829 Result interrogation.
830
831 If the result is a fault, look in the kWSFaultCode, kWSFaultString
832 and kWSFaultExtra fields of the resulting dictionary. If not a
833 fault, kWSMethodInvocationResult will contain the result of the
834 execution. If debugging information was requested, it will be
835 available in the dictionary as well.
836 }
837 {
838 * WSMethodResultIsFault() *** DEPRECATED ***
839 *
840 * Discussion:
841 * returns TRUE if the method invocation result contains a fault.
842 *
843 * Mac OS X threading:
844 * Thread safe
845 *
846 * Parameters:
847 *
848 * methodResult:
849 * the result ref
850 *
851 * Result:
852 * TRUE if the result contains a fault condition
853 *
854 * Availability:
855 * Mac OS X: in version 10.2 and later but deprecated in 10.8
856 * CarbonLib: not available
857 * Non-Carbon CFM: not available
858 }
WSMethodResultIsFaultnull859 function WSMethodResultIsFault( methodResult: CFDictionaryRef ): Boolean; external name '_WSMethodResultIsFault';
860 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
861
862
863 {
864 Serialization / Deserialization override support.
865
866 You can add serialization and deserialization callbacks for custom
867 types, or types not otherwise handled by the framework. Note that these
868 properties are *not* serialized if the invocation is serialized.
869 }
870
871
872 {
873 * WSMethodInvocationSerializationProcPtr
874 *
875 * Discussion:
876 * Prototypes the callback function for a custom serialization proc.
877 * This callback is called whenever a type has the given CFTypeID.
878 * The callback should return an XML snippet that will be understood
879 * by the server as a correct serialization for a given type. If
880 * the callback returns NULL, the default serializer will be used.
881 *
882 * Parameters:
883 *
884 * invocation:
885 * the invocation currently being serialized
886 *
887 * obj:
888 * the CFTypeRef to be serialized
889 *
890 * info:
891 * private callback data
892 *
893 * Result:
894 * a CFStringRef containing valid XML. The caller of this callback
895 * will release the string.
896 }
897 type
invocationnull898 WSMethodInvocationSerializationProcPtr = function( invocation: WSMethodInvocationRef; obj: CFTypeRef; info: UnivPtr ): CFStringRef;
899
900
901
902 {
903 * WSMethodInvocationAddSerializationOverride() *** DEPRECATED ***
904 *
905 * Discussion:
906 * Specifies a callback which will be called to produce the XML that
907 * represents the serialization of a given type ref. See
908 * WSDescription.h for a list of CFTypes for which there currently
909 * exist serializers. If your callback returns NULL, the default
910 * serializer will be used.
911 *
912 * Mac OS X threading:
913 * Thread safe
914 *
915 * Parameters:
916 *
917 * invocation:
918 * the invocation
919 *
920 * objType:
921 * the CFTypeID of the object
922 *
923 * serializationProc:
924 * the callback called
925 *
926 * context:
927 * a pointer to a WSClientContext. The structure will be copied.
928 *
929 * Availability:
930 * Mac OS X: in version 10.2 and later but deprecated in 10.8
931 * CarbonLib: not available
932 * Non-Carbon CFM: not available
933 }
934 procedure WSMethodInvocationAddSerializationOverride( invocation: WSMethodInvocationRef; objType: CFTypeID; serializationProc: WSMethodInvocationSerializationProcPtr; var context: WSClientContext ); external name '_WSMethodInvocationAddSerializationOverride';
935 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
936
937
938 {
939 * WSMethodInvocationDeserializationProcPtr
940 *
941 * Discussion:
942 * Prototypes the callback function for a custom deserializer. This
943 * callback is passed a reference to the invocation currently being
944 * executed, the root of the response parse tree, the current node
945 * being deserialized, and a pointer to private data. The return
946 * result should be a valid CFTypeRef object (which will be released
947 * by the caller) or NULL to allow the default deserializer to act.
948 *
949 * Parameters:
950 *
951 * invocation:
952 * the invocation executing
953 *
954 * msgRoot:
955 * the root tree element
956 *
957 * deserializeRoot:
958 * the tree element that needs to be deserialied
959 *
960 * info:
961 * private callback data
962 *
963 * Result:
964 * a CFTypeRef representing the deserialized data, or NULL to allow
965 * the default deserializers to act.
966 }
967 type
invocationnull968 WSMethodInvocationDeserializationProcPtr = function( invocation: WSMethodInvocationRef; msgRoot: CFXMLTreeRef; deserializeRoot: CFXMLTreeRef; info: UnivPtr ): CFTypeRef;
969
970
971
972 {
973 * WSMethodInvocationAddDeserializationOverride() *** DEPRECATED ***
974 *
975 * Discussion:
976 * Specifies a callback to be made when parsing an XML method
977 * response. The callback should return a CFTypeRef containing the
978 * deserialized object value. If the callback returns NULL, the
979 * default deserializer will be used.
980 *
981 * Mac OS X threading:
982 * Thread safe
983 *
984 * Parameters:
985 *
986 * invocation:
987 * the invocation
988 *
989 * typeNamespace:
990 * the fully resolved namespace for a specific type. If NULL, the
991 * default namespace will be used. For example, this field could
992 * be: CFSTR("http://www.w3.org/2001/XMLSchema-instance").
993 *
994 * typeName:
995 * the non-qualified type name. This parameter must not be NULL.
996 *
997 * deserializationProc:
998 * a ProcPtr to be called to perform the deserialization
999 *
1000 * context:
1001 * a pointer to a WSClientContext. The structure will be copied.
1002 *
1003 * Availability:
1004 * Mac OS X: in version 10.2 and later but deprecated in 10.8
1005 * CarbonLib: not available
1006 * Non-Carbon CFM: not available
1007 }
1008 procedure WSMethodInvocationAddDeserializationOverride( invocation: WSMethodInvocationRef; typeNamespace: CFStringRef; typeName: CFStringRef; deserializationProc: WSMethodInvocationDeserializationProcPtr; var context: WSClientContext ); external name '_WSMethodInvocationAddDeserializationOverride';
1009 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
1010
1011
1012 {$endc} {TARGET_OS_MAC}
1013
1014 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
1015
1016 end.
1017 {$endc} {not MACOSALLINCLUDE}
1018