From d982d097f506b7a62523f01ce8ac615720da1abe Mon Sep 17 00:00:00 2001 From: Stefan Becker Date: Sun, 27 Jan 2013 15:40:37 +0200 Subject: [PATCH] http: start HTTP rewrite Add new modules to repository & build files --- siplcs.vcxproj | 6 ++++ .../SIPEAdiumPlugin.xcodeproj/project.pbxproj | 12 ++++++++ src/core/Makefile.am | 6 ++++ src/core/Makefile.mingw | 5 ++- src/core/sipe-http-request.c | 31 +++++++++++++++++++ src/core/sipe-http-request.h | 36 ++++++++++++++++++++++ src/core/sipe-http-transport.c | 31 +++++++++++++++++++ src/core/sipe-http-transport.h | 36 ++++++++++++++++++++++ src/core/sipe-http.c | 29 +++++++++++++++++ src/core/sipe-http.h | 33 ++++++++++++++++++++ 10 files changed, 224 insertions(+), 1 deletion(-) create mode 100644 src/core/sipe-http-request.c create mode 100644 src/core/sipe-http-request.h create mode 100644 src/core/sipe-http-transport.c create mode 100644 src/core/sipe-http-transport.h create mode 100644 src/core/sipe-http.c create mode 100644 src/core/sipe-http.h diff --git a/siplcs.vcxproj b/siplcs.vcxproj index fd6dc547..af85368b 100755 --- a/siplcs.vcxproj +++ b/siplcs.vcxproj @@ -164,6 +164,9 @@ + + + @@ -236,6 +239,9 @@ + + + diff --git a/src/adium/SIPEAdiumPlugin.xcodeproj/project.pbxproj b/src/adium/SIPEAdiumPlugin.xcodeproj/project.pbxproj index 76ba4b5b..95621852 100644 --- a/src/adium/SIPEAdiumPlugin.xcodeproj/project.pbxproj +++ b/src/adium/SIPEAdiumPlugin.xcodeproj/project.pbxproj @@ -23,6 +23,9 @@ 1C705DD512C1ED410004E43B /* libpurple.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1C705DD412C1ED410004E43B /* libpurple.framework */; }; 1C705DEA12C1ED810004E43B /* libintl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1C705DE912C1ED810004E43B /* libintl.framework */; }; 1C705DFB12C1EDCA0004E43B /* AIUtilities.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1C705DFA12C1EDCA0004E43B /* AIUtilities.framework */; }; + 1C822BED12F8E87500CC4AE7 /* sipe-http.c in Sources */ = {isa = PBXBuildFile; fileRef = 1C822BEB12F8E87500CC4AE7 /* sipe-http.c */; }; + 1C822BED12F8E87500CC4AE8 /* sipe-http-request.c in Sources */ = {isa = PBXBuildFile; fileRef = 1C822BEB12F8E87500CC4AE8 /* sipe-http-request.c */; }; + 1C822BED12F8E87500CC4AE9 /* sipe-http-transport.c in Sources */ = {isa = PBXBuildFile; fileRef = 1C822BEB12F8E87500CC4AE9 /* sipe-http-transport.c */; }; 1C822BED12F8E87500CC4AEA /* sipe-im.c in Sources */ = {isa = PBXBuildFile; fileRef = 1C822BEB12F8E87500CC4AEA /* sipe-im.c */; }; 1CD71E3413C5380B0079DE64 /* sipe-ft-tftp.c in Sources */ = {isa = PBXBuildFile; fileRef = 1CD71E3313C5380B0079DE64 /* sipe-ft-tftp.c */; }; 1CD71E3B13C538340079DE64 /* sipe-group.c in Sources */ = {isa = PBXBuildFile; fileRef = 1CD71E3A13C538340079DE64 /* sipe-group.c */; }; @@ -147,6 +150,9 @@ 1C705DD412C1ED410004E43B /* libpurple.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = libpurple.framework; path = /Users/mduggan/Library/Frameworks/libpurple.framework; sourceTree = ""; }; 1C705DE912C1ED810004E43B /* libintl.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = libintl.framework; path = /Users/mduggan/Library/Frameworks/libintl.framework; sourceTree = ""; }; 1C705DFA12C1EDCA0004E43B /* AIUtilities.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AIUtilities.framework; path = /Users/mduggan/Library/Frameworks/AIUtilities.framework; sourceTree = ""; }; + 1C822BEB12F8E87500CC4AE7 /* sipe-http.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "sipe-http.c"; sourceTree = ""; }; + 1C822BEB12F8E87500CC4AE8 /* sipe-http-request.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "sipe-http-request.c"; sourceTree = ""; }; + 1C822BEB12F8E87500CC4AE9 /* sipe-http-transport.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "sipe-http-transport.c"; sourceTree = ""; }; 1C822BEB12F8E87500CC4AEA /* sipe-im.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "sipe-im.c"; sourceTree = ""; }; 1CD71E3313C5380B0079DE64 /* sipe-ft-tftp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "sipe-ft-tftp.c"; sourceTree = ""; }; 1CD71E3A13C538340079DE64 /* sipe-group.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "sipe-group.c"; sourceTree = ""; }; @@ -417,6 +423,9 @@ 1CE49FB314A17CF000663393 /* sipe-ocs2005.c */, 1CD71E3A13C538340079DE64 /* sipe-group.c */, 1CD71E3313C5380B0079DE64 /* sipe-ft-tftp.c */, + 1C822BEB12F8E87500CC4AE7 /* sipe-http.c */, + 1C822BEB12F8E87500CC4AE8 /* sipe-http-request.c */, + 1C822BEB12F8E87500CC4AE9 /* sipe-http-transport.c */, 1C822BEB12F8E87500CC4AEA /* sipe-im.c */, 1CF2610812C2E1AA0045B6CC /* sdpmsg.c */, 1CF2610C12C2E1AA0045B6CC /* sipe-groupchat.c */, @@ -611,6 +620,9 @@ 1CF2611912C2E1AA0045B6CC /* sipe-incoming.c in Sources */, 1CF2611C12C2E1AA0045B6CC /* sipe-subscriptions.c in Sources */, 1CF2611D12C2E1AA0045B6CC /* sipe-user.c in Sources */, + 1C822BED12F8E87500CC4AE7 /* sipe-http.c in Sources */, + 1C822BED12F8E87500CC4AE8 /* sipe-http-request.c in Sources */, + 1C822BED12F8E87500CC4AE9 /* sipe-http-transport.c in Sources */, 1C822BED12F8E87500CC4AEA /* sipe-im.c in Sources */, 1CD71E3413C5380B0079DE64 /* sipe-ft-tftp.c in Sources */, 1CD71E3B13C538340079DE64 /* sipe-group.c in Sources */, diff --git a/src/core/Makefile.am b/src/core/Makefile.am index c212eb49..6f09310e 100644 --- a/src/core/Makefile.am +++ b/src/core/Makefile.am @@ -49,6 +49,12 @@ libsipe_core_la_SOURCES = \ sipe-group.c \ sipe-groupchat.h \ sipe-groupchat.c \ + sipe-http.h \ + sipe-http.c \ + sipe-http-request.h \ + sipe-http-request.c \ + sipe-http-transport.h \ + sipe-http-transport.c \ sipe-im.h \ sipe-im.c \ sipe-incoming.h \ diff --git a/src/core/Makefile.mingw b/src/core/Makefile.mingw index 27b304b2..98dd4071 100644 --- a/src/core/Makefile.mingw +++ b/src/core/Makefile.mingw @@ -1,6 +1,6 @@ ################################### tell Emacs this is a -*- makefile-gmake -*- # -# Copyright (C) 2011-12 SIPE Project +# Copyright (C) 2011-13 SIPE Project # # Makefile.mingw # @@ -85,6 +85,9 @@ CLEAN_C_SRC = http-conn.c \ sipe-ft-tftp.c \ sipe-group.c \ sipe-groupchat.c \ + sipe-http.c \ + sipe-http-request.c \ + sipe-http-transport.c \ sipe-im.c \ sipe-incoming.c \ sipe-notify.c \ diff --git a/src/core/sipe-http-request.c b/src/core/sipe-http-request.c new file mode 100644 index 00000000..603ccf0e --- /dev/null +++ b/src/core/sipe-http-request.c @@ -0,0 +1,31 @@ +/** + * @file sipe-http-request.c + * + * pidgin-sipe + * + * Copyright (C) 2013 SIPE Project + * + * + * 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 + +#include "sipe-http.h" + +#define _SIPE_HTTP_PRIVATE_IF_REQUEST +#include "sipe-http-request.h" +#define _SIPE_HTTP_PRIVATE_IF_TRANSPORT +#include "sipe-http-transport.h" diff --git a/src/core/sipe-http-request.h b/src/core/sipe-http-request.h new file mode 100644 index 00000000..a3806739 --- /dev/null +++ b/src/core/sipe-http-request.h @@ -0,0 +1,36 @@ +/** + * @file sipe-http-request.h + * + * pidgin-sipe + * + * Copyright (C) 2013 SIPE Project + * + * + * 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 + */ + +/* Private interface between HTTP Public <-> Request <-> Transport layers */ +#ifndef _SIPE_HTTP_PRIVATE_IF_REQUEST +#error "you are not allowed to include sipe-http-request.h!" +#endif + +/* + * Interface dependencies: + * + * + */ + +/* Forward declarations */ +struct sipe_core_private; diff --git a/src/core/sipe-http-transport.c b/src/core/sipe-http-transport.c new file mode 100644 index 00000000..55d0d3c4 --- /dev/null +++ b/src/core/sipe-http-transport.c @@ -0,0 +1,31 @@ +/** + * @file sipe-http-transport.c + * + * pidgin-sipe + * + * Copyright (C) 2013 SIPE Project + * + * + * 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 + +#include "sipe-http.h" + +#define _SIPE_HTTP_PRIVATE_IF_REQUEST +#include "sipe-http-request.h" +#define _SIPE_HTTP_PRIVATE_IF_TRANSPORT +#include "sipe-http-transport.h" diff --git a/src/core/sipe-http-transport.h b/src/core/sipe-http-transport.h new file mode 100644 index 00000000..d4e5555f --- /dev/null +++ b/src/core/sipe-http-transport.h @@ -0,0 +1,36 @@ +/** + * @file sipe-http-transport.h + * + * pidgin-sipe + * + * Copyright (C) 2013 SIPE Project + * + * + * 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 + */ + +/* Private interface between HTTP Request <-> Transport layers */ +#ifndef _SIPE_HTTP_PRIVATE_IF_TRANSPORT +#error "you are not allowed to include sipe-http-transport.h!" +#endif + +/* + * Interface dependencies: + * + * + */ + +/* Forward declarations */ +struct sipe_core_private; diff --git a/src/core/sipe-http.c b/src/core/sipe-http.c new file mode 100644 index 00000000..784317cd --- /dev/null +++ b/src/core/sipe-http.c @@ -0,0 +1,29 @@ +/** + * @file sipe-http.c + * + * pidgin-sipe + * + * Copyright (C) 2013 SIPE Project + * + * + * 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 + +#include "sipe-http.h" + +#define _SIPE_HTTP_PRIVATE_IF_REQUEST +#include "sipe-http-request.h" diff --git a/src/core/sipe-http.h b/src/core/sipe-http.h new file mode 100644 index 00000000..73a20bda --- /dev/null +++ b/src/core/sipe-http.h @@ -0,0 +1,33 @@ +/** + * @file sipe-http.h + * + * pidgin-sipe + * + * Copyright (C) 2013 SIPE Project + * + * + * 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 + */ + +/* Public interface to HTTP request service */ + +/* + * Interface dependencies: + * + * + */ + +/* Forward declarations */ +struct sipe_core_private; -- 2.11.4.GIT