Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit770d7eb

Browse files
committed
Used XMPP package with cpp-netlib 0.6 because there were too many changes on the 0.7 branch. Tests compile and succeed.
1 parent0e4c86d commit770d7eb

File tree

39 files changed

+2178
-0
lines changed

39 files changed

+2178
-0
lines changed

‎boost/network/protocol/xmpp.hpp‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copyright (c) Glyn Matthews 2010.
2+
// Distributed under the Boost Software License, Version 1.0.
3+
// (See accompanying file LICENSE_1_0.txt or copy at
4+
// http://www.boost.org/LICENSE_1_0.txt)
5+
6+
7+
#ifndef __BOOST_NETWORK_PROTOCOL_XMPP_INC__
8+
#define__BOOST_NETWORK_PROTOCOL_XMPP_INC__
9+
10+
11+
12+
13+
#endif// __BOOST_NETWORK_PROTOCOL_XMPP_INC__
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
// Copyright (c) Glyn Matthews 2010.
2+
// Distributed under the Boost Software License, Version 1.0.
3+
// (See accompanying file LICENSE_1_0.txt or copy at
4+
// http://www.boost.org/LICENSE_1_0.txt)
5+
6+
7+
#ifndef __BOOST_NETWORK_PROTOCOL_XMPP_CLIENT_INC__
8+
#define__BOOST_NETWORK_PROTOCOL_XMPP_CLIENT_INC__
9+
10+
11+
#include<boost/utility/noncopyable.hpp>
12+
#include<boost/network/traits/string.hpp>
13+
#include<boost/cstdint.hpp>
14+
#include<boost/network/protocol/xmpp/message.hpp>
15+
#include<boost/network/protocol/xmpp/presence.hpp>
16+
#include<boost/network/protocol/xmpp/iq.hpp>
17+
18+
19+
namespaceboost {
20+
namespacenetwork {
21+
namespacexmpp {
22+
template<
23+
classHandler,
24+
classTag
25+
>
26+
classbasic_client : boost::noncopyable {
27+
public:
28+
29+
typedeftypename string<Tag>::type string_type;
30+
31+
typedef basic_message<Tag> message;
32+
typedef basic_presence<Tag> presence;
33+
typedef basic_iq<Tag> iq;
34+
35+
explicitbasic_client(Handler handler);
36+
37+
~basic_client();
38+
39+
voidconnect(const string_type &proxy_host,
40+
const string_type &proxy_port);
41+
42+
voiddisconnect();
43+
44+
voidauthenticate(const string_type &jid,
45+
const string_type &password);
46+
47+
voidsend_message(const message_type &message);
48+
49+
voidsend_presence(const presence_type &presence);
50+
51+
voidsend_iq(const iq_type &iq);
52+
53+
string_typejid()const;
54+
55+
string_typebound_jid()const;
56+
57+
private:
58+
59+
// tcp socket
60+
// tls
61+
// sasl
62+
63+
// parameters, such as jid, bound_jid, domain, port etc.
64+
65+
// io_service
66+
67+
// xml parser
68+
69+
// event handler
70+
71+
// stream open handler
72+
73+
// connection event handlers
74+
75+
Handler handler_;
76+
77+
};
78+
79+
80+
81+
template<
82+
classHandler
83+
>
84+
structclient : basic_client<tags::default_> {
85+
86+
explicitclient(Handler handler) : basic_client<tags::default_>(handler) {
87+
88+
}
89+
90+
};
91+
}// namespace xmpp
92+
}// namespace network
93+
}// namespace boost
94+
95+
96+
#endif// __BOOST_NETWORK_PROTOCOL_XMPP_CLIENT_INC__
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
// Copyright (c) Glyn Matthews 2010.
2+
// Distributed under the Boost Software License, Version 1.0.
3+
// (See accompanying file LICENSE_1_0.txt or copy at
4+
// http://www.boost.org/LICENSE_1_0.txt)
5+
6+
7+
#ifndef __BOOST_NETWORK_PROTOCOL_XMPP_DETAILS_NS_INC__
8+
#define__BOOST_NETWORK_PROTOCOL_XMPP_DETAILS_NS_INC__
9+
10+
11+
namespaceboost {
12+
namespacenetwork {
13+
namespacexmpp {
14+
namespacedetails {
15+
classnamespaces {
16+
public:
17+
18+
staticconstchar *client() {
19+
return"jabber:client";
20+
}
21+
22+
staticconstchar *component() {
23+
return"jabber:component:accept";
24+
}
25+
26+
staticconstchar *streams() {
27+
return"http://etherx.jabber.org/streams";
28+
}
29+
30+
staticconstchar *streams_ietf() {
31+
return"urn:ietf:params:xml:ns:xmpp-streams";
32+
}
33+
34+
staticconstchar *tls() {
35+
return"urn:ietf:params:xml:ns:xmpp-tls";
36+
}
37+
38+
staticconstchar *sasl() {
39+
return"urn:ietf:params:xml:ns:xmpp-sasl";
40+
}
41+
42+
staticconstchar *bind() {
43+
return"urn:ietf:params:xml:ns:xmpp-bind";
44+
}
45+
46+
staticconstchar *session() {
47+
return"urn:ietf:params:xml:ns:xmpp-session";
48+
}
49+
50+
staticconstchar *auth() {
51+
return"jabber:iq:auth";
52+
}
53+
54+
staticconstchar *disco_info() {
55+
return"http://jabber.org/protocol/disco#info";
56+
}
57+
58+
staticconstchar *disco_items() {
59+
return"http://jabber.org/protocol/disco#items";
60+
}
61+
62+
staticconstchar *roster() {
63+
return"jabber:iq:roster";
64+
}
65+
};
66+
}// namespace details
67+
}// namespace xmpp
68+
}// namespace network
69+
}// namespace boost
70+
71+
72+
#endif// __BOOST_NETWORK_PROTOCOL_XMPP_DETAILS_NS_INC__
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// Copyright (c) Glyn Matthews 2010.
2+
// Distributed under the Boost Software License, Version 1.0.
3+
// (See accompanying file LICENSE_1_0.txt or copy at
4+
// http://www.boost.org/LICENSE_1_0.txt)
5+
6+
7+
#ifndef __BOOST_NETWORK_PROTOCOL_XMPP_DIRECTIVES_INC__
8+
#define__BOOST_NETWORK_PROTOCOL_XMPP_DIRECTIVES_INC__
9+
10+
11+
#include<boost/network/protocol/xmpp/directives/attribute.hpp>
12+
#include<boost/network/protocol/xmpp/directives/text.hpp>
13+
#include<boost/network/protocol/xmpp/directives/id.hpp>
14+
#include<boost/network/protocol/xmpp/directives/from.hpp>
15+
#include<boost/network/protocol/xmpp/directives/to.hpp>
16+
#include<boost/network/protocol/xmpp/directives/type.hpp>
17+
#include<boost/network/protocol/xmpp/directives/namespace.hpp>
18+
19+
20+
namespaceboost {
21+
namespacenetwork {
22+
namespacexmpp {
23+
template<
24+
classTag,
25+
classDirective
26+
>
27+
inline
28+
basic_stanza<Tag> &operator << (basic_stanza<Tag> &stanza,
29+
const Directive &directive) {
30+
directive(stanza);
31+
return stanza;
32+
}
33+
}// namespace xmpp
34+
}// namespace network
35+
}// namespace boost
36+
37+
38+
#endif// __BOOST_NETWORK_PROTOCOL_XMPP_DIRECTIVES_INC__
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Copyright (c) Glyn Matthews 2010.
2+
// Distributed under the Boost Software License, Version 1.0.
3+
// (See accompanying file LICENSE_1_0.txt or copy at
4+
// http://www.boost.org/LICENSE_1_0.txt)
5+
6+
7+
#ifndef __BOOST_NETWORK_PROTOCOL_XMPP_DIRECTIVES_ATTRIBUTE_INC__
8+
#define__BOOST_NETWORK_PROTOCOL_XMPP_DIRECTIVES_ATTRIBUTE_INC__
9+
10+
11+
namespaceboost {
12+
namespacenetwork {
13+
namespacexmpp {
14+
namespacedirectives {
15+
16+
}// namespace directives
17+
}// namespace xmpp
18+
}// namespace network
19+
}// namespace boost
20+
21+
22+
#endif// __BOOST_NETWORK_PROTOCOL_XMPP_DIRECTIVES_ATTRIBUTE_INC__
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Copyright (c) Glyn Matthews 2010.
2+
// Distributed under the Boost Software License, Version 1.0.
3+
// (See accompanying file LICENSE_1_0.txt or copy at
4+
// http://www.boost.org/LICENSE_1_0.txt)
5+
6+
7+
#ifndef __BOOST_NETWORK_PROTOCOL_XMPP_DIRECTIVES_DESTINATION_INC__
8+
#define__BOOST_NETWORK_PROTOCOL_XMPP_DIRECTIVES_DESTINATION_INC__
9+
10+
11+
namespaceboost {
12+
namespacenetwork {
13+
namespacexmpp {
14+
namespacedirectives {
15+
16+
}// namespace directives
17+
}// namespace xmpp
18+
}// namespace network
19+
}// namespace boost
20+
21+
22+
#endif// __BOOST_NETWORK_PROTOCOL_XMPP_DIRECTIVES_DESTINATION_INC__
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Copyright (c) Glyn Matthews 2010.
2+
// Distributed under the Boost Software License, Version 1.0.
3+
// (See accompanying file LICENSE_1_0.txt or copy at
4+
// http://www.boost.org/LICENSE_1_0.txt)
5+
6+
7+
#ifndef __BOOST_NETWORK_PROTOCOL_XMPP_DIRECTIVES_FROM_INC__
8+
#define__BOOST_NETWORK_PROTOCOL_XMPP_DIRECTIVES_FROM_INC__
9+
10+
11+
namespaceboost {
12+
namespacenetwork {
13+
namespacexmpp {
14+
namespacedirectives {
15+
16+
}// namespace directives
17+
}// namespace xmpp
18+
}// namespace network
19+
}// namespace boost
20+
21+
22+
#endif// __BOOST_NETWORK_PROTOCOL_XMPP_DIRECTIVES_FROM_INC__
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Copyright (c) Glyn Matthews 2010.
2+
// Distributed under the Boost Software License, Version 1.0.
3+
// (See accompanying file LICENSE_1_0.txt or copy at
4+
// http://www.boost.org/LICENSE_1_0.txt)
5+
6+
7+
#ifndef __BOOST_NETWORK_PROTOCOL_XMPP_DIRECTIVES_ID_INC__
8+
#define__BOOST_NETWORK_PROTOCOL_XMPP_DIRECTIVES_ID_INC__
9+
10+
11+
namespaceboost {
12+
namespacenetwork {
13+
namespacexmpp {
14+
namespacedirectives {
15+
16+
}// namespace directives
17+
}// namespace xmpp
18+
}// namespace network
19+
}// namespace boost
20+
21+
22+
#endif// __BOOST_NETWORK_PROTOCOL_XMPP_DIRECTIVES_ID_INC__
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Copyright (c) Glyn Matthews 2010.
2+
// Distributed under the Boost Software License, Version 1.0.
3+
// (See accompanying file LICENSE_1_0.txt or copy at
4+
// http://www.boost.org/LICENSE_1_0.txt)
5+
6+
7+
#ifndef __BOOST_NETWORK_PROTOCOL_XMPP_DIRECTIVES_NAMESPACE_INC__
8+
#define__BOOST_NETWORK_PROTOCOL_XMPP_DIRECTIVES_NAMESPACE_INC__
9+
10+
11+
namespaceboost {
12+
namespacenetwork {
13+
namespacexmpp {
14+
namespacedirectives {
15+
16+
}// namespace directives
17+
}// namespace xmpp
18+
}// namespace network
19+
}// namespace boost
20+
21+
22+
#endif// __BOOST_NETWORK_PROTOCOL_XMPP_DIRECTIVES_NAMESPACE_INC__
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Copyright (c) Glyn Matthews 2010.
2+
// Distributed under the Boost Software License, Version 1.0.
3+
// (See accompanying file LICENSE_1_0.txt or copy at
4+
// http://www.boost.org/LICENSE_1_0.txt)
5+
6+
7+
#ifndef __BOOST_NETWORK_PROTOCOL_XMPP_DIRECTIVES_SOURCE_INC__
8+
#define__BOOST_NETWORK_PROTOCOL_XMPP_DIRECTIVES_SOURCE_INC__
9+
10+
11+
namespaceboost {
12+
namespacenetwork {
13+
namespacexmpp {
14+
namespacedirectives {
15+
16+
}// namespace directives
17+
}// namespace xmpp
18+
}// namespace network
19+
}// namespace boost
20+
21+
22+
#endif// __BOOST_NETWORK_PROTOCOL_XMPP_DIRECTIVES_SOURCE_INC__

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp