sbIPropertyUnitConverter.idl
Go to the documentation of this file.
1 /*
2 //
3 // BEGIN SONGBIRD GPL
4 //
5 // This file is part of the Songbird web player.
6 //
7 // Copyright(c) 2005-2008 POTI, Inc.
8 // http://songbirdnest.com
9 //
10 // This file may be licensed under the terms of of the
11 // GNU General Public License Version 2 (the "GPL").
12 //
13 // Software distributed under the License is distributed
14 // on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
15 // express or implied. See the GPL for the specific language
16 // governing rights and limitations.
17 //
18 // You should have received a copy of the GPL along with this
19 // program. If not, go to http://www.gnu.org/licenses/gpl.html
20 // or write to the Free Software Foundation, Inc.,
21 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 //
23 // END SONGBIRD GPL
24 //
25  */
26 
27 #include "nsISupports.idl"
28 
29 interface nsISimpleEnumerator;
30 interface sbIPropertyInfo;
31 
37 [scriptable, uuid(7b86a6fc-a9d4-4ef9-90e3-3334e58cc3d6)]
39 {
46  readonly attribute AString id;
47 
53  readonly attribute AString name;
54 
60  readonly attribute AString shortName;
61 };
62 
69 [scriptable, uuid(16814f07-373a-404a-a31b-73ca83cb3c96)]
71 {
77  AString convert(in AString aValue,
78  in AString aFromUnitID,
79  in AString aToUnitID,
80  in long aMinDecimals,
81  in long aMaxDecimals);
82 
86  readonly attribute nsISimpleEnumerator units;
87 
93  readonly attribute AString nativeUnitId;
94 
98  readonly attribute AString stringBundle;
99 
105  AString autoFormat(in AString aValue,
106  in long aMinDecimals,
107  in long aMaxDecimals);
108 
115 };
readonly attribute AString name
The full name of the unit, ie. Kilobyte. This is a localized string, ie. a partial entity such as "&m...
onPageChanged aValue
Definition: FeedWriter.js:1395
Property unit interface This interface describes a property unit.
attribute sbIPropertyInfo propertyInfo
The sbIPropertyInfo this converter is associated with. This attribute will be set automatically by th...
readonly attribute AString nativeUnitId
The native unit for this property. This is the unit used for storage in the database, and that is implied when getting and setting the property.
var uuid
readonly attribute AString shortName
The short name of the unit, ie. kB. This is a localized string, ie. a partial entity such as "&my...
AString convert(in AString aValue, in AString aFromUnitID, in AString aToUnitID, in long aMinDecimals, in long aMaxDecimals)
Convert a value to a different unit. Use -1 for aMinDecimals and aMaxDecimals if you do not wish to s...
readonly attribute AString id
The id of the unit. This string is not localized and is used in calls to sbIPropertyUnitConverter's c...
An interface used to describe a metadata property for use by the UI and other sbILibrary interfaces (...
readonly attribute AString stringBundle
The url to the string bundle used to localize partial entities.
Property unit converter interface This is an interface songbird property converter, used to convert a property value between its various units representations.
AString autoFormat(in AString aValue, in long aMinDecimals, in long aMaxDecimals)
Formats a value using the most suitable unit. Use -1 for aMinDecimals and aMaxDecimals if you do not ...
readonly attribute nsISimpleEnumerator units
The list of available units for this property.