IMAP: New folders will now adopt default mail attributes.

* Added a function CopyMailFolderAttributes() that copies the attribute
  layout from the text/x-email default query folder.
* This using the new CopyAttributes() method in libshared that is pretty
  much a copy of a similar method from copyattr. However, I did not
  replace the latter, as that one allows for more fine grained error
  reporting (and attribute filtering).
* Closes ticket #3498.
This commit is contained in:
Axel Dörfler
2016-01-14 21:00:38 +01:00
parent 4681e405ef
commit 618cc43b64
7 changed files with 119 additions and 2 deletions
+3 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2011, Haiku, Inc. All rights reserved.
* Copyright 2011-2016, Haiku, Inc. All rights reserved.
* Copyright 2001-2003 Dr. Zoidberg Enterprises. All rights reserved.
*/
#ifndef ZOIDBERG_GARGOYLE_MAIL_UTIL_H
@@ -102,5 +102,7 @@ void extract_address_name(BString &address);
void get_address_list(BList &list, const char *string,
void (*cleanupFunc)(BString &) = NULL);
status_t CopyMailFolderAttributes(const char* targetPath);
#endif /* ZOIDBERG_GARGOYLE_MAIL_UTIL_H */
@@ -0,0 +1,24 @@
/*
* Copyright 2016 Haiku Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef ATTRIBUTE_UTILITIES_H
#define ATTRIBUTE_UTILITIES_H
#include <SupportDefs.h>
class BNode;
namespace BPrivate {
status_t CopyAttributes(BNode& source, BNode& destination);
} // namespace BPrivate
#endif // ATTRIBUTE_UTILITIES_H