Added qmafw-gst-subtitles-renderer-0.0.55 for Meego Harmattan 1.2
[mafwsubrenderer] / qmafw-gst-subtitles-renderer / unittests / common / LibCredsStub.cpp
1 /*
2  * This file is part of QMAFW
3  *
4  * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). All rights
5  * reserved.
6  *
7  * Contact: Visa Smolander <visa.smolander@nokia.com>
8  *
9  * This software, including documentation, is protected by copyright controlled
10  * by Nokia Corporation. All rights are reserved. Copying, including
11  * reproducing, storing, adapting or translating, any or all of this material
12  * requires the prior written consent of Nokia Corporation. This material also
13  * contains confidential information which may not be disclosed to others
14  * without the prior written consent of Nokia.
15  *
16  */
17
18 #include <QObject>
19 #include <sys/creds.h>
20
21 namespace Stub
22 {
23     bool global_route_provider_trusted = true;
24 }
25
26 creds_t creds_gettask(pid_t /*pid*/)
27 {
28     return (creds_t)1;
29 }
30
31 int creds_have_p(const creds_t creds, creds_type_t type, creds_value_t value)
32 {
33     Q_UNUSED(creds);
34     Q_UNUSED(type);
35     Q_UNUSED(value);
36
37     if( Stub::global_route_provider_trusted )
38     {
39         return 1;
40     }
41
42     return 0;
43 }
44
45 long creds_str2creds(const char *credential, creds_value_t *value)
46 {
47     Q_UNUSED(credential);
48     Q_UNUSED(value);
49
50     return 1234;
51 }