messagingfw/msgcommonutils/src/javaprotectionresolver.cpp
branchRCL_3
changeset 22 d2c4c66342f3
parent 8 30d6238592e8
child 23 d51193d814ea
equal deleted inserted replaced
21:e5b3a2155e1a 22:d2c4c66342f3
    25 #include <e32std.h>
    25 #include <e32std.h>
    26 #include <e32base.h> // CBase
    26 #include <e32base.h> // CBase
    27 #include <apmstd.h>  // TDataType
    27 #include <apmstd.h>  // TDataType
    28 #include <f32file.h> // RFs, RFile, CFileMan
    28 #include <f32file.h> // RFs, RFile, CFileMan
    29 
    29 
    30 #include "javaprotectionresolver.h"
    30 #include <javasuperdparser.h>
       
    31 
       
    32 #include "JavaProtectionResolver.h"
    31 
    33 
    32 // EXTERNAL DATA STRUCTURES
    34 // EXTERNAL DATA STRUCTURES
    33 
    35 
    34 // EXTERNAL FUNCTION PROTOTYPES  
    36 // EXTERNAL FUNCTION PROTOTYPES  
    35 
    37 
    36 // CONSTANTS
    38 // CONSTANTS
    37 
    39 
    38 // MACROS
    40 // MACROS
    39 
    41 
    40 // LOCAL CONSTANTS AND MACROS
    42 // LOCAL CONSTANTS AND MACROS
       
    43 
       
    44 #if defined (__WINS__)
       
    45 //_LIT( KFileProtTempDir, "c:\\system\\temp\\fileprot_temp\\");
       
    46 _LIT( KFileProtTempDir, "\x43:\\system\\temp\\fileprot_temp\\");
       
    47 #else
       
    48 //_LIT( KFileProtTempDir, "d:\\system\\temp\\fileprot_temp\\");
       
    49 _LIT( KFileProtTempDir, "\x44:\\system\\temp\\fileprot_temp\\");
       
    50 #endif
    41 
    51 
    42 // MODULE DATA STRUCTURES
    52 // MODULE DATA STRUCTURES
    43 
    53 
    44 // LOCAL FUNCTION PROTOTYPES
    54 // LOCAL FUNCTION PROTOTYPES
    45 
    55 
    80 // -----------------------------------------------------------------------------
    90 // -----------------------------------------------------------------------------
    81 // CJavaProtectionResolver::CheckDRMStatus
    91 // CJavaProtectionResolver::CheckDRMStatus
    82 // -----------------------------------------------------------------------------
    92 // -----------------------------------------------------------------------------
    83 //
    93 //
    84 TBool CJavaProtectionResolver::IsSuperDistributionPackageL( RFile& aFile )
    94 TBool CJavaProtectionResolver::IsSuperDistributionPackageL( RFile& aFile )
    85     { 
    95     {
    86     	/**
    96     TBool retVal( EFalse );
    87     	*  JavaSuperDParser has been removed from 9.2 TB, 
       
    88     	*  So we will always return EFalse and whole code of function is commented out.
       
    89     	*/
       
    90 //    TBool retVal( EFalse );
       
    91 //
       
    92 //    CFileMan* fileMan = CFileMan::NewL( iFs );
       
    93 //    iFs.MkDir( KFileProtTempDir );
       
    94 //
       
    95 //    Java::CJavaSuperDParser* javaParser( NULL );
       
    96 //    TRAPD( err, javaParser = Java::CJavaSuperDParser::NewL( iFs, 
       
    97 //                                                  aFile, 
       
    98 //                                                  KFileProtTempDir ) );
       
    99 //    if ( !err )
       
   100 //        {
       
   101 //        retVal = ETrue;
       
   102 //        }
       
   103 //    delete javaParser;
       
   104 //
       
   105 //    /*TInt err =*/ fileMan->Delete( KFileProtTempDir /*, CFileMan::ERecurse*/ );
       
   106 //    /*TInt err =*/ fileMan->RmDir( KFileProtTempDir );
       
   107 //    delete fileMan;
       
   108 
    97 
   109 //    return retVal; 
    98     CFileMan* fileMan = CFileMan::NewL( iFs );
   110       return EFalse;
    99     iFs.MkDir( KFileProtTempDir );
       
   100 
       
   101     Java::CJavaSuperDParser* javaParser( NULL );
       
   102     TRAPD( err, javaParser = Java::CJavaSuperDParser::NewL( iFs, 
       
   103                                                   aFile, 
       
   104                                                   KFileProtTempDir ) );
       
   105     if ( !err )
       
   106         {
       
   107         retVal = ETrue;
       
   108         }
       
   109     delete javaParser;
       
   110 
       
   111     /*TInt err =*/ fileMan->Delete( KFileProtTempDir /*, CFileMan::ERecurse*/ );
       
   112     /*TInt err =*/ fileMan->RmDir( KFileProtTempDir );
       
   113     delete fileMan;
       
   114 
       
   115     return retVal;
   111     }
   116     }
   112 
   117 
   113 //  End of File  
   118 //  End of File