webservices/idwsfplugin/inc/idwsfserviceinstance.h
changeset 0 62f9d29f7211
equal deleted inserted replaced
-1:000000000000 0:62f9d29f7211
       
     1 /*
       
     2 * Copyright (c) 2002-2005 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: Header declaration
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 #ifndef IDWSF_SERVICE_INSTANCE_H
       
    26 #define IDWSF_SERVICE_INSTANCE_H
       
    27 
       
    28 // INCLUDES
       
    29 #include "senwsdescription.h"
       
    30 #include "senidwsfplugin.h"
       
    31 
       
    32 // FORWARD DECLARATION
       
    33 class CSenCredential;
       
    34 
       
    35 // CLASS DECLARATION
       
    36 class CIdWsfServiceInstance : public CSenWSDescription
       
    37     {
       
    38     public:
       
    39         
       
    40         static CIdWsfServiceInstance* NewL();
       
    41         static CIdWsfServiceInstance* NewLC();
       
    42         static CIdWsfServiceInstance* NewL(const TDesC8& aUri);
       
    43         static CIdWsfServiceInstance* NewLC(const TDesC8& aUri);
       
    44         static CIdWsfServiceInstance* NewL(CIdWsfServiceInstance& aTemplate);
       
    45         static CIdWsfServiceInstance* NewLC(CIdWsfServiceInstance& aTemplate);
       
    46 
       
    47         virtual ~CIdWsfServiceInstance();
       
    48 
       
    49         // New functions
       
    50         
       
    51         virtual HBufC8* AsXmlL();
       
    52         virtual HBufC* AsXmlUnicodeL();
       
    53         virtual void WriteAsXMLToL(RWriteStream& aWriteStream);
       
    54         virtual TBool Matches(CIdWsfServiceInstance& aOtherServiceInstance);
       
    55         virtual TPtrC8 ProviderId();
       
    56         virtual TPtrC8 ResourceId();
       
    57         virtual TPtrC8 ServiceType();
       
    58         virtual TInt SetProviderIdL(const TDesC8& aURI);
       
    59         virtual void SetResourceIdL(const TDesC8& aURI);
       
    60         virtual void SetServiceTypeL(const TDesC8& aURI);
       
    61         virtual CDesC8Array& MechanismsL();
       
    62         virtual CDesC8Array& CredentialRefsL();
       
    63         virtual TBool SupportsMechanism(const TDesC8& aURI);
       
    64         CSenCredential* Credential();
       
    65         virtual void SetCredentialL(const TDesC8& aIdRef,
       
    66                                     const CSenCredential& aCredential);
       
    67 
       
    68         virtual void SetCredentialL(const CSenCredential& aCredential);
       
    69         virtual void AddSecurityMechL(const TDesC8& aUri);
       
    70         virtual void AddCredentialRefL(const TDesC8& aIdRef);
       
    71 
       
    72         // Functions from base classes
       
    73 
       
    74         // From MSenServiceDescription
       
    75         virtual TBool Matches(MSenServiceDescription& aPattern);
       
    76         virtual TPtrC8 Endpoint();
       
    77         virtual TPtrC8 Contract();
       
    78         virtual TInt HasFacetL(const TDesC8& aURI, TBool& aHasFacet);
       
    79         virtual TInt FacetValue(TDesC8& aURI, HBufC8*& aValueTo);
       
    80         virtual TInt AddFacetL(const CSenFacet& aFacet);
       
    81         virtual TInt SetFacetL(const CSenFacet& aFacet);
       
    82         virtual TInt RemoveFacet(const TDesC8& aURI);
       
    83         virtual TInt FacetsL(RFacetArray& aFacetArray);
       
    84         virtual TInt ScoreMatchL(MSenServiceDescription& aPattern);
       
    85         virtual TPtrC8 FrameworkId();
       
    86         virtual TPtrC8 FrameworkVersion();
       
    87         virtual void SetEndPointL(const TDesC8& aURI);
       
    88         virtual void SetContractL(const TDesC8& aContract);
       
    89         virtual TBool HasEqualPrimaryKeysL(MSenServiceDescription& aCandidate);
       
    90         virtual TBool HasSuperClass( TDescriptionClassType aType );
       
    91 
       
    92     private:
       
    93     
       
    94         /**
       
    95         * C++ default constructor.
       
    96         */
       
    97         CIdWsfServiceInstance();
       
    98         
       
    99         /**
       
   100         * By default Symbian 2nd phase constructor is private.
       
   101         */
       
   102         void ConstructL(const TDesC8& aUri, const TDesC8& aProviderId);
       
   103 
       
   104     private:
       
   105         HBufC8* ipProviderId;               // Owned
       
   106         HBufC8* ipEndpoint;                 // Owned
       
   107         HBufC8* ipServiceType;              // Owned
       
   108         HBufC8* ipResourceId;               // Owned
       
   109         CDesC8Array* ipMechanisms;          // Owned
       
   110         CDesC8Array* ipCredentialRefs;      // Owned
       
   111         RCredentialList iCredentialList;    // Owned
       
   112         RFacetArray iFacets;                // Owned
       
   113     };
       
   114 
       
   115 #endif // IDWSF_SERVICE_INSTANCE_H
       
   116 
       
   117 // End of File