diff options
Diffstat (limited to 'vmime')
107 files changed, 404 insertions, 405 deletions
diff --git a/vmime/address.hpp b/vmime/address.hpp index 27e2dd31..31d00f02 100644 --- a/vmime/address.hpp +++ b/vmime/address.hpp @@ -55,13 +55,13 @@ public: * * @return true if this address is empty */ - virtual const bool isEmpty() const = 0; + virtual bool isEmpty() const = 0; /** Test whether this is object is a mailboxGroup. * * @return true if this is a mailboxGroup, false otherwise */ - virtual const bool isGroup() const = 0; + virtual bool isGroup() const = 0; virtual ref <component> clone() const = 0; diff --git a/vmime/addressList.hpp b/vmime/addressList.hpp index 67a66771..7bb7635c 100644 --- a/vmime/addressList.hpp +++ b/vmime/addressList.hpp @@ -117,13 +117,13 @@ public: * * @return number of addresses */ - const int getAddressCount() const; + int getAddressCount() const; /** Tests whether the list of addresses is empty. * * @return true if there is no address, false otherwise */ - const bool isEmpty() const; + bool isEmpty() const; /** Return the address at the specified position. * diff --git a/vmime/attachmentHelper.hpp b/vmime/attachmentHelper.hpp index ea222ed1..f696b7ef 100644 --- a/vmime/attachmentHelper.hpp +++ b/vmime/attachmentHelper.hpp @@ -50,7 +50,7 @@ public: * @param part message part to test * @return true if the part is an attachment, false otherwise */ - static const bool isBodyPartAnAttachment(ref <const bodyPart> part); + static bool isBodyPartAnAttachment(ref <const bodyPart> part); /** Return attachment information in the specified body part. * If the specified body part does not contain attachment diff --git a/vmime/body.hpp b/vmime/body.hpp index a41d1f8f..30ac798f 100644 --- a/vmime/body.hpp +++ b/vmime/body.hpp @@ -114,13 +114,13 @@ public: * * @return number of parts */ - const int getPartCount() const; + int getPartCount() const; /** Tests whether the list of parts is empty. * * @return true if there is no part, false otherwise */ - const bool isEmpty() const; + bool isEmpty() const; /** Return the part at the specified position. * @@ -219,7 +219,7 @@ public: * @param boundary boundary string to test * @return true if the boundary string is valid, false otherwise */ - static const bool isValidBoundary(const string& boundary); + static bool isValidBoundary(const string& boundary); ref <component> clone() const; void copyFrom(const component& other); @@ -242,7 +242,7 @@ private: std::vector <ref <bodyPart> > m_parts; - const bool isRootPart() const; + bool isRootPart() const; void initNewPart(ref <bodyPart> part); diff --git a/vmime/charset.hpp b/vmime/charset.hpp index 3edcc01b..06306920 100644 --- a/vmime/charset.hpp +++ b/vmime/charset.hpp @@ -54,8 +54,8 @@ public: charset& operator=(const charset& other); - const bool operator==(const charset& value) const; - const bool operator!=(const charset& value) const; + bool operator==(const charset& value) const; + bool operator!=(const charset& value) const; const std::vector <ref <const component> > getChildComponents() const; diff --git a/vmime/component.hpp b/vmime/component.hpp index a22ec4a8..007cfc0b 100644 --- a/vmime/component.hpp +++ b/vmime/component.hpp @@ -98,7 +98,7 @@ public: * @return start position in parsed buffer * or 0 if this component has not been parsed */ - const string::size_type getParsedOffset() const; + string::size_type getParsedOffset() const; /** Return the length of this component in the * parsed message contents. @@ -106,7 +106,7 @@ public: * @return length of the component in parsed buffer * or 0 if this component has not been parsed */ - const string::size_type getParsedLength() const; + string::size_type getParsedLength() const; /** Return the list of children of this component. * diff --git a/vmime/contentDisposition.hpp b/vmime/contentDisposition.hpp index f5da21b7..19b13c29 100644 --- a/vmime/contentDisposition.hpp +++ b/vmime/contentDisposition.hpp @@ -68,8 +68,8 @@ public: contentDisposition& operator=(const string& name); - const bool operator==(const contentDisposition& value) const; - const bool operator!=(const contentDisposition& value) const; + bool operator==(const contentDisposition& value) const; + bool operator!=(const contentDisposition& value) const; private: diff --git a/vmime/contentHandler.hpp b/vmime/contentHandler.hpp index f29753cd..303b08cf 100644 --- a/vmime/contentHandler.hpp +++ b/vmime/contentHandler.hpp @@ -91,13 +91,13 @@ public: * * @return length of data */ - virtual const string::size_type getLength() const = 0; + virtual string::size_type getLength() const = 0; /** Returns 'true' if data managed by this object is encoded. * * @return true if data is encoded, false otherwise */ - virtual const bool isEncoded() const = 0; + virtual bool isEncoded() const = 0; /** Returns the encoding used for data (or "binary" if not encoded). * @@ -109,7 +109,7 @@ public: * * @return true if no data is managed by this object, false otherwise */ - virtual const bool isEmpty() const = 0; + virtual bool isEmpty() const = 0; }; diff --git a/vmime/dateTime.hpp b/vmime/dateTime.hpp index 6261bec5..07765756 100644 --- a/vmime/dateTime.hpp +++ b/vmime/dateTime.hpp @@ -192,15 +192,15 @@ private: public: // Get - const int getYear() const; - const int getMonth() const; - const int getDay() const; - const int getHour() const; - const int getMinute() const; - const int getSecond() const; - const int getZone() const; - const int getWeekDay() const; - const int getWeek() const; + int getYear() const; + int getMonth() const; + int getDay() const; + int getHour() const; + int getMinute() const; + int getSecond() const; + int getZone() const; + int getWeekDay() const; + int getWeek() const; void getTime(int& hour, int& minute, int& second, int& zone) const; void getTime(int& hour, int& minute, int& second) const; @@ -227,12 +227,12 @@ public: ref <component> clone() const; // Comparison - const bool operator==(const datetime& other) const; - const bool operator!=(const datetime& other) const; - const bool operator<(const datetime& other) const; - const bool operator<=(const datetime& other) const; - const bool operator>(const datetime& other) const; - const bool operator>=(const datetime& other) const; + bool operator==(const datetime& other) const; + bool operator!=(const datetime& other) const; + bool operator<(const datetime& other) const; + bool operator<=(const datetime& other) const; + bool operator>(const datetime& other) const; + bool operator>=(const datetime& other) const; // Current date and time static const datetime now(); diff --git a/vmime/disposition.hpp b/vmime/disposition.hpp index 163b7f26..44bde218 100644 --- a/vmime/disposition.hpp +++ b/vmime/disposition.hpp @@ -118,7 +118,7 @@ public: * @param modifier modifier to test * @return true if the specified modifier is set, false otherwise */ - const bool hasModifier(const string& modifier) const; + bool hasModifier(const string& modifier) const; /** Return the list of modifiers. * diff --git a/vmime/emptyContentHandler.hpp b/vmime/emptyContentHandler.hpp index d0da261a..d5aaffdf 100644 --- a/vmime/emptyContentHandler.hpp +++ b/vmime/emptyContentHandler.hpp @@ -45,13 +45,13 @@ public: void extract(utility::outputStream& os, utility::progressListener* progress = NULL) const; void extractRaw(utility::outputStream& os, utility::progressListener* progress = NULL) const; - const string::size_type getLength() const; + string::size_type getLength() const; - const bool isEncoded() const; + bool isEncoded() const; const vmime::encoding& getEncoding() const; - const bool isEmpty() const; + bool isEmpty() const; }; diff --git a/vmime/encoder.hpp b/vmime/encoder.hpp index fa42e12a..cb5de063 100644 --- a/vmime/encoder.hpp +++ b/vmime/encoder.hpp @@ -53,7 +53,7 @@ public: * want to receive progress notifications * @return number of bytes written into output stream */ - virtual const utility::stream::size_type encode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL) = 0; + virtual utility::stream::size_type encode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL) = 0; /** Decode data. * @@ -63,7 +63,7 @@ public: * want to receive progress notifications * @return number of bytes written into output stream */ - virtual const utility::stream::size_type decode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL) = 0; + virtual utility::stream::size_type decode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL) = 0; /** Return the properties of the encoder. * diff --git a/vmime/encoderB64.hpp b/vmime/encoderB64.hpp index 048453ff..46444a53 100644 --- a/vmime/encoderB64.hpp +++ b/vmime/encoderB64.hpp @@ -41,8 +41,8 @@ public: encoderB64(); - const utility::stream::size_type encode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL); - const utility::stream::size_type decode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL); + utility::stream::size_type encode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL); + utility::stream::size_type decode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL); const std::vector <string> getAvailableProperties() const; diff --git a/vmime/encoderDefault.hpp b/vmime/encoderDefault.hpp index 5ef48bb2..71dc9e9f 100644 --- a/vmime/encoderDefault.hpp +++ b/vmime/encoderDefault.hpp @@ -41,8 +41,8 @@ public: encoderDefault(); - const utility::stream::size_type encode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL); - const utility::stream::size_type decode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL); + utility::stream::size_type encode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL); + utility::stream::size_type decode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL); }; diff --git a/vmime/encoderFactory.hpp b/vmime/encoderFactory.hpp index 971cc481..5358ce76 100644 --- a/vmime/encoderFactory.hpp +++ b/vmime/encoderFactory.hpp @@ -126,7 +126,7 @@ public: * * @return number of registered encoders */ - const int getEncoderCount() const; + int getEncoderCount() const; /** Return the registered encoder at the specified position. * diff --git a/vmime/encoderQP.hpp b/vmime/encoderQP.hpp index 6f0a2c26..bd604abc 100644 --- a/vmime/encoderQP.hpp +++ b/vmime/encoderQP.hpp @@ -41,8 +41,8 @@ public: encoderQP(); - const utility::stream::size_type encode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL); - const utility::stream::size_type decode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL); + utility::stream::size_type encode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL); + utility::stream::size_type decode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL); const std::vector <string> getAvailableProperties() const; diff --git a/vmime/encoderUUE.hpp b/vmime/encoderUUE.hpp index e0323ac3..bdffb101 100644 --- a/vmime/encoderUUE.hpp +++ b/vmime/encoderUUE.hpp @@ -41,8 +41,8 @@ public: encoderUUE(); - const utility::stream::size_type encode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL); - const utility::stream::size_type decode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL); + utility::stream::size_type encode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL); + utility::stream::size_type decode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL); const std::vector <string> getAvailableProperties() const; }; diff --git a/vmime/encoding.hpp b/vmime/encoding.hpp index 62f4314e..fa5cc183 100644 --- a/vmime/encoding.hpp +++ b/vmime/encoding.hpp @@ -67,8 +67,8 @@ public: encoding& operator=(const encoding& other); encoding& operator=(const string& name); - const bool operator==(const encoding& value) const; - const bool operator!=(const encoding& value) const; + bool operator==(const encoding& value) const; + bool operator!=(const encoding& value) const; const std::vector <ref <const component> > getChildComponents() const; diff --git a/vmime/fileAttachment.hpp b/vmime/fileAttachment.hpp index 6e80b5ae..dbf17108 100644 --- a/vmime/fileAttachment.hpp +++ b/vmime/fileAttachment.hpp @@ -59,7 +59,7 @@ public: * @return true if the 'filename' property is set, * false otherwise */ - const bool hasFilename() const; + bool hasFilename() const; /** Return the value of the 'filename' property. * @@ -78,7 +78,7 @@ public: * @return true if the 'creation-date' property is set, * false otherwise */ - const bool hasCreationDate() const; + bool hasCreationDate() const; /** Return the value of the 'creation-date' property. * @@ -97,7 +97,7 @@ public: * @return true if the 'modification-date' property is set, * false otherwise */ - const bool hasModificationDate() const; + bool hasModificationDate() const; /** Return the value of the 'modification-date' property. * @@ -116,7 +116,7 @@ public: * @return true if the 'read-date' property is set, * false otherwise */ - const bool hasReadDate() const; + bool hasReadDate() const; /** Return the value of the 'read-date' property. * @@ -135,13 +135,13 @@ public: * @return true if the 'size' property is set, * false otherwise */ - const bool hasSize() const; + bool hasSize() const; /** Return the value of the 'size' property. * * @return file size */ - const unsigned int getSize() const; + unsigned int getSize() const; /** Set the value of the 'size' property. * diff --git a/vmime/header.hpp b/vmime/header.hpp index 9f3b0c4d..65236cff 100644 --- a/vmime/header.hpp +++ b/vmime/header.hpp @@ -94,7 +94,7 @@ public: * @return true if at least one field with the specified name * exists, or false otherwise */ - const bool hasField(const string& fieldName) const; + bool hasField(const string& fieldName) const; /** Find the first field that matches the specified name. * If no field is found, an exception is thrown. @@ -182,13 +182,13 @@ public: * * @return number of fields */ - const int getFieldCount() const; + int getFieldCount() const; /** Tests whether the list of fields is empty. * * @return true if there is no field, false otherwise */ - const bool isEmpty() const; + bool isEmpty() const; /** Return the field at the specified position. * @@ -232,7 +232,7 @@ private: public: fieldHasName(const string& name); - const bool operator() (const ref <const headerField>& field); + bool operator() (const ref <const headerField>& field); private: @@ -244,7 +244,7 @@ private: public: fieldHasNotName(const string& name); - const bool operator() (const ref <const headerField>& field); + bool operator() (const ref <const headerField>& field); private: diff --git a/vmime/headerField.hpp b/vmime/headerField.hpp index de0b82c3..3d8f26a9 100644 --- a/vmime/headerField.hpp +++ b/vmime/headerField.hpp @@ -78,7 +78,7 @@ public: * * @return true if the field is a custom field, false otherwise */ - const bool isCustom() const; + bool isCustom() const; /** Return the read-only value object attached to this field. * diff --git a/vmime/htmlTextPart.hpp b/vmime/htmlTextPart.hpp index 443ac09c..140b4ddf 100644 --- a/vmime/htmlTextPart.hpp +++ b/vmime/htmlTextPart.hpp @@ -107,7 +107,7 @@ public: * @return true if an object with this identifier exists, * false otherwise */ - const bool hasObject(const string& id) const; + bool hasObject(const string& id) const; /** Return the embedded object with the specified identifier. * @@ -121,7 +121,7 @@ public: * * @return number of embedded objects */ - const int getObjectCount() const; + int getObjectCount() const; /** Return the embedded object at the specified position. * @@ -168,7 +168,7 @@ public: const string addObject(ref <contentHandler> data, const encoding& enc, const mediaType& type); - const int getPartCount() const; + int getPartCount() const; void generateIn(ref <bodyPart> message, ref <bodyPart> parent) const; void parse(ref <const bodyPart> message, ref <const bodyPart> parent, ref <const bodyPart> textPart); diff --git a/vmime/mailbox.hpp b/vmime/mailbox.hpp index d0145dd6..2717ec58 100644 --- a/vmime/mailbox.hpp +++ b/vmime/mailbox.hpp @@ -73,22 +73,22 @@ public: void setEmail(const string& email); // Comparison - const bool operator==(const class mailbox& mailbox) const; - const bool operator!=(const class mailbox& mailbox) const; + bool operator==(const class mailbox& mailbox) const; + bool operator!=(const class mailbox& mailbox) const; // Assignment void copyFrom(const component& other); ref <component> clone() const; mailbox& operator=(const mailbox& other); - const bool isEmpty() const; + bool isEmpty() const; void clear(); const std::vector <ref <const component> > getChildComponents() const; - const bool isGroup() const; + bool isGroup() const; protected: diff --git a/vmime/mailboxGroup.hpp b/vmime/mailboxGroup.hpp index 47b4de25..8038c061 100644 --- a/vmime/mailboxGroup.hpp +++ b/vmime/mailboxGroup.hpp @@ -124,13 +124,13 @@ public: * * @return number of mailboxes */ - const int getMailboxCount() const; + int getMailboxCount() const; /** Tests whether the list of mailboxes is empty. * * @return true if there is no mailbox, false otherwise */ - const bool isEmpty() const; + bool isEmpty() const; /** Return the mailbox at the specified position. * @@ -158,7 +158,7 @@ public: */ const std::vector <ref <mailbox> > getMailboxList(); - const bool isGroup() const; + bool isGroup() const; private: diff --git a/vmime/mailboxList.hpp b/vmime/mailboxList.hpp index bf5e717a..33b2ace8 100644 --- a/vmime/mailboxList.hpp +++ b/vmime/mailboxList.hpp @@ -111,13 +111,13 @@ public: * * @return number of mailboxes */ - const int getMailboxCount() const; + int getMailboxCount() const; /** Tests whether the list of mailboxes is empty. * * @return true if there is no mailbox, false otherwise */ - const bool isEmpty() const; + bool isEmpty() const; /** Return the mailbox at the specified position. * diff --git a/vmime/mdn/MDNHelper.hpp b/vmime/mdn/MDNHelper.hpp index c4790de1..ee9f4211 100644 --- a/vmime/mdn/MDNHelper.hpp +++ b/vmime/mdn/MDNHelper.hpp @@ -70,7 +70,7 @@ public: * @param msg message * @return true if the message is a MDN, false otherwise */ - static const bool isMDN(const ref <const message> msg); + static bool isMDN(const ref <const message> msg); /** If the specified message is a MDN, return information * about it. @@ -88,7 +88,7 @@ public: * @param msg message for which to send a MDN * @return true if user confirmation should be asked, false otherwise */ - static const bool needConfirmation(const ref <const message> msg); + static bool needConfirmation(const ref <const message> msg); /** Build a new MDN for the message. The resulting MDN can then be * sent over SMTP transport service. diff --git a/vmime/mediaType.hpp b/vmime/mediaType.hpp index 20dbaba8..59d80205 100644 --- a/vmime/mediaType.hpp +++ b/vmime/mediaType.hpp @@ -46,8 +46,8 @@ public: public: - const bool operator==(const mediaType& type) const; - const bool operator!=(const mediaType& type) const; + bool operator==(const mediaType& type) const; + bool operator!=(const mediaType& type) const; mediaType& operator=(const string& type); diff --git a/vmime/messageBuilder.hpp b/vmime/messageBuilder.hpp index 803c8710..b94fe823 100644 --- a/vmime/messageBuilder.hpp +++ b/vmime/messageBuilder.hpp @@ -168,7 +168,7 @@ public: * * @return number of attachments */ - const int getAttachmentCount() const; + int getAttachmentCount() const; /** Return the list of attachments. * diff --git a/vmime/messageId.hpp b/vmime/messageId.hpp index ce780227..60f62ada 100644 --- a/vmime/messageId.hpp +++ b/vmime/messageId.hpp @@ -76,8 +76,8 @@ public: messageId& operator=(const string& id); - const bool operator==(const messageId& mid) const; - const bool operator!=(const messageId& mid) const; + bool operator==(const messageId& mid) const; + bool operator!=(const messageId& mid) const; /** Generate a random message identifier. * diff --git a/vmime/messageIdSequence.hpp b/vmime/messageIdSequence.hpp index 89302048..e1989fe6 100644 --- a/vmime/messageIdSequence.hpp +++ b/vmime/messageIdSequence.hpp @@ -110,13 +110,13 @@ public: * * @return number of message-ides */ - const int getMessageIdCount() const; + int getMessageIdCount() const; /** Tests whether the list of message-ides is empty. * * @return true if there is no message-id, false otherwise */ - const bool isEmpty() const; + bool isEmpty() const; /** Return the message-id at the specified position. * diff --git a/vmime/messageParser.hpp b/vmime/messageParser.hpp index 4c423931..211fac7c 100644 --- a/vmime/messageParser.hpp +++ b/vmime/messageParser.hpp @@ -94,7 +94,7 @@ public: * * @return number of attachments */ - const int getAttachmentCount() const; + int getAttachmentCount() const; /** Return the attachment at the specified position. * @@ -119,7 +119,7 @@ public: * * @return number of text parts */ - const int getTextPartCount() const; + int getTextPartCount() const; /** Return the text part at the specified position. * diff --git a/vmime/misc/importanceHelper.hpp b/vmime/misc/importanceHelper.hpp index 0192bfe8..a139ffbc 100644 --- a/vmime/misc/importanceHelper.hpp +++ b/vmime/misc/importanceHelper.hpp @@ -72,7 +72,7 @@ public: * @return importance of the message, or default importance is no * information about importance is given in the message */ - static const Importance getImportance(ref <const message> msg); + static Importance getImportance(ref <const message> msg); /** Return the importance of a message, given its header. * @@ -80,7 +80,7 @@ public: * @return importance of the message, or default importance is no * information about importance is given in the message */ - static const Importance getImportanceHeader(ref <const header> hdr); + static Importance getImportanceHeader(ref <const header> hdr); /** Set the importance of the specified message. * diff --git a/vmime/net/connectionInfos.hpp b/vmime/net/connectionInfos.hpp index 97fd354d..302aecbb 100644 --- a/vmime/net/connectionInfos.hpp +++ b/vmime/net/connectionInfos.hpp @@ -48,7 +48,7 @@ public: * * @return server port */ - virtual const port_t getPort() const = 0; + virtual port_t getPort() const = 0; }; diff --git a/vmime/net/defaultConnectionInfos.hpp b/vmime/net/defaultConnectionInfos.hpp index b4438b38..0c996848 100644 --- a/vmime/net/defaultConnectionInfos.hpp +++ b/vmime/net/defaultConnectionInfos.hpp @@ -41,7 +41,7 @@ public: defaultConnectionInfos(const string& host, const port_t port); const string getHost() const; - const port_t getPort() const; + port_t getPort() const; private: diff --git a/vmime/net/events.hpp b/vmime/net/events.hpp index 253942e6..66ce2076 100644 --- a/vmime/net/events.hpp +++ b/vmime/net/events.hpp @@ -64,7 +64,7 @@ public: * * @return event type (see messageCountEvent::Types) */ - const Types getType() const; + Types getType() const; /** Return the numbers of the messages that have been added/removed. * @@ -127,7 +127,7 @@ public: * * @return event type (see messageChangedEvent::Types) */ - const Types getType() const; + Types getType() const; /** Return the numbers of the messages that have changed. * @@ -191,7 +191,7 @@ public: * * @return event type (see folderEvent::Types) */ - const Types getType() const; + Types getType() const; /** Dispatch the event to the specified listener. * diff --git a/vmime/net/folder.hpp b/vmime/net/folder.hpp index e1ed6e3c..0ae33c56 100644 --- a/vmime/net/folder.hpp +++ b/vmime/net/folder.hpp @@ -99,19 +99,19 @@ public: * * @return folder type (see folder::Types) */ - virtual const int getType() = 0; + virtual int getType() = 0; /** Return the flags of this folder. * * @return folder flags (see folder::Flags) */ - virtual const int getFlags() = 0; + virtual int getFlags() = 0; /** Return the mode in which the folder has been open. * * @return folder opening mode (see folder::Modes) */ - virtual const int getMode() const = 0; + virtual int getMode() const = 0; /** Return the name of this folder. * @@ -154,7 +154,7 @@ public: * * @return true if the folder exists, false otherwise */ - virtual const bool exists() = 0; + virtual bool exists() = 0; /** Delete this folder. * The folder should be closed before attempting to delete it. @@ -167,7 +167,7 @@ public: * * @return true if the folder is open, false otherwise */ - virtual const bool isOpen() const = 0; + virtual bool isOpen() const = 0; /** Get a new reference to a message in this folder. * @@ -198,7 +198,7 @@ public: * * @return number of messages in the folder */ - virtual const int getMessageCount() = 0; + virtual int getMessageCount() = 0; /** Get a new reference to a sub-folder in this folder. * @@ -381,7 +381,7 @@ public: * * @return list of supported fetchable objects */ - virtual const int getFetchCapabilities() const = 0; + virtual int getFetchCapabilities() const = 0; // Event listeners void addMessageChangedListener(events::messageChangedListener* l); diff --git a/vmime/net/imap/IMAPConnection.hpp b/vmime/net/imap/IMAPConnection.hpp index b61c60df..865a4df7 100644 --- a/vmime/net/imap/IMAPConnection.hpp +++ b/vmime/net/imap/IMAPConnection.hpp @@ -55,7 +55,7 @@ public: void connect(); - const bool isConnected() const; + bool isConnected() const; void disconnect(); @@ -68,11 +68,11 @@ public: STATE_LOGOUT }; - const ProtocolStates state() const; + ProtocolStates state() const; void setState(const ProtocolStates state); - const char hierarchySeparator() const; + char hierarchySeparator() const; void send(bool tag, const string& what, bool end); @@ -93,7 +93,7 @@ public: ref <security::authenticator> getAuthenticator(); - const bool isSecuredConnection() const; + bool isSecuredConnection() const; ref <connectionInfos> getConnectionInfos() const; private: diff --git a/vmime/net/imap/IMAPFolder.hpp b/vmime/net/imap/IMAPFolder.hpp index 133f4c0f..434653ac 100644 --- a/vmime/net/imap/IMAPFolder.hpp +++ b/vmime/net/imap/IMAPFolder.hpp @@ -62,11 +62,11 @@ private: public: - const int getMode() const; + int getMode() const; - const int getType(); + int getType(); - const int getFlags(); + int getFlags(); const folder::path::component getName() const; const folder::path getFullPath() const; @@ -75,16 +75,16 @@ public: void close(const bool expunge); void create(const int type); - const bool exists(); + bool exists(); void destroy(); - const bool isOpen() const; + bool isOpen() const; ref <message> getMessage(const int num); std::vector <ref <message> > getMessages(const int from = 1, const int to = -1); std::vector <ref <message> > getMessages(const std::vector <int>& nums); - const int getMessageCount(); + int getMessageCount(); ref <folder> getFolder(const folder::path::component& name); std::vector <ref <folder> > getFolders(const bool recursive = false); @@ -118,7 +118,7 @@ public: void fetchMessages(std::vector <ref <message> >& msg, const int options, utility::progressListener* progress = NULL); void fetchMessage(ref <message> msg, const int options); - const int getFetchCapabilities() const; + int getFetchCapabilities() const; private: @@ -129,7 +129,7 @@ private: void onClose(); - const int testExistAndGetType(); + int testExistAndGetType(); void setMessageFlags(const string& set, const int flags, const int mode); diff --git a/vmime/net/imap/IMAPMessage.hpp b/vmime/net/imap/IMAPMessage.hpp index 5f16eea2..caab8198 100644 --- a/vmime/net/imap/IMAPMessage.hpp +++ b/vmime/net/imap/IMAPMessage.hpp @@ -54,20 +54,20 @@ private: public: - const int getNumber() const; + int getNumber() const; const uid getUniqueId() const; - const int getSize() const; + int getSize() const; - const bool isExpunged() const; + bool isExpunged() const; ref <const structure> getStructure() const; ref <structure> getStructure(); ref <const header> getHeader() const; - const int getFlags() const; + int getFlags() const; void setFlags(const int flags, const int mode = FLAG_MODE_SET); void extract(utility::outputStream& os, utility::progressListener* progress = NULL, const int start = 0, const int length = -1, const bool peek = false) const; diff --git a/vmime/net/imap/IMAPParser.hpp b/vmime/net/imap/IMAPParser.hpp index e6edb3ed..c6e1831d 100644 --- a/vmime/net/imap/IMAPParser.hpp +++ b/vmime/net/imap/IMAPParser.hpp @@ -166,7 +166,7 @@ public: * * @return true if we are in strict mode, false otherwise */ - const bool isStrict() const + bool isStrict() const { return m_strict; } @@ -548,7 +548,7 @@ public: public: - const unsigned int value() const { return (m_value); } + unsigned int value() const { return (m_value); } }; @@ -703,7 +703,7 @@ public: string::size_type pos = *currentPos; - const unsigned char c = (pos < line.length() ? line[pos] : 0); + const unsigned char c = static_cast <unsigned char>(pos < line.length() ? line[pos] : 0); if (c >= 0x01 && c <= 0x7f && // 0x01 - 0x7f c != '"' && c != '\\' && // quoted_specials @@ -730,7 +730,7 @@ public: public: - const char value() const { return (m_value); } + char value() const { return (m_value); } }; @@ -1374,7 +1374,7 @@ public: public: - const Type type() const { return (m_type); } + Type type() const { return (m_type); } const string& name() const { return (m_name); } const IMAPParser::atom* flag_keyword() const { return (m_flag_keyword); } @@ -1474,7 +1474,7 @@ public: public: - const Type type() const { return (m_type); } + Type type() const { return (m_type); } const string& name() const { return (m_name); } }; @@ -1544,7 +1544,7 @@ public: public: - const Type type() const { return (m_type); } + Type type() const { return (m_type); } const string& name() const { return (m_name); } }; @@ -1652,7 +1652,7 @@ public: const IMAPParser::mailbox_flag_list* mailbox_flag_list() const { return (m_mailbox_flag_list); } const IMAPParser::mailbox* mailbox() const { return (m_mailbox); } - const char quoted_char() const { return (m_quoted_char); } + char quoted_char() const { return (m_quoted_char); } }; @@ -1776,7 +1776,7 @@ public: public: - const Type type() const { return (m_type); } + Type type() const { return (m_type); } const IMAPParser::nz_number* nz_number() const { return (m_nz_number); } const IMAPParser::atom* atom() const { return (m_atom); } @@ -1944,7 +1944,7 @@ public: public: - const Type type() const { return (m_type); } + Type type() const { return (m_type); } const string name() const { return (m_name); } }; @@ -2005,7 +2005,7 @@ public: public: - const Type type() const { return (m_type); } + Type type() const { return (m_type); } }; @@ -2470,7 +2470,7 @@ public: public: - const Type type() const { return (m_type); } + Type type() const { return (m_type); } const IMAPParser::header_list* header_list() const { return (m_header_list); } }; @@ -3991,7 +3991,7 @@ public: public: - const Type type() const { return (m_type); } + Type type() const { return (m_type); } const IMAPParser::date_time* date_time() const { return (m_date_time); } const IMAPParser::number* number() const { return (m_number); } @@ -4113,8 +4113,8 @@ public: public: - const Type type() const { return (m_type); } - const unsigned int number() const { return (m_number); } + Type type() const { return (m_type); } + unsigned int number() const { return (m_number); } const IMAPParser::msg_att* msg_att() const { return (m_msg_att); } }; @@ -4181,7 +4181,7 @@ public: public: const IMAPParser::resp_text* resp_text() const { return (m_resp_text); } - const Status status() const { return (m_status); } + Status status() const { return (m_status); } }; @@ -4285,7 +4285,7 @@ public: public: - const Condition condition() const { return (m_cond); } + Condition condition() const { return (m_cond); } const IMAPParser::resp_text* resp_text() const { return (m_resp_text); } }; @@ -4511,7 +4511,7 @@ public: public: - const Type type() const { return (m_type); } + Type type() const { return (m_type); } const IMAPParser::number* number() const { return (m_number); } const IMAPParser::mailbox_flag_list* mailbox_flag_list() const { return (m_mailbox_flag_list); } @@ -4812,7 +4812,7 @@ public: } - const bool isBad() const + bool isBad() const { if (!response_done()) // incomplete (partial) response return (true); @@ -4970,7 +4970,7 @@ public: // template <class TYPE> - const bool check(string& line, string::size_type* currentPos, + bool check(string& line, string::size_type* currentPos, const bool noThrow = false) { const string::size_type oldPos = *currentPos; @@ -4992,7 +4992,7 @@ public: } template <class TYPE, class ARG_TYPE> - const bool checkWithArg(string& line, string::size_type* currentPos, + bool checkWithArg(string& line, string::size_type* currentPos, const ARG_TYPE arg, const bool noThrow = false) { const string::size_type oldPos = *currentPos; diff --git a/vmime/net/imap/IMAPStore.hpp b/vmime/net/imap/IMAPStore.hpp index a594ae16..bf8235e3 100644 --- a/vmime/net/imap/IMAPStore.hpp +++ b/vmime/net/imap/IMAPStore.hpp @@ -65,22 +65,22 @@ public: ref <folder> getRootFolder(); ref <folder> getFolder(const folder::path& path); - const bool isValidFolderName(const folder::path::component& name) const; + bool isValidFolderName(const folder::path::component& name) const; static const serviceInfos& getInfosInstance(); const serviceInfos& getInfos() const; void connect(); - const bool isConnected() const; + bool isConnected() const; void disconnect(); void noop(); - const int getCapabilities() const; + int getCapabilities() const; - const bool isIMAPS() const; + bool isIMAPS() const; - const bool isSecuredConnection() const; + bool isSecuredConnection() const; ref <connectionInfos> getConnectionInfos() const; protected: diff --git a/vmime/net/imap/IMAPTag.hpp b/vmime/net/imap/IMAPTag.hpp index d53316c3..04c8b94e 100644 --- a/vmime/net/imap/IMAPTag.hpp +++ b/vmime/net/imap/IMAPTag.hpp @@ -47,7 +47,7 @@ public: IMAPTag& operator++(); // ++IMAPTag const IMAPTag operator++(int); // IMAPTag++ - const int number() const; + int number() const; operator string() const; diff --git a/vmime/net/imap/IMAPUtils.hpp b/vmime/net/imap/IMAPUtils.hpp index 51b1b6ec..181bd460 100644 --- a/vmime/net/imap/IMAPUtils.hpp +++ b/vmime/net/imap/IMAPUtils.hpp @@ -58,10 +58,10 @@ public: */ static const string quoteString(const string& text); - static const int folderTypeFromFlags(const IMAPParser::mailbox_flag_list* list); - static const int folderFlagsFromFlags(const IMAPParser::mailbox_flag_list* list); + static int folderTypeFromFlags(const IMAPParser::mailbox_flag_list* list); + static int folderFlagsFromFlags(const IMAPParser::mailbox_flag_list* list); - static const int messageFlagsFromFlags(const IMAPParser::flag_list* list); + static int messageFlagsFromFlags(const IMAPParser::flag_list* list); static const string messageFlagList(const int flags); diff --git a/vmime/net/maildir/format/courierMaildirFormat.hpp b/vmime/net/maildir/format/courierMaildirFormat.hpp index 11cc88f4..b533abce 100644 --- a/vmime/net/maildir/format/courierMaildirFormat.hpp +++ b/vmime/net/maildir/format/courierMaildirFormat.hpp @@ -59,8 +59,8 @@ public: void destroyFolder(const folder::path& path); void renameFolder(const folder::path& oldPath, const folder::path& newPath); - const bool folderExists(const folder::path& path) const; - const bool folderHasSubfolders(const folder::path& path) const; + bool folderExists(const folder::path& path) const; + bool folderHasSubfolders(const folder::path& path) const; const utility::file::path folderPathToFileSystemPath (const folder::path& path, const DirectoryType type) const; @@ -70,7 +70,7 @@ public: protected: - const bool supports() const; + bool supports() const; static const string toModifiedUTF7(const folder::path::component& text); @@ -86,7 +86,7 @@ protected: * @return true if the specified directory is a maildir subfolder, * false otherwise */ - static const bool isSubfolderDirectory(const utility::file& file); + static bool isSubfolderDirectory(const utility::file& file); /** List directories corresponding to folders which are (direct or * indirect) children of specified folder. @@ -98,7 +98,7 @@ protected: * @return true if at least one directory has been found, * false otherwise */ - const bool listDirectories(const folder::path& root, + bool listDirectories(const folder::path& root, std::vector <string>& dirs, const bool onlyTestForExistence) const; }; diff --git a/vmime/net/maildir/format/kmailMaildirFormat.hpp b/vmime/net/maildir/format/kmailMaildirFormat.hpp index 6aa8c79c..0dfb9642 100644 --- a/vmime/net/maildir/format/kmailMaildirFormat.hpp +++ b/vmime/net/maildir/format/kmailMaildirFormat.hpp @@ -59,8 +59,8 @@ public: void destroyFolder(const folder::path& path); void renameFolder(const folder::path& oldPath, const folder::path& newPath); - const bool folderExists(const folder::path& path) const; - const bool folderHasSubfolders(const folder::path& path) const; + bool folderExists(const folder::path& path) const; + bool folderHasSubfolders(const folder::path& path) const; const utility::file::path folderPathToFileSystemPath (const folder::path& path, const DirectoryType type) const; @@ -70,7 +70,7 @@ public: protected: - const bool supports() const; + bool supports() const; /** Recursive implementation of listFolders(). @@ -86,7 +86,7 @@ protected: * @return true if the specified directory is a maildir subfolder, * false otherwise */ - static const bool isSubfolderDirectory(const utility::file& file); + static bool isSubfolderDirectory(const utility::file& file); }; diff --git a/vmime/net/maildir/maildirFolder.hpp b/vmime/net/maildir/maildirFolder.hpp index c96df142..c0165fa0 100644 --- a/vmime/net/maildir/maildirFolder.hpp +++ b/vmime/net/maildir/maildirFolder.hpp @@ -63,11 +63,11 @@ private: public: - const int getMode() const; + int getMode() const; - const int getType(); + int getType(); - const int getFlags(); + int getFlags(); const folder::path::component getName() const; const folder::path getFullPath() const; @@ -76,16 +76,16 @@ public: void close(const bool expunge); void create(const int type); - const bool exists(); + bool exists(); void destroy(); - const bool isOpen() const; + bool isOpen() const; ref <message> getMessage(const int num); std::vector <ref <message> > getMessages(const int from = 1, const int to = -1); std::vector <ref <message> > getMessages(const std::vector <int>& nums); - const int getMessageCount(); + int getMessageCount(); ref <folder> getFolder(const folder::path::component& name); std::vector <ref <folder> > getFolders(const bool recursive = false); @@ -119,7 +119,7 @@ public: void fetchMessages(std::vector <ref <message> >& msg, const int options, utility::progressListener* progress = NULL); void fetchMessage(ref <message> msg, const int options); - const int getFetchCapabilities() const; + int getFetchCapabilities() const; private: diff --git a/vmime/net/maildir/maildirFormat.hpp b/vmime/net/maildir/maildirFormat.hpp index 5ccfa09d..e00dfdfd 100644 --- a/vmime/net/maildir/maildirFormat.hpp +++ b/vmime/net/maildir/maildirFormat.hpp @@ -102,7 +102,7 @@ public: * @param path virtual path of the folder * @return true if the folder exists, false otherwise */ - virtual const bool folderExists(const folder::path& path) const = 0; + virtual bool folderExists(const folder::path& path) const = 0; /** Test whether the specified folder has subfolders. * @@ -110,7 +110,7 @@ public: * @return true if the folder has at least one subfolder, * false otherwise */ - virtual const bool folderHasSubfolders(const folder::path& path) const = 0; + virtual bool folderHasSubfolders(const folder::path& path) const = 0; /** Returns the directory which represents the specified * folder on the file system. @@ -170,7 +170,7 @@ protected: * @return true if the implementation supports the specified * Maildir, or false otherwise */ - virtual const bool supports() const = 0; + virtual bool supports() const = 0; private: diff --git a/vmime/net/maildir/maildirMessage.hpp b/vmime/net/maildir/maildirMessage.hpp index 6e7c394f..067bdcbb 100644 --- a/vmime/net/maildir/maildirMessage.hpp +++ b/vmime/net/maildir/maildirMessage.hpp @@ -54,20 +54,20 @@ private: public: - const int getNumber() const; + int getNumber() const; const uid getUniqueId() const; - const int getSize() const; + int getSize() const; - const bool isExpunged() const; + bool isExpunged() const; ref <const structure> getStructure() const; ref <structure> getStructure(); ref <const header> getHeader() const; - const int getFlags() const; + int getFlags() const; void setFlags(const int flags, const int mode = FLAG_MODE_SET); void extract(utility::outputStream& os, utility::progressListener* progress = NULL, const int start = 0, const int length = -1, const bool peek = false) const; diff --git a/vmime/net/maildir/maildirStore.hpp b/vmime/net/maildir/maildirStore.hpp index 5dde8edf..0c789433 100644 --- a/vmime/net/maildir/maildirStore.hpp +++ b/vmime/net/maildir/maildirStore.hpp @@ -65,22 +65,22 @@ public: ref <folder> getRootFolder(); ref <folder> getFolder(const folder::path& path); - const bool isValidFolderName(const folder::path::component& name) const; + bool isValidFolderName(const folder::path::component& name) const; static const serviceInfos& getInfosInstance(); const serviceInfos& getInfos() const; void connect(); - const bool isConnected() const; + bool isConnected() const; void disconnect(); void noop(); const utility::path& getFileSystemPath() const; - const int getCapabilities() const; + int getCapabilities() const; - const bool isSecuredConnection() const; + bool isSecuredConnection() const; ref <connectionInfos> getConnectionInfos() const; ref <maildirFormat> getFormat(); diff --git a/vmime/net/maildir/maildirUtils.hpp b/vmime/net/maildir/maildirUtils.hpp index 5506bd81..8c9920b7 100644 --- a/vmime/net/maildir/maildirUtils.hpp +++ b/vmime/net/maildir/maildirUtils.hpp @@ -53,7 +53,7 @@ public: messageIdComparator(const utility::file::path::component& comp); - const bool operator()(const utility::file::path::component& other) const; + bool operator()(const utility::file::path::component& other) const; private: @@ -66,7 +66,7 @@ public: * @return true if the specified object is a message file, * false otherwise */ - static const bool isMessageFile(const utility::file& file); + static bool isMessageFile(const utility::file& file); /** Extract the unique identifier part of the message filename. * Eg: for the filename "1071577232.28549.m03s:2,RS", it will @@ -85,7 +85,7 @@ public: * @param comp filename part * @return message flags extracted from the specified filename */ - static const int extractFlags(const utility::file::path::component& comp); + static int extractFlags(const utility::file::path::component& comp); /** Return a string representing the specified message flags. * Eg: for (message::FLAG_SEEN | message::FLAG_REPLIED), it will diff --git a/vmime/net/message.hpp b/vmime/net/message.hpp index 05ff109e..2d8dc1a7 100644 --- a/vmime/net/message.hpp +++ b/vmime/net/message.hpp @@ -82,14 +82,14 @@ public: * * @return size of the part (in bytes) */ - virtual const int getSize() const = 0; + virtual int getSize() const = 0; /** Return the part sequence number (index). * The first part is at index zero. * * @return part number */ - virtual const int getNumber() const = 0; + virtual int getNumber() const = 0; /** Return the sub-part at the specified position (zero is the * first part). @@ -111,7 +111,7 @@ public: * * @return number of sub-parts */ - const int getPartCount() const; + int getPartCount() const; }; @@ -149,7 +149,7 @@ public: * * @return number of parts */ - virtual const int getPartCount() const = 0; + virtual int getPartCount() const = 0; }; @@ -194,7 +194,7 @@ public: * * @return sequence number of the message */ - virtual const int getNumber() const = 0; + virtual int getNumber() const = 0; /** Return the unique identified of this message (must fetch before). * @@ -206,14 +206,14 @@ public: * * @return size of the message (in bytes) */ - virtual const int getSize() const = 0; + virtual int getSize() const = 0; /** Check whether this message has been expunged * (ie: definitively deleted). * * @return true if the message is expunged, false otherwise */ - virtual const bool isExpunged() const = 0; + virtual bool isExpunged() const = 0; /** Possible flags for a message. */ @@ -243,7 +243,7 @@ public: * * @return flags of the message */ - virtual const int getFlags() const = 0; + virtual int getFlags() const = 0; /** Set the flags of this message. * diff --git a/vmime/net/pop3/POP3Folder.hpp b/vmime/net/pop3/POP3Folder.hpp index 5938bad2..951abc52 100644 --- a/vmime/net/pop3/POP3Folder.hpp +++ b/vmime/net/pop3/POP3Folder.hpp @@ -61,11 +61,11 @@ private: public: - const int getMode() const; + int getMode() const; - const int getType(); + int getType(); - const int getFlags(); + int getFlags(); const folder::path::component getName() const; const folder::path getFullPath() const; @@ -74,16 +74,16 @@ public: void close(const bool expunge); void create(const int type); - const bool exists(); + bool exists(); void destroy(); - const bool isOpen() const; + bool isOpen() const; ref <message> getMessage(const int num); std::vector <ref <message> > getMessages(const int from = 1, const int to = -1); std::vector <ref <message> > getMessages(const std::vector <int>& nums); - const int getMessageCount(); + int getMessageCount(); ref <folder> getFolder(const folder::path::component& name); std::vector <ref <folder> > getFolders(const bool recursive = false); @@ -117,7 +117,7 @@ public: void fetchMessages(std::vector <ref <message> >& msg, const int options, utility::progressListener* progress = NULL); void fetchMessage(ref <message> msg, const int options); - const int getFetchCapabilities() const; + int getFetchCapabilities() const; private: diff --git a/vmime/net/pop3/POP3Message.hpp b/vmime/net/pop3/POP3Message.hpp index e98fee6c..ccfa0892 100644 --- a/vmime/net/pop3/POP3Message.hpp +++ b/vmime/net/pop3/POP3Message.hpp @@ -56,20 +56,20 @@ private: public: - const int getNumber() const; + int getNumber() const; const uid getUniqueId() const; - const int getSize() const; + int getSize() const; - const bool isExpunged() const; + bool isExpunged() const; ref <const structure> getStructure() const; ref <structure> getStructure(); ref <const header> getHeader() const; - const int getFlags() const; + int getFlags() const; void setFlags(const int flags, const int mode = FLAG_MODE_SET); void extract(utility::outputStream& os, utility::progressListener* progress = NULL, const int start = 0, const int length = -1, const bool peek = false) const; diff --git a/vmime/net/pop3/POP3Store.hpp b/vmime/net/pop3/POP3Store.hpp index 4130d516..55c0ce47 100644 --- a/vmime/net/pop3/POP3Store.hpp +++ b/vmime/net/pop3/POP3Store.hpp @@ -64,20 +64,20 @@ public: ref <folder> getRootFolder(); ref <folder> getFolder(const folder::path& path); - const bool isValidFolderName(const folder::path::component& name) const; + bool isValidFolderName(const folder::path::component& name) const; static const serviceInfos& getInfosInstance(); const serviceInfos& getInfos() const; void connect(); - const bool isConnected() const; + bool isConnected() const; void disconnect(); void noop(); - const int getCapabilities() const; + int getCapabilities() const; - const bool isSecuredConnection() const; + bool isSecuredConnection() const; ref <connectionInfos> getConnectionInfos() const; private: @@ -100,17 +100,17 @@ private: const std::vector <string> getCapabilities(); - static const bool isSuccessResponse(const string& buffer); - static const bool stripFirstLine(const string& buffer, string& result, string* firstLine = NULL); + static bool isSuccessResponse(const string& buffer); + static bool stripFirstLine(const string& buffer, string& result, string* firstLine = NULL); static void stripResponseCode(const string& buffer, string& result); - static const int getResponseCode(const string& buffer); + static int getResponseCode(const string& buffer); void sendRequest(const string& buffer, const bool end = true); void readResponse(string& buffer, const bool multiLine, utility::progressListener* progress = NULL); void readResponse(utility::outputStream& os, utility::progressListener* progress = NULL, const int predictedSize = 0); - static const bool checkTerminator(string& buffer, const bool multiLine); - static const bool checkOneTerminator(string& buffer, const string& term); + static bool checkTerminator(string& buffer, const bool multiLine); + static bool checkOneTerminator(string& buffer, const string& term); void internalDisconnect(); diff --git a/vmime/net/sendmail/sendmailTransport.hpp b/vmime/net/sendmail/sendmailTransport.hpp index b08b155c..8383e110 100644 --- a/vmime/net/sendmail/sendmailTransport.hpp +++ b/vmime/net/sendmail/sendmailTransport.hpp @@ -58,14 +58,14 @@ public: const serviceInfos& getInfos() const; void connect(); - const bool isConnected() const; + bool isConnected() const; void disconnect(); void noop(); void send(const mailbox& expeditor, const mailboxList& recipients, utility::inputStream& is, const utility::stream::size_type size, utility::progressListener* progress = NULL); - const bool isSecuredConnection() const; + bool isSecuredConnection() const; ref <connectionInfos> getConnectionInfos() const; private: diff --git a/vmime/net/service.hpp b/vmime/net/service.hpp index 721c602d..c260f2a8 100644 --- a/vmime/net/service.hpp +++ b/vmime/net/service.hpp @@ -71,7 +71,7 @@ public: * * @return type of service */ - virtual const Type getType() const = 0; + virtual Type getType() const = 0; /** Return the protocol name of this service. * @@ -109,7 +109,7 @@ public: * * @return true if the service is connected, false otherwise */ - virtual const bool isConnected() const = 0; + virtual bool isConnected() const = 0; /** Do nothing but ensure the server do not disconnect (for * example, this can reset the auto-logout timer on the @@ -196,7 +196,7 @@ public: * * @return true if the connection is secured, false otherwise */ - virtual const bool isSecuredConnection() const = 0; + virtual bool isSecuredConnection() const = 0; /** Get information about the connection. * diff --git a/vmime/net/serviceFactory.hpp b/vmime/net/serviceFactory.hpp index cbb61497..730df2ed 100644 --- a/vmime/net/serviceFactory.hpp +++ b/vmime/net/serviceFactory.hpp @@ -78,7 +78,7 @@ public: (ref <session> sess, ref <security::authenticator> auth) const = 0; - virtual const int getType() const = 0; + virtual int getType() const = 0; virtual const string& getName() const = 0; virtual const serviceInfos& getInfos() const = 0; }; @@ -132,7 +132,7 @@ public: * * @return number of registered services */ - const int getServiceCount() const; + int getServiceCount() const; /** Return the registered service at the specified position. * diff --git a/vmime/net/serviceInfos.hpp b/vmime/net/serviceInfos.hpp index 87a5a948..745f85ef 100644 --- a/vmime/net/serviceInfos.hpp +++ b/vmime/net/serviceInfos.hpp @@ -171,14 +171,14 @@ public: * * @return property value type */ - const Types getType() const; + Types getType() const; /** Return the attributes of the property (see * serviceInfos::property::Types constants). * * @return property attributes */ - const int getFlags() const; + int getFlags() const; private: @@ -227,7 +227,7 @@ public: * @param p property to test * @return true if the property is set, false otherwise */ - const bool hasProperty(ref <session> s, const property& p) const; + bool hasProperty(ref <session> s, const property& p) const; }; diff --git a/vmime/net/smtp/SMTPResponse.hpp b/vmime/net/smtp/SMTPResponse.hpp index 47a25f1f..313f6a3b 100644 --- a/vmime/net/smtp/SMTPResponse.hpp +++ b/vmime/net/smtp/SMTPResponse.hpp @@ -56,7 +56,7 @@ public: responseLine(const int code, const string& text); void setCode(const int code); - const int getCode() const; + int getCode() const; void setText(const string& text); const string getText() const; @@ -82,7 +82,7 @@ public: * * @return response code */ - const int getCode() const; + int getCode() const; /** Return the SMTP response text. * The text of each line is concatenated. @@ -102,7 +102,7 @@ public: * * @return number of lines in the response */ - const unsigned int getLineCount() const; + unsigned int getLineCount() const; /** Return the last line in the response. * @@ -120,7 +120,7 @@ private: const string readResponseLine(); const responseLine getNextResponse(); - static const int extractResponseCode(const string& response); + static int extractResponseCode(const string& response); std::vector <responseLine> m_lines; diff --git a/vmime/net/smtp/SMTPTransport.hpp b/vmime/net/smtp/SMTPTransport.hpp index 017e4ee7..de0092e8 100644 --- a/vmime/net/smtp/SMTPTransport.hpp +++ b/vmime/net/smtp/SMTPTransport.hpp @@ -58,14 +58,14 @@ public: const serviceInfos& getInfos() const; void connect(); - const bool isConnected() const; + bool isConnected() const; void disconnect(); void noop(); void send(const mailbox& expeditor, const mailboxList& recipients, utility::inputStream& is, const utility::stream::size_type size, utility::progressListener* progress = NULL); - const bool isSecuredConnection() const; + bool isSecuredConnection() const; ref <connectionInfos> getConnectionInfos() const; private: diff --git a/vmime/net/socket.hpp b/vmime/net/socket.hpp index 7fdb6070..88e1f3c4 100644 --- a/vmime/net/socket.hpp +++ b/vmime/net/socket.hpp @@ -57,7 +57,7 @@ public: * * @return true if the socket is connected, false otherwise */ - virtual const bool isConnected() const = 0; + virtual bool isConnected() const = 0; /** Receive (text) data from the socket. * @@ -71,7 +71,7 @@ public: * @param count maximum number of bytes to receive (size of buffer) * @return number of bytes received/written into output buffer */ - virtual const int receiveRaw(char* buffer, const int count) = 0; + virtual int receiveRaw(char* buffer, const int count) = 0; /** Send (text) data to the socket. * diff --git a/vmime/net/store.hpp b/vmime/net/store.hpp index 44f0c13a..e60721b6 100644 --- a/vmime/net/store.hpp +++ b/vmime/net/store.hpp @@ -72,7 +72,7 @@ public: * * @return true if the specified folder name is valid, false otherwise */ - virtual const bool isValidFolderName(const folder::path::component& name) const = 0; + virtual bool isValidFolderName(const folder::path::component& name) const = 0; /** Store capabilities. */ enum Capabilities @@ -92,10 +92,10 @@ public: * * @return features supported by this service */ - virtual const int getCapabilities() const = 0; + virtual int getCapabilities() const = 0; - const Type getType() const { return (TYPE_STORE); } + Type getType() const { return (TYPE_STORE); } }; diff --git a/vmime/net/timeoutHandler.hpp b/vmime/net/timeoutHandler.hpp index 3df6790d..0877ec18 100644 --- a/vmime/net/timeoutHandler.hpp +++ b/vmime/net/timeoutHandler.hpp @@ -45,7 +45,7 @@ public: * * @return true if the time-out delay is elapsed */ - virtual const bool isTimeOut() = 0; + virtual bool isTimeOut() = 0; /** Called to reset the time-out counter. */ @@ -57,7 +57,7 @@ public: * @return true to continue (and reset the time-out) * or false to cancel the current operation */ - virtual const bool handleTimeOut() = 0; + virtual bool handleTimeOut() = 0; }; diff --git a/vmime/net/tls/TLSSecuredConnectionInfos.hpp b/vmime/net/tls/TLSSecuredConnectionInfos.hpp index 3cc72ce7..5451633b 100644 --- a/vmime/net/tls/TLSSecuredConnectionInfos.hpp +++ b/vmime/net/tls/TLSSecuredConnectionInfos.hpp @@ -49,7 +49,7 @@ public: ref <TLSSession> tlsSession, ref <TLSSocket> tlsSocket); const string getHost() const; - const port_t getPort() const; + port_t getPort() const; /** Return the peer's certificate (chain) as sent by the peer. * diff --git a/vmime/net/tls/TLSSocket.hpp b/vmime/net/tls/TLSSocket.hpp index 816de900..1c1d324a 100644 --- a/vmime/net/tls/TLSSocket.hpp +++ b/vmime/net/tls/TLSSocket.hpp @@ -81,10 +81,10 @@ public: // Implementation of 'socket' void connect(const string& address, const port_t port); void disconnect(); - const bool isConnected() const; + bool isConnected() const; void receive(string& buffer); - const int receiveRaw(char* buffer, const int count); + int receiveRaw(char* buffer, const int count); void send(const string& buffer); void sendRaw(const char* buffer, const int count); diff --git a/vmime/net/transport.hpp b/vmime/net/transport.hpp index 7cfb75f5..4ece804b 100644 --- a/vmime/net/transport.hpp +++ b/vmime/net/transport.hpp @@ -70,7 +70,7 @@ public: virtual void send(const mailbox& expeditor, const mailboxList& recipients, utility::inputStream& is, const utility::stream::size_type size, utility::progressListener* progress = NULL) = 0; - const Type getType() const; + Type getType() const; }; diff --git a/vmime/parameterizedHeaderField.hpp b/vmime/parameterizedHeaderField.hpp index 91656192..c2c85028 100644 --- a/vmime/parameterizedHeaderField.hpp +++ b/vmime/parameterizedHeaderField.hpp @@ -61,7 +61,7 @@ public: * @return true if at least one parameter with the specified name * exists, or false otherwise */ - const bool hasParameter(const string& paramName) const; + bool hasParameter(const string& paramName) const; /** Find the first parameter that matches the specified name. * If no parameter is found, an exception is thrown. @@ -138,13 +138,13 @@ public: * * @return number of parameters */ - const int getParameterCount() const; + int getParameterCount() const; /** Tests whether the list of parameters is empty. * * @return true if there is no parameter, false otherwise */ - const bool isEmpty() const; + bool isEmpty() const; /** Return the parameter at the specified position. * diff --git a/vmime/parserHelpers.hpp b/vmime/parserHelpers.hpp index 04caa2d2..9be6e4a3 100644 --- a/vmime/parserHelpers.hpp +++ b/vmime/parserHelpers.hpp @@ -40,25 +40,25 @@ class parserHelpers { public: - static const bool isSpace(const char_t c) + static bool isSpace(const char_t c) { return (c == ' ' || c == '\t' || c == '\n' || c == '\r'); } - static const bool isDigit(const char_t c) + static bool isDigit(const char_t c) { return (c >= '0' && c <= '9'); } - static const bool isAlpha(const char_t c) + static bool isAlpha(const char_t c) { return ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')); } - static const char_t toLower(const char_t c) + static char_t toLower(const char_t c) { if (c >= 'A' && c <= 'Z') return ('a' + (c - 'A')); @@ -69,7 +69,7 @@ public: // Checks whether a character is in the 7-bit US-ASCII charset - static const bool isAscii(const char_t c) + static bool isAscii(const char_t c) { const unsigned int x = static_cast <unsigned int>(c); return (x <= 127); @@ -78,7 +78,7 @@ public: // Checks whether a character has a visual representation - static const bool isPrint(const char_t c) + static bool isPrint(const char_t c) { const unsigned int x = static_cast <unsigned int>(c); return (x >= 0x20 && x <= 0x7E); diff --git a/vmime/path.hpp b/vmime/path.hpp index 256ac15f..aa0d8cbd 100644 --- a/vmime/path.hpp +++ b/vmime/path.hpp @@ -68,8 +68,8 @@ public: void setDomain(const string& domain); // Comparison - const bool operator==(const path& p) const; - const bool operator!=(const path& p) const; + bool operator==(const path& p) const; + bool operator!=(const path& p) const; // Assignment void copyFrom(const component& other); diff --git a/vmime/plainTextPart.hpp b/vmime/plainTextPart.hpp index 9ea09f95..c9419b5a 100644 --- a/vmime/plainTextPart.hpp +++ b/vmime/plainTextPart.hpp @@ -50,7 +50,7 @@ public: const ref <const contentHandler> getText() const; void setText(ref <contentHandler> text); - const int getPartCount() const; + int getPartCount() const; void generateIn(ref <bodyPart> message, ref <bodyPart> parent) const; void parse(ref <const bodyPart> message, ref <const bodyPart> parent, ref <const bodyPart> textPart); diff --git a/vmime/platform.hpp b/vmime/platform.hpp index 3965fb42..293320ff 100644 --- a/vmime/platform.hpp +++ b/vmime/platform.hpp @@ -67,7 +67,7 @@ public: * * @return UNIX Epoch time */ - virtual const unsigned int getUnixTime() const = 0; + virtual unsigned int getUnixTime() const = 0; /** Return the current date and time, in the local time zone. * @@ -87,7 +87,7 @@ public: * * @return current process id */ - virtual const unsigned int getProcessId() const = 0; + virtual unsigned int getProcessId() const = 0; /** Return the charset used on the system. * diff --git a/vmime/platforms/posix/posixFile.hpp b/vmime/platforms/posix/posixFile.hpp index 9ee9733d..b7296c67 100644 --- a/vmime/platforms/posix/posixFile.hpp +++ b/vmime/platforms/posix/posixFile.hpp @@ -64,13 +64,13 @@ public: posixFileReaderInputStream(const vmime::utility::file::path& path, const int fd); ~posixFileReaderInputStream(); - const bool eof() const; + bool eof() const; void reset(); - const size_type read(value_type* const data, const size_type count); + size_type read(value_type* const data, const size_type count); - const size_type skip(const size_type count); + size_type skip(const size_type count); private: @@ -121,7 +121,7 @@ public: posixFileIterator(const vmime::utility::file::path& path, const vmime::string& nativePath); ~posixFileIterator(); - const bool hasMoreElements() const; + bool hasMoreElements() const; ref <vmime::utility::file> nextElement(); private: @@ -146,17 +146,17 @@ public: void createFile(); void createDirectory(const bool createAll = false); - const bool isFile() const; - const bool isDirectory() const; + bool isFile() const; + bool isDirectory() const; - const bool canRead() const; - const bool canWrite() const; + bool canRead() const; + bool canWrite() const; - const length_type getLength(); + length_type getLength(); const path& getFullPath() const; - const bool exists() const; + bool exists() const; ref <vmime::utility::file> getParent() const; @@ -193,8 +193,8 @@ public: static const vmime::utility::file::path stringToPathImpl(const vmime::string& str); static const vmime::string pathToStringImpl(const vmime::utility::file::path& path); - const bool isValidPathComponent(const vmime::utility::file::path::component& comp) const; - const bool isValidPath(const vmime::utility::file::path& path) const; + bool isValidPathComponent(const vmime::utility::file::path::component& comp) const; + bool isValidPath(const vmime::utility::file::path& path) const; static void reportError(const vmime::utility::path& path, const int err); }; diff --git a/vmime/platforms/posix/posixHandler.hpp b/vmime/platforms/posix/posixHandler.hpp index 240c6291..bc787198 100644 --- a/vmime/platforms/posix/posixHandler.hpp +++ b/vmime/platforms/posix/posixHandler.hpp @@ -50,7 +50,7 @@ public: posixHandler(); ~posixHandler(); - const unsigned int getUnixTime() const; + unsigned int getUnixTime() const; const vmime::datetime getCurrentLocalTime() const; @@ -58,7 +58,7 @@ public: const vmime::string getHostName() const; - const unsigned int getProcessId() const; + unsigned int getProcessId() const; #if VMIME_HAVE_MESSAGING_FEATURES ref <vmime::net::socketFactory> getSocketFactory() const; diff --git a/vmime/platforms/posix/posixSocket.hpp b/vmime/platforms/posix/posixSocket.hpp index 5743194d..c2309443 100644 --- a/vmime/platforms/posix/posixSocket.hpp +++ b/vmime/platforms/posix/posixSocket.hpp @@ -44,11 +44,11 @@ public: ~posixSocket(); void connect(const vmime::string& address, const vmime::port_t port); - const bool isConnected() const; + bool isConnected() const; void disconnect(); void receive(vmime::string& buffer); - const int receiveRaw(char* buffer, const int count); + int receiveRaw(char* buffer, const int count); void send(const vmime::string& buffer); void sendRaw(const char* buffer, const int count); diff --git a/vmime/platforms/windows/windowsFile.hpp b/vmime/platforms/windows/windowsFile.hpp index ee6d7890..7e818591 100644 --- a/vmime/platforms/windows/windowsFile.hpp +++ b/vmime/platforms/windows/windowsFile.hpp @@ -49,10 +49,10 @@ public: static const vmime::utility::file::path stringToPathImpl(const vmime::string& str); static const vmime::string pathToStringImpl(const vmime::utility::file::path& path); - const bool isValidPathComponent(const vmime::utility::file::path::component& comp) const; - const bool isValidPathComponent(const vmime::utility::file::path::component& comp, + bool isValidPathComponent(const vmime::utility::file::path::component& comp) const; + bool isValidPathComponent(const vmime::utility::file::path::component& comp, bool firstComponent) const; - const bool isValidPath(const vmime::utility::file::path& path) const; + bool isValidPath(const vmime::utility::file::path& path) const; static void reportError(const vmime::utility::path& path, const int err); }; @@ -67,17 +67,17 @@ public: void createFile(); void createDirectory(const bool createAll = false); - const bool isFile() const; - const bool isDirectory() const; + bool isFile() const; + bool isDirectory() const; - const bool canRead() const; - const bool canWrite() const; + bool canRead() const; + bool canWrite() const; const length_type getLength(); const path& getFullPath() const; - const bool exists() const; + bool exists() const; ref <file> getParent() const; @@ -108,7 +108,7 @@ public: windowsFileIterator(const vmime::utility::file::path& path, const vmime::string& nativePath); ~windowsFileIterator(); - const bool hasMoreElements() const; + bool hasMoreElements() const; vmime::ref <vmime::utility::file> nextElement(); private: @@ -153,10 +153,10 @@ public: public: - const bool eof() const; + bool eof() const; void reset(); - const size_type read(value_type* const data, const size_type count); - const size_type skip(const size_type count); + size_type read(value_type* const data, const size_type count); + size_type skip(const size_type count); private: diff --git a/vmime/platforms/windows/windowsHandler.hpp b/vmime/platforms/windows/windowsHandler.hpp index d67d8606..2f65651e 100644 --- a/vmime/platforms/windows/windowsHandler.hpp +++ b/vmime/platforms/windows/windowsHandler.hpp @@ -49,7 +49,7 @@ public: windowsHandler(); ~windowsHandler(); - const unsigned int getUnixTime() const; + unsigned int getUnixTime() const; const vmime::datetime getCurrentLocalTime() const; @@ -57,7 +57,7 @@ public: const vmime::string getHostName() const; - const unsigned int getProcessId() const; + unsigned int getProcessId() const; #if VMIME_HAVE_MESSAGING_FEATURES ref <vmime::net::socketFactory> getSocketFactory() const; diff --git a/vmime/platforms/windows/windowsSocket.hpp b/vmime/platforms/windows/windowsSocket.hpp index 49bf95fd..6890ddcf 100644 --- a/vmime/platforms/windows/windowsSocket.hpp +++ b/vmime/platforms/windows/windowsSocket.hpp @@ -46,11 +46,11 @@ public: public: void connect(const vmime::string& address, const vmime::port_t port); - const bool isConnected() const; + bool isConnected() const; void disconnect(); void receive(vmime::string& buffer); - const int receiveRaw(char* buffer, const int count); + int receiveRaw(char* buffer, const int count); void send(const vmime::string& buffer); void sendRaw(const char* buffer, const int count); diff --git a/vmime/propertySet.hpp b/vmime/propertySet.hpp index 13967924..94cf1fd8 100644 --- a/vmime/propertySet.hpp +++ b/vmime/propertySet.hpp @@ -96,7 +96,7 @@ public: * converted using std::istringstream) * @return current value of the property */ - template <class TYPE> const TYPE getValue() const + template <class TYPE> TYPE getValue() const { TYPE val = TYPE(); @@ -127,13 +127,13 @@ public: } template <> - const string propertySet::property::getValue() const + string propertySet::property::getValue() const { return (m_value); } template <> - const bool propertySet::property::getValue() const + bool propertySet::property::getValue() const { if (utility::stringUtils::toLower(m_value) == "true") return true; @@ -258,7 +258,7 @@ public: * @return true if the property is set (has a value), * false otherwise */ - const bool hasProperty(const string& name) const; + bool hasProperty(const string& name) const; /** Get the value of the specified property. * @@ -334,7 +334,7 @@ private: propFinder(const string& name) : m_name(utility::stringUtils::toLower(name)) { } - const bool operator()(ref <property> p) const + bool operator()(ref <property> p) const { return (utility::stringUtils::toLower(p->getName()) == m_name); } @@ -353,7 +353,7 @@ private: public: template <typename TYPE> - static const TYPE valueFromString(const string& value) + static TYPE valueFromString(const string& value) { TYPE v = TYPE(); @@ -366,7 +366,7 @@ public: } template <typename TYPE> - static const string valueToString(const TYPE& value) + static string valueToString(const TYPE& value) { std::ostringstream oss(value); oss.imbue(std::locale::classic()); // no formatting @@ -379,19 +379,19 @@ public: #ifdef VMIME_INLINE_TEMPLATE_SPECIALIZATION template <> - static const string valueFromString(const string& value) + static string valueFromString(const string& value) { return value; } template <> - static const string valueToString(const string& value) + static string valueToString(const string& value) { return value; } template <> - static const bool valueFromString(const string& value) + static bool valueFromString(const string& value) { if (utility::stringUtils::toLower(value) == "true") return true; @@ -409,7 +409,7 @@ public: } template <> - static const string valueToString(const bool& value) + static string valueToString(const bool& value) { return (value ? "true" : "false"); } @@ -435,14 +435,14 @@ public: template <> void propertySet::property::setValue(const string& value); template <> void propertySet::property::setValue(const bool& value); -template <> const string propertySet::property::getValue() const; -template <> const bool propertySet::property::getValue() const; +template <> string propertySet::property::getValue() const; +template <> bool propertySet::property::getValue() const; -template <> const string propertySet::valueFromString(const string& value); -template <> const string propertySet::valueToString(const string& value); +template <> string propertySet::valueFromString(const string& value); +template <> string propertySet::valueToString(const string& value); -template <> const bool propertySet::valueFromString(const string& value); -template <> const string propertySet::valueToString(const bool& value); +template <> bool propertySet::valueFromString(const string& value); +template <> string propertySet::valueToString(const bool& value); #endif // VMIME_INLINE_TEMPLATE_SPECIALIZATION diff --git a/vmime/security/cert/X509Certificate.hpp b/vmime/security/cert/X509Certificate.hpp index a341563e..e7ca309b 100644 --- a/vmime/security/cert/X509Certificate.hpp +++ b/vmime/security/cert/X509Certificate.hpp @@ -107,14 +107,14 @@ public: * @return true if this certificate was issued by the given issuer, * false otherwise */ - const bool checkIssuer(ref <const X509Certificate> issuer) const; + bool checkIssuer(ref <const X509Certificate> issuer) const; /** Verifies this certificate against a given trusted one. * * @param caCert a certificate that is considered to be trusted one * @return true if the verification succeeded, false otherwise */ - const bool verify(ref <const X509Certificate> caCert) const; + bool verify(ref <const X509Certificate> caCert) const; /** Gets the expiration date of this certificate. This is the date * at which this certificate will not be valid anymore. @@ -140,8 +140,8 @@ public: // Implementation of 'certificate' const byteArray getEncoded() const; const string getType() const; - const int getVersion() const; - const bool equals(ref <const certificate> other) const; + int getVersion() const; + bool equals(ref <const certificate> other) const; private: diff --git a/vmime/security/cert/certificate.hpp b/vmime/security/cert/certificate.hpp index eb964286..440a1a8f 100644 --- a/vmime/security/cert/certificate.hpp +++ b/vmime/security/cert/certificate.hpp @@ -56,7 +56,7 @@ public: * * @return the version of this certificate */ - virtual const int getVersion() const = 0; + virtual int getVersion() const = 0; /** Checks if two certificates are the same. * @@ -64,7 +64,7 @@ public: * @return true if the two certificates are the same, * false otherwise */ - virtual const bool equals(ref <const certificate> other) const = 0; + virtual bool equals(ref <const certificate> other) const = 0; }; diff --git a/vmime/security/cert/certificateChain.hpp b/vmime/security/cert/certificateChain.hpp index c363f94a..bb213139 100644 --- a/vmime/security/cert/certificateChain.hpp +++ b/vmime/security/cert/certificateChain.hpp @@ -53,7 +53,7 @@ public: * * @return number of certificates in the chain */ - const unsigned int getCount() const; + unsigned int getCount() const; /** Return the certificate at the specified position. 0 is the * subject certificate, 1 is the issuer's certificate, 2 is diff --git a/vmime/security/digest/md5/md5MessageDigest.hpp b/vmime/security/digest/md5/md5MessageDigest.hpp index 30072f61..893cb058 100644 --- a/vmime/security/digest/md5/md5MessageDigest.hpp +++ b/vmime/security/digest/md5/md5MessageDigest.hpp @@ -50,7 +50,7 @@ public: void finalize(const byte_t* buffer, const unsigned long len); void finalize(const byte_t* buffer, const unsigned long offset, const unsigned long len); - const int getDigestLength() const; + int getDigestLength() const; const byte_t* getDigest() const; void reset(); diff --git a/vmime/security/digest/messageDigest.hpp b/vmime/security/digest/messageDigest.hpp index 8372c01a..95c3b2bd 100644 --- a/vmime/security/digest/messageDigest.hpp +++ b/vmime/security/digest/messageDigest.hpp @@ -103,7 +103,7 @@ public: * * @return length of computed hash */ - virtual const int getDigestLength() const = 0; + virtual int getDigestLength() const = 0; /** Returns the hash, as computed by the algorithm. * You must call finalize() before using this function, or the diff --git a/vmime/security/digest/sha1/sha1MessageDigest.hpp b/vmime/security/digest/sha1/sha1MessageDigest.hpp index fd8745c5..129db80e 100644 --- a/vmime/security/digest/sha1/sha1MessageDigest.hpp +++ b/vmime/security/digest/sha1/sha1MessageDigest.hpp @@ -50,7 +50,7 @@ public: void finalize(const byte_t* buffer, const unsigned long len); void finalize(const byte_t* buffer, const unsigned long offset, const unsigned long len); - const int getDigestLength() const; + int getDigestLength() const; const byte_t* getDigest() const; void reset(); diff --git a/vmime/security/sasl/SASLMechanism.hpp b/vmime/security/sasl/SASLMechanism.hpp index efe11895..32838311 100644 --- a/vmime/security/sasl/SASLMechanism.hpp +++ b/vmime/security/sasl/SASLMechanism.hpp @@ -64,7 +64,7 @@ public: * authentication (in this case, the values in 'response' and * 'responseLen' are undetermined) */ - virtual const bool step + virtual bool step (ref <SASLSession> sess, const byte_t* challenge, const int challengeLen, byte_t** response, int* responseLen) = 0; @@ -76,7 +76,7 @@ public: * @return true if the authentication has finished, or false * otherwise */ - virtual const bool isComplete() const = 0; + virtual bool isComplete() const = 0; /** Encode data according to negotiated SASL mechanism. This * might mean that data is integrity or privacy protected. diff --git a/vmime/security/sasl/SASLMechanismFactory.hpp b/vmime/security/sasl/SASLMechanismFactory.hpp index 55b751b8..13d0efd7 100644 --- a/vmime/security/sasl/SASLMechanismFactory.hpp +++ b/vmime/security/sasl/SASLMechanismFactory.hpp @@ -113,7 +113,7 @@ public: * @return true if the specified mechanism is supported, * false otherwise */ - const bool isMechanismSupported(const string& name) const; + bool isMechanismSupported(const string& name) const; private: diff --git a/vmime/security/sasl/SASLSession.hpp b/vmime/security/sasl/SASLSession.hpp index d2db6ffe..8c9eca6f 100644 --- a/vmime/security/sasl/SASLSession.hpp +++ b/vmime/security/sasl/SASLSession.hpp @@ -101,7 +101,7 @@ public: * authentication (in this case, the values in 'response' and * 'responseLen' are undetermined) */ - const bool evaluateChallenge + bool evaluateChallenge (const byte_t* challenge, const int challengeLen, byte_t** response, int* responseLen); diff --git a/vmime/security/sasl/SASLSocket.hpp b/vmime/security/sasl/SASLSocket.hpp index 388bf6f1..fc6fc394 100644 --- a/vmime/security/sasl/SASLSocket.hpp +++ b/vmime/security/sasl/SASLSocket.hpp @@ -50,10 +50,10 @@ public: void connect(const string& address, const port_t port); void disconnect(); - const bool isConnected() const; + bool isConnected() const; void receive(string& buffer); - const int receiveRaw(char* buffer, const int count); + int receiveRaw(char* buffer, const int count); void send(const string& buffer); void sendRaw(const char* buffer, const int count); diff --git a/vmime/security/sasl/builtinSASLMechanism.hpp b/vmime/security/sasl/builtinSASLMechanism.hpp index def338a3..a1ea5314 100644 --- a/vmime/security/sasl/builtinSASLMechanism.hpp +++ b/vmime/security/sasl/builtinSASLMechanism.hpp @@ -49,12 +49,11 @@ public: const string getName() const; - const bool step - (ref <SASLSession> sess, + bool step(ref <SASLSession> sess, const byte_t* challenge, const int challengeLen, byte_t** response, int* responseLen); - const bool isComplete() const; + bool isComplete() const; void encode(ref <SASLSession> sess, const byte_t* input, const int inputLen, diff --git a/vmime/streamContentHandler.hpp b/vmime/streamContentHandler.hpp index 0c1738fd..b9e8e972 100644 --- a/vmime/streamContentHandler.hpp +++ b/vmime/streamContentHandler.hpp @@ -54,13 +54,13 @@ public: void extract(utility::outputStream& os, utility::progressListener* progress = NULL) const; void extractRaw(utility::outputStream& os, utility::progressListener* progress = NULL) const; - const string::size_type getLength() const; + string::size_type getLength() const; - const bool isEncoded() const; + bool isEncoded() const; const vmime::encoding& getEncoding() const; - const bool isEmpty() const; + bool isEmpty() const; private: diff --git a/vmime/stringContentHandler.hpp b/vmime/stringContentHandler.hpp index 6545cba0..0e7d1e3a 100644 --- a/vmime/stringContentHandler.hpp +++ b/vmime/stringContentHandler.hpp @@ -72,13 +72,13 @@ public: void extract(utility::outputStream& os, utility::progressListener* progress = NULL) const; void extractRaw(utility::outputStream& os, utility::progressListener* progress = NULL) const; - const string::size_type getLength() const; + string::size_type getLength() const; - const bool isEncoded() const; + bool isEncoded() const; const vmime::encoding& getEncoding() const; - const bool isEmpty() const; + bool isEmpty() const; private: diff --git a/vmime/text.hpp b/vmime/text.hpp index 44014668..34427b5a 100644 --- a/vmime/text.hpp +++ b/vmime/text.hpp @@ -50,8 +50,8 @@ public: public: - const bool operator==(const text& t) const; - const bool operator!=(const text& t) const; + bool operator==(const text& t) const; + bool operator!=(const text& t) const; ref <component> clone() const; void copyFrom(const component& other); @@ -95,13 +95,13 @@ public: * * @return number of words */ - const int getWordCount() const; + int getWordCount() const; /** Tests whether the list of words is empty. * * @return true if there is no word, false otherwise */ - const bool isEmpty() const; + bool isEmpty() const; /** Return the word at the specified position. * diff --git a/vmime/textPart.hpp b/vmime/textPart.hpp index 1fbbe4d4..1e8a4851 100644 --- a/vmime/textPart.hpp +++ b/vmime/textPart.hpp @@ -87,7 +87,7 @@ public: * * @return number of body parts */ - virtual const int getPartCount() const = 0; + virtual int getPartCount() const = 0; /** Generate the text part(s) into the specified message. * diff --git a/vmime/utility/datetimeUtils.hpp b/vmime/utility/datetimeUtils.hpp index 05025ee2..23d1a969 100644 --- a/vmime/utility/datetimeUtils.hpp +++ b/vmime/utility/datetimeUtils.hpp @@ -44,7 +44,7 @@ public: * @param year year in 4-digit format * @return true if year is a leap year, false otherwise */ - static const bool isLeapYear(const int year); + static bool isLeapYear(const int year); /** Return the number of days in the specified month. * @@ -53,7 +53,7 @@ public: * @param month month, January is 1, December is 12 (see datetime::Months enum) * @return the number of days in the month */ - static const int getDaysInMonth(const int year, const int month); + static int getDaysInMonth(const int year, const int month); /** Convert the specified date/time to UT (GMT). * @@ -77,7 +77,7 @@ public: * @param day month day (1-31) * @return the day of the week, Sunday is 0, Monday is 1 (see datetime::DaysOfWeek enum) */ - static const int getDayOfWeek(const int year, const int month, const int day); + static int getDayOfWeek(const int year, const int month, const int day); /** Return the week number in the year (ISO 8601). * @@ -86,7 +86,7 @@ public: * @param day month day (1-31) * @return the week number (1 is the first week of the year) */ - static const int getWeekOfYear(const int year, const int month, const int day); + static int getWeekOfYear(const int year, const int month, const int day); }; diff --git a/vmime/utility/file.hpp b/vmime/utility/file.hpp index aecb59a4..390c4f44 100644 --- a/vmime/utility/file.hpp +++ b/vmime/utility/file.hpp @@ -55,7 +55,7 @@ public: * @return true if you can call nextElement(), or false * if no more file is available */ - virtual const bool hasMoreElements() const = 0; + virtual bool hasMoreElements() const = 0; /** Return the next file in the list. * @@ -123,31 +123,31 @@ public: * * @return true if this is a file, false otherwise */ - virtual const bool isFile() const = 0; + virtual bool isFile() const = 0; /** Test whether this is a directory. * * @return true if this is a directory, false otherwise */ - virtual const bool isDirectory() const = 0; + virtual bool isDirectory() const = 0; /** Test whether this file is readible. * * @return true if we can read this file, false otherwise */ - virtual const bool canRead() const = 0; + virtual bool canRead() const = 0; /** Test whether this file is writeable. * * @return true if we can write to this file, false otherwise */ - virtual const bool canWrite() const = 0; + virtual bool canWrite() const = 0; /** Return the length of this file. * * @return file size (in bytes) */ - virtual const length_type getLength() = 0; + virtual length_type getLength() = 0; /** Return the full path of this file/directory. * @@ -159,7 +159,7 @@ public: * * @return true if the file exists, false otherwise */ - virtual const bool exists() const = 0; + virtual bool exists() const = 0; /** Return the parent directory of this file/directory. * @@ -247,7 +247,7 @@ public: * @param comp path component to test * @return true if the component is valid, false otherwise */ - virtual const bool isValidPathComponent(const file::path::component& comp) const = 0; + virtual bool isValidPathComponent(const file::path::component& comp) const = 0; /** Test whether the specified path is syntactically valid * (ie: components do not contain any 'special' character). @@ -255,7 +255,7 @@ public: * @param path path to test * @return true if the path is valid, false otherwise */ - virtual const bool isValidPath(const file::path& path) const = 0; + virtual bool isValidPath(const file::path& path) const = 0; }; diff --git a/vmime/utility/filteredStream.hpp b/vmime/utility/filteredStream.hpp index 3d83e325..9f64ba95 100644 --- a/vmime/utility/filteredStream.hpp +++ b/vmime/utility/filteredStream.hpp @@ -80,13 +80,13 @@ public: inputStream& getPreviousInputStream(); - const bool eof() const; + bool eof() const; void reset(); - const size_type read(value_type* const data, const size_type count); + size_type read(value_type* const data, const size_type count); - const size_type skip(const size_type count); + size_type skip(const size_type count); private: @@ -173,7 +173,7 @@ public: return (m_stream); } - const bool eof() const + bool eof() const { return (m_found == COUNT || m_eof); } @@ -184,9 +184,9 @@ public: m_stream.reset(); } - const size_type read(value_type* const data, const size_type count); + size_type read(value_type* const data, const size_type count); - const size_type skip(const size_type /* count */) + size_type skip(const size_type /* count */) { // Not supported return 0; @@ -204,12 +204,12 @@ private: template <> -const stream::size_type stopSequenceFilteredInputStream <1>::read +stream::size_type stopSequenceFilteredInputStream <1>::read (value_type* const data, const size_type count); template <int COUNT> -const stream::size_type stopSequenceFilteredInputStream <COUNT>::read +stream::size_type stopSequenceFilteredInputStream <COUNT>::read (value_type* const data, const size_type count) { // Read buffer must be at least 'COUNT' size + 1 byte diff --git a/vmime/utility/path.hpp b/vmime/utility/path.hpp index f9346e8f..c4aed264 100644 --- a/vmime/utility/path.hpp +++ b/vmime/utility/path.hpp @@ -66,8 +66,8 @@ public: path& operator=(const component& c); // Path comparison - const bool operator==(const path& p) const; - const bool operator!=(const path& p) const; + bool operator==(const path& p) const; + bool operator!=(const path& p) const; /** Append a component to the path. * @@ -93,13 +93,13 @@ public: * * @return true if the path is empty (no components = root) */ - const bool isEmpty() const; + bool isEmpty() const; /** Test whether this path is the root (alias for isEmpty()). * * @return true if the path is the root */ - const bool isRoot() const; + bool isRoot() const; /** Return the last component of this path (const version). * @@ -117,7 +117,7 @@ public: * * @return number of components */ - const int getSize() const; + int getSize() const; /** Return the specified component of the path (const version). * @@ -139,7 +139,7 @@ public: * @return true if the specified path is a child * of this path, false otherwise */ - const bool isDirectParentOf(const path& p) const; + bool isDirectParentOf(const path& p) const; /** Test whether this path is a parent of another one. * @@ -147,7 +147,7 @@ public: * @return true if the specified path is a child (direct or * indirect) of this path, false otherwise */ - const bool isParentOf(const path& p) const; + bool isParentOf(const path& p) const; /** Rename a parent component in the path. * Example: path("a/b/c/d").renameParent("a/b", "x/y/z") diff --git a/vmime/utility/progressListener.hpp b/vmime/utility/progressListener.hpp index 65abc68b..f26599d7 100644 --- a/vmime/utility/progressListener.hpp +++ b/vmime/utility/progressListener.hpp @@ -48,7 +48,7 @@ public: * * @return true to cancel the operation, false otherwise */ - virtual const bool cancel() const = 0; + virtual bool cancel() const = 0; /** Called at the beginning of the operation. * @@ -88,7 +88,7 @@ public: */ progressListenerSizeAdapter(progressListener* list, const int total); - const bool cancel() const; + bool cancel() const; void start(const int predictedTotal); void progress(const int current, const int currentTotal); diff --git a/vmime/utility/random.hpp b/vmime/utility/random.hpp index 92e16617..1db15f58 100644 --- a/vmime/utility/random.hpp +++ b/vmime/utility/random.hpp @@ -43,21 +43,21 @@ public: * * @return random number */ - static const unsigned int getNext(); + static unsigned int getNext(); /** Return the current time as a number (may be used to * build "random" strings). * * @return time as a number */ - static const unsigned int getTime(); + static unsigned int getTime(); /** Return the current process number (may be user to * build "random" strings). * * @return process number */ - static const unsigned int getProcess(); + static unsigned int getProcess(); /** Return a random character string with the specified length. * diff --git a/vmime/utility/smartPtr.hpp b/vmime/utility/smartPtr.hpp index 19f21f52..d2a78a6d 100644 --- a/vmime/utility/smartPtr.hpp +++ b/vmime/utility/smartPtr.hpp @@ -53,7 +53,7 @@ public: operator T*() { return (m_ptr); } - T* const operator ->() { return (m_ptr); } + T* operator ->() { return (m_ptr); } T& operator *() { return (*m_ptr); } }; @@ -79,7 +79,7 @@ public: /** Add a strong reference to the managed object. */ - virtual const bool addStrong() = 0; + virtual bool addStrong() = 0; /** Release a strong reference to the managed object. * If it is the last reference, the object is destroyed. @@ -106,14 +106,14 @@ public: * * @return strong reference count */ - virtual const long getStrongRefCount() const = 0; + virtual long getStrongRefCount() const = 0; /** Return the number of weak refs to this object. * For debugging purposes only. * * @return weak reference count */ - virtual const long getWeakRefCount() const = 0; + virtual long getWeakRefCount() const = 0; protected: @@ -168,8 +168,8 @@ public: T* operator ->() { return m_ptr; } const T* operator ->() const { return m_ptr; } - const T* const get() const { return m_ptr; } - T* const get() { return m_ptr; } + const T* get() const { return m_ptr; } + T* get() { return m_ptr; } // dynamic_cast diff --git a/vmime/utility/smartPtrInt.hpp b/vmime/utility/smartPtrInt.hpp index 769c980d..a7c73454 100644 --- a/vmime/utility/smartPtrInt.hpp +++ b/vmime/utility/smartPtrInt.hpp @@ -43,8 +43,8 @@ public: refCounter(const long initialValue); ~refCounter(); - const long increment(); - const long decrement(); + long increment(); + long decrement(); operator long() const; @@ -75,7 +75,7 @@ public: refManagerImpl(object* obj); ~refManagerImpl(); - const bool addStrong(); + bool addStrong(); void releaseStrong(); void addWeak(); @@ -83,8 +83,8 @@ public: object* getObject(); - const long getStrongRefCount() const; - const long getWeakRefCount() const; + long getStrongRefCount() const; + long getWeakRefCount() const; private: diff --git a/vmime/utility/stream.hpp b/vmime/utility/stream.hpp index 94e76fae..a9c079ba 100644 --- a/vmime/utility/stream.hpp +++ b/vmime/utility/stream.hpp @@ -77,7 +77,7 @@ public: * * @return block size, in bytes */ - virtual const size_type getBlockSize() const; + virtual size_type getBlockSize() const; }; @@ -115,7 +115,7 @@ public: * * @return true if we have reached the end of stream, false otherwise */ - virtual const bool eof() const = 0; + virtual bool eof() const = 0; /** Set the read pointer to the beginning of the stream. * @@ -129,14 +129,14 @@ public: * @param count maximum number of bytes to read * @return number of bytes read */ - virtual const size_type read(value_type* const data, const size_type count) = 0; + virtual size_type read(value_type* const data, const size_type count) = 0; /** Skip a number of bytes. * * @param count maximum number of bytes to ignore * @return number of bytes skipped */ - virtual const size_type skip(const size_type count) = 0; + virtual size_type skip(const size_type count) = 0; }; @@ -188,7 +188,7 @@ outputStream& operator<<(outputStream& os, const T& t) * @return number of bytes copied */ -const stream::size_type bufferedStreamCopy(inputStream& is, outputStream& os); +stream::size_type bufferedStreamCopy(inputStream& is, outputStream& os); /** Copy data from one stream into another stream using a buffered method * and notify progress state of the operation. @@ -200,7 +200,7 @@ const stream::size_type bufferedStreamCopy(inputStream& is, outputStream& os); * @return number of bytes copied */ -const stream::size_type bufferedStreamCopy(inputStream& is, outputStream& os, +stream::size_type bufferedStreamCopy(inputStream& is, outputStream& os, const stream::size_type length, progressListener* progress); @@ -274,10 +274,10 @@ public: */ inputStreamAdapter(std::istream& is); - const bool eof() const; + bool eof() const; void reset(); - const size_type read(value_type* const data, const size_type count); - const size_type skip(const size_type count); + size_type read(value_type* const data, const size_type count); + size_type skip(const size_type count); private: @@ -295,10 +295,10 @@ public: inputStreamStringAdapter(const string& buffer); inputStreamStringAdapter(const string& buffer, const string::size_type begin, const string::size_type end); - const bool eof() const; + bool eof() const; void reset(); - const size_type read(value_type* const data, const size_type count); - const size_type skip(const size_type count); + size_type read(value_type* const data, const size_type count); + size_type skip(const size_type count); private: @@ -322,10 +322,10 @@ public: */ inputStreamStringProxyAdapter(const stringProxy& buffer); - const bool eof() const; + bool eof() const; void reset(); - const size_type read(value_type* const data, const size_type count); - const size_type skip(const size_type count); + size_type read(value_type* const data, const size_type count); + size_type skip(const size_type count); private: @@ -350,10 +350,10 @@ public: inputStreamPointerAdapter(std::istream* is, const bool own = true); ~inputStreamPointerAdapter(); - const bool eof() const; + bool eof() const; void reset(); - const size_type read(value_type* const data, const size_type count); - const size_type skip(const size_type count); + size_type read(value_type* const data, const size_type count); + size_type skip(const size_type count); private: @@ -373,10 +373,10 @@ public: inputStreamByteBufferAdapter(const byte_t* buffer, size_type length); - const bool eof() const; + bool eof() const; void reset(); - const size_type read(value_type* const data, const size_type count); - const size_type skip(const size_type count); + size_type read(value_type* const data, const size_type count); + size_type skip(const size_type count); private: @@ -402,7 +402,7 @@ public: void write(const value_type* const data, const size_type count); void flush(); - const size_type getBlockSize() const; + size_type getBlockSize() const; private: @@ -421,12 +421,12 @@ public: inputStreamSocketAdapter(net::socket& sok); - const bool eof() const; + bool eof() const; void reset(); - const size_type read(value_type* const data, const size_type count); - const size_type skip(const size_type count); + size_type read(value_type* const data, const size_type count); + size_type skip(const size_type count); - const size_type getBlockSize() const; + size_type getBlockSize() const; private: diff --git a/vmime/utility/stringProxy.hpp b/vmime/utility/stringProxy.hpp index 0e16a1c6..d080e67a 100644 --- a/vmime/utility/stringProxy.hpp +++ b/vmime/utility/stringProxy.hpp @@ -66,11 +66,11 @@ public: void extract(outputStream& os, const size_type start = 0, const size_type end = std::numeric_limits <size_type>::max(), utility::progressListener* progress = NULL) const; // Return the "virtual" length of the string - const size_type length() const; + size_type length() const; // Return the boundaries of the "virtual" string - const size_type start() const; - const size_type end() const; + size_type start() const; + size_type end() const; string::const_iterator it_begin() const { return (m_buffer.begin() + m_start); } string::const_iterator it_end() const { return (m_buffer.begin() + m_end); } diff --git a/vmime/utility/stringUtils.hpp b/vmime/utility/stringUtils.hpp index 7d49e54d..89fd386e 100644 --- a/vmime/utility/stringUtils.hpp +++ b/vmime/utility/stringUtils.hpp @@ -50,7 +50,7 @@ public: * @param n length of the second string * @return true if the two strings compare equally, false otherwise */ - static const bool isStringEqualNoCase(const string& s1, const char* s2, const string::size_type n); + static bool isStringEqualNoCase(const string& s1, const char* s2, const string::size_type n); /** Test two strings for equality (case insensitive). * \warning Use this with ASCII-only strings. @@ -59,7 +59,7 @@ public: * @param s2 second string * @return true if the two strings compare equally, false otherwise */ - static const bool isStringEqualNoCase(const string& s1, const string& s2); + static bool isStringEqualNoCase(const string& s1, const string& s2); /** Test two strings for equality (case insensitive). * \warning Use this with ASCII-only strings. @@ -70,7 +70,7 @@ public: * @param n length of the second string * @return true if the two strings compare equally, false otherwise */ - static const bool isStringEqualNoCase(const string::const_iterator begin, const string::const_iterator end, const char* s, const string::size_type n); + static bool isStringEqualNoCase(const string::const_iterator begin, const string::const_iterator end, const char* s, const string::size_type n); /** Transform all the characters in a string to lower-case. * \warning Use this with ASCII-only strings. @@ -102,7 +102,7 @@ public: * @param end end position * @return number of ASCII characters */ - static const string::size_type countASCIIchars(const string::const_iterator begin, const string::const_iterator end); + static string::size_type countASCIIchars(const string::const_iterator begin, const string::const_iterator end); /** Convert the specified value to a string value. * diff --git a/vmime/utility/url.hpp b/vmime/utility/url.hpp index 9fccdb9d..99585b15 100644 --- a/vmime/utility/url.hpp +++ b/vmime/utility/url.hpp @@ -136,7 +136,7 @@ public: * * @return server port */ - const port_t getPort() const; + port_t getPort() const; /** Set the port of the URL. * diff --git a/vmime/word.hpp b/vmime/word.hpp index 800a78d5..14f8b0e2 100644 --- a/vmime/word.hpp +++ b/vmime/word.hpp @@ -82,8 +82,8 @@ public: word& operator=(const word& w); word& operator=(const string& s); - const bool operator==(const word& w) const; - const bool operator!=(const word& w) const; + bool operator==(const word& w) const; + bool operator!=(const word& w) const; #if VMIME_WIDE_CHAR_SUPPORT const wstring getDecodedText() const; diff --git a/vmime/wordEncoder.hpp b/vmime/wordEncoder.hpp index 58c4fb7d..98294fa6 100644 --- a/vmime/wordEncoder.hpp +++ b/vmime/wordEncoder.hpp @@ -65,11 +65,11 @@ public: * * @return encoding */ - const Encoding getEncoding() const; + Encoding getEncoding() const; private: - static const Encoding guessBestEncoding(const string& buffer, const charset& charset); + static Encoding guessBestEncoding(const string& buffer, const charset& charset); void guessBestEncoding(); |