Remmina - The GTK+ Remote Desktop Client
v1.4.25
Remmina is a remote desktop client written in GTK+, aiming to be useful for system administrators and travellers, who need to work with lots of remote computers in front of either large monitors or tiny netbooks. Remmina supports multiple network protocols in an integrated and consistent user interface. Currently RDP, VNC, NX, XDMCP and SSH are supported.
|
Go to the source code of this file.
Functions | |
PyObject * | remmina_plugin_python_last_result (void) |
Gets the result of the last python method call. More... | |
PyObject * | remmina_plugin_python_last_result_set (PyObject *last_result) |
Sets the result of the last python method call. More... | |
gboolean | remmina_plugin_python_check_error (void) |
Checks if an error has occurred and prints it. More... | |
void | remmina_plugin_python_log_method_call (PyObject *instance, const char *method) |
Prints a log message to inform the user a python message has been called. More... | |
long | remmina_plugin_python_get_attribute_long (PyObject *instance, const char *attr_name, long def) |
Gets the attribute as long value. More... | |
gboolean | remmina_plugin_python_check_attribute (PyObject *instance, const char *attr_name) |
Checks if a given attribute exists. More... | |
void * | remmina_plugin_python_malloc (int bytes) |
Allocates memory and checks for errors before returning. More... | |
char * | remmina_plugin_python_copy_string_from_python (PyObject *string, Py_ssize_t len) |
Copies a string from a Python object to a new point in memory. More... | |
void | remmina_plugin_python_set_service (RemminaPluginService *service) |
Sets the pointer to the plugin service of Remmina. More... | |
RemminaPluginService * | remmina_plugin_python_get_service (void) |
void | remmina_plugin_python_add_plugin (PyPlugin *plugin) |
Registers the given plugin if no other plugin with the same name has been already registered. More... | |
RemminaTypeHint | remmina_plugin_python_to_generic (PyObject *field, gpointer *target) |
Extracts data from a PyObject instance to a generic pointer and returns a type hint if it could be determined. More... | |
PyPlugin * | remmina_plugin_python_get_plugin (const char *name) |
Tries to find the Python plugin matching to the given instance of RemminaPlugin. More... | |
void | init_pygobject () |
Initializes the pygobject library. More... | |
GtkWidget * | new_pywidget (GObject *obj) |
Creates a new GtkWidget. More... | |
GtkWidget * | get_pywidget (PyObject *obj) |
Extracts a GtkWidget from a PyObject instance. More... | |
Variables | |
static PyObject * | __last_result |
A cache to store the last result that has been returned by the Python code using CallPythonMethod (. More... | |
static GPtrArray * | plugin_map = NULL |
static RemminaPluginService * | remmina_plugin_service |
const char * | ATTR_NAME = "name" |
const char * | ATTR_ICON_NAME = "icon_name" |
const char * | ATTR_DESCRIPTION = "description" |
const char * | ATTR_VERSION = "version" |
const char * | ATTR_ICON_NAME_SSH = "icon_name_ssh" |
const char * | ATTR_FEATURES = "features" |
const char * | ATTR_BASIC_SETTINGS = "basic_settings" |
const char * | ATTR_ADVANCED_SETTINGS = "advanced_settings" |
const char * | ATTR_SSH_SETTING = "ssh_setting" |
const char * | ATTR_EXPORT_HINTS = "export_hints" |
const char * | ATTR_PREF_LABEL = "pref_label" |
const char * | ATTR_INIT_ORDER = "init_order" |
static const int | REASONABLE_LIMIT_FOR_MALLOC = 1024 * 1024 |
To prevent some memory related attacks or accidental allocation of an excessive amount of byes, this limit should always be used to check for a sane amount of bytes to allocate. More... | |
Definition in file remmina_plugin_python_common.c.
GtkWidget* get_pywidget | ( | PyObject * | obj | ) |
Extracts a GtkWidget from a PyObject instance.
obj |
Definition at line 309 of file remmina_plugin_python_common.c.
void init_pygobject | ( | void | ) |
Initializes the pygobject library.
This needs to be called before any Python plugin is being initialized.
Definition at line 299 of file remmina_plugin_python_common.c.
GtkWidget* new_pywidget | ( | GObject * | obj | ) |
Creates a new GtkWidget.
obj |
Definition at line 304 of file remmina_plugin_python_common.c.
void remmina_plugin_python_add_plugin | ( | PyPlugin * | plugin | ) |
Registers the given plugin if no other plugin with the same name has been already registered.
Definition at line 204 of file remmina_plugin_python_common.c.
gboolean remmina_plugin_python_check_attribute | ( | PyObject * | instance, |
const char * | attr_name | ||
) |
Checks if a given attribute exists.
instance | The object to check for the attribute. |
attr_name | The name of the attribute to check. |
Definition at line 139 of file remmina_plugin_python_common.c.
gboolean remmina_plugin_python_check_error | ( | void | ) |
Checks if an error has occurred and prints it.
Definition at line 98 of file remmina_plugin_python_common.c.
char* remmina_plugin_python_copy_string_from_python | ( | PyObject * | string, |
Py_ssize_t | len | ||
) |
Copies a string from a Python object to a new point in memory.
string | The python object, containing the string to copy. |
len | The length of the string to copy. |
Definition at line 172 of file remmina_plugin_python_common.c.
long remmina_plugin_python_get_attribute_long | ( | PyObject * | instance, |
const char * | attr_name, | ||
long | def | ||
) |
Gets the attribute as long value.
instance | The instance of the object to get the attribute. |
constant_name | The name of the attribute to get. |
def | The value to return if the attribute doesn't exist or is not set. |
Definition at line 124 of file remmina_plugin_python_common.c.
PyPlugin* remmina_plugin_python_get_plugin | ( | const char * | name | ) |
Tries to find the Python plugin matching to the given instance of RemminaPlugin.
plugin_map | An array of PyPlugin pointers to search. |
instance | The RemminaPlugin instance to find the correct PyPlugin instance for. |
Definition at line 280 of file remmina_plugin_python_common.c.
RemminaPluginService* remmina_plugin_python_get_service | ( | void | ) |
Definition at line 199 of file remmina_plugin_python_common.c.
PyObject* remmina_plugin_python_last_result | ( | void | ) |
Gets the result of the last python method call.
Definition at line 84 of file remmina_plugin_python_common.c.
PyObject* remmina_plugin_python_last_result_set | ( | PyObject * | result | ) |
Sets the result of the last python method call.
Definition at line 91 of file remmina_plugin_python_common.c.
void remmina_plugin_python_log_method_call | ( | PyObject * | instance, |
const char * | method | ||
) |
Prints a log message to inform the user a python message has been called.
This method is called from the CALL_PYTHON macro if WITH_PYTHON_TRACE_CALLS is defined.
instance | The instance that contains the called method. |
method | The name of the method called. |
Definition at line 111 of file remmina_plugin_python_common.c.
void* remmina_plugin_python_malloc | ( | int | bytes | ) |
Allocates memory and checks for errors before returning.
bytes | Amount of bytes to allocate. |
Definition at line 154 of file remmina_plugin_python_common.c.
void remmina_plugin_python_set_service | ( | RemminaPluginService * | service | ) |
Sets the pointer to the plugin service of Remmina.
Definition at line 194 of file remmina_plugin_python_common.c.
RemminaTypeHint remmina_plugin_python_to_generic | ( | PyObject * | field, |
gpointer * | target | ||
) |
Extracts data from a PyObject instance to a generic pointer and returns a type hint if it could be determined.
Definition at line 224 of file remmina_plugin_python_common.c.
|
static |
A cache to store the last result that has been returned by the Python code using CallPythonMethod (.
Definition at line 56 of file remmina_plugin_python_common.c.
const char* ATTR_ADVANCED_SETTINGS = "advanced_settings" |
Definition at line 68 of file remmina_plugin_python_common.c.
const char* ATTR_BASIC_SETTINGS = "basic_settings" |
Definition at line 67 of file remmina_plugin_python_common.c.
const char* ATTR_DESCRIPTION = "description" |
Definition at line 63 of file remmina_plugin_python_common.c.
const char* ATTR_EXPORT_HINTS = "export_hints" |
Definition at line 70 of file remmina_plugin_python_common.c.
const char* ATTR_FEATURES = "features" |
Definition at line 66 of file remmina_plugin_python_common.c.
const char* ATTR_ICON_NAME = "icon_name" |
Definition at line 62 of file remmina_plugin_python_common.c.
const char* ATTR_ICON_NAME_SSH = "icon_name_ssh" |
Definition at line 65 of file remmina_plugin_python_common.c.
const char* ATTR_INIT_ORDER = "init_order" |
Definition at line 72 of file remmina_plugin_python_common.c.
const char* ATTR_NAME = "name" |
Definition at line 61 of file remmina_plugin_python_common.c.
const char* ATTR_PREF_LABEL = "pref_label" |
Definition at line 71 of file remmina_plugin_python_common.c.
const char* ATTR_SSH_SETTING = "ssh_setting" |
Definition at line 69 of file remmina_plugin_python_common.c.
const char* ATTR_VERSION = "version" |
Definition at line 64 of file remmina_plugin_python_common.c.
|
static |
Definition at line 57 of file remmina_plugin_python_common.c.
|
static |
To prevent some memory related attacks or accidental allocation of an excessive amount of byes, this limit should always be used to check for a sane amount of bytes to allocate.
Definition at line 78 of file remmina_plugin_python_common.c.
|
static |
Definition at line 59 of file remmina_plugin_python_common.c.