Skip to content

Commit b1e49db

Browse files
committed
Add graph tracing functions
1 parent 3022cd3 commit b1e49db

File tree

2 files changed

+79
-2
lines changed

2 files changed

+79
-2
lines changed

Sources/OpenGraphCxx/Graph/OGGraphTracing.cpp

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,49 @@ void OGGraphStartTracing2(_Nullable OGGraphRef graph, OGGraphTraceOptions option
1515
void OGGraphStopTracing(_Nullable OGGraphRef graph) {
1616
// TODO
1717
}
18+
19+
void OGGraphSyncTracing(_Nullable OGGraphRef graph) {
20+
// TODO
21+
}
22+
23+
CFStringRef OGGraphCopyTracePath(_Nullable OGGraphRef graph) {
24+
// TODO
25+
return nullptr;
26+
}
27+
28+
OGUniqueID OGGraphAddTrace(OGGraphRef graph, const OGTraceRef trace, void *context) {
29+
// TODO
30+
return 0;
31+
}
32+
33+
void OGGraphRemoveTrace(OGGraphRef graph, OGUniqueID trace_id) {
34+
// TODO
35+
}
36+
37+
void OGGraphSetTrace(OGGraphRef graph, const OGTraceRef trace, void *context) {
38+
// TODO
39+
}
40+
41+
void OGGraphResetTrace(OGGraphRef graph) {
42+
// TODO
43+
}
44+
45+
bool OGGraphIsTracingActive(OGGraphRef graph) {
46+
// TODO
47+
return false;
48+
}
49+
50+
const char *OGGraphGetTraceEventName(uint32_t event_id) {
51+
// TODO
52+
return nullptr;
53+
}
54+
55+
const char *OGGraphGetTraceEventSubsystem(uint32_t event_id) {
56+
// TODO
57+
return nullptr;
58+
}
59+
60+
uint32_t OGGraphRegisterNamedTraceEvent(const char *event_name, const char *event_subsystem) {
61+
// TODO
62+
return 0;
63+
}

Sources/OpenGraphCxx/include/OpenGraph/OGGraphTracing.h

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,44 @@ void OGGraphStopTracing(_Nullable OGGraphRef graph) OG_SWIFT_NAME(OGGraphRef.sto
4040

4141
OG_EXPORT
4242
OG_REFINED_FOR_SWIFT
43-
OGUniqueID OGGraphAddTrace(OGGraphRef graph, const OGTraceRef trace, void *_Nullable context)
44-
OG_SWIFT_NAME(OGGraphRef.addTrace(self:_:context:));
43+
void OGGraphSyncTracing(_Nullable OGGraphRef graph) OG_SWIFT_NAME(OGGraphRef.syncTracing(_:));
44+
45+
OG_EXPORT
46+
OG_REFINED_FOR_SWIFT
47+
CFStringRef OGGraphCopyTracePath(_Nullable OGGraphRef graph) OG_SWIFT_NAME(OGGraphRef.tracePath(_:));
48+
49+
OG_EXPORT
50+
OG_REFINED_FOR_SWIFT
51+
OGUniqueID OGGraphAddTrace(OGGraphRef graph, const OGTraceRef trace, void *_Nullable context) OG_SWIFT_NAME(OGGraphRef.addTrace(self:_:context:));
4552

4653
OG_EXPORT
4754
OG_REFINED_FOR_SWIFT
4855
void OGGraphRemoveTrace(OGGraphRef graph, OGUniqueID trace_id) OG_SWIFT_NAME(OGGraphRef.removeTrace(self:traceID:));
4956

57+
OG_EXPORT
58+
OG_REFINED_FOR_SWIFT
59+
void OGGraphSetTrace(OGGraphRef graph, const OGTraceRef trace, void *_Nullable context) OG_SWIFT_NAME(OGGraphRef.setTrace(self:_:context:));
60+
61+
OG_EXPORT
62+
OG_REFINED_FOR_SWIFT
63+
void OGGraphResetTrace(OGGraphRef graph) OG_SWIFT_NAME(OGGraphRef.resetTrace(self:));
64+
65+
OG_EXPORT
66+
OG_REFINED_FOR_SWIFT
67+
bool OGGraphIsTracingActive(OGGraphRef graph) OG_SWIFT_NAME(getter:OGGraphRef.isTracingActive(self:));
68+
69+
OG_EXPORT
70+
OG_REFINED_FOR_SWIFT
71+
const char *_Nullable OGGraphGetTraceEventName(uint32_t event_id) OG_SWIFT_NAME(OGGraphRef.traceEventName(for:));
72+
73+
OG_EXPORT
74+
OG_REFINED_FOR_SWIFT
75+
const char *_Nullable OGGraphGetTraceEventSubsystem(uint32_t event_id) OG_SWIFT_NAME(OGGraphRef.traceEventSubsystem(for:));
76+
77+
OG_EXPORT
78+
OG_REFINED_FOR_SWIFT
79+
uint32_t OGGraphRegisterNamedTraceEvent(const char *event_name, const char *event_subsystem) OG_SWIFT_NAME(OGGraphRef.registerNamedTraceEvent(name:subsystem:));
80+
5081
OG_EXTERN_C_END
5182

5283
OG_IMPLICIT_BRIDGING_DISABLED

0 commit comments

Comments
 (0)