1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
|
/* example-server-plugin-vala.c generated by valac 0.26.0.39-f3603, the Vala compiler
* generated from example-server-plugin-vala.vala, do not modify */
/*
* Copyright (C) 2012 Intel Corporation
*
* This file is part of Rygel.
*
* Rygel is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Rygel is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <glib.h>
#include <glib-object.h>
#include <rygel-core.h>
#include <stdlib.h>
#include <string.h>
#include <rygel-server.h>
#define RYGEL_EXAMPLE_TYPE_SERVER_PLUGIN_VALA (rygel_example_server_plugin_vala_get_type ())
#define RYGEL_EXAMPLE_SERVER_PLUGIN_VALA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_EXAMPLE_TYPE_SERVER_PLUGIN_VALA, RygelExampleServerPluginVala))
#define RYGEL_EXAMPLE_SERVER_PLUGIN_VALA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_EXAMPLE_TYPE_SERVER_PLUGIN_VALA, RygelExampleServerPluginValaClass))
#define RYGEL_EXAMPLE_IS_SERVER_PLUGIN_VALA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_EXAMPLE_TYPE_SERVER_PLUGIN_VALA))
#define RYGEL_EXAMPLE_IS_SERVER_PLUGIN_VALA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_EXAMPLE_TYPE_SERVER_PLUGIN_VALA))
#define RYGEL_EXAMPLE_SERVER_PLUGIN_VALA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_EXAMPLE_TYPE_SERVER_PLUGIN_VALA, RygelExampleServerPluginValaClass))
typedef struct _RygelExampleServerPluginVala RygelExampleServerPluginVala;
typedef struct _RygelExampleServerPluginValaClass RygelExampleServerPluginValaClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _RygelExampleServerPluginValaPrivate RygelExampleServerPluginValaPrivate;
#define RYGEL_EXAMPLE_TYPE_ROOT_CONTAINER_VALA (rygel_example_root_container_vala_get_type ())
#define RYGEL_EXAMPLE_ROOT_CONTAINER_VALA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_EXAMPLE_TYPE_ROOT_CONTAINER_VALA, RygelExampleRootContainerVala))
#define RYGEL_EXAMPLE_ROOT_CONTAINER_VALA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_EXAMPLE_TYPE_ROOT_CONTAINER_VALA, RygelExampleRootContainerValaClass))
#define RYGEL_EXAMPLE_IS_ROOT_CONTAINER_VALA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_EXAMPLE_TYPE_ROOT_CONTAINER_VALA))
#define RYGEL_EXAMPLE_IS_ROOT_CONTAINER_VALA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_EXAMPLE_TYPE_ROOT_CONTAINER_VALA))
#define RYGEL_EXAMPLE_ROOT_CONTAINER_VALA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_EXAMPLE_TYPE_ROOT_CONTAINER_VALA, RygelExampleRootContainerValaClass))
typedef struct _RygelExampleRootContainerVala RygelExampleRootContainerVala;
typedef struct _RygelExampleRootContainerValaClass RygelExampleRootContainerValaClass;
struct _RygelExampleServerPluginVala {
RygelMediaServerPlugin parent_instance;
RygelExampleServerPluginValaPrivate * priv;
};
struct _RygelExampleServerPluginValaClass {
RygelMediaServerPluginClass parent_class;
};
static gpointer rygel_example_server_plugin_vala_parent_class = NULL;
void module_init (RygelPluginLoader* loader);
#define RYGEL_EXAMPLE_SERVER_PLUGIN_VALA_NAME "ExampleServerPluginVala"
GType rygel_example_server_plugin_vala_get_type (void) G_GNUC_CONST;
RygelExampleServerPluginVala* rygel_example_server_plugin_vala_new (void);
RygelExampleServerPluginVala* rygel_example_server_plugin_vala_construct (GType object_type);
enum {
RYGEL_EXAMPLE_SERVER_PLUGIN_VALA_DUMMY_PROPERTY
};
#define RYGEL_EXAMPLE_SERVER_PLUGIN_VALA_TITLE "Example Server Plugin Vala"
#define RYGEL_EXAMPLE_SERVER_PLUGIN_VALA_DESCRIPTION "An example Rygel server plugin implemented in vala."
GType rygel_example_root_container_vala_get_type (void) G_GNUC_CONST;
RygelExampleRootContainerVala* rygel_example_root_container_vala_new (const gchar* title);
RygelExampleRootContainerVala* rygel_example_root_container_vala_construct (GType object_type, const gchar* title);
void module_init (RygelPluginLoader* loader) {
RygelPluginLoader* _tmp0_ = NULL;
gboolean _tmp1_ = FALSE;
RygelExampleServerPluginVala* plugin = NULL;
RygelExampleServerPluginVala* _tmp2_ = NULL;
RygelPluginLoader* _tmp3_ = NULL;
RygelExampleServerPluginVala* _tmp4_ = NULL;
g_return_if_fail (loader != NULL);
_tmp0_ = loader;
_tmp1_ = rygel_plugin_loader_plugin_disabled (_tmp0_, RYGEL_EXAMPLE_SERVER_PLUGIN_VALA_NAME);
if (_tmp1_) {
g_message ("example-server-plugin-vala.vala:26: Plugin '%s' disabled by user. Igno" \
"ring.", RYGEL_EXAMPLE_SERVER_PLUGIN_VALA_NAME);
return;
}
_tmp2_ = rygel_example_server_plugin_vala_new ();
plugin = _tmp2_;
_tmp3_ = loader;
_tmp4_ = plugin;
rygel_plugin_loader_add_plugin (_tmp3_, (RygelPlugin*) _tmp4_);
_g_object_unref0 (plugin);
}
RygelExampleServerPluginVala* rygel_example_server_plugin_vala_construct (GType object_type) {
RygelExampleServerPluginVala * self = NULL;
RygelExampleRootContainerVala* root_container = NULL;
RygelExampleRootContainerVala* _tmp0_ = NULL;
_tmp0_ = rygel_example_root_container_vala_new (RYGEL_EXAMPLE_SERVER_PLUGIN_VALA_TITLE);
root_container = _tmp0_;
self = (RygelExampleServerPluginVala*) rygel_media_server_plugin_construct (object_type, (RygelMediaContainer*) root_container, RYGEL_EXAMPLE_SERVER_PLUGIN_VALA_NAME, RYGEL_EXAMPLE_SERVER_PLUGIN_VALA_DESCRIPTION, RYGEL_PLUGIN_CAPABILITIES_NONE);
_g_object_unref0 (root_container);
return self;
}
RygelExampleServerPluginVala* rygel_example_server_plugin_vala_new (void) {
return rygel_example_server_plugin_vala_construct (RYGEL_EXAMPLE_TYPE_SERVER_PLUGIN_VALA);
}
static void rygel_example_server_plugin_vala_class_init (RygelExampleServerPluginValaClass * klass) {
rygel_example_server_plugin_vala_parent_class = g_type_class_peek_parent (klass);
}
static void rygel_example_server_plugin_vala_instance_init (RygelExampleServerPluginVala * self) {
}
GType rygel_example_server_plugin_vala_get_type (void) {
static volatile gsize rygel_example_server_plugin_vala_type_id__volatile = 0;
if (g_once_init_enter (&rygel_example_server_plugin_vala_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (RygelExampleServerPluginValaClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_example_server_plugin_vala_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelExampleServerPluginVala), 0, (GInstanceInitFunc) rygel_example_server_plugin_vala_instance_init, NULL };
GType rygel_example_server_plugin_vala_type_id;
rygel_example_server_plugin_vala_type_id = g_type_register_static (RYGEL_TYPE_MEDIA_SERVER_PLUGIN, "RygelExampleServerPluginVala", &g_define_type_info, 0);
g_once_init_leave (&rygel_example_server_plugin_vala_type_id__volatile, rygel_example_server_plugin_vala_type_id);
}
return rygel_example_server_plugin_vala_type_id__volatile;
}
|