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