Main Page   Class Hierarchy   Alphabetical List   Compound List   Examples  

contentid.h

00001 /***************************************************************************
00002     copyright            : (C) 2002-2008 by Stefano Barbato
00003     email                : stefano@codesink.org
00004 
00005     $Id: contentid.h,v 1.11 2008-10-07 11:06:25 tat Exp $
00006  ***************************************************************************/
00007 #ifndef _MIMETIC_CONTENTID_H_
00008 #define _MIMETIC_CONTENTID_H_
00009 #include <string>
00010 #include <mimetic/utils.h>
00011 #include <mimetic/os/utils.h>
00012 #include <mimetic/rfc822/fieldvalue.h>
00013 
00014 namespace mimetic
00015 {
00016 
00017 /// Content-ID field value
00018 struct ContentId: public FieldValue
00019 {
00020     // format: yyyymmgg.pid.seq@hostname
00021     static const char label[];
00022     ContentId();
00023     ContentId(const char*);
00024     ContentId(const std::string&);
00025     void set(const std::string&);
00026     std::string str() const;
00027 protected:
00028     FieldValue* clone() const;
00029 private:
00030     static unsigned int ms_sequence_number;
00031     std::string m_cid;
00032 };
00033 
00034 }
00035 
00036 #endif