-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathLookupFonbook.h
65 lines (60 loc) · 2.13 KB
/
LookupFonbook.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
64
65
/*
* libfritz++
*
* Copyright (C) 2007-2012 Joachim Wilke <[email protected]>
*
* 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; either version 2
* of the License, or (at your option) any later version.
*
* 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, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef LOOKUPFONBOOK_H_
#define LOOKUPFONBOOK_H_
#include "Fonbook.h"
namespace fritz {
class LookupFonbook: public Fonbook {
public:
LookupFonbook(std::string title, std::string techId, bool writeable = false);
virtual ~LookupFonbook();
/**
* Take action to fill phonebook with content.
* Initialize() may be called more than once per session.
* @return if initialization was successful
*/
bool initialize() override;
/**
* Resolves the number given to the corresponding name.
* @param number to resolve
* @return resolved name and type or the number, if unsuccessful
*/
sResolveResult resolveToName(std::string number) override;
/**
* Resolves number doing a (costly) lookup
* @param number to resolve
* @return resolved name and type or number, if not successful
*/
virtual sResolveResult lookup(std::string number) const;
/**
* Returns the number of entries in the telephonebook.
* @return the number of entries
*/
size_t getFonbookSize() const override { return 0; }
/**
* Returns a specific telephonebook entry.
* @param id unique identifier of the requested entry
* @return the entry with key id or nullptr, if unsuccessful
*/
const FonbookEntry *retrieveFonbookEntry(size_t id __attribute__((unused))) const override { return nullptr; }
};
} /* namespace fritz */
#endif /* LOOKUPFONBOOK_H_ */