2 * Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: CSenServiceConnection offers public API for
15 * service consumers to access invocable services,
16 * as a part of the Web Services Framework (WSF).
31 #ifndef SEN_SERVICE_CONNECTION_H
32 #define SEN_SERVICE_CONNECTION_H
35 #include <e32base.h> // for CActive
36 #include <MSenServiceConsumer.h>
37 #include <MSenServiceDescription.h>
39 #include <MSenAuthenticationProvider.h>
41 #include <SenSoapMessage.h>
42 #include <SenSoapMessage2.h>
43 //#include <SenAtomEntry.h>
46 #include <MSenMessage.h>
49 const TInt KErrSenNotInitialized = -30291;
50 const TInt KErrSenServiceConnectionBusy = -30292;
51 const TInt KErrConnectionInitializing = -30293;
52 const TInt KErrConnectionExpired = -30294;
53 const TInt KErrSubmitting = -30295;
54 const TInt KErrSenSoapFault = -30296;
55 const TInt KErrSenInternal = -30297;
56 const TInt KErrSenNoEndpoint = -30298;
57 const TInt KErrSenNoContract = -30299;
59 const TInt KErrSenProviderIdInUseByAnotherEndpoint = -30305;
60 const TInt KErrSenNoContractNoEndPoint = -30306;
62 const TInt KErrSenBrokenSoapEnvelope = -30307;
63 const TInt KErrSenBrokenSoapFault = -30308;
64 const TInt KErrSenCancelled = -30309;
67 // HTTP transport error codes:
68 const TInt KErrSenNoHttpResponseBody = -30310;
69 const TInt KErrSenNoHttpContentType = -30311;
70 const TInt KErrSenHttpRedirectRequiresConfirmation = -30312;
72 // SOAP message verification error codes:
73 const TInt KErrSenNoSoapBody = -30313;
74 const TInt KErrSenNoSoapHeader = -30314;
75 const TInt KErrSenNoPermission = -30315;
77 const TInt KErrSenHostNotAvailable = -30318;
79 const TInt KErrSenAuthenticationFault = -30319;
80 const TInt KErrSenNoEndUserPermission = -30321;
81 const TInt KErrSenBrandNotSupported = -30322;
83 const TInt KSenConnectionStatusCreateFailed = -1; // post-state
84 const TInt KSenConnectionStatusNew = 0; // post-state
85 const TInt KSenConnectionStatusReady = 1; // post-state
86 const TInt KSenConnectionStatusExpired = 2; // post-state
87 const TInt KSenConnectionStatusAuthentication = 3; // pre-state
88 const TInt KSenConnectionStatusDiscovery = 4; // pre-state
89 const TInt KSenConnectionStatusMetadataExchange = 5; // pre-state
91 _LIT8(KDefaultBasicWebServicesFrameworkID, "WS-I");
92 _LIT8(KDefaultIdWsfFrameworkID, "ID-WSF");
93 _LIT8(KDefaultRestServicesFrameworkID, "REST");
94 _LIT8(KDefaultWSStarFrameworkID, "WS-STAR");
95 _LIT8(KDefaultAtomPubFrameworkID, "ATOM-PUB");
96 _LIT8(KDefaultOviFrameworkID, "OVI");
98 const TInt KSenTransportStatusCodeOffsetBaseHttp = 1000;
99 const TInt KSenTransportStatusCodeOffsetBaseVtcp = 2000;
101 const TInt KSenTransportStatusCodeVtcpInit = 2001; // KSenTransportStatusCodeOffsetBaseVtcp +1
102 const TInt KSenTransportStatusCodeVtcpActive = 2002; // KSenTransportStatusCodeOffsetBaseVtcp +2
103 const TInt KSenTransportStatusCodeVtcpSuspended = 2003; // KSenTransportStatusCodeOffsetBaseVtcp +3
104 const TInt KSenTransportStatusCodeVtcpInactive = 2004; // KSenTransportStatusCodeOffsetBaseVtcp +4
105 const TInt KSenTransportStatusCodeVtcpUnavailable = 2005; // KSenTransportStatusCodeOffsetBaseVtcp +5
107 // FORWARD DECLARATIONS
108 class CSenServicePattern;
109 class CSenIdentityProvider;
111 struct TSenDataTrafficDetails
115 TSenDataTrafficDetails():iTotalBytesSent(0),
116 iTotalBytesRecieved(0)
120 TBool operator==(TSenDataTrafficDetails& rhs)
122 if( (this->iTotalBytesSent == rhs.iTotalBytesSent) &&
123 (this->iTotalBytesRecieved == rhs.iTotalBytesRecieved) )
129 TSenDataTrafficDetails& operator=(TSenDataTrafficDetails& rhs)
133 this->iTotalBytesSent = rhs.iTotalBytesSent;
134 this->iTotalBytesRecieved = rhs.iTotalBytesRecieved;
138 TSenDataTrafficDetails& operator+=(TSenDataTrafficDetails& rhs)
140 this->iTotalBytesSent += rhs.iTotalBytesSent;
141 this->iTotalBytesRecieved += rhs.iTotalBytesRecieved;
145 TUint iTotalBytesSent ;
146 TUint iTotalBytesRecieved ;
151 struct TSenDataTrafficOperations
154 TSenDataTrafficOperations(): iReset(EFalse)
165 * The class for connecting to service providers
166 * through Web Services Framework (WSF).
168 * The class offers asynchronous construction of a
169 * service connection. Further, there are asynchronous
170 * and synchronous interaction methods for e.g. sending
171 * and receiving data from (possibly remote) service.
173 * WSF offers two default frameworks:
175 * 1. Identity Based Web Services Framework
176 * (ID-WSF). The framework ID for this is
177 * KDefaultIdWsfFrameworkID ("ID-WSF").
179 * 2. Basic Web Services Framework. Framework
180 * ID is KDefaultBasicWebServicesFrameworkID
183 * The most typical use of CSenServiceConnection
184 * is to interact with a service of certain type
185 * through some invocable framework and submitting
186 * and receiving messages.
188 * In case of WebServices, the actual service is remote
189 * and submitted messages are SOAP envelopes. However,
190 * CSenServiceConnection supports accessing any
191 * ServiceInvocationFramework which ECOM plug-in
192 * implementation is present. These plug-ins may
193 * further communicate with some service, including
196 * The link between CSenServiceConnection and any plug-in
197 * implementation interacting with some service is the
198 * framework ID, which is a property of ServiceDescription (SD)
199 * and accessible via MSenServiceDescription interface, which
200 * each SD class must implement.
202 * When creating a connection, one offers predefined SD as
203 * an argument for asynchronous constructor. Or, optionally
204 * only a Liberty Alliance ID-WSF specific contract string
205 * - typically some URN. If only contract is offered, then
206 * the created connection defaults to ID-WSF service and
207 * ID-WSF framework (ID) will be used.
209 * The WSF further uses the offered framework ID while looking
210 * up any matching framework plug-in implementation. As a
211 * result the SD might be offered to several plug-ins.
213 * @lib SenServConn.lib
214 * @since Series60 3.0
217 class CSenServiceConnection : public CActive, public MSenFragment
219 public: // Constructors and destructor
222 * Two-phased constructor intended for Identity based service
223 * consumers (like ID-WSF). The pointer is left on the cleanup stack.
224 * This constructor is ASYNCHRONOUS and the actual state of
225 * created connection has to be observed from SetStatus() AND
226 * HandleErrorL() functions.
227 * If service is found, the SetStatus() call-back is performed
228 * with a status value KSenConnectionStatusReady (1).
229 * Contract of the service (typically some URN) is provided.
230 * Authentication for the Web Service Provider (WSP) connection
231 * is resolved using one of the identity providers which have
232 * been associated with this contract (typically an URN).
234 * This constructor is ASYNCHRONOUS and the actual state of newly
235 * created connection has to be observed from SetStatus() AND
236 * HandleErrorL() functions.
237 * If service is found, a SetStatus call-back with value
238 * KSenConnectionStatusReady (1) is executed.
239 * If some error occurs, HandleErrorL() will be called to inform the
240 * creator of this connection (service consumer application)
242 * For example, if service is not found, a system wide error
243 * code of -1 is deliver via HandleErrorL() to WSC.
245 * Second example: server response HTTP 501 means, that this error
246 * code. 501 will be delivered via HandleErrorL() to WSC.
247 * This can happen in ID-WSF connection being initialized, if
248 * either Authentication Service (AS) or Discovery Service (DS)
251 * @param aConsumer (web) service consumer (for call-backs)
252 * @param aContract contract of the service, typically an URI.
253 * @return a pointer to a CSenServiceConnection instance.
256 IMPORT_C static CSenServiceConnection* NewL(MSenServiceConsumer& aConsumer,
257 const TDesC8& aContract);
260 * Two-phased constructor intended for Identity based service
261 * consumers (like ID-WSF).
262 * This constructor is ASYNCHRONOUS and the actual state of
263 * created connection has to be observed from SetStatus() and
264 * HandleErrorL() functions.
265 * If service is found, the SetStatus() call-back is performed
266 * with a status value KSenConnectionStatusReady (1).
267 * Contract of the service (typically some URN) is provided.
268 * Authentication for the Web Service Provider (WSP) connection
269 * is resolved using one of the identity providers which have
270 * been associated with this contract (typically an URN).
271 * This constructor is ASYNCHRONOUS and the actual state of newly
272 * created connection has to be observed from SetStatus() AND
273 * HandleErrorL() functions.
274 * If service is found, a SetStatus call-back with value
275 * KSenConnectionStatusReady (1) is executed.
276 * If some error occurs, HandleErrorL() will be called to inform the
277 * creator of this connection (service consumer application)
279 * For example, if service is not found, a system wide error
280 * code of -1 is deliver via HandleErrorL() to WSC.
282 * Second example: server response HTTP 501 means, that this error
283 * code. 501 will be delivered via HandleErrorL() to WSC.
284 * This can happen in ID-WSF connection being initialized, if
285 * either Authentication Service (AS) or Discovery Service (DS)
288 * @param aConsumer (web) service consumer (for call-backs)
289 * @param aContract contract of the service, typically an URI.
290 * @return a pointer to a CSenServiceConnection instance.
291 * The pointer is left on the cleanup stack.
293 IMPORT_C static CSenServiceConnection* NewLC(MSenServiceConsumer& aObserver,
294 const TDesC8& aContract);
297 * Two-phased constructor using a service description.
298 * This constructor is ASYNCHRONOUS and the actual state of
299 * created connection has to be observed from SetStatus() and
300 * HandleErrorL() functions.
301 * If service is found, the SetStatus() call-back is executed
302 * with a status value KSenConnectionStatusReady (1)
303 * For ID-WSF connections, the authentication for the Web Service
304 * Provider (WSP) connection is resolved using one of the identity
305 * providers which have been associated with the contract found in
306 * the SD. At minimum, the contract of the service (typically some URN)
307 * has to provided in the SD.
308 * Basic Web Service consumers instantiate a SD where an endpoint
309 * and framework ID KDefaultBasicWebServicesFrameworkID are defined.
310 * @param aObserver connection observer.
311 * @param aServiceDescription is the description used to
312 * obtain a service connection.
313 * @return a pointer to a CSenServiceConnection instance.
315 IMPORT_C static CSenServiceConnection* NewL(MSenServiceConsumer& aObserver,
316 MSenServiceDescription& aServiceDescription);
319 * Two-phased constructor using a service description. The pointer
320 * is left on the cleanup stack.
321 * This constructor is ASYNCHRONOUS and the actual state of
322 * created connection has to be observed from SetStatus() AND
323 * HandleErrorL() functions.
324 * If service is found, the SetStatus() call-back is executed
325 * with a status value KSenConnectionStatusReady (1)
326 * For ID-WSF connections, the authentication for the Web Service
327 * Provider (WSP) connection is resolved using one of the identity
328 * providers which have been associated with the contract found in
329 * the SD. At minimum, the contract of the service (typically some URN)
330 * has to provided in the SD.
331 * Basic Web Service consumers instantiate a SD where an endpoint
332 * and framework ID KDefaultBasicWebServicesFrameworkID are defined.
333 * @param aObserver connection observer.
334 * @param aServiceDescription is the description used to
335 * obtain a service connection.
336 * @return a pointer to a CSenServiceConnection instance.
337 * The pointer is left on the cleanup stack.
339 IMPORT_C static CSenServiceConnection* NewLC(MSenServiceConsumer& aObserver,
340 MSenServiceDescription& aServiceDescription);
343 * The ServicePattern version of two phased constructor.
344 * Note, that this method is intended to be used by service consumers
345 * wishing to initialize connection in specific context called
346 * consumer policy. In consumer policy, certain properties
347 * can be set to further define what kind of connection is acceptable
348 * and how the connection interacts with transport (for example, which
349 * Internet Access Point (IAP) will be used).
350 * However, any ConsumerPolicy feature is applicable in
351 * one-policy-per-client scope and not used as a common policy.
352 * To set permanent information about known WSP, please use the
353 * CSenXmlServiceDescription, which implements MSenProviderPolicy
355 * This constructor is ASYNCHRONOUS and the actual state of
356 * created connection has to be observed from SetStatus() and
357 * HandleErrorL() functions.
358 * If service is found, the SetStatus() call-back is executed
359 * with a status value KSenConnectionStatusReady (1)
360 * For ID-WSF connections, the authentication for the Web Service
361 * Provider (WSP) connection is resolved using one of the identity
362 * providers which have been associated with the contract found in
363 * the SD. At minimum, the contract of the service (typically some URN)
364 * has to provided in the SD.
365 * Basic Web Service consumers instantiate a SD where an endpoint
366 * and framework ID KDefaultBasicWebServicesFrameworkID are defined.
367 * @param aObserver connection observer.
368 * @param aServiceDescription is the description used to
369 * obtain a service connection.
370 * @return a pointer to a CSenServiceConnection instance.
372 IMPORT_C static CSenServiceConnection* NewL(MSenServiceConsumer& aObserver,
373 CSenServicePattern& aServicePattern);
376 * The ServicePattern version of two phased constructor.
377 * Note, that this method is intended to be used by service consumers
378 * wishing to initialize connection in specific context called
379 * consumer policy. In consumer policy, certain properties
380 * can be set to further define what kind of connection is acceptable
381 * and how the connection interacts with transport (for example, which
382 * Internet Access Point (IAP) will be used).
383 * However, any ConsumerPolicy feature is applicable in
384 * one-policy-per-client scope and not used as a common policy.
385 * To set permanent information about known WSP, please use the
386 * CSenXmlServiceDescription, which implements MSenProviderPolicy
388 * This constructor is ASYNCHRONOUS and the actual state of
389 * created connection has to be observed from SetStatus() and
390 * HandleErrorL() functions.
391 * If service is found, the SetStatus() call-back is executed
392 * with a status value KSenConnectionStatusReady (1)
393 * For ID-WSF connections, the authentication for the Web Service
394 * Provider (WSP) connection is resolved using one of the identity
395 * providers which have been associated with the contract found in
396 * the SD. At minimum, the contract of the service (typically some URN)
397 * has to provided in the SD.
398 * Basic Web Service consumers instantiate a SD where an endpoint
399 * and framework ID KDefaultBasicWebServicesFrameworkID are defined.
400 * @param aObserver connection observer.
401 * @param aServiceDescription is the description used to
402 * obtain a service connection.
403 * @return a pointer to a CSenServiceConnection instance.
404 * The pointer is left on the cleanup stack.
406 IMPORT_C static CSenServiceConnection* NewLC(MSenServiceConsumer& aObserver,
407 CSenServicePattern& aServicePattern);
410 * Two-phased constructor intended for Identity based service
411 * consumers (like ID-WSF). The pointer is left on the cleanup stack.
412 * This constructor is ASYNCHRONOUS and the actual state of
413 * created connection has to be observed from SetStatus() AND
414 * HandleErrorL() functions.
415 * If service is found, the SetStatus() call-back is performed
416 * with a status value KSenConnectionStatusReady (1).
417 * Contract of the service (typically some URN) is provided.
418 * Authentication for the Web Service Provider (WSP) connection
419 * is resolved using one of the identity providers which have
420 * been associated with this contract (typically an URN).
422 * This constructor is ASYNCHRONOUS and the actual state of newly
423 * created connection has to be observed from SetStatus() AND
424 * HandleErrorL() functions.
425 * If service is found, a SetStatus call-back with value
426 * KSenConnectionStatusReady (1) is executed.
427 * If some error occurs, HandleErrorL() will be called to inform the
428 * creator of this connection (service consumer application)
430 * For example, if service is not found, a system wide error
431 * code of -1 is deliver via HandleErrorL() to WSC.
433 * Second example: server response HTTP 501 means, that this error
434 * code. 501 will be delivered via HandleErrorL() to WSC.
435 * This can happen in ID-WSF connection being initialized, if
436 * either Authentication Service (AS) or Discovery Service (DS)
439 * @param aConsumer (web) service consumer (for call-backs)
440 * @param aContract contract of the service, typically an URI.
441 * @return a pointer to a CSenServiceConnection instance.
442 * @param aAuthProvider Authentication Provider
444 IMPORT_C static CSenServiceConnection* NewL(MSenServiceConsumer& aConsumer,
445 const TDesC8& aContract,
446 MSenExtendedConsumerInterface& aExtendedConsumer);
448 * Two-phased constructor intended for Identity based service
449 * consumers (like ID-WSF).
450 * This constructor is ASYNCHRONOUS and the actual state of
451 * created connection has to be observed from SetStatus() and
452 * HandleErrorL() functions.
453 * If service is found, the SetStatus() call-back is performed
454 * with a status value KSenConnectionStatusReady (1).
455 * Contract of the service (typically some URN) is provided.
456 * Authentication for the Web Service Provider (WSP) connection
457 * is resolved using one of the identity providers which have
458 * been associated with this contract (typically an URN).
459 * This constructor is ASYNCHRONOUS and the actual state of newly
460 * created connection has to be observed from SetStatus() AND
461 * HandleErrorL() functions.
462 * If service is found, a SetStatus call-back with value
463 * KSenConnectionStatusReady (1) is executed.
464 * If some error occurs, HandleErrorL() will be called to inform the
465 * creator of this connection (service consumer application)
467 * For example, if service is not found, a system wide error
468 * code of -1 is deliver via HandleErrorL() to WSC.
470 * Second example: server response HTTP 501 means, that this error
471 * code. 501 will be delivered via HandleErrorL() to WSC.
472 * This can happen in ID-WSF connection being initialized, if
473 * either Authentication Service (AS) or Discovery Service (DS)
476 * @param aConsumer (web) service consumer (for call-backs)
477 * @param aContract contract of the service, typically an URI.
478 * @param aAuthProvider Authentication Provider
479 * @return a pointer to a CSenServiceConnection instance.
480 * The pointer is left on the cleanup stack.
482 IMPORT_C static CSenServiceConnection* NewLC(MSenServiceConsumer& aConsumer,
483 const TDesC8& aContract,
484 MSenExtendedConsumerInterface& aExtendedConsumer);
487 * Two-phased constructor using a service description.
488 * This constructor is ASYNCHRONOUS and the actual state of
489 * created connection has to be observed from SetStatus() and
490 * HandleErrorL() functions.
491 * If service is found, the SetStatus() call-back is executed
492 * with a status value KSenConnectionStatusReady (1)
493 * For ID-WSF connections, the authentication for the Web Service
494 * Provider (WSP) connection is resolved using one of the identity
495 * providers which have been associated with the contract found in
496 * the SD. At minimum, the contract of the service (typically some URN)
497 * has to provided in the SD.
498 * Basic Web Service consumers instantiate a SD where an endpoint
499 * and framework ID KDefaultBasicWebServicesFrameworkID are defined.
500 * @param aConsumer connection observer.
501 * @param aServiceDescription is the description used to
502 * obtain a service connection.
503 * @param aAuthProvider Authentication Provider
504 * @return a pointer to a CSenServiceConnection instance.
506 IMPORT_C static CSenServiceConnection* NewL(MSenServiceConsumer& aConsumer,
507 MSenServiceDescription& aServiceDescription,
508 MSenExtendedConsumerInterface& aExtendedConsumer);
511 * Two-phased constructor using a service description. The pointer
512 * is left on the cleanup stack.
513 * This constructor is ASYNCHRONOUS and the actual state of
514 * created connection has to be observed from SetStatus() AND
515 * HandleErrorL() functions.
516 * If service is found, the SetStatus() call-back is executed
517 * with a status value KSenConnectionStatusReady (1)
518 * For ID-WSF connections, the authentication for the Web Service
519 * Provider (WSP) connection is resolved using one of the identity
520 * providers which have been associated with the contract found in
521 * the SD. At minimum, the contract of the service (typically some URN)
522 * has to provided in the SD.
523 * Basic Web Service consumers instantiate a SD where an endpoint
524 * and framework ID KDefaultBasicWebServicesFrameworkID are defined.
525 * @param aConsumer connection observer.
526 * @param aServiceDescription is the description used to
527 * obtain a service connection.
528 * @param aAuthProvider Authentication Provider
529 * @return a pointer to a CSenServiceConnection instance.
530 * The pointer is left on the cleanup stack.
532 IMPORT_C static CSenServiceConnection* NewLC(MSenServiceConsumer& aConsumer,
533 MSenServiceDescription& aServiceDescription,
534 MSenExtendedConsumerInterface& aExtendedConsumer);
537 * The ServicePattern version of two phased constructor.
538 * Note, that this method is intended to be used by service consumers
539 * wishing to initialize connection in specific context called
540 * consumer policy. In consumer policy, certain properties
541 * can be set to further define what kind of connection is acceptable
542 * and how the connection interacts with transport (for example, which
543 * Internet Access Point (IAP) will be used).
544 * However, any ConsumerPolicy feature is applicable in
545 * one-policy-per-client scope and not used as a common policy.
546 * To set permanent information about known WSP, please use the
547 * CSenXmlServiceDescription, which implements MSenProviderPolicy
549 * This constructor is ASYNCHRONOUS and the actual state of
550 * created connection has to be observed from SetStatus() and
551 * HandleErrorL() functions.
552 * If service is found, the SetStatus() call-back is executed
553 * with a status value KSenConnectionStatusReady (1)
554 * For ID-WSF connections, the authentication for the Web Service
555 * Provider (WSP) connection is resolved using one of the identity
556 * providers which have been associated with the contract found in
557 * the SD. At minimum, the contract of the service (typically some URN)
558 * has to provided in the SD.
559 * Basic Web Service consumers instantiate a SD where an endpoint
560 * and framework ID KDefaultBasicWebServicesFrameworkID are defined.
561 * @param aConsumer connection observer.
562 * @param aServiceDescription is the description used to
563 * obtain a service connection.
564 * @param aAuthProvider Authentication Provider
565 * @return a pointer to a CSenServiceConnection instance.
567 IMPORT_C static CSenServiceConnection* NewL(MSenServiceConsumer& aConsumer,
568 CSenServicePattern& aServicePattern,
569 MSenExtendedConsumerInterface& aExtendedConsumer);
572 * The ServicePattern version of two phased constructor.
573 * Note, that this method is intended to be used by service consumers
574 * wishing to initialize connection in specific context called
575 * consumer policy. In consumer policy, certain properties
576 * can be set to further define what kind of connection is acceptable
577 * and how the connection interacts with transport (for example, which
578 * Internet Access Point (IAP) will be used).
579 * However, any ConsumerPolicy feature is applicable in
580 * one-policy-per-client scope and not used as a common policy.
581 * To set permanent information about known WSP, please use the
582 * CSenXmlServiceDescription, which implements MSenProviderPolicy
584 * This constructor is ASYNCHRONOUS and the actual state of
585 * created connection has to be observed from SetStatus() and
586 * HandleErrorL() functions.
587 * If service is found, the SetStatus() call-back is executed
588 * with a status value KSenConnectionStatusReady (1)
589 * For ID-WSF connections, the authentication for the Web Service
590 * Provider (WSP) connection is resolved using one of the identity
591 * providers which have been associated with the contract found in
592 * the SD. At minimum, the contract of the service (typically some URN)
593 * has to provided in the SD.
594 * Basic Web Service consumers instantiate a SD where an endpoint
595 * and framework ID KDefaultBasicWebServicesFrameworkID are defined.
596 * @param aConsumer connection observer.
597 * @param aServiceDescription is the description used to
598 * obtain a service connection.
599 * @param aAuthProvider Authentication Provider
600 * @return a pointer to a CSenServiceConnection instance.
601 * The pointer is left on the cleanup stack.
603 IMPORT_C static CSenServiceConnection* NewLC(MSenServiceConsumer& aConsumer,
604 CSenServicePattern& aServicePattern,
605 MSenExtendedConsumerInterface& aExtendedConsumer);
610 * Send an ASYNCHRONOUS request to a service.
611 * In ID-WSF, the request data is a SOAP Body.
612 * Response message is received either via
613 * HandleMessageL() or HandleErrorL() callback.
614 * There are two default frameworks available -
615 * the Identity Based Web Service Framework (which ID is "ID-WSF")
616 * and the Basic Web Services Framework (which ID is "WS-I").
617 * Please note, that Basic Web Services framework does NOT support this method.
618 * Instead, one should send complete SOAP envelopes using SendL(CSenSoapEnvelope&).
619 * So, currently this method is supported only in ID-WSF.
620 * @param aRequest outgoing request message.
621 * @return Transaction ID (positive integer) or error code, if method fails.
623 * Positive integers SendL returns transaction ID of the request,
624 * which can be later on utilized inside
625 * HandleMessageL and HandleErrorL methods,
626 * in order to map request and its response
629 * KErrSenNotInitialized Connection has not been initialized.
630 * KErrSenServiceConnectionBusy Connection is already busy with another
632 * KErrConnectionInitializing Connection is still initializing and
633 * cannot yet process commands.
634 * KErrConnectionExpired Credential for the connection is
635 * expired and needs to be renewed.
636 * This can be done by instantiating a new
638 * KErrSubmitting An error occurred
639 * KErrNoMemory Not enough memory to process the message.
640 * Other error codes are system-wide Symbian error codes.
642 virtual TInt SendL(const TDesC8& aRequest) = 0;
646 * Submit a synchronous request to a service
647 * (in ID-WSF, the SOAP message Body) and receive a response as XML.
648 * There are two default frameworks available -
649 * the Identity Based Web Service Framework (which ID is "ID-WSF")
650 * and the Basic Web Services Framework (which ID is "WS-I").
651 * Please note, that Basic Web Services framework does NOT support this method.
652 * Instead, one must send complete SOAP envelopes using SubmitL(CSenSoapEnvelope&).
653 * So, currently this method is supported only in ID-WSF.
654 * @param aRequest outgoing request message.
655 * @param aResponse the resolved response message.
656 * The ownership of the aResponse is transfered to the caller.
657 * The response is service specific part of the response.
658 * For ID-WSF services response contents is the SOAP Body, or complete SOAP
659 * envelope as XML, depending on the complete server messages on/off setting
661 * @return status/error code.
665 * KErrSenNotInitialized Connection has not been initialized.
666 * KErrSenServiceConnectionBusy Connection is already busy with another request.
667 * KErrConnectionInitializing Connection is still initializing and
668 * cannot yet process commands.
669 * KErrConnectionExpired Credential for the connection is
670 * expired and needs to be renewed.
671 * This can be done by instantiating a new
673 * KErrSubmitting An internal error occurred.
674 * KErrSenInternal Internal state is invalid.
675 * Other error codes are system-wide Symbian error codes.
677 virtual TInt SubmitL(const TDesC8& aRequest, HBufC8*& aResponse) = 0;
681 * Consumer application can use this method to check that
682 * service connection is in ready state.
683 * In ID-WSF, this means that WSF interprets that credentials
684 * for the service connection are valid (not expired).
685 * @param aReady indicates that the connection is ready to be used.
686 * @return status/error code.
689 * Error codes are system-wide Symbian error codes.
691 virtual TInt IsReady(TBool& aReady) = 0;
695 * Check if the underlying service connection has a certain characteristic
697 * Currently, only ID-WSF framework supports facets.
698 * For example, if consumer application is interested to resolve if
699 * initialized service connection has a facet indicating that service
700 * is free of charge (for e.g. "urn:framework.com.free:cost"), the
701 * method used to check this would be:
702 * _LIT8(KFacetOfFreeService, "urn:some.service.free:cost");
703 * int err = HasFacetL(KFacetOfFreeService, hasFacet);
705 * In the service session of initialed connection, this would be the form
706 * of the facet element:
707 * <Facet name="urn:framework.com.free:cost"/>
709 * If there is no facet in the service connection then the element is not
711 * @param aURI the name of the facet
712 * @param aHasFacet will indicate if underlying service has a certain
714 * @return status/error code.
718 * KErrSenNotInitialized Connection has not been initialized.
719 * KErrConnectionInitializing Connection is still initializing and
720 * cannot yet process commands.
721 * KErrConnectionExpired Connection is expired and needs to be
723 * KErrBadDescriptor The aUri parameter was an invalid
725 * Other error codes are system-wide Symbian error codes.
727 virtual TInt HasFacetL(const TDesC8& aURI, TBool& aHasFacet) = 0;
731 * Consumer application can use this method to set flag which defines
732 * whether or not the consumer wishes to receive complete SOAP envelope
734 * If complete server messages mode is off, then only the <Body> element
735 * is received from the SOAP envelope, otherwise full SOAP envelope.
736 * Note: Calling this function must not be done before connection is
737 * initialized (the observer's SetStatus() has been called with value
738 * KSenConnectionStatusReady).
739 * Calling this function should be done before sending or submitting
741 * @param aCompleteOnOff defines the content of HandleMessageL() callback.
742 * If set to ETrue (ON), then complete SOAP envelopes are
743 * received, including <Header> element.
744 * If set to EFalse (OFF), only the service specific
745 * content - SOAP envelope <Body> element - is received.
746 * In WSF frameworks the default settings are:
747 * 1. In ID-WSF, the complete server messages is OFF.
748 * 2. In Basic Web Services, the default is ON.
749 * @return status/error code.
753 * KErrSenNotInitialized Connection has not been initialized.
754 * KErrConnectionInitializing Connection is still initializing and
755 * cannot yet process commands.
756 * KErrConnectionExpired Connection is expired and needs to be
758 * Other error codes are system-wide Symbian error codes.
760 virtual TInt CompleteServerMessagesOnOff(const TBool& aCompleteOnOff) = 0;
764 * Sends a SOAP message to the service. The SOAP envelope may contain
765 * proprietary headers. The system will augment the message with the
766 * appropriate headers specified in the service invocation framework,
767 * so a client application should add only non-standard headers; and
768 * if it doesn't need to set such headers it is strongly recommended
769 * to use SendL(TDesC8&), which is meant for that.
770 * This is an asynchronous function, that returns immediately.
771 * When the service responds, the SOAP envelope content will
772 * be received via HandleMessageL() callback. In case of an
773 * error - like a SOAP fault - HandleErrorL() will be called
774 * with appropriate error code.
775 * There are two default frameworks available -
776 * the Identity Based Web Service Framework (which ID is "ID-WSF")
777 * and the Basic Web Services Framework (which ID is "WS-I").
778 * Please note, that ID-WSF does NOT support this method.
779 * Instead, one should send SOAP envelope Bodies using
780 * SendL(const TDesC8&).
781 * So, currently this method is supported only in Basic Web Services framework.
782 * @param aMessage The service specific message - a full SOAP envelope
783 * @return Transaction ID (positive integer) or error code, if method fails.
785 * Positive integers SendL returns transaction ID of the request,
786 * which can be later on utilized inside
787 * HandleMessageL and HandleErrorL methods,
788 * in order to map request and its response
791 * KErrSenNotInitialized Connection has not been initialized.
792 * KErrSenServiceConnectionBusy Connection is already busy with another
794 * KErrConnectionInitializing Connection is still initializing and
795 * cannot yet process commands.
796 * KErrConnectionExpired Connection is expired and needs to be
798 * KErrSubmitting An internal error has occurred.
799 * KErrNoMemory Not enough memory to process the
801 * Other error codes are system-wide Symbian error codes.
803 virtual TInt SendL(CSenSoapEnvelope& aMessage) = 0;
807 * Submits a SOAP message to the service. This is a synchronous call,
808 * returning a SOAP envelope that was received from the service.
809 * There are two default frameworks available:
810 * the Identity Based Web Service Framework (which ID is "ID-WSF")
811 * and the Basic Web Services Framework (which ID is "WS-I").
812 * Please note, that ID-WSF does NOT support this method.
813 * Instead, one should send SOAP envelope Bodies using SendL(const TDesC8&).
814 * So, currently this method is supported only in Basic Web Services framework.
815 * @param aMessage SOAPEnvelope with the service specific message
816 * without any framework wrapping
817 * @param aResponseTo This is a ref-to-pointer where response
818 * from the service will be allocated. If the
819 * complete server messages mode is set to OFF,
820 * then only <Body> element will be returned,
821 * otherwise a complete SOAP envelope.
822 * The ownership of aResponse is transfered to
824 * @return status/error code
828 * KErrSenNotInitialized Connection has not been initialized.
829 * KErrSenServiceConnectionBusy Connection is already busy with another
831 * KErrConnectionInitializing Connection is still initializing and
832 * cannot yet process commands.
833 * KErrConnectionExpired Connection is expired and needs to be
835 * KErrSubmitting An internal error has occurred.
836 * KErrNoMemory Not enough memory to process the
838 * KErrSenInternal Internal state is invalid.
839 * Other error codes are system-wide Symbian error codes.
841 virtual TInt SubmitL(CSenSoapEnvelope& aMessage, HBufC8*& aResponseTo) = 0;
845 * Gets service description of current connection.
846 * @param aServiceDescription Contains the service description on return
847 * @return status/error code.
851 * KErrSenNotInitialized Connection has not been initialized.
852 * KErrSenServiceConnectionBusy Connection is already busy with another
854 * KErrConnectionInitializing Connection is still initializing and
855 * cannot yet process commands.
856 * KErrConnectionExpired Connection is expired and needs to be
858 * KErrUnderFlow Server side returned invalid service
860 * KErrUnknown Client-Server request mismatch.
861 * Other error codes are system-wide Symbian error codes.
863 virtual TInt ServiceDescriptionL(HBufC8*& aServiceDescription) = 0;
867 * Starts an application level transaction. The consumer may now start
868 * to communicate with some service withing a chain of correlated messages.
869 * When responding to a certain SOAP message inside a transaction, the last
870 * received message ID is used as "refToMessageId".
871 * From default frameworks, only ID-WSF supports transactions.
872 * @return KErrNone if no errors occur.
873 * Other error codes are system-wide Symbian error codes.
875 virtual TInt StartTransaction() = 0;
879 * Stops application level transaction by resetting the "refToMessageId".
880 * After stopping a transaction the next message will have no
882 * @return KErrNone if no errors occur.
883 * Other error codes are system-wide Symbian error codes.
885 virtual TInt TransactionCompleted() = 0;
889 * Returns the transasction ID of this message or error. Id is guaranteed
890 * to return unique ID when called from inside HandleMessageL() or
891 * HandleErrorL callback. This transasction ID may be used to map the
892 * response with the preceedeing SendL() call (a request).
893 * @return TInt transaction ID, or KErrNotFound, if no transaction is
896 virtual TInt TxnId() = 0;
900 * Sets transport specific properties which apply as long as this connection
901 * is alive (session). Furthermore, the properties are effective for this session
902 * in cumulative manner: each property has unique key (name) which is associated
903 * to the actual value of that property. When SetTransportPropertiesL method is
904 * called multiple times - in sequence - the last value for each key overrides any
905 * previous definitions. If any latter call introduces new keys (property names),
906 * they are appended to the list of currently effective properties.
907 * Also note, that it is also possible to set message specific properties when making
908 * a SendL/SubmitL call. If such transport properties for message are provided, and
909 * those include updates to some properties, the new ones are effective only for that
910 * certain message, i.e. those are transaction specific. For any following message,
911 * that is sent over a service connection, the session specific properties apply,
912 * assuming that the new message does not (again) override some of the property values.
913 * @param aProperties contains the transport properties in serialized (UTF-8) form.
914 * With HTTP, this descriptor is typically created by utilizing CSenHttpProperties class.
915 * @return KErrNone if successful or otherwise some system-wide error code.
917 virtual TInt SetTransportPropertiesL(const TDesC8& aProperties) = 0;
921 * Method returns currently effective transport properties as a serialized
922 * descriptor. With HTTP, one may utilize CSenHttpProperities class in
923 * order to read this data into properties object. Note that returned
924 * list of properties also includes properties, which are defined as default
925 * for certain transport in the webservice framework.
927 virtual TInt TransportPropertiesL(HBufC8*& aProperties) = 0;
931 * Send an ASYNCHRONOUS request to a service.
932 * In ID-WSF, the request data is a SOAP Body.
933 * Response message is received either via
934 * HandleMessageL() or HandleErrorL() callback.
935 * There are two default frameworks available -
936 * the Identity Based Web Service Framework (which ID is "ID-WSF")
937 * and the Basic Web Services Framework (which ID is "WS-I").
938 * Please note, that Basic Web Services framework does NOT support this method.
939 * Instead, one should send complete SOAP envelopes using SendL(CSenSoapEnvelope&).
940 * So, currently this method is supported only in ID-WSF.
941 * @param aRequest outgoing request message.
942 * @param aProperties contains transport spesific properties, serialized
943 * into descriptor. With HTTP, one can create this by utilizing specialized
944 * CSenHttpProperties class.
945 * @return Transaction ID (positive integer) or error code, if method fails.
947 * Positive integers SendL returns transaction ID of the request,
948 * which can be later on utilized inside
949 * HandleMessageL and HandleErrorL methods,
950 * in order to map request and its response
953 * KErrSenNotInitialized Connection has not been initialized.
954 * KErrSenServiceConnectionBusy Connection is already busy with another
956 * KErrConnectionInitializing Connection is still initializing and
957 * cannot yet process commands.
958 * KErrConnectionExpired Credential for the connection is
959 * expired and needs to be renewed.
960 * This can be done by instantiating a new
962 * KErrSubmitting An error occurred
963 * KErrNoMemory Not enough memory to process the message.
964 * Other error codes are system-wide Symbian error codes.
966 virtual TInt SendL(const TDesC8& aRequest, const TDesC8& aProperties) = 0;
970 * Submit a request via SYNCHRONOUS call to a service
971 * (in ID-WSF, the SOAP message Body) and receive a response as XML.
972 * There are two default frameworks available -
973 * the Identity Based Web Service Framework (which ID is "ID-WSF")
974 * and the Basic Web Services Framework (which ID is "WS-I").
975 * Please note, that Basic Web Services framework does NOT support this method.
976 * Instead, one must send complete SOAP envelopes using SubmitL(CSenSoapEnvelope&).
977 * So, currently this method is supported only in ID-WSF.
978 * @param aRequest outgoing request message.
979 * @param aResponse the resolved response message.
980 * The ownership of the aResponse is transfered to the caller.
981 * The response is service specific part of the response.
982 * For ID-WSF services response contents is the SOAP Body, or complete SOAP
983 * envelope as XML, depending on the complete server messages on/off setting
985 * @param aProperties contains transport spesific properties, serialized
986 * into descriptor. With HTTP, one can create this by utilizing specialized
987 * CSenHttpProperties class.
988 * @return status/error code.
992 * KErrSenNotInitialized Connection has not been initialized.
993 * KErrSenServiceConnectionBusy Connection is already busy with another request.
994 * KErrConnectionInitializing Connection is still initializing and
995 * cannot yet process commands.
996 * KErrConnectionExpired Credential for the connection is
997 * expired and needs to be renewed.
998 * This can be done by instantiating a new
1000 * KErrSubmitting An internal error occurred.
1001 * KErrSenInternal Internal state is invalid.
1002 * Other error codes are system-wide Symbian error codes.
1004 virtual TInt SubmitL(const TDesC8& aRequest, const TDesC8& aProperties, HBufC8*& aResponse) = 0;
1008 * Sends a SOAP message to the service. The SOAP envelope may contain
1009 * proprietary headers. The system will augment the message with the
1010 * appropriate headers specified in the service invocation framework,
1011 * so a client application should add only non-standard headers; and
1012 * if it doesn't need to set such headers it is strongly recommended
1013 * to use SendL(TDesC8&), which is meant for this.
1014 * This is an asynchronous function, that returns immediately.
1015 * When the service responds, the SOAP envelope content will
1016 * be received via HandleMessageL() callback. In case of an
1017 * error - like a SOAP fault - HandleErrorL() will be called
1018 * with appropriate error code.
1019 * There are two default frameworks available -
1020 * the Identity Based Web Service Framework (which ID is "ID-WSF")
1021 * and the Basic Web Services Framework (which ID is "WS-I").
1022 * Please note, that ID-WSF does NOT support this method.
1023 * Instead, one should send SOAP envelope Bodies using
1024 * SendL(const TDesC8&).
1025 * So, currently this method is supported only in Basic Web Services framework.
1028 * Message is send as serialized XML or Soap message to SendL
1029 * aProperties could be "HTTP GET" or "HTTP DELETE"
1030 * HTTP GET or HTTP DELETE transport property has been enabled via CSenHttpTransportProperties.
1031 * This scenario is not supported
1033 * @param aMessage The service specific message - a full SOAP envelope
1034 * @param aProperties contains transport spesific properties, serialized
1035 * into descriptor. With HTTP, one can create this by utilizing specialized
1036 * CSenHttpProperties class.
1037 * @return Transaction ID (positive integer) or error code, if method fails.
1039 * Positive integers SendL returns transaction ID of the request,
1040 * which can be later on utilized inside
1041 * HandleMessageL and HandleErrorL methods,
1042 * in order to map request and its response
1045 * KErrSenNotInitialized Connection has not been initialized.
1046 * KErrSenServiceConnectionBusy Connection is already busy with another
1048 * KErrConnectionInitializing Connection is still initializing and
1049 * cannot yet process commands.
1050 * KErrConnectionExpired Connection is expired and needs to be
1052 * KErrSubmitting An internal error has occurred.
1053 * KErrNoMemory Not enough memory to process the
1055 * KErrNotSupported HTTP GET or HTTP DELETE is enabled
1056 * Other error codes are system-wide Symbian error codes.
1058 virtual TInt SendL(CSenSoapEnvelope& aMessage, const TDesC8& aProperties) = 0;
1061 * Submits a SOAP message to the service. This is a synchronous call,
1062 * returning a SOAP envelope that was received from the service.
1063 * There are two default frameworks available:
1064 * the Identity Based Web Service Framework (which ID is "ID-WSF")
1065 * and the Basic Web Services Framework (which ID is "WS-I").
1066 * Please note, that ID-WSF does NOT support this method.
1067 * Instead, one should send SOAP envelope Bodies using SendL(const TDesC8&).
1068 * So, currently this method is supported only in Basic Web Services framework.
1071 * Message is send as serialized XML or Soap message to SubmitL
1072 * aProperties could be "HTTP GET" or "HTTP DELETE"
1073 * HTTP GET or HTTP DELETE transport property has been enabled via CSenHttpTransportProperties.
1074 * This scenario is not supported
1076 * @param aMessage SOAPEnvelope with the service specific message
1077 * without any framework wrapping
1078 * @param aProperties contains transport spesific properties, serialized
1079 * into descriptor. With HTTP, one can create this by utilizing specialized
1080 * CSenHttpProperties class.
1081 * @param aResponseTo This is a ref-to-pointer where response
1082 * from the service will be allocated. If the
1083 * complete server messages mode is set to OFF,
1084 * then only <Body> element will be returned,
1085 * otherwise a complete SOAP envelope.
1086 * The ownership of aResponse is transfered to
1088 * @return status/error code
1092 * KErrSenNotInitialized Connection has not been initialized.
1093 * KErrSenServiceConnectionBusy Connection is already busy with another
1095 * KErrConnectionInitializing Connection is still initializing and
1096 * cannot yet process commands.
1097 * KErrConnectionExpired Connection is expired and needs to be
1099 * KErrSubmitting An internal error has occurred.
1100 * KErrNoMemory Not enough memory to process the
1102 * KErrSenInternal Internal state is invalid.
1103 * KErrNotSupported HTTP GET or HTTP DELETE is enabled
1104 * Other error codes are system-wide Symbian error codes.
1106 virtual TInt SubmitL(CSenSoapEnvelope& aMessage, const TDesC8& aProperties, HBufC8*& aResponseTo) = 0;
1109 * Sends a SOAP message to the service. The SOAP envelope may contain
1110 * proprietary headers. The system will augment the message with the
1111 * appropriate headers specified in the service invocation framework,
1112 * so a client application should add only non-standard headers.
1113 * This is an asynchronous function, that returns immediately.
1114 * When the service responds, the SOAP envelope content will
1115 * be received via HandleMessageL() callback. In case of an
1116 * error - like a SOAP fault - HandleErrorL() will be called
1117 * with appropriate error code.
1118 * There are two default frameworks available -
1119 * the Identity Based Web Service Framework (which ID is "ID-WSF")
1120 * and the Basic Web Services Framework (which ID is "WS-I").
1121 * Please note, that ID-WSF does NOT support this method.
1122 * Instead, one should send SOAP envelope Bodies using
1123 * SendL(const TDesC8&).
1124 * So, currently this method is supported only in Basic Web Services framework.
1126 * @param aMessage The service specific message - a full SOAP envelope
1127 * @return Transaction ID (positive integer) or error code, if method fails.
1129 * Positive integers SendL returns transaction ID of the request,
1130 * which can be later on utilized inside
1131 * HandleMessageL and HandleErrorL methods,
1132 * in order to map request and its response
1135 * KErrSenNotInitialized Connection has not been initialized.
1136 * KErrSenServiceConnectionBusy Connection is already busy with another
1138 * KErrConnectionInitializing Connection is still initializing and
1139 * cannot yet process commands.
1140 * KErrConnectionExpired Connection is expired and needs to be
1142 * KErrSubmitting An internal error has occurred.
1143 * KErrNoMemory Not enough memory to process the
1145 * KErrNotSupported HTTP GET or HTTP DELETE is enabled
1146 * Other error codes are system-wide Symbian error codes.
1148 virtual TInt SendL(MSenMessage& aMessage) = 0;
1151 * Submits a SOAP message to the service. This is a synchronous call,
1152 * returning a SOAP envelope that was received from the service.
1153 * There are two default frameworks available:
1154 * the Identity Based Web Service Framework (which ID is "ID-WSF")
1155 * and the Basic Web Services Framework (which ID is "WS-I").
1156 * Please note, that ID-WSF does NOT support this method.
1157 * Instead, one should send SOAP envelope Bodies using SendL(const TDesC8&).
1158 * So, currently this method is supported only in Basic Web Services framework.
1160 * @param aMessage SOAPEnvelope with the service specific message
1161 * without any framework wrapping
1162 * @param aResponseTo This is a ref-to-pointer where response
1163 * from the service will be allocated. If the
1164 * complete server messages mode is set to OFF,
1165 * then only <Body> element will be returned,
1166 * otherwise a complete SOAP envelope.
1167 * The ownership of aResponse is transfered to
1169 * @return status/error code
1173 * KErrSenNotInitialized Connection has not been initialized.
1174 * KErrSenServiceConnectionBusy Connection is already busy with another
1176 * KErrConnectionInitializing Connection is still initializing and
1177 * cannot yet process commands.
1178 * KErrConnectionExpired Connection is expired and needs to be
1180 * KErrSubmitting An internal error has occurred.
1181 * KErrNoMemory Not enough memory to process the
1183 * KErrSenInternal Internal state is invalid.
1184 * KErrNotSupported HTTP GET or HTTP DELETE is enabled
1185 * Other error codes are system-wide Symbian error codes.
1187 virtual TInt SubmitL(MSenMessage& aMessage, CSenSoapEnvelope2*& aResponseTo) = 0;
1190 * Getter for currently active transaction (service response) that is
1191 * being handled by the service consumer.
1192 * @return a pointer to currently active transaction (service response).
1193 * It is guarenteed, that the method returns a pointer to
1194 * transaction only when called inside HandleMessageL or
1195 * HandleErrorL callback methods of MSenServiceConsumer,
1196 * otherwise it will return NULL.
1198 virtual MSenMessage* Response() = 0;
1201 * Cancels any active request, if pending transaction
1202 * (txn) can be found with given txn ID.
1203 * @param aTransactionID is the transaction ID to be cancelled. This id has earlier been
1204 * acquired from a call to some of the asynchronous SendL variants.
1206 * @return KErrNone on success
1207 * KErrNotFound, if there is no pending transaction (active request),
1208 * or some of the system-wide error codes otheriwise.
1210 virtual TInt CancelTransaction(TInt aTransactionID) = 0;
1213 * Getter for the identity provider (XML) service description.
1214 * @param apIdentityProvider will point to a new IDP instance,
1215 * if such is associated with this connection (and this connection
1216 * was ready before calling this method), or NULL otherwise.
1217 * @return KErrNone if IDP description can be found, or some
1218 * of the system wide error code otherwise.
1220 virtual TInt IdentityProviderL(CSenIdentityProvider*& apIdentityProvider) = 0;
1223 * Getter for the identifier of this connection.
1224 * @return the identifier as integer.
1226 virtual TInt Identifier() = 0;
1229 * Registers observer of BLOBs transfer progress.
1231 * @param aFilesObserver Implementation of transfer progress observer.
1234 virtual void DataTrafficDetails(TSenDataTrafficDetails& aDetails,
1235 TSenDataTrafficOperations& aOperations) = 0;
1238 * Service Consumer can call this method to acquire a new interface,
1239 * which is identified by unique ID (UID).
1240 * @param aUID is the UID of the interface being requested
1241 * @return TAny* pointer to the interface, or if no interface to
1242 * given UID exists, function returns NULL. In typical cases, returned
1243 * pointer should be cast to some preknown M-class pointer (the actual
1246 * List of currently supported interfaces:
1247 * KSenInterfaceUidAlrServiceConnection => MSenAlrServiceConnection
1249 virtual TAny* InterfaceByUid( TUid aUID ) = 0;
1252 * Sends a RFile Handle to the service.
1253 * the Identity Based Web Service Framework (which ID is "ID-WSF")
1254 * and the Basic Web Services Framework (which ID is "WS-I").
1255 * Please note, that ID-WSF does NOT support this method.
1256 * SendL(const TDesC8&).
1257 * So, currently this method is supported only in Basic Web Services framework.
1258 * @param aMessage The service specific message - a full SOAP envelope
1259 * @return Transaction ID (positive integer) or error code, if method fails.
1261 * Positive integers SendL returns transaction ID of the request,
1262 * which can be later on utilized inside
1263 * HandleMessageL and HandleErrorL methods,
1264 * in order to map request and its response
1267 * KErrSenNotInitialized Connection has not been initialized.
1268 * KErrArgument RFile handle is NULL ( Specified file doesnot exist)
1269 * KErrSenServiceConnectionBusy Connection is already busy with another
1271 * KErrConnectionInitializing Connection is still initializing and
1272 * cannot yet process commands.
1273 * KErrConnectionExpired Connection is expired and needs to be
1275 * KErrSubmitting An internal error has occurred.
1276 * KErrNoMemory Not enough memory to process the
1278 * Other error codes are system-wide Symbian error codes.
1280 virtual TInt SendL(RFile& aFileHandle) = 0;
1283 * Submits a RFile Handle to the service. This is a synchronous call,
1284 * returning a SOAP envelope that was received from the service.
1285 * There are two default frameworks available:
1286 * @param aResponseTo This is a ref-to-pointer where response
1287 * from the service will be allocated. If the
1288 * complete server messages mode is set to OFF,
1289 * then only <Body> element will be returned,
1290 * otherwise a complete SOAP envelope.
1291 * The ownership of aResponse is transfered to
1293 * @return status/error code
1297 * KErrSenNotInitialized Connection has not been initialized.
1298 * KErrSenServiceConnectionBusy Connection is already busy with another
1300 * KErrConnectionInitializing Connection is still initializing and
1301 * cannot yet process commands.
1302 * KErrConnectionExpired Connection is expired and needs to be
1304 * KErrSubmitting An internal error has occurred.
1305 * KErrNoMemory Not enough memory to process the
1307 * KErrArgument RFile handle is NULL ( Specified file doesnot exist)
1308 * KErrSenInternal Internal state is invalid.
1309 * Other error codes are system-wide Symbian error codes.
1311 virtual TInt SubmitL(RFile& aFileHandle, HBufC8*& aResponseTo) = 0;
1316 * C++ default constructor.
1318 CSenServiceConnection();
1322 #endif //SEN_SERVICE_CONNECTION_H