Vmime

Páginas: 70 (17404 palabras) Publicado: 12 de marzo de 2011
VMime Book
A Developer’s Guide To VMime

Vincent Richard vincent@vincent-richard.net July 21, 2010

Contents
1 Introduction 1.1 1.2 1.3 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copyright and license . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . 5 5 5 6 8 8 8 8 9 11 11 12 12 14 14 14 14 15 17 18

2 Building and Installing VMime 2.1 2.2 2.3 2.4 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . What you need . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Obtaining source files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Compiling andinstalling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3 Getting Started 3.1 3.2 3.3 Using VMime in your programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . If you can not (or do not want to) use pkg-config . . . . . . . . . . . . . . . . Platform-dependent code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4 Basics 4.1 Reference counting . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.1 4.1.2 4.1.3 4.2 4.3 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Instanciating reference-counted objects . . . . . . . . . . . . . . . . . . . . Using smart pointers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Error handling . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . Basic objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1

4.3.1 4.3.2 4.3.3 4.3.4 4.4

The component class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Date and time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Media type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mailboxand mailbox groups . . . . . . . . . . . . . . . . . . . . . . . . .

18 18 19 19 20 20 22 22 23 24 24 25 25 25 25 26 27 28 29 29 29 30 31 32 32 32 33 35

Message, body parts and header . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4.1 4.4.2 Introduction to MIME messages . . . . . . . . . . . . . . . . . . . . . . . Header and header fields . . . . . . . . . . . . . . . . . . . . . . .. . . . . 4.4.2.1 4.4.2.2 Standard header fields . . . . . . . . . . . . . . . . . . . . . . . . Parameterized fields . . . . . . . . . . . . . . . . . . . . . . . . .

4.5

Streams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5.1 4.5.2 Streams and stream adapters . . . . . . . . . . . . . . . . . . . . . . . . . Stream filters . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . .

4.6

Content handlers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.6.1 4.6.2 4.6.3 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Extracting data from content handlers . . . . . . . . . . . . . . . . . . . . Creating content handlers . . . . . . . . . . . . . . . . . . . . . . . . . . .

4.74.8 4.9

Character sets, charsets and conversions . . . . . . . . . . . . . . . . . . . . . . . Non-ASCII text in header fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . Encodings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.9.1 4.9.2 4.9.3 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using encoders . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . Enumerating available encoders . . . . . . . . . . . . . . . . . . . . . . . .

4.10 Progress listeners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Parsing and Building Messages 5.1 Parsing messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1.1 5.1.2 5.2 Introduction . . . . ....
Leer documento completo

Regístrate para leer el documento completo.

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS