Retrieves the setting whether HTTPS connections are required. If there is no setting in the database, it defaults to True. Returns: bool.
(self)
| 28 | [should_be_required, _ROW_ID]) |
| 29 | |
| 30 | def requires_https(self): |
| 31 | """Retrieves the setting whether HTTPS connections are required. |
| 32 | |
| 33 | If there is no setting in the database, it defaults to True. |
| 34 | |
| 35 | Returns: |
| 36 | bool. |
| 37 | """ |
| 38 | cursor = self._db_connection.execute( |
| 39 | 'SELECT requires_https FROM settings WHERE id=?', [_ROW_ID]) |
| 40 | # Reminder: the `requires_https` column is of type integer. |
| 41 | raw_value = _fetch_single_value(cursor, 1) |
| 42 | return raw_value > 0 # Convert integer value to bool. |
| 43 | |
| 44 | def get_streaming_mode(self): |
| 45 | """Retrieves the preferred streaming mode for the remote screen. |