gecko/netwerk/streamconv/test/Converters.h
Ehsan Akhgari 33bb32f549 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00

53 lines
1.4 KiB
C++

#ifndef Converters_h___
#define Converters_h___
#include "nsIStreamConverter.h"
#include "nsIFactory.h"
#include "nsCOMPtr.h"
#include "nsStringAPI.h"
#include <algorithm>
/* This file defines stream converter components, and their accompanying factory class.
* These converters implement the nsIStreamConverter interface and support both
* asynchronous and synchronous stream conversion.
*/
///////////////////////////////////////////////
// TestConverter
extern const nsCID kTestConverterCID;
class TestConverter : public nsIStreamConverter {
virtual ~TestConverter() {}
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIREQUESTOBSERVER
NS_DECL_NSISTREAMLISTENER
TestConverter();
// nsIStreamConverter methods
NS_IMETHOD Convert(nsIInputStream *aFromStream, const char *aFromType,
const char *aToType, nsISupports *ctxt, nsIInputStream **_retval) override;
NS_IMETHOD AsyncConvertData(const char *aFromType, const char *aToType,
nsIStreamListener *aListener, nsISupports *ctxt) override;
// member data
nsCOMPtr<nsIStreamListener> mListener;
nsCString fromType;
nsCString toType;
};
nsresult CreateTestConverter(nsISupports* aOuter, REFNSIID aIID, void** aResult);
static inline uint32_t
saturated(uint64_t aValue)
{
return (uint32_t) std::min(aValue, (uint64_t) UINT32_MAX);
}
#endif /* !Converters_h___ */