gloox  1.1-svn
jingledtmf.h
1 /*
2  Copyright (c) 2009 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 JINGLEDTMF_H__
15 #define JINGLEDTMF_H__
16 
17 #include "jingleplugin.h"
18 #include "macros.h"
19 
20 #include <string>
21 
22 namespace gloox
23 {
24 
25  class Tag;
26 
27  namespace Jingle
28  {
29 
36  class GLOOX_API DTMF : public Plugin
37  {
38  public:
46  DTMF( const std::string& code, int volume, int duration = 100 );
47 
52  DTMF( const Tag* tag );
53 
57  virtual ~DTMF() {}
58 
63  const std::string& code() const { return m_code; }
64 
69  int volume() const { return m_volume; }
70 
75  int duration() const { return m_duration; }
76 
77  // reimplemented from Plugin
78  virtual const std::string& filterString() const;
79 
80  // reimplemented from Plugin
81  virtual Tag* tag() const;
82 
83  // reimplemented from Plugin
84  virtual DTMF* clone() const
85  {
86  return new DTMF( *this );
87  }
88 
89  private:
90  std::string m_code;
91  int m_volume;
92  int m_duration;
93 
94  };
95 
96  }
97 
98 }
99 
100 #endif // JINGLEDTMF_H__