ncdengine/inc/ncdsubscriptionmanager.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:   Definition of MNcdSubscriptionManager interface
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef M_NCDSUBSCRIPTIONMANAGER_H
       
    20 #define M_NCDSUBSCRIPTIONMANAGER_H
       
    21 
       
    22 #include "catalogsbase.h"
       
    23 #include "ncdinterfaceids.h"
       
    24 #include "catalogsarray.h"
       
    25 
       
    26 class MNcdSubscription;
       
    27 class MNcdSubscriptionOperation;
       
    28 class MNcdSubscriptionOperationObserver;
       
    29 
       
    30 /**
       
    31  *  Subscription manager interface.
       
    32  *
       
    33  *  This interface describes a subscription manager. Subscription manager
       
    34  *  provides methods for subscription management.
       
    35  *
       
    36  *  
       
    37  */
       
    38 class MNcdSubscriptionManager : public virtual MCatalogsBase
       
    39     {
       
    40     
       
    41 public:
       
    42 
       
    43     /**
       
    44      * Unique identifier for the interface, required for all MCatalogsBase interfaces.
       
    45      *
       
    46      * 
       
    47      */
       
    48     enum { KInterfaceUid = ENcdSubscriptionManagerUid };
       
    49 
       
    50 
       
    51     /**
       
    52      * Get all subscriptions.
       
    53      *
       
    54      * @note This function should be called to get current and valid list of
       
    55      *       subscriptions after changes to subscriptions.
       
    56      *
       
    57      * 
       
    58      * @return Array of made subscriptions. Counted, Release() must be called
       
    59      *  for each object after use, e.g. with a call to
       
    60      *  RCatalogsArray::ResetAndDestroy()
       
    61      */
       
    62     virtual RCatalogsArray< MNcdSubscription > SubscriptionsL() const = 0;
       
    63 
       
    64     /**
       
    65      * Refresh subscriptions from service providers. 
       
    66      *
       
    67      * 
       
    68      * @param aObserver Operation observer interface.
       
    69      * @return Subscription operation object. Counted, Release() must be called after use.
       
    70      * @exception Leave System wide error code.
       
    71      */
       
    72     virtual MNcdSubscriptionOperation* RefreshSubscriptionsL( 
       
    73         MNcdSubscriptionOperationObserver& aObserver ) = 0;
       
    74 
       
    75 protected: // Destruction
       
    76 
       
    77     /**
       
    78      * Destructor.
       
    79      *
       
    80      * @see MCatalogsBase::~MCatalogsBase
       
    81      */
       
    82     virtual ~MNcdSubscriptionManager() {}
       
    83 
       
    84     };
       
    85 
       
    86 #endif // M_NCDSUBSCRIPTIONMANAGER_H