2012-09-20 07:51:34 +04:00
|
|
|
/**
|
|
|
|
* xrdp: A Remote Desktop Protocol server.
|
|
|
|
*
|
2013-06-08 21:51:53 +04:00
|
|
|
* Copyright (C) Jay Sorg 2004-2013
|
2012-09-20 07:51:34 +04:00
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*
|
|
|
|
* media center
|
|
|
|
*/
|
2007-06-03 11:14:10 +04:00
|
|
|
|
2017-03-03 07:33:23 +03:00
|
|
|
#if defined(HAVE_CONFIG_H)
|
|
|
|
#include <config_ac.h>
|
|
|
|
#endif
|
|
|
|
|
2007-06-03 12:46:23 +04:00
|
|
|
#include "mc.h"
|
2021-02-12 15:09:42 +03:00
|
|
|
#include "log.h"
|
2007-06-03 11:14:10 +04:00
|
|
|
|
|
|
|
/*****************************************************************************/
|
2007-06-03 12:46:23 +04:00
|
|
|
/* return error */
|
2023-10-20 18:14:47 +03:00
|
|
|
static int
|
2012-09-20 07:51:34 +04:00
|
|
|
lib_mod_start(struct mod *mod, int w, int h, int bpp)
|
2007-06-03 12:46:23 +04:00
|
|
|
{
|
2021-02-12 15:09:42 +03:00
|
|
|
LOG_DEVEL(LOG_LEVEL_TRACE, "in lib_mod_start");
|
2012-09-20 07:51:34 +04:00
|
|
|
mod->width = w;
|
|
|
|
mod->height = h;
|
|
|
|
mod->bpp = bpp;
|
2021-02-12 15:09:42 +03:00
|
|
|
LOG_DEVEL(LOG_LEVEL_TRACE, "out lib_mod_start");
|
2012-09-20 07:51:34 +04:00
|
|
|
return 0;
|
2007-06-03 12:46:23 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
/* return error */
|
2023-10-20 18:14:47 +03:00
|
|
|
static int
|
2012-09-20 07:51:34 +04:00
|
|
|
lib_mod_connect(struct mod *mod)
|
2007-06-03 12:46:23 +04:00
|
|
|
{
|
2021-02-12 15:09:42 +03:00
|
|
|
LOG_DEVEL(LOG_LEVEL_TRACE, "in lib_mod_connect");
|
|
|
|
LOG_DEVEL(LOG_LEVEL_TRACE, "out lib_mod_connect");
|
2012-09-20 07:51:34 +04:00
|
|
|
return 0;
|
2007-06-03 12:46:23 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
/* return error */
|
2023-10-20 18:14:47 +03:00
|
|
|
static int
|
2012-09-20 07:51:34 +04:00
|
|
|
lib_mod_event(struct mod *mod, int msg, long param1, long param2,
|
2007-06-03 12:46:23 +04:00
|
|
|
long param3, long param4)
|
|
|
|
{
|
2021-02-12 15:09:42 +03:00
|
|
|
LOG_DEVEL(LOG_LEVEL_TRACE, "in lib_mod_event");
|
|
|
|
LOG_DEVEL(LOG_LEVEL_TRACE, "out lib_mod_event");
|
2012-09-20 07:51:34 +04:00
|
|
|
return 0;
|
2007-06-03 12:46:23 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
/* return error */
|
2023-10-20 18:14:47 +03:00
|
|
|
static int
|
2012-09-20 07:51:34 +04:00
|
|
|
lib_mod_signal(struct mod *mod)
|
2007-06-03 12:46:23 +04:00
|
|
|
{
|
2021-02-12 15:09:42 +03:00
|
|
|
LOG_DEVEL(LOG_LEVEL_TRACE, "in lib_mod_signal");
|
|
|
|
LOG_DEVEL(LOG_LEVEL_TRACE, "out lib_mod_signal");
|
2012-09-20 07:51:34 +04:00
|
|
|
return 0;
|
2007-06-03 12:46:23 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
/* return error */
|
2023-10-20 18:14:47 +03:00
|
|
|
static int
|
2012-09-20 07:51:34 +04:00
|
|
|
lib_mod_end(struct mod *mod)
|
2007-06-03 12:46:23 +04:00
|
|
|
{
|
2012-09-20 07:51:34 +04:00
|
|
|
return 0;
|
2007-06-03 12:46:23 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
/* return error */
|
2023-10-20 18:14:47 +03:00
|
|
|
static int
|
2016-11-20 20:55:32 +03:00
|
|
|
lib_mod_set_param(struct mod *mod, const char *name, const char *value)
|
2007-06-03 12:46:23 +04:00
|
|
|
{
|
2012-09-20 07:51:34 +04:00
|
|
|
return 0;
|
2007-06-03 12:46:23 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************/
|
2016-07-08 08:09:09 +03:00
|
|
|
tintptr EXPORT_CC
|
2007-06-03 12:46:23 +04:00
|
|
|
mod_init(void)
|
|
|
|
{
|
2012-09-20 07:51:34 +04:00
|
|
|
struct mod *mod;
|
2007-06-03 12:46:23 +04:00
|
|
|
|
2012-09-20 07:51:34 +04:00
|
|
|
mod = (struct mod *)g_malloc(sizeof(struct mod), 1);
|
|
|
|
mod->size = sizeof(struct mod);
|
|
|
|
mod->version = CURRENT_MOD_VER;
|
2016-07-08 08:09:09 +03:00
|
|
|
mod->handle = (tintptr) mod;
|
2012-09-20 07:51:34 +04:00
|
|
|
mod->mod_connect = lib_mod_connect;
|
|
|
|
mod->mod_start = lib_mod_start;
|
|
|
|
mod->mod_event = lib_mod_event;
|
|
|
|
mod->mod_signal = lib_mod_signal;
|
|
|
|
mod->mod_end = lib_mod_end;
|
|
|
|
mod->mod_set_param = lib_mod_set_param;
|
2016-07-08 08:09:09 +03:00
|
|
|
return (tintptr) mod;
|
2007-06-03 12:46:23 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
int EXPORT_CC
|
2016-07-08 08:09:09 +03:00
|
|
|
mod_exit(tintptr handle)
|
2007-06-03 12:46:23 +04:00
|
|
|
{
|
2016-07-08 08:09:09 +03:00
|
|
|
struct mod *mod = (struct mod *) handle;
|
|
|
|
|
2012-09-20 07:51:34 +04:00
|
|
|
if (mod == 0)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
g_free(mod);
|
2007-06-03 12:46:23 +04:00
|
|
|
return 0;
|
|
|
|
}
|