Exemplo n.º 1
0
void inbox(DictionaryIterator *iter, void *context){
  Tuple *t = dict_read_first(iter);
  if(t) process_tuple(t);
  while(t != NULL){
	t = dict_read_next(iter);
	if(t) process_tuple(t);
  }
	
  if(current == INIT){
	  current = SPLASH;
  }
  else if(current == SPLASH){
	current = HOME;
	window_stack_push(home_window, true);
	window_stack_remove(splash_window, false);
  }
  else if(current == LOADING){
	push_appropriate_window();
  }
  else if(current == MATCHUP){
	//APP_LOG(APP_LOG_LEVEL_INFO, "Old Ally: %d, Old Enemy: %d. Ally: %d, Enemy: %d.", old_matchup_ally_score_int,old_matchup_enemy_score_int,matchup_ally_score_int,matchup_enemy_score_int);
	if( (old_matchup_ally_score_int > old_matchup_enemy_score_int && matchup_ally_score_int < matchup_enemy_score_int)
	 || (old_matchup_ally_score_int < old_matchup_enemy_score_int && matchup_ally_score_int > matchup_enemy_score_int)
	 || (old_matchup_ally_score_int == 0 && old_matchup_enemy_score_int == 0 && (matchup_ally_score_int != 0 || matchup_enemy_score_int != 0)))
	{
		vibes_short_pulse();
	}
	old_matchup_ally_score_int = matchup_ally_score_int;
	old_matchup_enemy_score_int = matchup_enemy_score_int;
	   	  
	layer_mark_dirty(matchup_custom_layer);
  }
}
Exemplo n.º 2
0
void in_received_handler(DictionaryIterator *iter, void *context) {
	Tuple *t = dict_read_first(iter);
	if(t)
		process_tuple(t);
	
	while(t) {
		t = dict_read_next(iter);
		if(t)
			process_tuple(t);
	}
}
void data_framework_inbox(DictionaryIterator *iter, void *context){
    Tuple *t = dict_read_first(iter);
    if(t){
        process_tuple(t);
    }
    while(t != NULL){
        t = dict_read_next(iter);
        if(t){
            process_tuple(t);
        }
    }
    main_window_update_settings(data_framework_local_settings);
}
Exemplo n.º 4
0
void inbox(DictionaryIterator *iter, void *context){	
	refresh_timer = app_timer_register(500, refresh_callback, NULL);
	Tuple *t = dict_read_first(iter);
	if(t){
		process_tuple(t);
	}
	while(t != NULL){
		t = dict_read_next(iter);
		if(t){
			process_tuple(t);
		}
	}
}
Exemplo n.º 5
0
Arquivo: main.c Projeto: imclab/rest
void in_received_handler(DictionaryIterator *iter, void *context) {

  // TODO decide whether this code should be more defensive.
  Tuple *t = dict_read_first(iter);
  if (t) {
    process_tuple(t);
  }

  while(t != NULL) {
    t = dict_read_next(iter);
    if(t) {
      process_tuple(t);
    }
  }
}
Exemplo n.º 6
0
static void in_received_handler(DictionaryIterator *iter, void *context)
{	
	//Get data
	Tuple *t = dict_read_first(iter);
	if(t)
	{
		process_tuple(t);
	}
	
	//Get next
	while(t != NULL)
	{
		t = dict_read_next(iter);
		if(t)
		{
			process_tuple(t);
		}
	}
}
Exemplo n.º 7
0
static void in_received_handler(DictionaryIterator *iter, void *context)
{
    (void) context;

    Tuple *t = dict_read_first(iter);
    while(t != NULL) {
        process_tuple(t);
        t = dict_read_next(iter);
    }
}
Exemplo n.º 8
0
static void in_received_handler(DictionaryIterator *iter, void *context) 
{
  
  //Get data
  Tuple *t = dict_read_first(iter);
  if(t)
  {
    process_tuple(t);
  }
  APP_LOG(APP_LOG_LEVEL_DEBUG, "In received handler");
  //Get next
  while(t != NULL)
  {
    t = dict_read_next(iter);
    if(t)
    {
      process_tuple(t);
    }
  }
}
Exemplo n.º 9
0
Arquivo: moo10.c Projeto: an-ox/bbc
static void in_received_handler(DictionaryIterator *iter, void *context) 
{
  // Extract tuples from a dictionary & process them
    (void) context;
    //Get data
    Tuple *t = dict_read_first(iter);
    while(t != NULL)
    {
        process_tuple(t);
        //Get next
        t = dict_read_next(iter);
    }
}
Exemplo n.º 10
0
static void inbox_received_callback(DictionaryIterator *iterator, void *context) {
    // Read first item
    Tuple *t = dict_read_first(iterator);
    
    // For all items
    while(t != NULL) {
        // Which key was received?
        process_tuple(t);

        // Look for next item
        t = dict_read_next(iterator);
    }
}
Exemplo n.º 11
0
void in_received_handler(DictionaryIterator *iter, void *context) 
{
  (void) context;
    
  vibe();
    
  //Get data
   Tuple *t = dict_read_first(iter);
   while(t != NULL)
   {
     process_tuple(t);
       
     //Get next
     t = dict_read_next(iter);
   }
} 
Exemplo n.º 12
0
	static void process_tuple(const Tuple & t, static_counter<I>, Data_t & dat){
		process_tuple(t, static_counter<I-1>(),dat);
		dat.run ( std::get<I-1>(t) , I-1);
	}