This repository was archived by the owner on Aug 2, 2025. It is now read-only.
forked from cztomczak/cefpython
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdownload.pyx
More file actions
73 lines (49 loc) · 2.36 KB
/
Copy pathdownload.pyx
File metadata and controls
73 lines (49 loc) · 2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
include "cefpython.pyx"
cdef class PyDownloadItem:
cdef CefRefPtr[CefDownloadItem] cefDownloadItem
cpdef py_bool IsValid(self):
return self.cefDownloadItem.get().IsValid()
cpdef py_bool IsInProgress(self):
return self.cefDownloadItem.get().IsInProgress()
cpdef py_bool IsComplete(self):
return self.cefDownloadItem.get().IsComplete()
cpdef py_bool IsCanceled(self):
return self.cefDownloadItem.get().IsCanceled()
cpdef object GetCurrentSpeed(self):
return self.cefDownloadItem.get().GetCurrentSpeed()
cpdef object GetPercentComplete(self):
return self.cefDownloadItem.get().GetPercentComplete()
cpdef object GetTotalBytes(self):
return self.cefDownloadItem.get().GetTotalBytes()
cpdef object GetReceivedBytes(self):
return self.cefDownloadItem.get().GetReceivedBytes()
cpdef object GetStartTime(self):
return self.cefDownloadItem.get().GetStartTime()
cpdef object GetEndTime(self):
return self.cefDownloadItem.get().GetEndTime()
cpdef str GetFullPath(self):
return CefToPyString(self.cefDownloadItem.get().GetFullPath())
cpdef object GetId(self):
return self.cefDownloadItem.get().GetId()
cpdef str GetURL(self):
return CefToPyString(self.cefDownloadItem.get().GetURL())
cpdef str GetOriginalUrl(self):
return CefToPyString(self.cefDownloadItem.get().GetOriginalUrl())
cpdef str GetSuggestedFileName(self):
return CefToPyString(self.cefDownloadItem.get().GetSuggestedFileName())
cpdef str GetContentDisposition(self):
return CefToPyString(self.cefDownloadItem.get().GetContentDisposition())
cpdef str GetMimeType(self):
return CefToPyString(self.cefDownloadItem.get().GetMimeType())
cdef class PyBeforeDownloadCallback:
cdef CefRefPtr[CefBeforeDownloadCallback] cefBeforeDownloadCallback
cpdef Continue(self, str downloadPath, py_bool showDialog):
self.cefBeforeDownloadCallback.get().Continue(PyToCefStringValue(downloadPath), showDialog)
cdef class PyDownloadItemCallback:
cdef CefRefPtr[CefDownloadItemCallback] cefDownloadItemCallback
cpdef Cancel(self):
self.cefDownloadItemCallback.get().Cancel()
cpdef Pause(self):
self.cefDownloadItemCallback.get().Pause()
cpdef Resume(self):
self.cefDownloadItemCallback.get().Resume()