OSDN Git Service

Change idx sub dir's time stamp when saving idx.
[fukui-no-namari/dialektos.git] / src / board_window.hxx
index 83fd9fd..605eb7f 100644 (file)
@@ -28,6 +28,9 @@
 #include <memory>
 #include "application_framework.hxx"
 #include "thread_list_model.hxx"
+#include "http_get.hxx"
+#include "board_subject_item.hxx"
+#include "board_subject_idx.hxx"
 
 
 namespace dialektos {
@@ -41,22 +44,39 @@ class BoardWindow: public dialektos::ApplicationFrameWork {
 public:
   static void create(std::auto_ptr<bbs_detail::Base> bbs);
   virtual ~BoardWindow();
+  virtual void save_state() const;
 protected:
   BoardWindow(std::auto_ptr<bbs_detail::Base> bbs);
 
+  void on_action_file_open();
+
+  virtual void on_action_view_refresh();
+  virtual void on_action_view_stop();
 private:
   virtual bool is_same(const bbs_detail::Base& bbs) const;
+  virtual std::string get_uri() const;
 
   void on_row_activated(const Gtk::TreeModel::Path&,
       Gtk::TreeViewColumn*);
   void load();
-  void merge_subject_txt(boost::unordered_map<std::string, ModelColumns>&);
 
+  void merge_subject_txt(
+      const std::vector<SubjectItem>&,
+      boost::unordered_map<std::string, ModelColumns>&);
+  void unmerge_subject_txt(
+      boost::unordered_map<std::string, ModelColumns>&);
+
+  void on_http_get_end(bool);
+  void on_refresh_end(const http::StatusLine&, const http::Header&);
+
+  void save_content(const http::Response&);
 
   Gtk::TreeView tree_view_;
   boost::scoped_ptr<bbs_detail::Base> bbs_;
   Gtk::ScrolledWindow scrolled_;
   Glib::RefPtr<ThreadListModel> tree_model_;
+  boost::scoped_ptr<http::GetInThread> http_getter_;
+  SubjectIdx idx_;
 };