Skip to content

Commit a9492da

Browse files
committed
add documentation for new methods
1 parent c645239 commit a9492da

File tree

5 files changed

+28
-6
lines changed

5 files changed

+28
-6
lines changed

Source/KSCrash/Recording/KSCrash.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,14 +233,28 @@ typedef enum
233233
*/
234234
- (void) sendAllReportsWithCompletion:(KSCrashReportFilterCompletion) onCompletion;
235235

236+
/** Get all unsent report IDs.
237+
*
238+
* @return An array with report IDs.
239+
*/
236240
- (NSArray*) reportIDs;
237241

242+
/** Get report.
243+
*
244+
* @param reportID An ID of report.
245+
*
246+
* @return A dictionary with report fields. See KSCrashReportFields.h for available fields.
247+
*/
238248
- (NSDictionary*) reportWithID:(NSNumber*) reportID;
239249

240250
/** Delete all unsent reports.
241251
*/
242252
- (void) deleteAllReports;
243253

254+
/** Delete report.
255+
*
256+
* @param report_id An ID of report to delete.
257+
*/
244258
- (void) deleteReportWithID:(NSNumber*) reportID;
245259

246260
/** Report a custom, user defined exception.

Source/KSCrash/Recording/KSCrashC.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ void kscrash_deleteAllReports()
295295
kscrs_deleteAllReports();
296296
}
297297

298-
void kscrash_deleteReportWithID(int64_t id)
298+
void kscrash_deleteReportWithID(int64_t reportId)
299299
{
300-
kscrs_deleteReportWithID(id);
300+
kscrs_deleteReportWithID(reportId);
301301
}

Source/KSCrash/Recording/KSCrashC.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,11 @@ int64_t kscrash_addUserReport(const char* report, int reportLength);
228228
*/
229229
void kscrash_deleteAllReports(void);
230230

231-
void kscrash_deleteReportWithID(int64_t id);
231+
/** Delete report.
232+
*
233+
* @param report_id An ID of report to delete.
234+
*/
235+
void kscrash_deleteReportWithID(int64_t reportId);
232236

233237

234238
#ifdef __cplusplus

Source/KSCrash/Recording/KSCrashReportStore.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,10 @@ void kscrs_deleteAllReports()
258258
pthread_mutex_unlock(&g_mutex);
259259
}
260260

261-
void kscrs_deleteReportWithID(int64_t id)
261+
void kscrs_deleteReportWithID(int64_t reportId)
262262
{
263263
char path[KSCRS_MAX_PATH_LENGTH];
264-
getCrashReportPathByID(id, path);
264+
getCrashReportPathByID(reportId, path);
265265
ksfu_removeFile(path, true);
266266
}
267267

Source/KSCrash/Recording/KSCrashReportStore.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,11 @@ int64_t kscrs_addUserReport(const char* report, int reportLength);
8585
*/
8686
void kscrs_deleteAllReports(void);
8787

88-
void kscrs_deleteReportWithID(int64_t id);
88+
/** Delete report.
89+
*
90+
* @param report_id An ID of report to delete.
91+
*/
92+
void kscrs_deleteReportWithID(int64_t reportId);
8993

9094
/** Set the maximum number of reports allowed on disk before old ones get deleted.
9195
*

0 commit comments

Comments
 (0)