sbMetadataModule.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 
32 #include <nsIGenericFactory.h>
33 #include "sbMetadataManager.h"
34 #include "sbMetadataChannel.h"
35 #include "sbFileMetadataService.h"
36 #include "prlog.h"
37 
38 NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(sbMetadataManager, sbMetadataManager::GetSingleton)
41 
42 static nsModuleComponentInfo components[] =
43 {
44  {
48  sbMetadataManagerConstructor
49  },
50 
51  {
55  sbMetadataChannelConstructor
56  },
57 
58  {
62  sbFileMetadataServiceConstructor
63  }
64 };
65 
66 // Set up logging
67 #if defined( PR_LOGGING )
68 PRLogModuleInfo *gMetadataLog;
69 PR_STATIC_CALLBACK(nsresult)
70 InitMetadata(nsIModule *self)
71 {
72  gMetadataLog = PR_NewLogModule("metadata");
73  return NS_OK;
74 }
75 #else
76 #define InitMetadata nsnull
77 #endif
78 
80 DestroyModule(nsIModule* self)
81 {
82  sbMetadataManager::DestroySingleton();
83 }
84 
85 NS_IMPL_NSGETMODULE_WITH_CTOR_DTOR(SongbirdMetadataComponent,
86  components,
89 
#define SONGBIRD_METADATAMANAGER_CONTRACTID
#define SONGBIRD_METADATACHANNEL_CONTRACTID
return NS_OK
#define SONGBIRD_METADATACHANNEL_CID
#define SONGBIRD_METADATAMANAGER_CLASSNAME
PR_STATIC_CALLBACK(PRBool) FindElementCallback(void *aElement
#define SONGBIRD_FILEMETADATASERVICE_CLASSNAME
#define SONGBIRD_FILEMETADATASERVICE_CID
static nsModuleComponentInfo components[]
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(sbMockDeviceFirmwareHandler, Init)
#define SONGBIRD_FILEMETADATASERVICE_CONTRACTID
#define SONGBIRD_METADATACHANNEL_CLASSNAME
function Init()
Manages reading and writing metadata to and from sbIMediaItem objects and media files.
var self
#define SONGBIRD_METADATAMANAGER_CID
DestroyModule(nsIModule *self)
#define InitMetadata
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(sbTranscodeManager, sbTranscodeManager::GetSingleton) NS_GENERIC_FACTORY_CONSTRUCTOR(sbTranscodeAlbumArt)
NS_GENERIC_FACTORY_CONSTRUCTOR(sbMediaSniffer)
Coordinates reading and writing of media file metadata.