#pragma once #include "Stdafx.h" #include "SchemeHandlerWrapper.h" using namespace System; using namespace System::Collections::Generic; using namespace System::IO; namespace CefSharp { class SchemeHandlerWrapper; public ref class SchemeHandlerResponse { internal: CefRefPtr* _schemeHandlerWrapper; void OnRequestCompleted(); public: /// /// A Stream with the response data. If the request didn't return any response, leave this property as null. /// property Stream^ ResponseStream; property String^ MimeType; property IDictionary^ ResponseHeaders; /// /// The status code of the response. Unless set, the default value used is 200 /// (corresponding to HTTP status OK). /// property int StatusCode; /// /// The length of the response contents. Defaults to -1, which means unknown length /// and causes CefSharp to read the response stream in pieces. Thus, setting a length /// is optional but allows for more optimal response reading. /// property int ContentLength; /// /// URL to redirect to (leave empty to not redirect). /// property String^ RedirectUrl; /// /// Set to true to close the response stream once it has been read. The default value /// is false in order to preserve the old CefSharp behavior of not closing the stream. /// property bool CloseStream; SchemeHandlerResponse(SchemeHandlerWrapper* schemeHandlerWrapper) { ContentLength = -1; _schemeHandlerWrapper = new CefRefPtr(schemeHandlerWrapper); } void ReleaseSchemeHandlerWrapper() { delete _schemeHandlerWrapper; } }; };