sipxmedialib  Version 3.3
MprToneGenConstructor.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2006-2007 SIPfoundry Inc.
3 // Licensed by SIPfoundry under the LGPL license.
4 //
5 // Copyright (C) 2006-2007 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 _MprToneGenConstructor_h_
14 #define _MprToneGenConstructor_h_
15 
16 // SYSTEM INCLUDES
17 // APPLICATION INCLUDES
19 #include <mp/MprToneGen.h>
20 
21 // DEFINES
22 // MACROS
23 // EXTERNAL FUNCTIONS
24 // EXTERNAL VARIABLES
25 // CONSTANTS
26 // STRUCTS
27 // TYPEDEFS
28 // FORWARD DECLARATIONS
29 
35 {
36 /* //////////////////////////// PUBLIC //////////////////////////////////// */
37 public:
38 
39 /* ============================ CREATORS ================================== */
40 
43  MprToneGenConstructor(const UtlString& locale = "")
45  0, 1, //minInputs, maxInputs,
46  1, 1) //minOutputs, maxOutputs
47  , mLocale(locale)
48  {
49  };
50 
54 
55 /* ============================ MANIPULATORS ============================== */
56 
58  virtual OsStatus newResource(const UtlString& resourceName,
59  int maxResourcesToCreate,
60  int& numResourcesCreated,
61  MpResource* resourceArray[])
62  {
63  assert(maxResourcesToCreate >= 1);
64  numResourcesCreated = 1;
65  resourceArray[0] = new MprToneGen(resourceName,
66  mLocale);
67  resourceArray[0]->disable();
68  return(OS_SUCCESS);
69  }
70 
71 /* ============================ ACCESSORS ================================= */
72 
73 /* ============================ INQUIRY =================================== */
74 
75 /* //////////////////////////// PROTECTED ///////////////////////////////// */
76 protected:
77 
78 /* //////////////////////////// PRIVATE /////////////////////////////////// */
79 private:
80  UtlString mLocale;
81 
84  MprToneGenConstructor(const MprToneGenConstructor& rMprToneGenConstructor);
85 
86 
90 
91 };
92 
93 /* ============================ INLINE METHODS ============================ */
94 
95 #endif // _MprToneGenConstructor_h_
The "Tone Generator" media processing resource.
Definition: MprToneGen.h:37
MprToneGenConstructor(const UtlString &locale="")
Definition: MprToneGenConstructor.h:43
MprToneGenConstructor & operator=(const MprToneGenConstructor &rhs)
UtlString mLocale
Definition: MprToneGenConstructor.h:80
MprToneGenConstructor is used to construct a ToneGen resource.
Definition: MprToneGenConstructor.h:34
virtual UtlBoolean disable()
Disable this resource.
Definition: MpResource.cpp:121
virtual OsStatus newResource(const UtlString &resourceName, int maxResourcesToCreate, int &numResourcesCreated, MpResource *resourceArray[])
Create a new resource.
Definition: MprToneGenConstructor.h:58
virtual ~MprToneGenConstructor()
Definition: MprToneGenConstructor.h:53
#define DEFAULT_TONE_GEN_RESOURCE_TYPE
Definition: MpResourceFactory.h:23
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