summaryrefslogtreecommitdiff
path: root/src/group.c
blob: 33307ee1975c396784cef3ad1afefbf45b9b5602 (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
#include <string.h>

#include "group.h"

// getters
int group_get_id(Group *g) {
	return g->id;
}

char *group_get_name(Group *g) {
	return g->name;
}

char *group_get_desc(Group *g) {
	return g->desc;
}

char *group_get_url(Group *g) {
	return g->url;
}

// setters
void group_set_id(Group *g, int id) {
	g->id = id;
}

void group_set_name(Group *g, char *name) {
	strcpy(g->name, name);
}

void group_set_desc(Group *g, char *desc) {
	strcpy(g->desc, desc);
}

void group_set_url(Group *g, char *url) {
	strcpy(g->url, url);
}