28 #ifndef __SBPROPERTYINFO_H__
29 #define __SBPROPERTYINFO_H__
31 #include <sbIPropertyInfo.h>
32 #include <sbIPropertyArray.h>
37 #include <nsStringGlue.h>
38 #include <nsCOMArray.h>
43 #define NS_FORWARD_SBIPROPERTYINFO_NOSPECIFICS(_to) \
44 NS_IMETHOD GetOPERATOR_EQUALS(nsAString & aOPERATOR_EQUALS) { return _to GetOPERATOR_EQUALS(aOPERATOR_EQUALS); } \
45 NS_IMETHOD GetOPERATOR_NOTEQUALS(nsAString & aOPERATOR_NOTEQUALS) { return _to GetOPERATOR_NOTEQUALS(aOPERATOR_NOTEQUALS); } \
46 NS_IMETHOD GetOPERATOR_GREATER(nsAString & aOPERATOR_GREATER) { return _to GetOPERATOR_GREATER(aOPERATOR_GREATER); } \
47 NS_IMETHOD GetOPERATOR_GREATEREQUAL(nsAString & aOPERATOR_GREATEREQUAL) { return _to GetOPERATOR_GREATEREQUAL(aOPERATOR_GREATEREQUAL); } \
48 NS_IMETHOD GetOPERATOR_LESS(nsAString & aOPERATOR_LESS) { return _to GetOPERATOR_LESS(aOPERATOR_LESS); } \
49 NS_IMETHOD GetOPERATOR_LESSEQUAL(nsAString & aOPERATOR_LESSEQUAL) { return _to GetOPERATOR_LESSEQUAL(aOPERATOR_LESSEQUAL); } \
50 NS_IMETHOD GetOPERATOR_CONTAINS(nsAString & aOPERATOR_CONTAINS) { return _to GetOPERATOR_CONTAINS(aOPERATOR_CONTAINS); } \
51 NS_IMETHOD GetOPERATOR_NOTCONTAINS(nsAString & aOPERATOR_NOTCONTAINS) { return _to GetOPERATOR_NOTCONTAINS(aOPERATOR_NOTCONTAINS); } \
52 NS_IMETHOD GetOPERATOR_BEGINSWITH(nsAString & aOPERATOR_BEGINSWITH) { return _to GetOPERATOR_BEGINSWITH(aOPERATOR_BEGINSWITH); } \
53 NS_IMETHOD GetOPERATOR_NOTBEGINSWITH(nsAString & aOPERATOR_NOTBEGINSWITH) { return _to GetOPERATOR_NOTBEGINSWITH(aOPERATOR_NOTBEGINSWITH); } \
54 NS_IMETHOD GetOPERATOR_ENDSWITH(nsAString & aOPERATOR_ENDSWITH) { return _to GetOPERATOR_ENDSWITH(aOPERATOR_ENDSWITH); } \
55 NS_IMETHOD GetOPERATOR_NOTENDSWITH(nsAString & aOPERATOR_NOTENDSWITH) { return _to GetOPERATOR_NOTENDSWITH(aOPERATOR_NOTENDSWITH); } \
56 NS_IMETHOD GetOPERATOR_BETWEEN(nsAString & aOPERATOR_BETWEEN) { return _to GetOPERATOR_BETWEEN(aOPERATOR_BETWEEN); } \
57 NS_IMETHOD GetOPERATOR_ISSET(nsAString & aOPERATOR_ISSET) { return _to GetOPERATOR_ISSET(aOPERATOR_ISSET); } \
58 NS_IMETHOD GetOPERATOR_ISNOTSET(nsAString & aOPERATOR_ISNOTSET) { return _to GetOPERATOR_ISNOTSET(aOPERATOR_ISNOTSET); } \
59 NS_IMETHOD GetNullSort(PRUint32 *aNullSort) { return _to GetNullSort(aNullSort); } \
60 NS_IMETHOD SetNullSort(PRUint32 aNullSort) { return _to SetNullSort(aNullSort); } \
61 NS_IMETHOD GetSecondarySort(sbIPropertyArray * *aSecondarySort) { return _to GetSecondarySort(aSecondarySort); } \
62 NS_IMETHOD SetSecondarySort(sbIPropertyArray * aSecondarySort) { return _to SetSecondarySort(aSecondarySort); } \
63 NS_IMETHOD GetId(nsAString & aID) { return _to GetId(aID); } \
64 NS_IMETHOD SetId(const nsAString & aID) { return _to SetId(aID); } \
65 NS_IMETHOD GetType(nsAString & aType) { return _to GetType(aType); } \
66 NS_IMETHOD SetType(const nsAString & aType) { return _to SetType(aType); } \
67 NS_IMETHOD GetDisplayName(nsAString & aDisplayName) { return _to GetDisplayName(aDisplayName); } \
68 NS_IMETHOD SetDisplayName(const nsAString & aDisplayName) { return _to SetDisplayName(aDisplayName); } \
69 NS_IMETHOD GetLocalizationKey(nsAString & aLocalizationKey) { return _to GetLocalizationKey(aLocalizationKey); } \
70 NS_IMETHOD SetLocalizationKey(const nsAString & aLocalizationKey) { return _to SetLocalizationKey(aLocalizationKey); } \
71 NS_IMETHOD GetUserViewable(PRBool *aUserViewable) { return _to GetUserViewable(aUserViewable); } \
72 NS_IMETHOD SetUserViewable(PRBool aUserViewable) { return _to SetUserViewable(aUserViewable); } \
73 NS_IMETHOD GetUserEditable(PRBool *aUserEditable) { return _to GetUserEditable(aUserEditable); } \
74 NS_IMETHOD SetUserEditable(PRBool aUserEditable) { return _to SetUserEditable(aUserEditable); } \
75 NS_IMETHOD GetRemoteReadable(PRBool *aRemoteReadable) { return _to GetRemoteReadable(aRemoteReadable); } \
76 NS_IMETHOD SetRemoteReadable(PRBool aRemoteReadable) { return _to SetRemoteReadable(aRemoteReadable); } \
77 NS_IMETHOD GetRemoteWritable(PRBool *aRemoteWritable) { return _to GetRemoteWritable(aRemoteWritable); } \
78 NS_IMETHOD SetRemoteWritable(PRBool aRemoteWritable) { return _to SetRemoteWritable(aRemoteWritable); } \
79 NS_IMETHOD GetOperators(nsISimpleEnumerator * *aOperators) { return _to GetOperators(aOperators); } \
80 NS_IMETHOD SetOperators(nsISimpleEnumerator * aOperators) { return _to SetOperators(aOperators); } \
81 NS_IMETHOD GetOperator(const nsAString & aOperator, sbIPropertyOperator * *_retval) { return _to GetOperator(aOperator, _retval); } \
82 NS_IMETHOD SetUnitConverter(sbIPropertyUnitConverter *aUnitConverter) { return _to SetUnitConverter(aUnitConverter); } \
83 NS_IMETHOD GetUnitConverter(sbIPropertyUnitConverter **retVal) { return _to GetUnitConverter(retVal); } \
84 NS_IMETHOD GetUsedInIdentity(PRBool *aUsedInIdentity) { return _to GetUsedInIdentity(aUsedInIdentity); } \
85 NS_IMETHOD SetUsedInIdentity(PRBool aUsedInIdentity) { return _to SetUsedInIdentity(aUsedInIdentity); }
88 #define NS_FORWARD_SBIPROPERTYINFO_MAKESORTABLE(_to) \
89 NS_IMETHOD MakeSortable(const nsAString &aValue, nsAString &retVal) { return _to MakeSortable(aValue, retVal); }
91 #define NS_FORWARD_SBIPROPERTYINFO_STDPROP(_to) \
92 NS_FORWARD_SBIPROPERTYINFO_NOSPECIFICS(_to) \
93 NS_FORWARD_SBIPROPERTYINFO_MAKESORTABLE(_to)
95 #define SB_IPROPERTYINFO_CAST(__unambiguousBase, __expr) \
96 static_cast<sbIPropertyInfo*>(static_cast<__unambiguousBase>(__expr))
103 NS_DECL_SBIPROPERTYINFO
PRLock * mDisplayNameLock
PRLock * mUnitConverterLock
PRLock * mRemoteWritableLock
virtual ~sbPropertyInfo()
PRLock * mLocalizationKeyLock
PRLock * mUsedInIdentityLock
NS_IMETHOD SetUnitConverter(sbIPropertyUnitConverter *aUnitConverter)
nsCOMPtr< sbIPropertyUnitConverter > mUnitConverter
PRLock * mRemoteReadableLock
nsCOMPtr< sbIPropertyArray > mSecondarySort
PRLock * mUserEditableLock
An interface used to describe a metadata property for use by the UI and other sbILibrary interfaces (...
nsString mLocalizationKey
PRLock * mUserViewableLock
Property unit converter interface This is an interface songbird property converter, used to convert a property value between its various units representations.
nsCOMArray< sbIPropertyOperator > mOperators
PRLock * mSecondarySortLock
NS_DECL_ISUPPORTS NS_DECL_SBIPROPERTYINFO sbPropertyInfo()