summaryrefslogtreecommitdiff
path: root/libresourceqt/src/resource.cpp
blob: d288ae6f984ac47c8df11745ca36d0575f95f46b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include <policy/resource.h>

using namespace ResourcePolicy;

Resource::Resource()
        :   optional(false),
        identifier(0), granted(false)
{
    identifier = (quint32)this;
}

Resource::Resource(const Resource &other)
        :   optional(other.optional),
        identifier(other.identifier), granted(other.granted)
{
}

Resource::~Resource()
{
}

bool Resource::isOptional() const
{
    return optional;
}

void Resource::setOptional(bool resourceIsOptional)
{
    optional = resourceIsOptional;
}

bool Resource::isGranted() const
{
    return granted;
}

void Resource::setGranted()
{
    granted = true;
}

void Resource::unsetGranted()
{
    granted = false;
}