Package ghidra.feature.vt.api.main
Interface VTSession
- All Superinterfaces:
ghidra.framework.model.DomainObject
,db.util.ErrorHandler
- All Known Implementing Classes:
EmptyVTSession
,VTSessionDB
public interface VTSession
extends db.util.ErrorHandler, ghidra.framework.model.DomainObject
Main interface for a Version Tracking Session
-
Field Summary
Fields inherited from interface ghidra.framework.model.DomainObject
DO_DOMAIN_FILE_CHANGED, DO_OBJECT_CLOSED, DO_OBJECT_ERROR, DO_OBJECT_RENAMED, DO_OBJECT_RESTORED, DO_OBJECT_SAVED, DO_PROPERTY_CHANGED, undoLock
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds an Association hook that will be called whenever an association is accepted or cleared.void
addListener
(ghidra.framework.model.DomainObjectListener domainObjectListener) Adds a DomainObjectListener to this VTSession.createMatchSet
(VTProgramCorrelator correlator) Creates a new VTMatchSet that will contain all the matches discovered by some ProgramCorrletor algorithm run.createMatchTag
(String name) Creates a new match tag with the given name.void
deleteMatchTag
(VTMatchTag tag) Deletes the given VTMatchTag from this session.Returns the AssociationManager.ghidra.program.model.listing.Program
Returns the destination program associated with this VTSession.Returns the built-in VTMatchSet used to store implied VTMatches.Returns the built-in VTMatchSet used to store manually created VTMatches.getMatches
(VTAssociation association) Returns a list of all VTMatches for the given association.Returns a list of all VTMatchSets contained in this VTSessionReturns a set of all VTMatchTags in this session.getName()
Returns the name of this VTSessionghidra.program.model.listing.Program
Returns the source program associated with this VTSession.void
Removes the given Association hook.void
removeListener
(ghidra.framework.model.DomainObjectListener domainObjectListener) Removes a DomainObjectListener from this VTSession.void
save()
Saves this VTSession.void
updateDestinationProgram
(ghidra.program.model.listing.Program newProgram) void
updateSourceProgram
(ghidra.program.model.listing.Program newProgram) Methods inherited from interface ghidra.framework.model.DomainObject
addCloseListener, addConsumer, addDomainFileListener, addSynchronizedDomainObject, addTransactionListener, canLock, canRedo, canSave, canUndo, clearUndo, createPrivateEventQueue, endTransaction, flushEvents, flushPrivateEventQueue, forceLock, getAllRedoNames, getAllUndoNames, getConsumerList, getCurrentTransactionInfo, getDescription, getDomainFile, getMetadata, getModificationNumber, getOptions, getOptionsNames, getRedoName, getSynchronizedDomainObjects, getUndoName, hasExclusiveAccess, hasTerminatedTransaction, isChangeable, isChanged, isClosed, isLocked, isSendingEvents, isTemporary, isUsedBy, lock, openTransaction, redo, release, releaseSynchronizedDomainObject, removeCloseListener, removeDomainFileListener, removePrivateEventQueue, removeTransactionListener, save, saveToPackedFile, setEventsEnabled, setName, setTemporary, startTransaction, startTransaction, undo, unlock, withTransaction, withTransaction
Methods inherited from interface db.util.ErrorHandler
dbError
-
Method Details
-
getAssociationManager
VTAssociationManager getAssociationManager()Returns the AssociationManager.- Returns:
- the AssociationManager.
-
createMatchSet
Creates a new VTMatchSet that will contain all the matches discovered by some ProgramCorrletor algorithm run.- Parameters:
correlator
- the VTProgramCorrelator used to generate this set of matches that will be added to this VTMatchSet.- Returns:
- A new VTMatchSet that can be used to store VTMatch objects.
-
getMatchSets
List<VTMatchSet> getMatchSets()Returns a list of all VTMatchSets contained in this VTSession- Returns:
- a list of all VTMatchSets contained in this VTSession
-
getSourceProgram
ghidra.program.model.listing.Program getSourceProgram()Returns the source program associated with this VTSession.- Returns:
- the source program associated with this VTSession.
-
getDestinationProgram
ghidra.program.model.listing.Program getDestinationProgram()Returns the destination program associated with this VTSession.- Returns:
- the destination program associated with this VTSession.
-
getName
String getName()Returns the name of this VTSession- Specified by:
getName
in interfaceghidra.framework.model.DomainObject
- Returns:
- the name of this VTSession
-
save
Saves this VTSession.- Throws:
IOException
- if there is an exception saving
-
addListener
void addListener(ghidra.framework.model.DomainObjectListener domainObjectListener) Adds a DomainObjectListener to this VTSession.- Specified by:
addListener
in interfaceghidra.framework.model.DomainObject
- Parameters:
domainObjectListener
- the listener to add.
-
removeListener
void removeListener(ghidra.framework.model.DomainObjectListener domainObjectListener) Removes a DomainObjectListener from this VTSession.- Specified by:
removeListener
in interfaceghidra.framework.model.DomainObject
- Parameters:
domainObjectListener
- the listener to remove.
-
createMatchTag
Creates a new match tag with the given name.- Parameters:
name
- the name of the new tag to create.- Returns:
- the new VTMatchTag object.
-
deleteMatchTag
Deletes the given VTMatchTag from this session.- Parameters:
tag
- the VTMatchTag to delete.
-
getMatchTags
Set<VTMatchTag> getMatchTags()Returns a set of all VTMatchTags in this session.- Returns:
- a set of all VTMatchTags in this session.
-
getManualMatchSet
VTMatchSet getManualMatchSet()Returns the built-in VTMatchSet used to store manually created VTMatches.- Returns:
- the built-in VTMatchSet used to store manually created VTMatches.
-
getImpliedMatchSet
VTMatchSet getImpliedMatchSet()Returns the built-in VTMatchSet used to store implied VTMatches.- Returns:
- the built-in VTMatchSet used to store implied VTMatches.
-
getMatches
Returns a list of all VTMatches for the given association.- Parameters:
association
- the VTAssociation for which to retrieve all VTMatches.- Returns:
- a list of all VTMatches for the given association.
-
addAssociationHook
Adds an Association hook that will be called whenever an association is accepted or cleared.- Parameters:
hook
- the callback hook.
-
removeAssociationHook
Removes the given Association hook.- Parameters:
hook
- the callback hook to remove.
-
updateSourceProgram
void updateSourceProgram(ghidra.program.model.listing.Program newProgram) -
updateDestinationProgram
void updateDestinationProgram(ghidra.program.model.listing.Program newProgram)
-