uiacceltk/hitchcock/plugins/alftranseffect/alftfxserverplugin/inc/alftfxsrvplugin.h
changeset 0 15bf7259bb7c
equal deleted inserted replaced
-1:000000000000 0:15bf7259bb7c
       
     1 /*
       
     2 * Copyright (c) 2008-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:   AlfTfxSrvPlugin Plugin implementation. Implements plugin for 
       
    15 *                plugin interface under AknSkins.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 #ifndef ALFTFXSRVPLUGIN_H
       
    23 #define ALFTFXSRVPLUGIN_H
       
    24 
       
    25 #include <e32base.h>
       
    26 #include <mtransitionserver.h>
       
    27 #include <mtransitionservercontroller.h>
       
    28 // From TFX Server
       
    29 #include "alftransitionserver.h"
       
    30 #include "alftransitionservercontroller.h"
       
    31 
       
    32 /**
       
    33  *  TfxSrvPlugin class
       
    34  *
       
    35  *  Implements methods that are called by the ECOM to create
       
    36  *  instances of MTransitionServer & MTransitionServerController.
       
    37  *  This class is not meant to be instantiated.
       
    38  *
       
    39  *  @lib TfxSrvPlugin.dll
       
    40  *  @since 
       
    41  */
       
    42 class TfxSrvPlugin
       
    43     {
       
    44     public:
       
    45     
       
    46     static MTransitionServer* CreateTransitionServerL();
       
    47     static MTransitionServerController* CreateTransitionServerControllerL( 
       
    48                                                                     TAny* aInitParams );
       
    49 
       
    50     private:
       
    51         // not meant to be instantiated
       
    52         TfxSrvPlugin() {};
       
    53     };
       
    54 
       
    55 
       
    56 /**
       
    57  *  CSrvImpl, implementation of MTransitionServer
       
    58  * 
       
    59  *  Implements Tfx Server Plugin API interface, 
       
    60  *  MTransitionServer part. Does not contain any other logic
       
    61  *  than mediate calls to concrete implementation of
       
    62  *  CAlfTransitionServerClient in TFXServer.
       
    63  *
       
    64  *  @lib TfxSrvPlugin.dll
       
    65  *  @since 
       
    66  */
       
    67 class CSrvImpl : public CBase, public MTransitionServer
       
    68     {
       
    69     
       
    70     public: // Constructor
       
    71     
       
    72         static CSrvImpl* NewL();    
       
    73     
       
    74     private: // From MTransitionServer
       
    75     
       
    76          /**
       
    77          * For comments on methods, and how to use them, see
       
    78          * transitionserver.h header from TFXServer
       
    79          */    
       
    80     	 TInt Connect();
       
    81     	 void Disconnect();
       
    82     	 TInt RegisterFullscreenKml(TUint aActionID, const TUid& aUid, const TDesC& aResourceDir, 
       
    83     										const TDesC& aFilename);
       
    84     	 TInt UnregisterFullscreenKml(TUint aActionID, const TUid& aUid);
       
    85          TInt BlockFullScreenUid(const TUid& aUid, TBool aBlockFrom, TBool aBlockTo);
       
    86     	 TInt RegisterControlKml(const TUid &aUid, const TDesC& aResourceDir, const TDesC& aFilename);
       
    87     	 TInt RegisterControlKml(const TUid &aUid, const TDesC& aResourceDir, const TDesC& aFilename,
       
    88     	 						 TInt aWantedTime, TInt aMinTime);
       
    89       	 TInt UnregisterControlKml(const TUid &aUid);
       
    90          TInt RegisterControlAction(const TUid& aUid, TUint aActionID, const TDesC& aActionString);
       
    91     	 TInt UnregisterControlAction(const TUid& aUid, TUint aActionID);
       
    92     	 TInt UnregisterAllKml();
       
    93     	 TInt SetWantedTime(TInt aTime);
       
    94     	 TInt SetMinTime(TInt aTime);
       
    95     	 TInt RegisterFullscreenKml(TUint aActionID, const TUid& aUid, const TDesC& aResourceDir, 
       
    96     										const TDesC& aFilename, TInt aCachePriority, TInt aWantedTime,
       
    97     										TInt aMinTime);
       
    98 		
       
    99 		 TInt RegisterListBoxKml(const TUid& aUid, const /*TListBoxType*/ TInt aListBoxType, 
       
   100                                      const TDesC& aResourceDir, 
       
   101 									 const TDesC& aBackgroundFilename, 
       
   102 									 const TDesC& aListItemFilename);
       
   103 
       
   104 
       
   105 		TInt UnregisterListBoxKml(const TUid& aUid, const /*TListBoxType*/ TInt aListBoxType);		 		 
       
   106 		 
       
   107 		 TInt SetListBoxFrameTime( const TInt aWantedTime );
       
   108 		 TInt SetListBoxMinFrameTime( const TInt aMinFrameTime );
       
   109 		 TInt SetControlFrameTime( const TInt aWantedTime );
       
   110 		 TInt SetControlMinFrameTime( const TInt aMinFrameTime );
       
   111           TBool IsConnected();
       
   112           
       
   113     private: 
       
   114     
       
   115         // to be deleted via MTransitionServer
       
   116         ~CSrvImpl();    
       
   117         void ConstructL();
       
   118     
       
   119     private: // Data
       
   120     
       
   121         CAlfTransitionServerClient* iServer;
       
   122     };
       
   123 
       
   124 
       
   125 /**
       
   126  *  CSrvCtrlImpl, implementation of MTransitionServerController
       
   127  * 
       
   128  *  Implements Tfx Server Plugin API interface, 
       
   129  *  MTransitionServerController part. Does not contain any other logic
       
   130  *  than mediate calls to concrete implementation of
       
   131  *  CAlfTransitionServerController in TFXServer.
       
   132  *
       
   133  *  @lib TfxSrvPlugin.dll
       
   134  *  @since 
       
   135  */
       
   136 class CSrvCtrlImpl : public CBase, public MTransitionServerController
       
   137     {
       
   138     public: // Constructor
       
   139     
       
   140         static CSrvCtrlImpl* NewL( RWsSession& aWsSession );    
       
   141         
       
   142     private: // From MTransitionServerController
       
   143         
       
   144         TInt StartTransitionServer();
       
   145         TInt StopTransitionServer();
       
   146         TBool ServerRunning();
       
   147         TInt StartTransitionServer(TInt32 aMaxBytesOngoing, TInt32 aMaxBytesBetween);
       
   148         
       
   149     private: 
       
   150     
       
   151         // to be deleted via MTransitionServer
       
   152         ~CSrvCtrlImpl();   
       
   153         void ConstructL( RWsSession& aWsSession );
       
   154         
       
   155     private:  // Data
       
   156         CAlfTransitionServerController* iController;
       
   157     };
       
   158 
       
   159 #endif // ALFTFXSRVPLUGIN_H