⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 filesession.h

📁 Symbian Client_Server_Application
💻 H
字号:
/*
* ==============================================================================
*  Name        : FileSession.h
*  Part of     : clientserversync
*  Interface   : 
*  Description : 
*  Version     : 
* ==============================================================================
*/


#ifndef __FileSESSION_H__
#define __FileSESSION_H__

// INCLUDE FILES
#include <e32base.h>
#include <f32file.h>
#include <bautils.h>

// FORWARD DECLARATIONS
class CFileServer;
// CLASS DECLARATION
/**
* CFileServerSession.
*  An instance of class CFileServerSession is created for each client.
*/
class CFileServerSession : public CSession2
    {
    public: // Constructors and destructors

        /**
        * NewL.
        * single-phased constructor.
        
        */
        static CFileServerSession* NewL( );

              /**
        * ~CFileServerSession.
        * Destructor.
        */
        virtual ~CFileServerSession();

    public: // Functions from base classes

        /**
        * From CSession, ServiceL.
        * Service request from client.
        * @param aMessage Message from client
        *                 (containing requested operation and any data).
        */
        void ServiceL( const RMessage2& aMessage );
		

    private: // Constructors and destructors

        /**
        * CFileServerSession.
        * C++ default constructor.
        
        */
        CFileServerSession( );

        /**
        * ConstructL.
        * 2nd phase constructor.
        */
        void ConstructL();

    private: // New methods

        /**
        * PanicClient.
        * Causes the client thread to panic.
        * @param aPanic Panic code.
        */
        void PanicClient( TInt aPanic ) const;

       
        /**
        * Creating instance for FileServer Class
         */
        inline CFileServer* Server();
   private://Data
		
		/**
        * iMsg, contains the info. send by client
        */
		RMessage2 iMsg;
		
		/**
        * iFileNameCreate, contains filename to be created
        */
    	TFileName iFileNameCreate;
    	
    	/**
        * iFileNameDelete, contains filename to be deleted
        */
    	TFileName iFileNameDelete;  
    	
    	/**
    	* iSess, Session to FileServer
    	*/	
    	RFs iSess;
    	
    	/**
    	* iRes, Result of the operation
		*/
		TBuf<30> iRes;
    	
    	/**
    	* iFileExist, checks for file existence
    	*/
    	BaflUtils iFileExist;
    	
    	};

#endif // __FileSESSION_H__


// End of File

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -