Main Page Class Hierarchy Alphabetical List Compound List Examples |
00001 /*************************************************************************** 00002 copyright : (C) 2002-2005 by Stefano Barbato 00003 email : [email protected] 00004 00005 $Id: contentid_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_CONTENTID_H_ 00017 #define _MIMETIC_CONTENTID_H_ 00018 #include <string> 00019 #include <mimetic/utils.h> 00020 #include <mimetic/os/utils.h> 00021 #include <mimetic/rfc822/fieldvalue.h> 00022 00023 namespace mimetic 00024 { 00025 00026 /// Content-ID field value 00027 struct ContentId: public FieldValue 00028 { 00029 // format: yyyymmgg.pid.seq@hostname 00030 static const char label[]; 00031 ContentId(); 00032 ContentId(const char*); 00033 ContentId(const std::string&); 00034 void set(const std::string&); 00035 std::string str() const; 00036 protected: 00037 FieldValue* clone() const; 00038 private: 00039 static unsigned int ms_sequence_number; 00040 std::string m_cid; 00041 }; 00042 00043 } 00044 00045 #endif