Main Page   Class Hierarchy   Alphabetical List   Compound List   Examples  

messageid.h

00001 /***************************************************************************
00002     copyright            : (C) 2002-2005 by Stefano Barbato
00003     email                : stefano@codesink.org
00004 
00005     $Id: messageid.h,v 1.13 2006/04/11 10:04:58 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 #ifdef HAVE_STDINT_H
00019 #include <stdint.h>
00020 #endif
00021 #include <string>
00022 #include <mimetic/config.h>
00023 #ifdef HAVE_INTTYPES_H
00024 #include <inttypes.h>
00025 #endif
00026 #include <mimetic/utils.h>
00027 #include <mimetic/os/utils.h>
00028 #include <mimetic/rfc822/fieldvalue.h>
00029 
00030 namespace mimetic
00031 {
00032 
00033 
00034 /// Message-ID field value 
00035 /// On Win32 Winsock library must be initialized before using this class.
00036 struct MessageId: public FieldValue
00037 {
00038     MessageId(uint32_t thread_id = 0 );
00039     MessageId(const std::string&);
00040     std::string str() const;
00041     void set(const std::string&);
00042 protected:
00043     FieldValue* clone() const;
00044 private:
00045     static unsigned int ms_sequence_number;
00046     std::string m_msgid;
00047 };
00048 
00049 
00050 }
00051 
00052 #endif