gloox 1.0.28
featureneg.h
1/*
2 Copyright (c) 2007-2023 by Jakob Schröter <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 FEATURENEG_H__
15#define FEATURENEG_H__
16
17#include "stanzaextension.h"
18
19#include <string>
20
21namespace gloox
22{
23
24 class DataForm;
25 class Tag;
26
35 class GLOOX_API FeatureNeg : public StanzaExtension
36 {
37 public:
42 FeatureNeg( DataForm* form );
43
48 FeatureNeg( const Tag* tag = 0 );
49
53 virtual ~FeatureNeg();
54
59 const DataForm* form() const { return m_form; }
60
61 // reimplemented from StanzaExtension
62 virtual const std::string& filterString() const;
63
64 // reimplemented from StanzaExtension
65 virtual StanzaExtension* newInstance( const Tag* tag ) const
66 {
67 return new FeatureNeg( tag );
68 }
69
70 // reimplemented from StanzaExtension
71 virtual Tag* tag() const;
72
73 // reimplemented from StanzaExtension
74 virtual StanzaExtension* clone() const
75 {
76 return new FeatureNeg( m_form );
77 }
78
79 private:
80 DataForm* m_form;
81
82 };
83
84}
85
86#endif // FEATURENEG_H__
An abstraction of a XEP-0004 Data Form.
Definition dataform.h:57
An abstraction of Feature Negotiation (XEP-0020), implemented as a StanzaExtension.
Definition featureneg.h:36
virtual StanzaExtension * clone() const
Definition featureneg.h:74
const DataForm * form() const
Definition featureneg.h:59
virtual StanzaExtension * newInstance(const Tag *tag) const
Definition featureneg.h:65
This class abstracts a stanza extension, which is usually an XML child element in a specific namespac...
This is an abstraction of an XML element.
Definition tag.h:47
The namespace for the gloox library.
Definition adhoc.cpp:28