gloox  1.0.28
vcardupdate.h
1 /*
2  Copyright (c) 2006-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 VCARDUPDATE_H__
15 #define VCARDUPDATE_H__
16 
17 #include "gloox.h"
18 #include "stanzaextension.h"
19 
20 #include <string>
21 
22 namespace gloox
23 {
24 
25  class Tag;
26 
35  class GLOOX_API VCardUpdate : public StanzaExtension
36  {
37  public:
41  VCardUpdate();
42 
47  VCardUpdate( const std::string& hash );
48 
54  VCardUpdate( const Tag* tag );
55 
59  virtual ~VCardUpdate();
60 
65  const std::string& hash() const { return m_hash; }
66 
75  bool hasPhoto() { return m_hasPhoto; }
76 
77  // reimplemented from StanzaExtension
78  virtual const std::string& filterString() const;
79 
80  // reimplemented from StanzaExtension
81  virtual StanzaExtension* newInstance( const Tag* tag ) const
82  {
83  return new VCardUpdate( tag );
84  }
85 
86  // reimplemented from StanzaExtension
87  Tag* tag() const;
88 
89  // reimplemented from StanzaExtension
90  virtual StanzaExtension* clone() const
91  {
92  return new VCardUpdate( *this );
93  }
94 
95  private:
96  std::string m_hash;
97  bool m_notReady;
98  bool m_noImage;
99  bool m_valid;
100  bool m_hasPhoto;
101 
102  };
103 
104 }
105 
106 #endif // VCARDUPDATE_H__
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
This is an abstraction of a vcard-temp:x:update namespace element, as used in XEP-0153 (vCard-Based A...
Definition: vcardupdate.h:36
virtual StanzaExtension * newInstance(const Tag *tag) const
Definition: vcardupdate.h:81
const std::string & hash() const
Definition: vcardupdate.h:65
virtual StanzaExtension * clone() const
Definition: vcardupdate.h:90
The namespace for the gloox library.
Definition: adhoc.cpp:28