blob: 626515e8ea1b9781ec73a0d9ffd7e899f13ac1df (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
#ifndef guard_speak_announce_event_information_h
#define guard_speak_announce_event_information_h
//==============================================================================
// Miranda Speak Plugin, © 2002 Ryan Winter
//==============================================================================
#include <speak.h>
#include <map>
#include <string>
class EventInformation
{
public:
EventInformation();
~EventInformation();
//--------------------------------------------------------------------------
// Description : is the event valid?
// Return : true = the event is valid
//--------------------------------------------------------------------------
bool isValidEvent(HANDLE event);
//--------------------------------------------------------------------------
// Description : get the last event received
// Return : the last event or 0 if none yet received
//--------------------------------------------------------------------------
unsigned short getLastEvent() { return m_event_info.eventType; }
//--------------------------------------------------------------------------
// Description : was the last event a messsage event?
// Return : true - yes it was
// false - no it wasn't
//--------------------------------------------------------------------------
// bool isMessageEvent()
// { return (m_event_info.eventType == EVENTTYPE_MESSAGE); }
//--------------------------------------------------------------------------
// Description : get the message from the last event
// Return : the last message
//--------------------------------------------------------------------------
std::string getMessage();
//--------------------------------------------------------------------------
// Description : get the size of the message from the last event
// Return : the size of the message
//--------------------------------------------------------------------------
unsigned int getMessageSize();
//--------------------------------------------------------------------------
// Description : get the event string
//--------------------------------------------------------------------------
std::string eventString();
private:
std::map<unsigned short, std::string> m_event_strings;
DBEVENTINFO m_event_info;
};
//==============================================================================
//
// Summary : API encapsulation
//
// Description : This encapsulates the SAPI 5.1 interface
//
//==============================================================================
#endif
|