ewk_back_forward_list_item.cpp [plain text]
#include "config.h"
#include "ewk_back_forward_list_item.h"
#include "WKAPICast.h"
#include "WKBackForwardListItemRef.h"
#include "ewk_back_forward_list_item_private.h"
using namespace WebKit;
EwkBackForwardListItem::EwkBackForwardListItem(WKBackForwardListItemRef itemRef)
: m_wkItem(itemRef)
{ }
const char* EwkBackForwardListItem::url() const
{
m_url = WKEinaSharedString(AdoptWK, WKBackForwardListItemCopyURL(m_wkItem.get()));
return m_url;
}
const char* EwkBackForwardListItem::title() const
{
m_title = WKEinaSharedString(AdoptWK, WKBackForwardListItemCopyTitle(m_wkItem.get()));
return m_title;
}
const char* EwkBackForwardListItem::originalURL() const
{
m_originalURL = WKEinaSharedString(AdoptWK, WKBackForwardListItemCopyOriginalURL(m_wkItem.get()));
return m_originalURL;
}
const char* ewk_back_forward_list_item_url_get(const Ewk_Back_Forward_List_Item* item)
{
EWK_OBJ_GET_IMPL_OR_RETURN(const EwkBackForwardListItem, item, impl, nullptr);
return impl->url();
}
const char* ewk_back_forward_list_item_title_get(const Ewk_Back_Forward_List_Item* item)
{
EWK_OBJ_GET_IMPL_OR_RETURN(const EwkBackForwardListItem, item, impl, nullptr);
return impl->title();
}
const char* ewk_back_forward_list_item_original_url_get(const Ewk_Back_Forward_List_Item* item)
{
EWK_OBJ_GET_IMPL_OR_RETURN(const EwkBackForwardListItem, item, impl, nullptr);
return impl->originalURL();
}