BinaryNinja::Project Class Reference

Public Member Functions

 Project (BNProject *project)
 
bool Open ()
 
bool Close ()
 
std::string GetId () const
 
bool IsOpen () const
 
std::string GetPath () const
 
std::string GetName () const
 
void SetName (const std::string &name)
 
std::string GetDescription () const
 
void SetDescription (const std::string &description)
 
Ref< MetadataQueryMetadata (const std::string &key)
 
bool StoreMetadata (const std::string &key, Ref< Metadata > value)
 
void RemoveMetadata (const std::string &key)
 
Ref< ProjectFolderCreateFolderFromPath (const std::string &path, Ref< ProjectFolder > parent, const std::string &description, const std::function< bool(size_t progress, size_t total)> &progressCallback={})
 
Ref< ProjectFolderCreateFolder (Ref< ProjectFolder > parent, const std::string &name, const std::string &description)
 
Ref< ProjectFolderCreateFolderUnsafe (Ref< ProjectFolder > parent, const std::string &name, const std::string &description, const std::string &id)
 
std::vector< Ref< ProjectFolder > > GetFolders () const
 
Ref< ProjectFolderGetFolderById (const std::string &id) const
 
void PushFolder (Ref< ProjectFolder > folder)
 
bool DeleteFolder (Ref< ProjectFolder > folder, const std::function< bool(size_t progress, size_t total)> &progressCallback={})
 
Ref< ProjectFileCreateFileFromPath (const std::string &path, Ref< ProjectFolder > folder, const std::string &name, const std::string &description, const std::function< bool(size_t progress, size_t total)> &progressCallback={})
 
Ref< ProjectFileCreateFileFromPathUnsafe (const std::string &path, Ref< ProjectFolder > folder, const std::string &name, const std::string &description, const std::string &id, int64_t creationTimestamp, const std::function< bool(size_t progress, size_t total)> &progressCallback={})
 
Ref< ProjectFileCreateFile_ (const std::vector< uint8_t > &contents, Ref< ProjectFolder > folder, const std::string &name, const std::string &description, const std::function< bool(size_t progress, size_t total)> &progressCallback={})
 
Ref< ProjectFileCreateFileUnsafe (const std::vector< uint8_t > &contents, Ref< ProjectFolder > folder, const std::string &name, const std::string &description, const std::string &id, int64_t creationTimestamp, const std::function< bool(size_t progress, size_t total)> &progressCallback={})
 
std::vector< Ref< ProjectFile > > GetFiles () const
 
Ref< ProjectFileGetFileById (const std::string &id) const
 
Ref< ProjectFileGetFileByPathOnDisk (const std::string &path)
 
void PushFile (Ref< ProjectFile > file)
 
bool DeleteFile_ (Ref< ProjectFile > file)
 
void RegisterNotification (ProjectNotification *notify)
 
void UnregisterNotification (ProjectNotification *notify)
 
void BeginBulkOperation ()
 
void EndBulkOperation ()
 
- Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNProject, BNNewProjectReference, BNFreeProject >
 CoreRefCountObject ()
 
virtual ~CoreRefCountObject ()
 
BNProjectGetObject () const
 
void AddRef ()
 
void Release ()
 
void AddRefForRegistration ()
 
void ReleaseForRegistration ()
 
void AddRefForCallback ()
 
void ReleaseForCallback ()
 

Static Public Member Functions

static Ref< ProjectCreateProject (const std::string &path, const std::string &name)
 
static Ref< ProjectOpenProject (const std::string &path)
 
static std::vector< Ref< Project > > GetOpenProjects ()
 
- Static Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNProject, BNNewProjectReference, BNFreeProject >
static BNProjectGetObject (CoreRefCountObject *obj)
 
static BNProjectGetObject (const CoreRefCountObject *obj)
 

Additional Inherited Members

- Public Attributes inherited from BinaryNinja::CoreRefCountObject< BNProject, BNNewProjectReference, BNFreeProject >
std::atomic< int > m_refs
 
bool m_registeredRef
 
BNProjectm_object
 

Constructor & Destructor Documentation

◆ Project()

Project::Project ( BNProject project)

Member Function Documentation

◆ CreateProject()

Ref< Project > Project::CreateProject ( const std::string &  path,
const std::string &  name 
)
static

◆ OpenProject()

Ref< Project > Project::OpenProject ( const std::string &  path)
static

◆ GetOpenProjects()

std::vector< Ref< Project > > Project::GetOpenProjects ( )
static

◆ Open()

bool Project::Open ( )

◆ Close()

bool Project::Close ( )

◆ GetId()

std::string Project::GetId ( ) const

◆ IsOpen()

bool Project::IsOpen ( ) const

◆ GetPath()

std::string Project::GetPath ( ) const

◆ GetName()

std::string Project::GetName ( ) const

◆ SetName()

void Project::SetName ( const std::string &  name)

◆ GetDescription()

std::string Project::GetDescription ( ) const

◆ SetDescription()

void Project::SetDescription ( const std::string &  description)

◆ QueryMetadata()

Ref< Metadata > Project::QueryMetadata ( const std::string &  key)

◆ StoreMetadata()

bool Project::StoreMetadata ( const std::string &  key,
Ref< Metadata value 
)

◆ RemoveMetadata()

void Project::RemoveMetadata ( const std::string &  key)

◆ CreateFolderFromPath()

Ref< ProjectFolder > Project::CreateFolderFromPath ( const std::string &  path,
Ref< ProjectFolder parent,
const std::string &  description,
const std::function< bool(size_t progress, size_t total)> &  progressCallback = {} 
)

◆ CreateFolder()

Ref< ProjectFolder > Project::CreateFolder ( Ref< ProjectFolder parent,
const std::string &  name,
const std::string &  description 
)

◆ CreateFolderUnsafe()

Ref< ProjectFolder > Project::CreateFolderUnsafe ( Ref< ProjectFolder parent,
const std::string &  name,
const std::string &  description,
const std::string &  id 
)

◆ GetFolders()

std::vector< Ref< ProjectFolder > > Project::GetFolders ( ) const

◆ GetFolderById()

Ref< ProjectFolder > Project::GetFolderById ( const std::string &  id) const

◆ PushFolder()

void Project::PushFolder ( Ref< ProjectFolder folder)

◆ DeleteFolder()

bool Project::DeleteFolder ( Ref< ProjectFolder folder,
const std::function< bool(size_t progress, size_t total)> &  progressCallback = {} 
)

◆ CreateFileFromPath()

Ref< ProjectFile > Project::CreateFileFromPath ( const std::string &  path,
Ref< ProjectFolder folder,
const std::string &  name,
const std::string &  description,
const std::function< bool(size_t progress, size_t total)> &  progressCallback = {} 
)

◆ CreateFileFromPathUnsafe()

Ref< ProjectFile > Project::CreateFileFromPathUnsafe ( const std::string &  path,
Ref< ProjectFolder folder,
const std::string &  name,
const std::string &  description,
const std::string &  id,
int64_t  creationTimestamp,
const std::function< bool(size_t progress, size_t total)> &  progressCallback = {} 
)

◆ CreateFile_()

Ref< ProjectFile > Project::CreateFile_ ( const std::vector< uint8_t > &  contents,
Ref< ProjectFolder folder,
const std::string &  name,
const std::string &  description,
const std::function< bool(size_t progress, size_t total)> &  progressCallback = {} 
)

◆ CreateFileUnsafe()

Ref< ProjectFile > Project::CreateFileUnsafe ( const std::vector< uint8_t > &  contents,
Ref< ProjectFolder folder,
const std::string &  name,
const std::string &  description,
const std::string &  id,
int64_t  creationTimestamp,
const std::function< bool(size_t progress, size_t total)> &  progressCallback = {} 
)

◆ GetFiles()

std::vector< Ref< ProjectFile > > Project::GetFiles ( ) const

◆ GetFileById()

Ref< ProjectFile > Project::GetFileById ( const std::string &  id) const

◆ GetFileByPathOnDisk()

Ref< ProjectFile > Project::GetFileByPathOnDisk ( const std::string &  path)

◆ PushFile()

void Project::PushFile ( Ref< ProjectFile file)

◆ DeleteFile_()

bool Project::DeleteFile_ ( Ref< ProjectFile file)

◆ RegisterNotification()

void Project::RegisterNotification ( ProjectNotification notify)

◆ UnregisterNotification()

void Project::UnregisterNotification ( ProjectNotification notify)

◆ BeginBulkOperation()

void Project::BeginBulkOperation ( )

◆ EndBulkOperation()

void Project::EndBulkOperation ( )