Main Page   Class Hierarchy   Alphabetical List   Compound List   Examples  
messageid.h
00001 /***************************************************************************
00002     copyright            : (C) 2002-2008 by Stefano Barbato
00003     email                : stefano@codesink.org
00004 
00005     $Id: messageid.h,v 1.15 2008-10-07 11:06:27 tat Exp $
00006  ***************************************************************************/
00007 #ifndef _MIMETIC_MESSAGEID_H_
00008 #define _MIMETIC_MESSAGEID_H_
00009 #ifdef HAVE_STDINT_H
00010 #include <stdint.h>
00011 #endif
00012 #include <string>
00013 #include <mimetic/libconfig.h>
00014 #ifdef HAVE_INTTYPES_H
00015 #include <inttypes.h>
00016 #endif
00017 #include <mimetic/utils.h>
00018 #include <mimetic/os/utils.h>
00019 #include <mimetic/rfc822/fieldvalue.h>
00020 
00021 namespace mimetic
00022 {
00023 
00024 
00025 /// Message-ID field value 
00026 /// On Win32 Winsock library must be initialized before using this class.
00027 struct MessageId: public FieldValue
00028 {
00029     MessageId(uint32_t thread_id = 0 );
00030     MessageId(const std::string&);
00031     std::string str() const;
00032     void set(const std::string&);
00033 protected:
00034     FieldValue* clone() const;
00035 private:
00036     static unsigned int ms_sequence_number;
00037     std::string m_msgid;
00038 };
00039 
00040 
00041 }
00042 
00043 #endif