wmdrm/wmdrmengine/wmdrmfileserver/server/inc/wmdrmfileserver.h
changeset 0 95b198f216e5
equal deleted inserted replaced
-1:000000000000 0:95b198f216e5
       
     1 /*
       
     2 * Copyright (c) 2007 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:  Server definitions
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __WMDRMFILESERVER_H
       
    20 #define __WMDRMFILESERVER_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <f32file.h>
       
    24 #include "wmdrmfileserver.h"
       
    25 #include "wmdrmfileserverclient.h"
       
    26 #include "wmdrmfsclientserver.h"
       
    27 
       
    28 // Max size of the filenames handled by this server
       
    29 const TInt KFileNameSize = 128;
       
    30 
       
    31 // Panic codes for session errors
       
    32 enum TWmDrmPanic
       
    33 	{
       
    34 	EPanicBadDescriptor,
       
    35 	EPanicIllegalFunction
       
    36 	};
       
    37 
       
    38 void PanicClient( const RMessagePtr2& aMessage,TWmDrmPanic TWmDrmPanic );
       
    39 
       
    40 class CWmDrmFileServer : public CServer2
       
    41 	{
       
    42 public:
       
    43     /* Create a new file server object and push it onto the cleanup stack
       
    44      */
       
    45 	static CServer2* NewLC();
       
    46 
       
    47     /* Destructor.
       
    48      */
       
    49     ~CWmDrmFileServer();
       
    50 
       
    51     /* Return a reference to the shared file server handle
       
    52      *
       
    53      * @return File server handle
       
    54      */
       
    55     RFs& Fs();
       
    56 
       
    57 private:
       
    58     /* Private constructor.
       
    59      */
       
    60     CWmDrmFileServer();
       
    61     
       
    62     /* Second level constructor.
       
    63      */
       
    64 	void ConstructL();
       
    65 
       
    66     /* Create a new session
       
    67      *
       
    68      * @param aVersion  Client version
       
    69      * @param aMessage  IPC message (ignored)
       
    70      * @return new session object
       
    71      */
       
    72 	CSession2* NewSessionL( const TVersion& aVersion, const RMessage2& aMessage ) const;
       
    73 
       
    74     // Own: Common file server object
       
    75 	RFs iFs;
       
    76 	};
       
    77 
       
    78 #endif