~ubuntu-branches/ubuntu/natty/mimetic/natty

« back to all changes in this revision

Viewing changes to mimetic/rfc822/mailboxlist.h

  • Committer: Bazaar Package Importer
  • Author(s): gregor herrmann
  • Date: 2006-06-16 13:16:07 UTC
  • Revision ID: james.westby@ubuntu.com-20060616131607-245mqjypkjuahq6b
Tags: upstream-0.9.1
ImportĀ upstreamĀ versionĀ 0.9.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
    copyright            : (C) 2002-2005 by Stefano Barbato
 
3
    email                : stefano@codesink.org
 
4
 
 
5
    $Id: mailboxlist.h,v 1.11 2005/02/23 10:26:15 tat Exp $
 
6
 ***************************************************************************/
 
7
 
 
8
/***************************************************************************
 
9
 *                                                                         *
 
10
 *   This program is free software; you can redistribute it and/or modify  *
 
11
 *   it under the terms of the GNU General Public License as published by  *
 
12
 *   the Free Software Foundation; either version 2 of the License, or     *
 
13
 *   (at your option) any later version.                                   *
 
14
 *                                                                         *
 
15
 ***************************************************************************/
 
16
#ifndef _MIMETIC_RFC822_MAILBOXLIST_H_
 
17
#define _MIMETIC_RFC822_MAILBOXLIST_H_
 
18
#include <string>
 
19
#include <vector>
 
20
#include <mimetic/utils.h>
 
21
#include <mimetic/rfc822/mailbox.h>
 
22
 
 
23
 
 
24
namespace mimetic
 
25
{
 
26
/// List of Mailbox objects
 
27
/*!
 
28
    MailboxList class is a container class that holds Mailbox objects 
 
29
 
 
30
    \code
 
31
    const char* str = "dest@domain.com, friends: one@friends.net, "
 
32
                "two@friends.net;, last@users.com";
 
33
    MailboxList aList(str);
 
34
    MailboxList::const_iterator bit(aList.begin()), eit(aList.end());
 
35
    for(; bit != eit; ++bit)
 
36
    {
 
37
        cout << *bit;
 
38
    }
 
39
    \endcode
 
40
 
 
41
    \sa <a href="../RFC/rfc822.txt">RFC822</a>
 
42
 */
 
43
struct MailboxList: public FieldValue, public std::vector<Mailbox>
 
44
{
 
45
    MailboxList();
 
46
    MailboxList(const char*);
 
47
    MailboxList(const std::string&);
 
48
    MailboxList(const std::string&, const std::string&);
 
49
 
 
50
    std::string str() const;
 
51
protected:
 
52
    FieldValue* clone() const;
 
53
private:
 
54
    void set(const std::string&);
 
55
    istring m_name;
 
56
};
 
57
 
 
58
 
 
59
 
 
60
}
 
61
 
 
62
#endif