Example #1
0
 /// <summary>
 /// Submit a query to the broker specified. The command array must
 /// contain at least one command, the last of which being the command
 /// having an associated result. A session will be created to handle
 /// the commands. The callback function specified will be called when
 /// the results are available.
 /// </summary>
 public void Submit(WmKmodBroker broker, K3pCmd[] inCmdArray, KmodQueryDelegate callback)
 {
     Debug.Assert(inCmdArray.Length > 0);
     InCmdArray   = inCmdArray;
     InCmdWithRes = InCmdArray[InCmdArray.Length - 1];
     Callback     = callback;
     base.Submit(broker);
 }
Example #2
0
        /// <summary>
        /// Lookup the recipient addresses to determine if they are members.
        /// Return true if a lookup is being performed.
        /// </summary>
        public bool LookupRecAddr(KmodQueryDelegate callback, bool showWizardFlag)
        {
            // Clear the cached recipient security information.
            foreach (KwsInviteOpUser u in InviteParams.UserArray)
            {
                u.KeyID = 0;
                u.OrgName = "";
                u.Pwd = "";
            }

            // If the workspace is open, if there are no recipients to
            // invite or if all recipients are already invited, skip the lookup.
            if (!Creds.SecureFlag || InviteParams.NotAlreadyInvitedUserArray.Count == 0)
                return false;

            // Perform the key lookup.
            Op.m_opStep = KwmCoreKwsOpStep.LookupRec;

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

            // Fill out the recipient array with email addresses that are not
            // already invited to the workspace.
            List<String> addrList = new List<String>();
            foreach (KwsInviteOpUser u in InviteParams.NotAlreadyInvitedUserArray)
                addrList.Add(u.EmailAddress);

            K3p.kpp_lookup_rec_addr lra = new K3p.kpp_lookup_rec_addr();
            lra.AddrArray = addrList.ToArray();

            // Send the query.
            Op.m_kmodQuery = new KmodQuery();
            Op.m_kmodQuery.Submit(Op.Wm.KmodBroker, new K3pCmd[] { ssi, lra }, callback);

            // Tell the wizard to wait.
            if (showWizardFlag) Wiz.ShowPleaseWait("Looking up who needs a password");

            return true;
        }
Example #3
0
 /// <summary>
 /// Submit a query to the broker specified. The command array must
 /// contain at least one command, the last of which being the command
 /// having an associated result. A session will be created to handle
 /// the commands. The callback function specified will be called when
 /// the results are available.
 /// </summary>
 public void Submit(WmKmodBroker broker, K3pCmd[] inCmdArray, KmodQueryDelegate callback)
 {
     Debug.Assert(inCmdArray.Length > 0);
     InCmdArray = inCmdArray;
     InCmdWithRes = InCmdArray[InCmdArray.Length - 1];
     Callback = callback;
     base.Submit(broker);
 }