sbTemporaryMediaItem.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set sw=2 :miv */
3 /*
4  *=BEGIN SONGBIRD GPL
5  *
6  * This file is part of the Songbird web player.
7  *
8  * Copyright(c) 2005-2010 POTI, Inc.
9  * http://www.songbirdnest.com
10  *
11  * This file may be licensed under the terms of of the
12  * GNU General Public License Version 2 (the ``GPL'').
13  *
14  * Software distributed under the License is distributed
15  * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
16  * express or implied. See the GPL for the specific language
17  * governing rights and limitations.
18  *
19  * You should have received a copy of the GPL along with this
20  * program. If not, go to http://www.gnu.org/licenses/gpl.html
21  * or write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23  *
24  *=END SONGBIRD GPL
25  */
26 
27 #ifndef _SB_TEMPORARYMEDIAITEM_H_
28 #define _SB_TEMPORARYMEDIAITEM_H_
29 
30 //------------------------------------------------------------------------------
31 //------------------------------------------------------------------------------
32 //
33 // Temporary media item.
34 //
35 //------------------------------------------------------------------------------
36 //------------------------------------------------------------------------------
37 
43 //------------------------------------------------------------------------------
44 //
45 // Temporary media item imported services.
46 //
47 //------------------------------------------------------------------------------
48 
49 // Songbird imports.
50 #include <sbIMediaItem.h>
51 
52 // Mozilla imports.
53 #include <nsCOMPtr.h>
54 #include <nsStringGlue.h>
55 
56 
57 //------------------------------------------------------------------------------
58 //
59 // Temporary media item defs.
60 //
61 //------------------------------------------------------------------------------
62 
63 //
64 // Temporary media item component defs.
65 //
66 
67 #define SONGBIRD_TEMPORARYMEDIAITEM_CONTRACTID \
68  "@songbirdnest.com/Songbird/Library/TemporaryMediaItem;1"
69 #define SONGBIRD_TEMPORARYMEDIAITEM_CLASSNAME "sbTemporaryMediaItem"
70 #define SONGBIRD_TEMPORARYMEDIAITEM_CID \
71  /* {f1ea940e-1dd1-11b2-a9a6-cbcc44d9500d} */ \
72  { 0xf1ea940e, \
73  0x1dd1, \
74  0x11b2, \
75  { 0xa9, 0xa6, 0xcb, 0xcc, 0x44, 0xd9, 0x50, 0x0d } \
76  }
77 
78 
79 //------------------------------------------------------------------------------
80 //
81 // Temporary media item service classes.
82 //
83 //------------------------------------------------------------------------------
84 
90 {
91  //----------------------------------------------------------------------------
92  //
93  // Public interface.
94  //
95  //----------------------------------------------------------------------------
96 
97 public:
98 
99  //
100  // Inherited interfaces.
101  //
102 
104  NS_DECL_SBILIBRARYRESOURCE
105  NS_DECL_SBIMEDIAITEM
106 
107 
108  //
109  // Public services.
110  //
111 
116 
120  virtual ~sbTemporaryMediaItem();
121 
122 
123  //----------------------------------------------------------------------------
124  //
125  // Private interface.
126  //
127  //----------------------------------------------------------------------------
128 
129 private:
130 
131  //
132  // mContentSrc Media item content source.
133  // mContentType Media item content type.
134  //
135 
136  nsCOMPtr<nsIURI> mContentSrc;
137  nsString mContentType;
138 };
139 
140 
141 #endif /* _SB_TEMPORARYMEDIAITEM_H_ */
142 
143 
NS_DECL_ISUPPORTS NS_DECL_SBILIBRARYRESOURCE NS_DECL_SBIMEDIAITEM sbTemporaryMediaItem()
Interface that defines a single item of media in the system.