sbTranscodeProfileProperty.cpp
Go to the documentation of this file.
1 /* vim: set sw=2 : */
2 /*
3 //
4 // BEGIN SONGBIRD GPL
5 //
6 // This file is part of the Songbird web player.
7 //
8 // Copyright(c) 2005-2009 POTI, Inc.
9 // http://songbirdnest.com
10 //
11 // This file may be licensed under the terms of of the
12 // GNU General Public License Version 2 (the "GPL").
13 //
14 // Software distributed under the License is distributed
15 // on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
16 // express or implied. See the GPL for the specific language
17 // governing rights and limitations.
18 //
19 // You should have received a copy of the GPL along with this
20 // program. If not, go to http://www.gnu.org/licenses/gpl.html
21 // or write to the Free Software Foundation, Inc.,
22 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 //
24 // END SONGBIRD GPL
25 //
26 */
27 
29 
30 #include <nsIVariant.h>
31 
34 
36  : mHidden(PR_FALSE),
37  mScale(NS_LITERAL_CSTRING("1/1"))
38 {
39 }
40 
41 sbTranscodeProfileProperty::~sbTranscodeProfileProperty()
42 {
43 }
44 
45 nsresult
46 sbTranscodeProfileProperty::SetPropertyName(const nsAString & aPropertyName)
47 {
48  mPropertyName = aPropertyName;
49  return NS_OK;
50 }
51 
52 nsresult
54 {
55  mValueMin = aValueMin;
56  return NS_OK;
57 }
58 
59 nsresult
61 {
62  mValueMax = aValueMax;
63  return NS_OK;
64 }
65 
66 nsresult
68 {
69  mHidden = aHidden;
70  return NS_OK;
71 }
72 
73 nsresult
74 sbTranscodeProfileProperty::SetMapping(const nsACString & aMapping)
75 {
76  mMapping = aMapping;
77  return NS_OK;
78 }
79 
80 nsresult
81 sbTranscodeProfileProperty::SetScale(const nsACString & aScale)
82 {
83  mScale = aScale;
84  return NS_OK;
85 }
86 
87 /* readonly attribute AString propertyName; */
88 NS_IMETHODIMP
89 sbTranscodeProfileProperty::GetPropertyName(nsAString & aPropertyName)
90 {
91  aPropertyName.Assign(mPropertyName);
92  return NS_OK;
93 }
94 
95 /* readonly attribute nsIVariant valueMin; */
96 NS_IMETHODIMP
97 sbTranscodeProfileProperty::GetValueMin(nsIVariant * *aValueMin)
98 {
99  NS_ENSURE_ARG_POINTER(aValueMin);
100  NS_IF_ADDREF(*aValueMin = mValueMin);
101  return NS_OK;
102 }
103 
104 /* readonly attribute nsIVariant valueMax; */
105 NS_IMETHODIMP
106 sbTranscodeProfileProperty::GetValueMax(nsIVariant * *aValueMax)
107 {
108  NS_ENSURE_ARG_POINTER(aValueMax);
109  NS_IF_ADDREF(*aValueMax = mValueMax);
110  return NS_OK;
111 }
112 
113 /* attribute nsIVariant value; */
114 NS_IMETHODIMP
115 sbTranscodeProfileProperty::GetValue(nsIVariant * *aValue)
116 {
117  NS_ENSURE_ARG_POINTER(aValue);
118  NS_IF_ADDREF(*aValue = mValue);
119  return NS_OK;
120 }
121 NS_IMETHODIMP
122 sbTranscodeProfileProperty::SetValue(nsIVariant * aValue)
123 {
124  mValue = aValue;
125  return NS_OK;
126 }
127 
128 /* readonly attribute boolean hidden; */
129 NS_IMETHODIMP
130 sbTranscodeProfileProperty::GetHidden(PRBool *aHidden)
131 {
132  NS_ENSURE_ARG_POINTER(aHidden);
133  *aHidden = mHidden;
134  return NS_OK;
135 }
136 
137 /* readonly attribute ACString mapping; */
138 NS_IMETHODIMP
139 sbTranscodeProfileProperty::GetMapping(nsACString & aMapping)
140 {
141  aMapping = mMapping;
142  return NS_OK;
143 }
144 
145 /* readonly attribute ACString scale; */
146 NS_IMETHODIMP
147 sbTranscodeProfileProperty::GetScale(nsACString & aScale)
148 {
149  aScale = mScale;
150  return NS_OK;
151 }
nsresult SetValueMax(nsIVariant *aValueMax)
return NS_OK
nsresult SetValueMin(nsIVariant *aValueMin)
onPageChanged aValue
Definition: FeedWriter.js:1395
nsresult SetMapping(const nsACString &aMapping)
PRBool mHidden
If true, this property should not be output (instead it should be used for calcuating a different pro...
NS_IMPL_THREADSAFE_ISUPPORTS1(sbTranscodeProfileProperty, sbITranscodeProfileProperty) sbTranscodeProfileProperty
nsresult SetPropertyName(const nsAString &aPropertyName)
nsresult SetHidden(const PRBool aHidden)
nsresult SetScale(const nsACString &aScale)