sipxmedialib  Version 3.3
MprHookConstructor.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2009 SIPfoundry Inc.
3 // Licensed by SIPfoundry under the LGPL license.
4 //
5 // Copyright (C) 2009 SIPez LLC.
6 // Licensed to SIPfoundry under a Contributor Agreement.
7 //
8 // $$
10 
11 #ifndef _MprHookConstructor_h_
12 #define _MprHookConstructor_h_
13 
14 // SYSTEM INCLUDES
15 // APPLICATION INCLUDES
17 #include <mp/MprHook.h>
18 
19 // DEFINES
20 // MACROS
21 // EXTERNAL FUNCTIONS
22 // EXTERNAL VARIABLES
23 // CONSTANTS
24 // STRUCTS
25 // TYPEDEFS
26 // FORWARD DECLARATIONS
27 
33 {
34 /* //////////////////////////// PUBLIC //////////////////////////////////// */
35 public:
36 
37 /* ============================ CREATORS ================================== */
38 
41  MprHookConstructor(int maxInOutputs = 5)
43  0, 1, //minInputs, maxInputs,
44  0, 1) //minOutputs, maxOutputs
45  {
46  };
47 
50  virtual ~MprHookConstructor(){};
51 
52 /* ============================ MANIPULATORS ============================== */
53 
55  virtual OsStatus newResource(const UtlString& resourceName,
56  int maxResourcesToCreate,
57  int& numResourcesCreated,
58  MpResource* resourceArray[])
59  {
60  assert(maxResourcesToCreate >= 1);
61  numResourcesCreated = 1;
62  resourceArray[0] = new MprHook(resourceName);
63  resourceArray[0]->enable();
64  return(OS_SUCCESS);
65  }
66 
67 /* ============================ ACCESSORS ================================= */
68 
69 /* ============================ INQUIRY =================================== */
70 
71 /* //////////////////////////// PROTECTED ///////////////////////////////// */
72 protected:
73 
74 /* //////////////////////////// PRIVATE /////////////////////////////////// */
75 private:
76 
79  MprHookConstructor(const MprHookConstructor& rMprHookConstructor);
80 
81 
85 
86 };
87 
88 /* ============================ INLINE METHODS ============================ */
89 
90 #endif // _MprHookConstructor_h_
MprHookConstructor(int maxInOutputs=5)
Definition: MprHookConstructor.h:41
MprHookConstructor & operator=(const MprHookConstructor &rhs)
#define DEFAULT_HOOK_RESOURCE_TYPE
Definition: MpResourceFactory.h:28
virtual UtlBoolean enable()
Enable this resource.
Definition: MpResource.cpp:145
virtual OsStatus newResource(const UtlString &resourceName, int maxResourcesToCreate, int &numResourcesCreated, MpResource *resourceArray[])
Create a new resource.
Definition: MprHookConstructor.h:55
Abstract base class for all media processing objects.
Definition: MpResource.h:56
MpAudioResourceConstructor is used to construct a specific audio resource type.
Definition: MpAudioResourceConstructor.h:36
The "Hook" media processing resource.
Definition: MprHook.h:35
virtual ~MprHookConstructor()
Definition: MprHookConstructor.h:50
MprHookConstructor is used to construct a Hook resource.
Definition: MprHookConstructor.h:32