Follow us on LinkedIn Find us on YouTube
home recent topics recent posts search faq  

Devolutions inc. > Forum

user:
psw:
| register | lost password   open id
Messages in this topic - RSS

Home » Remote Desktop Manager - SDK » ISessionImportAddOn on Session Addon possible?

Remote Desktop Manager - AddOn development forum
9/29/2010 10:33:21 AM

oki
oki
Posts: 42
Hi,
I'm trying to implement an ImportAddOn for a Session AddOn, which inherits from BaseSessionAddOn2.
Based on the SqlAddon I'm gone straight forward and implemented a Configurator Class (implement ISession) for the persistence with the properties and the static serializers, the Connectioneditor (implement ISessionEditorUserControl) to Interact with User.

I'm getting in trouble during implementing the Import Method an Importer Class (ISessionImportAddOn):
The Import Method “public ISession[] Import(string currentGroup, ImportItem[] items)”
Definition of BaseSessionAddOn2 is: public abstract class BaseSessionAddOn2 : BaseSessionAddOn, ISessionAddOn2, ISessionAddOn, IAddOn .
ISession isn’t used on any SessionAddon class and so won’t call at runtime.
How to find a common denominator? Maybe a new ISessionAddon is nessesary?
If so, this newly to defined interface can maybe also make it possible to iterate any kind of defined template Sessions for an ImportAddon and create subConnections on importing AddOn Sessions.
An ImportAddon with these features is the base of continue the implementation a SAPLogon Addon: a SapLogon is a collection of SAP System Connections on a windows/unix host. This similar to RDM with a lot of RDP Connections.

best regards,
olaf
edited by oki on 9/29/2010
0 permalink
9/29/2010 5:26:04 PM

David Hervieux
David Hervieux
Administrator
Posts: 4241
Hi,
I think that you are right, it's not possible for now to import a session addon directly. We are working on a new version of the SDK with more features. I think that your point might be an interesting feature to add.

--
David Hervieux
Devolutions inc.


0 permalink
9/29/2010 5:28:41 PM

David Hervieux
David Hervieux
Administrator
Posts: 4241
Hi again,
I read you post a second time and I have some point. ISession is not used in BaseSessionAddOn because it's implemented in the object Connection. Do an export of an exsiting session that you will have created manually and you will be able to see the structure.

After that, from this XML, I think that you might be able to import a session add on.

--
David Hervieux
Devolutions inc.


0 permalink
10/1/2010 9:23:44 AM

oki
oki
Posts: 42
Hmm,
this would be a way, but will break as soon as you change something on your internal implementation.
If you just change something on the fingerprint this would crash the AddOn and users would say that the Addon / RDM is buggy.-> this could be dangerous in gain future opportunities with this product.

I prefer a clear interface which not depends on a specific version of rdm.
0 permalink
11/5/2010 6:25:59 PM

David Hervieux
David Hervieux
Administrator
Posts: 4241
Hi,
Here is how you can do an import. I did to import an item into a SQLServer session add-on type:

// Create the addon specific configuration
SQLServerConfiguration configuration = new SQLServerConfiguration();
configuration.Server = server.Host;

ISession addOnSession = AddOnServices.CreateSession(importItem.Name, server.Host, ConnectionKind.AddOn);

// Guid of the Addon
addOnSession.SetProperty(null, "ConnectionSubType", new Guid("85C04A4D-17D8-4997-A0B2-09C7C49C50F7"));

// Version of the AddOn
addOnSession.SetProperty("AddOn", "AddOnVersion", "1.0.0.0");

addOnSession.SetProperty("AddOn", "Properties", configuration.ToXml());
addOnSession.Group = currentGroup;

addOnSession.SetCredentials(server.User, server.Pass, string.Empty);

result.Add(addOnSession);
edited by dhervieux on 11/5/2010

--
David Hervieux
Devolutions inc.


0 permalink

Home » Remote Desktop Manager - SDK » ISessionImportAddOn on Session Addon possible?





Powered by Jitbit Forum 7.0.4.0 © 2006-2011 Jitbit Software