javamanager/javainstaller/installer/src.s60/applicationregistrator/sifnotifier.cpp
changeset 49 35baca0e7a2e
parent 35 85266cc22c7f
child 67 63b81d807542
equal deleted inserted replaced
35:85266cc22c7f 49:35baca0e7a2e
    19 #include "com_nokia_mj_impl_installer_applicationregistrator_SifNotifier.h"
    19 #include "com_nokia_mj_impl_installer_applicationregistrator_SifNotifier.h"
    20 #include "javacommonutils.h"
    20 #include "javacommonutils.h"
    21 #include "javasymbianoslayer.h" // for CleanupResetAndDestroyPushL
    21 #include "javasymbianoslayer.h" // for CleanupResetAndDestroyPushL
    22 #include "logger.h"
    22 #include "logger.h"
    23 
    23 
    24 #if defined(SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK) && defined(RD_JAVA_USIF_NOTIFY_PROGRESS)
    24 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
    25 
    25 
    26 #include <usif/sif/sifnotification.h>
    26 #include <usif/sif/sifnotification.h>
    27 #include <usif/usifcommon.h>
    27 #include <usif/usifcommon.h>
    28 
       
    29 // Helper macro for logging a TDesC.
       
    30 #define LOG_TDESC_L(compIdParam, logLevelParam, msgParam, tdescParam) \
       
    31     {                                                               \
       
    32         HBufC8* tdescBuf = HBufC8::NewLC(tdescParam.Length() + 1);  \
       
    33         TPtr8 tdescPtr(tdescBuf->Des());                            \
       
    34         tdescPtr.Append(tdescParam);                                \
       
    35         LOG1(compIdParam, logLevelParam, msgParam, tdescPtr.PtrZ());\
       
    36         CleanupStack::PopAndDestroy(tdescBuf);                      \
       
    37     }
       
    38 
    28 
    39 // NAMESPACE DECLARATION
    29 // NAMESPACE DECLARATION
    40 using namespace java;
    30 using namespace java;
    41 using namespace Usif;
    31 using namespace Usif;
    42 
    32 
    99             if (NULL != tmpAppIcon)
    89             if (NULL != tmpAppIcon)
   100             {
    90             {
   101                 HBufC *appIcon = CreateHBufCFromJavaStringLC(aEnv, tmpAppIcon);
    91                 HBufC *appIcon = CreateHBufCFromJavaStringLC(aEnv, tmpAppIcon);
   102                 applicationIcons.AppendL(appIcon);
    92                 applicationIcons.AppendL(appIcon);
   103                 CleanupStack::Pop(appIcon);
    93                 CleanupStack::Pop(appIcon);
       
    94                 aEnv->DeleteLocalRef(tmpAppIcon);
   104             }
    95             }
   105             else
    96             else
   106             {
    97             {
   107                 // Add a string indicating that icon is not available
    98                 // Add a string indicating that icon is not available
   108                 // for this application.
    99                 // for this application.
   304         reinterpret_cast<CPublishSifOperationInfo*>(aHandle<<2);
   295         reinterpret_cast<CPublishSifOperationInfo*>(aHandle<<2);
   305     delete pNotifier;
   296     delete pNotifier;
   306     return KErrNone;
   297     return KErrNone;
   307 }
   298 }
   308 
   299 
   309 #else // SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK && RD_JAVA_USIF_NOTIFY_PROGRESS
   300 #else // SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
   310 
   301 
   311 /*
   302 /*
   312  * Class:     com_nokia_mj_impl_installer_applicationregistrator_SifNotifier
   303  * Class:     com_nokia_mj_impl_installer_applicationregistrator_SifNotifier
   313  * Method:    _sifNotifierEnabled
   304  * Method:    _sifNotifierEnabled
   314  * Signature: ()Z
   305  * Signature: ()Z
   388 {
   379 {
   389     LOG(EJavaInstaller, EInfo, "SifNotifier.destroy");
   380     LOG(EJavaInstaller, EInfo, "SifNotifier.destroy");
   390     return KErrNone;
   381     return KErrNone;
   391 }
   382 }
   392 
   383 
   393 #endif // SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK && RD_JAVA_USIF_NOTIFY_PROGRESS
   384 #endif // SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK