KeePass MSWifiPlugin
MSWifiImportPlugin.MSWifi Class Reference

Basic class for our import/export providers. We need that as both share a large set of methods. More...

Inherits FileFormatProvider.

Inherited by MSWifiImportPlugin.MSWifiSystem, and MSWifiImportPlugin.MSWifiXML.

Public Types

enum  BehaviourForExEntry {
  BehaviourForExEntry.ASK_USER = 0, BehaviourForExEntry.REPLACE, BehaviourForExEntry.RENAME_NEW_ONE, BehaviourForExEntry.CANCEL_WITHOUT_ERROR,
  BehaviourForExEntry.CANCEL_WITH_ERROR
}
 This defines the behaviour when we try to insert an entry which already exists. More...
 

Public Member Functions

PwEntry ExistingEntryInGroup (PwGroup inGroup, WlanProfile wlan)
 Searches in a given group (non-recursively) for an existing entry for a given wifi information. More...
 
PwGroup GetStandardGroup (PwDatabase pwStorage, bool askUserIfDoesntExist=true)
 Searches for the basic group. This is "WLan" in the root group. More...
 
PwEntry ImportTo (WlanProfile wlan, PwDatabase pwStorage, PwGroup group, BehaviourForExEntry behaviour=BehaviourForExEntry.ASK_USER, IStatusLogger slLogger=null, double totalProcents=60, double minProcents=20)
 Imports a wlan connection information to the database. If the entry already exists, then the parameter behaviour defines the behaviour More...
 
bool Export (PwDatabase pwStorage, PwEntry entry, Stream sOutput, IStatusLogger slLogger=null, double totalProcents=60, double minProcents=20)
 Exports a wlan connection information from the database to a .xml profil. More...
 

Properties

override String ApplicationGroup [get]
 >FileFormatProvider More...
 

Detailed Description

Basic class for our import/export providers. We need that as both share a large set of methods.

Member Enumeration Documentation

◆ BehaviourForExEntry

This defines the behaviour when we try to insert an entry which already exists.

Enumerator
ASK_USER 

We ask the user.

REPLACE 

We replace the old value.

RENAME_NEW_ONE 

We rename the new entry and inserted besides the old one.

CANCEL_WITHOUT_ERROR 

We cancel the insertation.

CANCEL_WITH_ERROR 

We cancel the insertation and raise an error.

Member Function Documentation

◆ ExistingEntryInGroup()

PwEntry MSWifiImportPlugin.MSWifi.ExistingEntryInGroup ( PwGroup  inGroup,
WlanProfile  wlan 
)

Searches in a given group (non-recursively) for an existing entry for a given wifi information.

Parameters
inGroupIn which group do we search?
wlanThe wifi information, we are looking for
Returns
An entry with the same name or null if there is none.

◆ Export()

bool MSWifiImportPlugin.MSWifi.Export ( PwDatabase  pwStorage,
PwEntry  entry,
Stream  sOutput,
IStatusLogger  slLogger = null,
double  totalProcents = 60,
double  minProcents = 20 
)

Exports a wlan connection information from the database to a .xml profil.

Parameters
pwStorageThe database in which the key lies
entryThe entry which we want to export
soutputWhere to print to the xml structure (via serialization)
slLoggerWhere we log to (can be null)
totalProcentsIf we parsed completely, how many (additional) procents of the total progress did we finish? (Senseless if slLogger = null)
minProcentsHow many procents of the total progress were already finished

Note that minProcents + totalProcents has to be less than or equal to 100.

Note furthermore that nothing is written to soutput if an error occured

Returns
Whether the export was successfull.

◆ GetStandardGroup()

PwGroup MSWifiImportPlugin.MSWifi.GetStandardGroup ( PwDatabase  pwStorage,
bool  askUserIfDoesntExist = true 
)

Searches for the basic group. This is "WLan" in the root group.

Parameters
pwStorageThe Database in which we look for the group.
askUserIfDoesntExistDo we ask the user whether we create the group, if it does not exist so far? Otherwise, we create the group without asking.
Returns
The group or null if the user did not want to create the group.

◆ ImportTo()

PwEntry MSWifiImportPlugin.MSWifi.ImportTo ( WlanProfile  wlan,
PwDatabase  pwStorage,
PwGroup  group,
BehaviourForExEntry  behaviour = BehaviourForExEntry.ASK_USER,
IStatusLogger  slLogger = null,
double  totalProcents = 60,
double  minProcents = 20 
)

Imports a wlan connection information to the database. If the entry already exists, then the parameter behaviour defines the behaviour

Parameters
wlanThe new wifi connection informations
pwStorageThe database in which the group lies
groupThe group to which we add the entry
behaviourWhat do we do if the entry already exists?
slLoggerWhere we log to (can be null)
totalProcentsIf we parsed completely, how many (additional) procents of the total progress did we finish? (Senseless if slLogger = null)
minProcentsHow many procents of the total progress were already finished

Note that minProcents + totalProcents has to be less than or equal to 100.

Returns
The entry created or null if an error occured

Property Documentation

◆ ApplicationGroup

override String MSWifiImportPlugin.MSWifi.ApplicationGroup
get

>FileFormatProvider


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