namespace notification {
namespace item {
-EntryItem::EntryItem(std::string id, std::shared_ptr<AbstractAction> action)
- : AbstractItem(id, AbstractItem::Type::Entry), impl_(new Impl()) {
+EntryItem::EntryItem(std::shared_ptr<AbstractAction> action)
+ : AbstractItem(AbstractItem::Type::Entry), impl_(new Impl(this)) {
}
-EntryItem::EntryItem(std::shared_ptr<AbstractAction> action)
- : AbstractItem(AbstractItem::Type::Entry), impl_(new Impl()) {
+EntryItem::EntryItem(std::string id, std::shared_ptr<AbstractAction> action)
+ : AbstractItem(id, AbstractItem::Type::Entry), impl_(new Impl(this)) {
}
-EntryItem::Impl::Impl() {
+EntryItem::Impl::Impl(EntryItem* parent)
+ : parent_(parent) {
LOGI("EntryItem created");
}
namespace item {
TextItem::TextItem(std::string id, std::string text, std::string hyperlink,
std::shared_ptr<AbstractAction> action)
- : AbstractItem(id, AbstractItem::Type::Text), impl_(new Impl(text, hyperlink)) {
+ : AbstractItem(id, AbstractItem::Type::Text),
+ impl_(new Impl(this, text, hyperlink)) {
}
-TextItem::Impl::Impl(std::string text, std::string hyperlink)
- : text_(text), hyperlink_(hyperlink) {
+TextItem::Impl::Impl(TextItem* parent, std::string text, std::string hyperlink)
+ : parent_(parent), text_(text), hyperlink_(hyperlink) {
LOGI("TextItem created");
}