sbRemoteWrappingStringEnumerator.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 <sbClassInfoUtils.h>
28 #include "sbRemoteLibrary.h"
30 
31 const static char* sPublicWProperties[] =
32 {
33  // Need this empty string to make VC happy
34  ""
35 };
36 
37 const static char* sPublicRProperties[] =
38 {
39  // Need this empty string to make VC happy
40  ""
41 };
42 
43 const static char* sPublicMethods[] =
44 {
45  // helper for helper classes like this
46  // nsIStringEnumerator
47  "helper:hasMore",
48  "helper:getNext"
49 };
50 
56 
61 
62 SB_IMPL_CLASSINFO_INTERFACES_ONLY(sbRemoteWrappingStringEnumerator)
63 
64 SB_IMPL_SECURITYCHECKEDCOMP_INIT(sbRemoteWrappingStringEnumerator)
65 
66 // ---------------------------------------------------------------------------
67 //
68 // sbISecurityAggregator
69 //
70 // ---------------------------------------------------------------------------
71 
72 NS_IMETHODIMP
73 sbRemoteWrappingStringEnumerator::GetRemotePlayer(sbIRemotePlayer * *aRemotePlayer)
74 {
75  NS_ENSURE_STATE(mRemotePlayer);
76  NS_ENSURE_ARG_POINTER(aRemotePlayer);
77 
78  nsresult rv;
79  *aRemotePlayer = nsnull;
80 
81  nsCOMPtr<sbIRemotePlayer> remotePlayer;
82 
83  rv = mRemotePlayer->QueryInterface( NS_GET_IID( sbIRemotePlayer ), getter_AddRefs( remotePlayer ) );
84  NS_ENSURE_SUCCESS( rv, rv );
85 
86  remotePlayer.swap( *aRemotePlayer );
87 
88  return NS_OK;
89 }
#define SB_IMPL_SECURITYCHECKEDCOMP_INIT(_class)
Definition: sbRemoteAPI.h:82
return NS_OK
NS_IMPL_ISUPPORTS4(sbRemoteWrappingStringEnumerator, nsIClassInfo, nsISecurityCheckedComponent, sbISecurityAggregator, nsIStringEnumerator) NS_IMPL_CI_INTERFACE_GETTER3(sbRemoteWrappingStringEnumerator
NS_IMPL_CI_INTERFACE_GETTER3(sbMediaListEnumeratorWrapper, sbIMediaListEnumeratorWrapper, nsISimpleEnumerator, nsIClassInfo)
This interface is a composition of many of our other interfaces with the goal of exposing a more web-...
static const char * sPublicRProperties[]
A marker interface for objects that aggregate the security mixin.
static const char * sPublicWProperties[]
static const char * sPublicMethods[]
#define SB_IMPL_CLASSINFO_INTERFACES_ONLY(_class)