sbDummyPlaylistPropertyInfo.cpp
Go to the documentation of this file.
1 /*
2  *=BEGIN SONGBIRD GPL
3  *
4  * This file is part of the Songbird web player.
5  *
6  * Copyright(c) 2005-2010 POTI, Inc.
7  * http://www.songbirdnest.com
8  *
9  * This file may be licensed under the terms of of the
10  * GNU General Public License Version 2 (the ``GPL'').
11  *
12  * Software distributed under the License is distributed
13  * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
14  * express or implied. See the GPL for the specific language
15  * governing rights and limitations.
16  *
17  * You should have received a copy of the GPL along with this
18  * program. If not, go to http://www.gnu.org/licenses/gpl.html
19  * or write to the Free Software Foundation, Inc.,
20  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21  *
22  *=END SONGBIRD GPL
23  */
24 
26 #include "sbStandardOperators.h"
27 
28 #include <sbIPropertyArray.h>
29 #include <sbIPropertyManager.h>
30 #include <nsITreeView.h>
31 #include <nsAutoPtr.h>
32 
35 
37 {
38 }
39 
40 nsresult
42 {
43  nsresult rv;
44 
46  NS_ENSURE_SUCCESS(rv, rv);
47 
48  SetType(NS_LITERAL_STRING("smartmedialist_playlist"));
49 
50  nsAutoString op;
51  nsRefPtr<sbPropertyOperator> propOp;
52 
53  rv = sbPropertyInfo::GetOPERATOR_EQUALS(op);
54  NS_ENSURE_SUCCESS(rv, rv);
55  propOp = new sbPropertyOperator(op,
56  NS_LITERAL_STRING("&smart.playlist.is"));
57  NS_ENSURE_TRUE(propOp, NS_ERROR_OUT_OF_MEMORY);
58  rv = mOperators.AppendObject(propOp);
59  NS_ENSURE_SUCCESS(rv, rv);
60 
61  rv = sbPropertyInfo::GetOPERATOR_NOTEQUALS(op);
62  NS_ENSURE_SUCCESS(rv, rv);
63  propOp = new sbPropertyOperator(op,
64  NS_LITERAL_STRING("&smart.playlist.isnot"));
65  NS_ENSURE_TRUE(propOp, NS_ERROR_OUT_OF_MEMORY);
66  rv = mOperators.AppendObject(propOp);
67  NS_ENSURE_SUCCESS(rv, rv);
68 
69  return NS_OK;
70 }
71 
return NS_OK
virtual nsresult Init()
NS_IMPL_ISUPPORTS_INHERITED0(sbDummyPlaylistPropertyInfo, sbDummyPropertyInfo)
NS_DECL_ISUPPORTS_INHERITED sbDummyPlaylistPropertyInfo()
NS_IMETHOD SetType(const nsAString &aType)
nsCOMArray< sbIPropertyOperator > mOperators