sl@0: /* sl@0: * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: sl@0: #include sl@0: #include "libdbus_glib_wsd_solution.h" sl@0: #include // For emulator WSD API sl@0: sl@0: const TUid KLibGlibDbusUid3 = {0x20010156}; // This is the UID of the library sl@0: sl@0: struct libdbus_glib_global_struct *libdbus_glib_ImpurePtr() sl@0: { sl@0: sl@0: #if defined(__WINSCW__) || defined(__WINS__) sl@0: sl@0: // Access the PLS of this process sl@0: struct libdbus_glib_global_struct* p = Pls(KLibGlibDbusUid3, &libdbus_glib_Init); sl@0: return p; sl@0: sl@0: #else sl@0: sl@0: return NULL; sl@0: sl@0: #endif sl@0: sl@0: } sl@0: sl@0: int libdbus_glib_Init(libdbus_glib_global_struct *g) sl@0: { sl@0: if(g) sl@0: { sl@0: g->GET_DBUS_WSD_VAR_NAME(server_slot,dbus_gmain,s)= -1; sl@0: g->GET_DBUS_WSD_VAR_NAME(specialized_containers,dbus_gtype_specialized,s)= NULL; sl@0: g->GET_DBUS_WSD_VAR_NAME(marshal_table,dbus_gobject,s)= NULL; sl@0: g->GET_DBUS_WSD_VAR_NAME(error_metadata,dbus_gobject,s)= NULL; sl@0: sl@0: // g->GET_DBUS_WSD_VAR_NAME(globals_lock,dbus_gobject,s) = G_STATIC_RW_LOCK_INIT; sl@0: g->GET_DBUS_WSD_VAR_NAME(globals_lock,dbus_gobject,s).mutex.runtime_mutex =NULL; ///*G_STATIC_MUTEX_INIT*/ {NULL,{-3,NULL,0}}; sl@0: g->GET_DBUS_WSD_VAR_NAME(globals_lock,dbus_gobject,s).mutex.static_mutex.iState = _ENeedsNormalInit; sl@0: g->GET_DBUS_WSD_VAR_NAME(globals_lock,dbus_gobject,s).mutex.static_mutex.iPtr = NULL; sl@0: g->GET_DBUS_WSD_VAR_NAME(globals_lock,dbus_gobject,s).mutex.static_mutex.iReentry = 0; sl@0: g->GET_DBUS_WSD_VAR_NAME(globals_lock,dbus_gobject,s).read_cond=NULL; sl@0: g->GET_DBUS_WSD_VAR_NAME(globals_lock,dbus_gobject,s).write_cond=NULL; sl@0: g->GET_DBUS_WSD_VAR_NAME(globals_lock,dbus_gobject,s).read_counter=0; sl@0: g->GET_DBUS_WSD_VAR_NAME(globals_lock,dbus_gobject,s).have_writer=FALSE; sl@0: g->GET_DBUS_WSD_VAR_NAME(globals_lock,dbus_gobject,s).want_to_read=0; sl@0: g->GET_DBUS_WSD_VAR_NAME(globals_lock,dbus_gobject,s).want_to_write=0; sl@0: sl@0: sl@0: sl@0: g->GET_DBUS_WSD_VAR_NAME(g_proxy_manager_slot,dbus_gproxy,s)=-1; sl@0: g->GET_DBUS_WSD_VAR_NAME(parent_class,dbus_gproxy,s)=NULL; sl@0: sl@0: memset(&(g->GET_DBUS_WSD_VAR_NAME(signals,dbus_gproxy,s)),0,2*sizeof(guint)); sl@0: g->GET_DBUS_WSD_VAR_NAME(connection_g_proxy_lock,dbus_gproxy,s).runtime_mutex =NULL; ///*G_STATIC_MUTEX_INIT*/ {NULL,{-3,NULL,0}}; sl@0: g->GET_DBUS_WSD_VAR_NAME(connection_g_proxy_lock,dbus_gproxy,s).static_mutex.iState = _ENeedsNormalInit; sl@0: g->GET_DBUS_WSD_VAR_NAME(connection_g_proxy_lock,dbus_gproxy,s).static_mutex.iPtr = NULL; sl@0: g->GET_DBUS_WSD_VAR_NAME(connection_g_proxy_lock,dbus_gproxy,s).static_mutex.iReentry = 0; sl@0: sl@0: g->GET_DBUS_WSD_VAR_NAME(_dbus_gmain_connection_slot,dbus_gmain,g)= -1; sl@0: sl@0: sl@0: g->GET_DBUS_WSD_VAR_NAME(quark,dbus_gtype_specialized,s)=0; sl@0: g->GET_DBUS_WSD_VAR_NAME(quark,dbus_glib,s)=0; sl@0: g->GET_DBUS_WSD_VAR_NAME(our_type,dbus_glib,p)=0; sl@0: g->GET_DBUS_WSD_VAR_NAME(our_type,dbus_glib,q)=0; sl@0: g->GET_DBUS_WSD_VAR_NAME(our_type,dbus_glib,r)=0; sl@0: g->GET_DBUS_WSD_VAR_NAME(our_type,dbus_glib,s)=0; sl@0: g->GET_DBUS_WSD_VAR_NAME(quark,dbus_gobject,s)=0; sl@0: g->GET_DBUS_WSD_VAR_NAME(object_type,dbus_gproxy,s)= 0; sl@0: g->GET_DBUS_WSD_VAR_NAME(quark,dbus_gvalue,s)= 0; sl@0: g->GET_DBUS_WSD_VAR_NAME(types_initialized,dbus_gvalue,s)=0; sl@0: g->GET_DBUS_WSD_VAR_NAME(type_id,dbus_gvalue,s)=0; sl@0: g->GET_DBUS_WSD_VAR_NAME(our_type,dbus_gidl,s)=0; sl@0: sl@0: return 0; sl@0: } sl@0: return 1; sl@0: }