2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 #ifndef TIZENAPIS_PLATFORM_CALLHISTORY_H_
19 #define TIZENAPIS_PLATFORM_CALLHISTORY_H_
21 #include <dpl/shared_ptr.h>
22 #include <dpl/noncopyable.h>
24 #include <API/Call/ICallHistory.h>
25 #include <API/Call/CallHistoryFactory.h>
26 #include <API/Call/EventFindCallHistory.h>
27 #include <API/Call/EventRemoveBatch.h>
28 #include <API/Call/CallHistoryEntryProperties.h>
29 #include "CallHistoryQuery.h"
35 class CallHistory : public Api::Call::ICallHistory
41 void find(const Api::Call::EventFindCallHistoryPtr& event);
42 bool remove(const unsigned long entryId);
43 void removeBatch(const Api::Call::EventRemoveBatchPtr& event);
46 bool convertCallHistory(callhistory_query_s *query_log, Api::Call::CallHistoryEntryListPtr &callEntries);
47 bool executeQuery(std::string &query, Api::Call::CallHistoryEntryListPtr &callEntries);
48 std::string convertAttrName(std::string &name);
49 std::string makeQuerySortMode(Api::Tizen::SortModeArrayPtr attr);
52 void OnRequestReceived(const Api::Call::EventFindCallHistoryPtr& event);
53 void OnRequestReceived(const Api::Call::EventRemoveBatchPtr& event);