eric6/WebBrowser/FlashCookieManager/FlashCookie.py

Wed, 30 Dec 2020 11:00:44 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 30 Dec 2020 11:00:44 +0100
branch
maintenance
changeset 7924
8a96736d465e
parent 7781
607a6098cb44
permissions
-rw-r--r--

Updated copyright for 2021.

4359
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
7924
8a96736d465e Updated copyright for 2021.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7781
diff changeset
3 # Copyright (c) 2015 - 2021 Detlev Offenbach <detlev@die-offenbachs.de>
4359
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing the Flash cookie class.
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
10 from PyQt5.QtCore import QDateTime
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13 class FlashCookie(object):
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14 """
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15 Class implementing the Flash cookie.
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16 """
4370
54dbb658f9e6 Corrected some code style issues and regenerated the source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4359
diff changeset
17 def __init__(self):
4359
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18 """
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19 Constructor
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20 """
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21 self.name = ""
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22 self.origin = ""
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 self.size = 0
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24 self.path = ""
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25 self.contents = ""
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26 self.lastModified = QDateTime()
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28 def __eq__(self, other):
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29 """
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30 Special method to compare to another Flash cookie.
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32 @param other reference to the other Flash cookie
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33 @type FlashCookie
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34 @return flag indicating equality of the two cookies
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35 @rtype bool
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36 """
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37 return (self.name == other.name and
ac1dda9f3f19 Started adding code for a Flash cookie manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38 self.path == other.path)

eric ide

mercurial