resource.h

00001 /*
00002   Copyright (c) 2004-2008 by Jakob Schroeter <js@camaya.net>
00003   This file is part of the gloox library. http://camaya.net/gloox
00004 
00005   This software is distributed under a license. The full license
00006   agreement can be found in the file LICENSE in this distribution.
00007   This software may not be copied, modified, sold or distributed
00008   other than expressed in the named license agreement.
00009 
00010   This software is distributed without any warranty.
00011 */
00012 
00013 
00014 #ifndef RESOURCE_H__
00015 #define RESOURCE_H__
00016 
00017 #include <string>
00018 
00019 namespace gloox
00020 {
00021 
00030   class GLOOX_API Resource
00031   {
00032 
00033     friend class RosterItem;
00034 
00035     public:
00042       Resource( int priority, const std::string& msg, Presence presence )
00043         : m_priority( priority ), m_message( msg ), m_presence( presence ) {}
00044 
00048       virtual ~Resource() {}
00049 
00054       int priority() const { return m_priority; }
00055 
00060       const std::string& message() const { return m_message; }
00061 
00066       Presence presence() const { return m_presence; }
00067 
00068     private:
00069       void setPriority( int priority ) { m_priority = priority; }
00070       void setMessage( std::string message ) { m_message = message; }
00071       void setStatus( Presence presence ) { m_presence = presence; }
00072 
00073       int m_priority;
00074       std::string m_message;
00075       std::string m_name;
00076       Presence m_presence;
00077 
00078   };
00079 
00080 }
00081 
00082 #endif // RESOURCE_H__

Generated on Fri Oct 10 15:26:11 2008 for gloox by  doxygen 1.5.6