sipxmedialib  Version 3.3
MprFromFileConstructor.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2006-2008 SIPfoundry Inc.
3 // Licensed by SIPfoundry under the LGPL license.
4 //
5 // Copyright (C) 2006-2008 SIPez LLC.
6 // Licensed to SIPfoundry under a Contributor Agreement.
7 //
8 // $$
10 
11 // Author: Dan Petrie <dpetrie AT SIPez DOT com>
12 
13 #ifndef _MprFromFileConstructor_h_
14 #define _MprFromFileConstructor_h_
15 
16 // SYSTEM INCLUDES
17 // APPLICATION INCLUDES
19 #include <mp/MprFromFile.h>
20 
21 // DEFINES
22 // MACROS
23 // EXTERNAL FUNCTIONS
24 // EXTERNAL VARIABLES
25 // CONSTANTS
26 // STRUCTS
27 // TYPEDEFS
28 // FORWARD DECLARATIONS
29 
34 {
35 /* //////////////////////////// PUBLIC //////////////////////////////////// */
36 public:
37 
38 /* ============================ CREATORS ================================== */
39 
43  0, 1, //minInputs, maxInputs,
44  1, 1) //minOutputs, maxOutputs
45  {
46  }
47 
50 
51 /* ============================ MANIPULATORS ============================== */
52 
54  virtual OsStatus newResource(const UtlString& resourceName,
55  int maxResourcesToCreate,
56  int& numResourcesCreated,
57  MpResource* resourceArray[])
58  {
59  assert(maxResourcesToCreate >= 1);
60  numResourcesCreated = 1;
61  resourceArray[0] = new MprFromFile(resourceName);
62  resourceArray[0]->enable();
63  return(OS_SUCCESS);
64  }
65 
66 /* ============================ ACCESSORS ================================= */
67 
68 /* ============================ INQUIRY =================================== */
69 
70 /* //////////////////////////// PROTECTED ///////////////////////////////// */
71 protected:
72 
73 /* //////////////////////////// PRIVATE /////////////////////////////////// */
74 private:
75 
77  MprFromFileConstructor(const MprFromFileConstructor& rMprFromFileConstructor);
78 
81 
82 };
83 
84 /* ============================ INLINE METHODS ============================ */
85 
86 #endif // _MprFromFileConstructor_h_
The "Play audio from file" media processing resource.
Definition: MprFromFile.h:37
virtual ~MprFromFileConstructor()
Destructor.
Definition: MprFromFileConstructor.h:49
MprFromFileConstructor & operator=(const MprFromFileConstructor &rhs)
Disabled assignment operator.
virtual OsStatus newResource(const UtlString &resourceName, int maxResourcesToCreate, int &numResourcesCreated, MpResource *resourceArray[])
Create a new resource.
Definition: MprFromFileConstructor.h:54
MprFromFileConstructor is used to construct a FromFile resource.
Definition: MprFromFileConstructor.h:33
#define DEFAULT_FROM_FILE_RESOURCE_TYPE
Definition: MpResourceFactory.h:21
virtual UtlBoolean enable()
Enable this resource.
Definition: MpResource.cpp:145
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
MprFromFileConstructor()
Constructor.
Definition: MprFromFileConstructor.h:41