phoneapp/phoneuiview/inc/phonebubbleextensionmanager.h
changeset 21 92ab7f8d0eab
parent 4 c84cf270c54f
child 22 6bb1b21d2484
equal deleted inserted replaced
4:c84cf270c54f 21:92ab7f8d0eab
     1 /*
       
     2 * Copyright (c) 2008 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:  Manages the call bubble extension plugins.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CPHONEBUBBLEEXTENSIONMANAGER_H
       
    20 #define C_CPHONEBUBBLEEXTENSIONMANAGER_H
       
    21 
       
    22 class TPhoneCmdParamCallHeaderData;
       
    23 class CPhoneBubbleExtensionData;
       
    24 class CPhoneBubbleExtension;
       
    25 class CBubbleManager;
       
    26 class TPriorityItem;
       
    27 
       
    28 /**
       
    29  * Bubble extension plugin manager.
       
    30  * Keeps track of the extension plugins.
       
    31  *
       
    32  *  @lib ?library
       
    33  *  @since S60 5.0
       
    34  */
       
    35 class CPhoneBubbleExtensionManager : public CBase
       
    36     {
       
    37 public:
       
    38 
       
    39     /**
       
    40      * Two-phased constructor
       
    41      *
       
    42      * @param aBubbleManager Reference to bubble manager
       
    43      */
       
    44     static CPhoneBubbleExtensionManager* NewL( CBubbleManager& aBubbleManager );
       
    45 
       
    46     /**
       
    47      * Two-phased constructor
       
    48      *
       
    49      * @param aBubbleManager Reference to bubble manager
       
    50      */
       
    51     static CPhoneBubbleExtensionManager* NewLC( CBubbleManager& aBubbleManager );
       
    52 
       
    53     virtual ~CPhoneBubbleExtensionManager();
       
    54 
       
    55     /**
       
    56      * Notifies the plugin framework about a new call.
       
    57      *
       
    58      * @param aBubbleId Bubble id of the new call
       
    59      * @param aParams Call parameters
       
    60      */
       
    61     void StartCallL( TInt aBubbleId, TPhoneCmdParamCallHeaderData* aParams );
       
    62 
       
    63     /**
       
    64      * Notifies the plugin framework about cleared call.
       
    65      *
       
    66      * @param aId Bubble id of the call
       
    67      */
       
    68     void StopCall( TInt aBubbleId);
       
    69     
       
    70     /**
       
    71      * Notifies the plugin framework about changed call state.
       
    72      *
       
    73      * @param aId Bubble id of the call
       
    74      * @param aNewState New call state. (TPEState, not bubble state)
       
    75      */
       
    76     void UpdateCallState( TInt aBubbleId, TInt aNewState );
       
    77 
       
    78     /**
       
    79      * Loads all plugins
       
    80      */
       
    81     void InitializeL();
       
    82     
       
    83 private:
       
    84 
       
    85     /**
       
    86      * First phase constructor
       
    87      *
       
    88      * @param aBubbleManager Reference to bubble manager
       
    89      */
       
    90     CPhoneBubbleExtensionManager( CBubbleManager& aBubbleManager );
       
    91 
       
    92     void ConstructL();
       
    93 
       
    94     /**
       
    95      * Loads plugin priorities.
       
    96      * TODO: Currently there is no plugin priorities, all plugins
       
    97      *       use the default priority. Nothing is loaded.
       
    98      */
       
    99     void LoadPrioritiesL();
       
   100     
       
   101     /**
       
   102      * Unloads all plugins, closes all calls
       
   103      */
       
   104     void Reset();
       
   105     
       
   106 private: // data
       
   107 
       
   108     /**
       
   109      * Bubble manager reference
       
   110      */
       
   111     CBubbleManager& iBubbleManager;
       
   112     
       
   113     /**
       
   114      * Array that holds all the loaded plugins
       
   115      */
       
   116     RPointerArray<CPhoneBubbleExtension> iPlugins;
       
   117 
       
   118     /**
       
   119      * Array that holds all the call data
       
   120      */
       
   121     RPointerArray<CPhoneBubbleExtensionData> iCalls;
       
   122 
       
   123     /**
       
   124      * Are the plugins already loaded?
       
   125      */
       
   126     TBool iInitialized;
       
   127 
       
   128     /**
       
   129      * Plugin priorities
       
   130      */
       
   131     RArray<TPriorityItem> iPriorityArray;
       
   132     
       
   133     };
       
   134 
       
   135 #endif // C_CPHONEBUBBLEEXTENSIONMANAGER_H