sbDummyPropertyInfo.cpp
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 "sbDummyPropertyInfo.h"
28 #include "sbStandardOperators.h"
29 #include "sbPropertyOperator.h"
30 #include "sbPropertyInfo.h"
31 #include <nsAutoPtr.h>
32 
33 #include <nsIStringBundle.h>
34 
35 #include <nsArrayEnumerator.h>
36 #include <sbIPropertyManager.h>
37 #include <sbLockUtils.h>
38 
40 
42 {
43 }
44 
46 }
47 
48 nsresult
50  nsresult rv;
51 
52  rv = sbPropertyInfo::Init();
53  NS_ENSURE_SUCCESS(rv, rv);
54 
55  SetUserViewable(PR_FALSE);
56  SetUserEditable(PR_FALSE);
57  SetRemoteReadable(PR_FALSE);
58  SetRemoteWritable(PR_FALSE);
59 
60  return NS_OK;
61 }
62 
63 NS_IMETHODIMP
64 sbDummyPropertyInfo::Validate(const nsAString & aValue, PRBool *_retval)
65 {
66  *_retval = PR_TRUE;
67  return NS_OK;
68 }
69 
70 NS_IMETHODIMP
71 sbDummyPropertyInfo::Sanitize(const nsAString & aValue, nsAString & _retval)
72 {
73  return NS_ERROR_NOT_IMPLEMENTED;
74 }
75 
76 NS_IMETHODIMP
77 sbDummyPropertyInfo::Format(const nsAString & aValue, nsAString & _retval)
78 {
79  _retval = aValue;
80  return NS_OK;
81 }
82 
83 NS_IMETHODIMP
84 sbDummyPropertyInfo::MakeSearchable(const nsAString & aValue, nsAString & _retval)
85 {
86  _retval = aValue;
87  return NS_OK;
88 }
89 
NS_IMETHOD Sanitize(const nsAString &aValue, nsAString &_retval)
NS_IMETHOD MakeSearchable(const nsAString &aValue, nsAString &_retval)
return NS_OK
virtual nsresult Init()
NS_IMETHOD SetUserEditable(PRBool aUserEditable)
onPageChanged aValue
Definition: FeedWriter.js:1395
NS_IMETHOD SetUserViewable(PRBool aUserViewable)
NS_IMETHOD SetRemoteReadable(PRBool aRemoteReadable)
NS_IMETHOD Format(const nsAString &aValue, nsAString &_retval)
An interface used to recognize a dummy metadata property.
NS_IMPL_ISUPPORTS_INHERITED1(sbMockDeviceFirmwareHandler, sbBaseDeviceFirmwareHandler, nsIStreamListener) SB_DEVICE_FIRMWARE_HANLDER_REGISTERSELF_IMPL(sbMockDeviceFirmwareHandler
NS_IMETHOD SetRemoteWritable(PRBool aRemoteWritable)
NS_IMETHOD Validate(const nsAString &aValue, PRBool *_retval)