Files
rmps/agent/job.h

52 lines
1.4 KiB
C

/*
* job.h
*
* Copyright (C) 2018 by Bogomil Vasilev <b.vasilev@smirky.net>
*
* This file is part of Remote Management and Provisioning System (RMPS).
*
* RMPS is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* RMPS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with RMPS. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef JOB_H
#define JOB_H
#include "agent_ssl.h"
#include "../src/protocol.h"
enum pthread_state { WAIT, WORK };
enum job_slot_state { FREE, FULL };
struct job_args {
struct msg_t buf;
unsigned short slot;
SSL *ssl;
};
void* exec_unix(void *args);
void* install_pkg(void *args);
void* query_pkg(void *args);
void* delete_pkg(void *args);
void* list_pkgs(void *args);
void* update_pkg(void *args);
void* update_pkgs(void *args);
void* get_os(void *args);
void* get_kernel(void *args);
void* get_uptime(void *args);
void* get_memory(void *args);
#define MAX_AGENT_JOBS 10
#endif /* JOB_H */