Example #1
0
 protected override void PrepareCmd(AnpMsg cmd)
 {
     cmd.Type = (uint)KAnp.KANP_CMD_KWS_INVITE_KWS;
     cmd.AddString(InvitationMsg);
     cmd.AddUInt32((UInt32)UserList.Count);
     foreach (User u in UserList)
     {
         cmd.AddString(u.UserName);
         cmd.AddString(u.EmailAddress);
         cmd.AddUInt64(u.KeyID);
         cmd.AddString(u.OrgName);
         cmd.AddString(u.Pwd);
         cmd.AddUInt32(Convert.ToUInt32(KcdSendEmailFlag));
     }
 }
Example #2
0
 protected override void PrepareCmd(AnpMsg cmd)
 {
     cmd.Type = (uint)KAnp.KANP_CMD_PB_ACCEPT_CHAT;
     cmd.AddUInt64(RequestID);
     cmd.AddUInt32(UserID);
     cmd.AddUInt32(UserID);
 }
Example #3
0
 protected override void PrepareCmd(AnpMsg cmd)
 {
     cmd.Type = (uint)KAnp.KANP_CMD_CHAT_MSG;
     cmd.AddUInt32(ChannelID);
     cmd.AddString(Msg);
 }
Example #4
0
 protected override void FormatSuccessReply(AnpMsg m)
 {
     m.Type = (uint)EAnpRes.InviteKws;
     m.AddString(Wleu);
     m.AddUInt32((uint)UserList.Count);
     foreach (User u in UserList)
     {
         m.AddString(u.EmailAddress);
         m.AddString(u.Url);
         m.AddString(u.Error);
     }
 }
Example #5
0
File: EAnp.cs Project: tmbx/etkwm
 /// <summary>
 /// Add the content of this exception to the ANP message specified.
 /// This is used to serialize an EAnp exception to an ANP message.
 /// </summary>
 public virtual void Serialize(AnpMsg m)
 {
     m.AddUInt32((UInt32)FailType);
     m.AddString(Message);
 }
Example #6
0
File: EAnp.cs Project: tmbx/etkwm
 public override void Serialize(AnpMsg m)
 {
     base.Serialize(m);
     m.AddUInt32((uint)QuotaType);
 }
Example #7
0
 /// <summary>
 /// Create an EAnp event having the parameters specified.
 /// </summary>
 private AnpMsg MakeEAnpEvent(EAnpEvt type, UInt64 date, UInt32 userID, UInt64 freshness)
 {
     AnpMsg m = new AnpMsg();
     m.Minor = 1;
     m.Type = (UInt32)type;
     m.AddUInt64(InternalID);
     m.AddUInt64(date);
     m.AddUInt32(userID);
     m.AddUInt64(freshness);
     m.AddBin(Wm.MakeUuid());
     return m;
 }
Example #8
0
 protected override void FormatSuccessReply(AnpMsg m)
 {
     m.Type = (uint)EAnpRes.RegisterKps;
     m.AddUInt32((uint)ResCode);
     m.AddString(ResMsg);
 }
Example #9
0
 protected override void FormatSuccessReply(AnpMsg m)
 {
     m.Type = (uint)EAnpRes.LookupRecAddr;
     m.AddUInt32((uint)RecList.Count);
     foreach (Rec r in RecList)
     {
         m.AddString(r.Email);
         m.AddUInt64(r.KeyID);
         m.AddString(r.OrgName);
     }
 }
Example #10
0
 /// <summary>
 /// Fetch EAnp events.
 /// </summary>
 private void HandleFetchEvent(AnpMsg cmd, AnpMsg res)
 {
     int i = 0;
     UInt64 kwsID = cmd.Elements[i++].UInt64;
     UInt32 evtID = cmd.Elements[i++].UInt32;
     UInt32 limit = cmd.Elements[i++].UInt32;
     List<AnpMsg> l = Wm.LocalDbBroker.FetchEAnpEvents(kwsID, evtID, limit);
     res.Type = (uint)EAnpRes.FetchEvent;
     res.AddUInt64(Wm.Cd.UpdateFreshnessTime());
     res.AddUInt32((uint)l.Count);
     foreach (AnpMsg evt in l) res.AddBin(evt.ToByteArray(true));
 }
Example #11
0
 /// <summary>
 /// Send the select role command message.
 /// </summary>
 public void SendSelectRoleMsg()
 {
     AnpMsg msg = new AnpMsg();
     msg.Major = KAnp.Major;
     msg.Minor = KAnp.Minor;
     msg.ID = 0;
     msg.Type = KAnp.KANP_CMD_MGT_SELECT_ROLE;
     msg.AddUInt32(KAnp.KANP_KCD_ROLE_WORKSPACE);
     SafeSend(msg);
 }