├── VERSION ├── contrib ├── debian │ ├── compat │ ├── docs │ ├── control │ ├── rules │ └── copyright ├── opensuse-build-service │ ├── pidgin-sipe-telepathy.dsc │ ├── pidgin-sipe-gstreamer1.dsc │ ├── pidgin-sipe-freerdp2.dsc │ ├── PKGBUILD │ ├── generate_nsi.pl │ ├── generate_debian.sh │ └── pidgin-sipe.nsi.template ├── mingw-cross-compile │ ├── local.mak │ └── README.txt ├── dbus │ ├── sipe-reset-status.pl │ ├── sipe-republish-calendar.pl │ ├── sipe-call-phone-number.pl │ ├── sipe-join-conference-with-uri.pl │ ├── sipe-join-conference-with-organizer-and-id.pl │ └── SipeHelper.pm └── debug │ └── parse_valgrind.pl ├── src ├── miranda │ ├── INSTALL │ ├── miranda-version.h │ ├── miranda-resource.h │ ├── sipe-miranda.c │ ├── miranda-debug.c │ ├── miranda-setting.c │ ├── vlc.c │ ├── miranda-groupchat.c │ └── miranda-markup.c ├── adium │ ├── English.lproj │ │ └── InfoPlist.strings │ ├── SIPEAdiumPlugin_Prefix.pch │ ├── xcconfigs │ │ ├── libpidgin-sipe.xcconfig │ │ ├── Debug-Release.xcconfig │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ ├── SIPEAdiumPlugin.xcconfig │ │ └── Base.xcconfig │ ├── ESSIPEService.h │ ├── ESSIPELibpurpleServicePlugin.h │ ├── PurpleDefaultsSIPE.plist │ ├── DCPurpleSIPEJoinChatViewController.h │ ├── Info.plist │ ├── ESSIPEAccountViewController.h │ ├── ESSIPELibpurpleServicePlugin.m │ ├── find_adium_build.sh │ ├── ESPurpleSIPEAccount.h │ ├── check_release.sh │ └── SIPEAdiumPlugin.xcodeproj │ │ └── xcshareddata │ │ └── xcschemes │ │ ├── pidgin-sipe.xcscheme │ │ └── SIPEAdiumPlugin.xcscheme ├── telepathy │ ├── data │ │ ├── org.freedesktop.Telepathy.ConnectionManager.sipe.service.in │ │ ├── sipe.profile │ │ └── Makefile.am │ ├── Makefile.am │ └── telepathy-schedule.c ├── api │ ├── Makefile.am │ ├── sipe-nls.h │ ├── sipe-common.h │ └── sipe-mime.h ├── Makefile.am ├── Makefile.mingw ├── core │ ├── sip-sec-basic.h │ ├── sip-sec-negotiate.h │ ├── libsiperc.rc.in │ ├── sipe-win32dep.h │ ├── sip-sec-tls-dsk.h │ ├── sip-sec-sspi.h │ ├── uuid.h │ ├── sip-sec-gssapi.h │ ├── sip-sec-ntlm.h │ ├── sipe-appshare.h │ ├── md4.h │ ├── sipe-domino.h │ ├── sipe-notify.h │ ├── sipe-rtf.h │ ├── sipe-ft-lync.h │ ├── sip-sec-digest.h │ ├── sipe-ft-tftp.h │ ├── sipe-ews.h │ ├── sipe-appshare-client.h │ ├── sipe-status.h │ ├── sipe-sign.h │ ├── sipe-incoming.h │ ├── sipe-mime-common.c │ ├── sipe-groupchat.h │ ├── sipe-ocs2005.h │ ├── sipe-subscriptions.h │ ├── sipe-schedule.h │ ├── sipe-ews-autodiscover.h │ ├── sipe-certificate.h │ ├── sip-csta.h │ ├── sipe-lync-autodiscover.h │ ├── sipe-digest.h │ ├── sipe-http-transport.h │ ├── sipe-crypt.h │ ├── sdpmsg.h │ ├── sipe-chat.h │ ├── sipe-tls-analyzer.c │ ├── sipe-ocs2007.h │ ├── sip-sec-ntlm-analyzer.c │ └── sipe-appshare-xfreerdp.c └── purple │ ├── pidgin-sipe.metainfo.xml │ ├── purple-markup.c │ ├── tests-load.c │ ├── purple-setting.c │ ├── tests.c │ ├── purple-connection.c │ ├── purple-dbus.h │ ├── purple-schedule.c │ ├── purple-im.c │ ├── purple-mime.c │ ├── purple-debug.c │ └── purple-notify.c ├── pixmaps ├── 16 │ ├── sipe.png │ └── Makefile.am ├── 22 │ ├── sipe.png │ └── Makefile.am ├── 24 │ ├── sipe.png │ └── Makefile.am ├── 32 │ ├── sipe.png │ └── Makefile.am ├── 48 │ ├── sipe.png │ └── Makefile.am ├── Makefile.am ├── scalable │ └── Makefile.am ├── Makefile.common.am └── Makefile.mingw ├── .tx └── config ├── po ├── LINGUAS ├── POTFILES.in ├── Makefile.mingw └── transifex-pot-fixup.pl ├── NEWS ├── TODO ├── autogen.sh ├── Makefile.am ├── .gitignore ├── git-snapshot.sh ├── git-build.sh ├── AUTHORS └── Makefile.mingw /VERSION: -------------------------------------------------------------------------------- 1 | 1.25.0 2 | -------------------------------------------------------------------------------- /contrib/debian/compat: -------------------------------------------------------------------------------- 1 | 5 2 | -------------------------------------------------------------------------------- /contrib/debian/docs: -------------------------------------------------------------------------------- 1 | AUTHORS 2 | ChangeLog 3 | NEWS 4 | README 5 | TODO 6 | -------------------------------------------------------------------------------- /src/miranda/INSTALL: -------------------------------------------------------------------------------- 1 | FIXME: miranda client code compile instructions... 2 | -------------------------------------------------------------------------------- /pixmaps/16/sipe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tieto/sipe/HEAD/pixmaps/16/sipe.png -------------------------------------------------------------------------------- /pixmaps/22/sipe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tieto/sipe/HEAD/pixmaps/22/sipe.png -------------------------------------------------------------------------------- /pixmaps/24/sipe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tieto/sipe/HEAD/pixmaps/24/sipe.png -------------------------------------------------------------------------------- /pixmaps/32/sipe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tieto/sipe/HEAD/pixmaps/32/sipe.png -------------------------------------------------------------------------------- /pixmaps/48/sipe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tieto/sipe/HEAD/pixmaps/48/sipe.png -------------------------------------------------------------------------------- /src/adium/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /pixmaps/16/Makefile.am: -------------------------------------------------------------------------------- 1 | pixmapsize = 16 2 | pixmapinst = 16x16 3 | pixmapext = png 4 | include $(srcdir)/../Makefile.common.am 5 | -------------------------------------------------------------------------------- /pixmaps/22/Makefile.am: -------------------------------------------------------------------------------- 1 | pixmapsize = 22 2 | pixmapinst = 22x22 3 | pixmapext = png 4 | include $(srcdir)/../Makefile.common.am 5 | -------------------------------------------------------------------------------- /pixmaps/24/Makefile.am: -------------------------------------------------------------------------------- 1 | pixmapsize = 24 2 | pixmapinst = 24x24 3 | pixmapext = png 4 | include $(srcdir)/../Makefile.common.am 5 | -------------------------------------------------------------------------------- /pixmaps/32/Makefile.am: -------------------------------------------------------------------------------- 1 | pixmapsize = 32 2 | pixmapinst = 32x32 3 | pixmapext = png 4 | include $(srcdir)/../Makefile.common.am 5 | -------------------------------------------------------------------------------- /pixmaps/48/Makefile.am: -------------------------------------------------------------------------------- 1 | pixmapsize = 48 2 | pixmapinst = 48x48 3 | pixmapext = png 4 | include $(srcdir)/../Makefile.common.am 5 | -------------------------------------------------------------------------------- /pixmaps/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = 16 22 24 32 48 scalable 2 | 3 | EXTRA_DIST = \ 4 | Makefile.mingw 5 | 6 | MAINTAINERCLEANFILES = \ 7 | Makefile.in 8 | -------------------------------------------------------------------------------- /.tx/config: -------------------------------------------------------------------------------- 1 | [main] 2 | host = https://www.transifex.com 3 | 4 | [pidgin-sipe.mob] 5 | file_filter = po/.po 6 | source_file = po/pidgin-sipe.pot 7 | source_lang = en 8 | 9 | -------------------------------------------------------------------------------- /src/telepathy/data/org.freedesktop.Telepathy.ConnectionManager.sipe.service.in: -------------------------------------------------------------------------------- 1 | [D-BUS Service] 2 | Name=org.freedesktop.Telepathy.ConnectionManager.sipe 3 | Exec=@libexecdir@/telepathy-sipe 4 | -------------------------------------------------------------------------------- /src/api/Makefile.am: -------------------------------------------------------------------------------- 1 | MAINTAINERCLEANFILES = \ 2 | Makefile.in 3 | 4 | EXTRA_DIST = \ 5 | sipe-backend.h \ 6 | sipe-common.h \ 7 | sipe-core.h \ 8 | sipe-mime.h \ 9 | sipe-nls.h 10 | -------------------------------------------------------------------------------- /src/adium/SIPEAdiumPlugin_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'SIPEAdiumPlugin' target in the 'SIPEAdiumPlugin' project. 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /src/adium/xcconfigs/libpidgin-sipe.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // libpidgin-sipe.xcconfig 3 | // SIPEAdiumPlugin 4 | // 5 | // Created by Lamb, Michael on 11/13/13. 6 | // 7 | // 8 | PRODUCT_NAME = pidgin-sipe 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /pixmaps/scalable/Makefile.am: -------------------------------------------------------------------------------- 1 | pixmapsize = scalable 2 | pixmapinst = scalable 3 | pixmapext = svg 4 | include $(srcdir)/../Makefile.common.am 5 | 6 | # original artwork is only distributed, not installed 7 | EXTRA_DIST += sipe-original.svg 8 | -------------------------------------------------------------------------------- /po/LINGUAS: -------------------------------------------------------------------------------- 1 | ar 2 | cs 3 | da 4 | de 5 | el 6 | es 7 | fi 8 | fr 9 | fr_CA 10 | hi 11 | hu 12 | it 13 | ja 14 | ko 15 | lt 16 | nb 17 | nl 18 | pl 19 | pt 20 | pt_BR 21 | ro 22 | ru 23 | sv 24 | ta 25 | te 26 | tr 27 | zh_CN 28 | zh_TW 29 | -------------------------------------------------------------------------------- /src/adium/xcconfigs/Debug-Release.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // Debug-Release.xcconfig 3 | // SIPEAdiumPlugin 4 | // 5 | // Created by Lamb, Michael on 11/13/13. 6 | // 7 | // 8 | #include "Base.xcconfig" 9 | //:configuration = Debug-Release 10 | -------------------------------------------------------------------------------- /src/telepathy/data/sipe.profile: -------------------------------------------------------------------------------- 1 | 7 | Office Communicator 8 | 9 | -------------------------------------------------------------------------------- /src/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = core api 2 | 3 | if SIPE_INCLUDE_PURPLE 4 | SUBDIRS += purple 5 | endif 6 | 7 | if SIPE_INCLUDE_TELEPATHY 8 | SUBDIRS += telepathy 9 | endif 10 | 11 | EXTRA_DIST = \ 12 | adium \ 13 | miranda \ 14 | Makefile.mingw 15 | 16 | MAINTAINERCLEANFILES = \ 17 | Makefile.in 18 | -------------------------------------------------------------------------------- /src/adium/xcconfigs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // Debug.xcconfig 3 | // SIPEAdiumPlugin 4 | // 5 | // Created by Lamb, Michael on 11/13/13. 6 | // 7 | // 8 | #include "Base.xcconfig" 9 | //:configuration = Debug 10 | ONLY_ACTIVE_ARCH = YES 11 | COPY_PHASE_STRIP = NO 12 | GCC_DYNAMIC_NO_PIC = NO 13 | GCC_OPTIMIZATION_LEVEL = 0 14 | -------------------------------------------------------------------------------- /src/adium/xcconfigs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // Release.xcconfig 3 | // SIPEAdiumPlugin 4 | // 5 | // Created by Lamb, Michael on 11/13/13. 6 | // 7 | // 8 | #include "Base.xcconfig" 9 | //:configuration = Release 10 | DEBUG_INFORMATION_FORMAT = dwarf-with-dsym 11 | COPY_PHASE_STRIP = YES 12 | GCC_MODEL_TUNING = G5 13 | ZERO_LINK = NO 14 | -------------------------------------------------------------------------------- /src/adium/ESSIPEService.h: -------------------------------------------------------------------------------- 1 | // 2 | // ESSIPEService.h 3 | // SIPEAdiumPlugin 4 | // 5 | // Created by Matt Meissner on 10/30/09. 6 | // Modified by Michael Lamb on 2/27/13 7 | // Copyright 2013 Michael Lamb/Harris Kauffman. All rights reserved. 8 | // 9 | 10 | //#import 11 | #import 12 | 13 | @interface ESSIPEService : PurpleService { 14 | 15 | } 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | version 1.25.0 "Buddy Idle Time, RTF" (2019-10-12) 2 | - Feature #107: Provide idle start time for a buddy (Stefan Becker) 3 | - Feature #77: RTF support (incoming) (Stefan Becker) 4 | * the code only extracts plain text from incoming RTF 5 | - Fixed #358: FTBFS with glib-2.0 >= 2.62.0 (Stefan Becker) 6 | - Fixed #350: Inconsistent parsing of From:/To: headers (Stefan Becker) 7 | - raise BR telepathy-glib >= 0.24.0 (Stefan Becker) 8 | - switch from GPLv2+ to SPDX identifier GPL-2.0-or-later (Stefan Becker) 9 | -------------------------------------------------------------------------------- /src/adium/ESSIPELibpurpleServicePlugin.h: -------------------------------------------------------------------------------- 1 | // 2 | // ESSIPELibpurpleServicePlugin.h 3 | // SIPEAdiumPlugin 4 | // 5 | // Created by Matt Meissner on 10/30/09. 6 | // Modified by Michael Lamb on 2/27/13 7 | // Copyright 2013 Michael Lamb/Harris Kauffman. All rights reserved. 8 | // 9 | 10 | #import 11 | #import 12 | 13 | #import "ESSIPEService.h" 14 | 15 | @interface ESSIPELibpurpleServicePlugin : AIPlugin { 16 | ESSIPEService *SIPEService; 17 | } 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /src/Makefile.mingw: -------------------------------------------------------------------------------- 1 | OLD_PIDGIN_TREE_TOP := $(PIDGIN_TREE_TOP) 2 | PIDGIN_TREE_TOP := ../$(OLD_PIDGIN_TREE_TOP) 3 | 4 | include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak 5 | 6 | 7 | .PHONY: all clean install 8 | 9 | all: 10 | $(MAKE) -C core -f $(MINGW_MAKEFILE) 11 | 12 | clean: 13 | $(MAKE) -C core -f $(MINGW_MAKEFILE) clean 14 | 15 | rmbak: 16 | rm -f *~ 17 | $(MAKE) -C core -f $(MINGW_MAKEFILE) rmbak 18 | 19 | install: all 20 | $(MAKE) -C core -f $(MINGW_MAKEFILE) install 21 | 22 | tests: all 23 | $(MAKE) -C core -f $(MINGW_MAKEFILE) tests 24 | -------------------------------------------------------------------------------- /pixmaps/Makefile.common.am: -------------------------------------------------------------------------------- 1 | MAINTAINERCLEANFILES = Makefile.in 2 | EXTRA_DIST = sipe.$(pixmapext) 3 | 4 | if SIPE_INCLUDE_PURPLE 5 | pidginprotocolpixdir = $(datadir)/pixmaps/pidgin/protocols/$(pixmapsize) 6 | pidginprotocolpix_DATA = sipe.$(pixmapext) 7 | endif 8 | 9 | if SIPE_INCLUDE_TELEPATHY 10 | empathyappsiconsdir = $(datadir)/empathy/icons/hicolor/$(pixmapinst)/apps 11 | empathyappsicons_DATA = im-sipe.$(pixmapext) 12 | DISTCLEANFILES = im-sipe.$(pixmapext) 13 | 14 | im-sipe.$(pixmapext): $(srcdir)/sipe.$(pixmapext) 15 | cp $< $@ 16 | endif 17 | -------------------------------------------------------------------------------- /contrib/opensuse-build-service/pidgin-sipe-telepathy.dsc: -------------------------------------------------------------------------------- 1 | Format: 3.0 (quilt) 2 | Source: pidgin-sipe 3 | Version: 1.25.0-1 4 | Binary: pidgin-sipe 5 | Maintainer: pidgin-sipe 6 | Architecture: any 7 | Standards-Version: 3.9.1 8 | Build-Depends: cdbs (>= 0.4.23-1.1), autotools-dev, debhelper (>= 5), pkg-config, libglib2.0-dev (>= 2.28.0), libdbus-1-dev, libxml2-dev, libssl-dev, pidgin-dev, libpurple-dev (>= 2.8.0), appstream-index, libtool, intltool, libkrb5-dev, libzephyr-dev, libtelepathy-glib-dev (>= 0.24.0), libgmime-2.6-dev 9 | Homepage: http://sipe.sourceforge.net/ 10 | -------------------------------------------------------------------------------- /src/adium/PurpleDefaultsSIPE.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SIPE:Authentication Scheme 6 | auto 7 | SIPE:Single Sign On 8 | 9 | SIPE:Dont Publish 10 | 11 | SIPE:Allow Web Photo 12 | 13 | SIPE:BEAST Disable 14 | 15 | SIPE:Connection Type 16 | auto 17 | Connect Host 18 | localhost 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/telepathy/data/Makefile.am: -------------------------------------------------------------------------------- 1 | MAINTAINERCLEANFILES = \ 2 | Makefile.in 3 | 4 | # D-Bus service file 5 | servicedir = $(datadir)/dbus-1/services 6 | service_in_files = org.freedesktop.Telepathy.ConnectionManager.sipe.service.in 7 | service_DATA = $(service_in_files:%.service.in=%.service) 8 | profiledir = $(datadir)/telepathy/profiles 9 | profile_DATA = sipe.profile 10 | EXTRA_DIST = $(service_in_files) sipe.profile 11 | CLEANFILES = $(service_DATA) 12 | 13 | # Rule to make the service file with libexecdir expanded 14 | $(service_DATA): $(service_in_files) Makefile 15 | $(AM_V_GEN)sed -e "s|\@libexecdir\@|$(libexecdir)|" $< >$@ 16 | 17 | -------------------------------------------------------------------------------- /contrib/opensuse-build-service/pidgin-sipe-gstreamer1.dsc: -------------------------------------------------------------------------------- 1 | Format: 3.0 (quilt) 2 | Source: pidgin-sipe 3 | Version: 1.25.0-1 4 | Binary: pidgin-sipe 5 | Maintainer: pidgin-sipe 6 | Architecture: any 7 | Standards-Version: 3.9.1 8 | Build-Depends: cdbs (>= 0.4.23-1.1), autotools-dev, debhelper (>= 5), pkg-config, libglib2.0-dev (>= 2.28.0), libdbus-1-dev, libxml2-dev, libssl-dev, pidgin-dev, libpurple-dev (>= 2.8.0), appstream, libtool, intltool, libkrb5-dev, libzephyr-dev, libnice-dev (>= 0.1.0), libgstreamer1.0-dev, libgstreamer-plugins-base1.0-dev, libfarstream-0.2-dev, libtelepathy-glib-dev (>= 0.24.0), libgmime-2.6-dev, gss-ntlmssp-dev (>= 0.5.0) 9 | Homepage: http://sipe.sourceforge.net/ 10 | -------------------------------------------------------------------------------- /contrib/opensuse-build-service/pidgin-sipe-freerdp2.dsc: -------------------------------------------------------------------------------- 1 | Format: 3.0 (quilt) 2 | Source: pidgin-sipe 3 | Version: 1.25.0-1 4 | Binary: pidgin-sipe 5 | Maintainer: pidgin-sipe 6 | Architecture: any 7 | Standards-Version: 3.9.1 8 | Build-Depends: cdbs (>= 0.4.23-1.1), autotools-dev, debhelper (>= 5), pkg-config, libglib2.0-dev (>= 2.28.0), libdbus-1-dev, libxml2-dev, libssl-dev, pidgin-dev, libpurple-dev (>= 2.8.0), appstream, libtool, intltool, libkrb5-dev, libzephyr-dev, libnice-dev (>= 0.1.0), libgstreamer1.0-dev, libgstreamer-plugins-base1.0-dev, libfarstream-0.2-dev, freerdp2-dev, libtelepathy-glib-dev (>= 0.24.0), libgmime-2.6-dev, gss-ntlmssp-dev (>= 0.5.0) 9 | Homepage: http://sipe.sourceforge.net/ 10 | -------------------------------------------------------------------------------- /src/adium/DCPurpleSIPEJoinChatViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DCPurpleSIPEJoinChatViewController.h 3 | // SIPEAdiumPlugin 4 | // 5 | // Created by Michael Lamb on 02/10/12. 6 | // Copyright 2012 Michael Lamb. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | 13 | @class AICompletingTextField; 14 | 15 | @interface DCPurpleSIPEJoinChatViewController : DCJoinChatViewController { 16 | 17 | IBOutlet NSComboBox *combo_rooms; 18 | IBOutlet NSProgressIndicator *progress_fetch; 19 | 20 | NSTimer *timer; 21 | NSMutableDictionary *room_dict; 22 | struct _PurpleRoomlist *room_list; 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /contrib/opensuse-build-service/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: SIPE Project 2 | 3 | pkgname=pidgin-sipe 4 | pkgver=1.25.0 5 | pkgrel=1 6 | pkgdesc="Libpurple protocol plugin to connect to MS Office Communicator" 7 | arch=('x86_64') 8 | license=('GPL-2.0-or-later') 9 | url="https://sipe.sourceforge.net/" 10 | depends=('gmime' 'libpurple') 11 | makedepends=('intltool') 12 | optdepends=('freerdp: Desktop sharing' 'krb5: Kerberos support') 13 | source=( ${pkgname}-${pkgver}.tar.gz ) 14 | sha256sums=( '@@SHA256SUM@@' ) 15 | 16 | build() { 17 | cd "${pkgname}-${pkgver}" 18 | 19 | ./configure --prefix=/usr --with-vv 20 | 21 | make 22 | } 23 | 24 | package() { 25 | cd "${pkgname}-${pkgver}" 26 | 27 | make DESTDIR="${pkgdir}" install 28 | } 29 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | Bugs: 2 | 3 | Big Targets: 4 | - Native telepahty backend 5 | - Desktop sharing/Live Meeting integration on Windows platform. 6 | - Update projects site with 7 | * SIPE features 8 | * better/more complete screenshots 9 | * page about standards used in SIPE with references 10 | 11 | Call Control: 12 | - change user state to On Call when line is active and then back 13 | - answer incoming call (logs required) 14 | - (?) work with multiple phone lines (not the first one) 15 | - (?) Call transfer set up, other RCC features from Communicator. 16 | 17 | Group Chat: 18 | - channel management: add, delete 19 | - (?) lock/unlock channel (is this possible?) 20 | - file sharing: up & downloading from web server 21 | - ??? (unknown as we don't have XCCOS protocol specification) 22 | -------------------------------------------------------------------------------- /src/adium/xcconfigs/SIPEAdiumPlugin.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // SIPEAdiumPlugin.xcconfig 3 | // SIPEAdiumPlugin 4 | // 5 | // Created by Lamb, Michael on 11/13/13. 6 | // 7 | // 8 | PRODUCT_NAME = SIPEAdiumPlugin 9 | OTHER_LDFLAGS = -lxml2 -Lopenssl -lcrypto.0.9.8 -undefined dynamic_lookup 10 | LD_RUNPATH_SEARCH_PATHS = @loader_path/../Frameworks 11 | INFOPLIST_FILE = Info.plist 12 | WRAPPER_EXTENSION = AdiumLibpurplePlugin 13 | GCC_PREFIX_HEADER = SIPEAdiumPlugin_Prefix.pch 14 | DEPLOYMENT_LOCATION = YES 15 | DEPLOYMENT_POSTPROCESSING = YES 16 | DSTROOT = 17 | INSTALL_PATH = $(HOME)/Library/Application Support/Adium 2.0/PlugIns/ 18 | FRAMEWORK_SEARCH_PATHS = "$(BUILT_PRODUCTS_DIR)" ./adium-frameworks ../../../adium/Frameworks 19 | USER_HEADER_SEARCH_PATHS = "$(BUILT_PRODUCTS_DIR)/Adium.framework/Headers" ./adium-frameworks/Adium.framework/Headers ../../../adium/Source 20 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | ############################################################################### 3 | # Generate GITVERSION 4 | ############################################################################### 5 | _gitversion=$(git describe | grep -e -) 6 | if [ -n "${_gitversion}" ]; then 7 | _gitversion=$(echo ${_gitversion} | cut -d- -f3 | sed 's/^g//') 8 | echo -n ${_gitversion} >GITVERSION 9 | else 10 | rm -f GITVERSION 11 | fi 12 | 13 | ############################################################################### 14 | # Set up build from git tree 15 | ############################################################################### 16 | set -e 17 | 18 | # Set up initial NLS stuff... 19 | autopoint --force 20 | 21 | # ...now replace "autopoint" with "intltoolize" in full setup run 22 | AUTOPOINT="intltoolize --copy --force --automake" \ 23 | autoreconf --force --install 24 | -------------------------------------------------------------------------------- /src/miranda/miranda-version.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file miranda-version.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2011 SIPE Project 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #define MIRANDA_VER 0x900 24 | 25 | -------------------------------------------------------------------------------- /src/core/sip-sec-basic.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sip-sec-basic.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2013 SIPE Project 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | SipSecContext 25 | sip_sec_create_context__basic(guint type); 26 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = src pixmaps po 2 | 3 | EXTRA_DIST = \ 4 | contrib \ 5 | intltool-extract.in \ 6 | intltool-merge.in \ 7 | intltool-update.in \ 8 | pidgin-sipe.nsi \ 9 | pidgin-sipe.wxs \ 10 | siplcs.vcxproj \ 11 | siplcs.vcxproj.filters \ 12 | Makefile.mingw \ 13 | po/Makefile.mingw 14 | 15 | CLEANFILES = \ 16 | intltool-extract \ 17 | intltool-update \ 18 | intltool-merge 19 | 20 | MAINTAINERCLEANFILES = \ 21 | aclocal.m4 \ 22 | ABOUT-NLS \ 23 | compile \ 24 | configure \ 25 | config.guess \ 26 | config.h.in \ 27 | config.rpath \ 28 | config.sub \ 29 | depcomp \ 30 | GITVERSION \ 31 | INSTALL \ 32 | install-sh \ 33 | intltool-extract.in \ 34 | intltool-merge.in \ 35 | intltool-update.in \ 36 | ltmain.sh \ 37 | Makefile.in \ 38 | missing \ 39 | mkinstalldirs \ 40 | po/Makevars.template \ 41 | po/Rules-quot \ 42 | po/*.header \ 43 | po/*.sed \ 44 | po/*.sin \ 45 | test-driver \ 46 | ylwrap 47 | 48 | maintainer-clean-local: 49 | -rm -rf m4 50 | 51 | ACLOCAL_AMFLAGS = -I m4 52 | -------------------------------------------------------------------------------- /src/core/sip-sec-negotiate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sip-sec-negotiate.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2013 SIPE Project 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | SipSecContext 25 | sip_sec_create_context__negotiate(guint type); 26 | -------------------------------------------------------------------------------- /src/core/libsiperc.rc.in: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | VS_VERSION_INFO VERSIONINFO 4 | FILEVERSION #SIPE_VERSION#,0 5 | PRODUCTVERSION #SIPE_VERSION#,0 6 | FILEFLAGSMASK 0 7 | FILEFLAGS 0 8 | FILEOS VOS__WINDOWS32 9 | FILETYPE VFT_DLL 10 | FILESUBTYPE VFT2_UNKNOWN 11 | BEGIN 12 | BLOCK "StringFileInfo" 13 | BEGIN 14 | BLOCK "040904B0" 15 | BEGIN 16 | VALUE "CompanyName", "SIPE Project " 17 | VALUE "FileDescription", "LibSipe third-party plugin for LibPurple" 18 | VALUE "FileVersion", "@SIPE_VERSION@" 19 | VALUE "InternalName", "libsipe" 20 | VALUE "LegalCopyright", "Copyright (C) 2010-2013 SIPE Project (See the COPYRIGHT file in the source distribution)." 21 | VALUE "OriginalFilename", "libsipe.dll" 22 | VALUE "ProductName", "LibSipe" 23 | VALUE "ProductVersion", "@SIPE_VERSION@" 24 | END 25 | END 26 | BLOCK "VarFileInfo" 27 | BEGIN 28 | VALUE "Translation", 0x409, 1200 29 | END 30 | END 31 | -------------------------------------------------------------------------------- /src/core/sipe-win32dep.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sipe-win32dep.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2010 pier11 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #include 24 | 25 | char *wpurple_read_reg_expand_string(HKEY rootkey, const char *subkey, const char *valname); 26 | -------------------------------------------------------------------------------- /pixmaps/Makefile.mingw: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile.mingw 3 | # 4 | # Description: Makefile for win32 (mingw) version of Pidgin pixmaps 5 | # 6 | 7 | OLD_PIDGIN_TREE_TOP := $(PIDGIN_TREE_TOP) 8 | PIDGIN_TREE_TOP := ../$(OLD_PIDGIN_TREE_TOP) 9 | 10 | include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak 11 | 12 | datadir := $(PIDGIN_INSTALL_DIR) 13 | pidginprotocolpixdir = $(datadir)/pixmaps/pidgin/protocols 14 | 15 | PROTOCOLS_16 = \ 16 | 16/sipe.png 17 | 18 | PROTOCOLS_22 = \ 19 | 22/sipe.png 20 | 21 | PROTOCOLS_48 = \ 22 | 48/sipe.png 23 | 24 | PROTOCOLS_scalable = \ 25 | scalable/sipe.svg 26 | 27 | nobase_dist_pidginpixmap_DATA = \ 28 | $(PROTOCOLS_16) \ 29 | $(PROTOCOLS_22) \ 30 | $(PROTOCOLS_48) \ 31 | $(PROTOCOLS_scalable) \ 32 | 33 | .PHONY: install 34 | 35 | install: 36 | if test '$(nobase_dist_pidginpixmap_DATA)'; then \ 37 | list='$(nobase_dist_pidginpixmap_DATA)'; for file in $$list; do \ 38 | dir=`dirname $$file`; \ 39 | mkdir -p $(pidginprotocolpixdir)/$$dir; \ 40 | cp $$file $(pidginprotocolpixdir)/$$dir/; \ 41 | done; \ 42 | fi; 43 | -------------------------------------------------------------------------------- /src/core/sip-sec-tls-dsk.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sip-sec-tls-dsk.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2011-12 SIPE Project 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | SipSecContext 25 | sip_sec_create_context__tls_dsk(guint type); 26 | 27 | gboolean sip_sec_password__tls_dsk(void); 28 | -------------------------------------------------------------------------------- /po/POTFILES.in: -------------------------------------------------------------------------------- 1 | # List of source files containing translatable strings. 2 | [encoding: UTF-8] 3 | 4 | src/adium/ESPurpleSIPEAccount.h 5 | src/core/sip-transport.c 6 | src/core/sipe-appshare.c 7 | src/core/sipe-buddy.c 8 | src/core/sipe-cal.c 9 | src/core/sipe-certificate.c 10 | src/core/sipe-chat.c 11 | src/core/sipe-conf.c 12 | src/core/sipe-core.c 13 | src/core/sipe-domino.c 14 | src/core/sipe-ft.c 15 | src/core/sipe-ft-lync.c 16 | src/core/sipe-ft-tftp.c 17 | src/core/sipe-group.c 18 | src/core/sipe-groupchat.c 19 | src/core/sipe-im.c 20 | src/core/sipe-incoming.c 21 | src/core/sipe-media.c 22 | src/core/sipe-notify.c 23 | src/core/sipe-ocs2007.c 24 | src/core/sipe-status.c 25 | src/core/sipe-subscriptions.c 26 | src/core/sipe-ucs.c 27 | src/core/sipe-user.c 28 | src/purple/purple-buddy.c 29 | src/purple/purple-chat.c 30 | src/purple/purple-groupchat.c 31 | src/purple/purple-im.c 32 | src/purple/purple-plugin-common.c 33 | src/purple/purple-search.c 34 | src/purple/purple-transport.c 35 | src/purple/purple-user.c 36 | src/telepathy/telepathy-protocol.c 37 | src/telepathy/telepathy-transport.c 38 | -------------------------------------------------------------------------------- /src/adium/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleName 10 | ${PRODUCT_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | net.sourceforge.sipe.${PRODUCT_NAME:rfc1034Identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundlePackageType 18 | BNDL 19 | CFBundleSignature 20 | AdIM 21 | AIMinimumAdiumVersionRequirement 22 | 1.5 23 | CFBundleShortVersionString 24 | PACKAGE_STRING 25 | CFBundleVersion 26 | PACKAGE_VERSION 27 | NSPrincipalClass 28 | ESSIPELibpurpleServicePlugin 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/core/sip-sec-sspi.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sip-sec-sspi.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2012 SIPE Project 7 | * Copyright (C) 2009 pier11 8 | * 9 | * 10 | * This program is free software; you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation; either version 2 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 23 | */ 24 | 25 | SipSecContext 26 | sip_sec_create_context__sspi(guint type); 27 | 28 | gboolean sip_sec_password__sspi(void); 29 | -------------------------------------------------------------------------------- /src/core/uuid.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file uuid.h 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | */ 18 | 19 | /* 20 | * Interface dependencies: 21 | * 22 | * 23 | */ 24 | 25 | /* Must be g_free'd */ 26 | char *generateUUIDfromEPID(const gchar *epid); 27 | 28 | /* Must be g_free'd */ 29 | char *sipe_get_epid(const char *self_sip_uri, 30 | const char *hostname, 31 | const char *ip_address); 32 | -------------------------------------------------------------------------------- /src/core/sip-sec-gssapi.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sip-sec-gssapi.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2010,2012 SIPE Project 7 | * Copyright (C) 2009 pier11 8 | * 9 | * 10 | * This program is free software; you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation; either version 2 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 23 | */ 24 | 25 | SipSecContext 26 | sip_sec_create_context__gssapi(guint type); 27 | 28 | gboolean sip_sec_password__gssapi(void); 29 | -------------------------------------------------------------------------------- /src/core/sip-sec-ntlm.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sip-sec-ntlm.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2010-12 SIPE Project 7 | * Copyright (C) 2009 pier11 8 | * 9 | * 10 | * This program is free software; you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation; either version 2 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 23 | */ 24 | 25 | SipSecContext 26 | sip_sec_create_context__ntlm(guint type); 27 | 28 | gboolean sip_sec_password__ntlm(void); 29 | 30 | void sip_sec_init__ntlm(void); 31 | void sip_sec_destroy__ntlm(void); 32 | -------------------------------------------------------------------------------- /src/core/sipe-appshare.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sipe-appshare.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2014-2018 SIPE Project 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | /* Forward declarations */ 24 | struct sipe_core_private; 25 | struct sipe_media_call; 26 | struct sipmsg; 27 | 28 | void process_incoming_invite_appshare(struct sipe_core_private *sipe_private, 29 | struct sipmsg *msg); 30 | 31 | sipe_appshare_role sipe_appshare_get_role(struct sipe_media_call *call); 32 | -------------------------------------------------------------------------------- /src/core/md4.h: -------------------------------------------------------------------------------- 1 | /* vim:set ts=2 sw=2 et cindent: */ 2 | /* This Source Code Form is subject to the terms of the Mozilla Public 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 5 | 6 | #ifndef md4_h__ 7 | #define md4_h__ 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | #include 14 | 15 | /** 16 | * md4sum - computes the MD4 sum over the input buffer per RFC 1320 17 | * 18 | * @param input 19 | * buffer containing input data 20 | * @param inputLen 21 | * length of input buffer (number of bytes) 22 | * @param result 23 | * 16-byte buffer that will contain the MD4 sum upon return 24 | * 25 | * NOTE: MD4 is superceded by MD5. do not use MD4 unless required by the 26 | * protocol you are implementing (e.g., NTLM requires MD4). 27 | * 28 | * NOTE: this interface is designed for relatively small buffers. A streaming 29 | * interface would make more sense if that were a requirement. Currently, this 30 | * is good enough for the applications we care about. 31 | */ 32 | void md4sum(const uint8_t *input, uint32_t inputLen, uint8_t *result); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /* md4_h__ */ 39 | -------------------------------------------------------------------------------- /contrib/debian/control: -------------------------------------------------------------------------------- 1 | Source: pidgin-sipe 2 | Section: misc 3 | Priority: optional 4 | Maintainer: Anibal Avelar 5 | Homepage: http://sipe.sourceforge.net/ 6 | # FYI: libnss3-dev can be replaced with libssl-dev 7 | Build-Depends: cdbs (>= 0.4.23-1.1), autotools-dev, debhelper (>= 5), pkg-config, libglib2.0-dev (>= 2.18.0), libdbus-1-dev, libxml2-dev, libnss3-dev, pidgin-dev, libpurple-dev (>= 2.7.0), libtool, intltool, libkrb5-dev, libzephyr-dev 8 | Standards-Version: 3.9.1 9 | 10 | Package: pidgin-sipe 11 | Section: net 12 | Priority: optional 13 | Architecture: any 14 | Depends: ${shlibs:Depends}, ${misc:Depends} 15 | Description: Pidgin protocol plugin to connect to MS Office Communicator 16 | A third-party plugin for the Pidgin multi-protocol instant messenger. 17 | It implements the extended version of SIP/SIMPLE used by various products: 18 | . 19 | * Skype for Business 20 | * Microsoft Office 365 21 | * Microsoft Business Productivity Online Suite (BPOS) 22 | * Microsoft Lync Server 23 | * Microsoft Office Communications Server (OCS 2007/2007 R2) 24 | * Microsoft Live Communications Server (LCS 2003/2005) 25 | . 26 | With this plugin you should be able to replace your Microsoft Office 27 | Communicator client with Pidgin. 28 | -------------------------------------------------------------------------------- /contrib/opensuse-build-service/generate_nsi.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | use 5.008; 3 | use strict; 4 | use warnings; 5 | 6 | # check commandline arguments 7 | die "Usage: $0 < nsi-template > nsi-output\n" 8 | if @ARGV < 1; 9 | 10 | # process LINGUAS file 11 | open(my $fh, "<", $ARGV[0]) 12 | or die "$0: can't open LINGUAS file '$ARGV[0]': $!\n"; 13 | my %languages = map { ($_, 1) } map { chomp; s/^\s+//; s/\s+$//; $_ } <$fh>; 14 | close($fh) 15 | or die "$0: error while reading LINGUAS file '$ARGV[0]': $!\n"; 16 | print STDERR "Found ", scalar(keys %languages), " language(s): ", 17 | join(" ", sort keys %languages), "\n"; 18 | 19 | # read .nsi template from STDIN 20 | # write .nsi file to STDOUT 21 | while () { 22 | if (/^;;; INSTALL_FILES_LOCALE/) { 23 | print map({ 24 | ("SetOutPath \"\$INSTDIR\\locale\\$_\\LC_MESSAGES\"\n", 25 | "File \"\${MINGW_DATADIR}\\locale\\$_\\LC_MESSAGES\\pidgin-sipe.mo\"\n") 26 | } sort keys %languages); 27 | } elsif (/^;;; DELETE_FILES_LOCALE/) { 28 | print map({ 29 | "Delete \"\$INSTDIR\\locale\\$_\\LC_MESSAGES\\pidgin-sipe.mo\"\n" 30 | } sort keys %languages); 31 | } else { 32 | print; 33 | } 34 | } 35 | 36 | # That's all folks... 37 | exit 0; 38 | -------------------------------------------------------------------------------- /po/Makefile.mingw: -------------------------------------------------------------------------------- 1 | # Makefile.mingw 2 | # 3 | # Description: Makefile to generate mo files 4 | # 5 | 6 | OLD_PIDGIN_TREE_TOP := $(PIDGIN_TREE_TOP) 7 | PIDGIN_TREE_TOP := ../$(OLD_PIDGIN_TREE_TOP) 8 | 9 | include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak 10 | 11 | PACKAGE = pidgin-sipe 12 | 13 | .SUFFIXES: 14 | .SUFFIXES: .po .gmo 15 | 16 | ## 17 | ## SOURCES, OBJECTS 18 | ## 19 | 20 | CATALOGS = $(patsubst %.po,%.gmo,$(wildcard *.po)) 21 | 22 | ## 23 | ## RULES 24 | ## 25 | 26 | .po.gmo: 27 | rm -f $@ && $(GMSGFMT) --statistics -o $@ $< 28 | 29 | ## 30 | ## TARGETS 31 | ## 32 | 33 | .PHONY: all install clean 34 | 35 | all: $(CATALOGS) 36 | 37 | install: all 38 | mkdir -p $(PURPLE_INSTALL_PO_DIR) 39 | @catalogs='$(CATALOGS)'; \ 40 | for cat in $$catalogs; do \ 41 | cat=`basename $$cat`; \ 42 | lang=`echo $$cat | sed 's/\.gmo$$//'`; \ 43 | dir=$(PURPLE_INSTALL_PO_DIR)/$$lang/LC_MESSAGES; \ 44 | mkdir -p $$dir; \ 45 | if test -r $$cat; then \ 46 | cp $$cat $$dir/$(PACKAGE).mo; \ 47 | echo "installing $$cat as $$dir/$(PACKAGE).mo"; \ 48 | else \ 49 | cp $(PURPLE_PO_TOP)/$$cat $$dir/$(PACKAGE).mo; \ 50 | echo "installing $(PURPLE_PO_TOP)/$$cat as" \ 51 | "$$dir/$(PACKAGE).mo"; \ 52 | fi; \ 53 | done 54 | 55 | clean: 56 | rm -f *.gmo 57 | -------------------------------------------------------------------------------- /src/core/sipe-domino.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sipe-domino.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2010 pier11 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | /* Forward declarations */ 24 | struct sipe_core_private; 25 | 26 | /** 27 | * Connects to Lotus Domino Web Access server, 28 | * pulls out our Calendar information 29 | * and publishes it to Office Communications server. 30 | * 31 | * Advised schedule: 30 minutes. 32 | */ 33 | void 34 | sipe_domino_update_calendar(struct sipe_core_private *sipe_private); 35 | -------------------------------------------------------------------------------- /src/core/sipe-notify.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sipe-notify.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2011-2013 SIPE Project 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | /* Forward declarations */ 25 | struct sipmsg; 26 | struct sipe_core_private; 27 | 28 | void process_incoming_notify(struct sipe_core_private *sipe_private, 29 | struct sipmsg *msg); 30 | 31 | /* 32 | Local Variables: 33 | mode: c 34 | c-file-style: "bsd" 35 | indent-tabs-mode: t 36 | tab-width: 8 37 | End: 38 | */ 39 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *Makefile 3 | *Makefile.in 4 | *Makefile.in.in 5 | *.la 6 | *.lo 7 | *.log 8 | .deps 9 | .libs 10 | libtool 11 | config.* 12 | configure 13 | /ABOUT-NLS 14 | autom4te* 15 | *.swp 16 | aclocal.m4 17 | compile 18 | depcomp 19 | GITVERSION 20 | install-sh 21 | intltool-extract* 22 | intltool-merge* 23 | intltool-update* 24 | *.bz2 25 | *.gz 26 | *.xz 27 | ltmain.sh 28 | /m4/ 29 | missing 30 | mkinstalldirs 31 | /INSTALL 32 | pixmaps/*/im-sipe.* 33 | po/Makevars.template 34 | po/POTFILES 35 | po/Rules-quot 36 | po/stamp-it 37 | po/*.header 38 | po/*.sed 39 | po/*.sin 40 | *.gmo 41 | src/*/*.o 42 | src/adium/adium-frameworks 43 | src/adium/SIPEAdiumPlugin.xcodeproj/project.pbxproj-e 44 | src/adium/SIPEAdiumPlugin.xcodeproj/project.xcworkspace/ 45 | src/adium/SIPEAdiumPlugin.xcodeproj/xcuserdata/ 46 | src/core/sipe-rtf.c 47 | src/core/*_tests 48 | src/core/sipe_ntlm_analyzer 49 | src/core/sipe_tls_analyzer 50 | src/core/sipe_tls_tester 51 | src/purple/tests 52 | src/purple/tests_load 53 | src/telepathy/telepathy-sipe 54 | src/telepathy/data/org.freedesktop.Telepathy.ConnectionManager.sipe.service 55 | stamp-h1 56 | siplcs.vcxproj.user 57 | test-driver 58 | ylwrap 59 | *.trs 60 | *.DS_Store 61 | adium/SIPEAdiumPlugin.xcodeproj/project.xcworkspace/* 62 | adium/SIPEAdiumPlugin.xcodeproj/xcuserdata/* 63 | -------------------------------------------------------------------------------- /src/telepathy/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = data 2 | 3 | MAINTAINERCLEANFILES = \ 4 | Makefile.in 5 | 6 | libexec_PROGRAMS = telepathy-sipe 7 | 8 | telepathy_sipe_SOURCES = \ 9 | telepathy-buddy.c \ 10 | telepathy-connection.c \ 11 | telepathy-debug.c \ 12 | telepathy-dnsquery.c \ 13 | telepathy-main.c \ 14 | telepathy-private.h \ 15 | telepathy-protocol.c \ 16 | telepathy-schedule.c \ 17 | telepathy-search.c \ 18 | telepathy-status.c \ 19 | telepathy-stubs.c \ 20 | telepathy-tls.c \ 21 | telepathy-transport.c 22 | 23 | AM_CFLAGS = $(st) 24 | 25 | telepathy_sipe_CFLAGS = \ 26 | $(DEBUG_CFLAGS) \ 27 | $(QUALITY_CFLAGS) \ 28 | $(LOCALE_CPPFLAGS) \ 29 | $(TELEPATHY_GLIB_CFLAGS) \ 30 | $(DBUS_GLIB_CFLAGS) \ 31 | $(GIO_CFLAGS) \ 32 | $(GOBJECT_CFLAGS) \ 33 | $(GLIB_CFLAGS) \ 34 | -I$(srcdir)/../api 35 | 36 | telepathy_sipe_LDADD = \ 37 | ../core/libsipe_core.la \ 38 | ../core/libsipe_core_crypto.la \ 39 | ../core/libsipe_core_libxml2.la \ 40 | ../core/libsipe_core_mime.la \ 41 | $(GMIME_LIBS) \ 42 | $(LIBXML2_LIBS) \ 43 | $(NSS_LIBS) \ 44 | $(OPENSSL_LIBS) \ 45 | $(TELEPATHY_GLIB_LIBS) \ 46 | $(DBUS_GLIB_LIBS) \ 47 | $(GIO_LIBS) \ 48 | $(GOBJECT_LIBS) \ 49 | $(GLIB_LIBS) 50 | 51 | if SIPE_HAVE_APPSHARE_SERVER 52 | telepathy_sipe_LDADD += \ 53 | $(FREERDP_SHADOW_LIBS) 54 | endif 55 | -------------------------------------------------------------------------------- /src/core/sipe-rtf.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sipe-rtf.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2018 SIPE Project 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | * 22 | * 23 | * Simple parser to extract plain text from RTF and transform it to HTML 24 | */ 25 | 26 | /* 27 | * Interface dependencies: 28 | * 29 | * 30 | */ 31 | 32 | /** 33 | * Extract plain text from RTF and transform it to HTML 34 | * 35 | * @param rtf pointer to RTF text 36 | * @return string with HTML. Must be g_free()'d. 37 | */ 38 | gchar *sipe_rtf_to_html(const gchar *rtf); 39 | -------------------------------------------------------------------------------- /src/adium/ESSIPEAccountViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ESSIPEAccountViewController.h 3 | // SIPEAdiumPlugin 4 | // 5 | // Created by Matt Meissner on 10/30/09. 6 | // Modified by Michael Lamb on 2/27/13 7 | // Copyright 2013 Michael Lamb/Harris Kauffman. All rights reserved. 8 | // 9 | 10 | 11 | #import 12 | #import 13 | 14 | @interface ESSIPEAccountViewController : PurpleAccountViewController { 15 | 16 | IBOutlet NSTextField *textField_windowsLogin; 17 | IBOutlet NSTextField *textField_server; 18 | IBOutlet NSTextField *textField_userAgent; 19 | IBOutlet NSTextField *textField_emailURL; 20 | IBOutlet NSTextField *textField_email; 21 | IBOutlet NSTextField *textField_emailLogin; 22 | IBOutlet NSTextField *textField_emailPassword; 23 | IBOutlet NSTextField *textField_groupchatUser; 24 | 25 | IBOutlet NSButton *checkBox_autoDiscover; 26 | IBOutlet NSButton *checkBox_singleSignOn; 27 | IBOutlet NSButton *checkbox_dontPublish; 28 | IBOutlet NSButton *checkbox_beastDisable; 29 | IBOutlet NSButton *checkbox_allowWebPhoto; 30 | 31 | IBOutlet NSPopUpButton *popup_connectionType; 32 | IBOutlet NSPopUpButton *popup_authenticationScheme; 33 | 34 | NSDictionary *sipe_key_to_gui; 35 | } 36 | 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /contrib/mingw-cross-compile/local.mak: -------------------------------------------------------------------------------- 1 | # 2 | # Fedora 19+: upgrade to mingw32-gcc 4.8.x breaks backward compatibility. 3 | # Fetch F18 packages of mingw32-gcc and set PIDGIN_MINGW_ROOT 4 | # and LD_LIBRARY_PATH to the local install root. 5 | # 6 | ifneq ($(wildcard $(PIDGIN_MINGW_ROOT)/bin/i686-w64-mingw32-*),) 7 | # Fedora 17+ 8 | CC := $(PIDGIN_MINGW_ROOT)/bin/i686-w64-mingw32-gcc 9 | STRIP := $(PIDGIN_MINGW_ROOT)/bin/i686-w64-mingw32-strip 10 | WINDRES := $(PIDGIN_MINGW_ROOT)/bin/i686-w64-mingw32-windres 11 | EXTUTILS := /usr/share/perl5/ExtUtils 12 | else ifneq ($(wildcard $(PIDGIN_MINGW_ROOT)/usr/bin/i686-pc-mingw32-*),) 13 | # Fedora 14 | CC := $(PIDGIN_MINGW_ROOT)/usr/bin/i686-pc-mingw32-gcc 15 | STRIP := $(PIDGIN_MINGW_ROOT)/usr/bin/i686-pc-mingw32-strip 16 | WINDRES := $(PIDGIN_MINGW_ROOT)/usr/bin/i686-pc-mingw32-windres 17 | EXTUTILS := /usr/share/perl5/ExtUtils 18 | else 19 | # Ubuntu 20 | CC := /usr/bin/i586-mingw32msvc-cc 21 | STRIP := /usr/bin/i586-mingw32msvc-strip 22 | WINDRES := /usr/bin/i586-mingw32msvc-windres 23 | EXTUTILS := /usr/share/perl/5.10/ExtUtils 24 | endif 25 | 26 | # common 27 | GMSGFMT := msgfmt 28 | MAKENSIS := /usr/bin/makensis 29 | PERL := /usr/bin/perl 30 | 31 | INCLUDE_PATHS := -I\$(PIDGIN_TREE_TOP)/../win32-dev/w32api/include 32 | LIB_PATHS := -L\$(PIDGIN_TREE_TOP)/../win32-dev/w32api/lib 33 | -------------------------------------------------------------------------------- /src/adium/ESSIPELibpurpleServicePlugin.m: -------------------------------------------------------------------------------- 1 | // 2 | // ESSIPELibpurpleServicePlugin.m 3 | // SIPEAdiumPlugin 4 | // 5 | // Copyright (C) 2015 SIPE Project 6 | // 7 | // Created by Matt Meissner on 10/30/09. 8 | // Modified by Michael Lamb on 2/27/13 9 | // Copyright 2013 Michael Lamb/Harris Kauffman. All rights reserved. 10 | // 11 | 12 | #import "ESSIPEService.h" 13 | #import "ESSIPELibpurpleServicePlugin.h" 14 | 15 | // C declarations 16 | extern void purple_init_sipe_plugin(void); 17 | 18 | @implementation ESSIPELibpurpleServicePlugin 19 | 20 | # pragma mark Plugin Load/Install 21 | - (void)installLibpurplePlugin { 22 | } 23 | 24 | - (void)loadLibpurplePlugin 25 | { 26 | } 27 | 28 | - (void)installPlugin 29 | { 30 | purple_init_sipe_plugin(); 31 | [ESSIPEService registerService]; 32 | } 33 | 34 | #pragma mark Plugin Metadata 35 | - (NSString *)libpurplePluginPath 36 | { 37 | return [[NSBundle bundleForClass:[self class]] resourcePath]; 38 | } 39 | 40 | - (NSString*) pluginAuthor { 41 | return @"Harris Kauffman, Michael Lamb"; 42 | } 43 | 44 | - (NSString*) pluginVersion { 45 | return @PACKAGE_VERSION; 46 | } 47 | 48 | - (NSString*) pluginDescription { 49 | return @"Allows Adium to connect to Office Communicator accounts"; 50 | } 51 | 52 | - (NSString*) pluginWebsite { 53 | return @PACKAGE_URL; 54 | } 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /src/core/sipe-ft-lync.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sipe-ft-lync.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2014-2015 SIPE Project 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | /* Forward declarations */ 24 | struct sipe_core_private; 25 | struct sipmsg; 26 | 27 | struct sipe_file_transfer * 28 | sipe_file_transfer_lync_new_outgoing(struct sipe_core_private *sipe_private); 29 | 30 | void process_incoming_invite_ft_lync(struct sipe_core_private *sipe_private, 31 | struct sipmsg *msg); 32 | 33 | void process_incoming_info_ft_lync(struct sipe_core_private *sipe_private, 34 | struct sipmsg *msg); 35 | -------------------------------------------------------------------------------- /src/miranda/miranda-resource.h: -------------------------------------------------------------------------------- 1 | #ifndef IDC_STATIC 2 | #define IDC_STATIC (-1) 3 | #endif 4 | 5 | #define IDD_ACCMGRUI 135 6 | #define IDD_OPT_SIPSIMPLE 137 7 | #define IDD_OPT_SIPSIMPLE_ABOUT 139 8 | #define IDD_SEARCHUI 142 9 | #define IDC_USESSO 1000 10 | #define IDC_CONNTYPE 1001 11 | #define IDC_AUTHTYPE 1002 12 | #define IDC_ABOUTSIPE 1003 13 | #define IDC_IPPROGEXE 1005 14 | #define IDC_IPLOCALFOUND 1006 15 | #define IDC_PASSWORD 1020 16 | #define IDC_LOGIN 1021 17 | #define IDC_HANDLE 1022 18 | #define IDC_PUBLICIP 1024 19 | #define IDC_SSO 1030 20 | #define IDC_MSO 1031 21 | #define IDC_IPLOCAL 1040 22 | #define IDC_IPMANUAL 1041 23 | #define IDC_IPPROG 1042 24 | #define IDC_SEARCH_FN 1044 25 | #define IDC_SEARCH_LN 1045 26 | #define IDC_SEARCH_COMPANY 1046 27 | #define IDC_SEARCH_COUNTRY 1047 28 | -------------------------------------------------------------------------------- /contrib/dbus/sipe-reset-status.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # @file sipe-reset-status.pl 4 | # 5 | # pidgin-sipe 6 | # 7 | # Copyright (C) 2017 SIPE Project 8 | # 9 | # This program is free software; you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation; either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # This program is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with this program; if not, write to the Free Software 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | # 23 | # 24 | # Test code for D-Bus interface "SipeResetStatus" 25 | # 26 | use 5.024; 27 | use strict; 28 | use warnings; 29 | 30 | use FindBin; 31 | use lib $FindBin::Bin; 32 | use SipeHelper; 33 | 34 | SipeHelper::init(); 35 | SipeHelper::forSipeAccounts(sub { 36 | my($purple, $accountId, $username) = @_; 37 | print "Trying to reset status on SIPE account '${username}'...\n"; 38 | $purple->SipeResetStatus($accountId); 39 | }); 40 | 41 | # That's all folks... 42 | exit 0; 43 | -------------------------------------------------------------------------------- /git-snapshot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Take a snapshot of the current pidgin-sipe git HEAD from the mob branch. 4 | # 5 | # You can specify the path to a local repository to speed up the cloning 6 | # process. The output will be a bzip2 compressed tarball whose name includes 7 | # the current date and the abbreviated commit object name of HEAD. 8 | # 9 | # Adapted from several examples found on the Internet. 10 | # 11 | # Configuration 12 | PROJECT=pidgin-sipe 13 | REPOSITORY="git+ssh://mob@repo.or.cz/srv/git/siplcs.git" 14 | BRANCH=mob 15 | 16 | # Create clone 17 | set -e 18 | TODAY=$(date +%Y%m%d) 19 | CLONEDIR=${PROJECT}-${TODAY} 20 | echo "Clone directory '$CLONEDIR'." 21 | REFERENCE=${1:+--reference $1} 22 | if [ -n "$1" ]; then 23 | echo "Using local repository under '$1'." 24 | fi 25 | if [ -n "$2" ]; then 26 | REPOSITORY=$2 27 | fi 28 | echo "Cloning from repository URL '$REPOSITORY'." 29 | rm -rf $CLONEDIR 30 | git clone -n $REFERENCE $REPOSITORY $CLONEDIR 31 | cd $CLONEDIR 32 | git checkout -q -b $CLONEDIR origin/$BRANCH 33 | 34 | # Create archive 35 | COMMIT=$(git log -n 1 --abbrev-commit --pretty=oneline | cut -d' ' -f1| sed -e 's/\.//g') 36 | PREFIX=${PROJECT}-${TODAY}git${COMMIT} 37 | ARCHIVE=${PREFIX}.tar.bz2 38 | echo "Creating archive '$ARCHIVE'..." 39 | git archive --format=tar --prefix=$PREFIX/ HEAD | bzip2 >../${PREFIX}.tar.bz2 40 | 41 | # Cleanup 42 | echo "Cleanup..." 43 | cd .. 44 | rm -rf $CLONEDIR 45 | echo "DONE." 46 | -------------------------------------------------------------------------------- /src/purple/pidgin-sipe.metainfo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | net.sourceforge.sipe.purple 4 | pidgin.desktop 5 | SIPE 6 | Pidgin protocol plugin to connect to MS Office Communicator 7 | 8 |

9 | SIPE is a third-party plugin for the Pidgin/Adium/Miranda/Telepathy 10 | multi-protocol instant messaging clients/frameworks. It implements the 11 | extended version of SIP/SIMPLE used by various products: 12 |

13 |
    14 |
  • Skype for Business
  • 15 |
  • Microsoft Office 365
  • 16 |
  • Microsoft Business Productivity Online Suite (BPOS)
  • 17 |
  • Microsoft Lync Server
  • 18 |
  • Microsoft Office Communications Server (OCS 2007/2007 R2)
  • 19 |
  • Microsoft Live Communications Server (LCS 2003/2005)
  • 20 |
21 |

22 | With this plugin you should be able to replace your Microsoft Office 23 | Communicator client with Pidgin/Adium/Miranda/Telepathy. 24 |

25 |
26 | http://sipe.sourceforge.net/ 27 | https://sourceforge.net/p/sipe/bugs/ 28 | GFDL-1.3 29 | 30 | GPL-2.0+ 31 |
32 | -------------------------------------------------------------------------------- /contrib/dbus/sipe-republish-calendar.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # @file sipe-republish-calendar.pl 4 | # 5 | # pidgin-sipe 6 | # 7 | # Copyright (C) 2017 SIPE Project 8 | # 9 | # This program is free software; you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation; either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # This program is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with this program; if not, write to the Free Software 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | # 23 | # 24 | # Test code for D-Bus interface "SipeRepublishCalendar" 25 | # 26 | use 5.024; 27 | use strict; 28 | use warnings; 29 | 30 | use FindBin; 31 | use lib $FindBin::Bin; 32 | use SipeHelper; 33 | 34 | SipeHelper::init(); 35 | SipeHelper::forSipeAccounts(sub { 36 | my($purple, $accountId, $username) = @_; 37 | print "Trying to republish calendar data on SIPE account '${username}'...\n"; 38 | $purple->SipeRepublishCalendar($accountId); 39 | }); 40 | 41 | # That's all folks... 42 | exit 0; 43 | -------------------------------------------------------------------------------- /src/core/sip-sec-digest.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sip-sec-digest.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2013 SIPE Project 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | /* Forward declarations */ 25 | struct sipe_core_private; 26 | 27 | /** 28 | * Generate Digest authorization header 29 | * 30 | * @param sipe_private SIPE core private data 31 | * @param header Digest authentication header contents 32 | * 33 | * @return Digest authorization header or @c NULL. Must be @c g_free'd(). 34 | */ 35 | gchar *sip_sec_digest_authorization(struct sipe_core_private *sipe_private, 36 | const gchar *header, 37 | const gchar *method, 38 | const gchar *target); 39 | -------------------------------------------------------------------------------- /git-build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Convenience to (re-)build pidgin-sipe from git repository. 4 | # 5 | # Example: add configure parameters 6 | # 7 | # $ ./git-build.sh --with-krb5 8 | # 9 | # Example: setup debug build, e.g. for valgrind ((ba)sh style) 10 | # 11 | # $ CFLAGS="-g -O0" ./git-build.sh 12 | # 13 | # Sanity check 14 | if [ ! -x autogen.sh ]; then 15 | echo 1>&2 "Your pidgin-sipe repository seems to be broken..." 16 | exit 1 17 | fi 18 | 19 | # Check for previous build artifacts 20 | rm -f build.log 21 | if [ -r Makefile ]; then 22 | echo "Cleaning up previous build artifacts..." 23 | echo >build.log "------ Cleanup ------" 24 | make >>build.log 2>&1 -k maintainer-clean 25 | fi 26 | 27 | # Rebuild 28 | ( 29 | set -e 30 | echo "Generating configure script..." 31 | echo >>build.log "------ Generate Configure Script ------" 32 | ./autogen.sh >>build.log 2>&1 33 | echo -n "Configuring build with" 34 | if [ $# -eq 0 ]; then 35 | echo "out any options..." 36 | else 37 | echo " '$@'..." 38 | fi 39 | echo >>build.log "------ Configure ------" 40 | ./configure >>build.log 2>&1 "$@" 41 | echo "Running build..." 42 | echo >>build.log "------ Build ------" 43 | make >>build.log 2>&1 44 | ) 45 | if [ $? -eq 0 ]; then 46 | echo >>build.log "------ SUCCESS ------" 47 | echo "Congratulations: the build was successful!" 48 | else 49 | echo >>build.log "------ FAILED ------" 50 | echo 1>&2 "Build FAILED!" 51 | fi 52 | echo "Details can be found in 'build.log'." 53 | -------------------------------------------------------------------------------- /src/purple/purple-markup.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file purple-markup.c 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2010-2019 SIPE Project 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #ifdef HAVE_CONFIG_H 24 | #include "config.h" 25 | #endif 26 | 27 | #include 28 | 29 | #include "util.h" 30 | 31 | #include "sipe-backend.h" 32 | 33 | gchar *sipe_backend_markup_css_property(const gchar *style, 34 | const gchar *option) 35 | { 36 | return purple_markup_get_css_property(style, option); 37 | } 38 | 39 | gchar *sipe_backend_markup_strip_html(const gchar *html) 40 | { 41 | return purple_markup_strip_html(html); 42 | } 43 | 44 | /* 45 | Local Variables: 46 | mode: c 47 | c-file-style: "bsd" 48 | indent-tabs-mode: t 49 | tab-width: 8 50 | End: 51 | */ 52 | -------------------------------------------------------------------------------- /src/core/sipe-ft-tftp.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sipe-ft-tftp.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2014-2015 SIPE Project 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | void 24 | sipe_ft_tftp_start_receiving(struct sipe_file_transfer *ft, gsize total_size); 25 | 26 | gboolean 27 | sipe_ft_tftp_stop_receiving(struct sipe_file_transfer *ft); 28 | 29 | gssize 30 | sipe_ft_tftp_read(struct sipe_file_transfer *ft, guchar **buffer, 31 | gsize bytes_remaining, gsize bytes_available); 32 | 33 | void 34 | sipe_ft_tftp_start_sending(struct sipe_file_transfer *ft, gsize total_size); 35 | 36 | gboolean 37 | sipe_ft_tftp_stop_sending(struct sipe_file_transfer *ft); 38 | 39 | gssize 40 | sipe_ft_tftp_write(struct sipe_file_transfer *ft, const guchar *buffer, 41 | gsize size); 42 | -------------------------------------------------------------------------------- /src/api/sipe-nls.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sipe-nls.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2009-2018 SIPE Project 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | /* 24 | * config.h must be included for correct definition of ENABLE_NLS. 25 | * PACKAGE_NAME is always defined when config.h has been included. 26 | */ 27 | #if defined(HAVE_CONFIG_H) && !defined(PACKAGE_NAME) 28 | #error you must include "config.h" before "sipe-nls.h" 29 | #endif 30 | 31 | #ifdef ENABLE_NLS 32 | #include 33 | #else 34 | #define _(String) ((const char *) (String)) 35 | #define N_(String) ((const char *) (String)) 36 | #define gettext(String) ((const char *) (String)) 37 | #define dngettext(package, StringS, StringP, p) ((const char *) ((p) ? (StringP) : (StringS))) 38 | #endif /* ENABLE_NLS */ 39 | -------------------------------------------------------------------------------- /src/core/sipe-ews.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sipe-ews.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2010 SIPE Project 7 | * Copyright (C) 2009 pier11 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | /* Forward declarations */ 25 | struct sipe_calendar; 26 | struct sipe_core_private; 27 | 28 | /** 29 | * Connects to Exchange 2007/2010 Server's Web Services, 30 | * pulls out our Availability and Out-of-Office (OOF) information 31 | * and publishes it to Communications server. 32 | * 33 | * Advised schedule: 30 minutes. 34 | */ 35 | void 36 | sipe_ews_update_calendar(struct sipe_core_private *sipe_private); 37 | 38 | /** 39 | * Returns OOF note if enabled in the moment 40 | * otherwise NULL. 41 | */ 42 | char * 43 | sipe_ews_get_oof_note(struct sipe_calendar *cal); 44 | -------------------------------------------------------------------------------- /src/adium/find_adium_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | #set -x 4 | 5 | # remove old symlink setup 6 | rm -rf adium-frameworks 7 | 8 | # create empty directory to keep linker happy 9 | mkdir adium-frameworks 10 | 11 | # if Adium is built as sub-project -> skip 12 | if [[ ( -d "${BUILT_PRODUCTS_DIR}/Adium.framework" ) || 13 | ( -d "${BUILT_PRODUCTS_DIR}/AdiumLibPurple.framework" ) || 14 | ( -d "${BUILT_PRODUCTS_DIR}/AIUtilities.framework" ) ]]; then 15 | echo 1>&2 "Building Adium within SIPEAdiumPlugin - aborting..." 16 | exit 0 17 | fi 18 | 19 | _sipe_build_dir=$(cd "${BUILT_PRODUCTS_DIR}/../../.."; pwd -P) 20 | if [[ ! -d "${_sipe_build_dir}" ]]; then 21 | echo 1>&2 "can't detect SIPE build directory from '${BUILT_PRODUCTS_DIR}'" 22 | exit 1 23 | fi 24 | 25 | _build_dir=$(cd "${_sipe_build_dir}/.."; pwd -P) 26 | if [[ ! -d "${_build_dir}" ]]; then 27 | echo 1>&2 "can't detect common build directory from '${_sipe_build_dir}'" 28 | exit 1 29 | fi 30 | 31 | _adium_build_dir=( $(find "${_build_dir}" -maxdepth 1 -type d -name "Adium-*" ) ) 32 | if [[ ${#_adium_build_dir[@]} -ne 1 ]]; then 33 | echo 1>&2 "can't detect Adium build directory from '${_build_dir}'" 34 | exit 1 35 | fi 36 | 37 | # create symlinks to Adium frameworks 38 | _frameworks_dir="${BUILT_PRODUCTS_DIR/#${_sipe_build_dir}/${_adium_build_dir[0]}}" 39 | _adium_dirs=( 40 | Adium.framework 41 | AdiumLibPurple.framework 42 | AIUtilities.framework 43 | ) 44 | ln -s ${_adium_dirs[@]/#/${_frameworks_dir}/} adium-frameworks/ 45 | 46 | # log result 47 | ls -lhtR adium-frameworks 48 | exit 0 49 | -------------------------------------------------------------------------------- /contrib/dbus/sipe-call-phone-number.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # @file sipe-call-phone-number.pl 4 | # 5 | # pidgin-sipe 6 | # 7 | # Copyright (C) 2017 SIPE Project 8 | # 9 | # This program is free software; you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation; either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # This program is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with this program; if not, write to the Free Software 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | # 23 | # 24 | # Test code for D-Bus interface "SipeCallPhoneNumber" 25 | # 26 | use 5.024; 27 | use strict; 28 | use warnings; 29 | 30 | use FindBin; 31 | use lib $FindBin::Bin; 32 | use SipeHelper; 33 | 34 | # Check command line parameters 35 | die "usage: $0 >\n" 36 | unless @ARGV >= 1; 37 | my($number) = @ARGV; 38 | 39 | SipeHelper::init(); 40 | SipeHelper::forSipeAccounts(sub { 41 | my($purple, $accountId, $username) = @_; 42 | print "Trying to call phone number '${number}' on SIPE account '${username}'...\n"; 43 | $purple->SipeCallPhoneNumber($accountId, $number); 44 | }); 45 | 46 | # That's all folks... 47 | exit 0; 48 | -------------------------------------------------------------------------------- /src/core/sipe-appshare-client.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sipe-appshare-client.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2016 SIPE Project 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | /* Forward declarations */ 24 | struct sipe_core_private; 25 | struct sipe_media_stream; 26 | struct sipmsg; 27 | 28 | struct sipe_rdp_client { 29 | gchar *cmdline; 30 | void *client_data; 31 | 32 | GSocketAddress *(*get_listen_address_cb)(struct sipe_rdp_client *client); 33 | gboolean (*launch_cb)(struct sipe_rdp_client *client, 34 | GSocketAddress *listen_address, 35 | struct sipe_media_stream *stream); 36 | void (*free_cb)(struct sipe_rdp_client *client); 37 | }; 38 | 39 | /* Client implementations */ 40 | void sipe_appshare_remmina_init(struct sipe_rdp_client *client); 41 | void sipe_appshare_xfreerdp_init(struct sipe_rdp_client *client); 42 | -------------------------------------------------------------------------------- /contrib/dbus/sipe-join-conference-with-uri.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # @file sipe-join-conference-with-uri.pl 4 | # 5 | # pidgin-sipe 6 | # 7 | # Copyright (C) 2017 SIPE Project 8 | # 9 | # This program is free software; you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation; either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # This program is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with this program; if not, write to the Free Software 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | # 23 | # 24 | # Test code for D-Bus interface "SipeJoinConferenceWithUri" 25 | # 26 | use 5.024; 27 | use strict; 28 | use warnings; 29 | 30 | use FindBin; 31 | use lib $FindBin::Bin; 32 | use SipeHelper; 33 | 34 | # Check command line parameters 35 | die "usage: $0 [ ...]\n" 36 | unless @ARGV; 37 | 38 | SipeHelper::init(); 39 | SipeHelper::forSipeAccounts(sub { 40 | my($purple, $accountId, $username) = @_; 41 | for my $uri (@ARGV) { 42 | print "Trying to join conference '${uri}' on SIPE account '${username}'...\n"; 43 | $purple->SipeJoinConferenceWithUri($accountId, $uri); 44 | } 45 | }); 46 | 47 | # That's all folks... 48 | exit 0; 49 | -------------------------------------------------------------------------------- /src/adium/ESPurpleSIPEAccount.h: -------------------------------------------------------------------------------- 1 | // 2 | // ESSIPEAccount.h 3 | // SIPEAdiumPlugin 4 | // 5 | // Created by Matt Meissner on 10/30/09. 6 | // Modified by Michael Lamb on 2/27/13 7 | // Copyright 2013 Michael Lamb/Harris Kauffman. All rights reserved. 8 | // 9 | 10 | #import 11 | 12 | #define KEY_SIPE_WINDOWS_LOGIN @"SIPE:Windows Login" 13 | #define KEY_SIPE_CONNECT_HOST @"SIPE:Connect Host" 14 | #define KEY_SIPE_PASSWORD @"SIPE:Password" // TODO: Do we need to keep this key? PurpleAccount should store this for us 15 | #define KEY_SIPE_CONNECTION_TYPE @"SIPE:Connection Type" 16 | #define KEY_SIPE_EMAIL @"SIPE:Email" 17 | #define KEY_SIPE_EMAIL_LOGIN @"SIPE:Email Login" 18 | #define KEY_SIPE_EMAIL_URL @"SIPE:Email URL" 19 | #define KEY_SIPE_EMAIL_PASSWORD @"SIPE:Email Password" 20 | #define KEY_SIPE_GROUP_CHAT_PROXY @"SIPE:Group Chat Proxy" 21 | #define KEY_SIPE_USER_AGENT @"SIPE:User Agent" 22 | #define KEY_SIPE_SINGLE_SIGN_ON @"SIPE:Single Sign On" 23 | #define KEY_SIPE_DONT_PUBLISH @"SIPE:Dont Publish" 24 | #define KEY_SIPE_AUTH_SCHEME @"SIPE:Authentication Scheme" 25 | #define KEY_SIPE_AUTODISCOVER @"SIPE:Autodiscover" 26 | #define KEY_SIPE_BEAST_DISABLE @"SIPE:BEAST Disable" 27 | #define KEY_SIPE_ALLOW_WEB_PHOTO @"SIPE:Allow Web Photo" 28 | 29 | #define PURPLE_SSL_CDSA_BEAST_TLS_WORKAROUND "ssl_cdsa_beast_tls_workaround" 30 | 31 | 32 | @interface ESPurpleSIPEAccount : CBPurpleAccount { 33 | NSDictionary *adium_to_sipe_status; 34 | NSDictionary *sipe_to_adium_status; 35 | } 36 | @end 37 | -------------------------------------------------------------------------------- /contrib/dbus/sipe-join-conference-with-organizer-and-id.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # @file sipe-join-conference-with-organizer-and-id.pl 4 | # 5 | # pidgin-sipe 6 | # 7 | # Copyright (C) 2017 SIPE Project 8 | # 9 | # This program is free software; you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation; either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # This program is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with this program; if not, write to the Free Software 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | # 23 | # 24 | # Test code for D-Bus interface "SipeJoinConferenceWithOrganizerAndId" 25 | # 26 | use 5.024; 27 | use strict; 28 | use warnings; 29 | 30 | use FindBin; 31 | use lib $FindBin::Bin; 32 | use SipeHelper; 33 | 34 | # Check command line parameters 35 | die "usage: $0 \n" 36 | unless @ARGV >= 2; 37 | my($organizer, $id) = @ARGV; 38 | 39 | SipeHelper::init(); 40 | SipeHelper::forSipeAccounts(sub { 41 | my($purple, $accountId, $username) = @_; 42 | print "Trying to join ${organizer}'s conference '${id}' on SIPE account '${username}'...\n"; 43 | $purple->SipeJoinConferenceWithOrganizerAndId($accountId, $organizer, $id); 44 | }); 45 | 46 | # That's all folks... 47 | exit 0; 48 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Maintainers: 2 | 3 | Stefan Becker 4 | Jakub Adam 5 | 6 | Retired Maintainers: 7 | 8 | Jochen De Smet (Miranda port) 9 | Michael Lamb (Adium port) 10 | Anibal Avelar 11 | Tomáš Hrabčík 12 | pier11 13 | Gabriel Burt 14 | Daniel Beichl 15 | 16 | Other Contributors: 17 | 18 | Jakub 'jimmac' Steiner (icon artwork) 19 | Harris Kauffman (Adium port) 20 | Matt Meissner (Adium port) 21 | Michael Steffens 22 | Carl Seutter 23 | Sean E. Millichamp 24 | Andrew Rechenberg 25 | Matthias Scharrer 26 | Garett Shulman 27 | Tyson Vinson 28 | Andrew Schenck 29 | Ivan Frade 30 | Jay (Rhyas) 31 | John Beranek 32 | David Woodhouse 33 | Edmondas Girkantas 34 | Peter Fales 35 | Kyle Hubert 36 | Andrey Vaynberger 37 | Michael Olbrich 38 | 39 | Based on the initial SIP/SIMPLE gaim protocol plugin by: 40 | 41 | Thomas Butter 42 | 43 | Translators: 44 | 45 | Please check the "Translators:" section in the po/*.po files. 46 | -------------------------------------------------------------------------------- /src/core/sipe-status.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sipe-status.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2011-2015 SIPE Project 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | /* Forward declarations */ 25 | struct sipe_core_private; 26 | 27 | /* called by sipe-core.c during plugin initialization/destruction */ 28 | void sipe_status_init(void); 29 | void sipe_status_shutdown(void); 30 | 31 | /* type == SIPE_ACTIVITY_xxx (see sipe-core.h) */ 32 | const gchar *sipe_status_activity_to_token(guint type); 33 | guint sipe_status_token_to_activity(const gchar *token); 34 | 35 | void sipe_status_set_token(struct sipe_core_private *sipe_private, 36 | const gchar *status_id); 37 | void sipe_status_set_activity(struct sipe_core_private *sipe_private, 38 | guint activity); 39 | void sipe_status_and_note(struct sipe_core_private *sipe_private, 40 | const gchar *status_id); 41 | 42 | /* 43 | Local Variables: 44 | mode: c 45 | c-file-style: "bsd" 46 | indent-tabs-mode: t 47 | tab-width: 8 48 | End: 49 | */ 50 | -------------------------------------------------------------------------------- /src/core/sipe-sign.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @file sipe-sign.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2019 SIPE Project 7 | * Copyright (C) 2008 Novell, Inc. 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA 22 | */ 23 | 24 | struct sipmsg_breakdown { 25 | struct sipmsg * msg; 26 | gchar * protocol; 27 | gchar * rand; 28 | gchar * num; 29 | gchar * realm; 30 | gchar * target_name; 31 | const gchar * call_id; 32 | gchar * cseq; 33 | //method 34 | gchar * from_url; 35 | gchar * from_tag; 36 | /** @since 3 */ 37 | gchar * to_url; 38 | gchar * to_tag; 39 | /** @since 3 */ 40 | gchar * p_assertet_identity_sip_uri; 41 | /** @since 3 */ 42 | gchar * p_assertet_identity_tel_uri; 43 | const gchar * expires; 44 | //response code 45 | }; 46 | 47 | void sipmsg_breakdown_parse(struct sipmsg_breakdown * msg, const gchar * realm, const gchar * target, 48 | const gchar *protocol); 49 | gchar* 50 | sipmsg_breakdown_get_string(int version, 51 | struct sipmsg_breakdown * msgbd); 52 | void sipmsg_breakdown_free(struct sipmsg_breakdown * msg); 53 | -------------------------------------------------------------------------------- /src/api/sipe-common.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sipe-common.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2010-2017 SIPE Project 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | /* 24 | * Everything in here must be independent of any other header file! 25 | * 26 | * I.e. it must be possible to include this header 27 | * in any module without requiring any other #include. 28 | */ 29 | 30 | #ifdef __GNUC__ 31 | #define SIPE_UNUSED_PARAMETER __attribute__((unused)) 32 | #else 33 | #define SIPE_UNUSED_PARAMETER 34 | #endif 35 | 36 | #if defined(__GNUC__) && (__GNUC__ >= 7) 37 | #define SIPE_FALLTHROUGH __attribute__((fallthrough)); 38 | #else 39 | #define SIPE_FALLTHROUGH 40 | #endif 41 | 42 | /* in order to remove internal.h dependency in mingw builds */ 43 | #ifndef G_GNUC_NULL_TERMINATED 44 | # if defined(__GNUC__) && (__GNUC__ >= 4) 45 | # define G_GNUC_NULL_TERMINATED __attribute__((__sentinel__)) 46 | # else 47 | # define G_GNUC_NULL_TERMINATED 48 | # endif 49 | #endif 50 | 51 | #ifdef _MSC_VER 52 | typedef long ssize_t; 53 | #endif 54 | -------------------------------------------------------------------------------- /src/purple/tests-load.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file tests-load.c 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2010 SIPE Project 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #include 24 | #include 25 | 26 | #include 27 | 28 | /* test that libsipe.so loads succesfully */ 29 | int main(int argc, char *argv[]) 30 | { 31 | int rc = 1; 32 | 33 | (void) argc; 34 | (void) argv; 35 | 36 | /* well if this doesn't work, what's the use of a plugin? */ 37 | if (g_module_supported()) { 38 | gchar *name = g_module_build_path(".libs", "sipe"); 39 | GModule *module = g_module_open(name, G_MODULE_BIND_LOCAL); 40 | if (module) { 41 | g_module_close(module); 42 | /* all OK */ 43 | printf("plugin loaded OK\n"); 44 | rc = 0; 45 | } else { 46 | fprintf(stderr, "plugin loaded error: %s\n", 47 | g_module_error()); 48 | } 49 | g_free(name); 50 | } 51 | return(rc); 52 | } 53 | 54 | /* 55 | Local Variables: 56 | mode: c 57 | c-file-style: "bsd" 58 | indent-tabs-mode: t 59 | tab-width: 8 60 | End: 61 | */ 62 | -------------------------------------------------------------------------------- /contrib/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | include /usr/share/cdbs/1/class/autotools.mk 4 | include /usr/share/cdbs/1/rules/debhelper.mk 5 | 6 | HAVE_APPSTREAM := $(strip $(shell (/usr/bin/appstream-validate >/dev/null --version || /usr/bin/appstreamcli >/dev/null --version) && echo yes)) 7 | HAVE_APPSTREAM_LEGACY := $(strip $(shell . /etc/os-release; echo $${ID}-$${VERSION_ID} | grep -q '^debian-8$$' && echo yes)) 8 | 9 | DEB_CONFIGURE_EXTRA_FLAGS := --enable-purple 10 | # detect if package telepathy-glib is available 11 | ifneq ($(shell pkg-config --exists telepathy-glib && echo FOUND),) 12 | DEB_CONFIGURE_EXTRA_FLAGS += --enable-telepathy 13 | else 14 | DEB_CONFIGURE_EXTRA_FLAGS += --disable-telepathy 15 | endif 16 | ifneq ($(shell pkg-config --exists nice && echo FOUND),) 17 | DEB_CONFIGURE_EXTRA_FLAGS += --with-vv 18 | else 19 | DEB_CONFIGURE_EXTRA_FLAGS += --without-vv 20 | endif 21 | ifeq ($(HAVE_APPSTREAM),) 22 | DEB_CONFIGURE_EXTRA_FLAGS += --without-appstream 23 | endif 24 | 25 | # run tests 26 | DEB_MAKE_CHECK_TARGET := check 27 | 28 | # don't run unnecessary ldconfig on postinst and postrm. 29 | DEB_DH_MAKESHLIBS_ARGS_pidgin-sipe=-n 30 | 31 | clean:: 32 | dh_testdir 33 | 34 | # git snapshot does not contain a configure script 35 | debian/stamp-autotools-files: $(DEB_CONFIGURE_SCRIPT) 36 | $(DEB_BUILDDIR)/config.status: $(DEB_CONFIGURE_SCRIPT) 37 | 38 | $(DEB_CONFIGURE_SCRIPT): 39 | ./autogen.sh 40 | 41 | binary-post-install/pidgin-sipe:: 42 | rm -f debian/pidgin-sipe/usr/share/doc/pidgin-sipe/README 43 | rm -r debian/pidgin-sipe/usr/share/pixmaps/pidgin/protocols/24 44 | rm -r debian/pidgin-sipe/usr/share/pixmaps/pidgin/protocols/32 45 | rm debian/pidgin-sipe/usr/lib/purple-2/libsipe.la 46 | ifeq ($(HAVE_APPSTREAM)-$(HAVE_APPSTREAM_LEGACY),yes-yes) 47 | mv debian/pidgin-sipe/usr/share/metainfo debian/pidgin-sipe/usr/share/appdata 48 | endif 49 | 50 | .PHONY: update-debian-control 51 | -------------------------------------------------------------------------------- /src/core/sipe-incoming.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sipe-incoming.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2010 SIPE Project 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | /* Forward declarations */ 24 | struct sipe_core_private; 25 | struct sip_dialog; 26 | struct sipmsg; 27 | 28 | void process_incoming_bye(struct sipe_core_private *sipe_private, 29 | struct sipmsg *msg); 30 | void process_incoming_cancel(struct sipe_core_private *sipe_private, 31 | struct sipmsg *msg); 32 | void process_incoming_info(struct sipe_core_private *sipe_private, 33 | struct sipmsg *msg); 34 | void process_incoming_invite(struct sipe_core_private *sipe_private, 35 | struct sipmsg *msg); 36 | void process_incoming_message(struct sipe_core_private *sipe_private, 37 | struct sipmsg *msg); 38 | void process_incoming_options(struct sipe_core_private *sipe_private, 39 | struct sipmsg *msg); 40 | void process_incoming_refer(struct sipe_core_private *sipe_private, 41 | struct sipmsg *msg); 42 | 43 | void sipe_incoming_cancel_delayed_invite(struct sipe_core_private *sipe_private, 44 | struct sip_dialog *dialog); 45 | -------------------------------------------------------------------------------- /src/core/sipe-mime-common.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sipe-mime.c 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2015 SIPE Project 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #include 24 | 25 | #include "sipe-common.h" 26 | #include "sipe-mime.h" 27 | #include "sipe-utils.h" 28 | 29 | struct parts_contain_cb_data { 30 | const gchar * type; 31 | gboolean result; 32 | }; 33 | 34 | static void 35 | parts_contain_cb(gpointer user_data, const GSList *fields, 36 | SIPE_UNUSED_PARAMETER const gchar *body, 37 | SIPE_UNUSED_PARAMETER gsize length) 38 | { 39 | struct parts_contain_cb_data *data = user_data; 40 | 41 | if (!data->result && 42 | sipe_strequal(data->type, sipe_utils_nameval_find(fields, "Content-Type"))) { 43 | data->result = TRUE; 44 | } 45 | } 46 | 47 | gboolean 48 | sipe_mime_parts_contain(const gchar *type, 49 | const gchar *body, 50 | const gchar *part_type) 51 | { 52 | struct parts_contain_cb_data data; 53 | data.type = part_type; 54 | data.result = FALSE; 55 | 56 | sipe_mime_parts_foreach(type, body, parts_contain_cb, &data); 57 | return data.result; 58 | } 59 | 60 | /* 61 | Local Variables: 62 | mode: c 63 | c-file-style: "bsd" 64 | indent-tabs-mode: t 65 | tab-width: 8 66 | End: 67 | */ 68 | -------------------------------------------------------------------------------- /src/telepathy/telepathy-schedule.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file telepathy-schedule.c 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2012 SIPE Project 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #include 24 | 25 | #include "sipe-backend.h" 26 | #include "sipe-common.h" 27 | #include "sipe-core.h" 28 | 29 | static gboolean timeout_execute(gpointer data) 30 | { 31 | sipe_core_schedule_execute(data); 32 | return(FALSE); 33 | } 34 | 35 | gpointer sipe_backend_schedule_seconds(SIPE_UNUSED_PARAMETER struct sipe_core_public *sipe_public, 36 | guint timeout, 37 | gpointer data) 38 | { 39 | return(GUINT_TO_POINTER(g_timeout_add_seconds(timeout, timeout_execute, data))); 40 | } 41 | 42 | gpointer sipe_backend_schedule_mseconds(SIPE_UNUSED_PARAMETER struct sipe_core_public *sipe_public, 43 | guint timeout, 44 | gpointer data) 45 | { 46 | return(GUINT_TO_POINTER(g_timeout_add(timeout, timeout_execute, data))); 47 | } 48 | 49 | void sipe_backend_schedule_cancel(SIPE_UNUSED_PARAMETER struct sipe_core_public *sipe_public, 50 | gpointer data) 51 | { 52 | g_source_remove(GPOINTER_TO_UINT(data)); 53 | } 54 | 55 | /* 56 | Local Variables: 57 | mode: c 58 | c-file-style: "bsd" 59 | indent-tabs-mode: t 60 | tab-width: 8 61 | End: 62 | */ 63 | -------------------------------------------------------------------------------- /src/core/sipe-groupchat.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sipe-groupchat.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2010-2013 SIPE Project 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | /* Forward declarations */ 24 | struct sipmsg; 25 | struct sip_dialog; 26 | struct sip_session; 27 | struct sipe_chat_session; 28 | struct sipe_core_private; 29 | 30 | void sipe_groupchat_free(struct sipe_core_private *sipe_private); 31 | void sipe_groupchat_init(struct sipe_core_private *sipe_private); 32 | void sipe_groupchat_invite_failed(struct sipe_core_private *sipe_private, 33 | struct sip_session *session); 34 | void sipe_groupchat_invite_response(struct sipe_core_private *sipe_private, 35 | struct sip_dialog *dialog, 36 | struct sipmsg *response); 37 | void process_incoming_info_groupchat(struct sipe_core_private *sipe_private, 38 | struct sipmsg *msg, 39 | struct sip_session *session); 40 | void sipe_groupchat_send(struct sipe_core_private *sipe_private, 41 | struct sipe_chat_session *chat_session, 42 | const gchar *what); 43 | void sipe_groupchat_leave(struct sipe_core_private *sipe_private, 44 | struct sipe_chat_session *chat_session); 45 | void sipe_groupchat_rejoin(struct sipe_core_private *sipe_private, 46 | struct sipe_chat_session *chat_session); 47 | -------------------------------------------------------------------------------- /src/core/sipe-ocs2005.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sipe-ocs2005.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2011 SIPE Project 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | /* Forward declarations */ 25 | struct _sipe_xml; 26 | struct sipe_core_private; 27 | 28 | /** 29 | * OCS2005 status ID, availability & activity 30 | */ 31 | const gchar *sipe_ocs2005_status_from_activity_availability(guint activity, 32 | guint availablity); 33 | const gchar *sipe_ocs2005_activity_description(guint activity); 34 | 35 | /** 36 | * Publish status (OCS2005) 37 | */ 38 | void sipe_ocs2005_presence_publish(struct sipe_core_private *sipe_private, 39 | gboolean do_publish_calendar); 40 | void sipe_ocs2005_reset_status(struct sipe_core_private *sipe_private); 41 | void sipe_ocs2005_user_info_has_updated(struct sipe_core_private *sipe_private, 42 | const struct _sipe_xml *xn_userinfo); 43 | void sipe_ocs2005_apply_calendar_status(struct sipe_core_private *sipe_private, 44 | struct sipe_buddy *sbuddy, 45 | const char *status_id); 46 | void sipe_ocs2005_schedule_status_update(struct sipe_core_private *sipe_private, 47 | time_t calculate_from); 48 | 49 | /* 50 | Local Variables: 51 | mode: c 52 | c-file-style: "bsd" 53 | indent-tabs-mode: t 54 | tab-width: 8 55 | End: 56 | */ 57 | -------------------------------------------------------------------------------- /src/adium/xcconfigs/Base.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // Base.xcconfig 3 | // SIPEAdiumPlugin 4 | // 5 | // Created by Lamb, Michael on 11/13/13. 6 | // 7 | // 8 | 9 | INFOPLIST_PREPROCESSOR_DEFINITIONS = ${GCC_PREPROCESSOR_DEFINITIONS} 10 | INFOPLIST_PREPROCESS = YES 11 | 12 | MACOSX_DEPLOYMENT_TARGET = 10.8 13 | 14 | HEADER_SEARCH_PATHS = "../../../adium/Frameworks/libglib.framework/Headers" "../../../adium/Frameworks/libpurple.framework/Headers" "../../../adium/Frameworks/libintl.framework/Headers" ../purple ../api /usr/include/libxml2 . ../../../openssl-0.9.8za/include 15 | 16 | // Hack to work around how xcconfig pre-processor handles double-slash as a comment (even in a quoted string!!) :( 17 | SLASH=/ 18 | SIPE_TRANSLATIONS_URL=\"https:${SLASH}/www.transifex.com/stefanb/pidgin-sipe/\" 19 | PACKAGE_BUGREPORT=\"https:${SLASH}/sourceforge.net/p/sipe/bugs/\" 20 | PACKAGE_URL=\"http:${SLASH}/sipe.sourceforge.net/\" 21 | 22 | // No need to change version number in the xcodeproj file every release, just here. 23 | PACKAGE_VERSION=1.25.0 24 | PACKAGE_STRING=\"pidgin-sipe\ ${PACKAGE_VERSION}\" 25 | 26 | GCC_PREPROCESSOR_DEFINITIONS = SIPE_TRANSLATIONS_URL=${SIPE_TRANSLATIONS_URL} LOCALEDIR=\"translations\" PURPLE_STATIC_PRPL=1 HAVE_BIND_TEXTDOMAIN_CODESET=1 ENABLE_NLS=1 ADIUM=1 PACKAGE_NAME=\"pidgin-sipe\" PACKAGE_TARNAME=\"pidgin-sipe\" PACKAGE_BUGREPORT=${PACKAGE_BUGREPORT} PACKAGE_VERSION=\"${PACKAGE_VERSION}\" PACKAGE_STRING=${PACKAGE_STRING} PACKAGE_URL=${PACKAGE_URL} STDC_HEADERS=1 HAVE_SYS_TYPES_H=1 HAVE_SYS_STAT_H=1 HAVE_STDLIB_H=1 HAVE_STRING_H=1 HAVE_MEMORY_H=1 HAVE_STRINGS_H=1 HAVE_INTTYPES_H=1 HAVE_STDINT_H=1 HAVE_UNISTD_H=1 HAVE_DLFCN_H=1 LT_OBJDIR=\".libs/\" STDC_HEADERS=1 HAVE_LOCALE_H=1 HAVE_LC_MESSAGES=1 HAVE_DLFCN_H=1 HAVE_DCGETTEXT=1 HAVE_GETTEXT=1 HAVE_LOCALE_H=1 HAVE_GSSAPI_GSSAPI_H=1 HAVE_LANGINFO_CODESET=1 27 | 28 | ARCHS = $(ARCHS_STANDARD_64_BIT) 29 | STRINGS_FILE_OUTPUT_ENCODING = UTF-16 30 | GCC_MODEL_TUNING = G5 31 | GCC_C_LANGUAGE_STANDARD = gnu99 32 | GCC_WARN_ABOUT_RETURN_TYPE = YES 33 | GCC_WARN_UNUSED_VARIABLE = YES 34 | GCC_PRECOMPILE_PREFIX_HEADER = YES 35 | DEBUG_INFORMATION_FORMAT = dwarf-with-dsym 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /src/core/sipe-subscriptions.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sipe-subscriptions.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2010-2013 SIPE Project 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | /* Forward declarations */ 24 | struct sipe_core_private; 25 | struct sip_dialog; 26 | 27 | /** 28 | * Subscriptions subsystem 29 | */ 30 | void sipe_subscriptions_init(struct sipe_core_private *sipe_private); 31 | void sipe_subscriptions_unsubscribe(struct sipe_core_private *sipe_private); 32 | void sipe_subscriptions_destroy(struct sipe_core_private *sipe_private); 33 | 34 | /** 35 | * Subscriptions 36 | */ 37 | void sipe_subscribe_conference(struct sipe_core_private *sipe_private, 38 | const gchar *id, 39 | gboolean expires); 40 | 41 | void sipe_subscribe_presence_single(struct sipe_core_private *sipe_private, 42 | const gchar *uri, 43 | const gchar *to); 44 | void sipe_subscribe_presence_single_cb(struct sipe_core_private *sipe_private, 45 | gpointer uri); 46 | void sipe_subscribe_presence_initial(struct sipe_core_private *sipe_private); 47 | void sipe_subscribe_poolfqdn_resource_uri(const gchar *host, 48 | GSList *server, 49 | struct sipe_core_private *sipe_private); 50 | 51 | /** 52 | * Subscribe to all events the server supports after first registration 53 | * 54 | * @param sipe_private SIPE core private data 55 | */ 56 | void sipe_subscription_self_events(struct sipe_core_private *sipe_private); 57 | -------------------------------------------------------------------------------- /src/purple/purple-setting.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file purple-setting.c 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2010-2019 SIPE Project 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #ifdef HAVE_CONFIG_H 24 | #include "config.h" 25 | #endif 26 | 27 | #include 28 | 29 | #include "account.h" 30 | #include "connection.h" 31 | 32 | #include "sipe-backend.h" 33 | #include "sipe-core.h" 34 | 35 | #include "purple-private.h" 36 | 37 | /** 38 | * Map sipe_setting values to purple account setting keys 39 | * 40 | * This needs to be kept in sync with 41 | * 42 | * api/sipe-backend.h 43 | * purple-plugin-common.c:sipe_purple_account_options() 44 | */ 45 | static const gchar * const setting_name[SIPE_SETTING_LAST] = { 46 | "email_url", /* SIPE_SETTING_EMAIL_URL */ 47 | "email_login", /* SIPE_SETTING_EMAIL_LOGIN */ 48 | "email_password", /* SIPE_SETTING_EMAIL_PASSWORD */ 49 | "groupchat_user", /* SIPE_SETTING_GROUPCHAT_USER */ 50 | "rdp_client", /* SIPE_SETTING_RDP_CLIENT */ 51 | "useragent" /* SIPE_SETTING_USER_AGENT */ 52 | }; 53 | 54 | const gchar *sipe_backend_setting(struct sipe_core_public *sipe_public, 55 | sipe_setting type) 56 | { 57 | return(purple_account_get_string(purple_connection_get_account(sipe_public->backend_private->gc), 58 | setting_name[type], NULL)); 59 | } 60 | 61 | /* 62 | Local Variables: 63 | mode: c 64 | c-file-style: "bsd" 65 | indent-tabs-mode: t 66 | tab-width: 8 67 | End: 68 | */ 69 | -------------------------------------------------------------------------------- /contrib/debian/copyright: -------------------------------------------------------------------------------- 1 | This work was packaged for Debian by: 2 | 3 | Anibal Avelar on Wed, 13 Jun 2007 19:12:35 -0500. 4 | 5 | It was downloaded from: 6 | 7 | 8 | 9 | Upstream Authors: 10 | 11 | Anibal Avelar 12 | Stefan Becker 13 | Jakub Adam 14 | Tomáš Hrabčík (retired) 15 | pier11 (retired) 16 | Gabriel Burt (retired) 17 | Daniel Beichl (retired) 18 | 19 | Based on the initial SIP/SIMPLE gaim protocol plugin by: 20 | 21 | Thomas Butter 22 | 23 | Copyright: 24 | 25 | Copyright (C) 2010 Jakub Adam 26 | Copyright (C) 2010 Tomáš Hrabčík 27 | Copyright (C) 2009-2010 pier11 28 | Copyright (C) 2008 Novell, Inc. 29 | Copyright (C) 2007-2012 SIPE Project 30 | Copyright (C) 2007-2010 Anibal Avelar 31 | Copyright (C) 2005 Thomas Butter 32 | 33 | License: 34 | 35 | This package is free software; you can redistribute it and/or modify 36 | it under the terms of the GNU General Public License as published by 37 | the Free Software Foundation; either version 2 of the License, or 38 | (at your option) any later version. 39 | 40 | This package is distributed in the hope that it will be useful, 41 | but WITHOUT ANY WARRANTY; without even the implied warranty of 42 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 43 | GNU General Public License for more details. 44 | 45 | You should have received a copy of the GNU General Public License 46 | along with this package; if not, write to the Free Software 47 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 48 | 49 | On Debian systems, the complete text of the GNU General Public 50 | License version 2 can be found in `/usr/share/common-licenses/GPL-2'. 51 | 52 | Debian packaging is: 53 | 54 | Copyright (C) 2007 Anibal Avelar 55 | 56 | You can redistribute it and/or modify it under the terms of the 57 | GNU General Public License as published by Free Software Foundation; 58 | either version 2 of the License, or (at your option) any later version. 59 | -------------------------------------------------------------------------------- /src/purple/tests.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file tests.c 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2011 SIPE Project 7 | * Copyright (C) 2010 pier11 8 | * Copyright (C) 2008 Novell, Inc. 9 | * 10 | * Implemented with reference to the follow documentation: 11 | * - http://davenport.sourceforge.net/ntlm.html 12 | * - MS-NLMP: http://msdn.microsoft.com/en-us/library/cc207842.aspx 13 | * - MS-SIP : http://msdn.microsoft.com/en-us/library/cc246115.aspx 14 | * 15 | * Please use "make tests" to build & run them! 16 | * 17 | * This program is free software; you can redistribute it and/or modify 18 | * it under the terms of the GNU General Public License as published by 19 | * the Free Software Foundation; either version 2 of the License, or 20 | * (at your option) any later version. 21 | * 22 | * This program is distributed in the hope that it will be useful, 23 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 24 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 25 | * GNU General Public License for more details. 26 | * 27 | * You should have received a copy of the GNU General Public License 28 | * along with this program; if not, write to the Free Software 29 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 30 | */ 31 | 32 | #include 33 | 34 | #include "version.h" 35 | #if !PURPLE_VERSION_CHECK(3,0,0) 36 | #include "cipher.h" 37 | #endif 38 | 39 | #include "debug.h" 40 | #include "signals.h" 41 | 42 | #include "sipe-common.h" 43 | #include "sipe-core.h" 44 | 45 | /* stub for purple-user.c */ 46 | void sipe_core_user_ask_cb(SIPE_UNUSED_PARAMETER gpointer key, 47 | SIPE_UNUSED_PARAMETER gboolean accepted) 48 | { 49 | } 50 | 51 | gboolean sip_sec_ntlm_tests(void); 52 | 53 | int main() 54 | { 55 | /* Initialization that libpurple/core.c would normally do */ 56 | purple_signals_init(); 57 | purple_debug_init(); 58 | purple_debug_set_enabled(TRUE); 59 | #if !PURPLE_VERSION_CHECK(3,0,0) 60 | purple_ciphers_init(); 61 | #endif 62 | 63 | /* Run tests */ 64 | return(sip_sec_ntlm_tests() ? 0 : 1); 65 | } 66 | 67 | /* 68 | Local Variables: 69 | mode: c 70 | c-file-style: "bsd" 71 | indent-tabs-mode: t 72 | tab-width: 8 73 | End: 74 | */ 75 | -------------------------------------------------------------------------------- /po/transifex-pot-fixup.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # Fix up pidgin-sipe.pot after an update to make it acceptable for Transifex 4 | # 5 | # Transifex update procedure: 6 | # 7 | # $ cd po 8 | # $ intltool-update --pot -g pidgin-sipe # update POT file 9 | # $ ./transifex-pot-fixup.pl # this script 10 | # $ cd .. 11 | # $ tx push -s # update POT file on Transifex 12 | # 13 | # [optional: update the languages you know on Transifex] 14 | # 15 | # $ tx pull -s # fetch updated translations 16 | # $ git add -u po/*.po po/*.pot # add files to next commit 17 | # $ git commit -e 18 | # 19 | use 5.008; 20 | use strict; 21 | use warnings; 22 | 23 | open(my $fh, "+<", "pidgin-sipe.pot") 24 | or die "$0: can't open POT file: $!\n"; 25 | 26 | my $date; 27 | { 28 | my(undef, $min, $hour, $mday, $mon, $year) = gmtime(time()); 29 | $date = sprintf("%4d-%02d-%02d %02d:%02d+0000", 30 | $year + 1900, $mon + 1, $mday, $hour, $min); 31 | } 32 | 33 | # Must be 19 lines (same as header created by intltool-update) 34 | my @lines = ( <<"END_OF_HEADER" 35 | # (English) English User Interface strings for pidgin-sipe. 36 | # Copyright (C) 2008-2018 SIPE Project 37 | # This file is distributed under the same license as the pidgin-sipe package. 38 | # 39 | # 40 | # 41 | msgid "" 42 | msgstr "" 43 | "Project-Id-Version: pidgin sipe\\n" 44 | "Report-Msgid-Bugs-To: https://sourceforge.net/p/sipe/bugs/\\n" 45 | "POT-Creation-Date: 2010-11-30 23:36+0200\\n" 46 | "PO-Revision-Date: $date\\n" 47 | "Last-Translator: Stefan Becker \\n" 48 | "Language-Team: English (http://www.transifex.com/stefanb/pidgin-sipe/language/en/)\\n" 49 | "MIME-Version: 1.0\\n" 50 | "Content-Type: text/plain; charset=UTF-8\\n" 51 | "Content-Transfer-Encoding: 8bit\\n" 52 | "Language: en\\n" 53 | "Plural-Forms: nplurals=2; plural=(n != 1);\\n" 54 | END_OF_HEADER 55 | ); 56 | 57 | while (<$fh>) { 58 | # skip header 59 | next if $. < 20; 60 | 61 | push(@lines, $_); 62 | } 63 | 64 | # Update pot file 65 | seek($fh, 0, 0) 66 | or die "$0: can't rewind POT file: $!\n"; 67 | print $fh @lines; 68 | close($fh) 69 | or die "$0: can't write to POT file: $!\n"; 70 | 71 | # That's all folks 72 | exit 0; 73 | -------------------------------------------------------------------------------- /src/core/sipe-schedule.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sipe-schedule.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2010 SIPE Project 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | /* Forward declarations */ 24 | struct sipe_core_private; 25 | 26 | typedef void (*sipe_schedule_action)(struct sipe_core_private *sipe_private, 27 | gpointer data); 28 | 29 | /** 30 | * Do schedule action for execution in the future. 31 | * Non repetitive execution. 32 | * 33 | * @param sipe_core_private 34 | * @param name of action (will be copied) 35 | * @param timeout in seconds or milliseconds 36 | * @param action callback function 37 | * @param destroy payload destroy function 38 | * @param payload callback data (can be NULL, otherwise caller must allocate memory) 39 | */ 40 | void sipe_schedule_seconds(struct sipe_core_private *sipe_private, 41 | const gchar *name, 42 | gpointer payload, 43 | guint seconds, 44 | sipe_schedule_action action, 45 | GDestroyNotify destroy); 46 | void sipe_schedule_mseconds(struct sipe_core_private *sipe_private, 47 | const gchar *name, 48 | gpointer payload, 49 | guint milliseconds, 50 | sipe_schedule_action action, 51 | GDestroyNotify destroy); 52 | void sipe_schedule_cancel(struct sipe_core_private *sipe_private, 53 | const gchar *name); 54 | void sipe_schedule_cancel_all(struct sipe_core_private *sipe_private); 55 | 56 | /* 57 | Local Variables: 58 | mode: c 59 | c-file-style: "bsd" 60 | indent-tabs-mode: t 61 | tab-width: 8 62 | End: 63 | */ 64 | -------------------------------------------------------------------------------- /src/adium/check_release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Compare release contents with golden list to ensure release correctness 4 | # 5 | if [[ -z "$1" ]]; then 6 | echo 1>&2 "usage: $0 " 7 | exit 1 8 | fi 9 | 10 | # examine release archive 11 | echo "Checking release archive '$1'..." 12 | files=$(set -o pipefail; unzip -l "$1" | 13 | grep SIPEAdiumPlugin.AdiumLibpurplePlugin/ | 14 | awk '{ print $4, $1 }' | 15 | grep -v '/ 0') 16 | if [[ $? -ne 0 ]]; then 17 | echo 1>&2 "ERROR: can't analyze release archive '$1'!" 18 | exit 1 19 | fi 20 | 21 | # the following files *MUST* be in the release archive 22 | declare -A golden_list 23 | golden_list=( 24 | [SIPEAdiumPlugin.AdiumLibpurplePlugin/Contents/Info.plist]=1 25 | [SIPEAdiumPlugin.AdiumLibpurplePlugin/Contents/MacOS/SIPEAdiumPlugin]=1 26 | [SIPEAdiumPlugin.AdiumLibpurplePlugin/Contents/Resources/English.lproj/DCPurpleSIPEJoinChatView.nib]=1 27 | [SIPEAdiumPlugin.AdiumLibpurplePlugin/Contents/Resources/English.lproj/InfoPlist.strings]=1 28 | [SIPEAdiumPlugin.AdiumLibpurplePlugin/Contents/Resources/ESSIPEAccountView.nib]=1 29 | [SIPEAdiumPlugin.AdiumLibpurplePlugin/Contents/Resources/PurpleDefaultsSIPE.plist]=1 30 | [SIPEAdiumPlugin.AdiumLibpurplePlugin/Contents/Resources/sipe.png]=1 31 | ) 32 | new_files=() 33 | 34 | # compare against golden list 35 | # @TODO: is there a better way to feed in file list? 36 | while read file size; do 37 | if [[ -z "${golden_list[${file}]}" ]]; then 38 | new_files+=( $file ) 39 | elif [[ "${size}" -eq 0 ]]; then 40 | echo 1>&2 "ERROR: file '${file}' is empty!" 41 | else 42 | unset golden_list[${file}] 43 | fi 44 | done <&2 "Release archive contains superfluous files:" 52 | for file in "${new_files[@]}"; do 53 | echo -e 1>&2 "\t${file}" 54 | done 55 | status=1 56 | fi 57 | if [[ ${#golden_list[@]} -ne 0 ]]; then 58 | echo 1>&2 "Release archive is missing the following files:" 59 | for file in "${!golden_list[@]}"; do 60 | echo -e 1>&2 "\t${file}" 61 | done 62 | status=1 63 | fi 64 | if [[ $status -eq 0 ]]; then 65 | echo "Release archive is OK!" 66 | else 67 | echo "Release archive is NOT OK!" 68 | fi 69 | exit $status 70 | -------------------------------------------------------------------------------- /src/miranda/sipe-miranda.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #include 7 | 8 | #include "miranda-version.h" 9 | #include "newpluginapi.h" 10 | #include "m_protosvc.h" 11 | #include "m_protoint.h" 12 | #include "m_system.h" 13 | #include "m_database.h" 14 | #include "m_langpack.h" 15 | #include "m_options.h" 16 | #include "m_clist.h" 17 | #include "m_chat.h" 18 | #include "m_netlib.h" 19 | #include "m_protomod.h" 20 | 21 | #include "sipe-core.h" 22 | #include "sipe-backend.h" 23 | #include "miranda-private.h" 24 | #include "miranda-resource.h" 25 | 26 | /* Miranda interface globals */ 27 | 28 | void CreateProtoService(SIPPROTO *pr, const char* szService, SipSimpleServiceFunc serviceProc) 29 | { 30 | char str[ MAXMODULELABELLENGTH ]; 31 | 32 | mir_snprintf(str, sizeof(str), "%s%s", pr->proto.m_szModuleName, szService); 33 | CreateServiceFunctionObj(str, (MIRANDASERVICEOBJ)*(void**)&serviceProc, pr); 34 | } 35 | 36 | /**************************************************************************** 37 | * Struct that defines our interface with libsipe 38 | ****************************************************************************/ 39 | /* Protocol interface functions */ 40 | int RecvContacts( SIPPROTO *pr, HANDLE hContact, PROTORECVEVENT* evt ) 41 | { 42 | _NIF(); 43 | return 0; 44 | } 45 | 46 | int RecvUrl( SIPPROTO *pr, HANDLE hContact, PROTORECVEVENT* evt ) 47 | { 48 | _NIF(); 49 | return 0; 50 | } 51 | 52 | int SendContacts( SIPPROTO *pr, HANDLE hContact, int flags, int nContacts, HANDLE* hContactsList ) 53 | { 54 | _NIF(); 55 | SIPE_DEBUG_INFO("SendContacts: flags <%x> ncontacts <%x>", flags, nContacts); 56 | return 0; 57 | } 58 | 59 | int SendUrl( SIPPROTO *pr, HANDLE hContact, int flags, const char* url ) 60 | { 61 | _NIF(); 62 | SIPE_DEBUG_INFO("SendUrl: iflags <%x> url <%s>", flags, url); 63 | return 0; 64 | } 65 | 66 | int SetApparentMode( SIPPROTO *pr, HANDLE hContact, int mode ) 67 | { 68 | _NIF(); 69 | SIPE_DEBUG_INFO("SetApparentMode: mode <%x>", mode); 70 | return 0; 71 | } 72 | 73 | int RecvAwayMsg( SIPPROTO *pr, HANDLE hContact, int mode, PROTORECVEVENT* evt ) 74 | { 75 | _NIF(); 76 | SIPE_DEBUG_INFO("RecvAwayMsg: mode <%x>", mode); 77 | return 0; 78 | } 79 | 80 | int SendAwayMsg( SIPPROTO *pr, HANDLE hContact, HANDLE hProcess, const char* msg ) 81 | { 82 | _NIF(); 83 | SIPE_DEBUG_INFO("SendAwayMsg: msg <%s>", msg); 84 | return 0; 85 | } 86 | -------------------------------------------------------------------------------- /src/core/sipe-ews-autodiscover.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sipe-ews-autodiscover.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2013 SIPE Project 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | /* Forward declarations */ 25 | struct sipe_core_private; 26 | 27 | /* EWS data determined by autodiscover */ 28 | struct sipe_ews_autodiscover_data { 29 | const gchar *as_url; 30 | const gchar *ews_url; 31 | const gchar *legacy_dn; 32 | const gchar *oab_url; 33 | const gchar *oof_url; 34 | }; 35 | 36 | /** 37 | * 38 | * EWS autodiscover callback 39 | * 40 | * @param sipe_private SIPE core private data 41 | * @param ews_data EWS autodiscover data (NULL when failed/aborted) 42 | * @param callback_data callback data 43 | */ 44 | typedef void (sipe_ews_autodiscover_callback)(struct sipe_core_private *sipe_private, 45 | const struct sipe_ews_autodiscover_data *ews_data, 46 | gpointer callback_data); 47 | 48 | /** 49 | * Trigger EWS autodiscover 50 | * 51 | * @param sipe_private SIPE core private data 52 | * @param callback callback function 53 | * @param callback_data callback data 54 | */ 55 | void sipe_ews_autodiscover_start(struct sipe_core_private *sipe_private, 56 | sipe_ews_autodiscover_callback *callback, 57 | gpointer callback_data); 58 | 59 | /** 60 | * Initialize EWS autodiscover data 61 | * 62 | * @param sipe_private SIPE core private data 63 | */ 64 | void sipe_ews_autodiscover_init(struct sipe_core_private *sipe_private); 65 | 66 | /** 67 | * Free EWS autodiscover data 68 | * 69 | * @param sipe_private SIPE core private data 70 | */ 71 | void sipe_ews_autodiscover_free(struct sipe_core_private *sipe_private); 72 | -------------------------------------------------------------------------------- /src/core/sipe-certificate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sipe-certificate.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2011 SIPE Project 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | /* 25 | * Interface dependencies: 26 | * 27 | * 28 | */ 29 | 30 | /* Forward declarations */ 31 | struct sipe_core_private; 32 | 33 | /** 34 | * Find TLS-DSK user certificate for a given target 35 | * 36 | * @param sipe_private SIPE core private data 37 | * @param target target name from authentication header 38 | * 39 | * @return opaque pointer to the certificate. The caller does not own 40 | * the certificate, i.e. he must not free it! 41 | */ 42 | gpointer sipe_certificate_tls_dsk_find(struct sipe_core_private *sipe_private, 43 | const gchar *target); 44 | 45 | 46 | /** 47 | * Trigger the generation of TLS-DSK user certificate for a given target 48 | * 49 | * @param sipe_private SIPE core private data 50 | * @param target target name from authentication header 51 | * @param uri URI for the Certificate Provisioning Service 52 | * @return @c TRUE if certificate generation was triggered 53 | */ 54 | gboolean sipe_certificate_tls_dsk_generate(struct sipe_core_private *sipe_private, 55 | const gchar *target, 56 | const gchar *uri); 57 | 58 | /** 59 | * Initialize certificate data 60 | * 61 | * @param sipe_private SIPE core private data 62 | */ 63 | gboolean sipe_certificate_init(struct sipe_core_private *sipe_private); 64 | 65 | /** 66 | * Free certificate data 67 | * 68 | * @param sipe_private SIPE core private data 69 | */ 70 | void sipe_certificate_free(struct sipe_core_private *sipe_private); 71 | -------------------------------------------------------------------------------- /src/miranda/miranda-debug.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file miranda-debug.c 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2010-2016 SIPE Project 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | #include 28 | 29 | #include "newpluginapi.h" 30 | #include "m_protosvc.h" 31 | #include "m_protoint.h" 32 | #include "m_netlib.h" 33 | 34 | #include "sipe-backend.h" 35 | #include "miranda-private.h" 36 | 37 | extern HANDLE sipe_miranda_incoming_netlibuser; 38 | extern CRITICAL_SECTION sipe_miranda_debug_CriticalSection; 39 | 40 | void sipe_backend_debug_literal(sipe_debug_level level, 41 | const gchar *message) 42 | { 43 | if (sipe_miranda_incoming_netlibuser) 44 | { 45 | gchar *msg = g_strdup_printf("[%5d] %s", GetCurrentThreadId(), message); 46 | EnterCriticalSection(&sipe_miranda_debug_CriticalSection); 47 | CallService(MS_NETLIB_LOG, (WPARAM)sipe_miranda_incoming_netlibuser, (LPARAM)msg); 48 | LeaveCriticalSection(&sipe_miranda_debug_CriticalSection); 49 | g_free(msg); 50 | } 51 | } 52 | 53 | void sipe_backend_debug(sipe_debug_level level, 54 | const gchar *format, 55 | ...) G_GNUC_PRINTF(2, 3) 56 | { 57 | va_list ap; 58 | 59 | va_start(ap,format); 60 | 61 | if ((level < SIPE_DEBUG_LEVEL_LOWEST) || sipe_backend_debug_enabled()) { 62 | gchar *msg = g_strdup_vprintf(format, ap); 63 | sipe_backend_debug_literal(level, msg); 64 | g_free(msg); 65 | } 66 | 67 | va_end(ap); 68 | } 69 | 70 | gboolean sipe_backend_debug_enabled(void) 71 | { 72 | return TRUE; 73 | } 74 | 75 | /* 76 | Local Variables: 77 | mode: c 78 | c-file-style: "bsd" 79 | indent-tabs-mode: t 80 | tab-width: 8 81 | End: 82 | */ 83 | -------------------------------------------------------------------------------- /src/api/sipe-mime.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sipe-mime.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2010-2015 SIPE Project 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | /** 24 | * MIME backend initialization 25 | */ 26 | void sipe_mime_init(void); 27 | 28 | /** 29 | * MIME backend shutdown 30 | */ 31 | void sipe_mime_shutdown(void); 32 | 33 | /** 34 | * Callback type for sipe_mime_parts_foreach(). 35 | * 36 | * @param user_data callback data. 37 | * @param fields list of @c sipnameval structures with the header fields 38 | * @param body text of the MIME part. 39 | * @param length length of the body text. 40 | */ 41 | typedef void (*sipe_mime_parts_cb)(gpointer user_data, 42 | const GSList *fields, 43 | const gchar *body, 44 | gsize length); 45 | 46 | /** 47 | * Parse MIME document and call a function for each part. 48 | * 49 | * @param type content type of the MIME document. 50 | * @param body body of the MIME document. 51 | * @param callback function to call for each MIME part. 52 | * @param user_data callback data. 53 | */ 54 | void sipe_mime_parts_foreach(const gchar *type, 55 | const gchar *body, 56 | sipe_mime_parts_cb callback, 57 | gpointer user_data); 58 | 59 | /** 60 | * Checks whether MIME document contains a part with given type. 61 | * 62 | * @param type content type of the whole MIME document. 63 | * @param body body of the MIME document. 64 | * @param part_type the MIME type to search for in document parts. 65 | * 66 | * @return @c TRUE if @c body contains such part, otherwise @c FALSE. 67 | */ 68 | gboolean sipe_mime_parts_contain(const gchar *type, 69 | const gchar *body, 70 | const gchar *part_type); 71 | -------------------------------------------------------------------------------- /contrib/debug/parse_valgrind.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | use 5.010; 3 | use strict; 4 | use warnings; 5 | 6 | ############################################################################### 7 | # 8 | # Build SIPE with: 9 | # 10 | # CFLAGS="-g -O0" ./configure 11 | # 12 | # Grab a log with: 13 | # 14 | # G_DEBUG="gc-friendly" G_SLICE="always-malloc" valgrind --leak-check=yes \ 15 | # /usr/bin/pidgin --debug 2>&1 | tee pidgin_debug.log 16 | # 17 | # Analyze log with: 18 | # 19 | # perl contrib/debug/parse_valgrind.pl pidgin_debug.log 20 | # 21 | ############################################################################### 22 | my @heap_lines; 23 | my @last_heap_lines; 24 | my $invalid_lines; 25 | my @all_invalid_lines; 26 | my $other_lines; 27 | 28 | # For all lines from command line files or STDIN 29 | while (<>) { 30 | next unless my($remainder) = /^==\d+== (.*)/; 31 | 32 | if ($remainder eq "HEAP SUMMARY:") { 33 | @heap_lines = ($remainder); 34 | 35 | undef $invalid_lines; 36 | undef $other_lines; 37 | 38 | } elsif ($remainder =~ /^ERROR SUMMARY:/) { 39 | # keep only the last heap summary 40 | @last_heap_lines = @heap_lines; 41 | 42 | undef @heap_lines; 43 | 44 | } elsif ($remainder =~ /^Invalid /) { 45 | # collect all invalid lines 46 | push(@all_invalid_lines, $remainder); 47 | 48 | undef @heap_lines; 49 | $invalid_lines++; 50 | undef $other_lines; 51 | 52 | } elsif ($remainder =~ /^Conditional/) { 53 | undef @heap_lines; 54 | undef $invalid_lines; 55 | $other_lines++ 56 | 57 | } elsif (@heap_lines) { 58 | push(@heap_lines, $remainder); 59 | 60 | } elsif (defined($invalid_lines)) { 61 | push(@all_invalid_lines, $remainder); 62 | 63 | } elsif (defined($other_lines)) { 64 | undef $other_lines if $remainder eq ""; 65 | 66 | } else { 67 | #print "UNKNOWN: $remainder\n"; 68 | } 69 | } 70 | 71 | sub check_blocks($$$) { 72 | my($label, $start, $lines) = @_; 73 | my @block; 74 | my $flagged; 75 | 76 | print "$label:\n\n"; 77 | foreach (@{$lines}) { 78 | if (/$start/../^$/) { 79 | push(@block, $_); 80 | 81 | # matcher for SIPE code lines 82 | $flagged++ 83 | if /\((?:sipe-|sip-|sdpmsg|sipmsg|http-|uuid|purple-|telepathy-)/; 84 | 85 | if (length($_) == 0) { 86 | print join("\n", @block), "\n\n" if $flagged; 87 | undef @block; 88 | undef $flagged; 89 | } 90 | } 91 | } 92 | } 93 | 94 | check_blocks("INVALID ACCESSES", qr/^Invalid /, \@all_invalid_lines); 95 | check_blocks("MEMORY LEAKS", qr/^\d+ bytes in \d+ blocks/, \@last_heap_lines); 96 | 97 | # That's all folks... 98 | exit 0; 99 | -------------------------------------------------------------------------------- /src/miranda/miranda-setting.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file miranda-setting.c 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2010-2016 SIPE Project 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #include 24 | 25 | #include 26 | 27 | #include "sipe-core.h" 28 | #include "sipe-backend.h" 29 | 30 | #include "miranda-version.h" 31 | #include "newpluginapi.h" 32 | #include "m_protosvc.h" 33 | #include "m_protoint.h" 34 | #include "m_system.h" 35 | #include "m_database.h" 36 | 37 | #include "miranda-private.h" 38 | 39 | /** 40 | * Map sipe_setting values to miranda account setting keys 41 | * 42 | * This needs to be kept in sync with 43 | * 44 | * api/sipe-backend.h 45 | */ 46 | static const gchar * const setting_name[SIPE_SETTING_LAST] = { 47 | "email_url", /* SIPE_SETTING_EMAIL_URL */ 48 | "login", /* SIPE_SETTING_EMAIL_LOGIN */ 49 | "password", /* SIPE_SETTING_EMAIL_PASSWORD */ 50 | "groupchat_user", /* SIPE_SETTING_GROUPCHAT_USER */ 51 | "NOTDEFINED", /* SIPE_SETTING_RDP_CLIENT */ 52 | "useragent" /* SIPE_SETTING_USER_AGENT */ 53 | }; 54 | 55 | const gchar *sipe_backend_setting(struct sipe_core_public *sipe_public, 56 | sipe_setting type) 57 | { 58 | SIPPROTO *pr = sipe_public->backend_private; 59 | gchar *ret; 60 | gchar *tmp; 61 | 62 | if (type == SIPE_SETTING_EMAIL_PASSWORD) { 63 | tmp = (char*)mir_calloc(1024); 64 | 65 | if (sipe_miranda_getStaticString(pr, NULL, "password", tmp, 1024 )) tmp[0] = '\0'; 66 | CallService(MS_DB_CRYPT_DECODESTRING, sizeof(tmp),(LPARAM)tmp); 67 | 68 | } else { 69 | tmp = sipe_miranda_getString(pr, setting_name[type] ); 70 | } 71 | 72 | ret = g_strdup(tmp); 73 | mir_free(tmp); 74 | return ret; 75 | 76 | } 77 | 78 | /* 79 | Local Variables: 80 | mode: c 81 | c-file-style: "bsd" 82 | indent-tabs-mode: t 83 | tab-width: 8 84 | End: 85 | */ 86 | -------------------------------------------------------------------------------- /src/core/sip-csta.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sip-csta.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2011 SIPE Project 7 | * Copyright (C) 2009 pier11 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | /* 25 | * Interface dependencies: 26 | * 27 | * 28 | */ 29 | 30 | /* Forward declarations */ 31 | struct sipmsg; 32 | struct sipe_core_private; 33 | 34 | /** 35 | * Transform telephone number representation to tel: URI form. 36 | * Removes white space, parenthesis ( ), hyphen - symbols 37 | * 38 | * @param phone Ex. +32 2 245 00 00 39 | * @return Ex. tel:+3222450000 or @c NULL. Must be @c g_free()'d after use. 40 | */ 41 | gchar *sip_to_tel_uri(const gchar *phone); 42 | 43 | /** 44 | * Transform telephone number from tel: URI representation 45 | * to more human readable form. 46 | * Removes tel: prefix if such exist. 47 | * (Maybe will add spaces in the future according to local phone patterns.) 48 | * 49 | * @param tel_uri Ex. tel:+3222450000 50 | * @return Ex. +3222450000. Must be @c g_free()'d after use. 51 | */ 52 | gchar *sip_tel_uri_denormalize(const gchar *tel_uri); 53 | 54 | /** 55 | * Initializes CSTA 56 | * 57 | * @param line_uri (in) our line tel URI. Ex.: tel:73124;phone-context=dialstring;partition=BE_BRS_INT 58 | * @param server (in) SIP URI of SIP/CSTA Gateway. Ex.: sip:73124@euuklhccups01.eu.company.local 59 | */ 60 | void sip_csta_open(struct sipe_core_private *sipe_private, 61 | const gchar *line_uri, 62 | const gchar *server); 63 | 64 | /** 65 | * Closes CSTA 66 | */ 67 | void sip_csta_close(struct sipe_core_private *sipe_private); 68 | 69 | /** 70 | * Processes incoming CSTA commands 71 | */ 72 | void process_incoming_info_csta(struct sipe_core_private *sipe_private, 73 | struct sipmsg *msg); 74 | 75 | /** 76 | * Is CSTA in idle state? 77 | */ 78 | gboolean sip_csta_is_idle(struct sipe_core_private *sipe_private); 79 | -------------------------------------------------------------------------------- /contrib/opensuse-build-service/generate_debian.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | abort() { 3 | echo "$0: $1 - Aborting" 4 | exit 1 5 | } 6 | cleanup() { 7 | rm -rf debian 8 | abort "$1" 9 | } 10 | 11 | # Sanity checks 12 | version=$(ls pidgin-sipe-*.tar.gz | sed 's/^pidgin-sipe-//;s/.tar.gz$//') 13 | [ -z "${version}" ] && abort "can't find pidgin-sipe archive" 14 | [ -e debian ] && abort "directory 'debian' - already exists" 15 | 16 | # Copy latest source archive 17 | cp pidgin-sipe-${version}.tar.gz pidgin-sipe_${version}.orig.tar.gz 18 | 19 | # Extract contrib/debian directory from release 20 | tar --strip-components=2 --wildcards -xvf \ 21 | pidgin-sipe-${version}.tar.gz \ 22 | "*/contrib/debian" || cleanup "tar failed" 23 | [ -e debian ] || cleanup "directory 'debian' - does not exist" 24 | 25 | # Strip libnss3-dev from debian/control: build setup is controlled by .dsc's 26 | sed -i.ORIG -e 's/libnss3-dev, //' debian/control 27 | touch -r debian/control.ORIG debian/control 28 | rm debian/control.ORIG 29 | 30 | # Have the contents changed? 31 | if tar 2>/dev/null -df pidgin-sipe_${version}-1.debian.tar.gz; then 32 | echo "contrib/debian is unchanged - not updating .debian.tar.gz." 33 | else 34 | # Update debian archive 35 | tar cfz pidgin-sipe_${version}-1.debian.tar.gz debian || cleanup "can't create tar archive" 36 | fi 37 | rm -rf debian 38 | 39 | # Update .dsc files 40 | for p in \ 41 | "Checksums-Sha1=sha1sum" \ 42 | "Checksums-Sha256=sha256sum" \ 43 | "Files=md5sum"; 44 | do \ 45 | label=${p%=*}; \ 46 | program=${p#*=}; \ 47 | echo "${label}:" 48 | for t in \ 49 | pidgin-sipe_${version}.orig.tar.gz \ 50 | pidgin-sipe_${version}-1.debian.tar.gz; \ 51 | do \ 52 | echo " $(${program} ${t} | cut -d' ' -f1) $(wc -c ${t})"; \ 53 | done \ 54 | done >checksums.txt 55 | for d in *.dsc; do cat checksums.txt >>${d}; done 56 | rm checksums.txt 57 | 58 | # Newer platforms have support for freerdp2 - use only default .dsc 59 | cp pidgin-sipe-freerdp2.dsc pidgin-sipe.dsc 60 | # All other platforms at least support for gstreamer1.0 - override those 61 | for os in \ 62 | Debian_9.0 \ 63 | xUbuntu_16.04 \ 64 | ; do \ 65 | cp pidgin-sipe-gstreamer1.dsc pidgin-sipe-${os}.dsc; \ 66 | done 67 | # All other platforms at least support telepathy - override those 68 | for os in \ 69 | Debian_8.0 \ 70 | ; do \ 71 | cp pidgin-sipe-telepathy.dsc pidgin-sipe-${os}.dsc; \ 72 | done 73 | 74 | # Update SHA-2 256 checksum in Arch Linux PKGBUILD 75 | sed -i -e "s/@@SHA256SUM@@/$(sha256sum pidgin-sipe-${version}.tar.gz | cut -d' ' -f1)/" PKGBUILD 76 | 77 | # That's all folks... 78 | echo "Done." 79 | osc status 80 | exit 0 81 | -------------------------------------------------------------------------------- /src/core/sipe-lync-autodiscover.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sipe-lync-autodiscover.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2016 SIPE Project 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | /* Forward declarations */ 25 | struct sipe_core_private; 26 | 27 | /* Lync data determined by autodiscover */ 28 | struct sipe_lync_autodiscover_data { 29 | const gchar *server; 30 | guint port; 31 | }; 32 | 33 | /** 34 | * Lync autodiscover callback 35 | * 36 | * @param sipe_private SIPE core private data 37 | * @param servers list with Lync autodiscover data 38 | * @param callback_data callback data 39 | * 40 | * servers will be @c NULL when request got aborted. 41 | * last entry in the list will be a @c NULL entry. 42 | */ 43 | typedef void (sipe_lync_autodiscover_callback)(struct sipe_core_private *sipe_private, 44 | GSList *servers, 45 | gpointer callback_data); 46 | 47 | /** 48 | * Free first callback data entry on the server list 49 | * 50 | * @param servers list given to callback (may be @c NULL) 51 | * 52 | * @return new list header 53 | */ 54 | GSList *sipe_lync_autodiscover_pop(GSList *servers); 55 | 56 | /** 57 | * Trigger Lync autodiscover 58 | * 59 | * @param sipe_private SIPE core private data 60 | * @param callback callback function 61 | * @param callback_data callback data 62 | */ 63 | void sipe_lync_autodiscover_start(struct sipe_core_private *sipe_private, 64 | sipe_lync_autodiscover_callback *callback, 65 | gpointer callback_data); 66 | 67 | /** 68 | * Initialize Lync autodiscover data 69 | * 70 | * @param sipe_private SIPE core private data 71 | */ 72 | void sipe_lync_autodiscover_init(struct sipe_core_private *sipe_private); 73 | 74 | /** 75 | * Free Lync autodiscover data 76 | * 77 | * @param sipe_private SIPE core private data 78 | */ 79 | void sipe_lync_autodiscover_free(struct sipe_core_private *sipe_private); 80 | -------------------------------------------------------------------------------- /Makefile.mingw: -------------------------------------------------------------------------------- 1 | ################################### tell Emacs this is a -*- makefile-gmake -*- 2 | # 3 | # Copyright (C) 2012-2014 SIPE Project 4 | # 5 | # Makefile.mingw 6 | # 7 | # Author: pier11@operamail.com 8 | # Author: zup@sbox.tugraz.at 9 | # Date 11 Nov 2009 10 | # Description: Top Makefile for win32 (mingw) port of LCS protocol plugin 11 | # 12 | ############################################################################### 13 | 14 | ifndef PIDGIN_TREE_TOP 15 | # standalone MinGW build 16 | export PIDGIN_TREE_TOP := ../pidgin-2.10.0 17 | endif 18 | include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak 19 | 20 | export CFLAGS=-Werror 21 | 22 | WIX3_HOME := /cygdrive/c/Program\ Files/Windows\ Installer\ XML\ v3 23 | WXS_NAME := pidgin-sipe 24 | export VERSION := $(shell cat VERSION) 25 | PIDGIN_VERSION := $(shell cat $(PIDGIN_TREE_TOP)/VERSION) 26 | 27 | .PHONY: all clean install msi dev devinst nsis 28 | 29 | all: 30 | $(MAKE) -C src -f $(MINGW_MAKEFILE) 31 | $(MAKE) -C po -f $(MINGW_MAKEFILE) 32 | 33 | dev: 34 | $(MAKE) -C src -f $(MINGW_MAKEFILE) 35 | 36 | clean: 37 | $(MAKE) -C src -f $(MINGW_MAKEFILE) clean 38 | $(MAKE) -C po -f $(MINGW_MAKEFILE) clean 39 | rm -f $(WXS_NAME).wix* 40 | rm -f $(WXS_NAME)-$(VERSION).msi 41 | rm -f pidgin-sipe-$(VERSION).exe 42 | 43 | rmbak: 44 | rm -f *~ 45 | $(MAKE) -C src -f $(MINGW_MAKEFILE) rmbak 46 | 47 | install: all 48 | $(MAKE) -C src -f $(MINGW_MAKEFILE) install 49 | $(MAKE) -C po -f $(MINGW_MAKEFILE) install 50 | $(MAKE) -C pixmaps -f $(MINGW_MAKEFILE) install 51 | 52 | devinst: dev 53 | $(MAKE) -C src -f $(MINGW_MAKEFILE) install 54 | 55 | tests: dev 56 | $(MAKE) -C src -f $(MINGW_MAKEFILE) tests 57 | 58 | msi: all 59 | PACKAGE_VERSION=$(VERSION) $(WIX3_HOME)/bin/candle $(WXS_NAME).wxs 60 | $(WIX3_HOME)/bin/light $(WXS_NAME).wixobj 61 | mv $(WXS_NAME).msi $(WXS_NAME)-$(VERSION).msi 62 | 63 | nsis: install 64 | makensis -DTREETOP=..\\pidgin-2.10.0 -DVERSION=$(VERSION) pidgin-sipe.nsi 65 | 66 | # MinGW cross-compile build (see contrib/mingw-cross-compile/README.txt) 67 | .PHONY: cross-compile-nsis 68 | cross-compile-nsis: 69 | $(MAKE) -f Makefile.mingw install 70 | mv $(PIDGIN_INSTALL_DIR)/plugins $(PIDGIN_INSTALL_DIR)/purple-2 71 | perl contrib/opensuse-build-service/generate_nsi.pl po/LINGUAS \ 72 | $(PIDGIN_INSTALL_DIR)/pidgin-sipe.nsi 74 | set -e; cd $(PIDGIN_INSTALL_DIR); \ 75 | makensis \ 76 | -DPIDGIN_VERSION=$(PIDGIN_VERSION) \ 77 | -DVERSION=$(VERSION) \ 78 | -DMINGW_LIBDIR=. \ 79 | -DMINGW_DATADIR=. \ 80 | pidgin-sipe.nsi 81 | mv $(PIDGIN_INSTALL_DIR)/pidgin-sipe-$(VERSION).exe $(PIDGIN_TREE_TOP) 82 | rm -rf $(PIDGIN_INSTALL_DIR) 83 | -------------------------------------------------------------------------------- /src/core/sipe-digest.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sipe-digest.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2010-2016 SIPE Project 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | /* Plain digests */ 24 | /* NOTE: can only be used by internal NTLMv2 implementation */ 25 | #define SIPE_DIGEST_MD4_LENGTH 16 26 | void sipe_digest_md4(const guchar *data, gsize length, guchar *digest); 27 | 28 | #define SIPE_DIGEST_MD5_LENGTH 16 29 | void sipe_digest_md5(const guchar *data, gsize length, guchar *digest); 30 | 31 | #define SIPE_DIGEST_SHA1_LENGTH 20 32 | void sipe_digest_sha1(const guchar *data, gsize length, guchar *digest); 33 | 34 | /* HMAC digests */ 35 | #define SIPE_DIGEST_HMAC_MD5_LENGTH SIPE_DIGEST_MD5_LENGTH 36 | void sipe_digest_hmac_md5(const guchar *key, gsize key_length, 37 | const guchar *data, gsize data_length, 38 | guchar *digest); 39 | 40 | #define SIPE_DIGEST_HMAC_SHA1_LENGTH SIPE_DIGEST_SHA1_LENGTH 41 | void sipe_digest_hmac_sha1(const guchar *key, gsize key_length, 42 | const guchar *data, gsize data_length, 43 | guchar *digest); 44 | 45 | /* Stream HMAC(SHA1) digest for file transfer */ 46 | #define SIPE_DIGEST_FILETRANSFER_LENGTH SIPE_DIGEST_SHA1_LENGTH 47 | gpointer sipe_digest_ft_start(const guchar *sha1_digest); 48 | void sipe_digest_ft_update(gpointer context, const guchar *data, gsize length); 49 | void sipe_digest_ft_end(gpointer context, guchar *digest); 50 | void sipe_digest_ft_destroy(gpointer context); 51 | 52 | /* Stream digests, e.g. for TLS */ 53 | gpointer sipe_digest_md5_start(void); 54 | void sipe_digest_md5_update(gpointer context, const guchar *data, gsize length); 55 | void sipe_digest_md5_end(gpointer context, guchar *digest); 56 | void sipe_digest_md5_destroy(gpointer context); 57 | gpointer sipe_digest_sha1_start(void); 58 | void sipe_digest_sha1_update(gpointer context, const guchar *data, gsize length); 59 | void sipe_digest_sha1_end(gpointer context, guchar *digest); 60 | void sipe_digest_sha1_destroy(gpointer context); 61 | -------------------------------------------------------------------------------- /src/adium/SIPEAdiumPlugin.xcodeproj/xcshareddata/xcschemes/pidgin-sipe.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 60 | 61 | 63 | 64 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /src/purple/purple-connection.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file purple-connection.c 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2010-2019 SIPE Project 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #ifdef HAVE_CONFIG_H 24 | #include "config.h" 25 | #endif 26 | 27 | #include "glib.h" 28 | 29 | #include "connection.h" 30 | 31 | #include "sipe-backend.h" 32 | #include "sipe-core.h" 33 | 34 | #include "purple-private.h" 35 | 36 | #if PURPLE_VERSION_CHECK(3,0,0) 37 | #else 38 | #define PURPLE_CONNECTION_CONNECTED PURPLE_CONNECTED 39 | #define purple_account_is_disconnecting(a) a->disconnecting 40 | #define purple_connection_error(g, e, m) purple_connection_error_reason(g, e, m) 41 | #endif 42 | 43 | void sipe_backend_connection_completed(struct sipe_core_public *sipe_public) 44 | { 45 | purple_connection_set_state(sipe_public->backend_private->gc, 46 | PURPLE_CONNECTION_CONNECTED); 47 | } 48 | 49 | static const guint map[SIPE_CONNECTION_ERROR_LAST] = { 50 | PURPLE_CONNECTION_ERROR_NETWORK_ERROR, 51 | PURPLE_CONNECTION_ERROR_INVALID_USERNAME, 52 | PURPLE_CONNECTION_ERROR_INVALID_SETTINGS, 53 | PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED, 54 | PURPLE_CONNECTION_ERROR_AUTHENTICATION_IMPOSSIBLE, 55 | }; 56 | 57 | void sipe_backend_connection_error(struct sipe_core_public *sipe_public, 58 | sipe_connection_error error, 59 | const gchar *msg) 60 | { 61 | purple_connection_error(sipe_public->backend_private->gc, 62 | map[error], 63 | msg); 64 | } 65 | 66 | gboolean sipe_backend_connection_is_disconnecting(struct sipe_core_public *sipe_public) 67 | { 68 | return(purple_account_is_disconnecting(sipe_public->backend_private->account)); 69 | } 70 | 71 | gboolean sipe_backend_connection_is_valid(struct sipe_core_public *sipe_public) 72 | { 73 | return PURPLE_CONNECTION_IS_CONNECTED(sipe_public->backend_private->gc); 74 | } 75 | 76 | /* 77 | Local Variables: 78 | mode: c 79 | c-file-style: "bsd" 80 | indent-tabs-mode: t 81 | tab-width: 8 82 | End: 83 | */ 84 | -------------------------------------------------------------------------------- /src/purple/purple-dbus.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file purple-dbus.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2017 SIPE Project 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | /* 24 | * Work around some versions of dbus-server.h that redefine DBUS_EXPORT 25 | * without checking that it is already defined. Include dbus/dbus.h first 26 | * to suppress the implicit inclusion through dbus-server.h. Then undefine 27 | * the macro to avoid the potential build failure. 28 | */ 29 | #include 30 | #ifdef DBUS_EXPORT 31 | #undef DBUS_EXPORT 32 | #endif 33 | #include "dbus-server.h" 34 | #include "account.h" 35 | 36 | extern PurpleDBusBinding sipe_purple_dbus_bindings[]; 37 | 38 | /** 39 | * SipeCallPhoneNumber - call phone number 40 | * 41 | * @param account (in) libpurple account 42 | * @param number (in) phone number string 43 | */ 44 | DBUS_EXPORT void sipe_call_phone_number(PurpleAccount *account, 45 | const gchar *phone_number); 46 | 47 | /** 48 | * SipeJoinConferenceWithOrganizerAndId - join conference using 49 | * organizer account name and meeting ID 50 | * 51 | * @param account (in) libpurple account 52 | * @param organizer (in) organizer account name 53 | * @param id (in) meeting ID string 54 | */ 55 | DBUS_EXPORT void sipe_join_conference_with_organizer_and_id(PurpleAccount *account, 56 | const gchar *organizer, 57 | const gchar *meeting_id); 58 | 59 | /** 60 | * SipeJoinConferenceWithUri - join conference using URI 61 | * 62 | * @param account (in) libpurple account 63 | * @param uri (in) URI string 64 | */ 65 | DBUS_EXPORT void sipe_join_conference_with_uri(PurpleAccount *account, 66 | const gchar *uri); 67 | 68 | /** 69 | * SipeRepublishCalendar 70 | */ 71 | DBUS_EXPORT void sipe_republish_calendar(PurpleAccount *account); 72 | 73 | /** 74 | * SipeResetStatus 75 | */ 76 | DBUS_EXPORT void sipe_reset_status(PurpleAccount *account); 77 | 78 | /* 79 | Local Variables: 80 | mode: c 81 | c-file-style: "bsd" 82 | indent-tabs-mode: t 83 | tab-width: 8 84 | End: 85 | */ 86 | -------------------------------------------------------------------------------- /contrib/dbus/SipeHelper.pm: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # @file SipeHelper.pm 4 | # 5 | # pidgin-sipe 6 | # 7 | # Copyright (C) 2017 SIPE Project 8 | # 9 | # This program is free software; you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation; either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # This program is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with this program; if not, write to the Free Software 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | # 23 | # 24 | # Support code for D-Bus test scripts 25 | # 26 | package SipeHelper; 27 | use 5.024; 28 | use strict; 29 | use warnings; 30 | 31 | use Carp; 32 | use Net::DBus; 33 | 34 | # Connect to libpurple over the session bus 35 | my $purple; 36 | sub init() 37 | { 38 | eval { 39 | my $bus = Net::DBus->session; 40 | my $service = $bus->get_service('im.pidgin.purple.PurpleService'); 41 | $purple = $service->get_object('/im/pidgin/purple/PurpleObject', 42 | 'im.pidgin.purple.PurpleInterface'); 43 | }; 44 | die "ERROR: can't find any active libpurple D-Bus instance, Are you sure you started Pidgin/Finch?\n\n$@" 45 | if $@; 46 | } 47 | 48 | # Call code reference for all active SIPE accounts 49 | sub forSipeAccounts($) 50 | { 51 | my($code) = @_; 52 | croak "ERROR: ${code} should be code reference" 53 | unless ref($code) eq "CODE"; 54 | croak "ERROR: called without initializing" 55 | unless $purple; 56 | 57 | # Get list of enabled accounts 58 | my $accounts = $purple->PurpleAccountsGetAllActive(); 59 | for my $accountId (@{ $accounts }) { 60 | my $username = $purple->PurpleAccountGetUsername($accountId); 61 | my $protocolId = $purple->PurpleAccountGetProtocolId($accountId); 62 | my $protocolName = $purple->PurpleAccountGetProtocolName($accountId); 63 | my $connectionId = $purple->PurpleAccountGetConnection($accountId); 64 | print "found account ${accountId}: ${username} (${protocolId}/${protocolName}, ${connectionId})\n"; 65 | 66 | # Filter out SIPE accounts that are online 67 | if (($protocolId eq 'prpl-sipe') && ($connectionId != 0)) { 68 | 69 | # Filter out SIPE accounts that are really connected 70 | if ($purple->PurpleConnectionIsConnected($connectionId)) { 71 | 72 | # Call code reference 73 | $code->($purple, $accountId, $username); 74 | } 75 | } 76 | } 77 | } 78 | 79 | # modules need to return a true value 80 | 1; 81 | -------------------------------------------------------------------------------- /src/core/sipe-http-transport.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sipe-http-transport.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2013 SIPE Project 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | /* Private interface between HTTP Request <-> Transport layers */ 25 | #ifndef _SIPE_HTTP_PRIVATE_IF_TRANSPORT 26 | #error "you are not allowed to include sipe-http-transport.h!" 27 | #endif 28 | 29 | /* 30 | * Interface dependencies: 31 | * 32 | * 33 | */ 34 | 35 | /* Forward declarations */ 36 | struct sipe_core_private; 37 | struct sip_sec_context; 38 | 39 | struct sipe_http_connection_public { 40 | struct sipe_core_private *sipe_private; 41 | 42 | GSList *pending_requests; /* handled by sipe-http-request.c */ 43 | struct sip_sec_context *context; /* handled by sipe-http-request.c */ 44 | gchar *cached_authorization; /* handled by sipe-http-request.c */ 45 | 46 | gchar *host; 47 | guint32 port; 48 | gboolean connected; 49 | }; 50 | 51 | /** 52 | * Check if we're shutting down the HTTP stack 53 | * 54 | * @param sipe_private SIPE core private data 55 | * 56 | * @return return @c TRUE if HTTP stack is shutting down 57 | */ 58 | gboolean sipe_http_shutting_down(struct sipe_core_private *sipe_private); 59 | 60 | /** 61 | * Initiate HTTP connection 62 | * 63 | * If a connection to this host/port already exists it will be reused. 64 | * 65 | * @param sipe_private SIPE core private data 66 | * @param host name of the host to connect to 67 | * @param port port number to connect to 68 | * @param use_tls use TLS if @c TRUE, otherwise TCP 69 | * 70 | * @return HTTP connection public data 71 | */ 72 | struct sipe_http_connection_public *sipe_http_transport_new(struct sipe_core_private *sipe_private, 73 | const gchar *host, 74 | guint32 port, 75 | gboolean use_tls); 76 | 77 | /** 78 | * Send HTTP request 79 | * 80 | * @param conn_public HTTP connection public data 81 | * @param header HTTP header 82 | * @param body HTTP body (may be @c NULL) 83 | */ 84 | void sipe_http_transport_send(struct sipe_http_connection_public *conn_public, 85 | const gchar *header, 86 | const gchar *body); 87 | -------------------------------------------------------------------------------- /src/core/sipe-crypt.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sipe-crypt.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2010-2015 SIPE Project 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | /** 24 | * Crypto backend specific initialization/shutdown 25 | * 26 | * TRUE - production mode, i.e. called from sipe-core.c 27 | * FALSE - test mode 28 | */ 29 | void sipe_crypto_init(gboolean production_mode); 30 | void sipe_crypto_shutdown(void); 31 | 32 | void sipe_crypt_des(const guchar *key, 33 | const guchar *plaintext, gsize plaintext_length, 34 | guchar *encrypted_text); 35 | 36 | void sipe_crypt_rc4(const guchar *key, gsize key_length, 37 | const guchar *plaintext, gsize plaintext_length, 38 | guchar *encrypted_text); 39 | 40 | /* plaintext & encrypted_text must point to modulus_length long spaces */ 41 | gboolean sipe_crypt_rsa_encrypt(gpointer public, gsize modulus_length, 42 | const guchar *plaintext, 43 | guchar *encrypted_text); 44 | gboolean sipe_crypt_rsa_decrypt(gpointer private, gsize modulus_length, 45 | const guchar *encrypted_text, 46 | guchar *plaintext); 47 | /* must be g_free'd() */ 48 | guchar *sipe_crypt_rsa_sign(gpointer private, 49 | const guchar *digest, gsize digest_length, 50 | gsize *signature_length); 51 | gboolean sipe_crypt_verify_rsa(gpointer public, 52 | const guchar *digest, gsize digest_length, 53 | const guchar *signature, gsize signature_length); 54 | 55 | /* Stream RC4 cipher for file transfer */ 56 | gpointer sipe_crypt_ft_start(const guchar *key); 57 | void sipe_crypt_ft_stream(gpointer context, 58 | const guchar *in, gsize length, 59 | guchar *out); 60 | void sipe_crypt_ft_destroy(gpointer context); 61 | 62 | /* Stream RC4 cipher for TLS */ 63 | gpointer sipe_crypt_tls_start(const guchar *key, gsize key_length); 64 | void sipe_crypt_tls_stream(gpointer context, 65 | const guchar *in, gsize length, 66 | guchar *out); 67 | void sipe_crypt_tls_destroy(gpointer context); 68 | 69 | /* Block AES-CBC cipher for TLS */ 70 | void sipe_crypt_tls_block(const guchar *key, gsize key_length, 71 | const guchar *iv, gsize iv_length, 72 | const guchar *in, gsize length, 73 | guchar *out); 74 | -------------------------------------------------------------------------------- /src/purple/purple-schedule.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sipe-schedule.c 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2010-2017 SIPE Project 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #include 24 | 25 | #include "version.h" 26 | #if PURPLE_VERSION_CHECK(3,0,0) 27 | #else 28 | #include "eventloop.h" 29 | #define g_timeout_add(t, f, d) purple_timeout_add(t, f, d) 30 | #define g_timeout_add_seconds(t, f, d) purple_timeout_add_seconds(t, f, d) 31 | #define g_source_remove(t) purple_timeout_remove(t) 32 | #endif 33 | 34 | #include "sipe-common.h" 35 | #include "sipe-backend.h" 36 | #include "sipe-core.h" 37 | 38 | struct purple_schedule { 39 | gpointer core_data; 40 | guint timeout_handler; 41 | }; 42 | 43 | static gboolean purple_timeout_execute(gpointer data) 44 | { 45 | gpointer core_data = ((struct purple_schedule *) data)->core_data; 46 | g_free(data); 47 | sipe_core_schedule_execute(core_data); 48 | return(FALSE); 49 | } 50 | 51 | gpointer sipe_backend_schedule_seconds(SIPE_UNUSED_PARAMETER struct sipe_core_public *sipe_public, 52 | guint timeout, 53 | gpointer data) 54 | { 55 | struct purple_schedule *schedule = g_malloc(sizeof(struct purple_schedule)); 56 | schedule->core_data = data; 57 | schedule->timeout_handler = g_timeout_add_seconds(timeout, 58 | purple_timeout_execute, 59 | schedule); 60 | return(schedule); 61 | } 62 | 63 | gpointer sipe_backend_schedule_mseconds(SIPE_UNUSED_PARAMETER struct sipe_core_public *sipe_public, 64 | guint timeout, 65 | gpointer data) 66 | { 67 | struct purple_schedule *schedule = g_malloc(sizeof(struct purple_schedule)); 68 | schedule->core_data = data; 69 | schedule->timeout_handler = g_timeout_add(timeout, 70 | purple_timeout_execute, 71 | schedule); 72 | return(schedule); 73 | } 74 | 75 | void sipe_backend_schedule_cancel(SIPE_UNUSED_PARAMETER struct sipe_core_public *sipe_public, 76 | gpointer data) 77 | { 78 | struct purple_schedule *schedule = data; 79 | g_source_remove(schedule->timeout_handler); 80 | g_free(schedule); 81 | } 82 | 83 | /* 84 | Local Variables: 85 | mode: c 86 | c-file-style: "bsd" 87 | indent-tabs-mode: t 88 | tab-width: 8 89 | End: 90 | */ 91 | -------------------------------------------------------------------------------- /src/miranda/vlc.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | extern HINSTANCE hInst; 7 | 8 | LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) 9 | { 10 | switch(msg) 11 | { 12 | case WM_CLOSE: 13 | DestroyWindow(hwnd); 14 | break; 15 | case WM_DESTROY: 16 | PostQuitMessage(0); 17 | break; 18 | default: 19 | return DefWindowProc(hwnd, msg, wParam, lParam); 20 | } 21 | return 0; 22 | } 23 | 24 | int __stdcall show_vlc(void *data) 25 | { 26 | libvlc_instance_t * inst; 27 | libvlc_media_player_t *mp; 28 | libvlc_media_t *m; 29 | int rc; 30 | HANDLE w; 31 | WNDCLASSEX wc; 32 | 33 | /* Load the VLC engine */ 34 | inst = libvlc_new (0, NULL); 35 | 36 | /* Create a new item */ 37 | m = libvlc_media_new_path (inst, "C:\\Temp\\[001_1-01] Broken Bow (Part 1).mpg"); 38 | 39 | /* Create a media player playing environement */ 40 | mp = libvlc_media_player_new_from_media (m); 41 | 42 | /* No need to keep the media now */ 43 | libvlc_media_release (m); 44 | 45 | 46 | //Step 1: Registering the Window Class 47 | wc.cbSize = sizeof(WNDCLASSEX); 48 | wc.style = 0; 49 | wc.lpfnWndProc = WndProc; 50 | wc.cbClsExtra = 0; 51 | wc.cbWndExtra = 0; 52 | wc.hInstance = hInst; 53 | wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); 54 | wc.hCursor = LoadCursor(NULL, IDC_ARROW); 55 | wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); 56 | wc.lpszMenuName = NULL; 57 | wc.lpszClassName = L"myclassstuff"; 58 | wc.hIconSm = LoadIcon(NULL, IDI_APPLICATION); 59 | 60 | if(!RegisterClassEx(&wc)) 61 | { 62 | MessageBox(NULL, L"Window Registration Failed!", L"Error!", MB_ICONEXCLAMATION | MB_OK); 63 | return 0; 64 | } 65 | 66 | w = CreateWindow(L"myclassstuff", L"VLC Window", WS_OVERLAPPEDWINDOW, 50, 50, 400, 400, NULL, NULL, hInst, NULL); 67 | 68 | if (!w) 69 | { 70 | DWORD d = GetLastError(); 71 | printf ("===================== %08x ==============\n", d); 72 | 73 | } 74 | 75 | // libvlc_media_player_set_hwnd (mp, w); 76 | 77 | // ShowWindow(w, SW_SHOW); 78 | // UpdateWindow(w); 79 | 80 | #if 0 81 | /* This is a non working code that show how to hooks into a window, 82 | * if we have a window around */ 83 | libvlc_media_player_set_xdrawable (mp, xdrawable); 84 | /* or on windows */ 85 | /* or on mac os */ 86 | libvlc_media_player_set_nsobject (mp, view); 87 | #endif 88 | 89 | /* play the media_player */ 90 | rc = libvlc_media_player_play (mp); 91 | 92 | Sleep (60000); /* Let it play a bit */ 93 | 94 | /* Stop playing */ 95 | libvlc_media_player_stop (mp); 96 | 97 | /* Free the media_player */ 98 | libvlc_media_player_release (mp); 99 | 100 | libvlc_release (inst); 101 | 102 | return 0; 103 | } 104 | -------------------------------------------------------------------------------- /src/core/sdpmsg.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sdpmsg.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2014-2017 SIPE Project 7 | * Copyright (C) 2010 Jakub Adam 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | struct sdpmsg { 25 | gchar *ip; /* currently this has to be an IPv4 address */ 26 | GSList *media; 27 | SipeIceVersion ice_version; 28 | }; 29 | 30 | struct sdpmedia { 31 | gchar *name; 32 | gchar *ip; /* currently this has to be an IPv4 address */ 33 | guint port; 34 | 35 | GSList *attributes; 36 | GSList *candidates; 37 | GSList *codecs; 38 | GSList *remote_candidates; 39 | 40 | guchar *encryption_key; 41 | int encryption_key_id; 42 | gboolean encryption_active; 43 | }; 44 | 45 | struct sdpcandidate { 46 | gchar *foundation; 47 | SipeComponentType component; 48 | SipeCandidateType type; 49 | SipeNetworkProtocol protocol; 50 | guint32 priority; 51 | gchar *ip; /* currently this has to be an IPv4 address */ 52 | guint port; 53 | gchar *base_ip; 54 | guint base_port; 55 | gchar *username; 56 | gchar *password; 57 | }; 58 | 59 | struct sdpcodec { 60 | gint id; 61 | gchar *name; 62 | gint clock_rate; 63 | gint channels; 64 | SipeMediaType type; 65 | GSList *parameters; 66 | }; 67 | 68 | /** 69 | * Parses SDP message into @c sdpmsg structure. 70 | * 71 | * @param msg SDP message as character string 72 | * 73 | * @return New @c sdpmsg or NULL if message can not be parsed. 74 | */ 75 | struct sdpmsg *sdpmsg_parse_msg(const gchar *msg); 76 | 77 | /** 78 | * Creates a SDP message from the @c sdpmsg structure. 79 | * 80 | * @param msg a @c sdpmsg 81 | * 82 | * @return SDP message as a character string that must be g_free'd after use. 83 | */ 84 | gchar *sdpmsg_to_string(const struct sdpmsg *msg); 85 | 86 | /** 87 | * Deallocates @c sdpmsg. 88 | */ 89 | void sdpmsg_free(struct sdpmsg *msg); 90 | 91 | /** 92 | * Deallocates @c sdpcandidate. 93 | */ 94 | void sdpcandidate_free(struct sdpcandidate *candidate); 95 | 96 | /** 97 | * Deallocates @c sdpcodec. 98 | */ 99 | void sdpcodec_free(struct sdpcodec *codec); 100 | 101 | /** 102 | * Deallocates @c sdpmedia. 103 | */ 104 | void sdpmedia_free(struct sdpmedia *media); 105 | -------------------------------------------------------------------------------- /src/purple/purple-im.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file purple-im.c 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2010-2013 SIPE Project 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #ifdef HAVE_CONFIG_H 24 | #include "config.h" 25 | #endif 26 | 27 | #include 28 | 29 | #include 30 | 31 | #include "server.h" 32 | 33 | #include "version.h" 34 | #if PURPLE_VERSION_CHECK(3,0,0) 35 | #include "conversations.h" 36 | #else 37 | #define purple_serv_got_im(c, w, m, f, t) serv_got_im(c, w, m, f, t) 38 | #endif 39 | 40 | #include "purple-private.h" 41 | 42 | #include "sipe-backend.h" 43 | #include "sipe-core.h" 44 | #include "sipe-nls.h" 45 | 46 | void sipe_backend_im_message(struct sipe_core_public *sipe_public, 47 | const gchar *from, 48 | const gchar *html) 49 | { 50 | struct sipe_backend_private *purple_private = sipe_public->backend_private; 51 | purple_serv_got_im(purple_private->gc, 52 | from, 53 | html, 54 | 0, 55 | time(NULL)); 56 | } 57 | 58 | void sipe_backend_im_topic(struct sipe_core_public *sipe_public, 59 | const gchar *with, 60 | const gchar *topic) 61 | { 62 | PurpleAccount *account = sipe_public->backend_private->account; 63 | PurpleConversation *conv; 64 | gchar *msg; 65 | 66 | /* 67 | * Ensure we have an open conversation with the buddy, otherwise 68 | * message would be lost. 69 | */ 70 | #if PURPLE_VERSION_CHECK(3,0,0) 71 | conv = (PurpleConversation *) purple_conversations_find_im_with_account( 72 | #else 73 | conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_ANY, 74 | #endif 75 | with, 76 | account); 77 | if (!conv) 78 | #if PURPLE_VERSION_CHECK(3,0,0) 79 | conv = (PurpleConversation *) purple_im_conversation_new( 80 | #else 81 | conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, 82 | #endif 83 | account, 84 | with); 85 | 86 | msg = g_strdup_printf(_("Conversation subject: %s"), topic); 87 | sipe_backend_notify_message_info(sipe_public, 88 | (struct sipe_backend_chat_session *)conv, 89 | with, 90 | msg); 91 | g_free(msg); 92 | } 93 | 94 | /* 95 | Local Variables: 96 | mode: c 97 | c-file-style: "bsd" 98 | indent-tabs-mode: t 99 | tab-width: 8 100 | End: 101 | */ 102 | -------------------------------------------------------------------------------- /src/core/sipe-chat.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sipe-chat.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2009-2017 SIPE Project 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | /* Forward declarations */ 24 | struct sipe_core_private; 25 | struct sip_session; 26 | struct sipe_backend_chat_session; 27 | 28 | enum sipe_chat_type { 29 | SIPE_CHAT_TYPE_UNKNOWN = 0, 30 | SIPE_CHAT_TYPE_MULTIPARTY, 31 | SIPE_CHAT_TYPE_CONFERENCE, 32 | SIPE_CHAT_TYPE_GROUPCHAT 33 | }; 34 | 35 | struct sipe_chat_session { 36 | struct sipe_backend_chat_session *backend; 37 | 38 | /* 39 | * Chat identifier (must be unique per account) 40 | * 41 | * 2007 Group chat: channel URI 42 | * 2007 Conference: focus URI 43 | * 2005 multiparty chat: roster manager SIP URI 44 | */ 45 | gchar *id; 46 | 47 | /* Human readable chat identifier (can have duplicates) */ 48 | gchar *title; 49 | 50 | /* SIPE_CHAT_TYPE_xxx */ 51 | guint type; 52 | 53 | gchar *join_url; 54 | gchar *dial_in_conf_id; 55 | gchar *organizer; 56 | 57 | struct sipe_user_ask_ctx *appshare_ask_ctx; 58 | }; 59 | 60 | /** 61 | * Create a new chat session 62 | * 63 | * @param session 64 | */ 65 | struct sipe_chat_session * 66 | sipe_chat_create_session(guint type, 67 | const gchar *id, 68 | const gchar *title); 69 | 70 | /** 71 | * Remove a chat session 72 | * 73 | * @param session 74 | */ 75 | void 76 | sipe_chat_remove_session(struct sipe_chat_session *session); 77 | 78 | /** 79 | * Release resources on unload 80 | */ 81 | void 82 | sipe_chat_destroy(void); 83 | 84 | /** 85 | * Generate a name for a new private chat. 86 | * 87 | * @return chat name. Must be g_free()'d after use 88 | */ 89 | gchar * 90 | sipe_chat_get_name(void); 91 | 92 | /** 93 | * 94 | * 95 | * @param sipe_private SIPE core private data 96 | * @param session SIPE session for chat 97 | */ 98 | void 99 | sipe_process_pending_invite_queue(struct sipe_core_private *sipe_private, 100 | struct sip_session *session); 101 | 102 | /** 103 | * Set roster manager URI for a multiparty chat 104 | * 105 | * @param session SIPE session for chat 106 | * @param roster_manager New roster manager URI or NULL 107 | */ 108 | void sipe_chat_set_roster_manager(struct sip_session *session, 109 | const gchar *roster_manager); 110 | -------------------------------------------------------------------------------- /src/core/sipe-tls-analyzer.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sipe-tls-analyzer.c 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2015 SIPE Project 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | * 23 | * 24 | * Takes Base64-encoded gssapi-data= values from TLS-DSK authentication attempt 25 | * on the command line and prints out the TLS message contents in human readable 26 | * format. 27 | */ 28 | 29 | #ifdef HAVE_CONFIG_H 30 | #include "config.h" 31 | #endif 32 | 33 | #include 34 | #include 35 | 36 | #include 37 | #include 38 | 39 | #include "sipe-common.h" 40 | #include "sipe-utils.h" 41 | #define _SIPE_COMPILING_ANALYZER 42 | #include "sipe-tls.c" 43 | 44 | /* stub functions */ 45 | void sipe_backend_debug_literal(SIPE_UNUSED_PARAMETER sipe_debug_level level, 46 | const gchar *msg) 47 | { 48 | printf("%s", msg); 49 | } 50 | 51 | void sipe_backend_debug(SIPE_UNUSED_PARAMETER sipe_debug_level level, 52 | const gchar *format, 53 | ...) 54 | { 55 | va_list ap; 56 | va_start(ap, format); 57 | vprintf(format, ap); 58 | va_end(ap); 59 | } 60 | 61 | int main(int argc, char *argv[]) 62 | { 63 | struct tls_internal_state *state; 64 | 65 | if (argc < 2) { 66 | fprintf(stderr, "Usage: %s ...\n", argv[0]); 67 | return(1); 68 | } 69 | 70 | state = g_new0(struct tls_internal_state, 1); 71 | state->debug = g_string_new(""); 72 | 73 | while (--argc > 0) { 74 | const gchar *base64 = *++argv; 75 | guchar *buffer; 76 | 77 | printf("Base64: %s\n", base64); 78 | buffer = g_base64_decode(base64, &state->common.in_length); 79 | if (buffer && state->common.in_length) { 80 | printf("Decoded %" G_GSIZE_FORMAT " bytes\n", 81 | state->common.in_length); 82 | state->common.in_buffer = buffer; 83 | tls_record_parse(state, TRUE, 0); 84 | free_parse_data(state); 85 | printf("-------------------------------------------------------------------------------\n"); 86 | g_free(buffer); 87 | } else { 88 | printf("Corrupted Base64 - skipping\n"); 89 | } 90 | } 91 | 92 | g_string_free(state->debug, TRUE); 93 | g_free(state); 94 | 95 | return(0); 96 | } 97 | 98 | /* 99 | Local Variables: 100 | mode: c 101 | c-file-style: "bsd" 102 | indent-tabs-mode: t 103 | tab-width: 8 104 | End: 105 | */ 106 | -------------------------------------------------------------------------------- /contrib/opensuse-build-service/pidgin-sipe.nsi.template: -------------------------------------------------------------------------------- 1 | ;NSIS Modern User Interface 2 | ;Basic Example Script 3 | ;Written by Joost Verburg 4 | 5 | ;-------------------------------- 6 | ;Include Modern UI 7 | 8 | !include "MUI.nsh" 9 | 10 | ;-------------------------------- 11 | ;General 12 | 13 | ;Name and file 14 | Name "Pidgin SIPE Plugin" 15 | OutFile "pidgin-sipe-${VERSION}.exe" 16 | 17 | ;Default installation folder 18 | InstallDir "$PROGRAMFILES\Pidgin" 19 | 20 | ;Get installation folder from registry if available 21 | InstallDirRegKey HKLM "Software\pidgin" "" 22 | 23 | ; 24 | SetCompressor /FINAL /SOLID lzma 25 | SetCompressorDictSize 64 26 | 27 | ;-------------------------------- 28 | ;Interface Settings 29 | 30 | !define MUI_ABORTWARNING 31 | 32 | ;-------------------------------- 33 | ;Pages 34 | 35 | ;!insertmacro MUI_PAGE_LICENSE "Basic.nsi" 36 | ;!insertmacro MUI_PAGE_COMPONENTS 37 | !insertmacro MUI_PAGE_DIRECTORY 38 | !insertmacro MUI_PAGE_INSTFILES 39 | 40 | !insertmacro MUI_UNPAGE_CONFIRM 41 | !insertmacro MUI_UNPAGE_INSTFILES 42 | 43 | ;-------------------------------- 44 | ;Languages 45 | 46 | !insertmacro MUI_LANGUAGE "English" 47 | 48 | ;-------------------------------- 49 | ;Installer Sections 50 | 51 | Section "PidginSIPE" SecPidginSIPE 52 | SetOutPath "$INSTDIR\plugins" 53 | File "${MINGW_LIBDIR}\purple-2\libsipe.dll" 54 | SetOutPath "$INSTDIR\pidgin-${PIDGIN_VERSION}-dbgsym\plugins" 55 | File "${MINGW_LIBDIR}\purple-2\libsipe.dll.dbgsym" 56 | SetOutPath "$INSTDIR\pixmaps\pidgin\protocols\16" 57 | File "${MINGW_DATADIR}\pixmaps\pidgin\protocols\16\sipe.png" 58 | SetOutPath "$INSTDIR\pixmaps\pidgin\protocols\22" 59 | File "${MINGW_DATADIR}\pixmaps\pidgin\protocols\22\sipe.png" 60 | SetOutPath "$INSTDIR\pixmaps\pidgin\protocols\48" 61 | File "${MINGW_DATADIR}\pixmaps\pidgin\protocols\48\sipe.png" 62 | SetOutPath "$INSTDIR\pixmaps\pidgin\protocols\scalable" 63 | File "${MINGW_DATADIR}\pixmaps\pidgin\protocols\scalable\sipe.svg" 64 | ;;; INSTALL_FILES_LOCALE 65 | 66 | ;Create uninstaller 67 | WriteUninstaller "$INSTDIR\Uninstall-pidgin-sipe.exe" 68 | 69 | SectionEnd 70 | 71 | ;-------------------------------- 72 | ;Descriptions 73 | 74 | ;Language strings 75 | LangString DESC_SecPidginSIPE ${LANG_ENGLISH} "The Pidgin SIPE Plugin." 76 | 77 | ;Assign language strings to sections 78 | ;!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN 79 | ; !insertmacro MUI_DESCRIPTION_TEXT ${SecPidginPP} $(DESC_SecPidginPP) 80 | ;!insertmacro MUI_FUNCTION_DESCRIPTION_END 81 | 82 | ;-------------------------------- 83 | ;Uninstaller Section 84 | 85 | Section "Uninstall" 86 | 87 | ;ADD YOUR OWN FILES HERE... 88 | 89 | Delete "$INSTDIR\Uninstall-pidgin-sipe.exe" 90 | Delete "$INSTDIR\plugins\libsipe.dll" 91 | Delete "$INSTDIR\pidgin-${PIDGIN_VERSION}-dbgsym\plugins\libsipe.dll.dbgsym" 92 | Delete "$INSTDIR\pixmaps\pidgin\protocols\16\sipe.png" 93 | Delete "$INSTDIR\pixmaps\pidgin\protocols\22\sipe.png" 94 | Delete "$INSTDIR\pixmaps\pidgin\protocols\48\sipe.png" 95 | Delete "$INSTDIR\pixmaps\pidgin\protocols\scalable\sipe.svg" 96 | ;;; DELETE_FILES_LOCALE 97 | 98 | SectionEnd 99 | 100 | -------------------------------------------------------------------------------- /src/core/sipe-ocs2007.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sipe-ocs2007.h 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2011-2015 SIPE Project 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | /* Forward declarations */ 25 | struct sipmsg; 26 | struct sipe_container; 27 | struct sipe_core_private; 28 | 29 | /** 30 | * Member is directly placed to access level container. 31 | * For example SIP URI of user is in the container. 32 | */ 33 | #define SIPE_OCS2007_INDENT_MARKED_FMT "* %s" 34 | 35 | /** 36 | * OCS2007 status ID, availability & activity 37 | */ 38 | guint sipe_ocs2007_availability_from_status(const gchar *sipe_status_id, 39 | const gchar **activity_token); 40 | const gchar *sipe_ocs2007_status_from_legacy_availability(guint availability, 41 | const gchar *activity); 42 | const gchar *sipe_ocs2007_legacy_activity_description(guint availability); 43 | gboolean sipe_ocs2007_status_is_busy(const gchar *status_id); 44 | gboolean sipe_ocs2007_availability_is_away(guint availability); 45 | 46 | /** 47 | * Publish status (OCS2007+) 48 | */ 49 | void sipe_ocs2007_presence_publish(struct sipe_core_private *sipe_private, 50 | gpointer unused); 51 | void sipe_ocs2007_free(struct sipe_core_private *sipe_private); 52 | void sipe_ocs2007_category_publish(struct sipe_core_private *sipe_private, 53 | gboolean force_publish); 54 | void sipe_ocs2007_phone_state_publish(struct sipe_core_private *sipe_private); 55 | void sipe_ocs2007_reset_status(struct sipe_core_private *sipe_private); 56 | void sipe_ocs2007_process_roaming_self(struct sipe_core_private *sipe_private, 57 | struct sipmsg *msg); 58 | 59 | /** 60 | * OCS2007 Access Levels 61 | */ 62 | const gchar *sipe_ocs2007_access_level_name(guint id); 63 | int sipe_ocs2007_find_access_level(struct sipe_core_private *sipe_private, 64 | const gchar *type, 65 | const gchar *value, 66 | gboolean *is_group_access); 67 | void sipe_ocs2007_change_access_level(struct sipe_core_private *sipe_private, 68 | const int container_id, 69 | const gchar *type, 70 | const gchar *value); 71 | 72 | /* buddy menu */ 73 | struct sipe_backend_buddy_menu *sipe_ocs2007_access_control_menu(struct sipe_core_private *sipe_private, 74 | const gchar *buddy_name); 75 | 76 | /* 77 | Local Variables: 78 | mode: c 79 | c-file-style: "bsd" 80 | indent-tabs-mode: t 81 | tab-width: 8 82 | End: 83 | */ 84 | -------------------------------------------------------------------------------- /src/adium/SIPEAdiumPlugin.xcodeproj/xcshareddata/xcschemes/SIPEAdiumPlugin.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 72 | 73 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /src/core/sip-sec-ntlm-analyzer.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sip-sec-ntlm-analyzer.c 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2013-2017 SIPE Project 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | * 23 | * 24 | * Takes Base64-encoded gssapi-data= values from NTLM authentication attempt 25 | * on the command line and prints out the NTLM message contents in human readable 26 | * format. 27 | */ 28 | 29 | #ifdef HAVE_CONFIG_H 30 | #include "config.h" 31 | #endif 32 | 33 | #include 34 | #include 35 | 36 | #include 37 | #include 38 | 39 | #include "sipe-common.h" 40 | #define _SIPE_COMPILING_ANALYZER 41 | #include "sip-sec-ntlm.c" 42 | 43 | /* stub functions */ 44 | void sipe_backend_debug(SIPE_UNUSED_PARAMETER sipe_debug_level level, 45 | const gchar *format, 46 | ...) 47 | { 48 | va_list ap; 49 | va_start(ap, format); 50 | vprintf(format, ap); 51 | va_end(ap); 52 | } 53 | 54 | gboolean sipe_strequal(const gchar *left, const gchar *right) 55 | { 56 | return (g_strcmp0(left, right) == 0); 57 | } 58 | 59 | /* copied from sipe-utils.c */ 60 | char *buff_to_hex_str(const guint8 *buff, const size_t buff_len) 61 | { 62 | char *res; 63 | size_t i, j; 64 | 65 | if (!buff) return NULL; 66 | 67 | res = g_malloc(buff_len * 2 + 1); 68 | for (i = 0, j = 0; i < buff_len; i++, j+=2) { 69 | sprintf(&res[j], "%02X", buff[i]); 70 | } 71 | res[j] = '\0'; 72 | return res; 73 | } 74 | 75 | int main(int argc, char *argv[]) 76 | { 77 | if (argc < 2) { 78 | fprintf(stderr, "Usage: %s ...\n", argv[0]); 79 | return(1); 80 | } 81 | 82 | sip_sec_init__ntlm(); 83 | 84 | while (--argc > 0) { 85 | const gchar *base64 = *++argv; 86 | SipSecBuffer buffer; 87 | 88 | printf("Base64: %s\n", base64); 89 | buffer.value = g_base64_decode(base64, &buffer.length); 90 | if (buffer.value && buffer.length) { 91 | printf("Decoded %" G_GSIZE_FORMAT " bytes\n", buffer.length); 92 | sip_sec_ntlm_message_describe(&buffer, "analyzed"); 93 | printf("-------------------------------------------------------------------------------\n"); 94 | g_free(buffer.value); 95 | } else { 96 | printf("Corrupted Base64 - skipping\n"); 97 | } 98 | } 99 | 100 | sip_sec_destroy__ntlm(); 101 | 102 | return(0); 103 | } 104 | 105 | /* 106 | Local Variables: 107 | mode: c 108 | c-file-style: "bsd" 109 | indent-tabs-mode: t 110 | tab-width: 8 111 | End: 112 | */ 113 | -------------------------------------------------------------------------------- /src/purple/purple-mime.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file purple-mime.c 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2010-2015 SIPE Project 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #include "glib.h" 24 | 25 | #include "mime.h" 26 | 27 | #include "sipe-mime.h" 28 | #include "sipe-core.h" 29 | 30 | void sipe_mime_init(void) 31 | { 32 | /* Nothing to do */ 33 | } 34 | 35 | void sipe_mime_shutdown(void) 36 | { 37 | /* Nothing to do */ 38 | } 39 | 40 | static 41 | GSList * mime_fields_to_nameval(PurpleMimePart* part) 42 | { 43 | GList *keys = purple_mime_part_get_fields(part); 44 | GSList *fields = NULL; 45 | 46 | while (keys) { 47 | const char *key = keys->data; 48 | const char *value = purple_mime_part_get_field(part, key); 49 | 50 | fields = sipe_utils_nameval_add(fields, key, value); 51 | 52 | keys = keys->next; 53 | } 54 | 55 | return fields; 56 | } 57 | 58 | void sipe_mime_parts_foreach(const gchar *type, 59 | const gchar *body, 60 | sipe_mime_parts_cb callback, 61 | gpointer user_data) 62 | { 63 | gchar *doc = g_strdup_printf("Content-Type: %s\r\n\r\n%s", type, body); 64 | PurpleMimeDocument *mime = purple_mime_document_parse(doc); 65 | 66 | if (mime) { 67 | GList* parts = purple_mime_document_get_parts(mime); 68 | 69 | while (parts) { 70 | const gchar *content_type = purple_mime_part_get_field(parts->data, 71 | "Content-Type"); 72 | if (content_type) { 73 | const gchar *content = NULL; 74 | guchar *content_decoded = NULL; 75 | gsize length = 0; 76 | 77 | GSList *fields = mime_fields_to_nameval(parts->data); 78 | 79 | purple_mime_part_get_data_decoded(parts->data, 80 | &content_decoded, 81 | &length); 82 | if (content_decoded) { 83 | content = (gchar *) content_decoded; 84 | } else { 85 | /* Unknown encoding in Content-Transfer-Encoding 86 | * field; revert to the plain content extraction. */ 87 | content = purple_mime_part_get_data(parts->data); 88 | length = purple_mime_part_get_length(parts->data); 89 | } 90 | 91 | (*callback)(user_data, fields, content, length); 92 | 93 | sipe_utils_nameval_free(fields); 94 | g_free(content_decoded); 95 | } 96 | parts = parts->next; 97 | } 98 | purple_mime_document_free(mime); 99 | } 100 | g_free(doc); 101 | } 102 | 103 | /* 104 | Local Variables: 105 | mode: c 106 | c-file-style: "bsd" 107 | indent-tabs-mode: t 108 | tab-width: 8 109 | End: 110 | */ 111 | -------------------------------------------------------------------------------- /src/miranda/miranda-groupchat.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file miranda-groupchat.c 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2010-2018 SIPE Project 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #include 24 | #include 25 | 26 | #include 27 | 28 | #include "newpluginapi.h" 29 | #include "m_protosvc.h" 30 | #include "m_protoint.h" 31 | #include "m_chat.h" 32 | 33 | #include "sipe-backend.h" 34 | #include "sipe-core.h" 35 | #include "miranda-private.h" 36 | 37 | void sipe_backend_groupchat_room_add(struct sipe_core_public *sipe_public, 38 | const gchar *uri, 39 | const gchar *name, 40 | const gchar *description, 41 | guint users, 42 | guint32 flags) 43 | { 44 | SIPPROTO *pr = sipe_public->backend_private; 45 | GCSESSION gs; 46 | GCEVENT gce = {0}; 47 | GCDEST gcd = {0}; 48 | 49 | gs.cbSize = sizeof(gs); 50 | gs.iType = GCW_CHATROOM; 51 | gs.pszModule = pr->proto.m_szModuleName; 52 | gs.pszName = name; 53 | gs.pszID = uri; 54 | gs.pszStatusbarText = description; 55 | gs.dwFlags = 0; 56 | gs.dwItemData = 0; 57 | 58 | if (CallServiceSync( MS_GC_NEWSESSION, 0, (LPARAM)&gs )) 59 | { 60 | SIPE_DEBUG_ERROR("sipe_backend_groupchat_room_add: Failed to create chat session <%d> <%s>", uri, name); 61 | } 62 | 63 | gcd.pszModule = pr->proto.m_szModuleName; 64 | gcd.pszID = uri; 65 | 66 | gce.cbSize = sizeof(gce); 67 | gce.pDest = &gcd; 68 | 69 | gcd.iType = GC_EVENT_CONTROL; 70 | 71 | if (CallService( MS_GC_EVENT, 0, (LPARAM)&gce )) 72 | { 73 | SIPE_DEBUG_WARNING_NOFORMAT("sipe_backend_groupchat_room_add: Failed to add normal status to chat session"); 74 | } 75 | 76 | gce.pszStatus = "Presenter"; 77 | if (CallService( MS_GC_EVENT, 0, (LPARAM)&gce )) 78 | { 79 | SIPE_DEBUG_WARNING_NOFORMAT("sipe_backend_groupchat_room_add: Failed to add presenter status to chat session"); 80 | } 81 | 82 | 83 | gcd.iType = GC_EVENT_CONTROL; 84 | 85 | if (CallServiceSync( MS_GC_EVENT, SESSION_INITDONE, (LPARAM)&gce )) 86 | { 87 | SIPE_DEBUG_WARNING_NOFORMAT("sipe_backend_groupchat_room_add: Failed to initdone chat session"); 88 | } 89 | if (CallServiceSync( MS_GC_EVENT, SESSION_ONLINE, (LPARAM)&gce )) 90 | { 91 | SIPE_DEBUG_ERROR_NOFORMAT("sipe_backend_groupchat_room_add: Failed to set chat session online\n"); 92 | } 93 | 94 | } 95 | 96 | void sipe_backend_groupchat_room_terminate(struct sipe_core_public *sipe_public) 97 | { 98 | _NIF(); 99 | } 100 | 101 | /* 102 | Local Variables: 103 | mode: c 104 | c-file-style: "bsd" 105 | indent-tabs-mode: t 106 | tab-width: 8 107 | End: 108 | */ 109 | -------------------------------------------------------------------------------- /contrib/mingw-cross-compile/README.txt: -------------------------------------------------------------------------------- 1 | Introduction 2 | ============ 3 | 4 | With these instructions you will be able to generate libsipe.dll on a Linux 5 | machine that is compatible with the official Pidgin Windows releases. 6 | 7 | The approach described here is based on this wiki page: 8 | 9 | http://code.google.com/p/pidgin-privacy-please/wiki/HowToCrossCompileForWindowsAgainstLatestPidgin 10 | 11 | The build has been verified to work at the time this text was written. When 12 | you read this some things in Pidgin or MinGW might changed, so make sure to 13 | check the comments on that wiki page for updates. 14 | 15 | 16 | Preparation 17 | =========== 18 | 19 | You'll need a Linux machine with the following MinGW cross-compilation 20 | packages installed: 21 | 22 | Ubuntu: 23 | sudo apt-get install mingw32 mingw32-binutils mingw32-runtime 24 | 25 | Fedora: 26 | sudo yum install mingw32-gcc 27 | 28 | This will most likely work also for other Linux distros, but you'll have 29 | to check what names the MinGW cross-compilation packages are for your 30 | distro. 31 | 32 | If you are trying to build the source code from the git repository then 33 | you'll need additional tools installed, at least: 34 | 35 | autoconf 36 | automake 37 | flex 38 | 39 | If you want to build the NSIS installer package then you'll need to install: 40 | 41 | mingw32-nsis 42 | 43 | 44 | Build 45 | ===== 46 | 47 | - [pidgin-sipe source code from git instead from a release tarball] 48 | run the following commands inside the git work area: 49 | 50 | ./autogen.sh 51 | ./configure 52 | make dist-gzip 53 | 54 | This will generate pidgin-sipe-.tar.gz 55 | 56 | - create an empty directory and cd into it 57 | 58 | - run contrib/mingw-cross-compile/fetch.sh from pidgin-sipe source 59 | * make sure to check for fetch & unpack errors before proceeding! 60 | 61 | - cd into build-<...REPLACE PIDGIN VERSION HERE...>/pidgin-<...REPLACE PIDGIN VERSION HERE...> 62 | 63 | - copy/unpack pidgin-sipe source code tree into into current directory 64 | 65 | - run 66 | 67 | cp pidgin-sipe-<...REPLACE PIDGIN-SIPE VERSION HERE...>/contrib/mingw-cross-compile/local.mak . 68 | 69 | - run (this is one line on the command line!) 70 | 71 | make -C pidgin-sipe-<...REPLACE PIDGIN-SIPE VERSION HERE...>/src/core 72 | -f Makefile.mingw 73 | 74 | (to compile without SSPI support add " USE_SSPI=" to the command line) 75 | 76 | If everything goes well you should now have 77 | 78 | pidgin-sipe-<...REPLACE PIDGIN-SIPE VERSION HERE...>/src/core/libsipe.dll 79 | 80 | which you can copy into your Pidgin Windows installation directory. 81 | 82 | NOTE: PLEASE make sure that there is NO OTHER libsipe.dll in that installation 83 | or in your PATH! 84 | 85 | 86 | NSIS Installer Package 87 | ====================== 88 | 89 | After you have successfully executed the build: 90 | 91 | - run (this is one line on the command line!) 92 | 93 | PIDGIN_TREE_TOP=.. make 94 | -C pidgin-sipe-<...REPLACE PIDGIN-SIPE VERSION HERE...> 95 | -f Makefile.mingw cross-compile-nsis 96 | 97 | (to compile without SSPI support add " USE_SSPI=" to the command line) 98 | 99 | If everything goes well you should now have 100 | 101 | pidgin-sipe-<...REPLACE PIDGIN-SIPE VERSION HERE...>.exe 102 | 103 | which you now can execute on your Windows machine. 104 | -------------------------------------------------------------------------------- /src/miranda/miranda-markup.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file miranda-markup.c 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2010-11 SIPE Project 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #include "glib.h" 24 | 25 | #include 26 | 27 | #include "sipe-backend.h" 28 | 29 | gchar *sipe_backend_markup_css_property(const gchar *style, 30 | const gchar *opt) 31 | { 32 | const gchar *css_str = style; 33 | const gchar *css_value_start; 34 | const gchar *css_value_end; 35 | gchar *tmp; 36 | gchar *ret; 37 | 38 | g_return_val_if_fail(opt != NULL, NULL); 39 | 40 | if (!css_str) 41 | return NULL; 42 | 43 | /* find the CSS property */ 44 | while (1) 45 | { 46 | /* skip whitespace characters */ 47 | while (*css_str && g_ascii_isspace(*css_str)) 48 | css_str++; 49 | if (!g_ascii_isalpha(*css_str)) 50 | return NULL; 51 | if (g_ascii_strncasecmp(css_str, opt, strlen(opt))) 52 | { 53 | /* go to next css property positioned after the next ';' */ 54 | while (*css_str && *css_str != '"' && *css_str != ';') 55 | css_str++; 56 | if(*css_str != ';') 57 | return NULL; 58 | css_str++; 59 | } 60 | else 61 | break; 62 | } 63 | 64 | /* find the CSS value position in the string */ 65 | css_str += strlen(opt); 66 | while (*css_str && g_ascii_isspace(*css_str)) 67 | css_str++; 68 | if (*css_str != ':') 69 | return NULL; 70 | css_str++; 71 | while (*css_str && g_ascii_isspace(*css_str)) 72 | css_str++; 73 | if (*css_str == '\0' || *css_str == '"' || *css_str == ';') 74 | return NULL; 75 | 76 | /* mark the CSS value */ 77 | css_value_start = css_str; 78 | while (*css_str && *css_str != '"' && *css_str != ';') 79 | css_str++; 80 | css_value_end = css_str - 1; 81 | 82 | /* Removes trailing whitespace */ 83 | while (css_value_end > css_value_start && g_ascii_isspace(*css_value_end)) 84 | css_value_end--; 85 | 86 | tmp = g_strndup(css_value_start, css_value_end - css_value_start + 1); 87 | // ret = purple_unescape_html(tmp); 88 | // g_free(tmp); 89 | ret = tmp; 90 | 91 | return ret; 92 | } 93 | 94 | gchar *sipe_backend_markup_strip_html(const gchar *html) 95 | { 96 | char *tmp = g_malloc(strlen(html)+1); 97 | const char *src; 98 | char *tgt; 99 | gboolean in_tag = FALSE; 100 | 101 | for ( src=html, tgt=tmp ; *src ; src++ ) 102 | { 103 | if (*src == '<') in_tag = TRUE; 104 | if (!in_tag) *tgt++ = *src; 105 | if (*src == '>') in_tag = FALSE; 106 | } 107 | *tgt = '\0'; 108 | 109 | tgt = g_strdup(tmp); 110 | g_free(tmp); 111 | return tgt; 112 | } 113 | 114 | /* 115 | Local Variables: 116 | mode: c 117 | c-file-style: "bsd" 118 | indent-tabs-mode: t 119 | tab-width: 8 120 | End: 121 | */ 122 | -------------------------------------------------------------------------------- /src/core/sipe-appshare-xfreerdp.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sipe-appshare-xfreerdp.c 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2014-2018 SIPE Project 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #include 24 | 25 | #include 26 | #include 27 | 28 | #include 29 | 30 | #include 31 | #include 32 | 33 | #include "sipe-appshare-client.h" 34 | #include "sipe-backend.h" 35 | #include "sipe-common.h" 36 | 37 | struct xfreerdp_data { 38 | gchar *socket_path; 39 | }; 40 | 41 | static GSocketAddress * 42 | xfreerdp_get_listen_address(struct sipe_rdp_client *client) 43 | { 44 | struct xfreerdp_data *data = client->client_data; 45 | struct sockaddr_un address; 46 | 47 | data->socket_path = g_strdup_printf("%s/sipe-appshare-%u-%p", 48 | g_get_user_runtime_dir(), getpid(), 49 | client); 50 | 51 | g_unlink(data->socket_path); 52 | 53 | address.sun_family = AF_LOCAL; 54 | strncpy(address.sun_path, data->socket_path, sizeof (address.sun_path) - 1); 55 | address.sun_path[sizeof (address.sun_path) - 1] = '\0'; 56 | 57 | return g_socket_address_new_from_native(&address, sizeof (address)); 58 | } 59 | 60 | static gboolean 61 | xfreerdp_launch(struct sipe_rdp_client *client, 62 | SIPE_UNUSED_PARAMETER GSocketAddress *listen_address, 63 | SIPE_UNUSED_PARAMETER struct sipe_media_stream *stream) 64 | { 65 | struct xfreerdp_data *client_data = client->client_data; 66 | gchar *cmdline; 67 | GError *error = NULL; 68 | 69 | /* This assumes FreeRDP 2.x.x */ 70 | cmdline = g_strdup_printf("%s /v:%s /sec:rdp", 71 | client->cmdline, 72 | client_data->socket_path); 73 | 74 | g_spawn_command_line_async(cmdline, &error); 75 | g_free(cmdline); 76 | if (error) { 77 | SIPE_DEBUG_ERROR("Can't launch xfreerdp: %s", error->message); 78 | g_error_free(error); 79 | return FALSE; 80 | } 81 | 82 | return TRUE; 83 | } 84 | 85 | static void 86 | xfreerdp_free(struct sipe_rdp_client *client) 87 | { 88 | struct xfreerdp_data *client_data = client->client_data; 89 | 90 | if (client_data->socket_path) { 91 | g_unlink(client_data->socket_path); 92 | g_free(client_data->socket_path); 93 | } 94 | 95 | g_free(client_data); 96 | } 97 | 98 | void 99 | sipe_appshare_xfreerdp_init(struct sipe_rdp_client *client) 100 | { 101 | client->client_data = g_new0(struct xfreerdp_data, 1); 102 | 103 | client->get_listen_address_cb = xfreerdp_get_listen_address; 104 | client->launch_cb = xfreerdp_launch; 105 | client->free_cb = xfreerdp_free; 106 | } 107 | 108 | /* 109 | Local Variables: 110 | mode: c 111 | c-file-style: "bsd" 112 | indent-tabs-mode: t 113 | tab-width: 8 114 | End: 115 | */ 116 | -------------------------------------------------------------------------------- /src/purple/purple-debug.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file purple-debug.c 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2010-2017 SIPE Project 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #include 24 | 25 | #include "glib.h" 26 | #include "debug.h" 27 | #include "version.h" 28 | 29 | #include "sipe-backend.h" 30 | 31 | #ifdef ADIUM 32 | /* 33 | * libpurple uses g_print() and PurpleDebugUiOps->debug() when 34 | * purple_debug_is_enabled() returns TRUE. Both are redirected 35 | * by Adium to AILog(). To avoid duplicated log lines Adium 36 | * therefore never calls purple_debug_set_enabled(TRUE). 37 | */ 38 | gboolean AIDebugLoggingIsEnabled(void); 39 | #define SIPE_PURPLE_DEBUG_IS_ENABLED AIDebugLoggingIsEnabled() 40 | #define SIPE_PURPLE_DEBUG_IS_UNSAFE AIDebugLoggingIsEnabled() 41 | #else 42 | /* 43 | * The same problem happens when a client uses PurpleDebugUiOps->debug() 44 | * to redirect it to stderr, e.g. bitlbee. Such a client will not call 45 | * purple_debug_set_enabled(TRUE). Check also the other flags that were 46 | * introduced in the 2.6.x API. 47 | */ 48 | #define SIPE_PURPLE_DEBUG_IS_ENABLED (purple_debug_is_enabled() || \ 49 | purple_debug_is_verbose() || \ 50 | purple_debug_is_unsafe()) 51 | #define SIPE_PURPLE_DEBUG_IS_UNSAFE purple_debug_is_unsafe() 52 | #endif 53 | 54 | void sipe_backend_debug_literal(sipe_debug_level level, 55 | const gchar *msg) 56 | { 57 | if ((level < SIPE_DEBUG_LEVEL_LOWEST) || SIPE_PURPLE_DEBUG_IS_ENABLED) { 58 | 59 | /* purple_debug doesn't have a vprintf-like API call :-( */ 60 | switch (level) { 61 | case SIPE_LOG_LEVEL_INFO: 62 | case SIPE_DEBUG_LEVEL_INFO: 63 | purple_debug_info("sipe", "%s\n", msg); 64 | break; 65 | case SIPE_LOG_LEVEL_WARNING: 66 | case SIPE_DEBUG_LEVEL_WARNING: 67 | purple_debug_warning("sipe", "%s\n", msg); 68 | break; 69 | case SIPE_LOG_LEVEL_ERROR: 70 | case SIPE_DEBUG_LEVEL_ERROR: 71 | purple_debug_error("sipe", "%s\n", msg); 72 | break; 73 | } 74 | } 75 | } 76 | 77 | void sipe_backend_debug(sipe_debug_level level, 78 | const gchar *format, 79 | ...) 80 | { 81 | va_list ap; 82 | 83 | va_start(ap, format); 84 | 85 | if ((level < SIPE_DEBUG_LEVEL_LOWEST) || SIPE_PURPLE_DEBUG_IS_ENABLED) { 86 | 87 | /* purple_debug doesn't have a vprintf-like API call :-( */ 88 | gchar *msg = g_strdup_vprintf(format, ap); 89 | sipe_backend_debug_literal(level, msg); 90 | g_free(msg); 91 | } 92 | 93 | va_end(ap); 94 | } 95 | 96 | gboolean sipe_backend_debug_enabled(void) 97 | { 98 | return SIPE_PURPLE_DEBUG_IS_UNSAFE; 99 | } 100 | 101 | /* 102 | Local Variables: 103 | mode: c 104 | c-file-style: "bsd" 105 | indent-tabs-mode: t 106 | tab-width: 8 107 | End: 108 | */ 109 | -------------------------------------------------------------------------------- /src/purple/purple-notify.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file purple-notify.c 3 | * 4 | * pidgin-sipe 5 | * 6 | * Copyright (C) 2010-2019 SIPE Project 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #ifdef HAVE_CONFIG_H 24 | #include "config.h" 25 | #endif 26 | 27 | #include 28 | 29 | #include 30 | 31 | #include "conversation.h" 32 | #include "notify.h" 33 | 34 | #include "version.h" 35 | #if PURPLE_VERSION_CHECK(3,0,0) 36 | #include "conversations.h" 37 | #endif 38 | 39 | #include "sipe-backend.h" 40 | #include "sipe-core.h" 41 | 42 | #include "purple-private.h" 43 | 44 | static void notify_message(struct sipe_core_public *sipe_public, 45 | PurpleMessageFlags flags, 46 | struct sipe_backend_chat_session *backend_session, 47 | const gchar *who, 48 | const gchar *message) 49 | { 50 | struct sipe_backend_private *purple_private = sipe_public->backend_private; 51 | PurpleConversation *conv; 52 | 53 | if (backend_session) { 54 | conv = (PurpleConversation *) backend_session; 55 | } else { 56 | #if PURPLE_VERSION_CHECK(3,0,0) 57 | conv = (PurpleConversation *) purple_conversations_find_im_with_account( 58 | #else 59 | conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_ANY, 60 | #endif 61 | who, 62 | purple_private->account); 63 | } 64 | if (conv) { 65 | #if PURPLE_VERSION_CHECK(3,0,0) 66 | purple_conversation_write_system_message(conv, message, flags); 67 | #else 68 | purple_conversation_write(conv, NULL, message, flags, 69 | time(NULL)); 70 | #endif 71 | } 72 | } 73 | 74 | void sipe_backend_notify_message_error(struct sipe_core_public *sipe_public, 75 | struct sipe_backend_chat_session *backend_session, 76 | const gchar *who, 77 | const gchar *message) 78 | { 79 | notify_message(sipe_public, PURPLE_MESSAGE_ERROR, 80 | backend_session, who, message); 81 | } 82 | 83 | void sipe_backend_notify_message_info(struct sipe_core_public *sipe_public, 84 | struct sipe_backend_chat_session *backend_session, 85 | const gchar *who, 86 | const gchar *message) 87 | { 88 | notify_message(sipe_public, PURPLE_MESSAGE_SYSTEM, 89 | backend_session, who, message); 90 | } 91 | 92 | void sipe_backend_notify_error(struct sipe_core_public *sipe_public, 93 | const gchar *title, 94 | const gchar *msg) 95 | { 96 | struct sipe_backend_private *purple_private = sipe_public->backend_private; 97 | 98 | purple_notify_error(purple_private->gc, NULL, title, msg 99 | #if PURPLE_VERSION_CHECK(3,0,0) 100 | , NULL 101 | #endif 102 | ); 103 | } 104 | 105 | /* 106 | Local Variables: 107 | mode: c 108 | c-file-style: "bsd" 109 | indent-tabs-mode: t 110 | tab-width: 8 111 | End: 112 | */ 113 | --------------------------------------------------------------------------------