Copy the MAPI type information over completely to HSMF

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1058114 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2011-01-12 12:43:25 +00:00
parent babc3f173e
commit 112b2b584e
2 changed files with 95 additions and 539 deletions

View File

@ -161,504 +161,6 @@ public final class Attribute {
public static final AttributeID ID_UNKNOWN =
new AttributeID(-1, -1, "Unknown", null);
// MAPI IDs taken from http://msdn.microsoft.com/en-us/library/microsoft.exchange.data.contenttypes.tnef.tnefpropertyid%28v=EXCHG.140%29.aspx
// TODO Merge this with the HSMF lists if appropriate
/*
AbDefaultDir = 0x3d06,
AbDefaultPab = 0x3d07,
AbProviderId = 0x3615,
AbProviders = 0x3d01,
AbSearchPath = 0x3d05,
AbSearchPathUpdate = 0x3d11,
Access = 0xff4,
AccessLevel = 0xff7,
Account = 0x3a00,
AcknowledgementMode = 1,
Addrtype = 0x3002,
AlternateRecipient = 0x3a01,
AlternateRecipientAllowed = 2,
Anr = 0x360c,
Assistant = 0x3a30,
AssistantTelephoneNumber = 0x3a2e,
AssocContentCount = 0x3617,
AttachAdditionalInfo = 0x370f,
AttachContentBase = 0x3711,
AttachContentId = 0x3712,
AttachContentLocation = 0x3713,
AttachData = 0x3701,
AttachDisposition = 0x3716,
AttachEncoding = 0x3702,
AttachExtension = 0x3703,
AttachFilename = 0x3704,
AttachFlags = 0x3714,
AttachLongFilename = 0x3707,
AttachLongPathname = 0x370d,
AttachmentX400Parameters = 0x3700,
AttachMethod = 0x3705,
AttachMimeSequence = 0x3710,
AttachMimeTag = 0x370e,
AttachNetscapeMacInfo = 0x3715,
AttachNum = 0xe21,
AttachPathname = 0x3708,
AttachRendering = 0x3709,
AttachSize = 0xe20,
AttachTag = 0x370a,
AttachTransportName = 0x370c,
AuthorizingUsers = 3,
AutoForwardComment = 4,
AutoForwarded = 5,
AutoResponseSuppress = 0x3fdf,
BeeperTelephoneNumber = 0x3a21,
Birthday = 0x3a42,
Body = 0x1000,
BodyContentId = 0x1015,
BodyContentLocation = 0x1014,
BodyCrc = 0xe1c,
BodyHtml = 0x1013,
Business2TelephoneNumber = 0x3a1b,
BusinessAddressCity = 0x3a27,
BusinessAddressCountry = 0x3a26,
BusinessAddressPostalCode = 0x3a2a,
BusinessAddressStreet = 0x3a29,
BusinessFaxNumber = 0x3a24,
BusinessHomePage = 0x3a51,
CallbackTelephoneNumber = 0x3a02,
CarTelephoneNumber = 0x3a1e,
ChildrensNames = 0x3a58,
ClientSubmitTime = 0x39,
Comment = 0x3004,
CommonViewsEntryId = 0x35e6,
CompanyMainPhoneNumber = 0x3a57,
CompanyName = 0x3a16,
ComputerNetworkName = 0x3a49,
ContactAddrtypes = 0x3a54,
ContactDefaultAddressIndex = 0x3a55,
ContactEmailAddresses = 0x3a56,
ContactEntryIds = 0x3a53,
ContactVersion = 0x3a52,
ContainerClass = 0x3613,
ContainerContents = 0x360f,
ContainerFlags = 0x3600,
ContainerHierarchy = 0x360e,
ContainerModifyVersion = 0x3614,
ContentConfidentialityAlgorithmId = 6,
ContentCorrelator = 7,
ContentCount = 0x3602,
ContentIdentifier = 8,
ContentIntegrityCheck = 0xc00,
ContentLength = 9,
ContentReturnRequested = 10,
ContentsSortOrder = 0x360d,
ContentUnread = 0x3603,
ControlFlags = 0x3f00,
ControlId = 0x3f07,
ControlStructure = 0x3f01,
ControlType = 0x3f02,
ConversationIndex = 0x71,
ConversationKey = 11,
ConversationTopic = 0x70,
ConversionEits = 12,
ConversionProhibited = 0x3a03,
ConversionWithLossProhibited = 13,
ConvertedEits = 14,
Correlate = 0xe0c,
CorrelateMtsid = 0xe0d,
Country = 0x3a26,
CreateTemplates = 0x3604,
CreationTime = 0x3007,
CreationVersion = 0xe19,
CurrentVersion = 0xe00,
CustomerId = 0x3a4a,
DefaultProfile = 0x3d04,
DefaultStore = 0x3400,
DefaultViewEntryId = 0x3616,
DefCreateDl = 0x3611,
DefCreateMailuser = 0x3612,
DeferredDeliveryTime = 15,
Delegation = 0x7e,
DeleteAfterSubmit = 0xe01,
DeliverTime = 0x10,
DeliveryPoint = 0xc07,
Deltax = 0x3f03,
Deltay = 0x3f04,
DepartmentName = 0x3a18,
Depth = 0x3005,
DetailsTable = 0x3605,
DiscardReason = 0x11,
DiscloseRecipients = 0x3a04,
DisclosureOfRecipients = 0x12,
DiscreteValues = 0xe0e,
DiscVal = 0x4a,
DisplayBcc = 0xe02,
DisplayCc = 0xe03,
DisplayName = 0x3001,
DisplayNamePrefix = 0x3a45,
DisplayTo = 0xe04,
DisplayType = 0x3900,
DlExpansionHistory = 0x13,
DlExpansionProhibited = 20,
EmailAddress = 0x3003,
EndDate = 0x61,
EntryId = 0xfff,
ExpandBeginTime = 0x3618,
ExpandedBeginTime = 0x361a,
ExpandedEndTime = 0x361b,
ExpandEndTime = 0x3619,
ExpiryTime = 0x15,
ExplicitConversion = 0xc01,
FilteringHooks = 0x3d08,
FinderEntryId = 0x35e7,
FolderAssociatedContents = 0x3610,
FolderType = 0x3601,
FormCategory = 0x3304,
FormCategorySub = 0x3305,
FormClsid = 0x3302,
FormContactName = 0x3303,
FormDesignerGuid = 0x3309,
FormDesignerName = 0x3308,
FormHidden = 0x3307,
FormHostMap = 0x3306,
FormMessageBehavior = 0x330a,
FormVersion = 0x3301,
FtpSite = 0x3a4c,
Gender = 0x3a4d,
Generation = 0x3a05,
GivenName = 0x3a06,
GovernmentIdNumber = 0x3a07,
Hasattach = 0xe1b,
HeaderFolderEntryId = 0x3e0a,
Hobbies = 0x3a43,
Home2TelephoneNumber = 0x3a2f,
HomeAddressCity = 0x3a59,
HomeAddressCountry = 0x3a5a,
HomeAddressPostalCode = 0x3a5b,
HomeAddressPostOfficeBox = 0x3a5e,
HomeAddressStateOrProvince = 0x3a5c,
HomeAddressStreet = 0x3a5d,
HomeFaxNumber = 0x3a25,
HomeTelephoneNumber = 0x3a09,
Icon = 0xffd,
IdentityDisplay = 0x3e00,
IdentityEntryId = 0x3e01,
IdentitySearchKey = 0x3e05,
ImplicitConversionProhibited = 0x16,
Importance = 0x17,
IncompleteCopy = 0x35,
INetMailOverrideCharset = 0x5903,
INetMailOverrideFormat = 0x5902,
InitialDetailsPane = 0x3f08,
Initials = 0x3a0a,
InReplyToId = 0x1042,
InstanceKey = 0xff6,
InternetApproved = 0x1030,
InternetArticleNumber = 0xe23,
InternetControl = 0x1031,
InternetCPID = 0x3fde,
InternetDistribution = 0x1032,
InternetFollowupTo = 0x1033,
InternetLines = 0x1034,
InternetMessageId = 0x1035,
InternetNewsgroups = 0x1036,
InternetNntpPath = 0x1038,
InternetOrganization = 0x1037,
InternetPrecedence = 0x1041,
InternetReferences = 0x1039,
IpmId = 0x18,
IpmOutboxEntryId = 0x35e2,
IpmOutboxSearchKey = 0x3411,
IpmReturnRequested = 0xc02,
IpmSentmailEntryId = 0x35e4,
IpmSentmailSearchKey = 0x3413,
IpmSubtreeEntryId = 0x35e0,
IpmSubtreeSearchKey = 0x3410,
IpmWastebasketEntryId = 0x35e3,
IpmWastebasketSearchKey = 0x3412,
IsdnNumber = 0x3a2d,
Keyword = 0x3a0b,
Language = 0x3a0c,
Languages = 0x2f,
LastModificationTime = 0x3008,
LatestDeliveryTime = 0x19,
ListHelp = 0x1043,
ListSubscribe = 0x1044,
ListUnsubscribe = 0x1045,
Locality = 0x3a27,
LocallyDelivered = 0x6745,
Location = 0x3a0d,
LockBranchId = 0x3800,
LockDepth = 0x3808,
LockEnlistmentContext = 0x3804,
LockExpiryTime = 0x380a,
LockPersistent = 0x3807,
LockResourceDid = 0x3802,
LockResourceFid = 0x3801,
LockResourceMid = 0x3803,
LockScope = 0x3806,
LockTimeout = 0x3809,
LockType = 0x3805,
MailPermission = 0x3a0e,
ManagerName = 0x3a4e,
MappingSignature = 0xff8,
MdbProvider = 0x3414,
MessageAttachments = 0xe13,
MessageCcMe = 0x58,
MessageClass = 0x1a,
MessageCodepage = 0x3ffd,
MessageDeliveryId = 0x1b,
MessageDeliveryTime = 0xe06,
MessageDownloadTime = 0xe18,
MessageFlags = 0xe07,
MessageRecipients = 0xe12,
MessageRecipMe = 0x59,
MessageSecurityLabel = 30,
MessageSize = 0xe08,
MessageSubmissionId = 0x47,
MessageToken = 0xc03,
MessageToMe = 0x57,
MhsCommonName = 0x3a0f,
MiddleName = 0x3a44,
MiniIcon = 0xffc,
MobileTelephoneNumber = 0x3a1c,
ModifyVersion = 0xe1a,
MsgStatus = 0xe17,
NdrDiagCode = 0xc05,
NdrReasonCode = 0xc04,
NdrStatusCode = 0xc20,
NewsgroupName = 0xe24,
Nickname = 0x3a4f,
NntpXref = 0x1040,
NonReceiptNotificationRequested = 0xc06,
NonReceiptReason = 0x3e,
NormalizedSubject = 0xe1d,
NtSecurityDescriptor = 0xe27,
Null = 1,
ObjectType = 0xffe,
ObsoletedIpms = 0x1f,
Office2TelephoneNumber = 0x3a1b,
OfficeLocation = 0x3a19,
OfficeTelephoneNumber = 0x3a08,
OofReplyType = 0x4080,
OrganizationalIdNumber = 0x3a10,
OrigEntryId = 0x300f,
OriginalAuthorAddrtype = 0x79,
OriginalAuthorEmailAddress = 0x7a,
OriginalAuthorEntryId = 0x4c,
OriginalAuthorName = 0x4d,
OriginalAuthorSearchKey = 0x56,
OriginalDeliveryTime = 0x55,
OriginalDisplayBcc = 0x72,
OriginalDisplayCc = 0x73,
OriginalDisplayName = 0x3a13,
OriginalDisplayTo = 0x74,
OriginalEits = 0x21,
OriginalEntryId = 0x3a12,
OriginallyIntendedRecipAddrtype = 0x7b,
OriginallyIntendedRecipEmailAddress = 0x7c,
OriginallyIntendedRecipEntryId = 0x1012,
OriginallyIntendedRecipientName = 0x20,
OriginalSearchKey = 0x3a14,
OriginalSenderAddrtype = 0x66,
OriginalSenderEmailAddress = 0x67,
OriginalSenderEntryId = 0x5b,
OriginalSenderName = 90,
OriginalSenderSearchKey = 0x5c,
OriginalSensitivity = 0x2e,
OriginalSentRepresentingAddrtype = 0x68,
OriginalSentRepresentingEmailAddress = 0x69,
OriginalSentRepresentingEntryId = 0x5e,
OriginalSentRepresentingName = 0x5d,
OriginalSentRepresentingSearchKey = 0x5f,
OriginalSubject = 0x49,
OriginalSubmitTime = 0x4e,
OriginatingMtaCertificate = 0xe25,
OriginatorAndDlExpansionHistory = 0x1002,
OriginatorCertificate = 0x22,
OriginatorDeliveryReportRequested = 0x23,
OriginatorNonDeliveryReportRequested = 0xc08,
OriginatorRequestedAlternateRecipient = 0xc09,
OriginatorReturnAddress = 0x24,
OriginCheck = 0x27,
OrigMessageClass = 0x4b,
OtherAddressCity = 0x3a5f,
OtherAddressCountry = 0x3a60,
OtherAddressPostalCode = 0x3a61,
OtherAddressPostOfficeBox = 0x3a64,
OtherAddressStateOrProvince = 0x3a62,
OtherAddressStreet = 0x3a63,
OtherTelephoneNumber = 0x3a1f,
OwnerApptId = 0x62,
OwnStoreEntryId = 0x3e06,
PagerTelephoneNumber = 0x3a21,
ParentDisplay = 0xe05,
ParentEntryId = 0xe09,
ParentKey = 0x25,
PersonalHomePage = 0x3a50,
PhysicalDeliveryBureauFaxDelivery = 0xc0a,
PhysicalDeliveryMode = 0xc0b,
PhysicalDeliveryReportRequest = 0xc0c,
PhysicalForwardingAddress = 0xc0d,
PhysicalForwardingAddressRequested = 0xc0e,
PhysicalForwardingProhibited = 0xc0f,
PhysicalRenditionAttributes = 0xc10,
PostalAddress = 0x3a15,
PostalCode = 0x3a2a,
PostFolderEntries = 0x103b,
PostFolderNames = 0x103c,
PostOfficeBox = 0x3a2b,
PostReplyDenied = 0x103f,
PostReplyFolderEntries = 0x103d,
PostReplyFolderNames = 0x103e,
PreferredByName = 0x3a47,
Preprocess = 0xe22,
PrimaryCapability = 0x3904,
PrimaryFaxNumber = 0x3a23,
PrimaryTelephoneNumber = 0x3a1a,
Priority = 0x26,
Profession = 0x3a46,
ProfileName = 0x3d12,
ProofOfDelivery = 0xc11,
ProofOfDeliveryRequested = 0xc12,
ProofOfSubmission = 0xe26,
ProofOfSubmissionRequested = 40,
PropIdSecureMax = 0x67ff,
PropIdSecureMin = 0x67f0,
ProviderDisplay = 0x3006,
ProviderDllName = 0x300a,
ProviderOrdinal = 0x300d,
ProviderSubmitTime = 0x48,
ProviderUid = 0x300c,
Puid = 0x300e,
RadioTelephoneNumber = 0x3a1d,
RcvdRepresentingAddrtype = 0x77,
RcvdRepresentingEmailAddress = 120,
RcvdRepresentingEntryId = 0x43,
RcvdRepresentingName = 0x44,
RcvdRepresentingSearchKey = 0x52,
ReadReceiptEntryId = 70,
ReadReceiptRequested = 0x29,
ReadReceiptSearchKey = 0x53,
ReceiptTime = 0x2a,
ReceivedByAddrtype = 0x75,
ReceivedByEmailAddress = 0x76,
ReceivedByEntryId = 0x3f,
ReceivedByName = 0x40,
ReceivedBySearchKey = 0x51,
ReceiveFolderSettings = 0x3415,
RecipientCertificate = 0xc13,
RecipientNumberForAdvice = 0xc14,
RecipientReassignmentProhibited = 0x2b,
RecipientStatus = 0xe15,
RecipientType = 0xc15,
RecordKey = 0xff9,
RedirectionHistory = 0x2c,
ReferredByName = 0x3a47,
RegisteredMailType = 0xc16,
RelatedIpms = 0x2d,
RemoteProgress = 0x3e0b,
RemoteProgressText = 0x3e0c,
RemoteValidateOk = 0x3e0d,
RenderingPosition = 0x370b,
ReplyRecipientEntries = 0x4f,
ReplyRecipientNames = 80,
ReplyRequested = 0xc17,
ReplyTime = 0x30,
ReportEntryId = 0x45,
ReportingDlName = 0x1003,
ReportingMtaCertificate = 0x1004,
ReportName = 0x3a,
ReportSearchKey = 0x54,
ReportTag = 0x31,
ReportText = 0x1001,
ReportTime = 50,
RequestedDeliveryMethod = 0xc18,
ResourceFlags = 0x3009,
ResourceMethods = 0x3e02,
ResourcePath = 0x3e07,
ResourceType = 0x3e03,
ResponseRequested = 0x63,
Responsibility = 0xe0f,
ReturnedIpm = 0x33,
Rowid = 0x3000,
RowType = 0xff5,
RtfCompressed = 0x1009,
RtfInSync = 0xe1f,
RtfSyncBodyCount = 0x1007,
RtfSyncBodyCrc = 0x1006,
RtfSyncBodyTag = 0x1008,
RtfSyncPrefixCount = 0x1010,
RtfSyncTrailingCount = 0x1011,
Search = 0x3607,
SearchKey = 0x300b,
Security = 0x34,
Selectable = 0x3609,
SenderAddrtype = 0xc1e,
SenderEmailAddress = 0xc1f,
SenderEntryId = 0xc19,
SenderName = 0xc1a,
SenderSearchKey = 0xc1d,
SendInternetEncoding = 0x3a71,
SendRecallReport = 0x6803,
SendRichInfo = 0x3a40,
Sensitivity = 0x36,
SentmailEntryId = 0xe0a,
SentRepresentingAddrtype = 100,
SentRepresentingEmailAddress = 0x65,
SentRepresentingEntryId = 0x41,
SentRepresentingName = 0x42,
SentRepresentingSearchKey = 0x3b,
ServiceDeleteFiles = 0x3d10,
ServiceDllName = 0x3d0a,
ServiceEntryName = 0x3d0b,
ServiceExtraUids = 0x3d0d,
ServiceName = 0x3d09,
Services = 0x3d0e,
ServiceSupportFiles = 0x3d0f,
ServiceUid = 0x3d0c,
SevenBitDisplayName = 0x39ff,
SmtpAddress = 0x39fe,
SpoolerStatus = 0xe10,
SpouseName = 0x3a48,
StartDate = 0x60,
StateOrProvince = 0x3a28,
Status = 0x360b,
StatusCode = 0x3e04,
StatusString = 0x3e08,
StoreEntryId = 0xffb,
StoreProviders = 0x3d00,
StoreRecordKey = 0xffa,
StoreState = 0x340e,
StoreSupportMask = 0x340d,
StreetAddress = 0x3a29,
Subfolders = 0x360a,
Subject = 0x37,
SubjectIpm = 0x38,
SubjectPrefix = 0x3d,
SubmitFlags = 0xe14,
Supersedes = 0x103a,
SupplementaryInfo = 0xc1b,
Surname = 0x3a11,
TelexNumber = 0x3a2c,
Templateid = 0x3902,
Title = 0x3a17,
TnefCorrelationKey = 0x7f,
TransmitableDisplayName = 0x3a20,
TransportKey = 0xe16,
TransportMessageHeaders = 0x7d,
TransportProviders = 0x3d02,
TransportStatus = 0xe11,
TtytddPhoneNumber = 0x3a4b,
TypeOfMtsUser = 0xc1c,
UserCertificate = 0x3a22,
UserX509Certificate = 0x3a70,
ValidFolderMask = 0x35df,
ViewsEntryId = 0x35e5,
WeddingAnniversary = 0x3a41,
X400ContentType = 60,
X400DeferredDeliveryCancel = 0x3e09,
Xpos = 0x3f05,
Ypos = 0x3f06
*/
/**
* Holds information on one potential ID of an
* attribute, and provides handy lookups for it.

View File

@ -17,49 +17,103 @@
package org.apache.poi.hsmf.datatypes;
/**
* The types list and details are available from
* http://msdn.microsoft.com/en-us/library/microsoft.exchange.data.contenttypes.tnef.tnefpropertytype%28v=EXCHG.140%29.aspx
*/
public final class Types {
public static final int BINARY = 0x0102;
/** Unspecified */
public static final int UNSPECIFIED = 0x0000;
/**
* An 8-bit string, probably in CP1252, but don't quote us...
* Normally used for everything before Outlook 3.0, and some
* fields in Outlook 3.0
*/
public static final int ASCII_STRING = 0x001E;
/** A string, from Outlook 3.0 onwards. Normally unicode */
public static final int UNICODE_STRING = 0x001F;
/** Null - NULL property value */
public static final int NULL = 0x0001;
/** I2 - signed 16-bit value */
public static final int SHORT = 0x0002;
/** Long - signed 32-bit value */
public static final int LONG = 0x0003;
/** R4 - 4-byte floating point value */
public static final int FLOAT = 0x0004;
/** Double - floating point double */
public static final int DOUBLE = 0x0005;
/** Currency - signed 64-bit integer that represents a base ten decimal with four digits to the right of the decimal point */
public static final int CURRENCY = 0x0006;
/** AppTime - application time value */
public static final int APP_TIME = 0x0007;
/** Error - 32-bit error value */
public static final int ERROR = 0x000A;
/** Boolean - 16-bit Boolean value. '0' is false. Non-zero is true */
public static final int BOOLEAN = 0x000B;
/** Object/Directory - embedded object in a property */
public static final int DIRECTORY = 0x000D;
/** I8 - 8-byte signed integer */
public static final int LONG_LONG = 0x0014;
/** SysTime - FILETIME 64-bit integer specifying the number of 100ns periods since Jan 1, 1601 */
public static final int TIME = 0x0040;
/** ClassId - OLE GUID */
public static final int CLS_ID = 0x0048;
public static final int LONG = 0x0003;
public static final int TIME = 0x0040;
public static final int BOOLEAN = 0x000B;
public static final int DIRECTORY = 0x000D;
/** Binary - counted byte array */
public static final int BINARY = 0x0102;
public static String asFileEnding(int type) {
String str = Integer.toHexString(type).toUpperCase();
while(str.length() < 4) {
str = "0" + str;
}
return str;
}
public static String asName(int type) {
switch(type) {
case BINARY:
return "Binary";
case ASCII_STRING:
return "ASCII String";
case UNICODE_STRING:
return "Unicode String";
case LONG:
return "Long";
case TIME:
return "Time";
case BOOLEAN:
return "Boolean";
case DIRECTORY:
return "Directory";
case -1:
return "Unknown";
}
return "0x" + Integer.toHexString(type);
}
/**
* An 8-bit string, probably in CP1252, but don't quote us...
* Normally used for everything before Outlook 3.0, and some
* fields in Outlook 3.0.
*/
public static final int ASCII_STRING = 0x001E;
/** A string, from Outlook 3.0 onwards. Normally unicode */
public static final int UNICODE_STRING = 0x001F;
/** MultiValued - Value part contains multiple values */
public static final int MULTIVALUED_FLAT = 0x1000;
public static String asFileEnding(int type) {
String str = Integer.toHexString(type).toUpperCase();
while(str.length() < 4) {
str = "0" + str;
}
return str;
}
public static String asName(int type) {
switch(type) {
case BINARY:
return "Binary";
case ASCII_STRING:
return "ASCII String";
case UNICODE_STRING:
return "Unicode String";
case UNSPECIFIED:
return "Unspecified";
case NULL:
return "Null";
case SHORT:
return "Short";
case LONG:
return "Long";
case LONG_LONG:
return "Long Long";
case FLOAT:
return "Float";
case DOUBLE:
return "Double";
case CURRENCY:
return "Currency";
case APP_TIME:
return "Application Time";
case ERROR:
return "Error";
case TIME:
return "Time";
case BOOLEAN:
return "Boolean";
case CLS_ID:
return "CLS ID GUID";
case DIRECTORY:
return "Directory";
case -1:
return "Unknown";
}
return "0x" + Integer.toHexString(type);
}
}