Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

ChromiumCookieManagerMBS.AllCookies as ChromiumCookieMBS()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method HTMLViewer Win MBS Win Plugin 15.2 No Yes No No No
Function: Visit all cookies.
Example:
dim m as new ChromiumCookieManagerMBS
dim cookies() as ChromiumCookieMBS = m.AllCookies
MsgBox str(cookies.Ubound+1)+" cookies"
Notes: The returned cookies are ordered by longest path, then by earliest creation date. Returns false (0) if cookies cannot be accessed.

Feedback, Comments & Corrections

ChromiumCookieManagerMBS.Constructor
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method HTMLViewer Win MBS Win Plugin 15.2 No Yes No No No
Function: The constructor.
Notes:
Can raise exception if no cookie manager is available, e.g. when calling on Linux or Mac OS X or Windows if you don't have the dlls.
May not work if the Chromium was not initialized before by Xojo.

See also:

Feedback, Comments & Corrections

ChromiumCookieManagerMBS.Constructor(path as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method HTMLViewer Win MBS Win Plugin 16.4 No Yes No No No
Function: The constructor for a new cookie manager.
Notes:
Can raise exception if no cookie manager is available, e.g. when calling on Linux or Mac OS X or Windows if you don't have the dlls.
May not work if the Chromium was not initialized before by Xojo.

See also:

Feedback, Comments & Corrections

ChromiumCookieManagerMBS.DeleteAllCookies as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method HTMLViewer Win MBS Win Plugin 15.2 No Yes No No No
Function: Deletes all cookies.
Notes: Returns number of deleted cookies.

Feedback, Comments & Corrections

ChromiumCookieManagerMBS.DeleteCookie(URL as string, CookieName as string) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method HTMLViewer Win MBS Win Plugin 15.2 No Yes No No No
Function: Delete all cookies that match the specified parameters.
Notes:
If both url and values cookieName are specified all host and domain cookies matching both will be deleted. If only |url| is specified all host cookies (but not domain cookies) irrespective of path will be deleted. If url is empty all cookies for all hosts and domains will be deleted. Returns false if a non-empty invalid URL is specified or if cookies cannot be accessed.
Returns true on success.

Feedback, Comments & Corrections

ChromiumCookieManagerMBS.DeleteCookies(URLs() as string, CookieNames() as string) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method HTMLViewer Win MBS Win Plugin 15.2 No Yes No No No
Function: Deletes several cookies.
Notes:
Same as DeleteCookie, but with arrays for parameters.
Returns number of successful delete attempts.

Feedback, Comments & Corrections

ChromiumCookieManagerMBS.DeleteURLCookies(URL as String, HTTPOnly as boolean = false) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method HTMLViewer Win MBS Win Plugin 15.2 No Yes No No No
Function: Deletes all cookies for a given URL.
Notes:
The cookies to delete are filtered by the given url scheme, host, domain and path. If includeHttpOnly is true HTTP-only cookies will also be included in the deletion.
Returns number of cookies deleted.

Feedback, Comments & Corrections

ChromiumCookieManagerMBS.Destructor
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method HTMLViewer Win MBS Win Plugin 15.2 No Yes No No No
Function: The destructor.

Feedback, Comments & Corrections

ChromiumCookieManagerMBS.SetCookie(URL as string, cookie as ChromiumCookieMBS) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method HTMLViewer Win MBS Win Plugin 15.2 No Yes No No No
Function: Sets a cookie given a valid URL and explicit user-provided cookie attributes.
Example:
dim d as new date
dim c as new ChromiumCookieMBS

c.Domain = "www.mbsplugins.de"
c.Path = "/"
c.CreationDate = d
c.LastAccessDate = d
c.ExpirationDate = nil
c.Value = "test "+d.SQLDateTime
c.Name = "test"
c.Secure = false
c.HTTPonly = false

if CookieManager.SetCookie(c.URL, c) then
msgbox "OK"
else
MsgBox "Failed to add cookie"
end if
Notes: This function expects each attribute to be well-formed. It will check for disallowed characters (e.g. the ';' character is disallowed within the cookie value attribute) and will return false without setting the cookie if such characters are found.

Feedback, Comments & Corrections

ChromiumCookieManagerMBS.SetCookies(URL() as string, cookies() as ChromiumCookieMBS) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method HTMLViewer Win MBS Win Plugin 15.2 No Yes No No No
Function: Sets a lot of cookies.
Notes:
Same as SetCookie, but with arrays of URLs and cookie objects.
Returns number of cookies created successfully.

Feedback, Comments & Corrections

ChromiumCookieManagerMBS.SetStoragePath(Path as string) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method HTMLViewer Win MBS Win Plugin 15.2 No Yes No No No
Function: Sets the directory path that will be used for storing cookie data.
Example:
dim CookieManager as ChromiumCookieManagerMBS // property of window/app

dim f as FolderItem = SpecialFolder.Desktop.Child("cookies")
f.CreateAsFolder

CookieManager = new ChromiumCookieManagerMBS

if CookieManager.SetStoragePath(f.NativePath) then
MsgBox "OK"
else
MsgBox "Failed"
end if
Notes:
If path is empty data will be stored in memory only.
Returns false if cookies cannot be accessed.

Feedback, Comments & Corrections

ChromiumCookieManagerMBS.URLCookies(URL as String, HTTPOnly as boolean = false) as ChromiumCookieMBS()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method HTMLViewer Win MBS Win Plugin 15.2 No Yes No No No
Function: Queries a subset of cookies.
Notes:
The results are filtered by the given url scheme, host, domain and path. If includeHttpOnly is true HTTP-only cookies will also be included in the results. The returned cookies are ordered by longest path, then by earliest creation date. Returns empty array if cookies cannot be accessed.
Returns nil on any error like low memory.

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS Win Plugin.





Links
MBS FileMaker Plugins