• 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 PVAUTHORENGINEFACTORY_H_INCLUDED
19 #define PVAUTHORENGINEFACTORY_H_INCLUDED
20 
21 // Forward declaration
22 class PVAuthorEngineInterface;
23 class PVCommandStatusObserver;
24 class PVInformationalEventObserver;
25 class PVErrorEventObserver;
26 
27 
28 /**
29  * PVAuthorEngineFactory Class
30  *
31  * PVAuthorEngineFactory class is a singleton class which instantiates and provides
32  * access to pvAuthor engine. It returns an PVAuthorEngineInterface
33  * reference, the interface class of the pvAuthor SDK.
34  *
35  * The application is expected to contain and maintain a pointer to the
36  * PVAuthorEngineInterface instance at all time that pvAuthor engine is active.
37  **/
38 class PVAuthorEngineFactory
39 {
40     public:
41         /**
42          * Creates an instance of a pvAuthor engine. If the creation fails, this function will leave.
43          *
44          * @param aCmdStatusObserver     The observer for command status
45          * @param aErrorEventObserver    The observer for unsolicited error events
46          * @param aInfoEventObserver     The observer for unsolicited informational events
47          * @returns A pointer to an author or leaves if instantiation fails
48          **/
49         OSCL_IMPORT_REF static PVAuthorEngineInterface* CreateAuthor(PVCommandStatusObserver* aCmdStatusObserver,
50                 PVErrorEventObserver *aErrorEventObserver, PVInformationalEventObserver *aInfoEventObserver);
51 
52         /**
53          * This function allows the application to delete an instance of a pvAuthor
54          * and reclaim all allocated resources.  An author can be deleted only in
55          * the idle state. An attempt to delete an author in any other state will
56          * fail and return false.
57          *
58          * @param aAuthor The author to be deleted.
59          * @returns A status code indicating success or failure.
60          **/
61         OSCL_IMPORT_REF static bool DeleteAuthor(PVAuthorEngineInterface* aAuthor);
62 };
63 
64 #endif // PVAUTHORENGINEFACTORY_H_INCLUDED
65