messagingfw/msgcommonutils/src/javaprotectionresolver.cpp
changeset 0 8e480a14352b
child 10 30d6238592e8
child 15 ff168ad79dda
equal deleted inserted replaced
-1:000000000000 0:8e480a14352b
       
     1 /*
       
     2 * Copyright (c) 2006 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:  
       
    15 *       Resolves the protection status for a Java file.
       
    16 *       Protection checks include:
       
    17 *       - Java SuperD
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 // INCLUDE FILES
       
    25 #include <e32std.h>
       
    26 #include <e32base.h> // CBase
       
    27 #include <apmstd.h>  // TDataType
       
    28 #include <f32file.h> // RFs, RFile, CFileMan
       
    29 
       
    30 #include "javaprotectionresolver.h"
       
    31 
       
    32 // EXTERNAL DATA STRUCTURES
       
    33 
       
    34 // EXTERNAL FUNCTION PROTOTYPES  
       
    35 
       
    36 // CONSTANTS
       
    37 
       
    38 // MACROS
       
    39 
       
    40 // LOCAL CONSTANTS AND MACROS
       
    41 
       
    42 #if defined (__WINS__)
       
    43 //_LIT( KFileProtTempDir, "c:\\system\\temp\\fileprot_temp\\");
       
    44 _LIT( KFileProtTempDir, "\x43:\\system\\temp\\fileprot_temp\\");
       
    45 #else
       
    46 //_LIT( KFileProtTempDir, "d:\\system\\temp\\fileprot_temp\\");
       
    47 _LIT( KFileProtTempDir, "\x44:\\system\\temp\\fileprot_temp\\");
       
    48 #endif
       
    49 
       
    50 // MODULE DATA STRUCTURES
       
    51 
       
    52 // LOCAL FUNCTION PROTOTYPES
       
    53 
       
    54 // FORWARD DECLARATIONS
       
    55 
       
    56 // ============================ MEMBER FUNCTIONS ===============================
       
    57 
       
    58 
       
    59 
       
    60 // -----------------------------------------------------------------------------
       
    61 // Factory
       
    62 // -----------------------------------------------------------------------------
       
    63 //
       
    64 CJavaProtectionResolver* CJavaProtectionResolver::NewLC( RFs& aFs )
       
    65     {
       
    66     CJavaProtectionResolver* self = new ( ELeave ) CJavaProtectionResolver( aFs );
       
    67     CleanupStack::PushL( self );
       
    68     return self;
       
    69     }
       
    70          
       
    71 // -----------------------------------------------------------------------------
       
    72 // C++ constructor
       
    73 // -----------------------------------------------------------------------------
       
    74 //
       
    75 CJavaProtectionResolver::CJavaProtectionResolver( RFs& aFs ) :
       
    76     iFs( aFs )
       
    77     {
       
    78     }
       
    79 
       
    80 // -----------------------------------------------------------------------------
       
    81 // Destructor
       
    82 // -----------------------------------------------------------------------------
       
    83 //
       
    84 CJavaProtectionResolver::~CJavaProtectionResolver()
       
    85     {
       
    86     }
       
    87 
       
    88 // -----------------------------------------------------------------------------
       
    89 // CJavaProtectionResolver::CheckDRMStatus
       
    90 // -----------------------------------------------------------------------------
       
    91 //
       
    92 TBool CJavaProtectionResolver::IsSuperDistributionPackageL( RFile& aFile )
       
    93     { 
       
    94     	/**
       
    95     	*  JavaSuperDParser has been removed from 9.2 TB, 
       
    96     	*  So we will always return EFalse and whole code of function is commented out.
       
    97     	*/
       
    98 //    TBool retVal( EFalse );
       
    99 //
       
   100 //    CFileMan* fileMan = CFileMan::NewL( iFs );
       
   101 //    iFs.MkDir( KFileProtTempDir );
       
   102 //
       
   103 //    Java::CJavaSuperDParser* javaParser( NULL );
       
   104 //    TRAPD( err, javaParser = Java::CJavaSuperDParser::NewL( iFs, 
       
   105 //                                                  aFile, 
       
   106 //                                                  KFileProtTempDir ) );
       
   107 //    if ( !err )
       
   108 //        {
       
   109 //        retVal = ETrue;
       
   110 //        }
       
   111 //    delete javaParser;
       
   112 //
       
   113 //    /*TInt err =*/ fileMan->Delete( KFileProtTempDir /*, CFileMan::ERecurse*/ );
       
   114 //    /*TInt err =*/ fileMan->RmDir( KFileProtTempDir );
       
   115 //    delete fileMan;
       
   116 
       
   117 //    return retVal; 
       
   118       return EFalse;
       
   119     }
       
   120 
       
   121 //  End of File