12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- using System;
- using System.Collections.Generic;
- using SMBLibrary.RPC;
- using Utilities;
- namespace SMBLibrary.Services
- {
-
-
-
- public class ServerInfo : INDRStructure
- {
- public uint Level;
- public ServerInfoLevel Info;
- public ServerInfo()
- {
- }
- public ServerInfo(uint level)
- {
- Level = level;
- }
- public ServerInfo(ServerInfoLevel info)
- {
- Level = info.Level;
- Info = info;
- }
- public ServerInfo(NDRParser parser)
- {
- Read(parser);
- }
- public void Read(NDRParser parser)
- {
- parser.BeginStructure();
- Level = parser.ReadUInt32();
- switch (Level)
- {
- case 100:
- ServerInfo100 info100 = null;
- parser.ReadEmbeddedStructureFullPointer<ServerInfo100>(ref info100);
- Info = info100;
- break;
- case 101:
- ServerInfo101 info101 = null;
- parser.ReadEmbeddedStructureFullPointer<ServerInfo101>(ref info101);
- Info = info101;
- break;
- default:
- throw new NotImplementedException();
- }
- ;
- parser.EndStructure();
- }
- public void Write(NDRWriter writer)
- {
- writer.BeginStructure();
- writer.WriteUInt32(Level);
- writer.WriteEmbeddedStructureFullPointer(Info);
- writer.EndStructure();
- }
- }
- }
|