예제 #1
0
파일: WebState.cs 프로젝트: lulzzz/simias
 /// <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();
 }
예제 #2
0
파일: WebState.cs 프로젝트: lulzzz/simias
 /// <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);
 }
예제 #3
0
파일: WebState.cs 프로젝트: lulzzz/simias
        /// <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('/') + '/';
        }
예제 #4
0
 /// <summary>
 /// Stops the service from executing.
 /// </summary>
 public void Stop()
 {
     // Unregister with the domain provider service.
     DomainProvider.Unregister(this);
 }
예제 #5
0
 /// <summary>
 /// Starts the thread service.
 /// </summary>
 public void Start()
 {
     // Register with the domain provider service.
     DomainProvider.RegisterProvider(this);
 }