websrv_pub/web_service_connection_api/tsrc/bc/connection/inc/TestConnection.h
changeset 0 62f9d29f7211
child 23 a1df79fa35b4
equal deleted inserted replaced
-1:000000000000 0:62f9d29f7211
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     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".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Test connection header declaration      
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 #ifndef TESTCONNECTION_H
       
    26 #define TESTCONNECTION_H
       
    27 
       
    28 #include <SenServiceConnection.h>
       
    29 
       
    30 
       
    31 
       
    32 class CTestConnection : public CBase //:public CSenServiceConnection
       
    33 {
       
    34     public: // Constructors and destructor
       
    35 
       
    36         static CTestConnection* NewL();//MSenServiceConsumer& aConsumer);
       
    37         void ConstructL();//MSenServiceConsumer& aConsumer);
       
    38 		 ~CTestConnection();
       
    39 		 CTestConnection();
       
    40 		 TInt SendL(const TDesC8& aRequest);
       
    41 		 TInt SubmitL(const TDesC8& aRequest, HBufC8*& aResponse) ;
       
    42          TInt IsReady(TBool& aReady) ;
       
    43          TInt HasFacetL(const TDesC8& aURI, TBool& aHasFacet) ;
       
    44          TInt CompleteServerMessagesOnOff(const TBool& aCompleteOnOff) ;
       
    45          TInt SendL(CSenSoapEnvelope& aMessage) ;
       
    46          TInt SubmitL(CSenSoapEnvelope& aMessage, HBufC8*& aResponseTo) ;
       
    47          TInt ServiceDescriptionL(HBufC8*& aServiceDescription) ;
       
    48          TInt StartTransaction() ;
       
    49          TInt TransactionCompleted() ;
       
    50          TInt TxnId() ;
       
    51          TInt SetTransportPropertiesL(const TDesC8& aProperties) ;
       
    52          TInt TransportPropertiesL(HBufC8*& aProperties) ;
       
    53          TInt SendL(const TDesC8& aRequest, const TDesC8& aProperties) ;
       
    54          TInt SubmitL(const TDesC8& aRequest, const TDesC8& aProperties, HBufC8*& aResponse) ;
       
    55          TInt SendL(CSenSoapEnvelope& aMessage, const TDesC8& aProperties) ;
       
    56          TInt SubmitL(CSenSoapEnvelope& aMessage, const TDesC8& aProperties, HBufC8*& aResponseTo) ;
       
    57          TInt SendL(MSenMessage& aMessage) ;
       
    58       	 TInt SubmitL(MSenMessage& aMessage, CSenSoapEnvelope2*& aResponseTo) ;
       
    59       	 MSenMessage* Response() ;
       
    60     	 TInt CancelTransaction(TInt aTransactionID) ;
       
    61     	 TInt IdentityProviderL(CSenIdentityProvider*& apIdentityProvider) ;
       
    62     	 TInt Identifier() ;
       
    63     	 void RegisterFilesObserverL(MSenFilesObserver& aFilesObserver) ;
       
    64     		
       
    65     		
       
    66     		
       
    67     		
       
    68     		
       
    69     		
       
    70     	//MSENFRAGMENT
       
    71          CSenElement& AsElement() ;
       
    72          CSenElement* ExtractElement() ;
       
    73          void SetReader(CSenXmlReader& aReader) ;
       
    74          CSenXmlReader* Reader() ;
       
    75          void ParseL(const TDesC8& aBuf) ;
       
    76          TInt BuildFrom(const TDesC8& aBuf) ;
       
    77          void DelegateParsingL(MSenFragment& aDelegate) ;
       
    78          void DelegateParsingL(  const TDesC8& aNsUri,
       
    79                                         const TDesC8& aLocalName,
       
    80                                         const TDesC8& aQName,
       
    81                                         const RAttributeArray& aAttrs) ;
       
    82 
       
    83          void ParseWithL(CSenXmlReader& aReader) ;
       
    84          void SetOwner(MSenFragment& aFragment) ;
       
    85          void ResumeParsingFromL(const TDesC8& aNsUri,
       
    86                                         const TDesC8& aLocalName,
       
    87                                         const TDesC8& aQName) ;
       
    88 
       
    89          void SetAttributesL(const RAttributeArray& aAttrs) ;
       
    90 
       
    91          void WriteStartElementL(const TDesC8& aNsUri,
       
    92                                         const TDesC8& aLocalName,
       
    93                                         const TDesC8& aQName,
       
    94                                         const RAttributeArray& aAttrs) ;
       
    95 
       
    96          void WriteEndElementL(const TDesC8& aNsUri,
       
    97                                       const TDesC8& aLocalName,
       
    98                                       const TDesC8& aQName) ;
       
    99 
       
   100          const TDesC8& LocalName() const ;
       
   101         
       
   102          const TDesC8& NsUri() const ;
       
   103 
       
   104          const TDesC8& NsPrefix() const ;
       
   105 
       
   106          void WriteAsXMLToL(RWriteStream& aWriteStream) ;
       
   107 
       
   108          HBufC* AsXmlUnicodeL() ;
       
   109          HBufC8* AsXmlL() ;
       
   110 
       
   111          TBool ConsistsOfL(MSenFragment& aCandidate) ;
       
   112     	
       
   113     	//CActive
       
   114     	 void DoCancel() ;
       
   115     	
       
   116     	 void RunL() ;
       
   117     		
       
   118     
       
   119     		
       
   120     		
       
   121 
       
   122         
       
   123 //        CTestProperty* iProp;
       
   124 	//	CSenServiceConnection* iConn;
       
   125     private:
       
   126 	//	CSenServiceConnection* iConn;
       
   127 };
       
   128 
       
   129 
       
   130 
       
   131 #endif