Release version 0.7.18
[platform/core/api/notification.git] / notification-ex / event_info_internal.h
1 /*
2  * Copyright (c) 2019 Samsung Electronics Co., Ltd.
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 #ifndef NOTIFICATION_EX_EVENT_INFO_INTERNAL_H_
18 #define NOTIFICATION_EX_EVENT_INFO_INTERNAL_H_
19
20 #include <bundle_cpp.h>
21
22 #include <string>
23 #include <list>
24
25 #include "notification-ex/common.h"
26 #include "notification-ex/ievent_info_internal.h"
27
28 #ifndef EXPORT_API
29 #define EXPORT_API __attribute__((visibility("default")))
30 #endif
31
32 namespace notification {
33
34 class EXPORT_API EventInfo : public IEventInfoInternal {
35  public:
36   EventInfo(int type, std::string owner, std::string channel = "",
37       std::string item_id = "");
38   EventInfo(tizen_base::Bundle serialized);
39   virtual ~EventInfo();
40   uid_t GetUid() const override;
41   void SetUid(uid_t uid) override;
42   NotificationError GetError() const override;
43   void SetError(NotificationError error) override;
44   int GetEventType() const override;
45   void SetEventType(int type) override;
46   std::string GetOwner() const override;
47   uid_t GetValidatedUid() const override;
48   void SetValidatedUid(uid_t uid) override;
49   void SetValidatedOwner(std::string owner) override;
50   std::string GetValidatedOwner() const override;
51   std::string GetChannel() const override;
52   std::string GetItemId() const override;
53   int GetRequestId() const override;
54   tizen_base::Bundle Serialize() const override;
55   static std::string GetString(int type);
56
57  private:
58   class Impl;
59   std::unique_ptr<Impl> impl_;
60 };
61
62 }  // namespace notification
63
64 #endif  // NOTIFICATION_EX_EVENT_INFO_INTERNAL_H_