OpenShot Library | libopenshot-audio
0.2.0
|
55 URL (
const URL&) =
default;
56 URL& operator= (
const URL&) =
default;
72 bool operator== (
const URL&)
const;
73 bool operator!= (
const URL&)
const;
82 String toString (
bool includeGetParameters)
const;
85 bool isEmpty()
const noexcept;
88 bool isWellFormed()
const;
107 bool isLocalFile()
const;
118 File getLocalFile()
const;
127 String getFileName()
const;
139 URL withNewDomainAndPath (
const String& newFullPath)
const;
146 URL withNewSubPath (
const String& newPath)
const;
158 URL getChildURL (
const String& subPath)
const;
170 URL withParameter (
const String& parameterName,
171 const String& parameterValue)
const;
190 URL withFileToUpload (
const String& parameterName,
191 const File& fileToUpload,
192 const String& mimeType)
const;
203 URL withDataToUpload (
const String& parameterName,
206 const String& mimeType)
const;
246 URL withPOSTData (
const String& postData)
const;
272 bool launchInDefaultBrowser()
const;
278 static bool isProbablyAWebsiteURL (
const String& possibleURL);
283 static bool isProbablyAnEmailAddress (
const String& possibleEmailAddress);
335 InputStream* createInputStream (
bool doPostLikeRequest,
337 void* progressCallbackContext =
nullptr,
339 int connectionTimeOutMs = 0,
341 int* statusCode =
nullptr,
342 int numRedirectsToFollow = 5,
371 virtual void progress (
URL::DownloadTask* task, int64 bytesDownloaded, int64 totalLength);
401 int64 contentLength = -1, downloaded = 0;
402 bool finished =
false, error =
false;
415 static void juce_iosURLSessionNotify (
const String&);
419 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (
DownloadTask)
431 DownloadTask* downloadToFile (
const File& targetLocation,
433 DownloadTask::Listener* listener =
nullptr,
434 bool usePostCommand =
false);
450 bool readEntireBinaryStream (
MemoryBlock& destData,
451 bool usePostCommand =
false)
const;
467 String readEntireTextStream (
bool usePostCommand =
false)
const;
485 XmlElement* readEntireXmlStream (
bool usePostCommand =
false)
const;
506 static String addEscapeChars (
const String& stringToAddEscapeCharsTo,
508 bool roundBracketsAreLegal =
true);
519 static String removeEscapeChars (
const String& stringToRemoveEscapeCharsFrom);
525 static URL createWithoutParsing (
const String& url);
535 static File fileFromFileSchemeURL (
const URL&);
536 String getDomainInternal (
bool)
const;
541 String parameterName, filename, mimeType;
543 std::unique_ptr<MemoryBlock> data;
545 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Upload)
548 ReferenceCountedArray<Upload> filesToUpload;
551 struct Bookmark :
public ReferenceCountedObject
553 using Ptr = ReferenceCountedObjectPtr<Bookmark>;
561 Bookmark::Ptr bookmark;
563 friend void setURLBookmark (URL&,
void*);
564 friend void* getURLBookmark (URL&);
567 URL (
const String&,
int);
569 void addParameter (
const String&,
const String&);
570 void createHeadersAndPostData (String&, MemoryBlock&)
const;
571 URL withUpload (Upload*)
const;
573 JUCE_LEAK_DETECTOR (URL)
A special array for holding a list of strings.
bool isFinished() const
Returns true if the download finished or there was an error.
A base class which provides methods for reference-counting.
String getPostData() const noexcept
Returns the data that was set using withPOSTData().
File getTargetLocation() const
Returns the target file location that was provided in URL::downloadToFile.
Represents a URL and has a bunch of useful functions to manipulate it.
Used to receive callbacks for download progress.
#define JUCE_API
This macro is added to all JUCE public class declarations.
Used to build a tree of elements representing an XML document.
The base class for streams that write data to some kind of destination.
Represents a local file or directory.
int64 getTotalLength() const
Returns the total length of the download task.
const StringArray & getParameterNames() const noexcept
Returns an array of the names of all the URL's parameters.
int64 getLengthDownloaded() const
Returns the number of bytes that have been downloaded so far.
bool(void *context, int bytesSent, int totalBytes) OpenStreamProgressCallback
This callback function can be used by the createInputStream() method.
A container for holding a set of strings which are keyed by another string.
bool hadError() const
Returns true if there was an error.
int statusCode() const
Returns the status code of the server's response.
const StringArray & getParameterValues() const noexcept
Returns an array of the values of all the URL's parameters.
Represents a download task.
const MemoryBlock & getPostDataAsMemoryBlock() const noexcept
Returns the data that was set using withPOSTData() as MemoryBlock.
A class to hold a resizable block of raw data.