Public Member Functions

com.google.security.zynamics.binnavi.API.disassembly.DatabaseManager Class Reference

Inherits com::google::security::zynamics::binnavi::APIHelpers::ApiObject< IDatabaseManager >.

List of all members.

Public Member Functions

Database addDatabase (final String description, final String driver, final String host, final String name, final String user, final String password, final String identity, final boolean savePassword, final boolean autoConnect)
void addListener (final IDatabaseManagerListener listener)
List< DatabasegetDatabases ()
Iterator< Databaseiterator ()
void removeDatabase (final Database database)
void removeListener (final IDatabaseManagerListener listener)
String toString ()

Detailed Description

The database manager keeps track of the database configurations that are known to com.google.security.zynamics.binnavi. It can be used to access the individual database configurations, to create new database configurations, or to delete existing instances.


Member Function Documentation

Database com.google.security.zynamics.binnavi.API.disassembly.DatabaseManager.addDatabase ( final String  description,
final String  driver,
final String  host,
final String  name,
final String  user,
final String  password,
final String  identity,
final boolean  savePassword,
final boolean  autoConnect 
)

Adds a new database configuration to the database manager.

Parameters:
description The description of the new database configuration. This is the text that is displayed in the project tree.
driver The driver that is used to connect to the database.
host Host address of the database server.
name The name of the database on the database server.
user The user that is used to connect to the database.
password The password that is used to connect to the database.
identity The identity under which the current user operates.
savePassword Flag that indicates whether the password should be saved in the configuration file.
autoConnect Flag that indicates whether this a connection to this database is established automatically when BinNavi starts.
Returns:
The created database.
Exceptions:
IllegalArgumentException Thrown if any of the passed arguments are null.
void com.google.security.zynamics.binnavi.API.disassembly.DatabaseManager.addListener ( final IDatabaseManagerListener  listener  ) 

Adds a listener that is notified about changes in the database manager.

Parameters:
listener The listener object that is notified about changes in the database manager.
Exceptions:
IllegalArgumentException Thrown if the listener argument is null.
IllegalStateException Thrown if the listener object is already listening on the database manager.
List<Database> com.google.security.zynamics.binnavi.API.disassembly.DatabaseManager.getDatabases (  ) 

Returns a list of all database configurations known to the database manager.

Please note that the order of the databases inside the manager is not deterministic and may change at any time. If you reuse calculated indices into the returned list you will get undefined behavior.

Returns:
A list of database configurations.
Iterator<Database> com.google.security.zynamics.binnavi.API.disassembly.DatabaseManager.iterator (  ) 

Returns an iterator that can be used to iterate over the databases managed by this database manager.

Returns:
An iterator to iterate over the managed database.
void com.google.security.zynamics.binnavi.API.disassembly.DatabaseManager.removeDatabase ( final Database  database  ) 

Removes a database from the manager. If a database is removed from the database manager it is no longer available in com.google.security.zynamics.binnavi.

Parameters:
database The database to remove.
void com.google.security.zynamics.binnavi.API.disassembly.DatabaseManager.removeListener ( final IDatabaseManagerListener  listener  ) 

Removes a listener object from the database manager.

Parameters:
listener The listener object to remove from the database manager.
Exceptions:
IllegalArgumentException Thrown if the listener argument is null.
IllegalStateException Thrown if the listener object was not listening on the database manager.
String com.google.security.zynamics.binnavi.API.disassembly.DatabaseManager.toString (  ) 

Returns a string representation of the database manager.

Returns:
A string representation of the database manager.