sbMetadataJobItem.h
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 
32 #ifndef SBMETADATAJOBITEM_H_
33 #define SBMETADATAJOBITEM_H_
34 
35 // INCLUDES ===================================================================
36 #include <nspr.h>
37 #include <nscore.h>
38 #include <nsISupports.h>
39 #include <nsCOMPtr.h>
40 #include <nsAutoPtr.h>
41 #include <sbIMetadataHandler.h>
42 #include <sbIPropertyArray.h>
43 #include "sbMetadataJob.h"
44 
45 // CLASSES ====================================================================
46 
47 class sbIMediaItem;
48 
62 {
63 public:
64 
66 
68  sbIMediaItem* aMediaItem,
69  nsStringArray* aRequiredProperties,
70  sbMetadataJob* aOwningJob);
71  virtual ~sbMetadataJobItem();
72 
73  nsresult GetHandler(sbIMetadataHandler** aHandler);
74  nsresult SetHandler(sbIMetadataHandler* aHandler);
75  nsresult GetMediaItem(sbIMediaItem** aMediaItem);
76  nsresult GetOwningJob(sbMetadataJob** aJob);
77  nsresult GetJobType(sbMetadataJob::JobType* aJobType);
78  nsresult GetProcessingStarted(PRBool* aProcessingStarted);
79  nsresult SetProcessingStarted(PRBool aProcessingStarted);
80  nsresult GetProcessed(PRBool* aProcessed);
81  nsresult SetProcessed(PRBool aProcessed);
82  nsresult GetURL(nsACString& aURL);
83  nsresult SetURL(const nsACString& aURL);
84  nsresult GetProperties(sbIMutablePropertyArray** aPropertyArray);
85 
86 protected:
88  nsCOMPtr<sbIMediaItem> mMediaItem;
89  nsCOMPtr<sbIMetadataHandler> mHandler;
90  nsRefPtr<sbMetadataJob> mOwningJob;
91 
92  nsCString mURL;
93  nsStringArray* mPropertyList;
94 
95  // Flag to indicate that a handler was started for this item
97 
98  // Flag to indicate that a handler was run for this item
100 };
101 
102 #endif // SBMETADATAJOBITEM_H_
nsresult SetProcessingStarted(PRBool aProcessingStarted)
sbMetadataJob::JobType mJobType
nsresult SetURL(const nsACString &aURL)
nsCOMPtr< sbIMediaItem > mMediaItem
nsresult GetJobType(sbMetadataJob::JobType *aJobType)
nsresult GetURL(nsACString &aURL)
NS_DECL_ISUPPORTS sbMetadataJobItem(sbMetadataJob::JobType aJobType, sbIMediaItem *aMediaItem, nsStringArray *aRequiredProperties, sbMetadataJob *aOwningJob)
An interface to carry around arrays of nsIProperty instances Note that implementations of the interfa...
A container of sbMetadataJobItems.
nsresult GetProcessingStarted(PRBool *aProcessingStarted)
nsresult GetProcessed(PRBool *aProcessed)
nsresult GetMediaItem(sbIMediaItem **aMediaItem)
nsStringArray * mPropertyList
An object capable of manipulating the metadata tags for a media file.
nsresult GetOwningJob(sbMetadataJob **aJob)
nsresult SetHandler(sbIMetadataHandler *aHandler)
Interface that defines a single item of media in the system.
nsresult SetProcessed(PRBool aProcessed)
nsresult GetProperties(sbIMutablePropertyArray **aPropertyArray)
nsCOMPtr< sbIMetadataHandler > mHandler
nsRefPtr< sbMetadataJob > mOwningJob
nsresult GetHandler(sbIMetadataHandler **aHandler)