summaryrefslogtreecommitdiff
path: root/lib/st/thrift.st
blob: c24f616128c2551484d8f0a347950881a08236c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
SystemOrganization addCategory: #Thrift!
SystemOrganization addCategory: #'Thrift-Protocol'!
SystemOrganization addCategory: #'Thrift-Test'!
SystemOrganization addCategory: #'Thrift-Transport'!

Error subclass: #TError
	instanceVariableNames: 'code'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Thrift'!

!TError class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:28'!
signalWithCode: anInteger
	self new code: anInteger; signal! !

!TError methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:28'!
code
	^ code! !

!TError methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:28'!
code: anInteger
	code := anInteger! !

TError subclass: #TProtocolError
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Thrift-Protocol'!

!TProtocolError class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 18:39'!
badVersion
	^ 4! !

!TProtocolError class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 18:39'!
invalidData
	^ 1! !

!TProtocolError class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 18:39'!
negativeSize
	^ 2! !

!TProtocolError class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 18:40'!
sizeLimit
	^ 3! !

!TProtocolError class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 18:40'!
unknown
	^ 0! !

TError subclass: #TTransportError
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Thrift-Transport'!

TTransportError subclass: #TTransportClosedError
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Thrift-Transport'!

Error subclass: #Xception
	instanceVariableNames: 'errorCode message'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Thrift-Test'!

!Xception methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
errorCode
    ^ errorCode! !

!Xception methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
errorCode: anI32
    errorCode := anI32! !

!Xception methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
message
    ^ message! !

!Xception methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
message: aString
    message := aString! !

Error subclass: #Xception2
	instanceVariableNames: 'errorCode structThing'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Thrift-Test'!

!Xception2 methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
errorCode
    ^ errorCode! !

!Xception2 methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
errorCode: anI32
    errorCode := anI32! !

!Xception2 methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
structThing
    ^ structThing! !

!Xception2 methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
structThing: aXtruct
    structThing := aXtruct! !

Object subclass: #Bonk
	instanceVariableNames: 'message type'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Thrift-Test'!

!Bonk methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
message
    ^ message! !

!Bonk methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
message: aString
    message := aString! !

!Bonk methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
type
    ^ type! !

!Bonk methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
type: anI32
    type := anI32! !

Object subclass: #EmptyStruct
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Thrift-Test'!

Object subclass: #Insanity
	instanceVariableNames: 'userMap xtructs'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Thrift-Test'!

!Insanity methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
userMap
    ^ userMap! !

!Insanity methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
userMap: a
    userMap := a! !

!Insanity methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
xtructs
    ^ xtructs! !

!Insanity methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
xtructs: a
    xtructs := a! !

Object subclass: #TClient
	instanceVariableNames: 'iprot oprot seqid remoteSeqid'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Thrift'!

TClient subclass: #SecondServiceClient
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Thrift-Test'!

!SecondServiceClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
blahBlah
    ""
    self sendBlahBlah.
    ^ self recvBlahBlah success 
! !

!SecondServiceClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
recvBlahBlah
    | f msg res | 
    msg := oprot readMessageBegin.
    self validateRemoteMessage: msg.
    res := [|temp118 temp117|
      temp117 := TResult new.
      iprot readStructBegin.
      [temp118 := iprot readFieldBegin.
      temp118 type = TType stop] whileFalse: [|temp119|
        temp118 id = 0 ifTrue: [
          temp119 := true.
          temp117 success: iprot readVoid].
        temp119 ifNil: [iprot skip: temp118 type]].
      oprot readStructEnd.
      temp117] value.
    oprot readMessageEnd.
    oprot transport flush.
    res exception ifNotNil: [res exception signal].
    ^ res! !

!SecondServiceClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
sendBlahBlah
    oprot writeMessageBegin:
      (TCallMessage new
        name: 'blahBlah'; 
        seqid: self nextSeqid).
    oprot writeStructBegin: (TStruct new name: 'BlahBlah_args').
    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
    oprot transport flush! !

!TClient methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 23:03'!
inProtocol: aProtocol
	iprot := aProtocol.
	oprot ifNil: [oprot := aProtocol]! !

!TClient methodsFor: 'as yet unclassified' stamp: 'pc 10/26/2007 04:28'!
nextSeqid
	^ seqid
		ifNil: [seqid := 0]
		ifNotNil: [seqid := seqid + 1]! !

!TClient methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 22:51'!
outProtocol: aProtocol
	oprot := aProtocol! !

!TClient methodsFor: 'as yet unclassified' stamp: 'pc 10/28/2007 15:32'!
validateRemoteMessage: aMsg
	remoteSeqid
		ifNil: [remoteSeqid := aMsg seqid]
		ifNotNil: 
			[(remoteSeqid + 1) = aMsg seqid ifFalse:
				[TProtocolError signal: 'Bad seqid: ', aMsg seqid asString,
							'; wanted: ', remoteSeqid asString].
			remoteSeqid := aMsg seqid]! !

TClient subclass: #ThriftTestClient
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Thrift-Test'!

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
recvTestByte
    | f msg res | 
    msg := oprot readMessageBegin.
    self validateRemoteMessage: msg.
    res := [|temp7 temp6|
      temp6 := TResult new.
      iprot readStructBegin.
      [temp7 := iprot readFieldBegin.
      temp7 type = TType stop] whileFalse: [|temp8|
        temp7 id = 0 ifTrue: [
          temp8 := true.
          temp6 success: iprot readByte].
        temp8 ifNil: [iprot skip: temp7 type]].
      oprot readStructEnd.
      temp6] value.
    oprot readMessageEnd.
    oprot transport flush.
    res exception ifNotNil: [res exception signal].
    ^ res! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
recvTestDouble
    | f msg res | 
    msg := oprot readMessageBegin.
    self validateRemoteMessage: msg.
    res := [|temp19 temp18|
      temp18 := TResult new.
      iprot readStructBegin.
      [temp19 := iprot readFieldBegin.
      temp19 type = TType stop] whileFalse: [|temp20|
        temp19 id = 0 ifTrue: [
          temp20 := true.
          temp18 success: iprot readDouble].
        temp20 ifNil: [iprot skip: temp19 type]].
      oprot readStructEnd.
      temp18] value.
    oprot readMessageEnd.
    oprot transport flush.
    res exception ifNotNil: [res exception signal].
    ^ res! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
recvTestEnum
    | f msg res | 
    msg := oprot readMessageBegin.
    self validateRemoteMessage: msg.
    res := [|temp56 temp55|
      temp55 := TResult new.
      iprot readStructBegin.
      [temp56 := iprot readFieldBegin.
      temp56 type = TType stop] whileFalse: [|temp57|
        temp56 id = 0 ifTrue: [
          temp57 := true.
          temp55 success: iprot readI32].
        temp57 ifNil: [iprot skip: temp56 type]].
      oprot readStructEnd.
      temp55] value.
    oprot readMessageEnd.
    oprot transport flush.
    res exception ifNotNil: [res exception signal].
    ^ res! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
recvTestException
    | f msg res | 
    msg := oprot readMessageBegin.
    self validateRemoteMessage: msg.
    res := [|temp97 temp96|
      temp96 := TResult new.
      iprot readStructBegin.
      [temp97 := iprot readFieldBegin.
      temp97 type = TType stop] whileFalse: [|temp98|
        temp97 id = 0 ifTrue: [
          temp98 := true.
          temp96 success: iprot readVoid].
        temp97 id = -2 ifTrue: [
          temp98 := true.
          temp96 exception: [|temp100 temp99|
            temp99 := Xception new.
            iprot readStructBegin.
            [temp100 := iprot readFieldBegin.
            temp100 type = TType stop] whileFalse: [|temp101|
              temp100 id = 1 ifTrue: [
                temp101 := true.
                temp99 errorCode: iprot readI32].
              temp100 id = 2 ifTrue: [
                temp101 := true.
                temp99 message: iprot readString].
              temp101 ifNil: [iprot skip: temp100 type]].
            oprot readStructEnd.
            temp99] value].
        temp98 ifNil: [iprot skip: temp97 type]].
      oprot readStructEnd.
      temp96] value.
    oprot readMessageEnd.
    oprot transport flush.
    res exception ifNotNil: [res exception signal].
    ^ res! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
recvTestI16
    | f msg res | 
    msg := oprot readMessageBegin.
    self validateRemoteMessage: msg.
    res := [|temp10 temp9|
      temp9 := TResult new.
      iprot readStructBegin.
      [temp10 := iprot readFieldBegin.
      temp10 type = TType stop] whileFalse: [|temp11|
        temp10 id = 0 ifTrue: [
          temp11 := true.
          temp9 success: iprot readI16].
        temp11 ifNil: [iprot skip: temp10 type]].
      oprot readStructEnd.
      temp9] value.
    oprot readMessageEnd.
    oprot transport flush.
    res exception ifNotNil: [res exception signal].
    ^ res! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
recvTestI32
    | f msg res | 
    msg := oprot readMessageBegin.
    self validateRemoteMessage: msg.
    res := [|temp13 temp12|
      temp12 := TResult new.
      iprot readStructBegin.
      [temp13 := iprot readFieldBegin.
      temp13 type = TType stop] whileFalse: [|temp14|
        temp13 id = 0 ifTrue: [
          temp14 := true.
          temp12 success: iprot readI32].
        temp14 ifNil: [iprot skip: temp13 type]].
      oprot readStructEnd.
      temp12] value.
    oprot readMessageEnd.
    oprot transport flush.
    res exception ifNotNil: [res exception signal].
    ^ res! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
recvTestI64
    | f msg res | 
    msg := oprot readMessageBegin.
    self validateRemoteMessage: msg.
    res := [|temp16 temp15|
      temp15 := TResult new.
      iprot readStructBegin.
      [temp16 := iprot readFieldBegin.
      temp16 type = TType stop] whileFalse: [|temp17|
        temp16 id = 0 ifTrue: [
          temp17 := true.
          temp15 success: iprot readI64].
        temp17 ifNil: [iprot skip: temp16 type]].
      oprot readStructEnd.
      temp15] value.
    oprot readMessageEnd.
    oprot transport flush.
    res exception ifNotNil: [res exception signal].
    ^ res! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
recvTestInsanity
    | f msg res | 
    msg := oprot readMessageBegin.
    self validateRemoteMessage: msg.
    res := [|temp72 temp71|
      temp71 := TResult new.
      iprot readStructBegin.
      [temp72 := iprot readFieldBegin.
      temp72 type = TType stop] whileFalse: [|temp73|
        temp72 id = 0 ifTrue: [
          temp73 := true.
          temp71 success: [|temp74 temp75| 
            temp74 := iprot readMapBegin.
            temp75 := Dictionary new.
            temp74 size timesRepeat: [
              temp75 at: iprot readI64 put: [|temp76 temp77| 
                temp76 := iprot readMapBegin.
                temp77 := Dictionary new.
                temp76 size timesRepeat: [
                  temp77 at: iprot readI32 put: [|temp79 temp78|
                    temp78 := Insanity new.
                    iprot readStructBegin.
                    [temp79 := iprot readFieldBegin.
                    temp79 type = TType stop] whileFalse: [|temp80|
                      temp79 id = 1 ifTrue: [
                        temp80 := true.
                        temp78 userMap: [|temp81 temp82| 
                          temp81 := iprot readMapBegin.
                          temp82 := Dictionary new.
                          temp81 size timesRepeat: [
                            temp82 at: iprot readI32 put: iprot readI64].
                          iprot readMapEnd.
                          temp82] value].
                      temp79 id = 2 ifTrue: [
                        temp80 := true.
                        temp78 xtructs: [|temp83 temp84| temp83 := iprot readListBegin.
                          temp84 := OrderedCollection new.
                          temp83 size timesRepeat: [
                            temp84 add: [|temp86 temp85|
                              temp85 := Xtruct new.
                              iprot readStructBegin.
                              [temp86 := iprot readFieldBegin.
                              temp86 type = TType stop] whileFalse: [|temp87|
                                temp86 id = 1 ifTrue: [
                                  temp87 := true.
                                  temp85 stringThing: iprot readString].
                                temp86 id = 4 ifTrue: [
                                  temp87 := true.
                                  temp85 byteThing: iprot readByte].
                                temp86 id = 9 ifTrue: [
                                  temp87 := true.
                                  temp85 i32Thing: iprot readI32].
                                temp86 id = 11 ifTrue: [
                                  temp87 := true.
                                  temp85 i64Thing: iprot readI64].
                                temp87 ifNil: [iprot skip: temp86 type]].
                              oprot readStructEnd.
                              temp85] value].
                          iprot readListEnd.
                          temp84] value].
                      temp80 ifNil: [iprot skip: temp79 type]].
                    oprot readStructEnd.
                    temp78] value].
                iprot readMapEnd.
                temp77] value].
            iprot readMapEnd.
            temp75] value].
        temp73 ifNil: [iprot skip: temp72 type]].
      oprot readStructEnd.
      temp71] value.
    oprot readMessageEnd.
    oprot transport flush.
    res exception ifNotNil: [res exception signal].
    ^ res! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
recvTestList
    | f msg res | 
    msg := oprot readMessageBegin.
    self validateRemoteMessage: msg.
    res := [|temp51 temp50|
      temp50 := TResult new.
      iprot readStructBegin.
      [temp51 := iprot readFieldBegin.
      temp51 type = TType stop] whileFalse: [|temp52|
        temp51 id = 0 ifTrue: [
          temp52 := true.
          temp50 success: [|temp53 temp54| temp53 := iprot readListBegin.
            temp54 := OrderedCollection new.
            temp53 size timesRepeat: [
              temp54 add: iprot readI32].
            iprot readListEnd.
            temp54] value].
        temp52 ifNil: [iprot skip: temp51 type]].
      oprot readStructEnd.
      temp50] value.
    oprot readMessageEnd.
    oprot transport flush.
    res exception ifNotNil: [res exception signal].
    ^ res! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
recvTestMap
    | f msg res | 
    msg := oprot readMessageBegin.
    self validateRemoteMessage: msg.
    res := [|temp39 temp38|
      temp38 := TResult new.
      iprot readStructBegin.
      [temp39 := iprot readFieldBegin.
      temp39 type = TType stop] whileFalse: [|temp40|
        temp39 id = 0 ifTrue: [
          temp40 := true.
          temp38 success: [|temp41 temp42| 
            temp41 := iprot readMapBegin.
            temp42 := Dictionary new.
            temp41 size timesRepeat: [
              temp42 at: iprot readI32 put: iprot readI32].
            iprot readMapEnd.
            temp42] value].
        temp40 ifNil: [iprot skip: temp39 type]].
      oprot readStructEnd.
      temp38] value.
    oprot readMessageEnd.
    oprot transport flush.
    res exception ifNotNil: [res exception signal].
    ^ res! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
recvTestMapMap
    | f msg res | 
    msg := oprot readMessageBegin.
    self validateRemoteMessage: msg.
    res := [|temp62 temp61|
      temp61 := TResult new.
      iprot readStructBegin.
      [temp62 := iprot readFieldBegin.
      temp62 type = TType stop] whileFalse: [|temp63|
        temp62 id = 0 ifTrue: [
          temp63 := true.
          temp61 success: [|temp64 temp65| 
            temp64 := iprot readMapBegin.
            temp65 := Dictionary new.
            temp64 size timesRepeat: [
              temp65 at: iprot readI32 put: [|temp66 temp67| 
                temp66 := iprot readMapBegin.
                temp67 := Dictionary new.
                temp66 size timesRepeat: [
                  temp67 at: iprot readI32 put: iprot readI32].
                iprot readMapEnd.
                temp67] value].
            iprot readMapEnd.
            temp65] value].
        temp63 ifNil: [iprot skip: temp62 type]].
      oprot readStructEnd.
      temp61] value.
    oprot readMessageEnd.
    oprot transport flush.
    res exception ifNotNil: [res exception signal].
    ^ res! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
recvTestMulti
    | f msg res | 
    msg := oprot readMessageBegin.
    self validateRemoteMessage: msg.
    res := [|temp91 temp90|
      temp90 := TResult new.
      iprot readStructBegin.
      [temp91 := iprot readFieldBegin.
      temp91 type = TType stop] whileFalse: [|temp92|
        temp91 id = 0 ifTrue: [
          temp92 := true.
          temp90 success: [|temp94 temp93|
            temp93 := Xtruct new.
            iprot readStructBegin.
            [temp94 := iprot readFieldBegin.
            temp94 type = TType stop] whileFalse: [|temp95|
              temp94 id = 1 ifTrue: [
                temp95 := true.
                temp93 stringThing: iprot readString].
              temp94 id = 4 ifTrue: [
                temp95 := true.
                temp93 byteThing: iprot readByte].
              temp94 id = 9 ifTrue: [
                temp95 := true.
                temp93 i32Thing: iprot readI32].
              temp94 id = 11 ifTrue: [
                temp95 := true.
                temp93 i64Thing: iprot readI64].
              temp95 ifNil: [iprot skip: temp94 type]].
            oprot readStructEnd.
            temp93] value].
        temp92 ifNil: [iprot skip: temp91 type]].
      oprot readStructEnd.
      temp90] value.
    oprot readMessageEnd.
    oprot transport flush.
    res exception ifNotNil: [res exception signal].
    ^ res! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
recvTestMultiException
    | f msg res | 
    msg := oprot readMessageBegin.
    self validateRemoteMessage: msg.
    res := [|temp103 temp102|
      temp102 := TResult new.
      iprot readStructBegin.
      [temp103 := iprot readFieldBegin.
      temp103 type = TType stop] whileFalse: [|temp104|
        temp103 id = 0 ifTrue: [
          temp104 := true.
          temp102 success: [|temp106 temp105|
            temp105 := Xtruct new.
            iprot readStructBegin.
            [temp106 := iprot readFieldBegin.
            temp106 type = TType stop] whileFalse: [|temp107|
              temp106 id = 1 ifTrue: [
                temp107 := true.
                temp105 stringThing: iprot readString].
              temp106 id = 4 ifTrue: [
                temp107 := true.
                temp105 byteThing: iprot readByte].
              temp106 id = 9 ifTrue: [
                temp107 := true.
                temp105 i32Thing: iprot readI32].
              temp106 id = 11 ifTrue: [
                temp107 := true.
                temp105 i64Thing: iprot readI64].
              temp107 ifNil: [iprot skip: temp106 type]].
            oprot readStructEnd.
            temp105] value].
        temp103 id = -3 ifTrue: [
          temp104 := true.
          temp102 exception: [|temp109 temp108|
            temp108 := Xception new.
            iprot readStructBegin.
            [temp109 := iprot readFieldBegin.
            temp109 type = TType stop] whileFalse: [|temp110|
              temp109 id = 1 ifTrue: [
                temp110 := true.
                temp108 errorCode: iprot readI32].
              temp109 id = 2 ifTrue: [
                temp110 := true.
                temp108 message: iprot readString].
              temp110 ifNil: [iprot skip: temp109 type]].
            oprot readStructEnd.
            temp108] value].
        temp103 id = -4 ifTrue: [
          temp104 := true.
          temp102 exception: [|temp112 temp111|
            temp111 := Xception2 new.
            iprot readStructBegin.
            [temp112 := iprot readFieldBegin.
            temp112 type = TType stop] whileFalse: [|temp113|
              temp112 id = 1 ifTrue: [
                temp113 := true.
                temp111 errorCode: iprot readI32].
              temp112 id = 2 ifTrue: [
                temp113 := true.
                temp111 structThing: [|temp115 temp114|
                  temp114 := Xtruct new.
                  iprot readStructBegin.
                  [temp115 := iprot readFieldBegin.
                  temp115 type = TType stop] whileFalse: [|temp116|
                    temp115 id = 1 ifTrue: [
                      temp116 := true.
                      temp114 stringThing: iprot readString].
                    temp115 id = 4 ifTrue: [
                      temp116 := true.
                      temp114 byteThing: iprot readByte].
                    temp115 id = 9 ifTrue: [
                      temp116 := true.
                      temp114 i32Thing: iprot readI32].
                    temp115 id = 11 ifTrue: [
                      temp116 := true.
                      temp114 i64Thing: iprot readI64].
                    temp116 ifNil: [iprot skip: temp115 type]].
                  oprot readStructEnd.
                  temp114] value].
              temp113 ifNil: [iprot skip: temp112 type]].
            oprot readStructEnd.
            temp111] value].
        temp104 ifNil: [iprot skip: temp103 type]].
      oprot readStructEnd.
      temp102] value.
    oprot readMessageEnd.
    oprot transport flush.
    res exception ifNotNil: [res exception signal].
    ^ res! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
recvTestNest
    | f msg res | 
    msg := oprot readMessageBegin.
    self validateRemoteMessage: msg.
    res := [|temp28 temp27|
      temp27 := TResult new.
      iprot readStructBegin.
      [temp28 := iprot readFieldBegin.
      temp28 type = TType stop] whileFalse: [|temp29|
        temp28 id = 0 ifTrue: [
          temp29 := true.
          temp27 success: [|temp31 temp30|
            temp30 := Xtruct2 new.
            iprot readStructBegin.
            [temp31 := iprot readFieldBegin.
            temp31 type = TType stop] whileFalse: [|temp32|
              temp31 id = 1 ifTrue: [
                temp32 := true.
                temp30 byteThing: iprot readByte].
              temp31 id = 2 ifTrue: [
                temp32 := true.
                temp30 structThing: [|temp34 temp33|
                  temp33 := Xtruct new.
                  iprot readStructBegin.
                  [temp34 := iprot readFieldBegin.
                  temp34 type = TType stop] whileFalse: [|temp35|
                    temp34 id = 1 ifTrue: [
                      temp35 := true.
                      temp33 stringThing: iprot readString].
                    temp34 id = 4 ifTrue: [
                      temp35 := true.
                      temp33 byteThing: iprot readByte].
                    temp34 id = 9 ifTrue: [
                      temp35 := true.
                      temp33 i32Thing: iprot readI32].
                    temp34 id = 11 ifTrue: [
                      temp35 := true.
                      temp33 i64Thing: iprot readI64].
                    temp35 ifNil: [iprot skip: temp34 type]].
                  oprot readStructEnd.
                  temp33] value].
              temp31 id = 3 ifTrue: [
                temp32 := true.
                temp30 i32Thing: iprot readI32].
              temp32 ifNil: [iprot skip: temp31 type]].
            oprot readStructEnd.
            temp30] value].
        temp29 ifNil: [iprot skip: temp28 type]].
      oprot readStructEnd.
      temp27] value.
    oprot readMessageEnd.
    oprot transport flush.
    res exception ifNotNil: [res exception signal].
    ^ res! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
recvTestSet
    | f msg res | 
    msg := oprot readMessageBegin.
    self validateRemoteMessage: msg.
    res := [|temp45 temp44|
      temp44 := TResult new.
      iprot readStructBegin.
      [temp45 := iprot readFieldBegin.
      temp45 type = TType stop] whileFalse: [|temp46|
        temp45 id = 0 ifTrue: [
          temp46 := true.
          temp44 success: [|temp47 temp48| temp47 := iprot readSetBegin.
            temp48 := Set new.
            temp47 size timesRepeat: [
              temp48 add: iprot readI32].
            iprot readSetEnd.
            temp48] value].
        temp46 ifNil: [iprot skip: temp45 type]].
      oprot readStructEnd.
      temp44] value.
    oprot readMessageEnd.
    oprot transport flush.
    res exception ifNotNil: [res exception signal].
    ^ res! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
recvTestString
    | f msg res | 
    msg := oprot readMessageBegin.
    self validateRemoteMessage: msg.
    res := [|temp4 temp3|
      temp3 := TResult new.
      iprot readStructBegin.
      [temp4 := iprot readFieldBegin.
      temp4 type = TType stop] whileFalse: [|temp5|
        temp4 id = 0 ifTrue: [
          temp5 := true.
          temp3 success: iprot readString].
        temp5 ifNil: [iprot skip: temp4 type]].
      oprot readStructEnd.
      temp3] value.
    oprot readMessageEnd.
    oprot transport flush.
    res exception ifNotNil: [res exception signal].
    ^ res! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
recvTestStruct
    | f msg res | 
    msg := oprot readMessageBegin.
    self validateRemoteMessage: msg.
    res := [|temp22 temp21|
      temp21 := TResult new.
      iprot readStructBegin.
      [temp22 := iprot readFieldBegin.
      temp22 type = TType stop] whileFalse: [|temp23|
        temp22 id = 0 ifTrue: [
          temp23 := true.
          temp21 success: [|temp25 temp24|
            temp24 := Xtruct new.
            iprot readStructBegin.
            [temp25 := iprot readFieldBegin.
            temp25 type = TType stop] whileFalse: [|temp26|
              temp25 id = 1 ifTrue: [
                temp26 := true.
                temp24 stringThing: iprot readString].
              temp25 id = 4 ifTrue: [
                temp26 := true.
                temp24 byteThing: iprot readByte].
              temp25 id = 9 ifTrue: [
                temp26 := true.
                temp24 i32Thing: iprot readI32].
              temp25 id = 11 ifTrue: [
                temp26 := true.
                temp24 i64Thing: iprot readI64].
              temp26 ifNil: [iprot skip: temp25 type]].
            oprot readStructEnd.
            temp24] value].
        temp23 ifNil: [iprot skip: temp22 type]].
      oprot readStructEnd.
      temp21] value.
    oprot readMessageEnd.
    oprot transport flush.
    res exception ifNotNil: [res exception signal].
    ^ res! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
recvTestTypedef
    | f msg res | 
    msg := oprot readMessageBegin.
    self validateRemoteMessage: msg.
    res := [|temp59 temp58|
      temp58 := TResult new.
      iprot readStructBegin.
      [temp59 := iprot readFieldBegin.
      temp59 type = TType stop] whileFalse: [|temp60|
        temp59 id = 0 ifTrue: [
          temp60 := true.
          temp58 success: iprot readI64].
        temp60 ifNil: [iprot skip: temp59 type]].
      oprot readStructEnd.
      temp58] value.
    oprot readMessageEnd.
    oprot transport flush.
    res exception ifNotNil: [res exception signal].
    ^ res! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
recvTestVoid
    | f msg res | 
    msg := oprot readMessageBegin.
    self validateRemoteMessage: msg.
    res := [|temp1 temp0|
      temp0 := TResult new.
      iprot readStructBegin.
      [temp1 := iprot readFieldBegin.
      temp1 type = TType stop] whileFalse: [|temp2|
        temp1 id = 0 ifTrue: [
          temp2 := true.
          temp0 success: iprot readVoid].
        temp2 ifNil: [iprot skip: temp1 type]].
      oprot readStructEnd.
      temp0] value.
    oprot readMessageEnd.
    oprot transport flush.
    res exception ifNotNil: [res exception signal].
    ^ res! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
sendTestByteThing: thing
    oprot writeMessageBegin:
      (TCallMessage new
        name: 'testByte'; 
        seqid: self nextSeqid).
    oprot writeStructBegin: (TStruct new name: 'TestByte_args').
    oprot writeFieldBegin: (TField new name: 'thing'; type: TType byte; id: 1).
    iprot writeByte: thing asInteger.
    oprot writeFieldEnd.
    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
    oprot transport flush! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
sendTestDoubleThing: thing
    oprot writeMessageBegin:
      (TCallMessage new
        name: 'testDouble'; 
        seqid: self nextSeqid).
    oprot writeStructBegin: (TStruct new name: 'TestDouble_args').
    oprot writeFieldBegin: (TField new name: 'thing'; type: TType double; id: 1).
    iprot writeDouble: thing asFloat.
    oprot writeFieldEnd.
    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
    oprot transport flush! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
sendTestEnumThing: thing
    oprot writeMessageBegin:
      (TCallMessage new
        name: 'testEnum'; 
        seqid: self nextSeqid).
    oprot writeStructBegin: (TStruct new name: 'TestEnum_args').
    oprot writeFieldBegin: (TField new name: 'thing'; type: TType i32; id: 1).
    iprot writeI32: thing.
    oprot writeFieldEnd.
    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
    oprot transport flush! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
sendTestExceptionArg: arg
    oprot writeMessageBegin:
      (TCallMessage new
        name: 'testException'; 
        seqid: self nextSeqid).
    oprot writeStructBegin: (TStruct new name: 'TestException_args').
    oprot writeFieldBegin: (TField new name: 'arg'; type: TType string; id: -1).
    iprot writeString: arg.
    oprot writeFieldEnd.
    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
    oprot transport flush! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
sendTestI16Thing: thing
    oprot writeMessageBegin:
      (TCallMessage new
        name: 'testI16'; 
        seqid: self nextSeqid).
    oprot writeStructBegin: (TStruct new name: 'TestI16_args').
    oprot writeFieldBegin: (TField new name: 'thing'; type: TType i16; id: 1).
    iprot writeI16: thing asInteger.
    oprot writeFieldEnd.
    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
    oprot transport flush! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
sendTestI32Thing: thing
    oprot writeMessageBegin:
      (TCallMessage new
        name: 'testI32'; 
        seqid: self nextSeqid).
    oprot writeStructBegin: (TStruct new name: 'TestI32_args').
    oprot writeFieldBegin: (TField new name: 'thing'; type: TType i32; id: 1).
    iprot writeI32: thing asInteger.
    oprot writeFieldEnd.
    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
    oprot transport flush! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
sendTestI64Thing: thing
    oprot writeMessageBegin:
      (TCallMessage new
        name: 'testI64'; 
        seqid: self nextSeqid).
    oprot writeStructBegin: (TStruct new name: 'TestI64_args').
    oprot writeFieldBegin: (TField new name: 'thing'; type: TType i64; id: 1).
    iprot writeI64: thing asInteger.
    oprot writeFieldEnd.
    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
    oprot transport flush! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
sendTestInsanityArgument: argument
    oprot writeMessageBegin:
      (TCallMessage new
        name: 'testInsanity'; 
        seqid: self nextSeqid).
    oprot writeStructBegin: (TStruct new name: 'TestInsanity_args').
    oprot writeFieldBegin: (TField new name: 'argument'; type: TType struct; id: 1).
    [oprot writeStructBegin: (TStruct new name: 'Insanity').
      oprot writeFieldBegin: (TField new name: 'userMap'; type: TType map; id: 1).
      [oprot writeMapBegin: (TMap new keyType: TType i32; valueType: TType i64; size: argument userMap size).
        argument userMap keysAndValuesDo: [:temp68 :temp69 |
          iprot writeI32: temp68.
          iprot writeI64: temp69 asInteger].
        oprot writeMapEnd] value.
      oprot writeFieldEnd.
      oprot writeFieldBegin: (TField new name: 'xtructs'; type: TType list; id: 2).
      [oprot writeListBegin: (TList new elemType: TType struct; size: argument xtructs size).
        argument xtructs do: [:temp70|
          [oprot writeStructBegin: (TStruct new name: 'Xtruct').
            oprot writeFieldBegin: (TField new name: 'string_thing'; type: TType string; id: 1).
            iprot writeString: temp70 stringThing.
            oprot writeFieldEnd.
            oprot writeFieldBegin: (TField new name: 'byte_thing'; type: TType byte; id: 4).
            iprot writeByte: temp70 byteThing asInteger.
            oprot writeFieldEnd.
            oprot writeFieldBegin: (TField new name: 'i32_thing'; type: TType i32; id: 9).
            iprot writeI32: temp70 i32Thing asInteger.
            oprot writeFieldEnd.
            oprot writeFieldBegin: (TField new name: 'i64_thing'; type: TType i64; id: 11).
            iprot writeI64: temp70 i64Thing asInteger.
            oprot writeFieldEnd.
            oprot writeFieldStop; writeStructEnd] value
].
        oprot writeListEnd] value.
      oprot writeFieldEnd.
      oprot writeFieldStop; writeStructEnd] value.
    oprot writeFieldEnd.
    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
    oprot transport flush! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
sendTestListThing: thing
    oprot writeMessageBegin:
      (TCallMessage new
        name: 'testList'; 
        seqid: self nextSeqid).
    oprot writeStructBegin: (TStruct new name: 'TestList_args').
    oprot writeFieldBegin: (TField new name: 'thing'; type: TType list; id: 1).
    [oprot writeListBegin: (TList new elemType: TType i32; size: thing size).
      thing do: [:temp49|
        iprot writeI32: temp49 asInteger
].
      oprot writeListEnd] value.
    oprot writeFieldEnd.
    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
    oprot transport flush! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
sendTestMapMapHello: hello
    oprot writeMessageBegin:
      (TCallMessage new
        name: 'testMapMap'; 
        seqid: self nextSeqid).
    oprot writeStructBegin: (TStruct new name: 'TestMapMap_args').
    oprot writeFieldBegin: (TField new name: 'hello'; type: TType i32; id: 1).
    iprot writeI32: hello asInteger.
    oprot writeFieldEnd.
    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
    oprot transport flush! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
sendTestMapThing: thing
    oprot writeMessageBegin:
      (TCallMessage new
        name: 'testMap'; 
        seqid: self nextSeqid).
    oprot writeStructBegin: (TStruct new name: 'TestMap_args').
    oprot writeFieldBegin: (TField new name: 'thing'; type: TType map; id: 1).
    [oprot writeMapBegin: (TMap new keyType: TType i32; valueType: TType i32; size: thing size).
      thing keysAndValuesDo: [:temp36 :temp37 |
        iprot writeI32: temp36 asInteger.
        iprot writeI32: temp37 asInteger].
      oprot writeMapEnd] value.
    oprot writeFieldEnd.
    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
    oprot transport flush! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
sendTestMultiArg0: arg0 arg1: arg1 arg2: arg2 arg3: arg3 arg4: arg4 arg5: arg5
    oprot writeMessageBegin:
      (TCallMessage new
        name: 'testMulti'; 
        seqid: self nextSeqid).
    oprot writeStructBegin: (TStruct new name: 'TestMulti_args').
    oprot writeFieldBegin: (TField new name: 'arg0'; type: TType byte; id: -1).
    iprot writeByte: arg0 asInteger.
    oprot writeFieldEnd.
    oprot writeFieldBegin: (TField new name: 'arg1'; type: TType i32; id: -2).
    iprot writeI32: arg1 asInteger.
    oprot writeFieldEnd.
    oprot writeFieldBegin: (TField new name: 'arg2'; type: TType i64; id: -3).
    iprot writeI64: arg2 asInteger.
    oprot writeFieldEnd.
    oprot writeFieldBegin: (TField new name: 'arg3'; type: TType map; id: -4).
    [oprot writeMapBegin: (TMap new keyType: TType i16; valueType: TType string; size: arg3 size).
      arg3 keysAndValuesDo: [:temp88 :temp89 |
        iprot writeI16: temp88 asInteger.
        iprot writeString: temp89].
      oprot writeMapEnd] value.
    oprot writeFieldEnd.
    oprot writeFieldBegin: (TField new name: 'arg4'; type: TType i32; id: -5).
    iprot writeI32: arg4.
    oprot writeFieldEnd.
    oprot writeFieldBegin: (TField new name: 'arg5'; type: TType i64; id: -6).
    iprot writeI64: arg5 asInteger.
    oprot writeFieldEnd.
    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
    oprot transport flush! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
sendTestMultiExceptionArg0: arg0 arg1: arg1
    oprot writeMessageBegin:
      (TCallMessage new
        name: 'testMultiException'; 
        seqid: self nextSeqid).
    oprot writeStructBegin: (TStruct new name: 'TestMultiException_args').
    oprot writeFieldBegin: (TField new name: 'arg0'; type: TType string; id: -1).
    iprot writeString: arg0.
    oprot writeFieldEnd.
    oprot writeFieldBegin: (TField new name: 'arg1'; type: TType string; id: -2).
    iprot writeString: arg1.
    oprot writeFieldEnd.
    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
    oprot transport flush! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
sendTestNestThing: thing
    oprot writeMessageBegin:
      (TCallMessage new
        name: 'testNest'; 
        seqid: self nextSeqid).
    oprot writeStructBegin: (TStruct new name: 'TestNest_args').
    oprot writeFieldBegin: (TField new name: 'thing'; type: TType struct; id: 1).
    [oprot writeStructBegin: (TStruct new name: 'Xtruct2').
      oprot writeFieldBegin: (TField new name: 'byte_thing'; type: TType byte; id: 1).
      iprot writeByte: thing byteThing asInteger.
      oprot writeFieldEnd.
      oprot writeFieldBegin: (TField new name: 'struct_thing'; type: TType struct; id: 2).
      [oprot writeStructBegin: (TStruct new name: 'Xtruct').
        oprot writeFieldBegin: (TField new name: 'string_thing'; type: TType string; id: 1).
        iprot writeString: thing structThing stringThing.
        oprot writeFieldEnd.
        oprot writeFieldBegin: (TField new name: 'byte_thing'; type: TType byte; id: 4).
        iprot writeByte: thing structThing byteThing asInteger.
        oprot writeFieldEnd.
        oprot writeFieldBegin: (TField new name: 'i32_thing'; type: TType i32; id: 9).
        iprot writeI32: thing structThing i32Thing asInteger.
        oprot writeFieldEnd.
        oprot writeFieldBegin: (TField new name: 'i64_thing'; type: TType i64; id: 11).
        iprot writeI64: thing structThing i64Thing asInteger.
        oprot writeFieldEnd.
        oprot writeFieldStop; writeStructEnd] value.
      oprot writeFieldEnd.
      oprot writeFieldBegin: (TField new name: 'i32_thing'; type: TType i32; id: 3).
      iprot writeI32: thing i32Thing asInteger.
      oprot writeFieldEnd.
      oprot writeFieldStop; writeStructEnd] value.
    oprot writeFieldEnd.
    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
    oprot transport flush! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
sendTestSetThing: thing
    oprot writeMessageBegin:
      (TCallMessage new
        name: 'testSet'; 
        seqid: self nextSeqid).
    oprot writeStructBegin: (TStruct new name: 'TestSet_args').
    oprot writeFieldBegin: (TField new name: 'thing'; type: TType set; id: 1).
    [oprot writeSetBegin: (TSet new elemType: TType i32; size: thing size).
      thing do: [:temp43|
        iprot writeI32: temp43 asInteger
].
      oprot writeSetEnd] value.
    oprot writeFieldEnd.
    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
    oprot transport flush! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
sendTestStringThing: thing
    oprot writeMessageBegin:
      (TCallMessage new
        name: 'testString'; 
        seqid: self nextSeqid).
    oprot writeStructBegin: (TStruct new name: 'TestString_args').
    oprot writeFieldBegin: (TField new name: 'thing'; type: TType string; id: 1).
    iprot writeString: thing.
    oprot writeFieldEnd.
    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
    oprot transport flush! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
sendTestStructThing: thing
    oprot writeMessageBegin:
      (TCallMessage new
        name: 'testStruct'; 
        seqid: self nextSeqid).
    oprot writeStructBegin: (TStruct new name: 'TestStruct_args').
    oprot writeFieldBegin: (TField new name: 'thing'; type: TType struct; id: 1).
    [oprot writeStructBegin: (TStruct new name: 'Xtruct').
      oprot writeFieldBegin: (TField new name: 'string_thing'; type: TType string; id: 1).
      iprot writeString: thing stringThing.
      oprot writeFieldEnd.
      oprot writeFieldBegin: (TField new name: 'byte_thing'; type: TType byte; id: 4).
      iprot writeByte: thing byteThing asInteger.
      oprot writeFieldEnd.
      oprot writeFieldBegin: (TField new name: 'i32_thing'; type: TType i32; id: 9).
      iprot writeI32: thing i32Thing asInteger.
      oprot writeFieldEnd.
      oprot writeFieldBegin: (TField new name: 'i64_thing'; type: TType i64; id: 11).
      iprot writeI64: thing i64Thing asInteger.
      oprot writeFieldEnd.
      oprot writeFieldStop; writeStructEnd] value.
    oprot writeFieldEnd.
    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
    oprot transport flush! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
sendTestTypedefThing: thing
    oprot writeMessageBegin:
      (TCallMessage new
        name: 'testTypedef'; 
        seqid: self nextSeqid).
    oprot writeStructBegin: (TStruct new name: 'TestTypedef_args').
    oprot writeFieldBegin: (TField new name: 'thing'; type: TType i64; id: 1).
    iprot writeI64: thing asInteger.
    oprot writeFieldEnd.
    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
    oprot transport flush! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
sendTestVoid
    oprot writeMessageBegin:
      (TCallMessage new
        name: 'testVoid'; 
        seqid: self nextSeqid).
    oprot writeStructBegin: (TStruct new name: 'TestVoid_args').
    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
    oprot transport flush! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
testByteThing: thing
    "thing: byte"
    self sendTestByteThing: thing.
    ^ self recvTestByte success 
! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
testDoubleThing: thing
    "thing: double"
    self sendTestDoubleThing: thing.
    ^ self recvTestDouble success 
! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
testEnumThing: thing
    "thing: Numberz"
    self sendTestEnumThing: thing.
    ^ self recvTestEnum success 
! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
testExceptionArg: arg
    "arg: string"
    self sendTestExceptionArg: arg.
    ^ self recvTestException success 
! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
testI16Thing: thing
    "thing: i16"
    self sendTestI16Thing: thing.
    ^ self recvTestI16 success 
! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
testI32Thing: thing
    "thing: i32"
    self sendTestI32Thing: thing.
    ^ self recvTestI32 success 
! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
testI64Thing: thing
    "thing: i64"
    self sendTestI64Thing: thing.
    ^ self recvTestI64 success 
! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
testInsanityArgument: argument
    "argument: Insanity"
    self sendTestInsanityArgument: argument.
    ^ self recvTestInsanity success 
! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
testListThing: thing
    "thing: "
    self sendTestListThing: thing.
    ^ self recvTestList success 
! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
testMapMapHello: hello
    "hello: i32"
    self sendTestMapMapHello: hello.
    ^ self recvTestMapMap success 
! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
testMapThing: thing
    "thing: "
    self sendTestMapThing: thing.
    ^ self recvTestMap success 
! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
testMultiArg0: arg0 arg1: arg1 arg2: arg2 arg3: arg3 arg4: arg4 arg5: arg5
    "arg0: byte, arg1: i32, arg2: i64, arg3: , arg4: Numberz, arg5: UserId"
    self sendTestMultiArg0: arg0 arg1: arg1 arg2: arg2 arg3: arg3 arg4: arg4 arg5: arg5.
    ^ self recvTestMulti success 
! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
testMultiExceptionArg0: arg0 arg1: arg1
    "arg0: string, arg1: string"
    self sendTestMultiExceptionArg0: arg0 arg1: arg1.
    ^ self recvTestMultiException success 
! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
testNestThing: thing
    "thing: Xtruct2"
    self sendTestNestThing: thing.
    ^ self recvTestNest success 
! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
testSetThing: thing
    "thing: "
    self sendTestSetThing: thing.
    ^ self recvTestSet success 
! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
testStringThing: thing
    "thing: string"
    self sendTestStringThing: thing.
    ^ self recvTestString success 
! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
testStructThing: thing
    "thing: Xtruct"
    self sendTestStructThing: thing.
    ^ self recvTestStruct success 
! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
testTypedefThing: thing
    "thing: UserId"
    self sendTestTypedefThing: thing.
    ^ self recvTestTypedef success 
! !

!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
testVoid
    ""
    self sendTestVoid.
    ^ self recvTestVoid success 
! !

Object subclass: #TField
	instanceVariableNames: 'name type id'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Thrift-Protocol'!

!TField methodsFor: 'accessing' stamp: 'pc 10/24/2007 20:05'!
id
	^ id ifNil: [0]! !

!TField methodsFor: 'accessing' stamp: 'pc 10/24/2007 19:44'!
id: anInteger
	id := anInteger! !

!TField methodsFor: 'accessing' stamp: 'pc 10/24/2007 20:04'!
name
	^ name ifNil: ['']! !

!TField methodsFor: 'accessing' stamp: 'pc 10/24/2007 19:44'!
name: anObject
	name := anObject! !

!TField methodsFor: 'accessing' stamp: 'pc 10/24/2007 20:05'!
type
	^ type ifNil: [TType stop]! !

!TField methodsFor: 'accessing' stamp: 'pc 10/24/2007 19:44'!
type: anInteger
	type := anInteger! !

Object subclass: #TMessage
	instanceVariableNames: 'name seqid type'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Thrift-Protocol'!

TMessage subclass: #TCallMessage
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Thrift-Protocol'!

!TCallMessage methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 22:53'!
type
	^ 1! !

!TMessage methodsFor: 'accessing' stamp: 'pc 10/24/2007 20:05'!
name
	^ name ifNil: ['']! !

!TMessage methodsFor: 'accessing' stamp: 'pc 10/24/2007 19:35'!
name: aString
	name := aString! !

!TMessage methodsFor: 'accessing' stamp: 'pc 10/24/2007 20:05'!
seqid
	^ seqid ifNil: [0]! !

!TMessage methodsFor: 'accessing' stamp: 'pc 10/24/2007 19:35'!
seqid: anInteger
	seqid := anInteger! !

!TMessage methodsFor: 'accessing' stamp: 'pc 10/24/2007 20:06'!
type
	^ type ifNil: [0]! !

!TMessage methodsFor: 'accessing' stamp: 'pc 10/24/2007 19:35'!
type: anInteger
	type := anInteger! !

Object subclass: #TProtocol
	instanceVariableNames: 'transport'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Thrift-Protocol'!

TProtocol subclass: #TBinaryProtocol
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Thrift-Protocol'!

!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 11/1/2007 04:24'!
intFromByteArray: buf
	| vals |
	vals := Array new: buf size.
	1 to: buf size do: [:n | vals at: n put: ((buf at: n) bitShift: (buf size - n) * 8)].
	^ vals sum! !

!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 18:46'!
readBool
	^ self readByte isZero not! !

!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 10/25/2007 00:02'!
readByte
	^ (self transport read: 1) first! !

!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 10/28/2007 16:24'!
readDouble
	| val |
	val := Float new: 2.
	^ val basicAt: 1 put: (self readRawInt: 4);
		basicAt: 2 put: (self readRawInt: 4);
		yourself! !

!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 20:02'!
readFieldBegin
	| field |
	field := TField new type: self readByte.
	
	^ field type = TType stop
		ifTrue: [field]
		ifFalse: [field id: self readI16; yourself]! !

!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:15'!
readI16
	^ self readInt: 2! !

!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:20'!
readI32
	^ self readInt: 4! !

!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:20'!
readI64
	^ self readInt: 8! !

!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 11/1/2007 02:35'!
readInt: size
	| buf val |
	buf := transport read: size.
	val := self intFromByteArray: buf.
	^ buf first > 16r7F
		ifTrue: [self unsignedInt: val size: size]
		ifFalse: [val]! !

!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:57'!
readListBegin
	^ TList new
		elemType: self readByte;
		size: self readI32! !

!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:58'!
readMapBegin
	^ TMap new
		keyType: self readByte;
		valueType: self readByte;
		size: self readI32! !

!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 11/1/2007 04:22'!
readMessageBegin
	| version |
	version := self readI32.
	
	(version bitAnd: self versionMask) = self version1
		ifFalse: [TProtocolError signalWithCode: TProtocolError badVersion].
		
	^ TMessage new
		type: (version bitAnd: 16r000000FF);
		name: self readString;
		seqid: self readI32! !

!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 10/28/2007 16:24'!
readRawInt: size
	^ self intFromByteArray: (transport read: size)! !

!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 11/1/2007 00:59'!
readSetBegin
	"element type, size"
	^ TSet new
		elemType: self readByte;
		size: self readI32! !

!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 10/26/2007 04:48'!
readString
	^ (transport read: self readI32) asString! !

!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 11/1/2007 04:22'!
unsignedInt: val size: size
	^ 0 - ((val - 1) bitXor: ((2 raisedTo: (size * 8)) - 1))! !

!TBinaryProtocol methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 22:13'!
version1
	^ 16r80010000 ! !

!TBinaryProtocol methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 18:01'!
versionMask
	^ 16rFFFF0000! !

!TBinaryProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 18:35'!
write: aString
	transport write: aString! !

!TBinaryProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:23'!
writeBool: bool
	bool ifTrue: [self writeByte: 1]
		ifFalse: [self writeByte: 0]! !

!TBinaryProtocol methodsFor: 'writing' stamp: 'pc 10/26/2007 09:31'!
writeByte: aNumber
	aNumber > 16rFF ifTrue: [TError signal: 'writeByte too big'].
	transport write: (Array with: aNumber)! !

!TBinaryProtocol methodsFor: 'writing' stamp: 'pc 10/28/2007 16:16'!
writeDouble: aDouble
	self writeI32: (aDouble basicAt: 1);
		writeI32: (aDouble basicAt: 2)! !

!TBinaryProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:56'!
writeField: aField
	self writeByte: aField type;
		writeI16: aField id! !

!TBinaryProtocol methodsFor: 'writing' stamp: 'pc 10/25/2007 00:01'!
writeFieldBegin: aField
	self writeByte: aField type.
	self writeI16: aField id! !

!TBinaryProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 18:04'!
writeFieldStop
	self writeByte: TType stop! !

!TBinaryProtocol methodsFor: 'writing' stamp: 'pc 11/1/2007 02:06'!
writeI16: i16
	self writeInt: i16 size: 2! !

!TBinaryProtocol methodsFor: 'writing' stamp: 'pc 11/1/2007 02:06'!
writeI32: i32
	self writeInt: i32 size: 4! !

!TBinaryProtocol methodsFor: 'writing' stamp: 'pc 11/1/2007 02:06'!
writeI64: i64
	self writeInt: i64 size: 8! !

!TBinaryProtocol methodsFor: 'writing' stamp: 'pc 11/1/2007 04:23'!
writeInt: val size: size
	1 to: size do: [:n | self writeByte: ((val bitShift: (size negated + n) * 8) bitAnd: 16rFF)]! !

!TBinaryProtocol methodsFor: 'writing' stamp: 'pc 11/1/2007 00:48'!
writeListBegin: aList
	self writeByte: aList elemType; writeI32: aList size! !

!TBinaryProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:55'!
writeMapBegin: aMap
	self writeByte: aMap keyType;
		writeByte: aMap valueType;
		writeI32: aMap size! !

!TBinaryProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 20:36'!
writeMessageBegin: msg
	self writeI32: (self version1 bitOr: msg type);
		writeString: msg name;
		writeI32: msg seqid! !

!TBinaryProtocol methodsFor: 'writing' stamp: 'pc 11/1/2007 00:56'!
writeSetBegin: aSet
	self writeByte: aSet elemType; writeI32: aSet size! !

!TBinaryProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 18:35'!
writeString: aString
	self writeI32: aString size;
		write: aString! !

!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
readBool! !

!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
readByte! !

!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
readDouble! !

!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
readFieldBegin! !

!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
readFieldEnd! !

!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
readI16! !

!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
readI32! !

!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
readI64! !

!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
readListBegin! !

!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
readListEnd! !

!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
readMapBegin! !

!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
readMapEnd! !

!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:39'!
readMessageBegin! !

!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:39'!
readMessageEnd! !

!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
readSetBegin! !

!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
readSetEnd! !

!TProtocol methodsFor: 'reading' stamp: 'pc 10/25/2007 16:10'!
readSimpleType: aType
	aType = TType bool ifTrue: [^ self readBool].
	aType = TType byte ifTrue: [^ self readByte].
	aType = TType double ifTrue: [^ self readDouble].
	aType = TType i16 ifTrue: [^ self readI16].
	aType = TType i32 ifTrue: [^ self readI32].
	aType = TType i64 ifTrue: [^ self readI64].
	aType = TType list ifTrue: [^ self readBool].! !

!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
readString! !

!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
readStructBegin
	! !

!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
readStructEnd! !

!TProtocol methodsFor: 'reading' stamp: 'pc 10/26/2007 21:34'!
skip: aType
	aType = TType stop ifTrue: [^ self].
	aType = TType bool ifTrue: [^ self readBool].
	aType = TType byte ifTrue: [^ self readByte].
	aType = TType i16 ifTrue: [^ self readI16].
	aType = TType i32 ifTrue: [^ self readI32].
	aType = TType i64 ifTrue: [^ self readI64].
	aType = TType string ifTrue: [^ self readString].
	aType = TType double ifTrue: [^ self readDouble].
	aType = TType struct ifTrue:
		[| field |
		self readStructBegin.
		[(field := self readFieldBegin) type = TType stop] whileFalse:
			[self skip: field type. self readFieldEnd].
		^ self readStructEnd].
	aType = TType map ifTrue:
		[| map |
		map := self readMapBegin.
		map size timesRepeat: [self skip: map keyType. self skip: map valueType].
		^ self readMapEnd].
	aType = TType list ifTrue:
		[| list |
		list := self readListBegin.
		list size timesRepeat: [self skip: list elemType].
		^ self readListEnd].
	aType = TType set ifTrue:
		[| set |
		set := self readSetBegin.
		set size timesRepeat: [self skip: set elemType].
		^ self readSetEnd].
	
	self error: 'Unknown type'! !

!TProtocol methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 23:02'!
transport
	^ transport! !

!TProtocol methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:28'!
transport: aTransport
	transport := aTransport! !

!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:37'!
writeBool: aBool! !

!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:37'!
writeByte: aByte! !

!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:38'!
writeDouble: aFloat! !

!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:38'!
writeFieldBegin: aField! !

!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:37'!
writeFieldEnd! !

!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:37'!
writeFieldStop! !

!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:37'!
writeI16: i16! !

!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:37'!
writeI32: i32! !

!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:37'!
writeI64: i64! !

!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:39'!
writeListBegin: aList! !

!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:37'!
writeListEnd! !

!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:39'!
writeMapBegin: aMap! !

!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:37'!
writeMapEnd! !

!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:36'!
writeMessageBegin! !

!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:36'!
writeMessageEnd! !

!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:39'!
writeSetBegin: aSet! !

!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:37'!
writeSetEnd! !

!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:38'!
writeString: aString! !

!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:38'!
writeStructBegin: aStruct! !

!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:37'!
writeStructEnd! !

Object subclass: #TResult
	instanceVariableNames: 'success oprot iprot exception'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Thrift'!

!TResult methodsFor: 'as yet unclassified' stamp: 'pc 10/26/2007 21:35'!
exception
	^ exception! !

!TResult methodsFor: 'as yet unclassified' stamp: 'pc 10/26/2007 21:35'!
exception: anError
	exception := anError! !

!TResult methodsFor: 'as yet unclassified' stamp: 'pc 10/26/2007 14:43'!
success
	^ success! !

!TResult methodsFor: 'as yet unclassified' stamp: 'pc 10/26/2007 14:43'!
success: anObject
	success := anObject! !

Object subclass: #TSizedObject
	instanceVariableNames: 'size'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Thrift-Protocol'!

TSizedObject subclass: #TList
	instanceVariableNames: 'elemType'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Thrift-Protocol'!

!TList methodsFor: 'accessing' stamp: 'pc 10/24/2007 20:04'!
elemType
	^ elemType ifNil: [TType stop]! !

!TList methodsFor: 'accessing' stamp: 'pc 10/24/2007 19:42'!
elemType: anInteger
	elemType := anInteger! !

TList subclass: #TSet
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Thrift-Protocol'!

TSizedObject subclass: #TMap
	instanceVariableNames: 'keyType valueType'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Thrift-Protocol'!

!TMap methodsFor: 'accessing' stamp: 'pc 10/24/2007 20:04'!
keyType
	^ keyType ifNil: [TType stop]! !

!TMap methodsFor: 'accessing' stamp: 'pc 10/24/2007 19:45'!
keyType: anInteger
	keyType := anInteger! !

!TMap methodsFor: 'accessing' stamp: 'pc 10/24/2007 20:04'!
valueType
	^ valueType ifNil: [TType stop]! !

!TMap methodsFor: 'accessing' stamp: 'pc 10/24/2007 19:45'!
valueType: anInteger
	valueType := anInteger! !

!TSizedObject methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 20:03'!
size
	^ size ifNil: [0]! !

!TSizedObject methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 20:06'!
size: anInteger
	size := anInteger! !

Object subclass: #TSocket
	instanceVariableNames: 'host port stream'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Thrift-Transport'!

!TSocket methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 22:34'!
close
	self isOpen ifTrue: [stream close]! !

!TSocket methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 22:23'!
connect
	^ (self socketStream openConnectionToHost:
		(NetNameResolver addressForName: host) port: port)
			timeout: 180;
			binary;
			yourself! !

!TSocket methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 20:35'!
flush
	stream flush! !

!TSocket methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:08'!
host: aString
	host := aString! !

!TSocket methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 20:34'!
isOpen
	^ stream isNil not
		and: [stream socket isConnected]
		and: [stream socket isOtherEndClosed not]! !

!TSocket methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 22:22'!
open
	stream := self connect! !

!TSocket methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:09'!
port: anInteger
	port := anInteger! !

!TSocket methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:17'!
read: size
	| data |
	[data := stream next: size.
	data isEmpty ifTrue: [TTransportError signal: 'Could not read ', size asString, ' bytes'].
	^ data]
		on: ConnectionClosed
		do: [TTransportClosedError signal]! !

!TSocket methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 22:18'!
socketStream
	^ Smalltalk at: #FastSocketStream ifAbsent: [SocketStream] ! !

!TSocket methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 22:17'!
write: aCollection
	[stream nextPutAll: aCollection]
		on: ConnectionClosed
		do: [TTransportClosedError signal]! !

Object subclass: #TStruct
	instanceVariableNames: 'name'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Thrift-Protocol'!

!TStruct methodsFor: 'accessing' stamp: 'pc 10/24/2007 19:47'!
name
	^ name! !

!TStruct methodsFor: 'accessing' stamp: 'pc 10/24/2007 19:47'!
name: aString
	name := aString! !

Object subclass: #TTest
	instanceVariableNames: 'prot'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Thrift-Test'!

!TTest methodsFor: 'as yet unclassified' stamp: 'pc 11/1/2007 04:47'!
protocol: aProtocol
	prot := aProtocol! !

!TTest methodsFor: 'as yet unclassified' stamp: 'pc 11/1/2007 04:49'!
runAll
	| c |
	c := ThriftTestClient new inProtocol: prot.
	c testByteThing: 32.
	c testDoubleThing: -1.0.
	c testEnumThing: 1.
	c testExceptionArg: 'foo'.
	c testI16Thing: 16.
	c testI16Thing: -16.
	c testI32Thing: 32.
	c testI32Thing: -32.
	c testI64Thing: 123.
	c testDoubleThing: 1.2.
	c testStructThing: (Xtruct new byteThing: 1; i32Thing: 2; i64Thing: 3; stringThing: 'foo').
	c testSetThing: (Set new).
	c testListThing: (OrderedCollection new).
	c testEnumThing: 1.
	c testInsanityArgument:
		(Insanity new
			userMap: (Dictionary new at: 1 put: 2; yourself);
		xtructs: (OrderedCollection new)).
	c testMultiArg0: 1 arg1: 2 arg2: 3 arg3: (Dictionary new) arg4: ((ThriftTest enums at: 	'Numberz') at: 'FIVE') arg5: 6. 
	c testExceptionArg: 'Xception'.
	c testMultiExceptionArg0: 'Xception' arg1: 'Xception2'! !

Object subclass: #TTransport
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Thrift-Transport'!

!TTransport methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:18'!
close
	self subclassResponsibility! !

!TTransport methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:22'!
flush
	self subclassResponsibility! !

!TTransport methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:18'!
isOpen
	self subclassResponsibility! !

!TTransport methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:18'!
open
	self subclassResponsibility! !

!TTransport methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:18'!
read: anInteger
	self subclassResponsibility! !

!TTransport methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:22'!
readAll: anInteger
	^ String streamContents: [:str |
		[str size < anInteger] whileTrue:
			[str nextPutAll: (self read: anInteger - str size)]]! !

!TTransport methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:22'!
write: aString
	self subclassResponsibility! !

Object subclass: #TType
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Thrift'!

!TType class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:03'!
bool
	^ 2! !

!TType class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:03'!
byte
	^ 3! !

!TType class methodsFor: 'as yet unclassified' stamp: 'pc 10/25/2007 15:55'!
codeOf: aTypeName
	self typeMap do: [:each | each first = aTypeName ifTrue: [^ each second]].
	^ nil! !

!TType class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:03'!
double
	^ 4! !

!TType class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:04'!
i16
	^ 6! !

!TType class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:04'!
i32
	^ 8! !

!TType class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:04'!
i64
	^ 10! !

!TType class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:04'!
list
	^ 15! !

!TType class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:04'!
map
	^ 13! !

!TType class methodsFor: 'as yet unclassified' stamp: 'pc 10/25/2007 15:56'!
nameOf: aTypeCode
	self typeMap do: [:each | each second = aTypeCode ifTrue: [^ each first]].
	^ nil! !

!TType class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:04'!
set
	^ 14! !

!TType class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:03'!
stop
	^ 0! !

!TType class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:04'!
string
	^ 11! !

!TType class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:04'!
struct
	^ 12! !

!TType class methodsFor: 'as yet unclassified' stamp: 'pc 10/25/2007 15:51'!
typeMap
	^ #((bool 2) (byte 3) (double 4) (i16 6) (i32 8) (i64 10) (list 15)
	   (map 13) (set 15) (stop 0) (string 11) (struct 12) (void 1))! !

!TType class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:03'!
void
	^ 1! !

Object subclass: #Xtruct
	instanceVariableNames: 'stringThing byteThing i32Thing i64Thing'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Thrift-Test'!

!Xtruct methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
byteThing
    ^ byteThing! !

!Xtruct methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
byteThing: aByte
    byteThing := aByte! !

!Xtruct methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
i32Thing
    ^ i32Thing! !

!Xtruct methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
i32Thing: anI32
    i32Thing := anI32! !

!Xtruct methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
i64Thing
    ^ i64Thing! !

!Xtruct methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
i64Thing: anI64
    i64Thing := anI64! !

!Xtruct methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
stringThing
    ^ stringThing! !

!Xtruct methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
stringThing: aString
    stringThing := aString! !

Object subclass: #Xtruct2
	instanceVariableNames: 'byteThing structThing i32Thing'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Thrift-Test'!

!Xtruct2 methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
byteThing
    ^ byteThing! !

!Xtruct2 methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
byteThing: aByte
    byteThing := aByte! !

!Xtruct2 methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
i32Thing
    ^ i32Thing! !

!Xtruct2 methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
i32Thing: anI32
    i32Thing := anI32! !

!Xtruct2 methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
structThing
    ^ structThing! !

!Xtruct2 methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
structThing: aXtruct
    structThing := aXtruct! !