source: trunk/axmpp/source/xmpp-stream_handlers.ads

Last change on this file was 311, checked in by alexander.basov, 10 years ago

Session state type moved to xmpp package, refs #17

  • Property svn:keywords set to Author Date Revision
File size: 6.5 KB
Line 
1------------------------------------------------------------------------------
2-- --
3-- AXMPP Project --
4-- --
5-- XMPP Library for Ada --
6-- --
7------------------------------------------------------------------------------
8-- --
9-- Copyright © 2011, Alexander Basov <coopht@gmail.com> --
10-- All rights reserved. --
11-- --
12-- Redistribution and use in source and binary forms, with or without --
13-- modification, are permitted provided that the following conditions --
14-- are met: --
15-- --
16-- * Redistributions of source code must retain the above copyright --
17-- notice, this list of conditions and the following disclaimer. --
18-- --
19-- * Redistributions in binary form must reproduce the above copyright --
20-- notice, this list of conditions and the following disclaimer in the --
21-- documentation and/or other materials provided with the distribution. --
22-- --
23-- * Neither the name of the Alexander Basov, IE nor the names of its --
24-- contributors may be used to endorse or promote products derived from --
25-- this software without specific prior written permission. --
26-- --
27-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
28-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
29-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
30-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
31-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
32-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
33-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
34-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
35-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
36-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
37-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
38-- --
39------------------------------------------------------------------------------
40-- $Revision: 311 $ $Date: 2012-02-05 17:47:58 +0000 (Sun, 05 Feb 2012) $
41------------------------------------------------------------------------------
42with League.Strings;
43
44with XMPP.IQS;
45with XMPP.Messages;
46with XMPP.Presences;
47with XMPP.Rosters;
48with XMPP.Services;
49with XMPP.Streams;
50with XMPP.Stream_Features;
51with XMPP.Versions;
52
53package XMPP.Stream_Handlers is
54
55 type XMPP_Stream_Handler is limited interface;
56
57 type XMPP_Stream_Handler_Access is access all XMPP_Stream_Handler'Class;
58
59 not overriding procedure Connected
60 (Self : in out XMPP_Stream_Handler;
61 Object : XMPP.Stream_Features.XMPP_Stream_Feature'Class) is null;
62 -- Handler is called after succesfull authentification
63
64 not overriding procedure Disconnected
65 (Self : in out XMPP_Stream_Handler) is null;
66 -- Handler is called after axmpp disconnected from the network
67
68 not overriding procedure IQ
69 (Self : in out XMPP_Stream_Handler;
70 IQ : XMPP.IQS.XMPP_IQ'Class) is null;
71 -- Handler is called when XMPP IQ arrived.
72 -- Note, that you can parse IQ manually in your application,
73 -- or you can reimplement appropriate handlers
74
75 not overriding procedure Start_Stream
76 (Self : in out XMPP_Stream_Handler;
77 Object : XMPP.Streams.XMPP_Stream'Class) is null;
78 -- Handler is called after stream started
79
80 not overriding procedure Stream_Features
81 (Self : in out XMPP_Stream_Handler;
82 Object : XMPP.Stream_Features.XMPP_Stream_Feature'Class) is null;
83 -- Handler is called when stream features arrived.
84
85 not overriding procedure Bind_Resource_State
86 (Self : in out XMPP_Stream_Handler;
87 JID : League.Strings.Universal_String;
88 Status : Bind_State) is null;
89 -- Handler is called when resusts of resource binding arrived.
90
91 not overriding procedure Session_State
92 (Self : in out XMPP_Stream_Handler;
93 Status : Session_State) is null;
94 -- Handler is called when information about session state arrived.
95
96 not overriding procedure Error
97 (Self : in out XMPP_Stream_Handler) is null;
98 -- Handler is called when XMPP error occured.
99
100 not overriding procedure Message
101 (Self : in out XMPP_Stream_Handler;
102 Msg : XMPP.Messages.XMPP_Message'Class) is null;
103 -- Handler is called when XMPP message arrived.
104
105 not overriding procedure Presence
106 (Self : in out XMPP_Stream_Handler;
107 Data : XMPP.Presences.XMPP_Presence'Class) is null;
108 -- Handler is called when XMPP presence arrived.
109
110 not overriding procedure Roster
111 (Self : in out XMPP_Stream_Handler;
112 Data : XMPP.Rosters.XMPP_Roster'Class) is null;
113 -- Handler is called when XMPP roster arrived.
114
115 not overriding procedure Service_Information
116 (Self : in out XMPP_Stream_Handler;
117 Info : XMPP.Services.XMPP_Service'Class) is null;
118 -- Handler is called, discovered information arrived from XMPP server
119
120 not overriding procedure End_Stream
121 (Self : in out XMPP_Stream_Handler) is null;
122 -- Handler is called, when end_strem arrived.
123
124 not overriding procedure Version
125 (Self : in out XMPP_Stream_Handler;
126 Version : XMPP.Versions.XMPP_Version'Class) is null;
127 -- Handler is called, discovered information arrived from XMPP server
128
129 not overriding procedure Version_Request
130 (Self : in out XMPP_Stream_Handler;
131 Version : in out XMPP.Versions.XMPP_Version'Class) is null;
132 -- Handler is called when sombodies asks our clients version.
133 -- Client should fill appropriate fields (Name, Version, OS)
134 -- of Version object, or default values will be used.
135
136end XMPP.Stream_Handlers;
Note: See TracBrowser for help on using the repository browser.