Ejemplo n.º 1
0
 public void RegisterMethodListener(uint method_id, RPCContextDelegate callback)
 {
     if (this.Methods != null && method_id > 0u && (ulong)method_id <= (ulong)((long)this.Methods.Length))
     {
         this.Methods[(int)((UIntPtr)method_id)].RegisterListener(callback);
     }
 }
Ejemplo n.º 2
0
        public void DeclineInvitation(ulong invitationId, EntityId channelId, RPCContextDelegate callback)
        {
            GenericRequest genericRequest = new GenericRequest();

            genericRequest.SetInvitationId(invitationId);
            this.m_rpcConnection.QueueRequest(ChannelAPI.m_channelInvitationService.Id, 5u, genericRequest, callback, 0u);
        }
 public void RegisterMethodListener(uint method_id, RPCContextDelegate callback)
 {
     if (((this.Methods != null) && (method_id > 0)) && (method_id <= this.Methods.Length))
     {
         this.Methods[method_id].RegisterListener(callback);
     }
 }
Ejemplo n.º 4
0
        public void RevokeInvitation(ulong invitationId, EntityId channelId, RPCContextDelegate callback)
        {
            RevokeInvitationRequest revokeInvitationRequest = new RevokeInvitationRequest();

            revokeInvitationRequest.SetInvitationId(invitationId);
            revokeInvitationRequest.SetChannelId(channelId);
            this.m_rpcConnection.QueueRequest(ChannelAPI.m_channelInvitationService.Id, 6u, revokeInvitationRequest, callback, 0u);
        }
Ejemplo n.º 5
0
    public void RegisterServiceMethodListener(uint serviceId, uint methodId, RPCContextDelegate callback)
    {
        ServiceDescriptor exportedServiceDescriptor = this.GetExportedServiceDescriptor(serviceId);

        if (exportedServiceDescriptor != null)
        {
            exportedServiceDescriptor.RegisterMethodListener(methodId, callback);
        }
    }
Ejemplo n.º 6
0
 public void RegisterMethodListener(uint method_id, RPCContextDelegate callback)
 {
     unsafe
     {
         if (this.Methods != null && method_id > 0 && (ulong)method_id <= (long)((int)this.Methods.Length))
         {
             this.Methods[method_id].RegisterListener(callback);
         }
     }
 }
Ejemplo n.º 7
0
            public void AcceptInvitationCallback(RPCContext context, RPCContextDelegate callback)
            {
                BattleNetErrors status = (BattleNetErrors)context.Header.Status;

                if (status != BattleNetErrors.ERROR_OK)
                {
                    this.m_channelAPI.ApiLog.LogError("AcceptInvitationCallback: " + status.ToString());
                    return;
                }
                AcceptInvitationResponse acceptInvitationResponse = AcceptInvitationResponse.ParseFrom(context.Payload);

                base.SetObjectId(acceptInvitationResponse.ObjectId);
                this.m_channelAPI.AddActiveChannel(this.m_subscriberObjectId, new ChannelAPI.ChannelReferenceObject(this));
                this.m_channelAPI.ApiLog.LogDebug("AcceptInvitationCallback, status=" + status.ToString());
                if (callback != null)
                {
                    callback(context);
                }
            }
Ejemplo n.º 8
0
    public RPCContext QueueRequest(uint serviceId, uint methodId, IProtoBuf message, RPCContextDelegate callback = null, uint objectId = 0)
    {
        uint nextToken;

        if (message == null)
        {
            return(null);
        }
        object tokenLock = this.tokenLock;

        lock (tokenLock)
        {
            nextToken = RPCConnection.nextToken;
            RPCConnection.nextToken++;
        }
        RPCContext context = new RPCContext();

        if (callback != null)
        {
            context.Callback = callback;
            this.waitingForResponse.Add(nextToken, context);
        }
        bnet.protocol.Header h    = this.CreateHeader(serviceId, methodId, objectId, nextToken, message.GetSerializedSize());
        BattleNetPacket      item = new BattleNetPacket(h, message);

        context.Header  = h;
        context.Request = message;
        if (!this.m_connMetering.AllowRPCCall(serviceId, methodId))
        {
            this.m_pendingOutboundPackets.Add(item);
            this.LogOutgoingPacket(item, true);
            return(context);
        }
        this.QueuePacket(item);
        return(context);
    }
Ejemplo n.º 9
0
        public RPCContext QueueRequest(uint serviceId, uint methodId, IProtoBuf message, RPCContextDelegate callback = null, uint objectId = 0u)
        {
            if (message == null)
            {
                return(null);
            }
            object obj = this.tokenLock;
            uint   num;

            lock (obj)
            {
                num = RPCConnection.nextToken;
                RPCConnection.nextToken += 1u;
            }
            RPCContext rPCContext = new RPCContext();

            if (callback != null)
            {
                rPCContext.Callback = callback;
                this.waitingForResponse.Add(num, rPCContext);
            }
            Header          header          = this.CreateHeader(serviceId, methodId, objectId, num, message.GetSerializedSize());
            BattleNetPacket battleNetPacket = new BattleNetPacket(header, message);

            rPCContext.Header  = header;
            rPCContext.Request = message;
            if (!this.m_connMetering.AllowRPCCall(serviceId, methodId))
            {
                this.m_pendingOutboundPackets.Add(battleNetPacket);
                this.LogOutgoingPacket(battleNetPacket, true);
            }
            else
            {
                this.QueuePacket(battleNetPacket);
            }
            return(rPCContext);
        }
Ejemplo n.º 10
0
 public static void GetGameAccountState(GetGameAccountStateRequest request, RPCContextDelegate callback)
 {
     BattleNet.s_impl.GetGameAccountState(request, callback);
 }
Ejemplo n.º 11
0
 public static void SendClientRequest(ClientRequest request, RPCContextDelegate callback = null)
 {
     BattleNet.s_impl.SendClientRequest(request, callback);
 }
Ejemplo n.º 12
0
 public void GetGameAccountState(GetGameAccountStateRequest request, RPCContextDelegate callback)
 {
     this.m_rpcConnection.QueueRequest(this.m_accountService.Id, 31u, request, callback, 0u);
 }
 public void AcceptInvitation(ulong invitationId, EntityId channelId, ChannelType channelType, RPCContextDelegate callback = null)
 {
Ejemplo n.º 14
0
 public void SendClientRequest(ClientRequest request, RPCContextDelegate callback = null)
 {
     this.m_gamesAPI.SendClientRequest(request, callback);
 }
Ejemplo n.º 15
0
 public void GetGameAccountState(GetGameAccountStateRequest request, RPCContextDelegate callback)
 {
     this.m_accountAPI.GetGameAccountState(request, callback);
 }
Ejemplo n.º 16
0
        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);
        }
Ejemplo n.º 17
0
        public void SendInvitation(EntityId channelId, EntityId entityId, ChannelAPI.InvitationServiceType serviceType, RPCContextDelegate callback)
        {
            SendInvitationRequest sendInvitationRequest = new SendInvitationRequest();

            sendInvitationRequest.SetTargetId(entityId);
            InvitationParams        invitationParams        = new InvitationParams();
            ChannelInvitationParams channelInvitationParams = new ChannelInvitationParams();

            channelInvitationParams.SetChannelId(channelId);
            channelInvitationParams.SetServiceType((uint)serviceType);
            invitationParams.SetChannelParams(channelInvitationParams);
            sendInvitationRequest.SetParams(invitationParams);
            this.m_rpcConnection.QueueRequest(ChannelAPI.m_channelInvitationService.Id, 3u, sendInvitationRequest, callback, 0u);
        }
Ejemplo n.º 18
0
 public RPCContext QueueRequest(uint serviceId, uint methodId, IProtoBuf message, RPCContextDelegate callback = null, uint objectId = 0)
 {
     //
     // Current member / type: bgs.RPCContext bgs.RPCConnection::QueueRequest(System.UInt32,System.UInt32,IProtoBuf,bgs.RPCContextDelegate,System.UInt32)
     // File path: C:\apktool\WoW Companion_2.0.27325\assets\bin\Data\Managed\Assembly-CSharp.dll
     //
     // Product version: 2018.2.803.0
     // Exception in: bgs.RPCContext QueueRequest(System.UInt32,System.UInt32,IProtoBuf,bgs.RPCContextDelegate,System.UInt32)
     //
     // La référence d'objet n'est pas définie à une instance d'un objet.
     //    à ž..Žƒ() dans C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Steps\RebuildLockStatements.cs:ligne 93
     //    à ž..”(•Ÿ ) dans C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Steps\RebuildLockStatements.cs:ligne 24
     //    à †”.–.Visit(ICodeNode ) dans C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Ast\BaseCodeVisitor.cs:ligne 69
     //    à ž..œ(DecompilationContext ™, •Ÿ €–) dans C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Steps\RebuildLockStatements.cs:ligne 19
     //    à ‚–.™“.(MethodBody €–, •Ÿ Ÿ, ILanguage ) dans C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Decompiler\DecompilationPipeline.cs:ligne 88
     //    à ‚–.™“.‹(MethodBody €–, ILanguage ) dans C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Decompiler\DecompilationPipeline.cs:ligne 70
     //    à Telerik.JustDecompiler.Decompiler.Extensions.›“(™“ œ“, ILanguage , MethodBody €–, DecompilationContext& ™) dans C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Decompiler\Extensions.cs:ligne 95
     //    à Telerik.JustDecompiler.Decompiler.Extensions.š“(MethodBody €–, ILanguage , DecompilationContext& ™,  œ–) dans C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Decompiler\Extensions.cs:ligne 58
     //    à ——.ƒ˜.—(ILanguage , MethodDefinition €,  œ–) dans C:\DeveloperTooling_JD_Agent1\_work\15\s\OpenSource\Cecil.Decompiler\Decompiler\WriterContextServices\BaseWriterContextService.cs:ligne 117
     //
     // mailto: [email protected]
 }
Ejemplo n.º 19
0
 public void SendClientRequest(ClientRequest request, RPCContextDelegate callback = null)
 {
     this.m_rpcConnection.QueueRequest(this.m_gameUtilitiesService.Id, 1u, request, (callback == null) ? new RPCContextDelegate(this.ClientRequestCallback) : callback, 0u);
 }
Ejemplo n.º 20
0
        public void UpdateChannelAttributes(ChannelAPI.ChannelData channelData, List <Attribute> attributeList, RPCContextDelegate callback)
        {
            UpdateChannelStateRequest updateChannelStateRequest = new UpdateChannelStateRequest();

            bnet.protocol.channel.ChannelState channelState = new bnet.protocol.channel.ChannelState();
            using (List <Attribute> .Enumerator enumerator = attributeList.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    Attribute current = enumerator.get_Current();
                    channelState.AddAttribute(current);
                }
            }
            updateChannelStateRequest.SetStateChange(channelState);
            this.m_rpcConnection.QueueRequest(this.m_channelService.Id, 4u, updateChannelStateRequest, callback, (uint)channelData.m_objectId);
        }
Ejemplo n.º 21
0
        public void UpdateChannelAttributes(ChannelAPI.ChannelData channelData, List <bnet.protocol.attribute.Attribute> attributeList, RPCContextDelegate callback)
        {
            UpdateChannelStateRequest updateChannelStateRequest = new UpdateChannelStateRequest();

            bnet.protocol.channel.ChannelState channelState = new bnet.protocol.channel.ChannelState();
            foreach (bnet.protocol.attribute.Attribute val in attributeList)
            {
                channelState.AddAttribute(val);
            }
            updateChannelStateRequest.SetStateChange(channelState);
            this.m_rpcConnection.QueueRequest(this.m_channelService.Id, 4u, updateChannelStateRequest, callback, (uint)channelData.m_objectId);
        }
Ejemplo n.º 22
0
 public void RegisterListener(RPCContextDelegate d)
 {
     this.listener = d;
 }
Ejemplo n.º 23
0
        public void SuggestInvitation(EntityId partyId, EntityId whomToAskForApproval, EntityId whomToInvite, RPCContextDelegate callback)
        {
            SuggestInvitationRequest suggestInvitationRequest = new SuggestInvitationRequest();

            suggestInvitationRequest.SetChannelId(partyId);
            suggestInvitationRequest.SetApprovalId(whomToAskForApproval);
            suggestInvitationRequest.SetTargetId(whomToInvite);
            this.m_rpcConnection.QueueRequest(ChannelAPI.m_channelInvitationService.Id, 7u, suggestInvitationRequest, callback, 0u);
        }