/[resiprocate]/main/resip/stack/test/testRlmi.cxx
ViewVC logotype

Annotation of /main/resip/stack/test/testRlmi.cxx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3433 - (hide annotations) (download)
Tue Nov 2 18:02:55 2004 UTC (15 years, 2 months ago) by jason
Original Path: main/sip/resiprocate/test/testRlmi.cxx
File size: 2514 byte(s)
reverting RESIP_ change to version 3429
1 davidb 2166 #include <iostream>
2     #include <memory>
3    
4     #include "resiprocate/MultipartMixedContents.hxx"
5     #include "resiprocate/Rlmi.hxx"
6     #include "resiprocate/SipMessage.hxx"
7     #include "resiprocate/test/TestSupport.hxx"
8     #include "resiprocate/os/ParseBuffer.hxx"
9    
10     using namespace resip;
11     using namespace std;
12    
13     int
14     main()
15     {
16     {
17 jason 3433 const Data txt("NOTIFY sip:terminal.example.com SIP/2.0\r\n"
18 davidb 2166 "Via: SIP/2.0/TCP pres.example.com;branch=z9hG4bKMgRenTETmm\r\n"
19     "Max-Forwards: 70\r\n"
20     "From: <sip:adam-buddies@pres.example.com>;tag=zpNctbZq\r\n"
21     "To: <sip:adam@example.com>;tag=ie4hbb8t\r\n"
22     "Call-ID: cdB34qLToC@terminal.example.com\r\n"
23 jason 3433 "CSeq: 997935768 NOTIFY\r\n"
24 davidb 2166 "Contact: <sip:pres.example.com>\r\n"
25     "Event: presence\r\n"
26     "Subscription-State: active;expires=7200\r\n"
27     "Require: eventlist\r\n"
28     "Content-Type: application/rlmi+xml;charset=\"UTF-8\"\r\n"
29     "Content-Length: 681\r\n"
30     "\r\n"
31     "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n"
32     "<list xmlns=\"urn:ietf:params:xml:ns:rmli\"\r\n"
33     " uri=\"sip:adam-friends@pres.example.com\" version=\"1\"\r\n"
34     " name=\"Buddy List at COM\" fullState=\"true\">\r\n"
35     " <resource uri=\"sip:bob@example.com\" name=\"Bob Smith\">\r\n"
36     " <instance id=\"juwigmtboe\" state=\"active\"\r\n"
37     " cid=\"bUZBsM@pres.example.com\"/>\r\n"
38     " </resource>\r\n"
39     " <resource uri=\"sip:dave@example.com\" name=\"Dave Jones\">\r\n"
40     " <instance id=\"hqzsuxtfyq\" state=\"active\"\r\n"
41     " cid=\"ZvSvkz@pres.example.com\"/>\r\n"
42     " </resource>\r\n"
43     " <resource uri=\"sip:ed@example.net\" name=\"Ed at NET\" />\r\n"
44     " <resource uri=\"sip:adam-friends@example.org\"\r\n"
45     " name=\"My Friends at ORG\" />\r\n"
46     "</list>\r\n"
47     "\r\n");
48    
49     auto_ptr<SipMessage> msg(TestSupport::makeMessage(txt.c_str()));
50    
51     Rlmi* rlmi = dynamic_cast<Rlmi*>(msg->getContents());
52    
53     assert(rlmi);
54    
55     cerr << rlmi->get() << endl;
56     }
57     }

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27