Main Page   Class Hierarchy   Alphabetical List   Compound List   Examples  

messageid.h

00001 /***************************************************************************
00002     copyright            : (C) 2002-2005 by Stefano Barbato
00003     email                : [email protected]
00004 
00005     $Id: messageid_8h-source.html,v 1.4 2006-03-12 12:28:31 tat Exp $
00006  ***************************************************************************/
00007 
00008 /***************************************************************************
00009  *                                                                         *
00010  *   This program is free software; you can redistribute it and/or modify  *
00011  *   it under the terms of the GNU General Public License as published by  *
00012  *   the Free Software Foundation; either version 2 of the License, or     *
00013  *   (at your option) any later version.                                   *
00014  *                                                                         *
00015  ***************************************************************************/
00016 #ifndef _MIMETIC_MESSAGEID_H_
00017 #define _MIMETIC_MESSAGEID_H_
00018 #include <stdint.h>
00019 #include <string>
00020 #include <mimetic/config.h>
00021 #if HAVE_STDINT_H
00022 #include <stdint.h>
00023 #endif
00024 #ifdef HAVE_INTTYPES_H
00025 #include <inttypes.h>
00026 #endif
00027 #include <mimetic/utils.h>
00028 #include <mimetic/os/utils.h>
00029 #include <mimetic/rfc822/fieldvalue.h>
00030 
00031 namespace mimetic
00032 {
00033 
00034 
00035 /// Message-ID field value 
00036 /// On Win32 Winsock library must be initialized before using this class.
00037 struct MessageId: public FieldValue
00038 {
00039     MessageId(uint32_t thread_id = 0 );
00040     MessageId(const std::string&);
00041     std::string str() const;
00042     void set(const std::string&);
00043 protected:
00044     FieldValue* clone() const;
00045 private:
00046     static unsigned int ms_sequence_number;
00047     std::string m_msgid;
00048 };
00049 
00050 
00051 }
00052 
00053 #endif