mirror of
https://github.com/Karaka-Management/oms-OnlineResourceWatcher.git
synced 2026-01-23 13:28:39 +00:00
47 lines
784 B
C++
Executable File
47 lines
784 B
C++
Executable File
/**
|
|
* Karaka
|
|
*
|
|
* @package Models
|
|
* @copyright Dennis Eichhorn
|
|
* @license OMS License 1.0
|
|
* @version 1.0.0
|
|
* @link https://karaka.app
|
|
*/
|
|
#ifndef MODELS_RESOURCE_INFO_H
|
|
#define MODELS_RESOURCE_INFO_H
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
#include "Account.h"
|
|
|
|
namespace Models {
|
|
typedef struct {
|
|
int id = 0;
|
|
|
|
char *mail = NULL;
|
|
|
|
Account *account = NULL;
|
|
|
|
int resource = 0;
|
|
} ResourceInfo;
|
|
|
|
inline
|
|
void free_ResourceInfo(ResourceInfo *obj)
|
|
{
|
|
if (obj->mail != NULL) {
|
|
free(obj->mail);
|
|
obj->mail = NULL;
|
|
|
|
}
|
|
|
|
if (obj->account != NULL) {
|
|
free_Account(obj->account);
|
|
free(obj->account);
|
|
|
|
obj->account = NULL;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endif |