email_plat/email_client_api/inc/emailinterfacefactory.h
changeset 4 e7aa27f58ae1
parent 0 8466d47a6819
equal deleted inserted replaced
3:a4d6f1ea0416 4:e7aa27f58ae1
    52     * @return pointer to interface
    52     * @return pointer to interface
    53     * @exception KErrNotFound if unkown interface id is given
    53     * @exception KErrNotFound if unkown interface id is given
    54     *
    54     *
    55     * @code
    55     * @code
    56     
    56     
    57      #include <emailclientapi.h>
    57      #include <emailinterfacefactory.h>
    58     
    58     
    59      using namespace EmailInterface;
    59      using namespace EmailInterface;
    60      
    60      
    61      CEmailInterfaceFactory* factory = CEmailInterfaceFactory::NewL();
    61      CEmailInterfaceFactory* factory = CEmailInterfaceFactory::NewL();
    62      CleanupStack::PushL( factory );
    62      CleanupStack::PushL( factory );
    63      MEmailInterface* ifPtr = factory->InterfaceL( KEmailClientApiInterface );
    63      MEmailInterface* ifPtr = factory->InterfaceL( KEmailClientApiInterface );
    64      MEmailClientApi* clientApi = static_cast<MEmailClientApi*>( ifPtr );
    64      MEmailClientApi* clientApi = static_cast<MEmailClientApi*>( ifPtr );
    65      CleanupReleasePushL( clientApi );
    65      CleanupReleasePushL( *clientApi );
    66      // <do something with clientApi...>
    66      // <do something with clientApi...>
    67      CleanupStack::PopAndDestroy( 2 ); // clientApi and factory
    67      CleanupStack::PopAndDestroy( 2 ); // clientApi and factory
    68      @endcode
    68      @endcode
    69     * 
    69     * 
    70     */
    70     */