From da1cc8a0a32bf4e8610209b6f33a30402ac34f75 Mon Sep 17 00:00:00 2001 From: Stefan Becker Date: Sun, 4 Dec 2011 15:20:45 +0200 Subject: [PATCH] core cleanup: move out sipe_core_reset_status() --- siplcs.vcproj | 8 ++++++++ src/core/Makefile.am | 2 ++ src/core/Makefile.mingw | 1 + src/core/sipe-status.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ src/core/sipe-status.h | 31 +++++++++++++++++++++++++++++++ src/core/sipe.c | 10 ---------- 6 files changed, 90 insertions(+), 10 deletions(-) create mode 100644 src/core/sipe-status.c create mode 100644 src/core/sipe-status.h diff --git a/siplcs.vcproj b/siplcs.vcproj index 9d18d984..17d6305a 100755 --- a/siplcs.vcproj +++ b/siplcs.vcproj @@ -568,6 +568,14 @@ > + + + + diff --git a/src/core/Makefile.am b/src/core/Makefile.am index 81e7a7ab..81cc9931 100644 --- a/src/core/Makefile.am +++ b/src/core/Makefile.am @@ -63,6 +63,8 @@ libsipe_core_la_SOURCES = \ sipe-session.c \ sipe-sign.h \ sipe-sign.c \ + sipe-status.h \ + sipe-status.c \ sipe-subscriptions.h \ sipe-subscriptions.c \ sipe-svc.h \ diff --git a/src/core/Makefile.mingw b/src/core/Makefile.mingw index 45f6148b..c2997bb0 100644 --- a/src/core/Makefile.mingw +++ b/src/core/Makefile.mingw @@ -108,6 +108,7 @@ CLEAN_C_SRC = http-conn.c \ sipe-ocs2007.c \ sipe-schedule.c \ sipe-session.c \ + sipe-status.c \ sipe-subscriptions.c \ sipe-svc.c \ sipe-tls.c \ diff --git a/src/core/sipe-status.c b/src/core/sipe-status.c new file mode 100644 index 00000000..b9d5764a --- /dev/null +++ b/src/core/sipe-status.c @@ -0,0 +1,48 @@ +/** + * @file sipe-status.c + * + * pidgin-sipe + * + * Copyright (C) 2011 SIPE Project + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include + +#include "sipe-core.h" +#include "sipe-core-private.h" +#include "sipe-ocs2005.h" +#include "sipe-ocs2007.h" +#include "sipe-status.h" + +void sipe_core_reset_status(struct sipe_core_public *sipe_public) +{ + struct sipe_core_private *sipe_private = SIPE_CORE_PRIVATE; + if (SIPE_CORE_PRIVATE_FLAG_IS(OCS2007)) + sipe_ocs2007_reset_status(sipe_private); + else + sipe_ocs2005_reset_status(sipe_private); +} + +/* + Local Variables: + mode: c + c-file-style: "bsd" + indent-tabs-mode: t + tab-width: 8 + End: +*/ diff --git a/src/core/sipe-status.h b/src/core/sipe-status.h new file mode 100644 index 00000000..f0233e7f --- /dev/null +++ b/src/core/sipe-status.h @@ -0,0 +1,31 @@ +/** + * @file sipe-status.h + * + * pidgin-sipe + * + * Copyright (C) 2011 SIPE Project + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* + Local Variables: + mode: c + c-file-style: "bsd" + indent-tabs-mode: t + tab-width: 8 + End: +*/ diff --git a/src/core/sipe.c b/src/core/sipe.c index 649d1127..6724afdd 100644 --- a/src/core/sipe.c +++ b/src/core/sipe.c @@ -89,7 +89,6 @@ #include "sipe-dialog.h" #include "sipe-im.h" #include "sipe-nls.h" -#include "sipe-ocs2005.h" #include "sipe-ocs2007.h" #include "sipe-schedule.h" #include "sipe-session.h" @@ -867,15 +866,6 @@ void sipe_purple_setup(struct sipe_core_public *sipe_public, sip->account = purple_connection_get_account(gc); } -void sipe_core_reset_status(struct sipe_core_public *sipe_public) -{ - struct sipe_core_private *sipe_private = SIPE_CORE_PRIVATE; - if (SIPE_CORE_PRIVATE_FLAG_IS(OCS2007)) - sipe_ocs2007_reset_status(sipe_private); - else - sipe_ocs2005_reset_status(sipe_private); -} - /** for Access levels menu */ #define INDENT_FMT " %s" -- 2.11.4.GIT