Blame server/shadow/shadow_rdpgfx.c

Packit Service fa4841
/**
Packit Service fa4841
 * FreeRDP: A Remote Desktop Protocol Implementation
Packit Service fa4841
 *
Packit Service fa4841
 * Copyright 2016 Jiang Zihao <zihao.jiang@yahoo.com>
Packit Service fa4841
 *
Packit Service fa4841
 * Licensed under the Apache License, Version 2.0 (the "License");
Packit Service fa4841
 * you may not use this file except in compliance with the License.
Packit Service fa4841
 * You may obtain a copy of the License at
Packit Service fa4841
 *
Packit Service fa4841
 *     http://www.apache.org/licenses/LICENSE-2.0
Packit Service fa4841
 *
Packit Service fa4841
 * Unless required by applicable law or agreed to in writing, software
Packit Service fa4841
 * distributed under the License is distributed on an "AS IS" BASIS,
Packit Service fa4841
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Packit Service fa4841
 * See the License for the specific language governing permissions and
Packit Service fa4841
 * limitations under the License.
Packit Service fa4841
 */
Packit Service fa4841
Packit Service fa4841
#ifdef HAVE_CONFIG_H
Packit Service fa4841
#include "config.h"
Packit Service fa4841
#endif
Packit Service fa4841
Packit Service fa4841
#include <freerdp/log.h>
Packit Service fa4841
#include "shadow.h"
Packit Service fa4841
Packit Service fa4841
#include "shadow_rdpgfx.h"
Packit Service fa4841
Packit Service fa4841
#define TAG SERVER_TAG("shadow")
Packit Service fa4841
Packit Service fa4841
int shadow_client_rdpgfx_init(rdpShadowClient* client)
Packit Service fa4841
{
Packit Service fa4841
	RdpgfxServerContext* rdpgfx;
Packit Service fa4841
	rdpgfx = client->rdpgfx = rdpgfx_server_context_new(client->vcm);
Packit Service fa4841
	if (!rdpgfx)
Packit Service fa4841
	{
Packit Service fa4841
		return 0;
Packit Service fa4841
	}
Packit Service fa4841
Packit Service fa4841
	rdpgfx->rdpcontext = &client->context;
Packit Service fa4841
Packit Service fa4841
	rdpgfx->custom = client;
Packit Service fa4841
Packit Service fa4841
	return 1;
Packit Service fa4841
}
Packit Service fa4841
Packit Service fa4841
void shadow_client_rdpgfx_uninit(rdpShadowClient* client)
Packit Service fa4841
{
Packit Service fa4841
	if (client->rdpgfx)
Packit Service fa4841
	{
Packit Service fa4841
		rdpgfx_server_context_free(client->rdpgfx);
Packit Service fa4841
		client->rdpgfx = NULL;
Packit Service fa4841
	}
Packit Service fa4841
}