Mailto landing (ifdef MOZ_MAIL_COMPOSE). Approved by valeski.

This commit is contained in:
akkana%netscape.com 1998-09-04 18:59:53 +00:00
Родитель ce9a784cbd
Коммит 6bcd465c89
4 изменённых файлов: 29 добавлений и 8 удалений

Просмотреть файл

@ -795,7 +795,9 @@ NET_InitNetLib(int socket_buffer_size, int max_number_of_connections)
#endif
NET_InitTotallyRandomStuffPeopleAddedProtocols();
#if defined(MOZ_MAIL_NEWS) || defined(MOZ_MAIL_COMPOSE)
NET_InitMailtoProtocol(); /* has a stub for MOZ_MAIL_NEWS */
#endif /* MOZ_MAIL_NEWS || MOZ_MAIL_COMPOSE */
#ifdef MOZ_MAIL_NEWS
NET_InitNewsProtocol();
NET_InitMailboxProtocol();
@ -4868,7 +4870,7 @@ NET_DestroyEvidence()
NET_SetMemoryCacheSize(oldSize); /* set it back up */
}
#ifndef MOZ_MAIL_NEWS
#if !defined(MOZ_MAIL_NEWS) && !defined(MOZ_MAIL_COMPOSE)
/* this whole mess should get moved to the mksmtp.c file
* where it can share the InitMailtoProtocol function

Просмотреть файл

@ -2386,7 +2386,7 @@ NET_AddLOSubmitDataToURLStruct(LO_FormSubmitData * sub_data,
/* If we're posting to mailto, then generate the full complement
of mail headers; and allow the url to specify additional headers
as well. */
#ifdef MOZ_MAIL_NEWS
#if defined(MOZ_MAIL_NEWS) || defined(MOZ_MAIL_COMPOSE)
if (!PL_strncasecmp(url_struct->address, "mailto:", 7))
{
#ifdef MOZILLA_CLIENT
@ -2413,7 +2413,7 @@ NET_AddLOSubmitDataToURLStruct(LO_FormSubmitData * sub_data,
PR_ASSERT(0);
#endif /* MOZILLA_CLIENT */
}
#endif /* MOZ_MAIL_NEWS */
#endif /* MOZ_MAIL_NEWS || MOZ_MAIL_COMPOSE */
if(encoding && !PL_strcasecmp(encoding, "text/plain"))
{
@ -3418,7 +3418,7 @@ NET_InitWAISProtocol(void)
NET_RegisterProtocolImplementation(&wais_proto_impl, WAIS_TYPE_URL);
}
#ifdef MOZ_MAIL_NEWS
#if defined(MOZ_MAIL_NEWS) || defined(MOZ_MAIL_COMPOSE)
PUBLIC char *
NET_Base64Encode (char *src, int32 srclen)
@ -3485,7 +3485,7 @@ NET_Base64Decode (char *src,
return bs.buffer;
}
#endif /* MOZ_MAIL_NEWS */
#endif /* MOZ_MAIL_NEWS || MOZ_MAIL_COMPOSE */
/* A utility function to fetch a file from cache right away,
* and update it (from the original server) after its used.

Просмотреть файл

@ -50,6 +50,12 @@ DIRS += \
imap4 \
certld \
$(NULL)
else
ifdef MOZ_MAIL_COMPOSE
DIRS += \
smtp \
$(NULL)
endif
endif
DIRS += http

Просмотреть файл

@ -543,15 +543,17 @@ net_smtp_auth_login_response(ActiveEntry *cur_entry)
switch (CD_RESPONSE_CODE/100) {
case 2:
{
#ifdef MOZ_MAIL_NEWS
char *pop_password = (char *)NET_GetPopPassword();
CD_NEXT_STATE = SMTP_SEND_HELO_RESPONSE;
if (pop_password == NULL)
NET_SetPopPassword2(net_smtp_password);
#ifdef MOZ_MAIL_NEWS
if ( IMAP_GetPassword() == NULL )
IMAP_SetPassword(net_smtp_password);
#endif /* MOZ_MAIL_NEWS */
XP_FREEIF(pop_password);
#else /* MOZ_MAIL_NEWS */
XP_ASSERT(0);
#endif /* MOZ_MAIL_NEWS */
}
break;
case 3:
@ -565,7 +567,7 @@ net_smtp_auth_login_response(ActiveEntry *cur_entry)
char *username = 0;
char host[256];
int len = 256;
#endif;
#endif
/* NET_GetPopUsername () returns pointer to the cached
* username. It did *NOT* alloc a new string
*/
@ -656,7 +658,9 @@ net_smtp_auth_login_password(ActiveEntry *cur_entry)
if (!net_smtp_password || !*net_smtp_password) {
XP_FREEIF(net_smtp_password); /* in case its an empty string */
#ifdef MOZ_MAIL_NEWS
net_smtp_password = (char *) NET_GetPopPassword();
#endif /* MOZ_MAIL_NEWS */
}
if (!net_smtp_password || !*net_smtp_password) {
@ -1304,10 +1308,12 @@ HG61365
encrypt_p, sign_p, force_plain_text,
html_part);
#ifdef MOZ_MAIL_NEWS
if (cpane && CE_URL_S->fe_data) {
/* Tell libmsg what to do after deliver the message */
MSG_SetPostDeliveryActionInfo (cpane, CE_URL_S->fe_data);
}
#endif /* MOZ_MAIL_NEWS */
FREEIF(from);
FREEIF(reply_to);
@ -1679,6 +1685,13 @@ Subject: %s\n\
}
#ifndef MOZ_MAIL_NEWS
PUBLIC const char*
NET_GetPopUsername ()
{
return 0;
}
#endif /* MOZ_MAIL_NEWS */
#endif /* defined(MOZILLA_CLIENT) || defined(LIBNET_SMTP) */