skins/AknSkins/srvinc/AknsSrvSession.h
changeset 0 05e9090e2422
child 54 08459e712984
equal deleted inserted replaced
-1:000000000000 0:05e9090e2422
       
     1 /*
       
     2 * Copyright (c) 2002-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:  Skin server session class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef AKNSSRVSESSION_H
       
    20 #define AKNSSRVSESSION_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <e32capability.h>
       
    25 
       
    26 #include <AknsSrvClient.h>
       
    27 #include "AknsSkinChangeHandler.h"
       
    28 
       
    29 // CONSTANTS
       
    30 const TInt KAknsMaxWpWidth = 3000;
       
    31 const TInt KAknsMaxWpHeight = 3000;
       
    32 
       
    33 // FORWARD DECLARATIONS
       
    34 class CAknsSrv;
       
    35 
       
    36 
       
    37 // CLASS DECLARATION
       
    38 
       
    39 /**
       
    40 * Server-side session.
       
    41 */
       
    42 NONSHARABLE_CLASS(CAknsSrvSession) : public CSession2
       
    43     {
       
    44     public:
       
    45 
       
    46         /**
       
    47         * Constructor.
       
    48         */
       
    49         CAknsSrvSession();
       
    50 
       
    51         /**
       
    52         * Destructor.
       
    53         */
       
    54         virtual ~CAknsSrvSession();
       
    55 
       
    56     public:
       
    57 
       
    58         /**
       
    59         * Message dispatcher.
       
    60         */
       
    61         TInt DispatchMessageL( const RMessage2& aMessage );
       
    62 
       
    63     public: // Functions from base classes
       
    64 
       
    65         /**
       
    66         * From CSharableSession (pure virtual).
       
    67         * Handles service request messages from clients.
       
    68         *
       
    69         * @param aMessage message from client
       
    70         */
       
    71         void ServiceL(const RMessage2& aMessage);
       
    72 
       
    73     public: // New functions
       
    74 
       
    75         /**
       
    76         * Enables notifications.
       
    77         */
       
    78         void EnableNotify();
       
    79 
       
    80         /**
       
    81         * Disables notifications.
       
    82         */
       
    83         void DisableNotify();
       
    84 
       
    85         /**
       
    86         * Sets all the item definition sets.
       
    87         */
       
    88         TInt SetAllItemDefSets( const RMessage2& aMessage );
       
    89 
       
    90         /*/
       
    91         * Sets the idle wallpaper.
       
    92         */
       
    93         void SetIdleWallPaperL( const RMessage2& aMessage );
       
    94 
       
    95         /**
       
    96         *
       
    97         *
       
    98         * @since 2.8
       
    99         */
       
   100         void StoreScalableGraphicsL( const RMessage2& aMessage, TBool aMorphing = EFalse );
       
   101 
       
   102         /**
       
   103         * Handles scalable graphics cleanup request.
       
   104         *
       
   105         * @param aMessage Currently ignored message parameter.
       
   106         *
       
   107         * @since 2.8
       
   108         */
       
   109         void ClearScalableGraphics( const RMessage2& aMessage );
       
   110 
       
   111         /**
       
   112         * Handles notification acknowledgement.
       
   113         *
       
   114         * @param aMessage Currently ignored message parameter.
       
   115         *
       
   116         * @since 2.7
       
   117         */
       
   118         void AcknowledgeNotification( const RMessage2& aMessage );
       
   119 
       
   120         /**
       
   121         * Propagates client error notifications.
       
   122         */
       
   123         void ClientError( const RMessage2& aMessage );
       
   124 
       
   125         /**
       
   126         * Propagates client notifications.
       
   127         */
       
   128         TBool EnqueueNotification(
       
   129             const TAknsSkinChangeHandlerNotification aType,
       
   130             TBool aCountNotifications);
       
   131 
       
   132         /**
       
   133         * Proceeds to the next event.
       
   134         */
       
   135         void NextEvent(const RMessage2 aMessage);
       
   136 
       
   137         void OpenBitmapFileL( const RMessage2 aMessage );
       
   138         void OpenIniFileL( const RMessage2 aMessage );
       
   139         void CopySoundFileL(const RMessage2 aMessage );
       
   140         void EnumeratePackages( const RMessage2 aMessage );
       
   141         void ReceivePackages(const RMessage2 aMessage);
       
   142         void DecodeWallpaperImageL(const RMessage2 aMessage);
       
   143         void FreeDecodedWallpaper( const RMessage2 aMessage);
       
   144         void CacheWallpaperImageL(const RMessage2 aMessage);
       
   145 
       
   146         /**
       
   147         * Opens ini-file for slideset.
       
   148         *
       
   149         * @since 3.2
       
   150         */
       
   151         void OpenImageInifileL( const RMessage2 aMessage);
       
   152 
       
   153         /**
       
   154         * Checks if the application has repository based icon configuration.
       
   155         *
       
   156         * @since 5.0
       
   157         */
       
   158         TBool CheckIconConfiguration( const RMessage2 aMessage );
       
   159 
       
   160     private:
       
   161 
       
   162         /**
       
   163         * Panics the client thread.
       
   164         *
       
   165         * @param aPanic panic reason
       
   166         */
       
   167         void PanicClient( const RMessage2& aMessage, TAknSkinSrvPanic aPanic ) const;
       
   168 
       
   169         /**
       
   170         * Sets the notify handler.
       
   171         */
       
   172         void SetNotifyHandler( const RMessage2& aMessage );
       
   173 
       
   174         /**
       
   175         * Returns the server pointer.
       
   176         */
       
   177         CAknsSrv* Server(); //lint !e1511 Hiding allowed
       
   178 
       
   179         /**
       
   180         * Cancellation method.
       
   181         */
       
   182         void Cancel();
       
   183 
       
   184     private: // Data
       
   185 
       
   186         CAknsSkinChangeHandler* iHandler; // Not owned
       
   187         TInt iPendingNotifications;
       
   188         RArray<TAknsSkinChangeHandlerNotification> iNotifyList;
       
   189         RMessagePtr2 iNotifyRequest;
       
   190         TBool iCanceled;
       
   191         TBool iCountNotifications;
       
   192         TInt iPendingAcks;
       
   193     };
       
   194 
       
   195 #endif // AKNSSRVSESSION_H
       
   196 
       
   197 // End of File