OSDN Git Service

RIO-8910: Fix for MP3 parser returning incorrect value for bitrate key
[android-x86/external-opencore.git] / android / extension_registry_populator_interface.h
1 #ifndef EXTENSION_REGISTRY_POPULATOR_INTERFACE_H_INCLUDED
2 #define EXTENSION_REGISTRY_POPULATOR_INTERFACE_H_INCLUDED
3
4 #include "dispatch.h"
5 //UUid for the Registry populator Interface which Extension handler looks for in the configuration files while loading the extensions
6 #define PV_EXTN_REGISTRY_POPULATOR_INTERFACE OsclUuid(0xf5a4c808,0x963b,0x48db,0xbd,0x13,0x2f,0x7a,0x1f,0x2b,0x41,0x2f)
7
8
9
10 class PVPlayerExtensionHandler;
11 class ExtensionRegistryInterface;
12
13 /**
14  * ExtnRegPopulatorInterface
15  * Extension handler looks for Libraries supporting ExtnRegPopulatorInterface as mentioned in the configuration files
16  */
17 class ExtnRegPopulatorInterface
18 {
19 public:
20     virtual void registerExtensions(ExtensionRegistryInterface* aRegistry) = 0;
21
22     virtual ~ExtnRegPopulatorInterface(){}
23 };
24
25 /**
26  * PVPlayerExtnInfo
27  * It has the information regarding the creation and deletion of extensions along with its UUID.
28  */
29 class PVPlayerExtnInfo
30 {
31 public:
32     PVPlayerExtnInfo()
33     {
34         mExtnCreateFunc = NULL;
35         mExtnReleaseFunc = NULL;
36         mExtnUID = NULL;
37     }
38
39     PVPlayerExtnInfo(const PVPlayerExtnInfo& info)
40     {
41         mExtnUID = info.mExtnUID;
42         mExtnCreateFunc = info.mExtnCreateFunc;
43         mExtnReleaseFunc = info.mExtnReleaseFunc;
44     }
45
46     ~PVPlayerExtnInfo()
47     {
48     }
49     
50     IDispatch*(*mExtnCreateFunc)(PVPlayerExtensionHandler&);
51     bool (*mExtnReleaseFunc)(IDispatch *);
52     const char* mExtnUID;
53 };
54
55 /**
56  * ExtensionRegistryInterface
57  * This is the interface for Extension registry.
58  */
59 class ExtensionRegistryInterface
60 {
61 public:
62 /**
63      * This function creates the requested Extension, if the specified String UUID is present in the registry
64      *
65      * @param ifaceName
66      *        String UUID of the Extension which needs to be created
67      * @param extnHandler
68      *        Extension handler reference
69      * @return
70      *        Handle to the instance of the extension
71  */
72     virtual IDispatch* createExtension(const String16& ifaceName,PVPlayerExtensionHandler& extnHandler ) = 0;
73
74 /**
75      * This function is used for registering new extension.
76      *
77      * @param extnInfo
78      *        Infornmation required for creation and deletion of extension
79  */
80     virtual void registerExtension(const PVPlayerExtnInfo& extnInfo) = 0;
81
82     virtual ~ExtensionRegistryInterface(){}
83 };
84
85 #endif // EXTENSION_REGISTRY_POPULATOR_INTERFACE_H_INCLUDED
86
87