mmsharing/mmshmanagersrv/inc/musapplicationmanager.h
changeset 22 496ad160a278
equal deleted inserted replaced
15:ccd8e69b5392 22:496ad160a278
       
     1 /*
       
     2 * Copyright (c) 2009 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:  ?Description
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MUSAPPLICATIONMANAGER_H
       
    20 #define MUSAPPLICATIONMANAGER_H
       
    21 
       
    22 #include "musmanagercommon.h"
       
    23 #include "musunittesting.h"
       
    24 
       
    25 #include <apgcli.h>
       
    26 #include <apgtask.h>
       
    27 #include <e32base.h>
       
    28 #include <w32std.h>
       
    29 
       
    30 
       
    31 const TInt KMusMgrMaxPluginNameLen = 256;
       
    32 
       
    33 //class TApaTask;
       
    34 
       
    35 /**
       
    36  *  Multimedia Sharing application handler
       
    37  *
       
    38  *  Handles application launch and close functionality. Also
       
    39  *  but application to foreground if all ready running.
       
    40  *
       
    41  *  @lib none
       
    42  */
       
    43 class CMusApplicationManager : public CBase
       
    44     {
       
    45     MUS_UNITTEST( UT_CMusApplicationManager )
       
    46 		
       
    47 	public: // first phase constructors & destructor
       
    48 	
       
    49 		/**
       
    50 		*
       
    51 		*/
       
    52 	    static CMusApplicationManager* NewL();
       
    53 	
       
    54 		/**
       
    55 		*
       
    56 		*/
       
    57 	    static CMusApplicationManager* NewLC();
       
    58 	
       
    59 		/**
       
    60 		*
       
    61 		*/
       
    62 	    ~CMusApplicationManager();
       
    63 	
       
    64 
       
    65     protected: // second phase constructors
       
    66 	
       
    67 		/**
       
    68 		*
       
    69 		*/
       
    70 	    void ConstructL();
       
    71 	
       
    72 		/**
       
    73 		*
       
    74 		*/
       
    75 	    CMusApplicationManager();
       
    76 	
       
    77 
       
    78 	public: // new public functions
       
    79 	
       
    80 		/**
       
    81 		* @return TBool ETrue if application is runing ( MultimediaSharing )
       
    82 		*/
       
    83 	    TBool ApplicationRunning();
       
    84 	
       
    85 		/**
       
    86 		*
       
    87 		*/
       
    88 	    void StartApplicationL();
       
    89 	
       
    90 		/**
       
    91 		*
       
    92 		*/
       
    93 	    void StopApplicationL();
       
    94 	
       
    95 		/**
       
    96 		* Brings application to foreground if running all reaydy.
       
    97 		*/
       
    98 	    void ShowApplicationL();
       
    99 
       
   100 		/**
       
   101 		* Writes given array and other parameter spefic date to Publish & 
       
   102 		* Subscripe database.
       
   103 		*/
       
   104 	    void WriteSessionPropertiesL( 
       
   105 	    								MultimediaSharing::TMusUseCase aUseCase,
       
   106 	                    MultimediaSharing::TMusAvailabilityStatus aStatus,
       
   107 	                    MDesCArray& aSessionParameters );
       
   108 	
       
   109 		/**
       
   110 		* Overrided version whitout use case.
       
   111 		*
       
   112 		*/
       
   113 	    void WriteSessionPropertiesL( 
       
   114 	    								MultimediaSharing::TMusAvailabilityStatus aStatus,
       
   115 	                    MDesCArray& aSessionParameters );
       
   116 	
       
   117 		/**
       
   118 		*
       
   119 		*/
       
   120 	    void SetStatusL( MultimediaSharing::TMusAvailabilityStatus aStatus );
       
   121 	    
       
   122 	    /**
       
   123 		*
       
   124 		*/
       
   125 	    void SetIndicatorStatusL( TBool aLaunch );
       
   126         
       
   127         /**
       
   128          * Resolves name of the ecom plugin which implements the livecomms engine api
       
   129          * by using the callprovider
       
   130          */
       
   131         void ResolvePluginNameL(TDes8& aPluginName);
       
   132 	
       
   133 
       
   134 	private: // helper functions
       
   135 	
       
   136 		/**
       
   137 		*
       
   138 		*/
       
   139 	    void SetPropertyL( TUint aProperty, const TDesC& aValue );
       
   140 	
       
   141 		/**
       
   142 		*
       
   143 		*/
       
   144 	    void SetPropertyL( TUint aProperty, TInt aValue );
       
   145 	    
       
   146 	    /**
       
   147         * Reads the call provider information from PS key.
       
   148         */
       
   149 	    void CallProviderL(TDes8& aProvider);
       
   150 	    
       
   151 	    /**
       
   152 	    * Creates command line used when starting application.
       
   153 	    * 
       
   154 	    */
       
   155 	    HBufC* CreateCommandLineArgsLC();
       
   156     };
       
   157 
       
   158 
       
   159 #endif // ? MUSAPPLICATIONMANAGER_H