summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewermacosx-for-objc.h
blob: 37e8a3917a928f483585f0402ab61dc25e1d4fbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/**
 * @file   llappviewermacosx-for-objc.h
 * @author Nat Goodspeed
 * @date   2018-06-15
 * @brief  llappviewermacosx.h publishes the C++ API for
 *         llappviewermacosx.cpp, just as
 *         llappviewermacosx-objc.h publishes the Objective-C++ API for
 *         llappviewermacosx-objc.mm.
 *
 *         This header is intended to publish for Objective-C++ consumers a
 *         subset of the C++ API presented by llappviewermacosx.cpp. It's a
 *         subset because, if an Objective-C++ consumer were to #include
 *         the full llappviewermacosx.h, we would almost surely run into
 *         trouble due to the discrepancy between Objective-C++'s BOOL versus
 *         classic Microsoft/Linden BOOL.
 * 
 * $LicenseInfo:firstyear=2018&license=viewerlgpl$
 * Copyright (c) 2018, Linden Research, Inc.
 * $/LicenseInfo$
 */

#if ! defined(LL_LLAPPVIEWERMACOSX_FOR_OBJC_H)
#define LL_LLAPPVIEWERMACOSX_FOR_OBJC_H

#include <string>

void constructViewer();
bool initViewer();
void handleUrl(const char* url_utf8);
bool pumpMainLoop();
void handleQuit();
void cleanupViewer();
void infos(const std::string& message);

// This struct is malleable; it only serves as a way to convey a number of
// fields from llappviewermacosx.cpp's CrashMetadata_instance() function to the
// consuming functions in llappdelegate-objc.mm. As long as both those sources
// are compiled with this same header, the content and order of CrashMetadata
// can change as needed.
struct CrashMetadata
{
    std::string logFilePathname;
    std::string userSettingsPathname;
    std::string staticDebugPathname;
    std::string OSInfo;
    std::string agentFullname;
    std::string regionName;
    std::string fatalMessage;
};

CrashMetadata& CrashMetadata_instance();

#endif /* ! defined(LL_LLAPPVIEWERMACOSX_FOR_OBJC_H) */