public void JoinChannel(EntityId channelId, ChannelAPI.ChannelType channelType) { JoinChannelRequest joinChannelRequest = new JoinChannelRequest(); joinChannelRequest.SetChannelId(channelId); joinChannelRequest.SetObjectId(ChannelAPI.GetNextObjectId()); ChannelAPI.ChannelData channelData = new ChannelAPI.ChannelData(this, channelId, 0uL, channelType); channelData.SetSubscriberObjectId(joinChannelRequest.ObjectId); this.m_rpcConnection.QueueRequest(this.m_channelOwnerService.Id, 3u, joinChannelRequest, new RPCContextDelegate(channelData.JoinChannelCallback), (uint)channelType); }
public void AcceptInvitation(ulong invitationId, EntityId channelId, ChannelAPI.ChannelType channelType, RPCContextDelegate callback = null) { AcceptInvitationRequest acceptInvitationRequest = new AcceptInvitationRequest(); acceptInvitationRequest.SetInvitationId(invitationId); acceptInvitationRequest.SetObjectId(ChannelAPI.GetNextObjectId()); ChannelAPI.ChannelData channelData = new ChannelAPI.ChannelData(this, channelId, 0uL, channelType); channelData.SetSubscriberObjectId(acceptInvitationRequest.ObjectId); this.m_rpcConnection.QueueRequest(ChannelAPI.m_channelInvitationService.Id, 4u, acceptInvitationRequest, delegate(RPCContext ctx) { channelData.AcceptInvitationCallback(ctx, callback); }, 0u); }