32 #pragma db object polymorphic callback(odb_callback) 53 virtual void before(
const std::string &repr)
override;
55 virtual void after(
const std::string &repr)
override;
57 const std::string &
before()
const override;
59 const std::string &
after()
const override;
69 #pragma db on_delete(set_null) std::string generate_description() const override
Generate a description for this event.
Auth::AccessPointLWPtr target_
odb::lazy_weak_ptr< AccessPoint > AccessPointLWPtr
unsigned long AccessPointId
Implementation of IAuditEntry, backed by ODB.
Auth::AccessPointId target_ap_id_
This is the header file for a generated source file, GitSHA1.cpp.
static std::shared_ptr< AccessPointEvent > create_empty()
std::string before_
Optional JSON dump of the object before the event took place.
Auth::AccessPointId target_id() const override
virtual ~AccessPointEvent()=default
std::shared_ptr< IAccessPoint > IAccessPointPtr
virtual IAuditEntryPtr parent() const override
Retrieve the parent of this entry.
const std::string & after() const override
static std::shared_ptr< AccessPointEvent > create(const DBPtr &database, Auth::IAccessPointPtr target_ap, AuditEntryPtr parent)
std::string after_
Optional JSON dump of the object after the event took place.
std::shared_ptr< AuditEntry > AuditEntryPtr
Interface that describes an Audit object for AccessPoint related event.
std::string generate_target_description() const
Generate a short description for the targeted AP.
const std::string & before() const override
virtual void target(Auth::IAccessPointPtr door) override
Set the AccessPoint that is targeted by the event.
std::shared_ptr< odb::database > DBPtr
void database(DBPtr db)
Set the database pointer.
Provide static methods to instanciate various Audit objects.
Provides an implementation of IAccessPointEvent.