gloox  0.9.9.12
resource.h
1 /*
2  Copyright (c) 2004-2008 by Jakob Schroeter <js@camaya.net>
3  This file is part of the gloox library. http://camaya.net/gloox
4 
5  This software is distributed under a license. The full license
6  agreement can be found in the file LICENSE in this distribution.
7  This software may not be copied, modified, sold or distributed
8  other than expressed in the named license agreement.
9 
10  This software is distributed without any warranty.
11 */
12 
13 
14 #ifndef RESOURCE_H__
15 #define RESOURCE_H__
16 
17 #include <string>
18 
19 namespace gloox
20 {
21 
30  class GLOOX_API Resource
31  {
32 
33  friend class RosterItem;
34 
35  public:
42  Resource( int priority, const std::string& msg, Presence presence )
43  : m_priority( priority ), m_message( msg ), m_presence( presence ) {}
44 
48  virtual ~Resource() {}
49 
54  int priority() const { return m_priority; }
55 
60  const std::string& message() const { return m_message; }
61 
66  Presence presence() const { return m_presence; }
67 
68  private:
69  void setPriority( int priority ) { m_priority = priority; }
70  void setMessage( std::string message ) { m_message = message; }
71  void setStatus( Presence presence ) { m_presence = presence; }
72 
73  int m_priority;
74  std::string m_message;
75  std::string m_name;
76  Presence m_presence;
77 
78  };
79 
80 }
81 
82 #endif // RESOURCE_H__