Changeset 908
- Timestamp:
- 02/08/07 10:35:49 (6 years ago)
- Location:
- trunk/src/target/OM-2007/applications/openmoko-dialer/src
- Files:
-
- 6 edited
-
Makefile.am (modified) (2 diffs)
-
dialergsm.c (modified) (4 diffs)
-
dialergsm.h (modified) (2 diffs)
-
openmoko-dialer-main.c (modified) (2 diffs)
-
openmoko-dialer-main.h (modified) (2 diffs)
-
pin.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/target/OM-2007/applications/openmoko-dialer/src/Makefile.am
r572 r908 12 12 moko-dialer-autolist.c\ 13 13 event.c\ 14 pin.c\15 14 history.c\ 16 15 contacts.c\ … … 22 21 openmoko-dialer-window-incoming.c\ 23 22 openmoko-dialer-window-talking.c\ 23 openmoko-dialer-window-pin.c\ 24 24 moko-dialer-status.c\ 25 25 alsa.c -
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialergsm.c
r907 r908 147 147 return -1; 148 148 } 149 pin_init (lgsmh, pin);149 gsm_pin_init (lgsmh); 150 150 event_init (lgsmh); 151 151 lgsm_register_handler (lgsmh, GSMD_MSG_PASSTHROUGH, &pt_msghandler); … … 259 259 gsm_watcher_install (GMainLoop * mainloop) 260 260 { 261 DBG_ENTER (); 261 262 262 static GSourceFuncs gsm_watcher_funcs = { 263 263 gsm_watcher_prepare, … … 277 277 g_source_attach (gsm_watcher, NULL); 278 278 // DBG_MESSAGE ("ATACH OUT"); 279 DBG_LEAVE (); 279 280 280 return; 281 281 … … 288 288 lgsm_voice_dtmf (lgsmh, dtmf); 289 289 } 290 #define PIN_SIZE 32 291 292 static int 293 gsm_pin_handler (struct lgsm_handle *lh, int evt, struct gsmd_evt_auxdata *aux) 294 { 295 296 int rc; 297 298 printf ("EVENT: PIN request (type=%u) ", aux->u.pin.type); 299 300 /* FIXME: read pin from STDIN and send it back via lgsm_pin */ 301 302 gsm_pin_require(); 303 304 305 return 0; 306 } 307 308 int 309 gsm_pin_init (struct lgsm_handle *lh) 310 { 311 return lgsm_evt_handler_register (lh, GSMD_EVT_PIN, &gsm_pin_handler); 312 } -
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialergsm.h
r648 r908 36 36 #include <libgsmd/voicecall.h> 37 37 #include <libgsmd/misc.h> 38 #include "pin.h"38 //#include "pin.h" 39 39 #include "event.h" 40 40 #include <glib/gmain.h> … … 100 100 */ 101 101 102 void gsm_pin_require(); 103 102 104 void *gsm_monitor_thread (struct lgsm_handle *lgsmh); 103 105 -
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-main.c
r907 r908 47 47 return p_dialer_data; 48 48 } 49 49 void gsm_pin_require() 50 { 51 MOKO_DIALER_APP_DATA* appdata=moko_get_app_data(); 52 53 if(appdata) 54 { 55 gtk_widget_show(appdata->window_pin); 56 } 57 else 58 { 59 DBG_ERROR("gui failed to initialize.try another time."); 60 } 61 62 63 } 50 64 void gsm_incoming_call(gchar * number) 51 65 { … … 267 281 window_dialer_init(p_dialer_data); 268 282 window_incoming_init(p_dialer_data); 283 window_pin_init(p_dialer_data); 269 284 DBG_WARN("\nusage: \"openmoko-dialer\" will not show any GUI initialy until you reactivate the app using another \"openmoko-dialer\" command"); 270 285 // window_outgoing_init(p_dialer_data); -
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-main.h
r907 r908 40 40 41 41 MokoDialerTextview *moko_dtmf_text_view; ///<the textview for the dtmf window 42 42 MokoDialerTextview *moko_pin_text_view; 43 43 44 44 MokoDialerAutolist *moko_dialer_autolist; … … 64 64 GtkWidget *window_history; 65 65 GtkWidget *window_dialer; 66 GtkWidget *window_pin; 66 67 GtkWidget *window_present; 67 68 -
trunk/src/target/OM-2007/applications/openmoko-dialer/src/pin.c
r648 r908 5 5 #include <libgsmd/event.h> 6 6 7 static int 8 pin_handler (struct lgsm_handle *lh, int evt, struct gsmd_evt_auxdata *aux) 9 { 7 10 #define PIN_SIZE 32 8 11 … … 10 13 static char pinbuf[PIN_SIZE + 1]; 11 14 12 static int13 pin_handler (struct lgsm_handle *lh, int evt, struct gsmd_evt_auxdata *aux)14 {15 15 int rc; 16 16 … … 25 25 else 26 26 { 27 do 28 { 29 printf ("Please enter PIN: "); 30 rc = fscanf (stdin, "%32s", &pinbuf); 31 } 32 while (rc < 1); 33 27 gsm_pin_require(pinbuf); 34 28 return lgsm_pin (lh, pinbuf); 35 29 }
Note: See TracChangeset
for help on using the changeset viewer.
