libfreerdp-utils: purge deprecrated load_plugin utils from source tree

This commit is contained in:
Marc-André Moreau 2012-11-21 21:28:48 -05:00
parent 8a32de3801
commit 01158f9a34
9 changed files with 0 additions and 152 deletions

View File

@ -36,7 +36,6 @@
#include <freerdp/svc.h>
#include <freerdp/addin.h>
#include <freerdp/utils/wait_obj.h>
#include <freerdp/utils/load_plugin.h>
#include <freerdp/utils/file.h>
#include <freerdp/utils/event.h>
#include <freerdp/utils/debug.h>

View File

@ -32,7 +32,6 @@
#include <freerdp/utils/stream.h>
#include <freerdp/utils/list.h>
#include <freerdp/utils/load_plugin.h>
#include "drdynvc_types.h"
#include "dvcman.h"

View File

@ -33,7 +33,6 @@
#include <freerdp/utils/stream.h>
#include <freerdp/utils/list.h>
#include <freerdp/utils/svc_plugin.h>
#include <freerdp/utils/load_plugin.h>
#include <freerdp/client/channels.h>
#include "rdpdr_main.h"

View File

@ -38,7 +38,6 @@
#include <freerdp/constants.h>
#include <freerdp/utils/stream.h>
#include <freerdp/utils/list.h>
#include <freerdp/utils/load_plugin.h>
#include <freerdp/utils/svc_plugin.h>
#include "rdpsnd_main.h"

View File

@ -36,7 +36,6 @@
#include <freerdp/constants.h>
#include <freerdp/utils/stream.h>
#include <freerdp/utils/list.h>
#include <freerdp/utils/load_plugin.h>
#include <freerdp/utils/svc_plugin.h>
#include "sample_main.h"

View File

@ -43,7 +43,6 @@
#include <freerdp/constants.h>
#include <freerdp/utils/args.h>
#include <freerdp/utils/event.h>
#include <freerdp/utils/load_plugin.h>
#include <freerdp/utils/svc_plugin.h>
#include <freerdp/client/file.h>

View File

@ -1,30 +0,0 @@
/**
* FreeRDP: A Remote Desktop Protocol Implementation
* Plugin Loading Utils
*
* Copyright 2011 Vic Lee
*
* 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.
*/
#ifndef __LOAD_PLUGIN_UTILS_H
#define __LOAD_PLUGIN_UTILS_H
#include <freerdp/api.h>
#include <freerdp/settings.h>
FREERDP_API void* freerdp_load_library_symbol(const char* file, const char* name);
FREERDP_API void* freerdp_load_plugin(const char* name, const char* entry_name);
FREERDP_API void* freerdp_load_channel_plugin(rdpSettings* settings, const char* name, const char* entry_name);
#endif /* __LOAD_PLUGIN_UTILS_H */

View File

@ -26,7 +26,6 @@ set(${MODULE_PREFIX}_SRCS
hexdump.c
list.c
file.c
load_plugin.c
passphrase.c
pcap.c
profiler.c

View File

@ -1,115 +0,0 @@
/**
* FreeRDP: A Remote Desktop Protocol Implementation
* Plugin Loading Utils
*
* Copyright 2011 Vic Lee
*
* 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.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <winpr/crt.h>
#include <winpr/windows.h>
#include <freerdp/addin.h>
#include <freerdp/utils/file.h>
#include <freerdp/utils/print.h>
#include <freerdp/utils/load_plugin.h>
#ifdef _WIN32
#define DLOPEN(f) LoadLibraryA(f)
#define DLSYM(f, n) GetProcAddress(f, n)
#define DLCLOSE(f) FreeLibrary(f)
#define DLERROR() ""
#else
#include <dlfcn.h>
#include <unistd.h>
#define DLOPEN(f) dlopen(f, RTLD_LOCAL | RTLD_LAZY)
#define DLSYM(f, n) dlsym(f, n)
#define DLCLOSE(f) dlclose(f)
#define DLERROR() dlerror()
#endif
#define MAX_STATIC_PLUGINS 50
struct static_plugin
{
const char* name;
const char* entry_name;
void* entry_addr;
};
typedef struct static_plugin staticPlugin;
/**
* This function will load the specified library, retrieve the specified symbol in it, and return a pointer to it.
* It is used in freerdp_load_plugin() and freerdp_load_channel_plugin().
* It seems there is no way to unload the library once this call is made. Now since this is used for plugins,
* we probably don't need to take care of unloading them, as it will be done only at shutdown.
*
* @param file [IN] - library name
* @param name [IN] - symbol name to find in the library
*
* @return pointer to the referenced symbol. NULL if an error occured.
*/
void* freerdp_load_library_symbol(const char* file, const char* name)
{
void* library;
void* symbol;
library = DLOPEN(file);
if (library == NULL)
{
printf("freerdp_load_library_symbol: failed to open %s: %s\n", file, DLERROR());
return NULL;
}
symbol = DLSYM(library, name);
if (symbol == NULL)
{
printf("freerdp_load_library_symbol: failed to load %s: %s\n", file, DLERROR());
return NULL;
}
return symbol;
}
/**
* This function is used to load plugins. It will load the specified library, retrieve the specified symbol,
* and return a pointer to it.
* There is no way to unload the library once it has been loaded this way - since it is used for plugins only,
* maybe it's not a must.
*
* @param name [IN] - name of the library to load
* @param entry_name [IN] - name of the symbol to find and load from the library
*
* @return Pointer to the loaded symbol. NULL if an error occurred.
*/
void* freerdp_load_plugin(const char* name, const char* entry_name)
{
return freerdp_load_dynamic_addin(name, NULL, entry_name);
}