libastag 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES +7 -0
- data/MIT-LICENSE +19 -0
- data/README +65 -0
- data/Rakefile +276 -0
- data/TODO +7 -0
- data/doc/classes/Helpers/REXML/Attributes.html +179 -0
- data/doc/classes/Helpers/REXML.html +115 -0
- data/doc/classes/Helpers.html +181 -0
- data/doc/classes/Libastag/Rabbit.html +462 -0
- data/doc/classes/Libastag/RabitEar.html +120 -0
- data/doc/classes/Libastag/RabitLed.html +120 -0
- data/doc/classes/Libastag.html +141 -0
- data/doc/classes/Request/Action.html +213 -0
- data/doc/classes/Request/Base/Event.html +226 -0
- data/doc/classes/Request/Base/EventCollection.html +246 -0
- data/doc/classes/Request/Base.html +134 -0
- data/doc/classes/Request/GET_EARS_POSITION.html +151 -0
- data/doc/classes/Request/Query.html +244 -0
- data/doc/classes/Request/SetEarsPosition.html +213 -0
- data/doc/classes/Request/TtsMessage.html +235 -0
- data/doc/classes/Request.html +414 -0
- data/doc/classes/Response/AbuseSending.html +165 -0
- data/doc/classes/Response/Base/BadServerRsp.html +163 -0
- data/doc/classes/Response/Base/GoodServerRsp.html +161 -0
- data/doc/classes/Response/Base/ServerRsp.html +347 -0
- data/doc/classes/Response/Base.html +162 -0
- data/doc/classes/Response/Blacklist.html +165 -0
- data/doc/classes/Response/ChorNotSend.html +166 -0
- data/doc/classes/Response/ChorSend.html +165 -0
- data/doc/classes/Response/CommandSend.html +168 -0
- data/doc/classes/Response/EarPositionNotSend.html +165 -0
- data/doc/classes/Response/EarPositionSend.html +165 -0
- data/doc/classes/Response/EmptyServerRsp.html +161 -0
- data/doc/classes/Response/LangListUser.html +166 -0
- data/doc/classes/Response/LinkPreview.html +165 -0
- data/doc/classes/Response/ListFriend.html +165 -0
- data/doc/classes/Response/ListReceivedMsg.html +165 -0
- data/doc/classes/Response/MessageNotSend.html +165 -0
- data/doc/classes/Response/MessageSend.html +165 -0
- data/doc/classes/Response/NabCastNotSend.html +169 -0
- data/doc/classes/Response/NabCastSend.html +165 -0
- data/doc/classes/Response/NoCorrectParameters.html +165 -0
- data/doc/classes/Response/NoGoodTokenOrSerial.html +165 -0
- data/doc/classes/Response/NotV2Rabbit.html +165 -0
- data/doc/classes/Response/PositionEar.html +166 -0
- data/doc/classes/Response/ProtocolExcepion.html +164 -0
- data/doc/classes/Response/RabbitName.html +164 -0
- data/doc/classes/Response/RabbitSleep.html +164 -0
- data/doc/classes/Response/RabbitVersion.html +164 -0
- data/doc/classes/Response/Signature.html +164 -0
- data/doc/classes/Response/Timezone.html +164 -0
- data/doc/classes/Response/TtsNotSend.html +168 -0
- data/doc/classes/Response/TtsSend.html +165 -0
- data/doc/classes/Response/VoiceListTts.html +165 -0
- data/doc/classes/Response/WebRadioNotSend.html +165 -0
- data/doc/classes/Response/WebRadioSend.html +165 -0
- data/doc/classes/Response.html +337 -0
- data/doc/classes/VioletAPI.html +118 -0
- data/doc/created.rid +1 -0
- data/doc/dot/f_0.dot +14 -0
- data/doc/dot/f_0.png +0 -0
- data/doc/dot/f_4.dot +57 -0
- data/doc/dot/f_4.png +0 -0
- data/doc/dot/f_5.dot +489 -0
- data/doc/dot/f_5.png +0 -0
- data/doc/dot/f_6.dot +55 -0
- data/doc/dot/f_6.png +0 -0
- data/doc/dot/f_7.dot +30 -0
- data/doc/dot/f_7.png +0 -0
- data/doc/dot/f_8.dot +142 -0
- data/doc/dot/f_8.png +0 -0
- data/doc/files/CHANGES.html +126 -0
- data/doc/files/MIT-LICENSE.html +134 -0
- data/doc/files/README.html +192 -0
- data/doc/files/TODO.html +126 -0
- data/doc/files/lib/libastag_rb.html +116 -0
- data/doc/files/lib/violet/helpers_rb.html +123 -0
- data/doc/files/lib/violet/request_rb.html +133 -0
- data/doc/files/lib/violet/response_rb.html +220 -0
- data/doc/files/lib/violet/violetapi_rb.html +114 -0
- data/doc/fr_class_index.html +79 -0
- data/doc/fr_file_index.html +35 -0
- data/doc/fr_method_index.html +56 -0
- data/doc/index.html +24 -0
- data/doc/rdoc-style.css +208 -0
- data/lib/libastag.rb +116 -0
- data/lib/violet/helpers.rb +48 -0
- data/lib/violet/request.rb +301 -0
- data/lib/violet/response.rb +412 -0
- data/lib/violet/violetapi.rb +14 -0
- data/test/fake_violet_srv.rb +94 -0
- data/test/test_helpers.rb +31 -0
- data/test/test_request.rb +20 -0
- data/test/test_response.rb +295 -0
- data/test/test_send.rb +137 -0
- metadata +264 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
7
|
+
<head>
|
|
8
|
+
<title>File: helpers.rb</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
11
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
12
|
+
<script type="text/javascript">
|
|
13
|
+
// <![CDATA[
|
|
14
|
+
|
|
15
|
+
function popupCode( url ) {
|
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function toggleCode( id ) {
|
|
20
|
+
if ( document.getElementById )
|
|
21
|
+
elem = document.getElementById( id );
|
|
22
|
+
else if ( document.all )
|
|
23
|
+
elem = eval( "document.all." + id );
|
|
24
|
+
else
|
|
25
|
+
return false;
|
|
26
|
+
|
|
27
|
+
elemStyle = elem.style;
|
|
28
|
+
|
|
29
|
+
if ( elemStyle.display != "block" ) {
|
|
30
|
+
elemStyle.display = "block"
|
|
31
|
+
} else {
|
|
32
|
+
elemStyle.display = "none"
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Make codeblocks hidden by default
|
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
|
40
|
+
|
|
41
|
+
// ]]>
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
</head>
|
|
45
|
+
<body>
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
<div id="fileHeader">
|
|
50
|
+
<h1>helpers.rb</h1>
|
|
51
|
+
<table class="header-table">
|
|
52
|
+
<tr class="top-aligned-row">
|
|
53
|
+
<td><strong>Path:</strong></td>
|
|
54
|
+
<td>lib/violet/helpers.rb
|
|
55
|
+
</td>
|
|
56
|
+
</tr>
|
|
57
|
+
<tr class="top-aligned-row">
|
|
58
|
+
<td><strong>Last Update:</strong></td>
|
|
59
|
+
<td>Wed Dec 05 13:39:57 +0100 2007</td>
|
|
60
|
+
</tr>
|
|
61
|
+
</table>
|
|
62
|
+
</div>
|
|
63
|
+
<!-- banner header -->
|
|
64
|
+
|
|
65
|
+
<div id="bodyContent">
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
<div id="contextContent">
|
|
70
|
+
<div id="diagram">
|
|
71
|
+
<map id="map" name="map">
|
|
72
|
+
<area shape="rect" coords="53,85,128,133" href="../../../classes/Helpers/REXML/Attributes.html" alt="Attributes" />
|
|
73
|
+
<area shape="rect" coords="43,51,165,144" href="../../../classes/Helpers/REXML.html" alt="REXML" />
|
|
74
|
+
<area shape="rect" coords="16,16,176,155" href="../../../classes/Helpers.html" alt="Helpers" />
|
|
75
|
+
</map>
|
|
76
|
+
<img src="../../../dot/f_6.png" usemap="#map" border="0" alt="dot/f_6.png">
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
<div id="description">
|
|
80
|
+
<h2>violet/helpers.rb</h2>
|
|
81
|
+
<p>
|
|
82
|
+
some handy class/methods and modifications.
|
|
83
|
+
</p>
|
|
84
|
+
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
<div id="requires-list">
|
|
88
|
+
<h3 class="section-bar">Required files</h3>
|
|
89
|
+
|
|
90
|
+
<div class="name-list">
|
|
91
|
+
rexml/document
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
<!-- if includes -->
|
|
102
|
+
|
|
103
|
+
<div id="section">
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
<!-- if method_list -->
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
</div>
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
<div id="validator-badges">
|
|
119
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
120
|
+
</div>
|
|
121
|
+
|
|
122
|
+
</body>
|
|
123
|
+
</html>
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
7
|
+
<head>
|
|
8
|
+
<title>File: request.rb</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
11
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
12
|
+
<script type="text/javascript">
|
|
13
|
+
// <![CDATA[
|
|
14
|
+
|
|
15
|
+
function popupCode( url ) {
|
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function toggleCode( id ) {
|
|
20
|
+
if ( document.getElementById )
|
|
21
|
+
elem = document.getElementById( id );
|
|
22
|
+
else if ( document.all )
|
|
23
|
+
elem = eval( "document.all." + id );
|
|
24
|
+
else
|
|
25
|
+
return false;
|
|
26
|
+
|
|
27
|
+
elemStyle = elem.style;
|
|
28
|
+
|
|
29
|
+
if ( elemStyle.display != "block" ) {
|
|
30
|
+
elemStyle.display = "block"
|
|
31
|
+
} else {
|
|
32
|
+
elemStyle.display = "none"
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Make codeblocks hidden by default
|
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
|
40
|
+
|
|
41
|
+
// ]]>
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
</head>
|
|
45
|
+
<body>
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
<div id="fileHeader">
|
|
50
|
+
<h1>request.rb</h1>
|
|
51
|
+
<table class="header-table">
|
|
52
|
+
<tr class="top-aligned-row">
|
|
53
|
+
<td><strong>Path:</strong></td>
|
|
54
|
+
<td>lib/violet/request.rb
|
|
55
|
+
</td>
|
|
56
|
+
</tr>
|
|
57
|
+
<tr class="top-aligned-row">
|
|
58
|
+
<td><strong>Last Update:</strong></td>
|
|
59
|
+
<td>Wed Dec 05 13:58:38 +0100 2007</td>
|
|
60
|
+
</tr>
|
|
61
|
+
</table>
|
|
62
|
+
</div>
|
|
63
|
+
<!-- banner header -->
|
|
64
|
+
|
|
65
|
+
<div id="bodyContent">
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
<div id="contextContent">
|
|
70
|
+
<div id="diagram">
|
|
71
|
+
<map id="map" name="map">
|
|
72
|
+
<area shape="rect" coords="392,85,464,133" href="../../../classes/Request/Base/Event.html" alt="Event" />
|
|
73
|
+
<area shape="rect" coords="27,181,99,229" href="../../../classes/Request/Action.html" alt="Action" />
|
|
74
|
+
<area shape="rect" coords="123,181,211,229" href="../../../classes/Request/TtsMessage.html" alt="TtsMessage" />
|
|
75
|
+
<area shape="rect" coords="235,181,341,229" href="../../../classes/Request/SetEarsPosition.html" alt="SetEarsPosition" />
|
|
76
|
+
<area shape="rect" coords="365,181,469,229" href="../../../classes/Request/Base/EventCollection.html" alt="EventCollection" />
|
|
77
|
+
<area shape="rect" coords="647,85,724,133" href="../../../classes/Enumerable.html" alt="Enumerable" />
|
|
78
|
+
<area shape="rect" coords="135,85,207,133" href="../../../classes/Request/Query.html" alt="Query" />
|
|
79
|
+
<area shape="rect" coords="491,73,625,121" href="../../../classes/Request/GET_EARS_POSITION.html" alt="GET_EARS_POSITION" />
|
|
80
|
+
<area shape="rect" coords="355,51,480,240" href="../../../classes/Request/Base.html" alt="Base" />
|
|
81
|
+
<area shape="rect" coords="16,16,636,251" href="../../../classes/Request.html" alt="Request" />
|
|
82
|
+
</map>
|
|
83
|
+
<img src="../../../dot/f_8.png" usemap="#map" border="0" alt="dot/f_8.png">
|
|
84
|
+
</div>
|
|
85
|
+
|
|
86
|
+
<div id="description">
|
|
87
|
+
<h2>violet/request.rb</h2>
|
|
88
|
+
<p>
|
|
89
|
+
contains events to send to the server. Action instances are constants,
|
|
90
|
+
because they‘re always the same request, but other Event derivated
|
|
91
|
+
class are used to create objects.
|
|
92
|
+
</p>
|
|
93
|
+
|
|
94
|
+
</div>
|
|
95
|
+
|
|
96
|
+
<div id="requires-list">
|
|
97
|
+
<h3 class="section-bar">Required files</h3>
|
|
98
|
+
|
|
99
|
+
<div class="name-list">
|
|
100
|
+
open-uri
|
|
101
|
+
cgi
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
|
|
105
|
+
</div>
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
</div>
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
<!-- if includes -->
|
|
112
|
+
|
|
113
|
+
<div id="section">
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
<!-- if method_list -->
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
</div>
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
<div id="validator-badges">
|
|
129
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
130
|
+
</div>
|
|
131
|
+
|
|
132
|
+
</body>
|
|
133
|
+
</html>
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
7
|
+
<head>
|
|
8
|
+
<title>File: response.rb</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
11
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
12
|
+
<script type="text/javascript">
|
|
13
|
+
// <![CDATA[
|
|
14
|
+
|
|
15
|
+
function popupCode( url ) {
|
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function toggleCode( id ) {
|
|
20
|
+
if ( document.getElementById )
|
|
21
|
+
elem = document.getElementById( id );
|
|
22
|
+
else if ( document.all )
|
|
23
|
+
elem = eval( "document.all." + id );
|
|
24
|
+
else
|
|
25
|
+
return false;
|
|
26
|
+
|
|
27
|
+
elemStyle = elem.style;
|
|
28
|
+
|
|
29
|
+
if ( elemStyle.display != "block" ) {
|
|
30
|
+
elemStyle.display = "block"
|
|
31
|
+
} else {
|
|
32
|
+
elemStyle.display = "none"
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Make codeblocks hidden by default
|
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
|
40
|
+
|
|
41
|
+
// ]]>
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
</head>
|
|
45
|
+
<body>
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
<div id="fileHeader">
|
|
50
|
+
<h1>response.rb</h1>
|
|
51
|
+
<table class="header-table">
|
|
52
|
+
<tr class="top-aligned-row">
|
|
53
|
+
<td><strong>Path:</strong></td>
|
|
54
|
+
<td>lib/violet/response.rb
|
|
55
|
+
</td>
|
|
56
|
+
</tr>
|
|
57
|
+
<tr class="top-aligned-row">
|
|
58
|
+
<td><strong>Last Update:</strong></td>
|
|
59
|
+
<td>Wed Dec 05 13:53:53 +0100 2007</td>
|
|
60
|
+
</tr>
|
|
61
|
+
</table>
|
|
62
|
+
</div>
|
|
63
|
+
<!-- banner header -->
|
|
64
|
+
|
|
65
|
+
<div id="bodyContent">
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
<div id="contextContent">
|
|
70
|
+
<div id="diagram">
|
|
71
|
+
<map id="map" name="map">
|
|
72
|
+
<area shape="rect" coords="1625,229,1732,277" href="../../../classes/Response/Base/GoodServerRsp.html" alt="GoodServerRsp" />
|
|
73
|
+
<area shape="rect" coords="27,325,136,373" href="../../../classes/Response/EarPositionSend.html" alt="EarPositionSend" />
|
|
74
|
+
<area shape="rect" coords="160,325,256,373" href="../../../classes/Response/NabCastSend.html" alt="NabCastSend" />
|
|
75
|
+
<area shape="rect" coords="280,325,384,373" href="../../../classes/Response/CommandSend.html" alt="CommandSend" />
|
|
76
|
+
<area shape="rect" coords="408,325,485,373" href="../../../classes/Response/Signature.html" alt="Signature" />
|
|
77
|
+
<area shape="rect" coords="509,325,595,373" href="../../../classes/Response/PositionEar.html" alt="PositionEar" />
|
|
78
|
+
<area shape="rect" coords="619,325,707,373" href="../../../classes/Response/VoiceListTts.html" alt="VoiceListTts" />
|
|
79
|
+
<area shape="rect" coords="731,325,819,373" href="../../../classes/Response/LinkPreview.html" alt="LinkPreview" />
|
|
80
|
+
<area shape="rect" coords="843,325,941,373" href="../../../classes/Response/MessageSend.html" alt="MessageSend" />
|
|
81
|
+
<area shape="rect" coords="965,325,1059,373" href="../../../classes/Response/LangListUser.html" alt="LangListUser" />
|
|
82
|
+
<area shape="rect" coords="1083,325,1173,373" href="../../../classes/Response/RabbitName.html" alt="RabbitName" />
|
|
83
|
+
<area shape="rect" coords="1197,325,1269,373" href="../../../classes/Response/TtsSend.html" alt="TtsSend" />
|
|
84
|
+
<area shape="rect" coords="1293,325,1405,373" href="../../../classes/Response/ListReceivedMsg.html" alt="ListReceivedMsg" />
|
|
85
|
+
<area shape="rect" coords="1429,325,1507,373" href="../../../classes/Response/ListFriend.html" alt="ListFriend" />
|
|
86
|
+
<area shape="rect" coords="1531,325,1619,373" href="../../../classes/Response/RabbitSleep.html" alt="RabbitSleep" />
|
|
87
|
+
<area shape="rect" coords="1643,325,1715,373" href="../../../classes/Response/Blacklist.html" alt="Blacklist" />
|
|
88
|
+
<area shape="rect" coords="1739,325,1816,373" href="../../../classes/Response/Timezone.html" alt="Timezone" />
|
|
89
|
+
<area shape="rect" coords="1840,325,1939,373" href="../../../classes/Response/RabbitVersion.html" alt="RabbitVersion" />
|
|
90
|
+
<area shape="rect" coords="1963,325,2067,373" href="../../../classes/Response/WebRadioSend.html" alt="WebRadioSend" />
|
|
91
|
+
<area shape="rect" coords="2091,325,2168,373" href="../../../classes/Response/ChorSend.html" alt="ChorSend" />
|
|
92
|
+
<area shape="rect" coords="1756,229,1855,277" href="../../../classes/Response/Base/BadServerRsp.html" alt="BadServerRsp" />
|
|
93
|
+
<area shape="rect" coords="2192,325,2331,373" href="../../../classes/Response/NoGoodTokenOrSerial.html" alt="NoGoodTokenOrSerial" />
|
|
94
|
+
<area shape="rect" coords="2355,325,2451,373" href="../../../classes/Response/ChorNotSend.html" alt="ChorNotSend" />
|
|
95
|
+
<area shape="rect" coords="2475,325,2589,373" href="../../../classes/Response/NabCastNotSend.html" alt="NabCastNotSend" />
|
|
96
|
+
<area shape="rect" coords="2613,325,2728,373" href="../../../classes/Response/MessageNotSend.html" alt="MessageNotSend" />
|
|
97
|
+
<area shape="rect" coords="2752,325,2851,373" href="../../../classes/Response/AbuseSending.html" alt="AbuseSending" />
|
|
98
|
+
<area shape="rect" coords="2875,325,3008,373" href="../../../classes/Response/NoCorrectParameters.html" alt="NoCorrectParameters" />
|
|
99
|
+
<area shape="rect" coords="3032,325,3120,373" href="../../../classes/Response/TtsNotSend.html" alt="TtsNotSend" />
|
|
100
|
+
<area shape="rect" coords="3144,325,3235,373" href="../../../classes/Response/NotV2Rabbit.html" alt="NotV2Rabbit" />
|
|
101
|
+
<area shape="rect" coords="3259,325,3381,373" href="../../../classes/Response/WebRadioNotSend.html" alt="WebRadioNotSend" />
|
|
102
|
+
<area shape="rect" coords="3405,325,3531,373" href="../../../classes/Response/EarPositionNotSend.html" alt="EarPositionNotSend" />
|
|
103
|
+
<area shape="rect" coords="1149,5,1227,53" href="../../../classes/Exception.html" alt="Exception" />
|
|
104
|
+
<area shape="rect" coords="1131,133,1245,181" href="../../../classes/Response/ProtocolExcepion.html" alt="ProtocolExcepion" />
|
|
105
|
+
<area shape="rect" coords="1765,133,1845,181" href="../../../classes/Response/Base/ServerRsp.html" alt="ServerRsp" />
|
|
106
|
+
<area shape="rect" coords="1879,229,1991,277" href="../../../classes/Response/EmptyServerRsp.html" alt="EmptyServerRsp" />
|
|
107
|
+
<area shape="rect" coords="1615,99,1865,288" href="../../../classes/Response/Base.html" alt="Base" />
|
|
108
|
+
<area shape="rect" coords="16,64,3541,384" href="../../../classes/Response.html" alt="Response" />
|
|
109
|
+
</map>
|
|
110
|
+
<img src="../../../dot/f_5.png" usemap="#map" border="0" alt="dot/f_5.png">
|
|
111
|
+
</div>
|
|
112
|
+
|
|
113
|
+
<div id="description">
|
|
114
|
+
<h1>violet/response.rb</h1>
|
|
115
|
+
<h2>Summary</h2>
|
|
116
|
+
<p>
|
|
117
|
+
this module handle servers messages. Main method/class are <a
|
|
118
|
+
href="../../../classes/Response.html#M000003">Response.parse</a> and <a
|
|
119
|
+
href="../../../classes/Response/Base/ServerRsp.html">Response::Base::ServerRsp</a>
|
|
120
|
+
(well documented).
|
|
121
|
+
</p>
|
|
122
|
+
<p>
|
|
123
|
+
you should only use <a
|
|
124
|
+
href="../../../classes/Response.html#M000003">Response.parse</a> with the
|
|
125
|
+
server‘s message (xml) as argument, it returns a ServerRsp instance
|
|
126
|
+
from the corresponding class (see all the ServerRsp subclass). with a
|
|
127
|
+
ServerRsp instance you can use :
|
|
128
|
+
</p>
|
|
129
|
+
<dl>
|
|
130
|
+
<dt> r.has_x? </dt><dd>return <tt>true</tt> if r has at least one element of name "x",
|
|
131
|
+
return <tt>false</tt> otherwhise.
|
|
132
|
+
|
|
133
|
+
</dd>
|
|
134
|
+
<dt> r.has_many_xs? </dt><dd>return <tt>true</tt> if r has more than one element of name "x",
|
|
135
|
+
return <tt>false</tt> otherwhise.
|
|
136
|
+
|
|
137
|
+
</dd>
|
|
138
|
+
<dt> r.x </dt><dd>find the first xml element of name x and return it‘s text if any, or
|
|
139
|
+
a hash of it‘s options
|
|
140
|
+
|
|
141
|
+
</dd>
|
|
142
|
+
<dt> r.x </dt><dd>find all xml element of name x and return an Array of their text if any, or
|
|
143
|
+
their options.
|
|
144
|
+
|
|
145
|
+
</dd>
|
|
146
|
+
<dt> r.good? </dt><dd>return <tt>true</tt> if the response is not an error, <tt>false</tt>
|
|
147
|
+
otherwhise.
|
|
148
|
+
|
|
149
|
+
</dd>
|
|
150
|
+
<dt> r.bad? </dt><dd>return <tt>true</tt> if the response is an error, <tt>false</tt>
|
|
151
|
+
otherwhise.
|
|
152
|
+
|
|
153
|
+
</dd>
|
|
154
|
+
</dl>
|
|
155
|
+
<h2>Examples :</h2>
|
|
156
|
+
<pre>
|
|
157
|
+
>> rsp = Response.parse('<?xml version="1.0" encoding="UTF-8"?><rsp><blacklist nb="2"/><pseudo name="toto"/><pseudo name="titi"/></rsp>')
|
|
158
|
+
=> #<Response::Blacklist:0x2acd8c08f2f8 @xml=<UNDEFINED> ... </>>
|
|
159
|
+
>> rsp.good?
|
|
160
|
+
=> true
|
|
161
|
+
>> rsp.has_message?
|
|
162
|
+
=> false
|
|
163
|
+
>> rsp.message
|
|
164
|
+
NameError: undefined local variable or method message for #<Response::Blacklist:0x2b1f056afdc0 @xml=<UNDEFINED> ... </>>
|
|
165
|
+
>> rsp.has_blacklist?
|
|
166
|
+
=> true
|
|
167
|
+
>> rsp.blacklist
|
|
168
|
+
=> {:nb=>"2"}
|
|
169
|
+
>> rsp.pseudo
|
|
170
|
+
=> {:name=>"toto"}
|
|
171
|
+
>> rsp.has_many_pseudos?
|
|
172
|
+
=> true
|
|
173
|
+
>> rsp.pseudos
|
|
174
|
+
=> [{:name=>"toto"}, {:name=>"titi"}]
|
|
175
|
+
</pre>
|
|
176
|
+
<h2>Low Level</h2>
|
|
177
|
+
<p>
|
|
178
|
+
if you want to access to the REXML::Document object of a ServerRsp you can
|
|
179
|
+
either use rsp.xml or use ServerRsp#get_all method.
|
|
180
|
+
</p>
|
|
181
|
+
|
|
182
|
+
</div>
|
|
183
|
+
|
|
184
|
+
<div id="requires-list">
|
|
185
|
+
<h3 class="section-bar">Required files</h3>
|
|
186
|
+
|
|
187
|
+
<div class="name-list">
|
|
188
|
+
rexml/document
|
|
189
|
+
</div>
|
|
190
|
+
</div>
|
|
191
|
+
|
|
192
|
+
</div>
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
</div>
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
<!-- if includes -->
|
|
199
|
+
|
|
200
|
+
<div id="section">
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
<!-- if method_list -->
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
</div>
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
<div id="validator-badges">
|
|
216
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
217
|
+
</div>
|
|
218
|
+
|
|
219
|
+
</body>
|
|
220
|
+
</html>
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
7
|
+
<head>
|
|
8
|
+
<title>File: violetapi.rb</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
11
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
12
|
+
<script type="text/javascript">
|
|
13
|
+
// <![CDATA[
|
|
14
|
+
|
|
15
|
+
function popupCode( url ) {
|
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function toggleCode( id ) {
|
|
20
|
+
if ( document.getElementById )
|
|
21
|
+
elem = document.getElementById( id );
|
|
22
|
+
else if ( document.all )
|
|
23
|
+
elem = eval( "document.all." + id );
|
|
24
|
+
else
|
|
25
|
+
return false;
|
|
26
|
+
|
|
27
|
+
elemStyle = elem.style;
|
|
28
|
+
|
|
29
|
+
if ( elemStyle.display != "block" ) {
|
|
30
|
+
elemStyle.display = "block"
|
|
31
|
+
} else {
|
|
32
|
+
elemStyle.display = "none"
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Make codeblocks hidden by default
|
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
|
40
|
+
|
|
41
|
+
// ]]>
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
</head>
|
|
45
|
+
<body>
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
<div id="fileHeader">
|
|
50
|
+
<h1>violetapi.rb</h1>
|
|
51
|
+
<table class="header-table">
|
|
52
|
+
<tr class="top-aligned-row">
|
|
53
|
+
<td><strong>Path:</strong></td>
|
|
54
|
+
<td>lib/violet/violetapi.rb
|
|
55
|
+
</td>
|
|
56
|
+
</tr>
|
|
57
|
+
<tr class="top-aligned-row">
|
|
58
|
+
<td><strong>Last Update:</strong></td>
|
|
59
|
+
<td>Wed Dec 05 13:40:05 +0100 2007</td>
|
|
60
|
+
</tr>
|
|
61
|
+
</table>
|
|
62
|
+
</div>
|
|
63
|
+
<!-- banner header -->
|
|
64
|
+
|
|
65
|
+
<div id="bodyContent">
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
<div id="contextContent">
|
|
70
|
+
<div id="diagram">
|
|
71
|
+
<map id="map" name="map">
|
|
72
|
+
<area shape="rect" coords="16,16,109,64" href="../../../classes/VioletAPI.html" alt="VioletAPI" />
|
|
73
|
+
</map>
|
|
74
|
+
<img src="../../../dot/f_7.png" usemap="#map" border="0" alt="dot/f_7.png">
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
<div id="description">
|
|
78
|
+
<h2>violet/violetapi.rb</h2>
|
|
79
|
+
<p>
|
|
80
|
+
TODO
|
|
81
|
+
</p>
|
|
82
|
+
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
</div>
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
<!-- if includes -->
|
|
93
|
+
|
|
94
|
+
<div id="section">
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
<!-- if method_list -->
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
</div>
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
<div id="validator-badges">
|
|
110
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
111
|
+
</div>
|
|
112
|
+
|
|
113
|
+
</body>
|
|
114
|
+
</html>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
|
|
2
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
3
|
+
<!DOCTYPE html
|
|
4
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
5
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
6
|
+
|
|
7
|
+
<!--
|
|
8
|
+
|
|
9
|
+
Classes
|
|
10
|
+
|
|
11
|
+
-->
|
|
12
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
13
|
+
<head>
|
|
14
|
+
<title>Classes</title>
|
|
15
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
16
|
+
<link rel="stylesheet" href="rdoc-style.css" type="text/css" />
|
|
17
|
+
<base target="docwin" />
|
|
18
|
+
</head>
|
|
19
|
+
<body>
|
|
20
|
+
<div id="index">
|
|
21
|
+
<h1 class="section-bar">Classes</h1>
|
|
22
|
+
<div id="index-entries">
|
|
23
|
+
<a href="classes/Helpers.html">Helpers</a><br />
|
|
24
|
+
<a href="classes/Helpers/REXML.html">Helpers::REXML</a><br />
|
|
25
|
+
<a href="classes/Helpers/REXML/Attributes.html">Helpers::REXML::Attributes</a><br />
|
|
26
|
+
<a href="classes/Libastag.html">Libastag</a><br />
|
|
27
|
+
<a href="classes/Libastag/Rabbit.html">Libastag::Rabbit</a><br />
|
|
28
|
+
<a href="classes/Libastag/RabitEar.html">Libastag::RabitEar</a><br />
|
|
29
|
+
<a href="classes/Libastag/RabitLed.html">Libastag::RabitLed</a><br />
|
|
30
|
+
<a href="classes/Request.html">Request</a><br />
|
|
31
|
+
<a href="classes/Request/Action.html">Request::Action</a><br />
|
|
32
|
+
<a href="classes/Request/Base.html">Request::Base</a><br />
|
|
33
|
+
<a href="classes/Request/Base/Event.html">Request::Base::Event</a><br />
|
|
34
|
+
<a href="classes/Request/Base/EventCollection.html">Request::Base::EventCollection</a><br />
|
|
35
|
+
<a href="classes/Request/GET_EARS_POSITION.html">Request::GET_EARS_POSITION</a><br />
|
|
36
|
+
<a href="classes/Request/Query.html">Request::Query</a><br />
|
|
37
|
+
<a href="classes/Request/SetEarsPosition.html">Request::SetEarsPosition</a><br />
|
|
38
|
+
<a href="classes/Request/TtsMessage.html">Request::TtsMessage</a><br />
|
|
39
|
+
<a href="classes/Response.html">Response</a><br />
|
|
40
|
+
<a href="classes/Response/AbuseSending.html">Response::AbuseSending</a><br />
|
|
41
|
+
<a href="classes/Response/Base.html">Response::Base</a><br />
|
|
42
|
+
<a href="classes/Response/Base/BadServerRsp.html">Response::Base::BadServerRsp</a><br />
|
|
43
|
+
<a href="classes/Response/Base/GoodServerRsp.html">Response::Base::GoodServerRsp</a><br />
|
|
44
|
+
<a href="classes/Response/Base/ServerRsp.html">Response::Base::ServerRsp</a><br />
|
|
45
|
+
<a href="classes/Response/Blacklist.html">Response::Blacklist</a><br />
|
|
46
|
+
<a href="classes/Response/ChorNotSend.html">Response::ChorNotSend</a><br />
|
|
47
|
+
<a href="classes/Response/ChorSend.html">Response::ChorSend</a><br />
|
|
48
|
+
<a href="classes/Response/CommandSend.html">Response::CommandSend</a><br />
|
|
49
|
+
<a href="classes/Response/EarPositionNotSend.html">Response::EarPositionNotSend</a><br />
|
|
50
|
+
<a href="classes/Response/EarPositionSend.html">Response::EarPositionSend</a><br />
|
|
51
|
+
<a href="classes/Response/EmptyServerRsp.html">Response::EmptyServerRsp</a><br />
|
|
52
|
+
<a href="classes/Response/LangListUser.html">Response::LangListUser</a><br />
|
|
53
|
+
<a href="classes/Response/LinkPreview.html">Response::LinkPreview</a><br />
|
|
54
|
+
<a href="classes/Response/ListFriend.html">Response::ListFriend</a><br />
|
|
55
|
+
<a href="classes/Response/ListReceivedMsg.html">Response::ListReceivedMsg</a><br />
|
|
56
|
+
<a href="classes/Response/MessageNotSend.html">Response::MessageNotSend</a><br />
|
|
57
|
+
<a href="classes/Response/MessageSend.html">Response::MessageSend</a><br />
|
|
58
|
+
<a href="classes/Response/NabCastNotSend.html">Response::NabCastNotSend</a><br />
|
|
59
|
+
<a href="classes/Response/NabCastSend.html">Response::NabCastSend</a><br />
|
|
60
|
+
<a href="classes/Response/NoCorrectParameters.html">Response::NoCorrectParameters</a><br />
|
|
61
|
+
<a href="classes/Response/NoGoodTokenOrSerial.html">Response::NoGoodTokenOrSerial</a><br />
|
|
62
|
+
<a href="classes/Response/NotV2Rabbit.html">Response::NotV2Rabbit</a><br />
|
|
63
|
+
<a href="classes/Response/PositionEar.html">Response::PositionEar</a><br />
|
|
64
|
+
<a href="classes/Response/ProtocolExcepion.html">Response::ProtocolExcepion</a><br />
|
|
65
|
+
<a href="classes/Response/RabbitName.html">Response::RabbitName</a><br />
|
|
66
|
+
<a href="classes/Response/RabbitSleep.html">Response::RabbitSleep</a><br />
|
|
67
|
+
<a href="classes/Response/RabbitVersion.html">Response::RabbitVersion</a><br />
|
|
68
|
+
<a href="classes/Response/Signature.html">Response::Signature</a><br />
|
|
69
|
+
<a href="classes/Response/Timezone.html">Response::Timezone</a><br />
|
|
70
|
+
<a href="classes/Response/TtsNotSend.html">Response::TtsNotSend</a><br />
|
|
71
|
+
<a href="classes/Response/TtsSend.html">Response::TtsSend</a><br />
|
|
72
|
+
<a href="classes/Response/VoiceListTts.html">Response::VoiceListTts</a><br />
|
|
73
|
+
<a href="classes/Response/WebRadioNotSend.html">Response::WebRadioNotSend</a><br />
|
|
74
|
+
<a href="classes/Response/WebRadioSend.html">Response::WebRadioSend</a><br />
|
|
75
|
+
<a href="classes/VioletAPI.html">VioletAPI</a><br />
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
</body>
|
|
79
|
+
</html>
|