31
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
#include <e32std.h>
|
|
24 |
#include "libdbus_convenience_wsd_solution.h"
|
|
25 |
|
|
26 |
#include <pls.h> // For emulator WSD API
|
|
27 |
|
|
28 |
struct libdbus_convenience_global_struct *libdbus_convenience_ImpurePtr()
|
|
29 |
{
|
|
30 |
#if defined(__WINSCW__) || defined(__WINS__)
|
|
31 |
const TUid KLibDbusConvenienceUid3 = {0x20010154}; // This is the UID of the library
|
|
32 |
// Access the PLS of this process
|
|
33 |
struct libdbus_convenience_global_struct* p = Pls<struct libdbus_convenience_global_struct>(KLibDbusConvenienceUid3, &libdbus_convenience_Init);
|
|
34 |
return p;
|
|
35 |
|
|
36 |
#else
|
|
37 |
|
|
38 |
return NULL;
|
|
39 |
|
|
40 |
#endif
|
|
41 |
}
|
|
42 |
|
|
43 |
int libdbus_convenience_Init(libdbus_convenience_global_struct *g)
|
|
44 |
{
|
|
45 |
#if defined(__WINSCW__) || defined(__WINS__)
|
|
46 |
if(g)
|
|
47 |
{
|
|
48 |
g->GET_DBUS_WSD_VAR_NAME(babysit_sigchld_pipe,dbus_spawn,s) = -1;
|
|
49 |
return 0;
|
|
50 |
}
|
|
51 |
return 1;
|
|
52 |
#else
|
|
53 |
return 1;
|
|
54 |
#endif
|
|
55 |
}
|
|
56 |
|
|
57 |
|