oc-mail: Use constant names in props value

This gives to the developer more information about
the property values for PidLidSharingFlavor and
PidLidSharingCapabilities.
pull/65/head
Enrique J. Hernández Blasco 2015-03-25 00:03:51 +01:00
parent 661b6694af
commit f9c8661fe6
3 changed files with 10 additions and 7 deletions

View File

@ -572,7 +572,7 @@ FillMessageHeadersFromSharingProperties (NGMutableHashMap *headers, NSDictionary
/* 0x5100 sharing flavour is not in standard but it seems to /* 0x5100 sharing flavour is not in standard but it seems to
be a denial of request + invitation message so we store be a denial of request + invitation message so we store
deny sharing flavour */ deny sharing flavour */
sharingFlavourNum = [NSNumber numberWithUnsignedInt: 0x25100]; sharingFlavourNum = [NSNumber numberWithUnsignedInt: SHARING_DENY_REQUEST];
} }
[headers setObject: sharingFlavourNum [headers setObject: sharingFlavourNum
forKey: @"X-MS-Sharing-Flavor"]; forKey: @"X-MS-Sharing-Flavor"];

View File

@ -26,6 +26,8 @@
#import "MAPIStoreMailMessage.h" #import "MAPIStoreMailMessage.h"
#import "MAPIStoreObjectProxy.h" #import "MAPIStoreObjectProxy.h"
#define SHARING_SPECIAL_FOLDER 0x40290
@interface MAPIStoreSharingMessage : MAPIStoreObjectProxy @interface MAPIStoreSharingMessage : MAPIStoreObjectProxy
{ {
struct mapistore_connection_info *connInfo; struct mapistore_connection_info *connInfo;

View File

@ -38,6 +38,7 @@
#import "MAPIStoreMailFolder.h" #import "MAPIStoreMailFolder.h"
#import "MAPIStoreSharingMessage.h" #import "MAPIStoreSharingMessage.h"
#include <mapistore/mapistore.h>
#include <mapistore/mapistore_errors.h> #include <mapistore/mapistore_errors.h>
#include <mapistore/mapistore_nameid.h> #include <mapistore/mapistore_nameid.h>
@ -175,28 +176,28 @@
value = [properties objectForKey: @"x-ms-sharing-capabilities"]; value = [properties objectForKey: @"x-ms-sharing-capabilities"];
if (value) if (value)
{ {
if ([value intValue] == 0x40290) /* Special folder */ if ([value intValue] == SHARING_SPECIAL_FOLDER)
{ {
value = [properties objectForKey: @"x-ms-sharing-responsetime"]; value = [properties objectForKey: @"x-ms-sharing-responsetime"];
auxValue = [properties objectForKey: @"x-ms-sharing-remoteuid"]; auxValue = [properties objectForKey: @"x-ms-sharing-remoteuid"];
if (value) /* A sharing request */ if (value) /* A sharing request */
{ {
if (auxValue) if (auxValue)
*data = MAPILongValue (memCtx, 0x20710); *data = MAPILongValue (memCtx, SHARING_INVITATION_REQUEST_FOLDER);
else else
*data = MAPILongValue (memCtx, 0x20500); *data = MAPILongValue (memCtx, SHARING_REQUEST_SPECIAL_FOLDER);
} }
else else
{ {
if (auxValue) /* It SHOULD be an invitation or response */ if (auxValue) /* It SHOULD be an invitation or response */
*data = MAPILongValue (memCtx, 0x20310); *data = MAPILongValue (memCtx, SHARING_INVITATION_SPECIAL_FOLDER);
else /* No remote info, then denial */ else /* No remote info, then denial */
*data = MAPILongValue (memCtx, 0x25100); *data = MAPILongValue (memCtx, SHARING_DENY_REQUEST);
} }
} }
else else
{ {
*data = MAPILongValue (memCtx, 0x310); *data = MAPILongValue (memCtx, SHARING_INVITATION_FOLDER);
} }
rc = MAPISTORE_SUCCESS; rc = MAPISTORE_SUCCESS;
} }