Anything that is is displayed to the totem frame can be obtained with the totem API and events.
Pseudo code.
Code:
OnEvent(self, event, ...)
if ( event == "PLAYER_TOTEM_UPDATE" ) then
local slot = ...;
local haveTotem, name, startTime, duration, icon = GetTotemInfo(slot)
-- do stuff
end
end
This API is also used for Death Knights and Druids.
http://wowprogramming.com/docs/api/GetTotemInfo