AnalyticsUmeng.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. /****************************************************************************
  2. Copyright (c) 2012-2013 cocos2d-x.org
  3. http://www.cocos2d-x.org
  4. Permission is hereby granted, free of charge, to any person obtaining a copy
  5. of this software and associated documentation files (the "Software"), to deal
  6. in the Software without restriction, including without limitation the rights
  7. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  8. copies of the Software, and to permit persons to whom the Software is
  9. furnished to do so, subject to the following conditions:
  10. The above copyright notice and this permission notice shall be included in
  11. all copies or substantial portions of the Software.
  12. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  13. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  14. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  15. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  16. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  17. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  18. THE SOFTWARE.
  19. ****************************************************************************/
  20. #import "InterfaceAnalytics.h"
  21. @interface AnalyticsUmeng : NSObject <InterfaceAnalytics>
  22. {
  23. }
  24. @property BOOL debug;
  25. /**
  26. interfaces of protocol : InterfaceAnalytics
  27. */
  28. - (void) startSession: (NSString*) appKey;
  29. - (void) stopSession;
  30. - (void) setSessionContinueMillis: (long) millis;
  31. - (void) setCaptureUncaughtException: (BOOL) isEnabled;
  32. - (void) setDebugMode: (BOOL) isDebugMode;
  33. - (void) logError: (NSString*) errorId withMsg:(NSString*) message;
  34. - (void) logEvent: (NSString*) eventId;
  35. - (void) logEvent: (NSString*) eventId withParam:(NSMutableDictionary*) paramMap;
  36. - (void) logTimedEventBegin: (NSString*) eventId;
  37. - (void) logTimedEventEnd: (NSString*) eventId;
  38. - (NSString*) getSDKVersion;
  39. - (NSString*) getPluginVersion;
  40. /**
  41. interfaces of umeng SDK
  42. */
  43. - (void) updateOnlineConfig;
  44. - (NSString*) getConfigParams: (NSString*) key;
  45. /**
  46. @brief logEvent with label.
  47. @param params The dictionary include eventId & label
  48. get eventId with key 'Param1' from dictionary
  49. get label with key 'Param2' from dictionary
  50. */
  51. - (void) logEventWithLabel: (NSMutableDictionary*) params;
  52. /**
  53. @brief logEvent with duration.
  54. @param params The dictionary include eventId & duration
  55. get eventId with key 'Param1' from dictionary
  56. get duration with key 'Param2' from dictionary
  57. */
  58. - (void) logEventWithDuration: (NSMutableDictionary*) params;
  59. /**
  60. @brief logEvent with duration & label.
  61. @param params The dictionary include eventId & duration & label
  62. get eventId with key 'Param1' from dictionary
  63. get duration with key 'Param2' from dictionary
  64. get label with key 'Param3' from dictionary
  65. */
  66. - (void) logEventWithDurationLabel: (NSMutableDictionary*) params;
  67. /**
  68. @brief logEvent with duration & attributes.
  69. @param params The dictionary include eventId & duration & attributes
  70. get eventId with key 'Param1' from dictionary
  71. get duration with key 'Param2' from dictionary
  72. get attributes with key 'Param3' from dictionary
  73. */
  74. - (void) logEventWithDurationParams: (NSMutableDictionary*) params;
  75. /**
  76. @brief log timed event begin with label.
  77. @param params The dictionary include eventId & label
  78. get eventId with key 'Param1' from dictionary
  79. get label with key 'Param2' from dictionary
  80. */
  81. - (void) logTimedEventWithLabelBegin: (NSMutableDictionary*) params;
  82. /**
  83. @brief log timed event end with label.
  84. @param params The dictionary include eventId & label
  85. get eventId with key 'Param1' from dictionary
  86. get label with key 'Param2' from dictionary
  87. */
  88. - (void) logTimedEventWithLabelEnd: (NSMutableDictionary*) params;
  89. /**
  90. @brief log timed KV event with label & attributes.
  91. @param params The dictionary include eventId & label & attributes
  92. get eventId with key 'Param1' from dictionary
  93. get label with key 'Param2' from dictionary
  94. get attributes with key 'Param3' from dictionary
  95. */
  96. - (void) logTimedKVEventBegin: (NSMutableDictionary*) params;
  97. /**
  98. @brief log timed KV event end with label.
  99. @param params The dictionary include eventId & label
  100. get eventId with key 'Param1' from dictionary
  101. get label with key 'Param2' from dictionary
  102. */
  103. - (void) logTimedKVEventEnd: (NSMutableDictionary*) params;
  104. /**
  105. @brief start session with policy & channelId.
  106. @param params The dictionary include appKey & policy & channelId
  107. get appKey with key 'Param1' from dictionary
  108. get policy(NSNumber*) with key 'Param2' from dictionary
  109. get channelId with key 'Param3' from dictionary
  110. */
  111. - (void) startSessionWithParams: (NSMutableDictionary*) params;
  112. - (void) checkUpdate;
  113. @end