0.8.10claws53
authorChristoph Hohmann <reboot@gmx.ch>
Tue, 25 Feb 2003 17:33:28 +0000 (17:33 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Tue, 25 Feb 2003 17:33:28 +0000 (17:33 +0000)
* src/Makefile.am
* src/colorlabel.[ch]           ** REMOVE **
* src/gtk/Makefile.am
* src/gtk/colorlabel.[ch]       ** NEW **
        move colorlabel files to gtk directory

* src/esmtp.[ch]                ** REMOVE **
        has been merged into smtp.[ch] in 0.7.5

ChangeLog.claws
configure.ac
doc/src/ui_seperation.txt
src/Makefile.am
src/esmtp.c [deleted file]
src/esmtp.h [deleted file]
src/gtk/Makefile.am
src/gtk/colorlabel.c [moved from src/colorlabel.c with 100% similarity]
src/gtk/colorlabel.h [moved from src/colorlabel.h with 100% similarity]

index 7893bce..979745b 100644 (file)
@@ -1,3 +1,14 @@
+2003-02-25 [christoph] 0.8.10claws53
+
+       * src/Makefile.am
+       * src/colorlabel.[ch]           ** REMOVE **
+       * src/gtk/Makefile.am
+       * src/gtk/colorlabel.[ch]       ** NEW **
+               move colorlabel files to gtk directory
+
+       * src/esmtp.[ch]                ** REMOVE **
+               has been merged into smtp.[ch] in 0.7.5
+
 2003-02-25 [christoph] 0.8.10claws52
 
        * src/Makefile.am
index 77c11c1..a694bdd 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=10
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws52
+EXTRA_VERSION=claws53
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index dd49847..4f3b9cc 100644 (file)
@@ -46,3 +46,5 @@ stringtable.[ch]      common/stringtable.[ch] ok
 gtkutils.[ch]          gtk/gtkutils.[ch]       ok
 
 about.[ch]             gtk/about.[ch]          ok
+
+colorlabel.[ch]                gtk/colorlabel.[ch]     ok
index 1ab7db5..5edbece 100644 (file)
@@ -14,7 +14,6 @@ sylpheed_SOURCES = \
        mimeview.c mimeview.h \
        summary_search.c summary_search.h \
        message_search.c message_search.h \
-       colorlabel.c colorlabel.h \
        folder.c folder.h \
        procmsg.c procmsg.h \
        procheader.c procheader.h \
diff --git a/src/esmtp.c b/src/esmtp.c
deleted file mode 100644 (file)
index 6636eb3..0000000
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2002 Hiroyuki Yamamoto
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#include <glib.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "esmtp.h"
-#include "socket.h"
-#include "utils.h"
-#include "md5.h"
-#include "base64.h"
-
-#define MSGBUFSIZE     8192
-
-static gint verbose = 1;
-static gchar esmtp_response[MSGBUFSIZE];
-
-gint esmtp_ehlo(SockInfo *sock, const gchar *hostname)
-{
-       smtp_auth_methods[0] = smtp_auth_methods[1] = smtp_auth_methods[2] = smtp_auth_methods[3] = FALSE;
-       sock_printf(sock, "EHLO %s\r\n", hostname);
-       if (verbose)
-               log_print("ESMTP> EHLO %s\n", hostname);
-
-       return esmtp_ok(sock);
-}
-
-gint esmtp_starttls(SockInfo *sock)
-{
-       sock_printf(sock, "STARTTLS\r\n");
-       if (verbose)
-               log_print("ESMTP> STARTTLS\n");
-
-       return esmtp_ok(sock);
-}
-
-gint esmtp_auth_cram_md5(SockInfo *sock)
-{
-       sock_printf(sock, "AUTH CRAM-MD5\r\n");
-       if (verbose)
-               log_print("ESMTP> AUTH CRAM-MD5\n");
-
-       return esmtp_ok(sock);
-}
-
-gint esmtp_auth_login(SockInfo *sock)
-{
-       sock_printf(sock, "AUTH LOGIN\r\n");
-       if (verbose)
-               log_print("ESMTP> AUTH LOGIN\n");
-
-       return esmtp_ok(sock);
-}
-
-gint esmtp_auth(SockInfo *sock, SMTPAuthType authtype,
-               const gchar *userid, const gchar *passwd)
-{
-       gchar buf[MSGBUFSIZE];
-       guchar hexdigest[33];
-       gchar *challenge, *response, *response64;
-       gint challengelen;
-
-       switch (authtype) {
-       case SMTPAUTH_LOGIN:
-               if (!strncmp(esmtp_response, "334 ", 4))
-                       to64frombits(buf, userid, strlen(userid));
-               else
-                       /* Server rejects AUTH */
-                       g_snprintf(buf, sizeof(buf), "*");
-
-               sock_printf(sock, "%s\r\n", buf);
-               if (verbose) log_print("ESMTP> USERID\n");
-
-               esmtp_ok(sock); /* to read the answer from the server */
-
-               if (!strncmp(esmtp_response, "334 ", 4))
-                       to64frombits(buf, passwd, strlen(passwd));
-               else
-                       /* Server rejects AUTH */
-                       g_snprintf(buf, sizeof(buf), "*");
-
-               sock_printf(sock, "%s\r\n", buf);
-               if (verbose) log_print("ESMTP> PASSWORD\n");
-               break;
-       case SMTPAUTH_CRAM_MD5:
-               if (!strncmp(esmtp_response, "334 ", 4)) {
-                       /* remove 334 from esmtp_response */
-                       gchar *p = esmtp_response + 4;
-
-                       challenge = g_malloc(strlen(p) + 1);
-                       challengelen = from64tobits(challenge, p);
-                       challenge[challengelen] = '\0';
-                       if (verbose)
-                               log_print("ESMTP< [Decoded: %s]\n", challenge);
-
-                       g_snprintf(buf, sizeof(buf), "%s", passwd);
-                       md5_hex_hmac(hexdigest, challenge, challengelen,
-                                    buf, strlen(passwd));
-                       g_free(challenge);
-
-                       response = g_strdup_printf("%s %s", userid, hexdigest);
-                       if (verbose)
-                               log_print("ESMTP> [Encoded: %s]\n", response);
-
-                       response64 = g_malloc((strlen(response) + 3) * 2 + 1);
-                       to64frombits(response64, response, strlen(response));
-                       g_free(response);
-
-                       sock_printf(sock, "%s\r\n", response64);
-                       if (verbose) log_print("ESMTP> %s\n", response64);
-                       g_free(response64);
-               } else {
-                       /* Server rejects AUTH */
-                       g_snprintf(buf, sizeof(buf), "*");
-                       sock_printf(sock, "%s\r\n", buf);
-                       if (verbose)
-                               log_print("ESMTP> %s\n",buf);
-               }
-               break;
-       case SMTPAUTH_DIGEST_MD5:
-        default:
-               /* stop esmtp_auth when no correct authtype */
-               g_snprintf(buf, sizeof(buf), "*");
-               sock_printf(sock, "%s\r\n", buf);
-               if (verbose) log_print("ESMTP> %s\n", buf);
-               break;
-       }
-
-       return esmtp_ok(sock);
-}
-
-gint esmtp_ok(SockInfo *sock)
-{
-       while (sock_gets(sock, esmtp_response, sizeof(esmtp_response) - 1)
-              != -1) {
-               if (strlen(esmtp_response) < 4)
-                       return SM_ERROR;
-               strretchomp(esmtp_response);
-
-               if (verbose)
-                       log_print("ESMTP< %s\n", esmtp_response);
-
-               if (strncasecmp("250-AUTH", esmtp_response, 8) == 0) {
-                       smtp_auth_methods[SMTPAUTH_LOGIN]      = (strstr(esmtp_response, " LOGIN") != NULL); 
-                       smtp_auth_methods[SMTPAUTH_CRAM_MD5]   = (strstr(esmtp_response, " CRAM-MD5") != NULL);
-                       smtp_auth_methods[SMTPAUTH_DIGEST_MD5] = FALSE; /* not implemented yet */
-               }
-
-               if ((esmtp_response[0] == '1' || esmtp_response[0] == '2' ||
-                    esmtp_response[0] == '3') && esmtp_response[3] == ' ')
-                       return SM_OK;
-               else if (esmtp_response[3] != '-')
-                       return SM_ERROR;
-               else if (esmtp_response[0] == '5' &&
-                        esmtp_response[1] == '0' &&
-                        (esmtp_response[2] == '4' ||
-                         esmtp_response[2] == '3' ||
-                         esmtp_response[2] == '1'))
-                       return SM_ERROR;
-       }
-
-       return SM_UNRECOVERABLE;
-}
diff --git a/src/esmtp.h b/src/esmtp.h
deleted file mode 100644 (file)
index 8d03be5..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2001 Hiroyuki Yamamoto
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifndef __ESMTP_H__
-#define __ESMTP_H__
-
-#ifdef HAVE_CONFIG_H
-#  include "config.h"
-#endif
-
-#include <glib.h>
-
-#include "socket.h"
-#if USE_OPENSSL
-#  include "ssl.h"
-#endif
-
-typedef enum
-{
-       SMTPAUTH_LOGIN      = 1,
-       SMTPAUTH_CRAM_MD5   = 2,
-       SMTPAUTH_DIGEST_MD5 = 3
-} SMTPAuthType;
-
-gint esmtp_ehlo(SockInfo *sock, const gchar *hostname);
-gint esmtp_starttls(SockInfo *sock);
-gint esmtp_auth_login(SockInfo *sock);
-gint esmtp_auth_cram_md5(SockInfo *sock);
-gint esmtp_auth(SockInfo *sock, SMTPAuthType authtype,
-               const gchar *userid, const gchar *passwd);
-gint esmtp_ok(SockInfo *sock);
-gboolean smtp_auth_methods[4];
-
-#endif /* __ESMTP_H__ */
index 134a29f..94d68f8 100644 (file)
@@ -2,6 +2,7 @@ noinst_LTLIBRARIES = libsylpheedgtk.la
 
 libsylpheedgtk_la_SOURCES = \
        about.c about.h \
+       colorlabel.c colorlabel.h \
        description_window.c description_window.h \
        gtkutils.c gtkutils.h \
        gtkshruler.c gtkshruler.h \
similarity index 100%
rename from src/colorlabel.c
rename to src/gtk/colorlabel.c
similarity index 100%
rename from src/colorlabel.h
rename to src/gtk/colorlabel.h