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.
 
 
 
 

41 lines
900 B

#pragma once
#include <string>
#include <memory>
#include <vector>
#include <libical/ical.h>
#include <io/debug.h>
namespace ical {
enum class action {
DISPLAY, AUDIO, EMAIL, PROC
};
enum class trigger_type {
ABSOLUTE, RELATIVE
};
class Alarm {
public:
Alarm(icalcomponent* alarm_component, const uint32_t &event_dtstart);
void parse(icalcomponent* alarm_component);
void parse_action(icalcomponent* alarm_component);
void parse_description(icalcomponent* alarm_component);
void parse_trigger(icalcomponent* alarm_component);
std::string get_action() const;
std::string get_trigger_type() const;
std::vector<std::string> get_db_row() const;
std::string print() const;
private:
const uint32_t m_event_dtstart;
action m_action;
trigger_type m_trigger;
uint32_t m_absolute_trigger;
std::string m_description;
};
}