OLMKit: Change OLMKitVersionString from a C function to an Obj-C static method
This commit is contained in:
parent
4373ac3ef6
commit
757be9aeba
2 changed files with 14 additions and 7 deletions
|
@ -18,10 +18,6 @@
|
||||||
|
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
|
||||||
//! Project version string for OLMKit, the same as libolm.
|
|
||||||
NSString *OLMKitVersionString();
|
|
||||||
|
|
||||||
// In this header, you should import all the public headers of your framework using statements like #import <OLMKit/PublicHeader.h>
|
// In this header, you should import all the public headers of your framework using statements like #import <OLMKit/PublicHeader.h>
|
||||||
|
|
||||||
#import <OLMKit/OLMAccount.h>
|
#import <OLMKit/OLMAccount.h>
|
||||||
|
@ -30,3 +26,10 @@ NSString *OLMKitVersionString();
|
||||||
#import <OLMKit/OLMUtility.h>
|
#import <OLMKit/OLMUtility.h>
|
||||||
#import <OLMKit/OLMInboundGroupSession.h>
|
#import <OLMKit/OLMInboundGroupSession.h>
|
||||||
#import <OLMKit/OLMOutboundGroupSession.h>
|
#import <OLMKit/OLMOutboundGroupSession.h>
|
||||||
|
|
||||||
|
@interface OLMKit : NSObject
|
||||||
|
|
||||||
|
//! Project version string for OLMKit, the same as libolm.
|
||||||
|
+ (NSString*)versionString;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
|
@ -19,7 +19,9 @@
|
||||||
|
|
||||||
#include "olm/olm.h"
|
#include "olm/olm.h"
|
||||||
|
|
||||||
NSString *OLMKitVersionString()
|
@implementation OLMKit
|
||||||
|
|
||||||
|
+ (NSString*)versionString
|
||||||
{
|
{
|
||||||
uint8_t major, minor, patch;
|
uint8_t major, minor, patch;
|
||||||
|
|
||||||
|
@ -27,3 +29,5 @@ NSString *OLMKitVersionString()
|
||||||
|
|
||||||
return [NSString stringWithFormat:@"%tu.%tu.%tu", major, minor, patch];
|
return [NSString stringWithFormat:@"%tu.%tu.%tu", major, minor, patch];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
Loading…
Reference in a new issue