SearchResult Class Reference

#include <search.h>

List of all members.


Detailed Description

Search result encapsualtes a single result from a search.

It is-a MetaData, and inherits all the properties of MetaData object. This provides maximum extedability in search results, since they can contain ALL kinds of meta data supported by the MetaData and member structures.

Definition at line 37 of file search.h.


Public Member Functions

 SearchResult (const std::string &name, uint64_t fileSize)
 Copyright (C) 2004-2005 Alo Sarv <madcat_@users.sourceforge.net>.
virtual ~SearchResult ()
virtual void download ()=0
 Download this search result.
Accessors
void addSources (uint32_t amount)
void addComplete (uint32_t amount)
uint32_t getSources () const
uint32_t getComplete () const
std::string getName () const
uint64_t getSize () const
boost::shared_ptr< AudioMetaData > & getAmd ()
boost::shared_ptr< VideoMetaData > & getVmd ()
boost::shared_ptr< ArchiveMetaData > & getArmd ()
boost::shared_ptr< ImageMetaData > & getImd ()
boost::shared_ptr< StreamData > & getStrd ()

Private Member Functions

 SearchResult ()
 Forbidden.
 SearchResult (const SearchResult &)
 Forbidden.
SearchResultoperator= (const SearchResult &)
 Forbidden.

Private Attributes

std::string m_fileName
 Name of the file.
uint64_t m_fileSize
 Size of the file.
uint32_t m_sources
 Number of sources.
uint32_t m_complete
 Number of complete sources.
Various MetaData received from search results
boost::shared_ptr< AudioMetaDatam_amd
boost::shared_ptr< VideoMetaDatam_vmd
boost::shared_ptr< ArchiveMetaDatam_armd
boost::shared_ptr< ImageMetaDatam_imd
boost::shared_ptr< StreamDatam_strd

Constructor & Destructor Documentation

SearchResult::SearchResult const std::string &  filename,
uint64_t  fileSize
 

Copyright (C) 2004-2005 Alo Sarv <madcat_@users.sourceforge.net>.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Definition at line 26 of file search.cpp.

SearchResult::~SearchResult  )  [virtual]
 

Definition at line 28 of file search.cpp.

SearchResult::SearchResult  )  [private]
 

Forbidden.

SearchResult::SearchResult const SearchResult  )  [private]
 

Forbidden.


Member Function Documentation

void SearchResult::addComplete uint32_t  amount  )  [inline]
 

Definition at line 52 of file search.h.

void SearchResult::addSources uint32_t  amount  )  [inline]
 

Definition at line 51 of file search.h.

virtual void SearchResult::download  )  [pure virtual]
 

Download this search result.

Must be overridden by derived classes, e.g. the module providing this search result, since only that module can safely start the download.

boost::shared_ptr<AudioMetaData>& SearchResult::getAmd  )  [inline]
 

Definition at line 57 of file search.h.

boost::shared_ptr<ArchiveMetaData>& SearchResult::getArmd  )  [inline]
 

Definition at line 59 of file search.h.

uint32_t SearchResult::getComplete  )  const [inline]
 

Definition at line 54 of file search.h.

boost::shared_ptr<ImageMetaData>& SearchResult::getImd  )  [inline]
 

Definition at line 60 of file search.h.

std::string SearchResult::getName  )  const [inline]
 

Definition at line 55 of file search.h.

uint64_t SearchResult::getSize  )  const [inline]
 

Definition at line 56 of file search.h.

uint32_t SearchResult::getSources  )  const [inline]
 

Definition at line 53 of file search.h.

boost::shared_ptr<StreamData>& SearchResult::getStrd  )  [inline]
 

Definition at line 61 of file search.h.

boost::shared_ptr<VideoMetaData>& SearchResult::getVmd  )  [inline]
 

Definition at line 58 of file search.h.

SearchResult& SearchResult::operator= const SearchResult  )  [private]
 

Forbidden.


Member Data Documentation

boost::shared_ptr<AudioMetaData> SearchResult::m_amd [private]
 

Definition at line 75 of file search.h.

boost::shared_ptr<ArchiveMetaData> SearchResult::m_armd [private]
 

Definition at line 77 of file search.h.

uint32_t SearchResult::m_complete [private]
 

Number of complete sources.

Definition at line 71 of file search.h.

std::string SearchResult::m_fileName [private]
 

Name of the file.

Definition at line 68 of file search.h.

uint64_t SearchResult::m_fileSize [private]
 

Size of the file.

Definition at line 69 of file search.h.

boost::shared_ptr<ImageMetaData> SearchResult::m_imd [private]
 

Definition at line 78 of file search.h.

uint32_t SearchResult::m_sources [private]
 

Number of sources.

Definition at line 70 of file search.h.

boost::shared_ptr<StreamData> SearchResult::m_strd [private]
 

Definition at line 79 of file search.h.

boost::shared_ptr<VideoMetaData> SearchResult::m_vmd [private]
 

Definition at line 76 of file search.h.


The documentation for this class was generated from the following files: