sbRemoteSiteMediaList.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 <sbILibraryResource.h>
28 
29 #include "sbRemotePlayer.h"
30 #include "sbRemoteSiteMediaList.h"
32 #include <sbClassInfoUtils.h>
33 #include <prlog.h>
34 
35 /*
36  * To log this module, set the following environment variable:
37  * NSPR_LOG_MODULES=sbRemoteMediaList:5
38  * LOG_LIST defined in sbRemoteMediaListBase.h/.cpp
39  */
40 #undef LOG
41 #define LOG(args) LOG_LIST(args)
42 
43 const static char* sPublicWProperties[] =
44 {
45  // sbIMediaList
46  "site:name"
47 };
48 
49 const static char* sPublicRProperties[] =
50 {
51  // sbILibraryResource
52  "site:guid",
53  "site:created",
54  "site:updated",
55 
56  // sbIMediaItem
57  // omitting library since we don't want the user to get back
58  // to the original library
59  "site:isMutable",
60  "site:mediaCreated",
61  "site:mediaUpdated",
62  "site:contentLength",
63  "site:contentType",
64 
65  // sbIMediaList
66  "site:name",
67  "site:type",
68  "site:length",
69  "site:isEmpty",
70 
71  // sbIRemoteMediaList
72  "site:selection",
73 
74  // nsIClassInfo
75  "classinfo:classDescription",
76  "classinfo:contractID",
77  "classinfo:classID",
78  "classinfo:implementationLanguage",
79  "classinfo:flags"
80 };
81 
82 const static char* sPublicMethods[] =
83 {
84  // sbILibraryResource
85  "site:getProperty",
86  "site:setProperty",
87  "site:equals",
88 
89  // sbIMediaItem
90  // none applicable
91 
92  // sbIMediaList
93  // omitting createView, listeners, and batching
94  "site:getItemByGuid",
95  "site:getItemByIndex",
96  "site:enumerateAllItems",
97  "site:enumerateItemsByProperty",
98  "site:indexOf",
99  "site:lastIndexOf",
100  "site:contains",
101  "site:add",
102  "site:addAll",
103  "site:remove",
104  "site:removeByIndex",
105  "site:clear",
106  "site:getDistinctValuesForProperty",
107 
108  // sbIRemoteMediaList
109  "internal:getView"
110 };
111 
114  nsIClassInfo )
115 
116 NS_IMPL_CI_INTERFACE_GETTER7( sbRemoteSiteMediaList,
120  sbIMediaList,
121  sbIMediaItem,
124 
125 SB_IMPL_CLASSINFO_INTERFACES_ONLY(sbRemoteSiteMediaList)
126 
127 SB_IMPL_SECURITYCHECKEDCOMP_INIT_LIBRES(sbRemoteSiteMediaList,
129  (mRemotePlayer, mMediaList) )
130 
131 sbRemoteSiteMediaList::sbRemoteSiteMediaList( sbRemotePlayer* aRemotePlayer,
132  sbIMediaList* aMediaList,
133  sbIMediaListView* aMediaListView ) :
134  sbRemoteMediaList( aRemotePlayer, aMediaList, aMediaListView )
135 {
136  LOG_LIST(("sbRemoteSiteMediaList::sbRemoteSiteMediaList()"));
137 }
138 
140 {
141  LOG_LIST(("sbRemoteSiteMediaList::~sbRemoteSiteMediaList()"));
142 }
143 
NS_IMPL_ISUPPORTS_INHERITED1(sbRemoteSiteMediaList, sbRemoteMediaList, nsIClassInfo) NS_IMPL_CI_INTERFACE_GETTER7(sbRemoteSiteMediaList
A brief description of the contents of this interface.
nsISecurityCheckedComponent
A distinct view on a given media list.
#define LOG_LIST(args)
static const char * sPublicRProperties[]
A marker interface for objects that aggregate the security mixin.
General interface to data resources.
static const char * sPublicMethods[]
static const char * sPublicWProperties[]
#define SB_IMPL_SECURITYCHECKEDCOMP_INIT_LIBRES(_class, _libres, _libresArgs)
Definition: sbRemoteAPI.h:94
Interface that defines a single item of media in the system.
#define SB_IMPL_CLASSINFO_INTERFACES_ONLY(_class)
An interface to control a media list from remote web pages.