Proyectos de Subversion Iphone Microlearning

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
// Copyright 2020 Google LLC
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
//      http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
 
15
#import <Foundation/Foundation.h>
16
 
17
#import "FirebasePerformance/Sources/AppActivity/FPRAppActivityTracker.h"
18
#import "FirebasePerformance/Sources/Gauges/CPU/FPRCPUGaugeData.h"
19
#import "FirebasePerformance/Sources/Gauges/FPRGaugeCollector.h"
20
 
21
NS_ASSUME_NONNULL_BEGIN
22
 
23
@class FPRCPUGaugeCollector;
24
 
25
/** Delegate method for the CPU Gauge collector to report back the CPU gauge data. */
26
NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
27
@protocol FPRCPUGaugeCollectorDelegate
28
 
29
/**
30
 * Reports the collected CPU gauge data back to its delegate.
31
 *
32
 * @param collector CPU gauge collector that collected the information.
33
 * @param gaugeData CPU gauge data.
34
 */
35
- (void)cpuGaugeCollector:(FPRCPUGaugeCollector *)collector gaugeData:(FPRCPUGaugeData *)gaugeData;
36
 
37
@end
38
 
39
/** CPU Gauge collector implementation. This class collects the CPU utilitization and reports back
40
 *  to the delegate.
41
 */
42
NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
43
@interface FPRCPUGaugeCollector : NSObject <FPRGaugeCollector>
44
 
45
/** Reference to the delegate object. */
46
@property(nonatomic, weak, readonly) id<FPRCPUGaugeCollectorDelegate> delegate;
47
 
48
/**
49
 * Initializes the CPU collector object with the delegate object provided.
50
 *
51
 * @param delegate Delegate object to which the CPU gauge data is provided.
52
 * @return Instance of the CPU Gauge collector.
53
 */
54
- (instancetype)initWithDelegate:(id<FPRCPUGaugeCollectorDelegate>)delegate
55
    NS_DESIGNATED_INITIALIZER;
56
 
57
/**
58
 * Initializer for the CPU Gauge collector. This is not available.
59
 */
60
- (instancetype)init NS_UNAVAILABLE;
61
 
62
@end
63
 
64
NS_ASSUME_NONNULL_END