Create a new HSMF MAPI Attributes class to hold the attribute list in a strongly typed way, based on the MSDN published properties list
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1057665 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3215f32e54
commit
7978095929
1064
src/scratchpad/src/org/apache/poi/hsmf/datatypes/MAPIAttribute.java
Normal file
1064
src/scratchpad/src/org/apache/poi/hsmf/datatypes/MAPIAttribute.java
Normal file
File diff suppressed because it is too large
Load Diff
@ -32,12 +32,12 @@ import java.util.List;
|
|||||||
public final class RecipientChunks implements ChunkGroup {
|
public final class RecipientChunks implements ChunkGroup {
|
||||||
public static final String PREFIX = "__recip_version1.0_#";
|
public static final String PREFIX = "__recip_version1.0_#";
|
||||||
|
|
||||||
public static final int RECIPIENT_NAME = 0x3001;
|
public static final MAPIAttribute RECIPIENT_NAME = MAPIAttribute.DISPLAY_NAME;
|
||||||
public static final int DELIVERY_TYPE = 0x3002;
|
public static final MAPIAttribute DELIVERY_TYPE = MAPIAttribute.ADDRTYPE;
|
||||||
public static final int RECIPIENT_EMAIL_ADDRESS = 0x3003;
|
public static final MAPIAttribute RECIPIENT_EMAIL_ADDRESS = MAPIAttribute.EMAIL_ADDRESS;
|
||||||
public static final int RECIPIENT_SEARCH = 0x300B;
|
public static final MAPIAttribute RECIPIENT_SEARCH = MAPIAttribute.SEARCH_KEY;
|
||||||
public static final int RECIPIENT_SMTP_ADDRESS = 0x39FE;
|
public static final MAPIAttribute RECIPIENT_SMTP_ADDRESS = MAPIAttribute.SMTP_ADDRESS;
|
||||||
public static final int RECIPIENT_DISPLAY_NAME = 0x5FF6;
|
public static final MAPIAttribute RECIPIENT_DISPLAY_NAME = MAPIAttribute.RECIPIENT_DISPLAY_NAME;
|
||||||
|
|
||||||
/** Our 0 based position in the list of recipients */
|
/** Our 0 based position in the list of recipients */
|
||||||
public int recipientNumber;
|
public int recipientNumber;
|
||||||
@ -167,26 +167,24 @@ public final class RecipientChunks implements ChunkGroup {
|
|||||||
* Called by the parser whenever a chunk is found.
|
* Called by the parser whenever a chunk is found.
|
||||||
*/
|
*/
|
||||||
public void record(Chunk chunk) {
|
public void record(Chunk chunk) {
|
||||||
switch(chunk.getChunkId()) {
|
if(chunk.getChunkId() == RECIPIENT_SEARCH.id) {
|
||||||
case RECIPIENT_SEARCH:
|
|
||||||
// TODO - parse
|
// TODO - parse
|
||||||
recipientSearchChunk = (ByteChunk)chunk;
|
recipientSearchChunk = (ByteChunk)chunk;
|
||||||
break;
|
}
|
||||||
case RECIPIENT_NAME:
|
else if(chunk.getChunkId() == RECIPIENT_NAME.id) {
|
||||||
recipientDisplayNameChunk = (StringChunk)chunk;
|
recipientDisplayNameChunk = (StringChunk)chunk;
|
||||||
break;
|
}
|
||||||
case RECIPIENT_DISPLAY_NAME:
|
else if(chunk.getChunkId() == RECIPIENT_DISPLAY_NAME.id) {
|
||||||
recipientNameChunk = (StringChunk)chunk;
|
recipientNameChunk = (StringChunk)chunk;
|
||||||
break;
|
}
|
||||||
case RECIPIENT_EMAIL_ADDRESS:
|
else if(chunk.getChunkId() == RECIPIENT_EMAIL_ADDRESS.id) {
|
||||||
recipientEmailChunk = (StringChunk)chunk;
|
recipientEmailChunk = (StringChunk)chunk;
|
||||||
break;
|
}
|
||||||
case RECIPIENT_SMTP_ADDRESS:
|
else if(chunk.getChunkId() == RECIPIENT_SMTP_ADDRESS.id) {
|
||||||
recipientSMTPChunk = (StringChunk)chunk;
|
recipientSMTPChunk = (StringChunk)chunk;
|
||||||
break;
|
}
|
||||||
case DELIVERY_TYPE:
|
else if(chunk.getChunkId() == DELIVERY_TYPE.id) {
|
||||||
deliveryTypeChunk = (StringChunk)chunk;
|
deliveryTypeChunk = (StringChunk)chunk;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// And add to the main list
|
// And add to the main list
|
||||||
|
Loading…
Reference in New Issue
Block a user