OSDN Git Service

RIO-8910: Fix for MP3 parser returning incorrect value for bitrate key
[android-x86/external-opencore.git] / android / extension_handler_registry.h
1 #ifndef EXTENSION_HANDLER_REGISTRY_H_INCLUDED
2 #define EXTENSION_HANDLER_REGISTRY_H_INCLUDED
3
4 #ifndef OSCL_VECTOR_H_INCLUDED
5 #include "oscl_vector.h"
6 #endif
7
8 #ifndef OSCL_MEM_H_INCLUDED
9 #include "oscl_mem.h"
10 #endif
11
12 #include "oscl_string.h"
13 #include "dispatch.h"
14 #include "extension_registry_populator_interface.h"
15
16 class OsclSharedLibrary;
17
18 class PVPlayerExtensionRegistry : public ExtensionRegistryInterface
19 {
20 public:
21
22     PVPlayerExtensionRegistry(); 
23     /**
24      * Function for parsing the configuration file and load the Extension libraries
25      *
26      * @param configFile
27      *        Configuration file to be parsed for extension libraries which support registry populator interface
28     */
29     void loadPVPlayerExtensions(const OSCL_String& configFile);
30     /**
31      * Function for unloading the Extension libraries
32     */
33     void removePVPlayerExtensions();
34     /**
35     * Function for Creating Extension specified by the String UUID
36     */
37     virtual IDispatch* createExtension(const String16& extnIfaceUID,PVPlayerExtensionHandler& extnHandler );
38     
39     /**
40     * Function for Populating the registry
41     */
42     virtual void registerExtension(const PVPlayerExtnInfo& extnInfo){
43         mType.push_back(extnInfo);
44     }
45     virtual ~PVPlayerExtensionRegistry();
46
47 private:
48     Oscl_Vector<PVPlayerExtnInfo, OsclMemAllocator> mType;
49     typedef struct
50     {
51         OsclSharedLibrary* mLib;
52         ExtnRegPopulatorInterface* mExtnLibIfacePtr;
53     } PVPlayerExtnSharedLibInfo;
54     Oscl_Vector<PVPlayerExtnSharedLibInfo*, OsclMemAllocator> mExtnIfaceInfoList;
55 };
56
57 //Class used by Extension Handler for populating the registry
58 class PVPlayerExtnPopulator
59 {
60 public:
61     static void populate(PVPlayerExtensionRegistry&);
62     static void depopulate(PVPlayerExtensionRegistry&);
63 private:
64     PVPlayerExtnPopulator();
65 };
66
67
68 #endif // EXTENSION_HANDLER_REGISTRY_H_INCLUDED
69
70