Example #1
0
        /// <summary>
        /// Fill the values of the server info specified based on the values of
        /// the registry specified.
        /// </summary>
        public static void RegToServerInfo(KwmCfg reg, K3p.kpp_server_info info)
        {
            if (reg.CanLoginOnKps())
            {
                info.kps_login = reg.KpsUserName;
                info.kps_secret = reg.KpsLoginToken;
                info.kps_net_addr = reg.KpsAddr;
                info.kps_port_num = 443;
            }

            else
            {
                info.kps_login = "";
                info.kps_secret = "";
                info.kps_net_addr = "";
                info.kps_port_num = 0;
            }
        }
Example #2
0
 /// <summary>
 /// Write the values of this instance in the Registry and set this
 /// instance has the current configuration instance.
 /// </summary>
 public void Commit()
 {
     WriteRegistry();
     Cur = this;
 }
Example #3
0
 /// <summary>
 /// Return an instance of this class having the values read from the
 /// registry.
 /// </summary>
 public static KwmCfg Spawn()
 {
     KwmCfg self = new KwmCfg();
     self.ReadRegistry();
     return self;
 }
Example #4
0
 /// <summary>
 /// Update the registry object specified with the current information.
 /// </summary>
 private void UpdateRegistryObject(KwmCfg cfg)
 {
     cfg.KpsAddr = KpsAddr;
     cfg.KpsUserName = KpsUserName;
     cfg.KpsLoginToken = KpsLoginToken;
     cfg.KpsKcdAddr = KcdAddr;
 }
Example #5
0
 /// <summary>
 /// Submit the ticket query to KMOD.
 /// </summary>
 private void SubmitKmodTicketQuery()
 {
     WmLoginTicketQuery ticketQuery = new WmLoginTicketQuery();
     m_kmodQuery = ticketQuery;
     KwmCfg cfg = new KwmCfg();
     UpdateRegistryObject(cfg);
     ticketQuery.Submit(Wm.KmodBroker, cfg, OnKmodTicketResult);
 }
Example #6
0
        /// <summary>
        /// Submit the query using the credentials obtained from the registry
        /// specified.
        /// </summary>
        public void Submit(WmKmodBroker broker, KwmCfg cfg, WmLoginTicketQueryDelegate callback)
        {
            // Set the proper callback.
            Callback2 = callback;

            // Fill out the server information.
            K3p.K3pSetServerInfo ssi = new K3p.K3pSetServerInfo();
            WmK3pServerInfo.RegToServerInfo(cfg, ssi.Info);

            // Submit the query.
            base.Submit(broker, new K3pCmd[] { ssi, new K3p.kpp_get_kws_ticket() }, AnalyseResults);
        }