WebBrowser/FlashCookieManager/FlashCookie.py

branch
QtWebEngine
changeset 4751
f745a556fd6f
parent 4631
5c1a96925da4
child 5389
9b1c800daff3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/WebBrowser/FlashCookieManager/FlashCookie.py	Fri Feb 19 19:55:56 2016 +0100
@@ -0,0 +1,40 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (c) 2015 - 2016 Detlev Offenbach <detlev@die-offenbachs.de>
+#
+
+"""
+Module implementing the Flash cookie class.
+"""
+
+from __future__ import unicode_literals
+
+from PyQt5.QtCore import QDateTime
+
+
+class FlashCookie(object):
+    """
+    Class implementing the Flash cookie.
+    """
+    def __init__(self):
+        """
+        Constructor
+        """
+        self.name = ""
+        self.origin = ""
+        self.size = 0
+        self.path = ""
+        self.contents = ""
+        self.lastModified = QDateTime()
+    
+    def __eq__(self, other):
+        """
+        Special method to compare to another Flash cookie.
+        
+        @param other reference to the other Flash cookie
+        @type FlashCookie
+        @return flag indicating equality of the two cookies
+        @rtype bool
+        """
+        return (self.name == other.name and
+                self.path == other.path)

eric ide

mercurial