[Release] wrt-plugins-common_0.3.74
[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
45                                      *is not set */
46     } LogFolder;
47
48     LogEntry();
49     virtual ~LogEntry();
50
51     int getId() const;
52     void setId(int value);
53
54     std::string getPhoneNumber() const;
55     void setPhoneNumber(const std::string &value);
56
57     std::time_t getStartTime() const;
58     void setStartTime(std::time_t value);
59
60     int getDuration() const;
61     void setDuration(int value);
62
63     LogFolder getFolder() const;
64     void setFolder(LogFolder value);
65
66     std::string getDescription() const;
67     void setDescription(const std::string &value);
68
69     void display();
70
71   protected:
72     int m_id;
73     std::string m_phoneNumber;
74     std::time_t m_startTime;
75     int m_duration;
76     LogFolder m_folder;
77     std::string m_description;
78 };
79
80 typedef DPL::SharedPtr<LogEntry> LogEntryPtr;
81 }
82 }
83
84 #endif /* _ABSTRACT_LAYER_CALENDAR_EVENT_H_ */
85