libxspf  1.2.0
XspfDateTime.h
Go to the documentation of this file.
00001 /*
00002  * libxspf - XSPF playlist handling library
00003  *
00004  * Copyright (C) 2006-2008, Sebastian Pipping / Xiph.Org Foundation
00005  * All rights reserved.
00006  *
00007  * Redistribution  and use in source and binary forms, with or without
00008  * modification,  are permitted provided that the following conditions
00009  * are met:
00010  *
00011  *     * Redistributions   of  source  code  must  retain  the   above
00012  *       copyright  notice, this list of conditions and the  following
00013  *       disclaimer.
00014  *
00015  *     * Redistributions  in  binary  form must  reproduce  the  above
00016  *       copyright  notice, this list of conditions and the  following
00017  *       disclaimer   in  the  documentation  and/or  other  materials
00018  *       provided with the distribution.
00019  *
00020  *     * Neither  the name of the Xiph.Org Foundation nor the names of
00021  *       its  contributors may be used to endorse or promote  products
00022  *       derived  from  this software without specific  prior  written
00023  *       permission.
00024  *
00025  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00026  * "AS  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT  NOT
00027  * LIMITED  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND  FITNESS
00028  * FOR  A  PARTICULAR  PURPOSE ARE DISCLAIMED. IN NO EVENT  SHALL  THE
00029  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00030  * INCIDENTAL,    SPECIAL,   EXEMPLARY,   OR   CONSEQUENTIAL   DAMAGES
00031  * (INCLUDING,  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00032  * SERVICES;  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00033  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
00034  * STRICT  LIABILITY,  OR  TORT (INCLUDING  NEGLIGENCE  OR  OTHERWISE)
00035  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
00036  * OF THE POSSIBILITY OF SUCH DAMAGE.
00037  *
00038  * Sebastian Pipping, sping@xiph.org
00039  */
00040 
00046 #ifndef XSPF_DATE_TIME_H
00047 #define XSPF_DATE_TIME_H
00048 
00049 #include "XspfDefines.h"
00050 
00051 
00052 namespace Xspf {
00053 
00054 
00055 class XspfDateTimePrivate;
00056 
00057 
00062 class XspfDateTime {
00063 
00064 private:
00066         XspfDateTimePrivate * const d; 
00067 
00068 
00069 public:
00084         XspfDateTime(int year, int month, int day, int hour, int minutes,
00085                         int seconds, int distHours, int distMinutes);
00086 
00090         XspfDateTime();
00091 
00097         XspfDateTime(XspfDateTime const & source);
00098 
00104         XspfDateTime & operator=(XspfDateTime const & source);
00105 
00109         ~XspfDateTime();
00110 
00116         XspfDateTime * clone() const;
00117 
00123         int getYear() const;
00124 
00130         int getMonth() const;
00131 
00137         int getDay() const;
00138 
00144         int getHour() const;
00145 
00151         int getMinutes() const;
00152 
00158         int getSeconds() const;
00159 
00165         int getDistHours() const;
00166 
00172         int getDistMinutes() const;
00173 
00179         void setYear(int year);
00180 
00186         void setMonth(int month);
00187 
00193         void setDay(int day);
00194 
00200         void setHour(int hour);
00201 
00207         void setMinutes(int minutes);
00208 
00214         void setSeconds(int seconds);
00215 
00221         void setDistHours(int distHours);
00222 
00228         void setDistMinutes(int distMinutes);
00229 
00238         static bool extractDateTime(XML_Char const * text,
00239                         XspfDateTime * output);
00240 
00241 };
00242 
00243 
00244 } // namespace Xspf
00245 
00246 #endif // XSPF_DATE_TIME_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines