1 /* MManager - a Desktop wide manager for multimedia applications.
3 * Copyright (C) 2008 Cosimo Cecchi <cosimoc@gnome.org>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
21 #include <glib-object.h>
23 #include <gio/gdesktopappinfo.h>
24 #include <libmmanager/mm.h>
26 #include "server-app.h"
28 static GObjectClass
*server_app_parent_class
;
29 static GType server_app_type
= 0;
32 server_app_get_application (MMApplicationProvider
*provider
)
36 app
= mm_so_application_new ("foo.desktop", MM_APPLICATION_PHOTO
, "server-app");
42 server_app_application_provider_iface_init (MMApplicationProviderIface
*iface
)
44 /* implement interface methods */
45 iface
->get_application
= server_app_get_application
;
49 server_app_instance_init (ServerApp
*app
)
55 server_app_class_init (ServerAppClass
*klass
)
57 server_app_parent_class
= g_type_class_peek_parent (klass
);
61 server_app_get_type (void)
63 return server_app_type
;
67 server_app_register_type (GTypeModule
*module
)
69 static const GTypeInfo info
= {
70 sizeof (ServerAppClass
),
72 (GBaseFinalizeFunc
) NULL
,
73 (GClassInitFunc
) server_app_class_init
,
78 (GInstanceInitFunc
) server_app_instance_init
,
81 static const GInterfaceInfo application_provider_iface_info
= {
82 (GInterfaceInitFunc
) server_app_application_provider_iface_init
,
87 server_app_type
= g_type_module_register_type (module
,
92 g_type_module_add_interface (module
,
94 MM_TYPE_APPLICATION_PROVIDER
,
95 &application_provider_iface_info
);