There won't be any cross-platform way.
1. Not all platforms are capable of entering low-power states.
2. The specifics of such low-power states may be different.
3. Applications may not be able to signal that they're not idle to prevent the system from entering a low-power state.
4. How an application signals that it's not idle may be completely different from one system to another.
I don't know thing 1 about D-Bus, so I'm not going to be able to answer any follow-up questions you might have. You might want to move this thread to the UNIX forum.
Linux is too vague, flavor and which environment would be useful but posting to the specific forum,Mint, Ubuntu,ect... would likely get you an answer faster.
curious if its hardware or OS doing it?
seems like os would have a flag and not a kludgy workaround. Windows lets you turn it off entirely and linux should be even more configurable esp since a lot of unix machines are some sort of always on server setup.
it may be 'unfriendly' to flip the flag via your program, though.
depending on who its for (personal use? friends/ co-worker use? product / wide distribution?) and how they feel about it (wide distribution would be a no-go) you wouldn't want to change OS settings with your program as it affects everything not just your program. But if no one cares, that may be OK to do, eg personal use program or co-workers only etc.
And that is assuming it has one. Like I said, windows has one, and the linux guys tell me linux can do anything windows can but better, so I assume there is a GUI setting or OS level setting that prevents sleep... ? I dunno a lot about it at the user level; most of my experience is from wincscp / putty into a machine not running it locally. The last thing I ran locally was irix, which was .. 2005 ish? It was a fair bit different from linux.
These functions don't change settings, they're designed to signal to the system that they're doing uninterruptible work, to temporarily inhibit transitions to lower power states. For example, a video player preventing the screen from turning off and the system from sleeping while video is being played even if the user stops giving inputs.
The doc says nothing about changing system settings.
Enables an application to inform the system that it is in use, thereby preventing the system from entering sleep or turning off the display while the application is running.
The same is for Linux. Like @helios said, they just signal the system that they're doing uninterruptible work.