//
// Created by Tristan Juricek on 10/13/15.
//

#ifndef FSCLIENT_NOTIFICATION_H
#define FSCLIENT_NOTIFICATION_H

#include <chrono>
#include <string>

// We pass these on from FUSE to our internal Workspace manager instance.
typedef struct Notification
{
    enum EventType {
        OPEN,
        RELEASE,
        RENAME,
        MKNOD,
        WRITE,
        CREATE,
        UNLINK
    };

    EventType event;
    std::chrono::system_clock::time_point time;
    std::string path;
    std::string path2;

    Notification(EventType e, const std::string & p)
        : event(e), time(std::chrono::system_clock::now()), path(p), path2()
    {}

    Notification(EventType e, const std::string & p1, const std::string & p2)
    : event(e), time(std::chrono::system_clock::now()), path(p1), path2(p2)
    {}
} Notification;


#endif //FSCLIENT_NOTIFICATION_H
