PECengine/AttributeLibrary2/SrcTransactions/CPEngSubscribedUser.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2004 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:  Subscribed user.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CPENGSUBSCRIBEDUSER_H
       
    19 #define CPENGSUBSCRIBEDUSER_H
       
    20 
       
    21 //  INCLUDES
       
    22 #include <E32Base.h>
       
    23 
       
    24 
       
    25 // CLASS DECLARATION
       
    26 /**
       
    27  * Subscribed user.
       
    28  *
       
    29  * @since 3.0
       
    30  */
       
    31 NONSHARABLE_CLASS( CPEngSubscribedUser ) : public CBase
       
    32     {
       
    33 public:  // Constructors and destructor
       
    34 
       
    35     /**
       
    36      * Two-phased constructor.
       
    37      *
       
    38      * @since 3.0
       
    39      * @param aUserID The subscriped users user id.
       
    40      */
       
    41     static CPEngSubscribedUser* NewLC( const TDesC& aUserID );
       
    42 
       
    43 
       
    44     /**
       
    45      * Destructor.
       
    46      */
       
    47     ~CPEngSubscribedUser();
       
    48 
       
    49 private:
       
    50 
       
    51     /**
       
    52      * C++ default constructor.
       
    53      */
       
    54     CPEngSubscribedUser();
       
    55 
       
    56     /**
       
    57      * Symbian OS constructor.
       
    58      */
       
    59     void ConstructL( const TDesC& aUserID );
       
    60 
       
    61 
       
    62 
       
    63 public: // New functions
       
    64 
       
    65 
       
    66     /**
       
    67      * Gets the subscribed users user id.
       
    68      *
       
    69      * @since 3.0
       
    70      * @return The user id.
       
    71      */
       
    72     const TDesC& UserID() const;
       
    73 
       
    74 
       
    75     /**
       
    76      * Increases the subscription count by one.
       
    77      * (Adds new subscription.)
       
    78      *
       
    79      * @since 3.0
       
    80      */
       
    81     void AddSubscription();
       
    82 
       
    83 
       
    84     /**
       
    85      * Decreases the subscription count by one.
       
    86      * (Removes one subscription.)
       
    87      *
       
    88      * @since 3.0
       
    89      */
       
    90     void RemoveSubscription();
       
    91 
       
    92 
       
    93     /**
       
    94      * Gets the count of subscriptions for this
       
    95      * subscribed user.
       
    96      *
       
    97      * @since 3.0
       
    98      * @return The count of subscriptions.
       
    99      */
       
   100     TInt SubscriptionsCount() const;
       
   101 
       
   102 
       
   103 private:    // Data
       
   104 
       
   105 
       
   106     //OWN: User id
       
   107     HBufC*              iUserID;
       
   108 
       
   109     //OWN: Subscription count
       
   110     TInt                iSubsCount;
       
   111 
       
   112     };
       
   113 
       
   114 #endif      // CPENGSUBSCRIBEDUSER_H
       
   115 
       
   116 // End of File