public static void SetGui(SWIGTYPE_p_AB_BANKING abHandle, IAqGui guiobj) { // retrieve function pointers for callbacks msgdel = new MessageBoxDelegate(guiobj.MessageBox); MessageBoxPtr = Marshal.GetFunctionPointerForDelegate(msgdel); inputdel = new InputBoxDelegate(guiobj.InputBox); InputBoxPtr = Marshal.GetFunctionPointerForDelegate(inputdel); showdel = new ShowBoxDelegate(guiobj.ShowBox); ShowBoxPtr = Marshal.GetFunctionPointerForDelegate(showdel); passwdstatusdel = new SetPasswordStatusDelegate(guiobj.SetPasswordStatus); SetPasswordStatusPtr = Marshal.GetFunctionPointerForDelegate(passwdstatusdel); checkcertdel = new CheckCertDelegate(guiobj.CheckCert); CheckCertPtr = Marshal.GetFunctionPointerForDelegate(checkcertdel); getpassdel = new GetPasswordDelegate(guiobj.GetPassword); GetPasswordPtr = Marshal.GetFunctionPointerForDelegate(getpassdel); // register function pointers to callback gui = AqGui.GWEN_Gui_new(); AqGui.GWEN_Gui_SetMessageBoxFn(gui, MessageBoxPtr); AqGui.GWEN_Gui_SetInputBoxFn(gui, InputBoxPtr); AqGui.GWEN_Gui_SetShowBoxFn(gui, ShowBoxPtr); AqGui.GWEN_Gui_SetSetPasswordStatusFn(gui, SetPasswordStatusPtr); AqGui.GWEN_Gui_SetCheckCertFn(gui, CheckCertPtr); AqGui.GWEN_Gui_SetGetPasswordFn(gui, GetPasswordPtr); AqGui.GWEN_Gui_SetGui(gui); }
public void Init(ProviderConfig config) { if (initDone) return; this.Config = config; // configure aqbanking configuration path, default to $HOME/.aqbanking/ string configPath = Path.Combine (System.Environment.GetEnvironmentVariable ("HOME"), ".aqbanking"); if (config.Settings ["ConfigPath"] != null) configPath = config.Settings ["ConfigPath"].Value; if (!Directory.Exists (configPath)) throw new Exception ("configPath " + configPath + "does not exist!"); abHandle = AB.AB_Banking_new ("appstring", configPath, 0); // determine which gui to use string guiToUse = ""; if (config.Settings ["Gui"] != null) guiToUse = config.Settings ["Gui"].Value; switch (guiToUse) { case "ManagedConsole": // our own simple console, implemented in managed code AqGuiHandler.SetGui (abHandle, new ConsoleGui ()); break; case "AutoGui": // a non-interactive gui which requires pre-saved pin in the config var nigui = new AutoGui (); if (config.Settings ["Pin"] == null) throw new Exception ("AutoGui requires a pre-saved pin"); nigui.Pin = config.Settings ["Pin"].Value; AqGuiHandler.SetGui (abHandle, nigui); break; case "CGui": goto default; default: // default GUI is AqBankings/Gwen internal CGui var gui = AB.GWEN_Gui_CGui_new (); AB.GWEN_Gui_SetGui (gui); AB.AB_Gui_Extend (gui, abHandle); break; } // initialise aqbanking int errcode = AB.AB_Banking_Init (abHandle); if (errcode != 0) throw new Exception ("AB_Banking_Init nicht erfoglreich, fehlercode: " + errcode); if (!abHandle.Equals (IntPtr.Zero)) AB.AB_Banking_OnlineInit (abHandle); else throw new Exception ("Failed to initialize aqBanking"); initDone = true; return; }
public static void SetGui(SWIGTYPE_p_AB_BANKING abHandle, IAqGui guiobj) { // retrieve function pointers for callbacks msgdel = new MessageBoxDelegate (guiobj.MessageBox); MessageBoxPtr = Marshal.GetFunctionPointerForDelegate (msgdel); inputdel = new InputBoxDelegate (guiobj.InputBox); InputBoxPtr = Marshal.GetFunctionPointerForDelegate (inputdel); showdel = new ShowBoxDelegate (guiobj.ShowBox); ShowBoxPtr = Marshal.GetFunctionPointerForDelegate (showdel); passwdstatusdel = new SetPasswordStatusDelegate (guiobj.SetPasswordStatus); SetPasswordStatusPtr = Marshal.GetFunctionPointerForDelegate (passwdstatusdel); checkcertdel = new CheckCertDelegate (guiobj.CheckCert); CheckCertPtr = Marshal.GetFunctionPointerForDelegate (checkcertdel); getpassdel = new GetPasswordDelegate (guiobj.GetPassword); GetPasswordPtr = Marshal.GetFunctionPointerForDelegate (getpassdel); // register function pointers to callback gui = AqGui.GWEN_Gui_new (); AqGui.GWEN_Gui_SetMessageBoxFn (gui, MessageBoxPtr); AqGui.GWEN_Gui_SetInputBoxFn (gui, InputBoxPtr); AqGui.GWEN_Gui_SetShowBoxFn (gui, ShowBoxPtr); AqGui.GWEN_Gui_SetSetPasswordStatusFn (gui, SetPasswordStatusPtr); AqGui.GWEN_Gui_SetCheckCertFn (gui, CheckCertPtr); AqGui.GWEN_Gui_SetGetPasswordFn (gui, GetPasswordPtr); AqGui.GWEN_Gui_SetGui (gui); }
public AqGetTransactionsJob(AqBankAccount account, SWIGTYPE_p_AB_BANKING abHandle) : base(account, abHandle) { this.AqJobHandle = AB.AB_JobGetTransactions_new (Account.AccHandle); }
public AqGetBalanceJob(AqBankAccount account, SWIGTYPE_p_AB_BANKING abHandle) : base(account, abHandle) { this.AqJobHandle = AB.AB_JobGetBalance_new (Account.AccHandle); }
public AqJob(AqBankAccount account, SWIGTYPE_p_AB_BANKING abHandle) { this.Account = account; this.abHandle = abHandle; }
public void Init(ProviderConfig config) { if (initDone) { return; } this.Config = config; // configure aqbanking configuration path, default to $HOME/.aqbanking/ string configPath = Path.Combine(System.Environment.GetEnvironmentVariable("HOME"), ".aqbanking"); if (config.Settings ["ConfigPath"] != null) { configPath = config.Settings ["ConfigPath"].Value; } if (!Directory.Exists(configPath)) { throw new Exception("configPath " + configPath + "does not exist!"); } abHandle = AB.AB_Banking_new("appstring", configPath, 0); // determine which gui to use string guiToUse = ""; if (config.Settings ["Gui"] != null) { guiToUse = config.Settings ["Gui"].Value; } switch (guiToUse) { case "ManagedConsole": // our own simple console, implemented in managed code AqGuiHandler.SetGui(abHandle, new ConsoleGui()); break; case "AutoGui": // a non-interactive gui which requires pre-saved pin in the config var nigui = new AutoGui(); if (config.Settings ["Pin"] == null) { throw new Exception("AutoGui requires a pre-saved pin"); } nigui.Pin = config.Settings ["Pin"].Value; AqGuiHandler.SetGui(abHandle, nigui); break; case "CGui": goto default; default: // default GUI is AqBankings/Gwen internal CGui var gui = AB.GWEN_Gui_CGui_new(); AB.GWEN_Gui_SetGui(gui); AB.AB_Gui_Extend(gui, abHandle); break; } // initialise aqbanking int errcode = AB.AB_Banking_Init(abHandle); if (errcode != 0) { throw new Exception("AB_Banking_Init nicht erfoglreich, fehlercode: " + errcode); } if (!abHandle.Equals(IntPtr.Zero)) { AB.AB_Banking_OnlineInit(abHandle); } else { throw new Exception("Failed to initialize aqBanking"); } initDone = true; return; }
public AqGetTransactionsJob(AqBankAccount account, SWIGTYPE_p_AB_BANKING abHandle) : base(account, abHandle) { this.AqJobHandle = AB.AB_JobGetTransactions_new(Account.AccHandle); }
public AqGetBalanceJob(AqBankAccount account, SWIGTYPE_p_AB_BANKING abHandle) : base(account, abHandle) { this.AqJobHandle = AB.AB_JobGetBalance_new(Account.AccHandle); }
public AqJob(AqBankAccount account, SWIGTYPE_p_AB_BANKING abHandle) { this.Account = account; this.abHandle = abHandle; }