Oops, fix a broken part of the patch
[beagle.git] / libbeagle / beagle / beagle-daemon-information-request.c
blob1ddc454daeb32a452bf26ccc62928e647f743553
1 /*
2 * beagle-daemon-information-request.c
4 * Copyright (C) 2005 Novell, Inc.
6 */
8 /*
9 * Permission is hereby granted, free of charge, to any person obtaining a
10 * copy of this software and associated documentation files (the "Software"),
11 * to deal in the Software without restriction, including without limitation
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software.
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25 * DEALINGS IN THE SOFTWARE.
28 #include <stdlib.h>
29 #include <sys/types.h>
30 #include <sys/socket.h>
31 #include <sys/un.h>
33 #include "beagle-private.h"
34 #include "beagle-daemon-information-request.h"
35 #include "beagle-daemon-information-response.h"
37 typedef struct {
38 gint foo;
39 } BeagleDaemonInformationRequestPrivate;
41 #define BEAGLE_DAEMON_INFORMATION_REQUEST_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BEAGLE_TYPE_DAEMON_INFORMATION_REQUEST, BeagleDaemonInformationRequestPrivate))
43 static GObjectClass *parent_class = NULL;
45 static GString *
46 beagle_daemon_information_request_to_xml (BeagleRequest *request, GError **err)
48 GString *data = g_string_new (NULL);
50 _beagle_request_append_standard_header (data,
51 "DaemonInformationRequest");
52 _beagle_request_append_standard_footer (data);
54 return data;
57 G_DEFINE_TYPE (BeagleDaemonInformationRequest, beagle_daemon_information_request, BEAGLE_TYPE_REQUEST)
59 static void
60 beagle_daemon_information_request_finalize (GObject *obj)
62 if (G_OBJECT_CLASS (parent_class)->finalize) {
63 G_OBJECT_CLASS (parent_class)->finalize (obj);
67 static void
68 beagle_daemon_information_request_class_init (BeagleDaemonInformationRequestClass *klass)
70 GObjectClass *obj_class = G_OBJECT_CLASS (klass);
71 BeagleRequestClass *request_class = BEAGLE_REQUEST_CLASS (klass);
73 parent_class = g_type_class_peek_parent (klass);
75 obj_class->finalize = beagle_daemon_information_request_finalize;
76 request_class->to_xml = beagle_daemon_information_request_to_xml;
78 g_type_class_add_private (klass, sizeof (BeagleDaemonInformationRequestPrivate));
80 _beagle_request_class_set_response_types (request_class,
81 "DaemonInformationResponse",
82 BEAGLE_TYPE_DAEMON_INFORMATION_RESPONSE,
83 NULL);
86 static void
87 beagle_daemon_information_request_init (BeagleDaemonInformationRequest *daemon_information_request)
91 /**
92 * beagle_daemon_information_request_new:
94 * Creates a new #BeagleDaemonInformationRequest.
96 * Return value: a newly created #BeagleDaemonInformationRequest.
97 **/
98 BeagleDaemonInformationRequest *
99 beagle_daemon_information_request_new (void)
101 BeagleDaemonInformationRequest *daemon_information_request = g_object_new (BEAGLE_TYPE_DAEMON_INFORMATION_REQUEST, 0);
103 return daemon_information_request;