ofdbus/dbus-glib/dbus/dbus-gthread.c
changeset 0 e4d67989cc36
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     1 /* -*- mode: C; c-file-style: "gnu" -*- */
       
     2 /* dbus-gthread.c  GThread integration
       
     3  *
       
     4  * Copyright (C) 2002  CodeFactory AB
       
     5  * Portion Copyright © 2008 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
       
     6  * Licensed under the Academic Free License version 2.1
       
     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 /* #define G_DEBUG_LOCKS 1 */
       
    25 
       
    26 #include <glib.h>
       
    27 #include <dbus/dbus.h>
       
    28 #include "dbus-glib.h"
       
    29 
       
    30 /** @addtogroup DBusGLib
       
    31  * @{
       
    32  */
       
    33 
       
    34 /**
       
    35  * dbus_g_thread_init:
       
    36  *
       
    37  * Initializes the D-BUS thread system.
       
    38  * This function may only be called
       
    39  * once and must be called prior to calling any
       
    40  * other function in the D-BUS API.
       
    41  */
       
    42  	#ifdef __SYMBIAN32__
       
    43 	EXPORT_C
       
    44 	#endif
       
    45 void
       
    46 dbus_g_thread_init (void)
       
    47 {
       
    48   if (!g_thread_supported ())
       
    49     g_error ("g_thread_init() must be called before dbus_threads_init()");
       
    50 
       
    51   dbus_threads_init_default ();
       
    52 }
       
    53 
       
    54 /** @} end of public API */