You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
841 B

  1. #pragma once
  2. #include <string>
  3. #include <vector>
  4. #include <memory>
  5. #include <libical/ical.h>
  6. #include <io/debug.h>
  7. #include <ical/Alarm.h>
  8. namespace ical {
  9. class Event {
  10. public:
  11. Event(icalcomponent* event_component, const std::string &file);
  12. void parse(icalcomponent* event, const std::string &file);
  13. void parse_alarms(icalcomponent* event_component);
  14. std::string get_uid() const;
  15. std::string get_summary() const;
  16. uint32_t get_dtstart() const;
  17. uint32_t get_dtend() const;
  18. std::vector<Alarm> get_alarms() const;
  19. std::vector<std::string> get_db_row() const;
  20. std::string update_row_string() const;
  21. std::string print() const;
  22. private:
  23. std::string uid;
  24. std::string summary;
  25. uint32_t dtstart;
  26. uint32_t dtend;
  27. std::vector<Alarm> alarms;
  28. std::string filename;
  29. };
  30. }