summaryrefslogtreecommitdiffstats
path: root/Src/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/94/00dbdc9893f2001019c79f38f40e52ba
diff options
context:
space:
mode:
authorTom2012-01-11 17:00:30 +0100
committerTom2012-01-11 17:00:30 +0100
commit9fcc469afa01fc9ea42e4cbb96c5b195c5bcd371 (patch)
tree89d4015f6a34119069665d74a67d871fcd124509 /Src/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/94/00dbdc9893f2001019c79f38f40e52ba
parentrefresh (diff)
downloadimsi-catcher-detection-9fcc469afa01fc9ea42e4cbb96c5b195c5bcd371.tar.gz
imsi-catcher-detection-9fcc469afa01fc9ea42e4cbb96c5b195c5bcd371.tar.xz
imsi-catcher-detection-9fcc469afa01fc9ea42e4cbb96c5b195c5bcd371.zip
all reupped
Diffstat (limited to 'Src/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/94/00dbdc9893f2001019c79f38f40e52ba')
-rw-r--r--Src/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/94/00dbdc9893f2001019c79f38f40e52ba60
1 files changed, 60 insertions, 0 deletions
diff --git a/Src/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/94/00dbdc9893f2001019c79f38f40e52ba b/Src/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/94/00dbdc9893f2001019c79f38f40e52ba
new file mode 100644
index 0000000..c8a0e0d
--- /dev/null
+++ b/Src/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/94/00dbdc9893f2001019c79f38f40e52ba
@@ -0,0 +1,60 @@
+import sys
+import pygtk
+import gtk #@UnresolvedImport
+import gtk.glade #@UnresolvedImport
+from driverConnector import DriverConnector
+from pyCatcherModel import BaseStationInformation, BaseStationInformationList
+from pyCatcherView import PyCatcherGUI
+
+class PyCatcherController:
+ def __init__(self):
+
+ self._base_station_list = BaseStationInformationList()
+ store = gtk.ListStore(str,str,str,str)
+ store.append(('a','b','c','d'))
+ self.bs_tree_list_data = store
+ self._gui = PyCatcherGUI(self)
+ store2 = gtk.ListStore(str,str,str,str)
+ store2.append(('aa','ba','cc','dd'))
+ self.bs_tree_list_data = store2
+ self._driver_connector = DriverConnector()
+ self._gui.log_line("GUI initialized")
+ gtk.main()
+
+ def log_message(self, message):
+ self._gui.log_line(message)
+
+ def start_scan(self):
+ self._gui.log_line("start scan")
+ self._driver_connector.start_scanning(self._found_base_station_callback)
+
+ def stop_scan(self):
+ self._gui.log_line("stop scan")
+ self._driver_connector.stop_scanning()
+
+ def start_firmware(self):
+ self._gui.log_line("start firmware")
+ self._driver_connector.start_firmware(self._firmware_waiting_callback, self._firmware_done_callback)
+
+ def stop_firmware(self):
+ self._gui.log_line("stop firmware")
+ print 'stop firmwares'
+ self._driver_connector.stop_firmware()
+
+ def shutdown(self):
+ self._driver_connector.shutdown()
+
+ def _found_base_station_callback(self, base_station):
+ self._gui.log_line("found " + base_station.country + '(' + base_station.arfcn + ')')
+ self._base_station_list.add_station(base_station)
+ self.bs_tree_list_data = self._base_station_list.get_list_store()
+ #TODO rebuild diagram
+
+ def _firmware_waiting_callback(self):
+ self._gui.log_line("firmware waiting for device")
+ self._gui.show_info('Switch on the phone now.', 'Firmware')
+
+ def _firmware_done_callback(self):
+ self._gui.log_line("firmware loaded, ready for scanning")
+ self._gui.show_info('Firmware load completed', 'Firmware')
+ \ No newline at end of file