getblocksummary RPC method.
The code that might help you to calculate each tx fee is commented out, in lines 691-700.
The reason I commented it out (after writing it myself) was that I only needed the fee for entire block,
which I can find in the coinbase transaction. Line 706 has the calculation.
In your case, you would need a similar method that returns fee for every transaction in the block.
Having -txindex is vital for this (see line 660), as transactions with all outputs already spent are not linked from UTXO
and therefore not easily findable, unless you know their block hash or height.
I can do this for a small donation or bounty, when I have free time, if C++ is alien to you
![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif)