Blame server/proxy/pf_server.h

Packit Service 5a9772
/**
Packit Service 5a9772
 * FreeRDP: A Remote Desktop Protocol Implementation
Packit Service 5a9772
 * FreeRDP Proxy Server
Packit Service 5a9772
 *
Packit Service 5a9772
 * Copyright 2019 Mati Shabtay <matishabtay@gmail.com>
Packit Service 5a9772
 * Copyright 2019 Kobi Mizrachi <kmizrachi18@gmail.com>
Packit Service 5a9772
 * Copyright 2019 Idan Freiberg <speidy@gmail.com>
Packit Service 5a9772
 *
Packit Service 5a9772
 * Licensed under the Apache License, Version 2.0 (the "License");
Packit Service 5a9772
 * you may not use this file except in compliance with the License.
Packit Service 5a9772
 * You may obtain a copy of the License at
Packit Service 5a9772
 *
Packit Service 5a9772
 *     http://www.apache.org/licenses/LICENSE-2.0
Packit Service 5a9772
 *
Packit Service 5a9772
 * Unless required by applicable law or agreed to in writing, software
Packit Service 5a9772
 * distributed under the License is distributed on an "AS IS" BASIS,
Packit Service 5a9772
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Packit Service 5a9772
 * See the License for the specific language governing permissions and
Packit Service 5a9772
 * limitations under the License.
Packit Service 5a9772
 */
Packit Service 5a9772
Packit Service 5a9772
#ifndef FREERDP_SERVER_PROXY_SERVER_H
Packit Service 5a9772
#define FREERDP_SERVER_PROXY_SERVER_H
Packit Service 5a9772
Packit Service 5a9772
#include <winpr/collections.h>
Packit Service 5a9772
#include <freerdp/listener.h>
Packit Service 5a9772
Packit Service 5a9772
#include "pf_config.h"
Packit Service 5a9772
Packit Service 5a9772
typedef struct proxy_server
Packit Service 5a9772
{
Packit Service 5a9772
	proxyConfig* config;
Packit Service 5a9772
Packit Service 5a9772
	freerdp_listener* listener;
Packit Service 5a9772
	wArrayList* clients;        /* maintain a list of active sessions, for stats */
Packit Service 5a9772
	wCountdownEvent* waitGroup; /* wait group used for gracefull shutdown */
Packit Service 5a9772
	HANDLE thread;              /* main server thread - freerdp listener thread */
Packit Service 5a9772
	HANDLE stopEvent;           /* an event used to signal the main thread to stop */
Packit Service 5a9772
} proxyServer;
Packit Service 5a9772
Packit Service 5a9772
proxyServer* pf_server_new(proxyConfig* config);
Packit Service 5a9772
void pf_server_free(proxyServer* server);
Packit Service 5a9772
Packit Service 5a9772
BOOL pf_server_start(proxyServer* server);
Packit Service 5a9772
void pf_server_stop(proxyServer* server);
Packit Service 5a9772
Packit Service 5a9772
#endif /* FREERDP_SERVER_PROXY_SERVER_H */