blob: f9b3f7b021d0fc9cab2ec4b3f888bed7a07bc71d (
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
70
71
|
/*
Copyright (c) 2015 Miranda NG project (http://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation version 2
of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SKYPE_DB_H_
#define _SKYPE_DB_H_
enum SKYPE_DB_EVENT_TYPE
{
SKYPE_DB_EVENT_TYPE_ACTION = 10001,
SKYPE_DB_EVENT_TYPE_INCOMING_CALL,
SKYPE_DB_EVENT_TYPE_CALL_INFO,
SKYPE_DB_EVENT_TYPE_FILETRANSFER_INFO,
SKYPE_DB_EVENT_TYPE_URIOBJ,
SKYPE_DB_EVENT_TYPE_EDITED_MESSAGE,
SKYPE_DB_EVENT_TYPE_UNKNOWN
};
#define SKYPE_SETTINGS_ID "Skypename"
#define SKYPE_SETTINGS_PASSWORD "Password"
#define SKYPE_SETTINGS_GROUP "DefaultGroup"
class pass_ptrA
{
char* data;
public:
__inline explicit pass_ptrA() : data(NULL) {}
__inline explicit pass_ptrA(char* _p) : data(_p) {}
__inline ~pass_ptrA() { zero(); mir_free(data); }
__inline char* operator = (char * _p) { if (data){ zero(); mir_free(data); } data = _p; return data; }
__inline char* operator->() const { return data; }
__inline operator char *() const { return data; }
__inline operator INT_PTR() const { return (INT_PTR)data; }
__inline char * detach() { char *res = data; data = NULL; return res; }
__inline void zero() { if (data) SecureZeroMemory(data, mir_strlen(data)); }
};
class pass_ptrW
{
WCHAR* data;
public:
__inline explicit pass_ptrW() : data(NULL) {}
__inline explicit pass_ptrW(WCHAR* _p) : data(_p) {}
__inline ~pass_ptrW() { zero(); mir_free(data); }
__inline WCHAR* operator = (WCHAR * _p) { if (data){ zero(); mir_free(data); } data = _p; return data; }
__inline WCHAR* operator->() const { return data; }
__inline operator WCHAR *() const { return data; }
__inline operator INT_PTR() const { return (INT_PTR)data; }
__inline WCHAR * detach() { WCHAR *res = data; data = NULL; return res; }
__inline void zero() { if (data) SecureZeroMemory(data, (mir_wstrlen(data)*sizeof(WCHAR))); }
};
typedef pass_ptrW pass_ptrT;
#endif //_SKYPE_DB_H_
|