2 * beagle-daemon-information-request.c
4 * Copyright (C) 2005 Novell, Inc.
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.
29 #include <sys/types.h>
30 #include <sys/socket.h>
33 #include "beagle-private.h"
34 #include "beagle-daemon-information-request.h"
35 #include "beagle-daemon-information-response.h"
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
;
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
);
57 G_DEFINE_TYPE (BeagleDaemonInformationRequest
, beagle_daemon_information_request
, BEAGLE_TYPE_REQUEST
)
60 beagle_daemon_information_request_finalize (GObject
*obj
)
62 if (G_OBJECT_CLASS (parent_class
)->finalize
) {
63 G_OBJECT_CLASS (parent_class
)->finalize (obj
);
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
,
87 beagle_daemon_information_request_init (BeagleDaemonInformationRequest
*daemon_information_request
)
92 * beagle_daemon_information_request_new:
94 * Creates a new #BeagleDaemonInformationRequest.
96 * Return value: a newly created #BeagleDaemonInformationRequest.
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
;