<commit_before>//
//  SnowplowUtils.h
//  Snowplow
//
//  Copyright (c) 2013-2014 Snowplow Analytics Ltd. All rights reserved.
//
//  This program is licensed to you under the Apache License Version 2.0,
//  and you may not use this file except in compliance with the Apache License
//  Version 2.0. You may obtain a copy of the Apache License Version 2.0 at
//  http://www.apache.org/licenses/LICENSE-2.0.
//
//  Unless required by applicable law or agreed to in writing,
//  software distributed under the Apache License Version 2.0 is distributed on
//  an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
//  express or implied. See the Apache License Version 2.0 for the specific
//  language governing permissions and limitations there under.
//
//  Authors: <NAME>
//  Copyright: Copyright (c) 2013-2014 Snowplow Analytics Ltd
//  License: Apache License Version 2.0
//

#import <Foundation/Foundation.h>

@interface SnowplowUtils : NSObject

- (NSString *) getTimezone;

- (NSString *) getLanguage;

- (NSString *) getPlatform;

- (NSString *) getEventId;

- (NSString *) getCarrierName;

- (int) getTransactionId;

- (double) getTimestamp;

// Returns an NSDictionary with 'width' and 'height'
- (NSDictionary *) getResolution;

// Returns an NSDictionary with 'width' and 'height'
- (NSDictionary *) getViewPort;<commit_msg>Documented SnowplowUtils<commit_after>//
//  SnowplowUtils.h
//  Snowplow
//
//  Copyright (c) 2013-2014 Snowplow Analytics Ltd. All rights reserved.
//
//  This program is licensed to you under the Apache License Version 2.0,
//  and you may not use this file except in compliance with the Apache License
//  Version 2.0. You may obtain a copy of the Apache License Version 2.0 at
//  http://www.apache.org/licenses/LICENSE-2.0.
//
//  Unless required by applicable law or agreed to in writing,
//  software distributed under the Apache License Version 2.0 is distributed on
//  an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
//  express or implied. See the Apache License Version 2.0 for the specific
//  language governing permissions and limitations there under.
//
//  Authors: <NAME>
//  Copyright: Copyright (c) 2013-2014 Snowplow Analytics Ltd
//  License: Apache License Version 2.0
//

#import <Foundation/Foundation.h>

@interface SnowplowUtils : NSObject

/**
 * Returns the system timezone region.
 * @return A string of the timezone region (e.g. 'Toronto/Canada')
 */
- (NSString *) getTimezone;

/**
 * Returns the system language currently used on the device.
 * @return A string of the current language.
 */
- (NSString *) getLanguage;

/**
 * Returns the platform type of the device. This is always going to be "mob".
 * @return A string of the platform type.
 */
- (NSString *) getPlatform;

/**
 * Returns a randomly generated UUID (type 4).
 * @return A string containing a formatted UUID for example E621E1F8-C36C-495A-93FC-0C247A3E6E5F.
 */
- (NSString *) getEventId;

/**
 * Returns the carrier of the SIM inserted in the device.
 * @return A string containing the carrier name of the service provider.
 */
- (NSString *) getCarrierName;

/**
 * Generates a randomly generated 6-digit integer.
 * @return A random 6-digit int.
 */
- (int) getTransactionId;

/**
 * Returns the timestamp generated at the point it was called.
 * @return A double of the timestamp from when the method was called.
 */
- (double) getTimestamp;

/**
 * Calculates the resolution of the screen in-terms of actual pixels of the device. This doesn't count Retine-pixels which are technically subpixels.
 * @return An NSDictionary with 'width' and 'height'
 */
- (NSDictionary *) getResolution;

/**
 * Calculates the viewport of the app as it is on the screen. Currently, returns the same value as getResolution.
 * Returns an NSDictionary with 'width' and 'height'
 */
- (NSDictionary *) getViewPort;
{'fraction_non_alphanumeric': 0.10263022176379577, 'fraction_numerical': 0.021144920061887573, 'mean_word_length': 3.46889400921659, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1170800', 'n_tokens_mistral': 1173, 'n_tokens_neox': 1100, 'n_words': 474}