RdsContainer.h

Go to the documentation of this file.
00001 /*------------------------------------------------------------------------------
00002  
00003     Copyright (c) 2004 Media Development Loan Fund
00004   
00005     This file is part of the Campcaster project.
00006     https://www.campware.org/
00007     To report bugs, send an e-mail to [email protected]
00008   
00009     Campcaster is free software; you can redistribute it and/or modify
00010     it under the terms of the GNU General Public License as published by
00011     the Free Software Foundation; either version 2 of the License, or
00012     (at your option) any later version.
00013    
00014     Campcaster is distributed in the hope that it will be useful,
00015     but WITHOUT ANY WARRANTY; without even the implied warranty of
00016     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017     GNU General Public License for more details.
00018   
00019     You should have received a copy of the GNU General Public License
00020     along with Campcaster; if not, write to the Free Software
00021     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022   
00023   
00024     Author   : $Author: fgerlits $
00025     Version  : $Revision: 3185 $
00026     Location : $URL: svn://code.campware.org/campcaster/trunk/campcaster/src/modules/core/include/LiveSupport/Core/RdsContainer.h $
00027  
00028 ------------------------------------------------------------------------------*/
00029 #ifndef LiveSupport_Core_RdsContainer_h
00030  #define LiveSupport_Core_RdsContainer_h
00031  
00032 #ifndef __cplusplus
00033  #error This is a C++ include file
00034  #endif
00035  
00036 
00037 /* ============================================================ include files */
00038 
00039 #ifdef HAVE_CONFIG_H
00040  #include "configure.h"
00041 #endif
00042  
00043 #include <map>
00044 
00045 #include "LiveSupport/Core/Ptr.h"
00046 #include "LiveSupport/Core/Configurable.h"
00047 
00048 #include "LiveSupport/Core/RdsItem.h"
00049 
00050 
00051 namespace LiveSupport {
00052 namespace Core {
00053 
00054 using namespace LiveSupport::Core;
00055 
00056 /* ================================================================ constants */
00057 
00058 
00059 /* =================================================================== macros */
00060 
00061 
00062 /* =============================================================== data types */
00063 
00095 class RdsContainer : public Configurable
00096 {
00097     private:
00102         static const std::string    configElementName;
00103 
00107         typedef std::vector<Ptr<RdsItem>::Ref>
00108                                     RdsItemListType;
00109 
00113         RdsItemListType             rdsItemList;
00114 
00118         Ptr<xmlpp::Document>::Ref   xmlDocument;
00119         
00123         bool                        touched;
00124 
00125 
00126     public:
00130         RdsContainer()                                 throw ()
00131             : touched(false)
00132         {
00133         }
00134 
00138         virtual
00139         ~RdsContainer(void)                            throw ()
00140         {
00141         }
00142 
00149         static const std::string
00150         getConfigElementName(void)                              throw ()
00151         {
00152             return configElementName;
00153         }
00154 
00162         virtual void
00163         configure(const xmlpp::Element &element)
00164                                                 throw (std::invalid_argument);
00165 
00176         void
00177         setRdsOptions(Ptr<const Glib::ustring>::Ref  key,
00178                       Ptr<const Glib::ustring>::Ref  value,
00179                       bool                           enabled)       throw ();
00180         
00190         Ptr<const Glib::ustring>::Ref
00191         getRdsValue(Ptr<const Glib::ustring>::Ref  key)
00192                                                 throw (std::invalid_argument);
00193 
00201         bool
00202         getRdsEnabled(Ptr<const Glib::ustring>::Ref  key)
00203                                                 throw (std::invalid_argument);
00204 
00210         Ptr<Glib::ustring>::Ref
00211         toString(void)                                              throw ();
00212 
00219         const xmlpp::Element *
00220         toXmlElement(void)                                          throw ();
00221 
00229         bool
00230         isTouched(void)                                             throw ()
00231         {
00232             return touched;
00233         }
00234 };
00235 
00236 
00237 /* ================================================= external data structures */
00238 
00239 
00240 /* ====================================================== function prototypes */
00241 
00242 
00243 } // namespace Core
00244 } // namespace LiveSupport
00245 
00246 #endif // LiveSupport_Core_RdsContainer_h
00247  

Generated on Thu Sep 20 02:00:29 2007 for Campcaster by  1.4.7