mmappfw_plat/mpx_common_api/tsrc/ui_commontestclass/src/testviewplugin.cpp
changeset 61 3b098142db83
parent 1 7f2202662322
equal deleted inserted replaced
57:f4fd77a452f2 61:3b098142db83
    23 // CCommonTestClass::CreateCMPXViewPlugin()
    23 // CCommonTestClass::CreateCMPXViewPlugin()
    24 // Returns: Symbian OS errors.
    24 // Returns: Symbian OS errors.
    25 // -----------------------------------------------------------------------------
    25 // -----------------------------------------------------------------------------
    26 TInt CCommonTestClass::CreateCMPXViewPlugin()
    26 TInt CCommonTestClass::CreateCMPXViewPlugin()
    27     {
    27     {
    28 	FTRACE(FPrint(_L("CCommonTestClass::CreateCMPXViewPlugin testing CMPXViewPlugin::NewL begin")));
    28 //    FTRACE(FPrint(_L("CCommonTestClass::CreateCMPXViewPlugin testing CMPXViewPlugin::NewL begin")));
    29     iLog->Log(_L("CCommonTestClass::CreateCMPXViewPlugin testing CMPXViewPlugin::NewL begin"));
    29 //    iLog->Log(_L("CCommonTestClass::CreateCMPXViewPlugin testing CMPXViewPlugin::NewL begin"));
    30     TInt err = KErrNone;
    30 //    TInt err = KErrNone;
    31     if ( iViewPlugin != NULL)
    31 //    if ( iViewPlugin != NULL)
    32         {
    32 //        {
    33         delete iViewPlugin;
    33 //        delete iViewPlugin;
    34         }
    34 //        }
    35     iViewPlugin = NULL;
    35 //    iViewPlugin = NULL;
    36 
    36 //
    37 	TUid aUid = TUid::Uid(270531770);
    37 //    TUid aUid = TUid::Uid(270531770);
    38 
    38 //
    39     TRAP(err,iViewPlugin = CMPXViewPlugin::NewL( aUid, this ));
    39 //    TRAP(err,iViewPlugin = CMPXViewPlugin::NewL( aUid, this ));
    40     if ( iViewPlugin == NULL)
    40 //    if ( iViewPlugin == NULL)
    41         {
    41 //        {
    42         err = KErrNotFound;
    42 //        err = KErrNotFound;
    43         }
    43 //        }
    44 
    44 //
    45 	FTRACE(FPrint(_L("CCommonTestClass::CreateCMPXViewPlugin testing CMPXViewPlugin::NewL end err=%d"), err));
    45 //    FTRACE(FPrint(_L("CCommonTestClass::CreateCMPXViewPlugin testing CMPXViewPlugin::NewL end err=%d"), err));
    46     iLog->Log(_L("CCommonTestClass::CreateCMPXViewPlugin testing CMPXViewPlugin::NewL end err=%d"), err);
    46 //    iLog->Log(_L("CCommonTestClass::CreateCMPXViewPlugin testing CMPXViewPlugin::NewL end err=%d"), err);
    47 	return err;
    47 //    return err;
       
    48     return KErrNone;
    48     }
    49     }
    49 
    50 
    50 // -----------------------------------------------------------------------------
    51 // -----------------------------------------------------------------------------
    51 // CCommonTestClass::DeleteCMPXViewPlugin()
    52 // CCommonTestClass::DeleteCMPXViewPlugin()
    52 // Returns: Symbian OS errors.
    53 // Returns: Symbian OS errors.
    53 // -----------------------------------------------------------------------------
    54 // -----------------------------------------------------------------------------
    54 TInt CCommonTestClass::DeleteCMPXViewPlugin()
    55 TInt CCommonTestClass::DeleteCMPXViewPlugin()
    55     {
    56     {
    56 	FTRACE(FPrint(_L("CCommonTestClass::DeleteCMPXViewPlugin testing CMPXViewPlugin::~ begin")));
    57 //    FTRACE(FPrint(_L("CCommonTestClass::DeleteCMPXViewPlugin testing CMPXViewPlugin::~ begin")));
    57     iLog->Log(_L("CCommonTestClass::DeleteCMPXViewPlugin testing CMPXViewPlugin::~ begin"));
    58 //    iLog->Log(_L("CCommonTestClass::DeleteCMPXViewPlugin testing CMPXViewPlugin::~ begin"));
    58     TInt err = KErrNone;
    59 //    TInt err = KErrNone;
    59     if ( iViewPlugin )
    60 //    if ( iViewPlugin )
    60         {
    61 //        {
    61         delete iViewPlugin;
    62 //        delete iViewPlugin;
    62         REComSession::FinalClose();
    63 //        REComSession::FinalClose();
    63         iViewPlugin = NULL;
    64 //        iViewPlugin = NULL;
    64         }
    65 //        }
    65 	FTRACE(FPrint(_L("CCommonTestClass::DeleteCMPXViewPlugin testing CMPXViewPlugin::~ end err=%d"), err));
    66 //    FTRACE(FPrint(_L("CCommonTestClass::DeleteCMPXViewPlugin testing CMPXViewPlugin::~ end err=%d"), err));
    66     iLog->Log(_L("CCommonTestClass::DeleteCMPXViewPlugin testing CMPXViewPlugin::~ end err=%d"), err);
    67 //    iLog->Log(_L("CCommonTestClass::DeleteCMPXViewPlugin testing CMPXViewPlugin::~ end err=%d"), err);
    67 	return err;
    68 //    return err;
       
    69     return KErrNone;
    68     }
    70     }
    69 
    71 
    70 
    72 
    71 // ---------------------------------------------------------------------------
    73 // ---------------------------------------------------------------------------
    72 // From MMPXCustomCommandObserver.
    74 // From MMPXCustomCommandObserver.