summaryrefslogtreecommitdiff
path: root/external/plyer/facades/uniqueid.py
diff options
context:
space:
mode:
Diffstat (limited to 'external/plyer/facades/uniqueid.py')
-rw-r--r--external/plyer/facades/uniqueid.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/external/plyer/facades/uniqueid.py b/external/plyer/facades/uniqueid.py
new file mode 100644
index 0000000..d916f01
--- /dev/null
+++ b/external/plyer/facades/uniqueid.py
@@ -0,0 +1,29 @@
+class UniqueID(object):
+ '''UniqueID facade.
+
+ Returns the following depending on the platform:
+
+ * **Android**: Android ID
+ * **OS X**: Serial number of the device
+ * **Linux**: Serial number using lshw
+ * **Windows**: MachineGUID from regkey
+
+ .. versionadded:: 1.2.0
+
+ .. versionchanged:: 1.2.4
+ On Android returns Android ID instead of IMEI.
+ '''
+
+ @property
+ def id(self):
+ '''Property that returns the unique id of the platform.
+ '''
+ return self.get_uid()
+
+ def get_uid(self):
+ return self._get_uid()
+
+ # private
+
+ def _get_uid(self, **kwargs):
+ raise NotImplementedError()