BasicDestination (std::deque<AnalyticsEvent>& loggedEvents,
                   std::deque<AnalyticsEvent>& unloggedEvents)
     : ThreadedAnalyticsDestination ("ThreadedAnalyticsDestinationTest"),
       loggedEventQueue (loggedEvents),
       unloggedEventStore (unloggedEvents)
 {
     startAnalyticsThread (20);
 }
Exemplo n.º 2
0
//==============================================================================
ProjucerAnalyticsDestination::ProjucerAnalyticsDestination()
    : ThreadedAnalyticsDestination ("ProjucerAnalyticsThread")
{
    {
        MemoryOutputStream mo;
        if (Base64::convertFromBase64 (mo, BinaryData::nothingtoseehere_txt))
            apiKey = mo.toString();
    }

    auto dataDir = File::getSpecialLocation (File::userApplicationDataDirectory)
                        #if JUCE_MAC
                        .getChildFile ("Application Support")
                        #endif
                        .getChildFile ("Projucer")
                        .getChildFile ("Analytics");

    if (! dataDir.exists())
        dataDir.createDirectory();

    savedEventsFile = dataDir.getChildFile ("analytics_events.xml");

    startAnalyticsThread (initialPeriodMs);
}