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.
20 * @author Pawel Misiak (p.misiak@samsung.com)
28 #include <dpl/shared_ptr.h>
29 #include "IMessagingTypes.h"
31 namespace WrtDeviceApis {
35 typedef DPL::SharedPtr<IAttachment> IAttachmentPtr;
37 //--------------------------------------------------------------------------
44 * value of attachment full path name
46 std::string m_attachFullPath;
49 * value of attachment short name used to display in message
51 std::string m_attachShortName;
54 * value of attachment file size
56 unsigned int m_fileSize;
59 * value of attachment mime type
61 std::string m_mimeType;
64 * information if abstract message attachment has been changed and need
66 * only name may be changed, not path
68 bool m_validAttachment;
70 bool m_isCreatedProperly;
74 explicit IAttachment();
76 void init(const std::string& fullPath,
79 virtual ~IAttachment();
82 * getter of attachment name (only name without path) value
84 std::string getShortName() const;
87 * getter of attachment name (full path) value
89 std::string getFullPath() const;
92 * getter of attachment size
94 unsigned int getFileSize() const;
97 * getter of attachment mime type
99 std::string getMimeType() const;
102 * setter of attachment mime type
104 void setMimeType(const std::string &mimeType);
107 * getter of attachment valid
109 bool getIsCreatedProperly() const;
112 * rename short name value of attachment
114 void rename(const std::string& newName);
118 void makeShortName();
120 virtual std::string getRealPath(const std::string &path) const = 0;