4
Copyright (C) 2008, RTFM, Inc.
7
ekr@rtfm.com Fri May 2 17:04:55 2008
13
#include "rutil/Data.hxx"
14
#include "rutil/DataStream.hxx"
15
#include "rutil/ParseException.hxx"
16
#include "s2c_native.hxx"
18
void s2c::encode_uintX(std::ostream& out, const unsigned int bits, const u_int64 value)
29
out.put(((value>>56)&0xff));
31
out.put(((value>>48)&0xff));
33
out.put(((value>>40)&0xff));
35
out.put(((value>>32)&0xff));
37
out.put(((value>>24)&0xff));
39
out.put(((value>>16)&0xff));
41
out.put(((value>>8)&0xff));
51
void s2c::decode_uintX(std::istream& in, const unsigned int bits, u_char &value)
67
throw resip::ParseException("Unexpected end of encoding","",__FILE__,__LINE__);
73
/*void s2c::decode_uintX(std::istream& in, const unsigned int bits, u_int8 &value)
91
void s2c::decode_uintX(std::istream& in, const unsigned int bits, u_int16 &value)
106
throw resip::ParseException("Unexpected end of encoding","",__FILE__,__LINE__);
113
void s2c::decode_uintX(std::istream& in, const unsigned int bits, u_int32 &value)
129
throw resip::ParseException("Unexpected end of encoding","",__FILE__,__LINE__);
135
void s2c::decode_uintX(std::istream& in, const unsigned int bits, u_int64 &value)
150
throw resip::ParseException("Unexpected end of encoding","",__FILE__,__LINE__);
155
void s2c::do_indent(std::ostream& out, int indent)
157
while(indent--) out << ' ';
160
// This is really clumsy, but I don't understand rutil
161
// TODO: !ekr! cleanup
162
void s2c::read_varray1(std::istream& in, unsigned int lenlen, resip::Data &buf)
167
// First read the length
173
throw resip::ParseException("Unexpected end of encoding","",__FILE__,__LINE__);
177
resip::DataStream out(buf);
182
throw resip::ParseException("Unexpected end of encoding","",__FILE__,__LINE__);
195
operator<<(std::ostream& strm, const s2c::PDU& pdu)