libxspf  1.2.0
XspfExtensionReaderFactory.h
Go to the documentation of this file.
1 /*
2  * libxspf - XSPF playlist handling library
3  *
4  * Copyright (C) 2006-2008, Sebastian Pipping / Xiph.Org Foundation
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * * Redistributions of source code must retain the above
12  * copyright notice, this list of conditions and the following
13  * disclaimer.
14  *
15  * * Redistributions in binary form must reproduce the above
16  * copyright notice, this list of conditions and the following
17  * disclaimer in the documentation and/or other materials
18  * provided with the distribution.
19  *
20  * * Neither the name of the Xiph.Org Foundation nor the names of
21  * its contributors may be used to endorse or promote products
22  * derived from this software without specific prior written
23  * permission.
24  *
25  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
28  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
30  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
31  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
32  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
34  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
36  * OF THE POSSIBILITY OF SUCH DAMAGE.
37  *
38  * Sebastian Pipping, sping@xiph.org
39  */
40 
46 #ifndef XSPF_EXTENSION_READER_FACTROY_H
47 #define XSPF_EXTENSION_READER_FACTROY_H
48 
49 
50 #include "XspfDefines.h"
51 #include "XspfToolbox.h"
52 #include <map>
53 
54 namespace Xspf {
55 
56 
57 class XspfExtensionReader;
58 class XspfReader;
59 class XspfExtensionReaderFactoryPrivate;
60 
61 
67 
68 private:
70  XspfExtensionReaderFactoryPrivate * const d;
71 
73 public:
78 
85  & source);
86 
93  XspfExtensionReaderFactory const & source);
94 
100 
111  XML_Char const * triggerUri);
112 
123  XML_Char const * triggerUri);
124 
133  XML_Char const * triggerUri);
134 
143  XML_Char const * triggerUri);
144 
154  XML_Char const * applicationUri, XspfReader * reader);
155 
165  XML_Char const * applicationUri, XspfReader * reader);
166 
167 private:
179  void registerReader(std::map<XML_Char const *,
180  XspfExtensionReader const *,
181  Toolbox::XspfStringCompare> & container,
182  XspfExtensionReader const * & catchAll,
183  XspfExtensionReader const * example,
184  XML_Char const * triggerUri);
185 
193  void unregisterReader(std::map<XML_Char const *,
194  XspfExtensionReader const *,
195  Toolbox::XspfStringCompare> & container,
196  XspfExtensionReader const * & catchAll,
197  XML_Char const * triggerUri);
198 
209  XspfExtensionReader * newReader(std::map<XML_Char const *,
210  XspfExtensionReader const *,
211  Toolbox::XspfStringCompare> & container,
212  XspfExtensionReader const * catchAll,
213  XML_Char const * applicationUri,
214  XspfReader * reader);
215 
216 };
217 
218 
219 }
220 
221 #endif // XSPF_EXTENSION_READER_FACTROY_H
void unregisterTrackExtensionReader(XML_Char const *triggerUri)
XspfExtensionReader * newPlaylistExtensionReader(XML_Char const *applicationUri, XspfReader *reader)
XspfExtensionReader * newTrackExtensionReader(XML_Char const *applicationUri, XspfReader *reader)
XspfExtensionReaderFactory & operator=(XspfExtensionReaderFactory const &source)
void unregisterPlaylistExtensionReader(XML_Char const *triggerUri)
void registerPlaylistExtensionReader(XspfExtensionReader const *example, XML_Char const *triggerUri)
void registerTrackExtensionReader(XspfExtensionReader const *example, XML_Char const *triggerUri)