2 * @file miranda-debug.c
6 * Copyright (C) 2010 SIPE Project <http://sipe.sourceforge.net/>
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.
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.
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
29 #include "newpluginapi.h"
30 #include "m_protosvc.h"
31 #include "m_protoint.h"
34 #include "sipe-backend.h"
35 #include "miranda-private.h"
37 extern HANDLE sipe_miranda_debug_netlibuser
;
39 void sipe_backend_debug_literal(sipe_debug_level level
,
42 if (sipe_miranda_debug_netlibuser
)
44 CallService(MS_NETLIB_LOG
, (WPARAM
)sipe_miranda_debug_netlibuser
, (LPARAM
)msg
);
48 void sipe_backend_debug(sipe_debug_level level
,
50 ...) G_GNUC_PRINTF(2, 3)
56 if (sipe_backend_debug_enabled()) {
57 gchar
*msg
= g_strdup_vprintf(format
, ap
);
58 sipe_backend_debug_literal(level
, msg
);
65 gboolean
sipe_backend_debug_enabled(void)