applicationContraints.c 691 Bytes
Newer Older
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
#include <malloc.h>
#include "../util/common.h"
#include "../util/dbg.h"
#include "applicationContraints.h"

PrrtApplicationConstraints *PrrtNetworkConstraints_create()
{
    PrrtApplicationConstraints *constraints = calloc(1, sizeof(PrrtApplicationConstraints));
    check_mem(constraints);
    return constraints;

    error:
    PERROR("Not enough memory%s.","");
    return NULL;
}

bool PrrtNetworkConstraints_destroy(PrrtApplicationConstraints *applicationConstraints)
{
    free(applicationConstraints);
    return true;
}

prrtTimedelta_t PrrtNetworkConstraints_get_target_delay(PrrtApplicationConstraints *applicationConstraints)
{
    return applicationConstraints->targetDelay;
}