00001 /* 00002 * ============================================================================ 00003 * Name : AknServerApp.cpp 00004 * Part of : Avkon 00005 * Description: Server applications framework. 00006 * 00007 * Version: 00008 * 00009 * Copyright (C) 2004 Nokia Corporation. 00010 * This material, including documentation and any related 00011 * computer programs, is protected by copyright controlled by 00012 * Nokia Corporation. All rights are reserved. Copying, 00013 * including reproducing, storing, adapting or translating, any 00014 * or all of this material requires the prior written consent of 00015 * Nokia Corporation. This material also contains confidential 00016 * information which may not be disclosed to others without the 00017 * prior written consent of Nokia Corporation. 00018 * 00019 * ============================================================================ 00020 */ 00021 00022 #ifndef AKNSERVERAPP_H 00023 #define AKNSERVERAPP_H 00024 00025 #include <EikServerApp.h> 00026 00035 class RAknAppServiceBase : public REikAppServiceBase 00036 { 00037 public: 00050 IMPORT_C void ConnectChainedAppL(TUid aAppUid); 00054 IMPORT_C void Close(); 00055 }; 00056 00057 00063 class MAknServerAppExitObserver : public MApaServerAppExitObserver 00064 { 00065 public: // from MApaServerAppExitObserver 00076 IMPORT_C virtual void HandleServerAppExit(TInt aReason); 00077 }; 00078 00079 00087 class CAknAppServiceBase : public CApaAppServiceBase 00088 { 00089 public: 00093 IMPORT_C CAknAppServiceBase(); 00097 IMPORT_C ~CAknAppServiceBase(); 00098 00099 protected: // from CSession2 00104 IMPORT_C void CreateL(); 00110 IMPORT_C void ServiceL(const RMessage2& aMessage); 00117 IMPORT_C void ServiceError(const RMessage2& aMessage,TInt aError); 00118 }; 00119 00120 00129 class CAknAppServer : public CEikAppServer 00130 { 00131 public: // from CAknAppServer 00135 IMPORT_C ~CAknAppServer(); 00143 IMPORT_C void ConstructL(const TDesC& aFixedServerName); 00153 IMPORT_C CApaAppServiceBase* CreateServiceL(TUid aServiceType) const; 00154 public: // new 00163 IMPORT_C virtual void HandleAllClientsClosed(); 00164 public: // not exported 00165 void HandleSessionClose(); 00166 void HandleSessionOpen(); 00167 private: 00168 TInt iSessionCount; 00169 }; 00170 00171 00172 #endif 00173 00174 // End of file.