Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
803a3352
...
803a33529c3a992ff80994b446f669a8e987006b
authored
2006-12-31 11:48:23 +0000
by
Wojciech Polak
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Updated to the current API 1.0
1 parent
fb4ee3bd
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
227 additions
and
212 deletions
include/mailutils/cpp/address.h
include/mailutils/cpp/error.h
include/mailutils/cpp/filter.h
include/mailutils/cpp/header.h
include/mailutils/cpp/iterator.h
include/mailutils/cpp/list.h
include/mailutils/cpp/mailbox.h
include/mailutils/cpp/mailcap.h
include/mailutils/cpp/mailer.h
include/mailutils/cpp/mailutils.h
include/mailutils/cpp/message.h
include/mailutils/cpp/pop3.h
include/mailutils/cpp/stream.h
include/mailutils/cpp/url.h
include/mailutils/cpp/address.h
View file @
803a335
/*
GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 2004 Free Software Foundation, Inc.
Copyright (C) 2004
, 2006
Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
...
...
@@ -12,9 +12,10 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
*/
#ifndef _ADDRESS_H
...
...
@@ -33,24 +34,24 @@ class Address
char
buf
[
256
];
protected
:
address_t
addr
;
mu_
address_t
addr
;
friend
class
Mailer
;
public
:
Address
(
const
std
::
string
&
);
Address
(
const
address_t
);
Address
(
const
mu_
address_t
);
~
Address
();
size_t
G
etCount
();
bool
I
sGroup
(
size_t
);
size_t
g
etCount
();
bool
i
sGroup
(
size_t
);
std
::
string
G
etEmail
(
size_t
);
std
::
string
G
etLocalPart
(
size_t
);
std
::
string
G
etDomain
(
size_t
);
std
::
string
G
etPersonal
(
size_t
);
std
::
string
G
etComments
(
size_t
);
std
::
string
G
etRoute
(
size_t
);
std
::
string
g
etEmail
(
size_t
);
std
::
string
g
etLocalPart
(
size_t
);
std
::
string
g
etDomain
(
size_t
);
std
::
string
g
etPersonal
(
size_t
);
std
::
string
g
etComments
(
size_t
);
std
::
string
g
etRoute
(
size_t
);
// Address Exceptions
class
EInval
:
public
Exception
{
...
...
include/mailutils/cpp/error.h
View file @
803a335
/*
GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 2004 Free Software Foundation, Inc.
Copyright (C) 2004
, 2006
Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
...
...
@@ -12,13 +12,14 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
*/
#ifndef _ERROR_H
#define _ERROR_H
#ifndef _
MUCPP_
ERROR_H
#define _
MUCPP_
ERROR_H
#include <iostream>
#include <string>
...
...
@@ -30,25 +31,25 @@ namespace mailutils
class
Exception
{
protected
:
std
::
string
method
;
std
::
string
msgerr
;
std
::
string
p
method
;
std
::
string
p
msgerr
;
public
:
Exception
(
const
std
::
string
m
,
int
s
)
{
method
=
m
;
msgerr
=
mu_strerror
(
s
);
p
method
=
m
;
p
msgerr
=
mu_strerror
(
s
);
}
std
::
string
M
ethod
()
const
{
return
method
;
std
::
string
m
ethod
()
const
{
return
p
method
;
}
std
::
string
M
sgError
()
const
{
return
msgerr
;
std
::
string
m
sgError
()
const
{
return
p
msgerr
;
}
};
}
#endif
/* not _ERROR_H */
#endif
/* not _
MUCPP_
ERROR_H */
...
...
include/mailutils/cpp/filter.h
View file @
803a335
/*
GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 2004 Free Software Foundation, Inc.
Copyright (C) 2004
, 2006
Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
...
...
@@ -12,13 +12,14 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
*/
#ifndef _FILTER_H
#define _FILTER_H
#ifndef _
MUCPP_
FILTER_H
#define _
MUCPP_
FILTER_H
#include <iostream>
#include <mailutils/filter.h>
...
...
@@ -33,13 +34,13 @@ class FilterStream : public Stream
Stream
*
input
;
public
:
void
C
reate
(
Stream
&
,
const
std
::
string
&
,
int
,
int
);
void
I
convCreate
(
Stream
&
,
const
std
::
string
&
,
void
c
reate
(
Stream
&
,
const
std
::
string
&
,
int
,
int
);
void
i
convCreate
(
Stream
&
,
const
std
::
string
&
,
const
std
::
string
&
,
int
,
enum
mu_iconv_fallback_mode
);
};
}
#endif // not _FILTER_H
#endif // not _
MUCPP_
FILTER_H
...
...
include/mailutils/cpp/header.h
View file @
803a335
/*
GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 2004 Free Software Foundation, Inc.
Copyright (C) 2004
, 2006
Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
...
...
@@ -12,13 +12,14 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
*/
#ifndef _HEADER_H
#define _HEADER_H
#ifndef _
MUCPP_
HEADER_H
#define _
MUCPP_
HEADER_H
#include <iostream>
#include <string>
...
...
@@ -30,17 +31,17 @@ namespace mailutils
class
Header
{
protected
:
header_t
hdr
;
mu_
header_t
hdr
;
public
:
Header
();
Header
(
const
header_t
);
Header
(
const
mu_
header_t
);
std
::
string
G
etValue
(
const
std
::
string
&
);
std
::
string
g
etValue
(
const
std
::
string
&
);
std
::
string
operator
[]
(
const
std
::
string
&
);
};
}
#endif // not _HEADER_H
#endif // not _
MUCPP_
HEADER_H
...
...
include/mailutils/cpp/iterator.h
View file @
803a335
/*
GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 2004 Free Software Foundation, Inc.
Copyright (C) 2004
, 2006
Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
...
...
@@ -12,13 +12,14 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
*/
#ifndef _ITERATOR_H
#define _ITERATOR_H
#ifndef _
MUCPP_
ITERATOR_H
#define _
MUCPP_
ITERATOR_H
#include <iostream>
#include <mailutils/iterator.h>
...
...
@@ -30,25 +31,25 @@ namespace mailutils
class
Iterator
{
protected
:
iterator_t
mu_iter
;
mu_
iterator_t
mu_iter
;
List
*
pList
;
public
:
Iterator
(
const
List
&
);
Iterator
(
const
iterator_t
);
Iterator
(
const
mu_
iterator_t
);
~
Iterator
();
void
D
up
(
Iterator
*&
,
const
Iterator
&
);
void
F
irst
();
void
N
ext
();
void
d
up
(
Iterator
*&
,
const
Iterator
&
);
void
f
irst
();
void
n
ext
();
Iterator
&
operator
++
(
int
);
void
C
urrent
(
void
**
);
void
*
C
urrent
();
bool
I
sDone
();
List
&
G
etList
();
void
c
urrent
(
void
**
);
void
*
c
urrent
();
bool
i
sDone
();
List
&
g
etList
();
};
}
#endif // not _ITERATOR_H
#endif // not _
MUCPP_
ITERATOR_H
...
...
include/mailutils/cpp/list.h
View file @
803a335
/*
GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 2004 Free Software Foundation, Inc.
Copyright (C) 2004
, 2006
Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
...
...
@@ -12,19 +12,20 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
*/
#ifndef _LIST_H
#define _LIST_H
#ifndef _
MUCPP_
LIST_H
#define _
MUCPP_
LIST_H
#include <iostream>
#include <mailutils/list.h>
typedef
int
list_action_t
(
void
*
,
void
*
);
typedef
int
(
*
list_comparator_t
)
(
const
void
*
,
const
void
*
);
typedef
int
mu_
list_action_t
(
void
*
,
void
*
);
typedef
int
(
*
mu_
list_comparator_t
)
(
const
void
*
,
const
void
*
);
namespace
mailutils
{
...
...
@@ -32,37 +33,37 @@ namespace mailutils
class
List
{
protected
:
list_t
mu_list
;
mu_
list_t
mu_list
;
friend
class
Iterator
;
public
:
List
();
List
(
const
list_t
);
List
(
const
mu_
list_t
);
~
List
();
void
A
ppend
(
void
*
);
void
P
repend
(
void
*
);
void
Insert
(
void
*
,
void
*
);
void
R
emove
(
void
*
);
void
R
eplace
(
void
*
,
void
*
);
void
a
ppend
(
void
*
);
void
p
repend
(
void
*
);
void
insert
(
void
*
,
void
*
,
int
);
void
r
emove
(
void
*
);
void
r
eplace
(
void
*
,
void
*
);
void
G
et
(
size_t
,
void
**
);
void
*
G
et
(
size_t
);
void
g
et
(
size_t
,
void
**
);
void
*
g
et
(
size_t
);
void
*
operator
[]
(
size_t
);
void
T
oArray
(
void
**
,
size_t
,
size_t
*
);
void
L
ocate
(
void
*
,
void
**
);
void
t
oArray
(
void
**
,
size_t
,
size_t
*
);
void
l
ocate
(
void
*
,
void
**
);
void
Do
(
list_action_t
*
,
void
*
);
list_comparator_t
SetComparator
(
list_comparator_t
);
void
SetDestroyItem
(
void
(
*
destoy_item
)
(
void
*
));
void
apply
(
mu_
list_action_t
*
,
void
*
);
mu_list_comparator_t
setComparator
(
mu_
list_comparator_t
);
void
setDestroyItem
(
void
(
*
mu_
destoy_item
)
(
void
*
));
bool
I
sEmpty
();
size_t
C
ount
();
bool
i
sEmpty
();
size_t
c
ount
();
};
}
#endif // not _LIST_H
#endif // not _
MUCPP_
LIST_H
...
...
include/mailutils/cpp/mailbox.h
View file @
803a335
/*
GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 2004 Free Software Foundation, Inc.
Copyright (C) 2004
, 2006
Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
...
...
@@ -12,13 +12,14 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
*/
#ifndef _MAILBOX_H
#define _MAILBOX_H
#ifndef _M
UCPP_M
AILBOX_H
#define _M
UCPP_M
AILBOX_H
#include <iostream>
#include <mailutils/mailbox.h>
...
...
@@ -30,14 +31,14 @@ namespace mailutils
class
MailboxBase
{
protected
:
mailbox_t
mbox
;
m
u_m
ailbox_t
mbox
;
public
:
void
O
pen
(
int
);
void
C
lose
();
void
o
pen
(
int
);
void
c
lose
();
size_t
M
essagesCount
();
Message
&
G
etMessage
(
size_t
);
size_t
m
essagesCount
();
Message
&
g
etMessage
(
size_t
);
Message
&
operator
[]
(
size_t
);
};
...
...
@@ -45,7 +46,7 @@ class Mailbox : public MailboxBase
{
public
:
Mailbox
(
const
std
::
string
&
);
Mailbox
(
const
mailbox_t
);
Mailbox
(
const
m
u_m
ailbox_t
);
~
Mailbox
();
};
...
...
@@ -53,11 +54,11 @@ class MailboxDefault : public MailboxBase
{
public
:
MailboxDefault
(
const
std
::
string
&
);
MailboxDefault
(
const
mailbox_t
);
MailboxDefault
(
const
m
u_m
ailbox_t
);
~
MailboxDefault
();
};
}
#endif
/* not _MAILBOX_H */
#endif
/* not _M
UCPP_M
AILBOX_H */
...
...
include/mailutils/cpp/mailcap.h
View file @
803a335
/*
GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 2004 Free Software Foundation, Inc.
Copyright (C) 2004
, 2006
Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
...
...
@@ -12,13 +12,14 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
*/
#ifndef _MAILCAP_H
#define _MAILCAP_H
#ifndef _M
UCPP_M
AILCAP_H
#define _M
UCPP_M
AILCAP_H
#include <iostream>
#include <mailutils/mailcap.h>
...
...
@@ -38,10 +39,10 @@ class MailcapEntry
public
:
MailcapEntry
(
mu_mailcap_entry_t
);
size_t
F
ieldsCount
();
std
::
string
G
etTypeField
();
std
::
string
G
etViewCommand
();
std
::
string
G
etField
(
size_t
);
size_t
f
ieldsCount
();
std
::
string
g
etTypeField
();
std
::
string
g
etViewCommand
();
std
::
string
g
etField
(
size_t
);
};
class
Mailcap
...
...
@@ -54,11 +55,11 @@ class Mailcap
Mailcap
(
const
mu_mailcap_t
);
~
Mailcap
();
size_t
G
etCount
();
MailcapEntry
&
G
etEntry
(
size_t
);
size_t
g
etCount
();
MailcapEntry
&
g
etEntry
(
size_t
);
};
}
#endif // not _MAILCAP_H
#endif // not _M
UCPP_M
AILCAP_H
...
...
include/mailutils/cpp/mailer.h
View file @
803a335
/*
GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 2004 Free Software Foundation, Inc.
Copyright (C) 2004
, 2006
Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
...
...
@@ -12,13 +12,14 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
*/
#ifndef _MAILER_H
#define _MAILER_H
#ifndef _M
UCPP_M
AILER_H
#define _M
UCPP_M
AILER_H
#include <iostream>
#include <string>
...
...
@@ -32,19 +33,19 @@ namespace mailutils
class
Mailer
{
protected
:
mailer_t
mailer
;
m
u_m
ailer_t
mailer
;
public
:
Mailer
(
const
std
::
string
&
);
Mailer
(
const
mailer_t
);
Mailer
(
const
m
u_m
ailer_t
);
~
Mailer
();
void
O
pen
(
int
);
void
C
lose
();
void
S
endMessage
(
const
Message
&
,
const
Address
&
,
const
Address
&
);
void
o
pen
(
int
);
void
c
lose
();
void
s
endMessage
(
const
Message
&
,
const
Address
&
,
const
Address
&
);
};
}
#endif // not _MAILER_H
#endif // not _M
UCPP_M
AILER_H
...
...
include/mailutils/cpp/mailutils.h
View file @
803a335
/*
GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 2004 Free Software Foundation, Inc.
Copyright (C) 2004
, 2006
Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
...
...
@@ -12,9 +12,10 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
*/
#include <mailutils/cpp/address.h>
...
...
include/mailutils/cpp/message.h
View file @
803a335
/*
GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 2004 Free Software Foundation, Inc.
Copyright (C) 2004
, 2006
Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
...
...
@@ -12,13 +12,14 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
*/
#ifndef _MESSAGE_H
#define _MESSAGE_H
#ifndef _M
UCPP_M
ESSAGE_H
#define _M
UCPP_M
ESSAGE_H
#include <mailutils/message.h>
#include <mailutils/cpp/header.h>
...
...
@@ -29,18 +30,18 @@ namespace mailutils
class
Message
{
protected
:
message_t
msg
;
m
u_m
essage_t
msg
;
friend
class
Mailer
;
public
:
Message
();
Message
(
const
message_t
);
Message
(
const
m
u_m
essage_t
);
Header
&
G
etHeader
();
Header
&
g
etHeader
();
};
}
#endif // not _MESSAGE_H
#endif // not _M
UCPP_M
ESSAGE_H
...
...
include/mailutils/cpp/pop3.h
View file @
803a335
/*
GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 2004 Free Software Foundation, Inc.
Copyright (C) 2004
, 2006
Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
...
...
@@ -12,17 +12,19 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
*/
#ifndef _POP3_H
#define _POP3_H
#ifndef _
MUCPP_
POP3_H
#define _
MUCPP_
POP3_H
#include <iostream>
#include <mailutils/pop3.h>
#include <mailutils/cpp/list.h>
#include <mailutils/cpp/iterator.h>
#include <mailutils/cpp/stream.h>
namespace
mailutils
...
...
@@ -39,34 +41,34 @@ class Pop3
Pop3
(
const
mu_pop3_t
);
~
Pop3
();
void
S
etCarrier
(
const
Stream
&
);
Stream
&
G
etCarrier
();
void
C
onnect
();
void
D
isconnect
();
void
S
etTimeout
(
int
);
int
G
etTimeout
();
void
s
etCarrier
(
const
Stream
&
);
Stream
&
g
etCarrier
();
void
c
onnect
();
void
d
isconnect
();
void
s
etTimeout
(
int
);
int
g
etTimeout
();
void
S
tls
();
Iterator
&
C
apa
();
void
D
ele
(
unsigned
int
);
size_t
L
ist
(
unsigned
int
);
Iterator
&
L
istAll
();
void
N
oop
();
void
P
ass
(
const
char
*
);
void
Q
uit
();
Stream
&
R
etr
(
unsigned
int
);
void
R
set
();
void
S
tat
(
unsigned
int
*
,
size_t
*
);
Stream
&
T
op
(
unsigned
int
,
unsigned
int
);
void
U
ser
(
const
char
*
);
void
s
tls
();
Iterator
&
c
apa
();
void
d
ele
(
unsigned
int
);
size_t
l
ist
(
unsigned
int
);
Iterator
&
l
istAll
();
void
n
oop
();
void
p
ass
(
const
char
*
);
void
q
uit
();
Stream
&
r
etr
(
unsigned
int
);
void
r
set
();
void
s
tat
(
unsigned
int
*
,
size_t
*
);
Stream
&
t
op
(
unsigned
int
,
unsigned
int
);
void
u
ser
(
const
char
*
);
size_t
R
eadLine
(
char
*
,
size_t
);
size_t
R
esponse
(
char
*
,
size_t
);
void
S
endLine
(
const
char
*
);
void
S
end
();
size_t
r
eadLine
(
char
*
,
size_t
);
size_t
r
esponse
(
char
*
,
size_t
);
void
s
endLine
(
const
char
*
);
void
s
end
();
};
}
#endif // not _POP3_H
#endif // not _
MUCPP_
POP3_H
...
...
include/mailutils/cpp/stream.h
View file @
803a335
/*
GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 2004 Free Software Foundation, Inc.
Copyright (C) 2004
, 2006
Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
...
...
@@ -12,13 +12,14 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
*/
#ifndef _STREAM_H
#define _STREAM_H
#ifndef _
MUCPP_
STREAM_H
#define _
MUCPP_
STREAM_H
#include <iostream>
#include <string>
...
...
@@ -32,7 +33,7 @@ namespace mailutils
class
Stream
{
protected
:
stream_t
stm
;
mu_
stream_t
stm
;
size_t
readn
;
size_t
writen
;
int
wflags
;
...
...
@@ -56,26 +57,26 @@ class Stream
public
:
Stream
();
Stream
(
Stream
&
s
);
Stream
(
const
stream_t
);
Stream
(
const
mu_
stream_t
);
~
Stream
();
void
O
pen
();
void
C
lose
();
void
S
etWaitFlags
(
int
);
void
W
ait
();
// timeval is missing
void
W
ait
(
int
);
// timeval is missing
void
R
ead
(
char
*
,
size_t
,
off_t
);
void
W
rite
(
const
std
::
string
&
,
size_t
,
off_t
);
void
R
eadLine
(
char
*
,
size_t
,
off_t
);
void
S
equentialReadLine
(
char
*
,
size_t
);
void
S
equentialWrite
(
const
std
::
string
&
,
size_t
);
void
F
lush
();
void
o
pen
();
void
c
lose
();
void
s
etWaitFlags
(
int
);
void
w
ait
();
// timeval is missing
void
w
ait
(
int
);
// timeval is missing
void
r
ead
(
char
*
,
size_t
,
off_t
);
void
w
rite
(
const
std
::
string
&
,
size_t
,
off_t
);
void
r
eadLine
(
char
*
,
size_t
,
off_t
);
void
s
equentialReadLine
(
char
*
,
size_t
);
void
s
equentialWrite
(
const
std
::
string
&
,
size_t
);
void
f
lush
();
// Inlines
size_t
G
etReadn
()
const
{
size_t
g
etReadn
()
const
{
return
readn
;
};
size_t
G
etWriten
()
const
{
size_t
g
etWriten
()
const
{
return
writen
;
};
...
...
@@ -124,5 +125,5 @@ class FilterProgStream : public Stream
}
#endif // not _STREAM_H
#endif // not _
MUCPP_
STREAM_H
...
...
include/mailutils/cpp/url.h
View file @
803a335
/*
GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 2004 Free Software Foundation, Inc.
Copyright (C) 2004
, 2006
Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
...
...
@@ -12,13 +12,14 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
*/
#ifndef _URL_H
#define _URL_H
#ifndef _
MUCPP_
URL_H
#define _
MUCPP_
URL_H
#include <iostream>
#include <string>
...
...
@@ -33,26 +34,26 @@ class Url
char
buf
[
1024
];
protected
:
url_t
url
;
mu_
url_t
url
;
public
:
Url
(
const
std
::
string
&
);
Url
(
const
char
*
);
Url
(
const
url_t
);
Url
(
const
mu_
url_t
);
~
Url
();
void
P
arse
();
long
G
etPort
();
std
::
string
G
etScheme
();
std
::
string
G
etUser
();
std
::
string
G
etPasswd
();
std
::
string
G
etAuth
();
std
::
string
G
etHost
();
std
::
string
G
etPath
();
std
::
string
G
etQuery
();
void
p
arse
();
long
g
etPort
();
std
::
string
g
etScheme
();
std
::
string
g
etUser
();
std
::
string
g
etPasswd
();
std
::
string
g
etAuth
();
std
::
string
g
etHost
();
std
::
string
g
etPath
();
std
::
string
g
etQuery
();
};
}
#endif // not _URL_H
#endif // not _
MUCPP_
URL_H
...
...
Please
register
or
sign in
to post a comment