SomeCallback(){ if(pie == 1) { // some function done if pie is equal to 1 } else if(pie == 2) { // some function done if pie is equal to 2 } return 1;}