uiacceltk/hitchcock/plugins/alfoogmplugin/src/alfoogmplugin.cpp
changeset 48 7ced047fb7ae
parent 19 f5bac0badc7e
equal deleted inserted replaced
43:95d73125a086 48:7ced047fb7ae
    49 // Destructor.
    49 // Destructor.
    50 // -----------------------------------------------------------------------------
    50 // -----------------------------------------------------------------------------
    51 //
    51 //
    52 CAlfOogmMonitorPlugin::~CAlfOogmMonitorPlugin()
    52 CAlfOogmMonitorPlugin::~CAlfOogmMonitorPlugin()
    53     {
    53     {
    54     
    54     iAlfDirectClient.Disconnect();
    55     }
    55     }
    56 
    56 
    57 // -----------------------------------------------------------------------------
    57 // -----------------------------------------------------------------------------
    58 // Symbian two-phased constructor (2nd phase).
    58 // Symbian two-phased constructor (2nd phase).
    59 // -----------------------------------------------------------------------------
    59 // -----------------------------------------------------------------------------
    88 // Creates plugin.
    88 // Creates plugin.
    89 // -----------------------------------------------------------------------------
    89 // -----------------------------------------------------------------------------
    90 //
    90 //
    91 TAny* CreatePlugin()
    91 TAny* CreatePlugin()
    92     {
    92     {
    93     CAlfOogmMonitorPlugin* plugin = new(ELeave) CAlfOogmMonitorPlugin;
    93     CAlfOogmMonitorPlugin* plugin = new CAlfOogmMonitorPlugin;
    94     CleanupStack::PushL(plugin);
    94     if ( plugin )
    95     plugin->ConstructL();
    95         {
    96     CleanupStack::Pop(plugin);
    96         TRAPD( err, plugin->ConstructL() );
       
    97         if ( err != KErrNone )
       
    98             {
       
    99             delete plugin;
       
   100             plugin = NULL;
       
   101             }
       
   102         }
    97     return plugin;
   103     return plugin;
    98     }
   104     }
    99 
   105 
   100 // -----------------------------------------------------------------------------
   106 // -----------------------------------------------------------------------------
   101 // Implementation table for plugin.
   107 // Implementation table for plugin.