BinaryNinja::FileMetadata Class Reference

Public Member Functions

 FileMetadata ()
 
 FileMetadata (const std::string &filename)
 
 FileMetadata (BNFileMetadata *file)
 
void Close ()
 
void SetNavigationHandler (NavigationHandler *handler)
 
std::string GetOriginalFilename () const
 
void SetOriginalFilename (const std::string &name)
 
std::string GetFilename () const
 
void SetFilename (const std::string &name)
 
bool IsModified () const
 
bool IsAnalysisChanged () const
 
void MarkFileModified ()
 
void MarkFileSaved ()
 
bool IsSnapshotDataAppliedWithoutError () const
 
bool IsBackedByDatabase (const std::string &binaryViewType="") const
 
bool CreateDatabase (const std::string &name, BinaryView *data, Ref< SaveSettings > settings)
 
bool CreateDatabase (const std::string &name, BinaryView *data, const std::function< bool(size_t progress, size_t total)> &progressCallback, Ref< SaveSettings > settings)
 
Ref< BinaryViewOpenExistingDatabase (const std::string &path)
 
Ref< BinaryViewOpenExistingDatabase (const std::string &path, const std::function< bool(size_t progress, size_t total)> &progressCallback)
 
Ref< BinaryViewOpenDatabaseForConfiguration (const std::string &path)
 
bool SaveAutoSnapshot (BinaryView *data, Ref< SaveSettings > settings)
 
bool SaveAutoSnapshot (BinaryView *data, const std::function< bool(size_t progress, size_t total)> &progressCallback, Ref< SaveSettings > settings)
 
void GetSnapshotData (Ref< KeyValueStore > data, Ref< KeyValueStore > cache, const std::function< bool(size_t, size_t)> &progress)
 
void ApplySnapshotData (BinaryView *file, Ref< KeyValueStore > data, Ref< KeyValueStore > cache, const std::function< bool(size_t, size_t)> &progress, bool openForConfiguration=false, bool restoreRawView=true)
 
Ref< DatabaseGetDatabase ()
 
bool Rebase (BinaryView *data, uint64_t address)
 
bool Rebase (BinaryView *data, uint64_t address, const std::function< bool(size_t progress, size_t total)> &progressCallback)
 
bool CreateSnapshotedView (BinaryView *data, const std::string &viewName)
 
bool CreateSnapshotedView (BinaryView *data, const std::string &viewName, const std::function< bool(size_t progress, size_t total)> &progressCallback)
 
MergeResult MergeUserAnalysis (const std::string &name, const std::function< bool(size_t, size_t)> &progress, const std::vector< std::string > excludedHashes={})
 
void BeginUndoActions ()
 
void CommitUndoActions ()
 
bool Undo ()
 
bool Redo ()
 
std::vector< Ref< User > > GetUsers ()
 
std::vector< UndoEntryGetUndoEntries ()
 
void ClearUndoEntries ()
 
bool OpenProject ()
 
void CloseProject ()
 
bool IsProjectOpen ()
 
std::string GetCurrentView ()
 
uint64_t GetCurrentOffset ()
 
bool Navigate (const std::string &view, uint64_t offset)
 
BinaryNinja::Ref< BinaryNinja::BinaryViewGetViewOfType (const std::string &name)
 
std::vector< std::string > GetExistingViews () const
 
size_t GetSessionId () const
 
- Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNFileMetadata, BNNewFileReference, BNFreeFileMetadata >
 CoreRefCountObject ()
 
virtual ~CoreRefCountObject ()
 
BNFileMetadata * GetObject () const
 
void AddRef ()
 
void Release ()
 
void AddRefForRegistration ()
 
void ReleaseForRegistration ()
 

Additional Inherited Members

- Static Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNFileMetadata, BNNewFileReference, BNFreeFileMetadata >
static BNFileMetadata * GetObject (CoreRefCountObject *obj)
 
- Public Attributes inherited from BinaryNinja::CoreRefCountObject< BNFileMetadata, BNNewFileReference, BNFreeFileMetadata >
std::atomic< int > m_refs
 
bool m_registeredRef
 
BNFileMetadata * m_object
 

Constructor & Destructor Documentation

◆ FileMetadata() [1/3]

FileMetadata::FileMetadata ( )

◆ FileMetadata() [2/3]

BinaryNinja::FileMetadata::FileMetadata ( const std::string &  filename)

◆ FileMetadata() [3/3]

FileMetadata::FileMetadata ( BNFileMetadata *  file)

Member Function Documentation

◆ ApplySnapshotData()

void FileMetadata::ApplySnapshotData ( BinaryView file,
Ref< KeyValueStore data,
Ref< KeyValueStore cache,
const std::function< bool(size_t, size_t)> &  progress,
bool  openForConfiguration = false,
bool  restoreRawView = true 
)

◆ BeginUndoActions()

void FileMetadata::BeginUndoActions ( )

◆ ClearUndoEntries()

void FileMetadata::ClearUndoEntries ( )

◆ Close()

void FileMetadata::Close ( )

◆ CloseProject()

void FileMetadata::CloseProject ( )

◆ CommitUndoActions()

void FileMetadata::CommitUndoActions ( )

◆ CreateDatabase() [1/2]

bool BinaryNinja::FileMetadata::CreateDatabase ( const std::string &  name,
BinaryView data,
const std::function< bool(size_t progress, size_t total)> &  progressCallback,
Ref< SaveSettings settings 
)

◆ CreateDatabase() [2/2]

bool BinaryNinja::FileMetadata::CreateDatabase ( const std::string &  name,
BinaryView data,
Ref< SaveSettings settings 
)

◆ CreateSnapshotedView() [1/2]

bool FileMetadata::CreateSnapshotedView ( BinaryView data,
const std::string &  viewName 
)

◆ CreateSnapshotedView() [2/2]

bool BinaryNinja::FileMetadata::CreateSnapshotedView ( BinaryView data,
const std::string &  viewName,
const std::function< bool(size_t progress, size_t total)> &  progressCallback 
)

◆ GetCurrentOffset()

uint64_t FileMetadata::GetCurrentOffset ( )

◆ GetCurrentView()

string FileMetadata::GetCurrentView ( )

◆ GetDatabase()

Ref< Database > FileMetadata::GetDatabase ( )

◆ GetExistingViews()

std::vector< std::string > FileMetadata::GetExistingViews ( ) const

◆ GetFilename()

string FileMetadata::GetFilename ( ) const

◆ GetOriginalFilename()

string FileMetadata::GetOriginalFilename ( ) const

◆ GetSessionId()

size_t FileMetadata::GetSessionId ( ) const

◆ GetSnapshotData()

void FileMetadata::GetSnapshotData ( Ref< KeyValueStore data,
Ref< KeyValueStore cache,
const std::function< bool(size_t, size_t)> &  progress 
)

◆ GetUndoEntries()

vector< UndoEntry > FileMetadata::GetUndoEntries ( )

◆ GetUsers()

vector< Ref< User > > FileMetadata::GetUsers ( )

◆ GetViewOfType()

Ref< BinaryView > FileMetadata::GetViewOfType ( const std::string &  name)

◆ IsAnalysisChanged()

bool FileMetadata::IsAnalysisChanged ( ) const

◆ IsBackedByDatabase()

bool FileMetadata::IsBackedByDatabase ( const std::string &  binaryViewType = "") const

◆ IsModified()

bool FileMetadata::IsModified ( ) const

◆ IsProjectOpen()

bool FileMetadata::IsProjectOpen ( )

◆ IsSnapshotDataAppliedWithoutError()

bool FileMetadata::IsSnapshotDataAppliedWithoutError ( ) const

◆ MarkFileModified()

void FileMetadata::MarkFileModified ( )

◆ MarkFileSaved()

void FileMetadata::MarkFileSaved ( )

◆ MergeUserAnalysis()

MergeResult FileMetadata::MergeUserAnalysis ( const std::string &  name,
const std::function< bool(size_t, size_t)> &  progress,
const std::vector< std::string >  excludedHashes = {} 
)

◆ Navigate()

bool FileMetadata::Navigate ( const std::string &  view,
uint64_t  offset 
)

◆ OpenDatabaseForConfiguration()

Ref< BinaryView > FileMetadata::OpenDatabaseForConfiguration ( const std::string &  path)

◆ OpenExistingDatabase() [1/2]

Ref< BinaryView > BinaryNinja::FileMetadata::OpenExistingDatabase ( const std::string &  path)

◆ OpenExistingDatabase() [2/2]

Ref< BinaryView > BinaryNinja::FileMetadata::OpenExistingDatabase ( const std::string &  path,
const std::function< bool(size_t progress, size_t total)> &  progressCallback 
)

◆ OpenProject()

bool FileMetadata::OpenProject ( )

◆ Rebase() [1/2]

bool FileMetadata::Rebase ( BinaryView data,
uint64_t  address 
)

◆ Rebase() [2/2]

bool BinaryNinja::FileMetadata::Rebase ( BinaryView data,
uint64_t  address,
const std::function< bool(size_t progress, size_t total)> &  progressCallback 
)

◆ Redo()

bool FileMetadata::Redo ( )

◆ SaveAutoSnapshot() [1/2]

bool BinaryNinja::FileMetadata::SaveAutoSnapshot ( BinaryView data,
const std::function< bool(size_t progress, size_t total)> &  progressCallback,
Ref< SaveSettings settings 
)

◆ SaveAutoSnapshot() [2/2]

bool FileMetadata::SaveAutoSnapshot ( BinaryView data,
Ref< SaveSettings settings 
)

◆ SetFilename()

void FileMetadata::SetFilename ( const std::string &  name)

◆ SetNavigationHandler()

void FileMetadata::SetNavigationHandler ( NavigationHandler handler)

◆ SetOriginalFilename()

void FileMetadata::SetOriginalFilename ( const std::string &  name)

◆ Undo()

bool FileMetadata::Undo ( )

The documentation for this class was generated from the following files: