dba4ecb4d2caf7d4d4d272000796fa9d955bc101
[framework/web/wrt-plugins-common.git] / src / modules / API / Messaging / ISms.cpp
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  *
18  *
19  * @file       ISms.cpp
20  * @author     Pawel Misiak (p.misiak@samsung.com)
21  * @version    0.1
22  * @brief
23  */
24 #include "ISms.h"
25 #include <dpl/log/log.h>
26
27 using namespace std;
28
29 namespace WrtDeviceApis {
30 namespace Messaging {
31 namespace Api {
32 ISms::ISms(const string& id) :
33     IMessage(SMS, id)
34 {
35     LogInfo("enter");
36 }
37
38 ISms::~ISms()
39 {
40     LogInfo("enter");
41 }
42
43 ISms & ISms::operator <<(const VirtualMessage& msg)
44 {
45     setBody(msg.getBodyRef());
46     setFolderType(msg.getCurrentFolder());
47     setCurrentUserFolder(msg.getCurrentUserFolder());
48     setFrom(msg.getFromRef());
49     setDateTime(msg.getDateTime());
50     setSourceAddress(msg.getSourceAddress());
51     setToRecipients(msg.getToRecipients());
52     setCallbackNumber(getCallbackNumberRef());
53     setValidityPeriodHours(msg.getValidityPeriodHours());
54
55     return *this;
56 }
57 }}
58 }