Beispiel #1
0
    public DownloadData AddDownloadUrl(string url, OnDownloadOk cb, int timeout = -1, object userData = null)
    {
        DownloadData data = new DownloadData(DownloadData.DownloadType.DownloadType_Get_URL);

        data._url      = url;
        data._cb       = cb;
        data._timeout  = timeout;
        data._userData = userData;
        AddTask(data);
        return(data);
    }
Beispiel #2
0
    public DownloadData AddPostForm(string url, WWWForm postData, OnDownloadOk cb, int timeout = -1, object userData = null)
    {
        DownloadData data = new DownloadData(DownloadData.DownloadType.DownloadType_Post_Form);

        data._url      = url;
        data._cb       = cb;
        data._data     = postData;
        data._timeout  = timeout;
        data._userData = userData;
        AddTask(data);
        return(data);
    }
Beispiel #3
0
    /// <summary>
    ///
    /// </summary>
    /// <param name="url"></param>
    /// <param name="version"></param>
    /// <param name="cb"></param>
    public DownloadData AddDownLoadCache(string url, int version, OnDownloadOk cb, int timeout = -1, object userData = null)
    {
        DownloadData data = new DownloadData(DownloadData.DownloadType.DownloadType_and_Cache);

        data._url      = url;
        data._version  = version;
        data._cb       = cb;
        data._timeout  = timeout;
        data._userData = userData;
        AddTask(data);
        return(data);
    }