import { AttachmentNativeBinding } from './AttachmentNativeBinding';
import { MessageHeaderNativeBinding } from './MessageHeaderNativeBinding';
import { SignExtendedInfo } from './SignExtendedInfo';

export declare class MessageParserNativeBinding {
  constructor(data?: string | Buffer, kuPolicy?: "kupNone" | "kupCheckKeyEnc" | "kupCheckKeyAgree" | "kupCheckOneOf");
  get doNotDecrypt(): boolean;
  set doNotDecrypt(decryptVal: boolean);
  get keyUsagePolicy(): "kupNone" | "kupCheckKeyEnc" | "kupCheckKeyAgree" | "kupCheckOneOf";
  set keyUsagePolicy(policyVal: "kupNone" | "kupCheckKeyEnc" | "kupCheckKeyAgree" | "kupCheckOneOf");
  public SetTempFolder(tmpFolderPath: string): void;
  public ReadAsync(fileName: string, done: (error: string | Error | undefined | null) => void): void;
  public Read(fileName: string): void;
  public ImportAsync(data: Buffer | string, done: (error: string | Error | undefined | null) => void): void;
  public Import(data: Buffer | string): void;
  get header(): MessageHeaderNativeBinding | undefined;
  public HtmlRendering(): string;
  public HtmlBodyRendering(): string;
  public PlainTextRendering(): string;
  public PlainTextBodyRendering(): string;
  // get mainPart(): MessagePartNativeBinding;
  get attachments(): AttachmentNativeBinding[];
  get htmlInlineAttachments(): AttachmentNativeBinding[];
  // get requiredPartsForRendering(): Part[]
  get isSigned(): boolean;
  get isEncrypted(): boolean;
  get verifyResult(): boolean;
  get signerCertificate(): Buffer;
  get extendedSignInfo(): SignExtendedInfo | undefined;
  get decryptResult(): boolean;
  get decryptMessage(): string;
  public clear(): void;
}

export declare interface MessageParserNativeBindingObject {
  new(data?: string | Buffer, kuPolicy?: "kupNone" | "kupCheckKeyEnc" | "kupCheckKeyAgree" | "kupCheckOneOf"): MessageParserNativeBinding
  strError(errorCode: number): string
}
