mtpfws/mtpfw/daemon/server/inc/cmtpserver.h
changeset 0 d0791faffa3f
equal deleted inserted replaced
-1:000000000000 0:d0791faffa3f
       
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @internalTechnology
       
    19 */
       
    20 
       
    21 #ifndef CMTPSERVER_H
       
    22 #define CMTPSERVER_H
       
    23 
       
    24 #include <e32std.h>
       
    25 #include <e32base.h>
       
    26 #include <f32file.h>
       
    27 
       
    28 #include "mtpdebug.h"
       
    29 #include "rmtpframework.h"
       
    30 
       
    31 class CMTPShutdown;
       
    32 
       
    33 /**
       
    34 Implements the MTP daemon server, which houses the MTP framework components, 
       
    35 and implements the server side portion of the MTP Client API as a standard 
       
    36 Symbian OS client/server interface. 
       
    37 @internalTechnology
       
    38 */
       
    39 class CMTPServer : public CPolicyServer
       
    40 	{
       
    41 public:
       
    42 
       
    43 	~CMTPServer();
       
    44 
       
    45     static void RunServerL();
       
    46 	void AddSession();
       
    47 	void DropSession();
       
    48 	
       
    49 private: // From CPolicyServer
       
    50 	
       
    51 	CSession2* NewSessionL(const TVersion& aVersion, const RMessage2& aMessage) const;
       
    52 
       
    53 private:
       
    54 
       
    55 	static CMTPServer* NewLC();
       
    56 	CMTPServer();
       
    57 	void ConstructL();
       
    58 	
       
    59 private: // Owned
       
    60 
       
    61     /**
       
    62     FLOGGER debug trace member variable.
       
    63     */
       
    64     __FLOG_DECLARATION_MEMBER_MUTABLE;
       
    65     
       
    66     /**
       
    67     The MTP framework singletons.
       
    68     */
       
    69     RMTPFramework   iFrameworkSingletons;
       
    70 	
       
    71 	/**
       
    72 	The active MTP client API session count.
       
    73 	*/
       
    74 	TInt            iSessionCount;
       
    75 	
       
    76 	/**
       
    77 	The daemon server process shutdown timer
       
    78 	*/
       
    79 	CMTPShutdown*   iShutdown;
       
    80 	};
       
    81 
       
    82 /** 
       
    83 MTP server panic codes.
       
    84 */
       
    85 enum TMTPPanic
       
    86 	{
       
    87 	EPanicBadDescriptor         = -1,
       
    88 	EPanicIllegalFunction       = -2,
       
    89 	EPanicAlreadyReceiving      = -3,
       
    90 	EPanicErrArgument           = -4
       
    91 	};
       
    92 
       
    93 void PanicClient(const RMessagePtr2& aMessage, TMTPPanic aPanic);
       
    94 	
       
    95 #endif // CMTPSERVER_H