tizen 2.3 release
[external/buxton.git] / docs / buxton_response_status.3
1 '\" t
2 .TH "BUXTON_RESPONSE_STATUS" "3" "buxton 1" "buxton_response_status"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 .ie \n(.g .ds Aq \(aq
11 .el       .ds Aq '
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
16 .nh
17 .\" disable justification (adjust text to left margin only)
18 .ad l
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
22 .SH "NAME"
23 buxton_response_status, buxton_response_type, buxton_response_key,
24 buxton_response_value \- Query responses from the buxton daemon
25
26 .SH "SYNOPSIS"
27 .nf
28 \fB
29 #include <buxton.h>
30 \fR
31 .sp
32 \fB
33 int32_t buxton_reponse_status(BuxtonResponse \fIresponse\fB)
34 .sp
35 .br
36 BuxtonControlMessage buxton_reponse_type(BuxtonResponse \fIresponse\fB)
37 .sp
38 .br
39 BuxtonKey buxton_reponse_key(BuxtonResponse \fIresponse\fB)
40 .sp
41 .br
42 void *buxton_reponse_value(BuxtonResponse \fIresponse\fB)
43 \fR
44 .fi
45
46 .SH "DESCRIPTION"
47 .PP
48 These functions are used within client-defined buxton callback
49 functions to query the response returned to the client by the buxton
50 daemon, \fBbuxtond\fR(8)\&. Callbacks are registered through several
51 of the API functions, such as \fBbuxton_set_value\fR(3) or
52 \fBbuxton_get_value\fR(3)\&.
53
54 With a callback function, the client should check the response status
55 by calling \fBbuxton_response_status\fR(3), with the \fIresponse\fR
56 argument passed to the callback\&. This function returns 0 on
57 success, or a non-zero value on failure\&.
58
59 Next, the client will want to check the type of response received
60 from the daemon by calling \fBbuxton_response_type\fR(3)\&. The type
61 will correspond to the type of operation that the client originally
62 requested\&. There are several possible return values, depending on
63 the type of operation; for operations that manipulate or query
64 configuration, the values include BUXTON_CONTROL_SET,
65 BUXTON_CONTROL_SET_LABEL, BUXTON_CONTROL_CREATE_GROUP,
66 BUXTON_CONTROL_REMOVE_GROUP, BUXTON_CONTROL_GET, and
67 BUXTON_CONTROL_UNSET; for operations related to notifications, the
68 values include BUXTON_CONTROL_NOTIFY and BUXTON_CONTROL_UNNOTIFY\&.
69
70 Finally, the client can validate that the configuration action
71 requested by the client matches the action taken by the daemon\&. To
72 query the BuxtonKey operated on by the daemon, the client should call
73 \fBbuxton_response_key\fR(3), which returns the BuxtonKey in
74 question\&. To query the value acted on by the daemon for this
75 BuxtonKey, a call to \fBbuxton_response_value\fR(3) returns an
76 untyped pointer to this value\&.
77
78 .SH "COPYRIGHT"
79 .PP
80 Copyright 2014 Intel Corporation\&. License: Creative Commons
81 Attribution\-ShareAlike 3.0 Unported\s-2\u[1]\d\s+2\&.
82
83 .SH "SEE ALSO"
84 .PP
85 \fBbuxton\fR(7),
86 \fBbuxtond\fR(8),
87 \fBbuxton\-api\fR(7)
88
89 .SH "NOTES"
90 .IP " 1." 4
91 Creative Commons Attribution\-ShareAlike 3.0 Unported
92 .RS 4
93 \%http://creativecommons.org/licenses/by-sa/3.0/
94 .RE