/// <summary> /// Constructor to create new host connection /// </summary> /// <param name="domainID">ID of the domain</param> /// <param name="userID">User Id</param> /// <param name="authType">Authentication type</param> /// <param name="member">Member name</param> private HostConnection(string domainID, string userID, SimiasConnection.AuthType authType, Member member) { this.domainID = domainID; this.userID = userID; this.collectionID = domainID; this.hostID = member.HomeServer.UserID; this.authType = authType; baseUri = DomainProvider.ResolvePOBoxLocation(domainID, member.UserID).ToString(); }
/// <summary> /// Constructor to create new host connection /// </summary> /// <param name="domainID">ID of the domain</param> /// <param name="userID">User Id</param> /// <param name="authType">Authentication type</param> /// <param name="host">Host name</param> private HostConnection(string domainID, string userID, SimiasConnection.AuthType authType, HostNode host) { this.domainID = domainID; this.userID = userID; this.collectionID = domainID; this.hostID = host.UserID; this.authType = authType; baseUri = DomainProvider.ResolveHostAddress(domainID, host.UserID).ToString(); log.Debug("dID {0}, hUID {1}, UID {2}", domainID, host.UserID, userID); }
/// <summary> /// Construction to create new Host connection /// </summary> /// <param name="domainID">Id of the Domain</param> /// <param name="userID">Id of the User</param> /// <param name="authType">Authentication type</param> /// <param name="collection">Collection Name</param> private HostConnection(string domainID, string userID, SimiasConnection.AuthType authType, Collection collection) { this.domainID = domainID; this.userID = userID; this.collectionID = collection.ID; this.hostID = collection.HostID; //need to add the collection.SSL property here to Host, so that collection based SSL sync can be done this.ssl = collection.SSL; //there is collection.UseSSL -> need to see who uses it this.authType = authType; // baseUri = DomainProvider.ResolveLocation( collection ).ToString(); System.UriBuilder uri = new UriBuilder(DomainProvider.ResolveLocation(collection).ToString()); if (collection.SSL) { uri.Scheme = Uri.UriSchemeHttps; } baseUri = uri.ToString().TrimEnd('/') + '/'; //baseUri = baseUri.TrimEnd('/') + '/'; }
/// <summary> /// Stops the service from executing. /// </summary> public void Stop() { // Unregister with the domain provider service. DomainProvider.Unregister(this); }
/// <summary> /// Starts the thread service. /// </summary> public void Start() { // Register with the domain provider service. DomainProvider.RegisterProvider(this); }