public void FetchVaultNodeRefs(uint nodeID, pnCallback cb = null) { pnCli2Auth_VaultFetchNodeRefs req = new pnCli2Auth_VaultFetchNodeRefs(); req.fNodeID = nodeID; req.fTransID = GetTransID(); lock (fStream) { if (cb != null) fCallbacks.Add(req.fTransID, cb); req.Send(fStream); } }
private void IFetchNodeRefs() { pnCli2Auth_VaultFetchNodeRefs req = new pnCli2Auth_VaultFetchNodeRefs(); req.Read(fStream); if (fPlayerID == 0) { // Can't fetch NodeRefs if we're not logged in... pnAuth2Cli_VaultNodeRefsFetched reply = new pnAuth2Cli_VaultNodeRefsFetched(); reply.fResult = ENetError.kNetErrVaultNodeAccessViolation; reply.fTransID = req.fTransID; reply.Send(fStream); } else if (fPermissions >= pnAcctPerms.CCR) { // If we're a CCR+, then we can grab any tree we want. fVaultCli.FetchNodeRefs(req.fNodeID, new pnCallback(new pnVaultNodeRefsFetched(IOnNodeRefsFetched), req.fTransID)); } else { // For everyone else, we need to inspect the parent node for security fVaultCli.FetchNode(req.fNodeID, new pnCallback(new pnVaultNodeFetched(ITreeFetchRequest), req.fTransID)); } }