Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | Related Pages

receipt.h

00001 /*
00002   Copyright (c) 2007-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 #ifndef RECEIPT_H__
00014 #define RECEIPT_H__
00015 
00016 #include "gloox.h"
00017 #include "stanzaextension.h"
00018 
00019 #include <string>
00020 
00021 namespace gloox
00022 {
00023 
00024   class Tag;
00025 
00029   enum ReceiptType
00030   {
00031     ReceiptRequest,                 
00032     ReceiptReceived,                
00033     ReceiptInvalid                  
00034   };
00035 
00042   class GLOOX_API Receipt : public StanzaExtension
00043   {
00044     public:
00045 
00050       Receipt( const Tag* tag );
00051 
00056       Receipt( ReceiptType rcpt )
00057         : StanzaExtension( ExtReceipt ), m_rcpt( rcpt )
00058       {}
00059 
00063       virtual ~Receipt() {}
00064 
00069       ReceiptType rcpt() const { return m_rcpt; }
00070 
00071       // reimplemented from StanzaExtension
00072       virtual const std::string& filterString() const;
00073 
00074       // reimplemented from StanzaExtension
00075       virtual StanzaExtension* newInstance( const Tag* tag ) const
00076       {
00077         return new Receipt( tag );
00078       }
00079 
00080       // reimplemented from StanzaExtension
00081       Tag* tag() const;
00082 
00083     private:
00084       ReceiptType m_rcpt;
00085 
00086   };
00087 
00088 }
00089 
00090 #endif // RECEIPT_H__

Generated on Mon Sep 1 09:25:11 2008 for gloox by  doxygen 1.4.1