• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* ------------------------------------------------------------------
2  * Copyright (C) 1998-2009 PacketVideo
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13  * express or implied.
14  * See the License for the specific language governing permissions
15  * and limitations under the License.
16  * -------------------------------------------------------------------
17  */
18 #ifndef PV_2WAY_PROXY_FACTORY_H_INCLUDED
19 #define PV_2WAY_PROXY_FACTORY_H_INCLUDED
20 
21 #ifndef PV_COMMON_TYPES_H_INCLUDED
22 #include "pv_common_types.h"
23 #endif
24 
25 #ifndef PV_2WAY_INTERFACE_H_INCLUDED
26 #include "pv_2way_interface.h"
27 #endif
28 
29 #ifndef PV_ENGINE_OBSERVER_H_INCLUDED
30 #include "pv_engine_observer.h"
31 #endif
32 
33 class CPV2WayProxyFactory
34 {
35     public:
36         OSCL_IMPORT_REF static void Init();
37 
38         OSCL_IMPORT_REF static void Cleanup();
39 
40         /**
41          * Creates an instance of a terminal of a particular type.  Initially, this
42          * will support 324m type terminals.
43          *
44          * @param aTerminalType the type of terminal to be created.
45          * @param aCmdStatusObserver     the observer for command status
46          * @param aInfoEventObserver     the observer for unsolicited informational events
47          * @param aErrorEventObserver     the observer for unsolicited error events
48          *
49          * @returns A pointer to a terminal or leaves if the type is invalid or the system is out of resources
50          **/
51         OSCL_IMPORT_REF static CPV2WayInterface *CreateTerminal(TPVTerminalType aTerminalType,
52                 PVCommandStatusObserver* aCmdStatusObserver,
53                 PVInformationalEventObserver *aInfoEventObserver,
54                 PVErrorEventObserver *aErrorEventObserver);
55 
56         /**
57          * This function allows the application to delete an instance of a terminal
58          * and reclaim all allocated resources.  A terminal should be deleted only in
59          * the EIdle state.  An attempt to delete a terminal in any other state will
60          * result in unpredictable behavior.
61          *
62          * @param terminal the terminal to be deleted.
63          *
64          **/
65         OSCL_IMPORT_REF static void DeleteTerminal(CPV2WayInterface* terminal);
66 };
67 
68 #endif // PV_2WAY_PROXY_FACTORY_H_INCLUDED
69