ncdengine/provider/server/inc/ncdclientssubscriptions.h
changeset 0 ba25891c3a9e
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     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_CLIENTS_SUBSCRIPTIONS_H
       
    20 #define C_NCD_CLIENTS_SUBSCRIPTIONS_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 class CNcdSubscriptionGroup;
       
    25 class CNcdSubscriptionsSourceIdentifier;
       
    26 
       
    27 /**
       
    28  *  ?one_line_short_description
       
    29  *
       
    30  *  ?more_complete_description
       
    31  *
       
    32  *  @lib ?library
       
    33  *  @since S60 ?S60_version *** for example, S60 v3.0
       
    34  */
       
    35 class CNcdClientsSubscriptions : public CBase
       
    36     {
       
    37 
       
    38 
       
    39 public:
       
    40 
       
    41 
       
    42     static CNcdClientsSubscriptions* NewL( TUid aId );
       
    43 
       
    44     static CNcdClientsSubscriptions* NewLC( TUid aId );
       
    45 
       
    46     virtual ~CNcdClientsSubscriptions();
       
    47 
       
    48 
       
    49     /**
       
    50      * Function that adds a subscription group to
       
    51      * this client's subscriptions.
       
    52      *
       
    53      * @since S60 ?S60_version
       
    54      * @param ?arg1 ?description
       
    55      * @param ?arg2 ?description
       
    56      * @return ?description
       
    57      */
       
    58     void AddGroupL( CNcdSubscriptionGroup* aGroup );
       
    59     
       
    60     /**
       
    61      * Function that removes a subscription group from
       
    62      * this client's subscriptions.
       
    63      *
       
    64      * @since S60 ?S60_version
       
    65      * @param ?arg1 ?description
       
    66      * @param ?arg2 ?description
       
    67      * @return ?description
       
    68      */    
       
    69     void RemoveGroup( CNcdSubscriptionGroup* aGroup );
       
    70     
       
    71     /**
       
    72      * Returns reference to all subscription groups of
       
    73      * the client whose subscriptions the instance of
       
    74      * this class represents.
       
    75      */
       
    76     RPointerArray<CNcdSubscriptionGroup>& Groups();
       
    77     
       
    78     /**
       
    79      * Returns uid that the owner of these subscriptions
       
    80      * has. The uid can be whatever desired uid that identifies
       
    81      * the client or group. At the moment it is the familyid
       
    82      * of the client.
       
    83      */
       
    84     TUid ClientId() const;
       
    85 
       
    86 
       
    87 protected:
       
    88 
       
    89 
       
    90 private:
       
    91 
       
    92 
       
    93     CNcdClientsSubscriptions( TUid aId );
       
    94 
       
    95     void ConstructL();
       
    96 
       
    97 
       
    98 private: // data
       
    99 
       
   100     /**
       
   101      * All subscriptions of this client
       
   102      */
       
   103     RPointerArray<CNcdSubscriptionGroup> iClientsSubscriptions;
       
   104 
       
   105     /**
       
   106      * Client identifier
       
   107      */
       
   108     TUid iId;
       
   109 
       
   110     };
       
   111 
       
   112 
       
   113 
       
   114 #endif // C_NCD_CLIENTS_SUBSCRIPTIONS_H