00001 /* 00002 * Copyright (C) 2009, Edmundo Albuquerque de Souza e Silva. 00003 * 00004 * This file may be distributed under the terms of the Q Public License 00005 * as defined by Trolltech AS of Norway and appearing in the file 00006 * LICENSE.QPL included in the packaging of this file. 00007 * 00008 * THIS FILE IS PROVIDED AS IS WITH NO WARRANTY OF ANY KIND, INCLUDING 00009 * THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00010 * PURPOSE. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, 00011 * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING 00012 * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 00013 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 00014 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 00015 * 00016 */ 00017 00018 #ifndef __RIOMMTOPICS_H__ 00019 #define __RIOMMTOPICS_H__ 00020 00021 #include <qlistview.h> 00022 #include <qptrstack.h> 00023 #include <qdom.h> 00024 #include <qobject.h> 00025 #include <iostream> 00026 00027 #include "RioInterfaceTypes.h" 00028 #include "RioInterface.h" 00029 #include "RioMMInterface.h" 00030 #include "RioMMObject.h" 00031 #include "RioFile.h" 00032 00033 //A funcao xmlValidateDocument() utilizada no metodo GetTopics() trabalha 00034 //com um parametro do tipo xmlValidCtxt que, por sua vez, tem dois membros 00035 //que sao ponteiros pra funcoes (do tipo fprintf). Nao querendo que nada 00036 //fosse feito neste ponto, surgiu a necessidade de criar uma funcao "morta", no 00037 //caso a donothing(). 00038 void donothing(); 00039 00040 class CRioMMTopics : public CRioMMObject 00041 { 00042 00043 private: 00044 RioFile *TopicsFile; /* class that will download the toppics file */ 00045 QDomDocument *domTree; 00046 RioMMInterface *rio; 00047 00048 public: 00049 CRioMMTopics( char*, unsigned int, RioBlock, struct timeval, RioMMInterface* ); 00050 ~CRioMMTopics(); 00051 00052 int GetTopics( RioAccess, CRioStream* ); 00053 00054 void Play(); 00055 void Stop(); 00056 void Pause(); 00057 void FastRewind(); 00058 void FastForward(); 00059 void GoTo(unsigned int); 00060 int init(); 00061 RioBlock GetCurrentPosition(); 00062 RioBlock GetTotalPositions(); 00063 00064 void setRio( RioMMInterface* ); 00065 RioMMInterface *getRio(); 00066 00067 void setDomTree( QDomDocument* ); 00068 QDomDocument *getDomTree(); 00069 00070 }; 00071 #endif