123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- /* Copyright (C) 2014 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
- *
- * You can redistribute this program and/or modify it under the terms of
- * the GNU Lesser Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- */
- using System;
- using System.Collections.Generic;
- using System.Text;
- using SMBLibrary.RPC;
- using Utilities;
- namespace SMBLibrary.Services
- {
- /// <summary>
- /// [MS-SRVS] SHARE_INFO_1
- /// </summary>
- public class ShareInfo1Entry : IShareInfoEntry
- {
- public NDRUnicodeString NetName;
- public ShareTypeExtended ShareType;
- public NDRUnicodeString Remark;
- public ShareInfo1Entry()
- {
- }
- public ShareInfo1Entry(string shareName, ShareTypeExtended shareType)
- {
- NetName = new NDRUnicodeString(shareName);
- ShareType = shareType;
- Remark = new NDRUnicodeString(String.Empty);
- }
- public ShareInfo1Entry(NDRParser parser)
- {
- Read(parser);
- }
- public void Read(NDRParser parser)
- {
- parser.BeginStructure();
- parser.ReadEmbeddedStructureFullPointer(ref NetName);
- ShareType = new ShareTypeExtended(parser);
- parser.ReadEmbeddedStructureFullPointer(ref Remark);
- parser.EndStructure();
- }
- public void Write(NDRWriter writer)
- {
- writer.BeginStructure();
- writer.WriteEmbeddedStructureFullPointer(NetName);
- ShareType.Write(writer);
- writer.WriteEmbeddedStructureFullPointer(Remark);
- writer.EndStructure();
- }
- public uint Level
- {
- get
- {
- return 1;
- }
- }
- }
- }
|