#ifndef CHROME_BROWSER_EXTENSIONS_APP_NOTIFICATION_H_
#define CHROME_BROWSER_EXTENSIONS_APP_NOTIFICATION_H_
#include <string>
#include <vector>
#include "base/time.h"
#include "base/memory/linked_ptr.h"
#include "base/values.h"
#include "googleurl/src/gurl.h"
namespace extensions {
class AppNotification {
public:
AppNotification(bool is_local,
const base::Time& creation_time,
const std::string& guid,
const std::string& extension_id,
const std::string& title,
const std::string& body);
~AppNotification();
AppNotification* Copy();
void set_link_url(const GURL& url) { link_url_ = url; }
void set_link_text(const std::string& text) { link_text_ = text; }
void set_creation_time(const base::Time& creation_time) {
creation_time_ = creation_time;
}
bool is_local() const { return is_local_; }
const base::Time creation_time() const { return creation_time_; }
const std::string& guid() const { return guid_; }
const std::string& extension_id() const { return extension_id_; }
const std::string& title() const { return title_; }
const std::string& body() const { return body_; }
const GURL& link_url() const { return link_url_; }
const std::string& link_text() const { return link_text_; }
void ToDictionaryValue(DictionaryValue* result) const;
static AppNotification* FromDictionaryValue(const DictionaryValue& value);
bool Equals(const AppNotification& other) const;
std::string ToString() const;
private:
bool is_local_;
base::Time creation_time_;
std::string guid_;
std::string extension_id_;
std::string title_;
std::string body_;
GURL link_url_;
std::string link_text_;
DISALLOW_COPY_AND_ASSIGN(AppNotification);
};
typedef std::vector<linked_ptr<AppNotification> > AppNotificationList;
AppNotificationList* CopyAppNotificationList(const AppNotificationList& source);
}
#endif