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
fa686270
...
fa686270cc881e43c7aabcd9fbdb85e1fecb9c46
authored
2003-01-21 08:03:51 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(imap4d_capability_add,imap4d_capability_remove,imap4d_capability_init): New functions
1 parent
45896e4a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
9 deletions
imap4d/capability.c
imap4d/imap4d.h
imap4d/capability.c
View file @
fa68627
...
...
@@ -17,12 +17,43 @@
#include "imap4d.h"
char
*
capa
[]
=
{
static
list_t
capa_list
;
void
imap4d_capability_add
(
const
char
*
str
)
{
if
(
!
capa_list
)
list_create
(
&
capa_list
);
list_append
(
capa_list
,
(
void
*
)
str
);
}
void
imap4d_capability_remove
(
const
char
*
str
)
{
list_remove
(
capa_list
,
(
void
*
)
str
);
}
void
imap4d_capability_init
()
{
static
char
*
capa
[]
=
{
"IMAP4rev1"
,
"NAMESPACE"
,
"X-VERSION"
,
NULL
};
};
int
i
;
for
(
i
=
0
;
capa
[
i
];
i
++
)
imap4d_capability_add
(
capa
[
i
]);
}
static
int
print_capa
(
void
*
item
,
void
*
data
)
{
util_send
(
" %s"
,
(
char
*
)
item
);
return
0
;
}
int
imap4d_capability
(
struct
imap4d_command
*
command
,
char
*
arg
)
...
...
@@ -32,13 +63,7 @@ imap4d_capability (struct imap4d_command *command, char *arg)
(
void
)
arg
;
util_send
(
"* CAPABILITY"
);
for
(
i
=
0
;
capa
[
i
];
i
++
)
util_send
(
" %s"
,
capa
[
i
]);
#ifdef WITH_TLS
if
(
tls_available
&&
!
tls_done
)
util_send
(
" STARTTLS"
);
#endif
/* WITH_TLS */
list_do
(
capa_list
,
print_capa
,
NULL
);
imap4d_auth_capability
();
util_send
(
"
\r\n
"
);
...
...
imap4d/imap4d.h
View file @
fa68627
...
...
@@ -153,6 +153,7 @@ extern struct mu_auth_data *auth_data;
#ifdef WITH_TLS
extern
int
tls_available
;
extern
int
tls_done
;
extern
int
login_disabled
;
#endif
/* WITH_TLS */
#ifndef HAVE_STRTOK_R
...
...
@@ -218,6 +219,10 @@ extern int namespace_init __P((char *path));
extern
char
*
namespace_getfullpath
__P
((
char
*
name
,
const
char
*
delim
));
extern
char
*
namespace_checkfullpath
__P
((
char
*
name
,
const
char
*
pattern
,
const
char
*
delim
));
/* Capability functions */
extern
void
imap4d_capability_add
__P
((
const
char
*
str
));
extern
void
imap4d_capability_remove
__P
((
const
char
*
str
));
extern
void
imap4d_capability_init
__P
((
void
));
/* Helper functions. */
extern
int
util_out
__P
((
int
,
const
char
*
,
...));
...
...
Please
register
or
sign in
to post a comment