structs.d.ts 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. import type { XdrDecoder, XdrEncoder, XdrType } from '../../xdr';
  2. import type { Nfsv4FType, Nfsv4TimeHow, Nfsv4DelegType } from './constants';
  3. export declare class Nfsv4Time implements XdrType {
  4. readonly seconds: bigint;
  5. readonly nseconds: number;
  6. constructor(seconds: bigint, nseconds: number);
  7. encode(xdr: XdrEncoder): void;
  8. }
  9. export declare class Nfsv4SpecData implements XdrType {
  10. readonly specdata1: number;
  11. readonly specdata2: number;
  12. constructor(specdata1: number, specdata2: number);
  13. encode(xdr: XdrEncoder): void;
  14. }
  15. export declare class Nfsv4Fh implements XdrType {
  16. readonly data: Uint8Array;
  17. constructor(data: Uint8Array);
  18. encode(xdr: XdrEncoder): void;
  19. }
  20. export declare class Nfsv4Verifier implements XdrType {
  21. readonly data: Uint8Array;
  22. constructor(data: Uint8Array);
  23. encode(xdr: XdrEncoder): void;
  24. }
  25. export declare class Nfsv4Fsid implements XdrType {
  26. readonly major: bigint;
  27. readonly minor: bigint;
  28. constructor(major: bigint, minor: bigint);
  29. encode(xdr: XdrEncoder): void;
  30. }
  31. export declare class Nfsv4Stateid implements XdrType {
  32. readonly seqid: number;
  33. readonly other: Uint8Array;
  34. static decode(xdr: XdrDecoder): Nfsv4Stateid;
  35. constructor(seqid: number, other: Uint8Array);
  36. encode(xdr: XdrEncoder): void;
  37. }
  38. export declare class Nfsv4ChangeInfo implements XdrType {
  39. readonly atomic: boolean;
  40. readonly before: bigint;
  41. readonly after: bigint;
  42. constructor(atomic: boolean, before: bigint, after: bigint);
  43. encode(xdr: XdrEncoder): void;
  44. }
  45. export declare class Nfsv4SetTime implements XdrType {
  46. readonly how: Nfsv4TimeHow;
  47. readonly time?: Nfsv4Time | undefined;
  48. constructor(how: Nfsv4TimeHow, time?: Nfsv4Time | undefined);
  49. encode(xdr: XdrEncoder): void;
  50. }
  51. export declare class Nfsv4Bitmap implements XdrType {
  52. readonly mask: number[];
  53. constructor(mask: number[]);
  54. encode(xdr: XdrEncoder): void;
  55. }
  56. export declare class Nfsv4Fattr implements XdrType {
  57. readonly attrmask: Nfsv4Bitmap;
  58. readonly attrVals: Uint8Array;
  59. constructor(attrmask: Nfsv4Bitmap, attrVals: Uint8Array);
  60. encode(xdr: XdrEncoder): void;
  61. }
  62. export declare class Nfsv4ClientAddr implements XdrType {
  63. readonly rNetid: string;
  64. readonly rAddr: string;
  65. constructor(rNetid: string, rAddr: string);
  66. encode(xdr: XdrEncoder): void;
  67. }
  68. export declare class Nfsv4CbClient implements XdrType {
  69. readonly cbProgram: number;
  70. readonly cbLocation: Nfsv4ClientAddr;
  71. constructor(cbProgram: number, cbLocation: Nfsv4ClientAddr);
  72. encode(xdr: XdrEncoder): void;
  73. }
  74. export declare class Nfsv4ClientId implements XdrType {
  75. readonly verifier: Nfsv4Verifier;
  76. readonly id: Uint8Array;
  77. constructor(verifier: Nfsv4Verifier, id: Uint8Array);
  78. encode(xdr: XdrEncoder): void;
  79. }
  80. export declare class Nfsv4OpenOwner implements XdrType {
  81. readonly clientid: bigint;
  82. readonly owner: Uint8Array;
  83. constructor(clientid: bigint, owner: Uint8Array);
  84. encode(xdr: XdrEncoder): void;
  85. }
  86. export declare class Nfsv4LockOwner implements XdrType {
  87. readonly clientid: bigint;
  88. readonly owner: Uint8Array;
  89. constructor(clientid: bigint, owner: Uint8Array);
  90. encode(xdr: XdrEncoder): void;
  91. }
  92. export declare class Nfsv4OpenToLockOwner implements XdrType {
  93. readonly openSeqid: number;
  94. readonly openStateid: Nfsv4Stateid;
  95. readonly lockSeqid: number;
  96. readonly lockOwner: Nfsv4LockOwner;
  97. constructor(openSeqid: number, openStateid: Nfsv4Stateid, lockSeqid: number, lockOwner: Nfsv4LockOwner);
  98. encode(xdr: XdrEncoder): void;
  99. }
  100. export declare class Nfsv4FsLocation implements XdrType {
  101. readonly server: string[];
  102. readonly rootpath: string[];
  103. constructor(server: string[], rootpath: string[]);
  104. encode(xdr: XdrEncoder): void;
  105. }
  106. export declare class Nfsv4FsLocations implements XdrType {
  107. readonly fsRoot: string[];
  108. readonly locations: Nfsv4FsLocation[];
  109. constructor(fsRoot: string[], locations: Nfsv4FsLocation[]);
  110. encode(xdr: XdrEncoder): void;
  111. }
  112. export declare class Nfsv4Ace implements XdrType {
  113. readonly type: number;
  114. readonly flag: number;
  115. readonly accessMask: number;
  116. readonly who: string;
  117. constructor(type: number, flag: number, accessMask: number, who: string);
  118. encode(xdr: XdrEncoder): void;
  119. }
  120. export declare class Nfsv4Acl implements XdrType {
  121. readonly aces: Nfsv4Ace[];
  122. constructor(aces: Nfsv4Ace[]);
  123. encode(xdr: XdrEncoder): void;
  124. }
  125. export declare class Nfsv4SecInfo implements XdrType {
  126. readonly flavor: number;
  127. readonly flavorInfo?: Uint8Array | undefined;
  128. constructor(flavor: number, flavorInfo?: Uint8Array | undefined);
  129. encode(xdr: XdrEncoder): void;
  130. }
  131. export declare class Nfsv4CreateAttrs implements XdrType {
  132. readonly createattrs: Nfsv4Fattr;
  133. constructor(createattrs: Nfsv4Fattr);
  134. encode(xdr: XdrEncoder): void;
  135. }
  136. export declare class Nfsv4CreateVerf implements XdrType {
  137. readonly createverf: Nfsv4Verifier;
  138. constructor(createverf: Nfsv4Verifier);
  139. encode(xdr: XdrEncoder): void;
  140. }
  141. export declare class Nfsv4CreateHow implements XdrType {
  142. readonly mode: number;
  143. readonly how?: Nfsv4CreateAttrs | Nfsv4CreateVerf | undefined;
  144. constructor(mode: number, how?: Nfsv4CreateAttrs | Nfsv4CreateVerf | undefined);
  145. encode(xdr: XdrEncoder): void;
  146. }
  147. export declare class Nfsv4OpenHow implements XdrType {
  148. readonly opentype: number;
  149. readonly how?: Nfsv4CreateHow | undefined;
  150. constructor(opentype: number, how?: Nfsv4CreateHow | undefined);
  151. encode(xdr: XdrEncoder): void;
  152. }
  153. export declare class Nfsv4OpenClaimNull implements XdrType {
  154. readonly file: string;
  155. constructor(file: string);
  156. encode(xdr: XdrEncoder): void;
  157. }
  158. export declare class Nfsv4OpenClaimPrevious implements XdrType {
  159. readonly delegateType: Nfsv4DelegType;
  160. constructor(delegateType: Nfsv4DelegType);
  161. encode(xdr: XdrEncoder): void;
  162. }
  163. export declare class Nfsv4OpenClaimDelegateCur implements XdrType {
  164. readonly delegateStateid: Nfsv4Stateid;
  165. readonly file: string;
  166. constructor(delegateStateid: Nfsv4Stateid, file: string);
  167. encode(xdr: XdrEncoder): void;
  168. }
  169. export declare class Nfsv4OpenClaimDelegatePrev implements XdrType {
  170. readonly file: string;
  171. constructor(file: string);
  172. encode(xdr: XdrEncoder): void;
  173. }
  174. export declare class Nfsv4OpenClaim implements XdrType {
  175. readonly claimType: number;
  176. readonly claim: Nfsv4OpenClaimNull | Nfsv4OpenClaimPrevious | Nfsv4OpenClaimDelegateCur | Nfsv4OpenClaimDelegatePrev;
  177. constructor(claimType: number, claim: Nfsv4OpenClaimNull | Nfsv4OpenClaimPrevious | Nfsv4OpenClaimDelegateCur | Nfsv4OpenClaimDelegatePrev);
  178. encode(xdr: XdrEncoder): void;
  179. }
  180. export declare class Nfsv4OpenReadDelegation implements XdrType {
  181. readonly stateid: Nfsv4Stateid;
  182. readonly recall: boolean;
  183. readonly permissions: Nfsv4Ace[];
  184. constructor(stateid: Nfsv4Stateid, recall: boolean, permissions: Nfsv4Ace[]);
  185. encode(xdr: XdrEncoder): void;
  186. }
  187. export declare class Nfsv4OpenWriteDelegation implements XdrType {
  188. readonly stateid: Nfsv4Stateid;
  189. readonly recall: boolean;
  190. readonly spaceLimit: bigint;
  191. readonly permissions: Nfsv4Ace[];
  192. constructor(stateid: Nfsv4Stateid, recall: boolean, spaceLimit: bigint, permissions: Nfsv4Ace[]);
  193. encode(xdr: XdrEncoder): void;
  194. }
  195. export declare class Nfsv4OpenDelegation implements XdrType {
  196. readonly delegationType: Nfsv4DelegType;
  197. readonly delegation?: Nfsv4OpenReadDelegation | Nfsv4OpenWriteDelegation | undefined;
  198. constructor(delegationType: Nfsv4DelegType, delegation?: Nfsv4OpenReadDelegation | Nfsv4OpenWriteDelegation | undefined);
  199. encode(xdr: XdrEncoder): void;
  200. }
  201. export declare class Nfsv4Entry implements XdrType {
  202. readonly cookie: bigint;
  203. readonly name: string;
  204. readonly attrs: Nfsv4Fattr;
  205. readonly nextEntry?: Nfsv4Entry | undefined;
  206. constructor(cookie: bigint, name: string, attrs: Nfsv4Fattr, nextEntry?: Nfsv4Entry | undefined);
  207. encode(xdr: XdrEncoder): void;
  208. }
  209. export declare class Nfsv4LockNewOwner implements XdrType {
  210. readonly openToLockOwner: Nfsv4OpenToLockOwner;
  211. constructor(openToLockOwner: Nfsv4OpenToLockOwner);
  212. encode(xdr: XdrEncoder): void;
  213. }
  214. export declare class Nfsv4LockExistingOwner implements XdrType {
  215. readonly lockStateid: Nfsv4Stateid;
  216. readonly lockSeqid: number;
  217. constructor(lockStateid: Nfsv4Stateid, lockSeqid: number);
  218. encode(xdr: XdrEncoder): void;
  219. }
  220. export declare class Nfsv4LockOwnerInfo implements XdrType {
  221. readonly newLockOwner: boolean;
  222. readonly owner: Nfsv4LockNewOwner | Nfsv4LockExistingOwner;
  223. constructor(newLockOwner: boolean, owner: Nfsv4LockNewOwner | Nfsv4LockExistingOwner);
  224. encode(xdr: XdrEncoder): void;
  225. }
  226. export declare class Nfsv4CreateTypeLink implements XdrType {
  227. readonly linkdata: string;
  228. constructor(linkdata: string);
  229. encode(xdr: XdrEncoder): void;
  230. }
  231. export declare class Nfsv4CreateTypeDevice implements XdrType {
  232. readonly devdata: Nfsv4SpecData;
  233. constructor(devdata: Nfsv4SpecData);
  234. encode(xdr: XdrEncoder): void;
  235. }
  236. export declare class Nfsv4CreateTypeVoid implements XdrType {
  237. encode(xdr: XdrEncoder): void;
  238. }
  239. export declare class Nfsv4CreateType implements XdrType {
  240. readonly type: Nfsv4FType;
  241. readonly objtype: Nfsv4CreateTypeLink | Nfsv4CreateTypeDevice | Nfsv4CreateTypeVoid;
  242. constructor(type: Nfsv4FType, objtype: Nfsv4CreateTypeLink | Nfsv4CreateTypeDevice | Nfsv4CreateTypeVoid);
  243. encode(xdr: XdrEncoder): void;
  244. }
  245. export declare const enum Nfsv4RpcSecGssService {
  246. RPC_GSS_SVC_NONE = 1,
  247. RPC_GSS_SVC_INTEGRITY = 2,
  248. RPC_GSS_SVC_PRIVACY = 3
  249. }
  250. export declare class Nfsv4RpcSecGssInfo implements XdrType {
  251. readonly oid: Uint8Array;
  252. readonly qop: number;
  253. readonly service: Nfsv4RpcSecGssService;
  254. constructor(oid: Uint8Array, qop: number, service: Nfsv4RpcSecGssService);
  255. encode(xdr: XdrEncoder): void;
  256. }
  257. export declare class Nfsv4SecInfoFlavor implements XdrType {
  258. readonly flavor: number;
  259. readonly flavorInfo?: Nfsv4RpcSecGssInfo | undefined;
  260. constructor(flavor: number, flavorInfo?: Nfsv4RpcSecGssInfo | undefined);
  261. encode(xdr: XdrEncoder): void;
  262. }