1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- #ifndef NULLSOFT_API_STATS_H
- #define NULLSOFT_API_STATS_H
- #include <bfc/dispatch.h>
- class api_stats : public Dispatchable
- {
- public:
- enum
- {
- LAUNCHES,
- TIME_RUNNING,
- TIME_VISIBLE,
- TIME_PLAYING,
- TIME_MB,
- TIME_VISIBLE_PLAYING,
- TIME_MB_PLAYING,
- FILES_PLAYED,
- CDS_PLAYED,
- STREAMS_PLAYED,
- VIDEOS_PLAYED,
- LIBRARY_SIZE,
- REGVER,
- PLEDIT_LENGTH,
- PLAYLIST_COUNT,
- PODCAST_COUNT,
- PMP_TRANSFER_COUNT,
- REPLAYGAIN_COUNT,
- TRANSCODE_COUNT,
- TRANSCODE_FORMAT,
- RIP_COUNT,
- RIP_FORMAT,
- AVI_AUDIO_FORMAT,
- AVI_VIDEO_FOURCC,
- BOOKMARK_COUNT,
- PLG_COUNT,
- NUM_STATS,
- };
- protected:
- api_stats() {}
- ~api_stats() {}
- public:
- void SetStat(int stat, int value);
- void IncrementStat(int stat);
- void SetString(const char *key, const wchar_t *value);
- enum
- {
- SETSTAT = 0,
- INCREMENTSTAT = 1,
- SETSTRING = 2,
- };
- };
- inline void api_stats::SetStat(int stat, int value)
- {
- _voidcall(SETSTAT, stat, value);
- }
- inline void api_stats::IncrementStat(int stat)
- {
- _voidcall(INCREMENTSTAT, stat);
- }
- inline void api_stats::SetString(const char *key, const wchar_t *value)
- {
- _voidcall(SETSTRING, key, value);
- }
- static const GUID AnonymousStatsGUID =
- { 0xe23d9470, 0xa095, 0x4f02, { 0x97, 0xa1, 0x88, 0xa8, 0x85, 0x9d, 0xe0, 0xc2 } };
- #endif
|