27 #include <sbILibrary.h>
28 #include <sbIPropertyManager.h>
29 #include <sbIRemotePlayer.h>
33 #include <nsServiceManagerUtils.h>
49 NS_ASSERTION( aRemotePlayer,
"Null remote player!" );
50 NS_ASSERTION( aMediaItem,
"Null media item!" );
52 LOG_RES((
"sbRemoteSiteLibraryResource::sbRemoteSiteLibraryResource()"));
56 LOG_RES((
"sbRemoteSiteLibraryResource::~sbRemoteSiteLibraryResource()"));
69 LOG_RES((
"sbRemoteSiteLibraryResource::GetProperty(%s)",
70 NS_LossyConvertUTF16toASCII(aID).
get() ));
83 rv =
mMediaItem->GetProperty( aID, contentURL );
84 NS_ENSURE_SUCCESS( rv, rv );
86 if ( StringBeginsWith( contentURL, NS_LITERAL_STRING(
"file:") ) ) {
87 LOG_RES((
"sbRemoteSiteLibraryResource::GetProperty() - "
88 "Disallowing access to 'file:' URI from contentURL property" ));
89 _retval.AssignLiteral(
"__BLOCKED__");
90 return NS_ERROR_FAILURE;
92 LOG_RES((
"sbRemoteSiteLibraryResource::GetProperty() - "
93 "Allowing access to non-file contentURL to site item/list/lib: %s",
94 NS_LossyConvertUTF16toASCII(contentURL).
get() ));
96 _retval.Assign(contentURL);
NS_IMETHOD GetProperty(const nsAString &aID, nsAString &_retval)
nsCOMPtr< sbIMediaItem > mMediaItem
NS_DECL_ISUPPORTS_INHERITED NS_IMETHOD GetProperty(const nsAString &aID, nsAString &_retval)
General interface to data resources.
NS_IMPL_ISUPPORTS1(sbRemoteSiteLibraryResource, sbILibraryResource) sbRemoteSiteLibraryResource
#define SB_PROPERTY_CONTENTURL
virtual ~sbRemoteSiteLibraryResource()