flash_ui.h File Reference

API published in: S60 3rd Ed FP 1

Capability Information

Required Capabilities

None

Exceptions

Capability depends on the Flash content. If Flash content accesses network then application requires NetworkServices.



Detailed Description

The API to start Viewer UI for playing Flash content file from a Viewer or a stub application.

The point here is to offer easy-of-use API for stubs applications which has dedicated set of platform security capabilities for rendering private SWF content. However, also standard Flash Viewer can utilize the same API as well.

Example usage of the API:

 LOCAL_C CApaApplication* NewApplication( )
     {
           return new(ELeave) CFlashStubApplication;
           }

 GLDEF_C TInt E32Main()
     {
     return EikStart::RunApplication(NewApplication);
     }
 
 CFlashStubApplication::~CFlashStubApplication()
     {
     if (iFlashLibrary.Handle())
         {
         iFlashLibrary.Close();
         }
     }
 
 const TUid KUidFlashStubApp = { 0x1027367B };
 
 TUid CFlashStubApplication::AppDllUid() const
     {
     return KUidFlashStubApp;
     }
 
 
 _LIT(KStubFlashContent, "C:\\Data\\Others\\example.swf");
 
 const TUint32 KContentChecksum = 0;
 
 CApaDocument* CFlashStubApplication::CreateDocumentL()
     {
     FlashUIConfig config;
     config.iIsMMI = EFalse;
     config.iIsStubApp = ETrue;
     config.iContentFileName.Copy(KStubFlashContent);
     config.iContentChecksum = KContentChecksum;
     config.iExtensions = NULL;
 
     if(!FlashStubsSupported())
               {
               User::Leave(KErrNotSupported);   
         } 
     return CreateFlashDocumentL(iFlashLibrary, this, config);
    }

#include <eikapp.h>
#include <apparc.h>
#include <apgcli.h>

Go to the source code of this file.


Data Structures

struct   FlashUIConfig
  Structure containing configuration information for UI. More...

Typedefs

typedef void *(*  PFNC_CreateFlashDocumentL )(CEikApplication *aApp, const FlashUIConfig &aUIConfig)
  Pointer to a function that creates the document class.

Functions

  _LIT (KFlashUILibraryName,"flash2ui.dll")
  The Flash UI dll name.
CApaDocument *  CreateFlashDocumentL (RLibrary &aLibrary, CEikApplication *aApp, const FlashUIConfig &aUIConfig)
  CreateFlashDocumentL creates a Flash document for an application and starts playing the given SWF file.
TBool  FlashStubsSupported ()
  Checks whether S60 Flash Lite Viewer Framework DLL exists in the device for stub applications.

Variables

const TInt  KFlashCreateDocumentOrdinal = 1
  The ordinal of the exported function in the Flash UI dll.

Typedef Documentation

typedef void*(* PFNC_CreateFlashDocumentL)(CEikApplication *aApp, const FlashUIConfig &aUIConfig)
 

Pointer to a function that creates the document class.


Function Documentation

_LIT KFlashUILibraryName  ,
"flash2ui.dll" 
 

The Flash UI dll name.

CApaDocument* CreateFlashDocumentL RLibrary &  aLibrary,
CEikApplication *  aApp,
const FlashUIConfig aUIConfig
[inline]
 

CreateFlashDocumentL creates a Flash document for an application and starts playing the given SWF file.

If there is no S60 Flash Lite Viewer Framework DLL installed in the device, the function leaves with error code returned from the RLibrary::Load.

Parameters:
aLibrary  Handle to the flash UI dll.
aApp  Instance of the application class.
aUIConfig  Instance of the class that contains the configuration for the UI.
Returns:
The new document object.
Leave:
KErrGeneral Error in using the successfully loaded Flash Viewer Framework DLL
TBool FlashStubsSupported  )  [inline]
 

Checks whether S60 Flash Lite Viewer Framework DLL exists in the device for stub applications.

Returns:
ETrue if Flash Lite stub applications is suppported, EFalse otherwise.

Variable Documentation

const TInt KFlashCreateDocumentOrdinal = 1
 

The ordinal of the exported function in the Flash UI dll.


Copyright © Nokia Corporation 2001-2008
Back to top