source: trunk/dsa_messenger/client-emitters.adb

Last change on this file was 9, checked in by vadim.godunko, 12 years ago

Fix connection failure handling code.

File size: 1.9 KB
Line 
1
2package body Client.Emitters is
3
4 ------------------
5 -- Constructors --
6 ------------------
7
8 package body Constructors is
9
10 ------------
11 -- Create --
12 ------------
13
14 function Create return not null Emitter_Access is
15 begin
16 return Self : not null Emitter_Access := new Emitter do
17 Qt4.Objects.Directors.Constructors.Initialize (Self);
18 end return;
19 end Create;
20
21 end Constructors;
22
23 -------------------
24 -- Emit_Received --
25 -------------------
26
27 procedure Emit_Received
28 (Self : not null access Emitter'Class;
29 From : Qt4.Strings.Q_String;
30 Text : Qt4.Strings.Q_String) is separate;
31
32 -------------------------
33 -- Emit_User_Connected --
34 -------------------------
35
36 procedure Emit_User_Connected
37 (Self : not null access Emitter'Class;
38 Name : Qt4.Strings.Q_String) is separate;
39
40 ----------------------------
41 -- Emit_User_Disconnected --
42 ----------------------------
43
44 procedure Emit_User_Disconnected
45 (Self : not null access Emitter'Class;
46 Name : Qt4.Strings.Q_String) is separate;
47
48 -------------
49 -- Receive --
50 -------------
51
52 procedure Receive
53 (Self : not null access Emitter'Class;
54 From : Qt4.Strings.Q_String;
55 Text : Qt4.Strings.Q_String) is
56 begin
57 Self.Emit_Received (From, Text);
58 end Receive;
59
60 --------------------
61 -- User_Connected --
62 --------------------
63
64 procedure User_Connected
65 (Self : not null access Emitter'Class;
66 Name : Qt4.Strings.Q_String) is
67 begin
68 Self.Emit_User_Connected (Name);
69 end User_Connected;
70
71 -----------------------
72 -- User_Disconnected --
73 -----------------------
74
75 procedure User_Disconnected
76 (Self : not null access Emitter'Class;
77 Name : Qt4.Strings.Q_String) is
78 begin
79 Self.Emit_User_Disconnected (Name);
80 end User_Disconnected;
81
82end Client.Emitters;
Note: See TracBrowser for help on using the repository browser.