ncdengine/provider/server/inc/ncdsubscriptionssourceidentifier.h
changeset 4 32704c33136d
equal deleted inserted replaced
-1:000000000000 4:32704c33136d
       
     1 /*
       
     2 * Copyright (c) 2006 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:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_NCD_SUBSCRIPTIONS_SOURCE_IDENTIFIER_H
       
    20 #define C_NCD_SUBSCRIPTIONS_SOURCE_IDENTIFIER_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 
       
    25 /**
       
    26  *  Class to identify subscriptions source
       
    27  *
       
    28  *  Class to identify subscriptions source which is done with
       
    29  *  URI and namespace. This knowledge is used to identify for
       
    30  *  example where subscription management query is sent.
       
    31  *
       
    32  *  @lib ?library
       
    33  *  @since S60 ?S60_version *** for example, S60 v3.0
       
    34  */
       
    35 class CNcdSubscriptionsSourceIdentifier : public CBase
       
    36     {
       
    37 
       
    38 public:
       
    39 
       
    40     static CNcdSubscriptionsSourceIdentifier* NewL(
       
    41         const TDesC& aUri,
       
    42         const TDesC& aNamespace,
       
    43         TBool aRequireCapabilityCheck );
       
    44 
       
    45     static CNcdSubscriptionsSourceIdentifier* NewLC(
       
    46         const TDesC& aUri,
       
    47         const TDesC& aNamespace,
       
    48         TBool aRequireCapabilityCheck );
       
    49 
       
    50     virtual ~CNcdSubscriptionsSourceIdentifier();
       
    51 
       
    52 
       
    53     /** 
       
    54      * Comparison method. Compares the uri and namespace of two
       
    55      * identifiers to determine equivalence.
       
    56      *
       
    57      * @return  Boolean, ETrue if pairs match.
       
    58      */
       
    59     static TBool CompareIdentifiers( 
       
    60         const CNcdSubscriptionsSourceIdentifier& aFirst, 
       
    61         const CNcdSubscriptionsSourceIdentifier& aSecond );
       
    62 
       
    63     /**
       
    64      * Getter for Uri.
       
    65      *
       
    66      * @since S60 ?S60_version
       
    67      * @return Uri
       
    68      */
       
    69     const TDesC& Uri() const;
       
    70 
       
    71     /**
       
    72      * Getter for Namespace.
       
    73      *
       
    74      * @since S60 ?S60_version
       
    75      * @return Namespace
       
    76      */
       
    77     const TDesC& Namespace() const;
       
    78     
       
    79     /**
       
    80      * Getter for capability requirement check.
       
    81      *
       
    82      * @since S60 ?S60_version
       
    83      * @return Namespace
       
    84      */    
       
    85     TBool RequiresCapabilityCheck() const;
       
    86 
       
    87 protected:
       
    88 
       
    89 
       
    90 private:
       
    91 
       
    92     CNcdSubscriptionsSourceIdentifier( TBool aRequireCapabilityCheck );
       
    93 
       
    94     void ConstructL( const TDesC& aUri, const TDesC& aNamespace );
       
    95 
       
    96 private: // data
       
    97 
       
    98     /**
       
    99      * Uri of the server.
       
   100      * Own.
       
   101      */
       
   102     HBufC* iUri;
       
   103 
       
   104     /**
       
   105      * Namespace of the server.
       
   106      * Own.
       
   107      */
       
   108     HBufC* iNamespace;
       
   109     
       
   110     /**
       
   111      * This tells whether capability check should be done before
       
   112      * sending subscriptions request to the source identified by
       
   113      * this source identifier.
       
   114      */
       
   115     TBool iRequireCapabilityCheck;
       
   116 
       
   117     };
       
   118 
       
   119 
       
   120 #endif // C_NCD_SUBSCRIPTIONS_SOURCE_IDENTIFIER_H