summaryrefslogtreecommitdiff
path: root/gst-streaming-server/gss-module.c
blob: 579c43bf1656e51a385583c662ec8cba5e429b45 (plain)
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
/* GStreamer Streaming Server
 * Copyright (C) 2009-2013 Entropy Wave Inc <info@entropywave.com>
 * Copyright (C) 2009-2013 David Schleef <ds@schleef.org>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library 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
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 */

#include "config.h"

#include "gss-types.h"
#include "gss-module.h"
#include "gss-utils.h"
#include "gss-html.h"

enum
{
  MOO
};

#define DEFAULT_NAME ""
#define DEFAULT_TITLE ""


static void gss_module_finalize (GObject * module);
static void gss_module_set_property (GObject * module, guint prop_id,
    const GValue * value, GParamSpec * pspec);
static void gss_module_get_property (GObject * module, guint prop_id,
    GValue * value, GParamSpec * pspec);


static GObjectClass *parent_class;

G_DEFINE_TYPE (GssModule, gss_module, GSS_TYPE_OBJECT);

static void
gss_module_init (GssModule * module)
{

}

static void
gss_module_class_init (GssModuleClass * module_class)
{
  G_OBJECT_CLASS (module_class)->set_property = gss_module_set_property;
  G_OBJECT_CLASS (module_class)->get_property = gss_module_get_property;
  G_OBJECT_CLASS (module_class)->finalize = gss_module_finalize;

#if 0
  g_object_class_install_property (G_OBJECT_CLASS (module_class),
      PROP_NAME, g_param_spec_string ("name", "Name",
          "Name", DEFAULT_NAME,
          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
  g_object_class_install_property (G_OBJECT_CLASS (module_class),
      PROP_TITLE, g_param_spec_string ("title", "Title",
          "Title", DEFAULT_TITLE,
          (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
#endif

  parent_class = g_type_class_peek_parent (module_class);
}

static void
gss_module_finalize (GObject * gmodule)
{
  //GssModule *module = GSS_MODULE (gmodule);


  parent_class->finalize (gmodule);
}

static void
gss_module_set_property (GObject * module, guint prop_id,
    const GValue * value, GParamSpec * pspec)
{
  //GssModule *gssmodule;

  //gssmodule = GSS_MODULE (module);

  switch (prop_id) {
#if 0
    case PROP_NAME:
      gss_module_set_name (gssmodule, g_value_get_string (value));
      break;
    case PROP_TITLE:
      gss_module_set_title (gssmodule, g_value_get_string (value));
      break;
#endif
    default:
      g_assert_not_reached ();
      break;
  }
}

static void
gss_module_get_property (GObject * module, guint prop_id,
    GValue * value, GParamSpec * pspec)
{
  //GssModule *gssmodule;

  //gssmodule = GSS_MODULE (module);

  switch (prop_id) {
#if 0
    case PROP_NAME:
      g_value_set_string (value, gssmodule->name);
      break;
    case PROP_TITLE:
      g_value_set_string (value, gssmodule->title);
      break;
#endif
    default:
      g_assert_not_reached ();
      break;
  }
}

void
gss_module_set_admin_resource (GssModule * module, GssResource * resource)
{
  g_return_if_fail (GSS_IS_MODULE (module));
  g_return_if_fail (resource != NULL);

  module->admin_resource = resource;
}