I write export plugin that should export only seleted(active) layers, how I can recive information about what layers are selected ?
I dont' see a way to do this in an export plugin. This information would be available in an automation plugin. It would get a little messy but here is one solution.
You would need to write both and have them communicate information back and forth. Export, first round, does nothing but writes out descriptor parameters. Your automation plugin would be listening for this event and then see which layers are selected. Gather that data and "Play" the export again with the information it needs. Export plugin, second round, could use the channel ports calbacks to get the pixel data for the selected layers.
The textauto + textformat examples in the sdk are doing something similar.