Move ServerConnection class from the IMAP add-on to libmail.so. This avoids to init SSL each time an IMAP add-on

is loaded. SMTP and POP still have this problem! TODO: use the ServerConnection class in these add-ons too.
This would also remove a lot of #ifdef SSL form these add-ons. Will not do it in the near future, feel free to fix it
...



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41840 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Clemens Zeidler 2011-05-30 21:36:06 +00:00
parent 3feabba6d9
commit a4710c0d46
4 changed files with 23 additions and 15 deletions

View File

@ -27,26 +27,13 @@ local sources =
IMAPParser.cpp
IMAPProtocol.cpp
IMAPStorage.cpp
ServerConnection.cpp
;
# use OpenSSL, if enabled
if $(HAIKU_OPENSSL_ENABLED) {
SubDirC++Flags -DUSE_SSL ;
SubDirSysHdrs $(HAIKU_OPENSSL_HEADERS) ;
Includes [ FGristFiles $(sources) ] : $(HAIKU_OPENSSL_HEADERS_DEPENDENCY) ;
# Dependency needed to trigger downloading/unzipping the package before
# compiling the files.
SetupFeatureObjectsDir ssl ;
} else {
SetupFeatureObjectsDir no-ssl ;
}
Addon IMAP
:
$(sources)
:
be libmail.so $(TARGET_NETWORK_LIBS) $(HAIKU_OPENSSL_LIBS) libalm.so
be libmail.so $(TARGET_NETWORK_LIBS) libalm.so
libshared.a $(TARGET_LIBSUPC++) $(TARGET_LIBSTDC++)
;

View File

@ -11,7 +11,8 @@ SubDirC++Flags -D_BUILDING_mail=1 ;
UsePrivateHeaders textencoding ;
SharedLibrary libmail.so :
local sources =
c_mail_api.cpp
crypt.cpp
des.c
@ -29,7 +30,26 @@ SharedLibrary libmail.so :
NodeMessage.cpp
numailkit.cpp
ProtocolConfigView.cpp
ServerConnection.cpp
StringList.cpp
;
# use OpenSSL, if enabled
if $(HAIKU_OPENSSL_ENABLED) {
SubDirC++Flags -DUSE_SSL ;
SubDirSysHdrs $(HAIKU_OPENSSL_HEADERS) ;
Includes [ FGristFiles $(sources) ] : $(HAIKU_OPENSSL_HEADERS_DEPENDENCY) ;
# Dependency needed to trigger downloading/unzipping the package before
# compiling the files.
SetupFeatureObjectsDir ssl ;
} else {
SetupFeatureObjectsDir no-ssl ;
}
SharedLibrary libmail.so :
$(sources)
:
be
libtextencoding.so
@ -37,4 +57,5 @@ SharedLibrary libmail.so :
$(TARGET_LIBSTDC++)
$(TARGET_NETWORK_LIBS)
$(TARGET_SELECT_UNAME_ETC_LIB)
$(HAIKU_OPENSSL_LIBS)
;