00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00046 #ifndef XSPF_PROPS_H
00047 #define XSPF_PROPS_H
00048
00049
00050 #include "XspfData.h"
00051
00052 namespace Xspf {
00053
00054
00055 class XspfPropsPrivate;
00056 class XspfDateTime;
00057
00058
00064 class XspfProps : public XspfData {
00065
00066 friend class XspfPropsPrivate;
00067
00068 private:
00070 XspfPropsPrivate * const d;
00071
00072
00073 public:
00077 XspfProps();
00078
00084 XspfProps(XspfProps const & source);
00085
00091 XspfProps & operator=(XspfProps const & source);
00092
00097 ~XspfProps();
00098
00108 void giveIdentifier(XML_Char const * identifier, bool copy);
00109
00119 void giveLicense(XML_Char const * license, bool copy);
00120
00130 void giveLocation(XML_Char const * location, bool copy);
00131
00138 void giveAppendAttributionIdentifier(XML_Char const * identifier, bool copy);
00139
00146 void giveAppendAttributionLocation(XML_Char const * location, bool copy);
00147
00157 void giveDate(XspfDateTime const * date, bool copy);
00158
00166 void lendIdentifier(XML_Char const * identifier);
00167
00175 void lendLicense(XML_Char const * license);
00176
00184 void lendLocation(XML_Char const * location);
00185
00193 void lendAppendAttributionIdentifier(XML_Char const * identifier);
00194
00202 void lendAppendAttributionLocation(XML_Char const * location);
00203
00211 void lendDate(XspfDateTime const * date);
00212
00218 void setVersion(int version);
00219
00225 XML_Char * stealLicense();
00226
00232 XML_Char * stealLocation();
00233
00239 XML_Char * stealIdentifier();
00240
00249 std::pair<bool, XML_Char *> * stealFirstAttribution();
00250
00256 XspfDateTime * stealDate();
00257
00263 XML_Char const * getLicense() const;
00264
00270 XML_Char const * getLocation() const;
00271
00277 XML_Char const * getIdentifier() const;
00278
00287 std::pair<bool, XML_Char const *> * getAttribution(int index) const;
00288
00294 int getAttributionCount() const;
00295
00301 XspfDateTime const * getDate() const;
00302
00308 int getVersion() const;
00309
00310 private:
00319 static void appendHelper(std::deque<std::pair<bool, std::pair<XML_Char const *, bool> *> *> * & container,
00320 XML_Char const * value, bool ownership, bool isLocation);
00321
00332 static std::pair<bool, XML_Char const *> * getHelper(
00333 std::deque<std::pair<bool, std::pair<XML_Char const *, bool> *> *> * & container, int index);
00334
00344 static XspfDateTime * stealHelper(XspfDateTime const * & dateTime,
00345 bool own);
00346
00353 static std::pair<bool, XML_Char *> * stealFirstHelper(
00354 std::deque<std::pair<bool, std::pair<XML_Char const *, bool> *> *> * & container);
00355
00368 static void deleteNewAndCopy(XspfDateTime const * & dest, bool & destOwnership,
00369 XspfDateTime const * source, bool sourceCopy);
00370
00371 };
00372
00373
00374 }
00375
00376 #endif // XSPF_PROPS_H