6f13cc17e20fed5350077daa439954e2682d87ff
[platform/framework/web/wrt-plugins-common.git] / src / modules / API / DEPRACATED / Telephony / LogEntry.h
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  *    Licensed under the Apache License, Version 2.0 (the "License");
5  *    you may not use this file except in compliance with the License.
6  *    You may obtain a copy of the License at
7  *
8  *        http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *    Unless required by applicable law or agreed to in writing, software
11  *    distributed under the License is distributed on an "AS IS" BASIS,
12  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *    See the License for the specific language governing permissions and
14  *    limitations under the License.
15  */
16 /**
17  * @file        LogEntry.h
18  * @author      Lukasz Marek (l.marek@samsung.com)
19  * @version     0.1
20  */
21
22 #ifndef _ABSTRACT_LAYER_CALENDAR_EVENT_H_
23 #define _ABSTRACT_LAYER_CALENDAR_EVENT_H_
24
25 #include <ctime>
26 #include <string>
27 #include <dpl/shared_ptr.h>
28
29 namespace WrtPlugins {
30 namespace Api {
31 const int UNDEFINED_LOG_ENTRY_ID = -1;
32
33 class LogEntry
34 {
35   public:
36
37     typedef enum
38     {
39         RECEIVED_CALLS_FOLDER,
40         REJECTED_CALLS_FOLDER,
41         MISSED_CALLS_FOLDER,
42         INITIATED_CALLS_FOLDER,
43         INVALID_FOLDER = 10000,
44         UNDEFINED_FOLDER            /* should be used only to mark a fact filter is not set */
45     } LogFolder;
46
47     LogEntry();
48     virtual ~LogEntry();
49
50     int getId() const;
51     void setId(int value);
52
53     std::string getPhoneNumber() const;
54     void setPhoneNumber(const std::string &value);
55
56     std::time_t getStartTime() const;
57     void setStartTime(std::time_t value);
58
59     int getDuration() const;
60     void setDuration(int value);
61
62     LogFolder getFolder() const;
63     void setFolder(LogFolder value);
64
65     std::string getDescription() const;
66     void setDescription(const std::string &value);
67
68     void display();
69
70   protected:
71     int m_id;
72     std::string m_phoneNumber;
73     std::time_t m_startTime;
74     int m_duration;
75     LogFolder m_folder;
76     std::string m_description;
77 };
78
79 typedef DPL::SharedPtr<LogEntry> LogEntryPtr;
80 }
81 }
82
83 #endif /* _ABSTRACT_LAYER_CALENDAR_EVENT_H_ */
84