• 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 PVMF_PROTOCOLENGINE_FACTORY_H_INCLUDED
19 #define PVMF_PROTOCOLENGINE_FACTORY_H_INCLUDED
20 
21 #ifndef OSCL_BASE_H_INCLUDED
22 #include "oscl_base.h"
23 #endif
24 
25 #ifndef OSCL_SCHEDULER_AO_H_INCLUDED
26 #include "oscl_scheduler_ao.h"
27 #endif
28 
29 // Forward declaration
30 class PVMFNodeInterface;
31 
32 //PV_DV: this UID needs to reflect WMA DEC
33 #define KPVMFProtocolEngineNodeUuid PVUuid(0xd6b78c5d,0x2ec2,0x4e9f,0x88,0x12,0xd0,0x92,0x3e,0x81,0x25,0x29);
34 
35 
36 /**
37  * PVMFProtocolEngineNodeFactory Class
38  *
39  * PVMFProtocolEngineNodeFactory class is a singleton class which instantiates and provides
40  * access to PVMF Protocol Engine node. It returns a PVMFNodeInterface
41  * reference, the interface class of the PVMFProtocolEngineNode.
42  *
43  * The client is expected to contain and maintain a pointer to the instance created
44  * while the node is active.
45  */
46 class PVMFProtocolEngineNodeFactory
47 {
48     public:
49         /**
50          * Creates an instance of a PVMFProtocolEngineNode. If the creation fails, this function will leave.
51          *
52          * @param aPriority The active object priority for the node. Default is standard priority if not specified
53          * @returns A pointer to an instance of PVMFProtocolEngineNode as PVMFNodeInterface reference or leaves if
54          * instantiation fails
55          **/
56         OSCL_IMPORT_REF static PVMFNodeInterface* CreatePVMFProtocolEngineNode(int32 aPriority = OsclActiveObject::EPriorityNominal);
57 
58         /**
59          * Deletes an instance of PVMFProtocolEngineNode
60          * and reclaims all allocated resources.  An instance can be deleted only in
61          * the idle state. An attempt to delete in any other state will fail and return false.
62          *
63          * @param aNode The PVMFProtocolEngineNode instance to be deleted
64          * @returns A status code indicating success or failure of deletion
65          **/
66         OSCL_IMPORT_REF static bool DeletePVMFProtocolEngineNode(PVMFNodeInterface* aNode);
67 };
68 
69 #endif // PVMF_PROTOCOLENGINE_FACTORY_H_INCLUDED
70 
71 
72