-
Notifications
You must be signed in to change notification settings - Fork 0
/
AddressBook.h
63 lines (56 loc) · 2.32 KB
/
AddressBook.h
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
//---------------------------------------------------------------------------
#ifndef AddressBookH
#define AddressBookH
//---------------------------------------------------------------------------
#include <stdlib.h>
#include <SysUtils.hpp>
#include <Controls.hpp>
#include <Classes.hpp>
#include <Forms.hpp>
#include "MailIdentity.h"
//---------------------------------------------------------------------------
class PACKAGE TAddressBook : public TComponent
{
private:
bool FDuplicatesAllowed;
bool FCaseSensitive;
AnsiString *FListDelimiters;
TStringList *Addresses;
bool __fastcall IsDelimiter(AnsiString s);
void __fastcall ParseList(AnsiString s);
TStringList *LastEntry;
int LastEntryCtr;
TStringList *LastAddress;
int LastAddressCtr;
protected:
AnsiString __fastcall GetListDelimiters();
void __fastcall SetListDelimiters(AnsiString ld);
int __fastcall GetCount();
void __fastcall SetDuplicatesAllowed(bool dup);
void __fastcall SetCaseSensitive(bool cs);
bool __fastcall FindIdentity(TMailIdentity *mid);
void __fastcall GetAllEntries();
void __fastcall GetAllAddresses();
public:
__fastcall TAddressBook(TComponent *Owner);
__fastcall ~TAddressBook();
void __fastcall Clear();
void __fastcall Add(TMailIdentity *mid);
void __fastcall Add(AnsiString mid);
TMailIdentity * __fastcall GetEntry(int i);
TMailIdentity * __fastcall FindEntry(AnsiString str);
void __fastcall Append(TAddressBook *ab);
void __fastcall Append(TMailIdentity *mi);
void __fastcall Export(AnsiString fname);
AnsiString __fastcall GetFirstEntry();
AnsiString __fastcall GetNextEntry();
AnsiString __fastcall GetFirstAddress();
AnsiString __fastcall GetNextAddress();
__published:
__property bool DuplicatesAllowed = {read=FDuplicatesAllowed, write=SetDuplicatesAllowed, default=true};
__property bool CaseSensitive = {read=FCaseSensitive, write=SetCaseSensitive, default=false};
__property AnsiString ListDelimiters = {read=GetListDelimiters, write=SetListDelimiters};
__property int Count = {read=GetCount};
};
//---------------------------------------------------------------------------
#endif