Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Rename the mail core utility functions. Add the 'MailCore' namespace.

  • Loading branch information...
commit 1169458c58dd14fbaf2f7ff43b4fd67cb5e9d34c 1 parent f9f2b93
@pitiphong-p authored
View
6 Source/CTCoreFolder.m
@@ -719,7 +719,7 @@ - (BOOL)setExtensionFlags:(NSArray *)flags forMessage:(CTCoreMessage *)msg {
}
int err;
- clist *extensionFlags = clistFromStringArray(flags);
+ clist *extensionFlags = MailCoreClistFromStringArray(flags);
if ([msg messageStruct]->msg_flags->fl_extension) {
clist_free([msg messageStruct]->msg_flags->fl_extension);
[msg messageStruct]->msg_flags->fl_extension = NULL;
@@ -756,7 +756,7 @@ - (BOOL)flagsForMessage:(CTCoreMessage *)msg flags:(NSUInteger *)flags extension
*flags = flagStruct->fl_flags;
}
if (extensionFlags) {
- NSArray *extionsionFlags = stringArrayFromClist(flagStruct->fl_extension);
+ NSArray *extionsionFlags = MailCoreStringArrayFromClist(flagStruct->fl_extension);
*extensionFlags = extionsionFlags;
}
@@ -771,7 +771,7 @@ - (BOOL)setFlags:(NSUInteger)flags extensionFlags:(NSArray *)extensionFlags forM
int err;
[msg messageStruct]->msg_flags->fl_flags = flags;
- clist *extensions = clistFromStringArray(extensionFlags);
+ clist *extensions = MailCoreClistFromStringArray(extensionFlags);
if ([msg messageStruct]->msg_flags->fl_extension) {
clist_free([msg messageStruct]->msg_flags->fl_extension);
[msg messageStruct]->msg_flags->fl_extension = NULL;
View
10 Source/CTCoreMessage.m
@@ -466,7 +466,7 @@ - (NSUInteger)flags {
- (NSArray *)extionsionFlags {
if (myMessage != NULL && myMessage->msg_flags != NULL) {
- return stringArrayFromClist(myMessage->msg_flags->fl_extension);
+ return MailCoreStringArrayFromClist(myMessage->msg_flags->fl_extension);
}
return nil;
}
@@ -527,12 +527,12 @@ - (NSArray *)inReplyTo {
if (myFields->fld_in_reply_to == NULL)
return nil;
else
- return stringArrayFromClist(myFields->fld_in_reply_to->mid_list);
+ return MailCoreStringArrayFromClist(myFields->fld_in_reply_to->mid_list);
}
- (void)setInReplyTo:(NSArray *)messageIds {
- struct mailimf_in_reply_to *imf = mailimf_in_reply_to_new(clistFromStringArray(messageIds));
+ struct mailimf_in_reply_to *imf = mailimf_in_reply_to_new(MailCoreClistFromStringArray(messageIds));
if (myFields->fld_in_reply_to != NULL) {
mailimf_in_reply_to_free(myFields->fld_in_reply_to);
@@ -547,12 +547,12 @@ - (NSArray *)references {
if (myFields->fld_references == NULL)
return nil;
else
- return stringArrayFromClist(myFields->fld_references->mid_list);
+ return MailCoreStringArrayFromClist(myFields->fld_references->mid_list);
}
- (void)setReferences:(NSArray *)messageIds {
- struct mailimf_references *imf = mailimf_references_new(clistFromStringArray(messageIds));
+ struct mailimf_references *imf = mailimf_references_new(MailCoreClistFromStringArray(messageIds));
if (myFields->fld_references != NULL) {
mailimf_references_free(myFields->fld_references);
View
4 Source/MailCoreUtilities.h
@@ -52,6 +52,6 @@ NSError* MailCoreCreateErrorFromSMTPCode(int errcode);
NSString *MailCoreDecodeMIMEPhrase(char *data);
-NSArray * stringArrayFromClist(clist *list);
-clist *clistFromStringArray(NSArray *strings);
+NSArray * MailCoreStringArrayFromClist(clist *list);
+clist *MailCoreClistFromStringArray(NSArray *strings);
View
4 Source/MailCoreUtilities.m
@@ -285,7 +285,7 @@ void MailCoreDisableLogging() {
return result;
}
-NSArray * stringArrayFromClist(clist *list) {
+NSArray * MailCoreStringArrayFromClist(clist *list) {
clistiter *iter;
NSMutableArray *stringSet = [NSMutableArray array];
char *string;
@@ -303,7 +303,7 @@ void MailCoreDisableLogging() {
return stringSet;
}
-clist *clistFromStringArray(NSArray *strings) {
+clist *MailCoreClistFromStringArray(NSArray *strings) {
clist * str_list = clist_new();
for (NSString *str in strings) {
Please sign in to comment.
Something went wrong with that request. Please try again.