AipFileInfo.cs 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Collections.ObjectModel;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using Microsoft.InformationProtection;
  8. namespace AipGateway.AIP
  9. {
  10. public enum AipAssignmentMethod
  11. {
  12. Standard,
  13. Privileged,
  14. Auto,
  15. }
  16. public class AipContentLabel
  17. {
  18. public AipContentLabel(
  19. AipLabel label,
  20. DateTime creationTime,
  21. AipAssignmentMethod assignmentMethod,
  22. bool isProtectionAppliedFromLabel)
  23. {
  24. this.Label = label;
  25. this.CreationTime = creationTime;
  26. this.AssignmentMethod = assignmentMethod;
  27. this.IsProtectionAppliedFromLabel = isProtectionAppliedFromLabel;
  28. }
  29. /// <summary>The actual label object applied on the content.</summary>
  30. public AipLabel Label { get; private set; }
  31. /// <summary>The creation time of the label.</summary>
  32. public DateTime CreationTime { get; private set; }
  33. /// <summary>The assignment method of the label.</summary>
  34. public AipAssignmentMethod AssignmentMethod { get; private set; }
  35. /// <summary>
  36. /// Returns true if protection was applied by the label or not.
  37. /// </summary>
  38. public bool IsProtectionAppliedFromLabel { get; private set; }
  39. }
  40. public enum AipProtectionType
  41. {
  42. /// <summary>Protection was created from a template</summary>
  43. TemplateBased,
  44. /// <summary>Protection was created ad hoc</summary>
  45. Custom,
  46. }
  47. public class AipProtectionHandler
  48. {
  49. ProtectionDescriptor ProtectionDescriptor { get; }
  50. string Owner { get; }
  51. string IssuedTo { get; }
  52. bool IsIssuedToOwner { get; }
  53. string ContentId { get; }
  54. bool UseDeprecatedAlgorithms { get; }
  55. bool AuditedExtractAllowed { get; }
  56. }
  57. public class AipFileInfo
  58. {
  59. public AipContentLabel Label;
  60. }
  61. }