diff --git a/.gitignore b/.gitignore index b44f588..3d5f043 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,36 @@ +# OS X .DS_Store -MDWamp/build -MDWampTest/build -MDWamp/MDWamp.xcodeproj/project.xcworkspace/xcuserdata/* -MDWamp/MDWamp.xcodeproj/xcuserdata/* -MDWampTest/MDWampTest.xcodeproj/project.xcworkspace/xcuserdata/* -MDWampTest/MDWampTest.xcodeproj/xcuserdata/* -MDWamp.xcodeproj/project.xcworkspace/xcuserdata/* -MDWamp.xcodeproj/xcuserdata/* -MDWamp.xcodeproj/project.xcworkspace/xcshareddata -Carthage + +# Xcode +build/ +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata/ +*.xccheckout +profile +*.moved-aside +DerivedData +*.hmap +*.ipa + +# Bundler +.bundle + +Carthage/Build +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control +# +# Note: if you ignore the Pods directory, make sure to uncomment +# `pod install` in .travis.yml +# +# Pods/ +fastlane/test_output +fastlane/README.md +fastlane/report.xml diff --git a/.gitmodules b/.gitmodules index f78bb68..4268856 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,15 +1,12 @@ -[submodule "External/SocketRocket"] - path = External/SocketRocket - url = git://github.com/square/SocketRocket.git -[submodule "External/msgpack-objectivec"] - path = External/msgpack-objectivec - url = git://github.com/msgpack/msgpack-objectivec.git -[submodule "External/CocoaAsyncSocket"] - path = External/CocoaAsyncSocket - url = git://github.com/robbiehanson/CocoaAsyncSocket.git -[submodule "External/xctest-additions"] - path = External/xctest-additions - url = git://github.com/iheartradio/xctest-additions.git -[submodule "External/MPMessagePack"] - path = External/MPMessagePack - url = git://github.com/gabriel/MPMessagePack.git +[submodule "Carthage/Checkouts/GHODictionary"] + path = Carthage/Checkouts/GHODictionary + url = https://github.com/mogui/GHODictionary.git +[submodule "Carthage/Checkouts/MPMessagePack"] + path = Carthage/Checkouts/MPMessagePack + url = https://github.com/mogui/MPMessagePack.git +[submodule "Carthage/Checkouts/CocoaAsyncSocket"] + path = Carthage/Checkouts/CocoaAsyncSocket + url = https://github.com/robbiehanson/CocoaAsyncSocket.git +[submodule "Carthage/Checkouts/SocketRocket"] + path = Carthage/Checkouts/SocketRocket + url = https://github.com/facebook/SocketRocket.git diff --git a/.travis.yml b/.travis.yml index 08b39fe..51ac4da 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,5 @@ language: objective-c xcode_project: MDWamp.xcodeproj -xcode_scheme: MDWamp \ No newline at end of file +xcode_scheme: MDWamp iOS +script: + - fastlane test \ No newline at end of file diff --git a/Cartfile b/Cartfile new file mode 100644 index 0000000..28149e8 --- /dev/null +++ b/Cartfile @@ -0,0 +1,3 @@ +github "robbiehanson/CocoaAsyncSocket" "master" +github "facebook/SocketRocket" ~> 0.5.1 +github "mogui/MPMessagePack" "develop" diff --git a/Cartfile.resolved b/Cartfile.resolved new file mode 100644 index 0000000..d4ba3ba --- /dev/null +++ b/Cartfile.resolved @@ -0,0 +1,4 @@ +github "robbiehanson/CocoaAsyncSocket" "562bae6af6dbd7e1891293dae20b9f79a2fd7228" +github "mogui/GHODictionary" "1.0.9" +github "facebook/SocketRocket" "0.5.1" +github "mogui/MPMessagePack" "3ba8ea2acb91f343ac75267f2dc82be15a1c7279" diff --git a/Carthage/Checkouts/CocoaAsyncSocket b/Carthage/Checkouts/CocoaAsyncSocket new file mode 160000 index 0000000..562bae6 --- /dev/null +++ b/Carthage/Checkouts/CocoaAsyncSocket @@ -0,0 +1 @@ +Subproject commit 562bae6af6dbd7e1891293dae20b9f79a2fd7228 diff --git a/Carthage/Checkouts/GHODictionary b/Carthage/Checkouts/GHODictionary new file mode 160000 index 0000000..8783b8e --- /dev/null +++ b/Carthage/Checkouts/GHODictionary @@ -0,0 +1 @@ +Subproject commit 8783b8e7920b084147f0de65c22f1ccb8c6ff70f diff --git a/Carthage/Checkouts/MPMessagePack b/Carthage/Checkouts/MPMessagePack new file mode 160000 index 0000000..3ba8ea2 --- /dev/null +++ b/Carthage/Checkouts/MPMessagePack @@ -0,0 +1 @@ +Subproject commit 3ba8ea2acb91f343ac75267f2dc82be15a1c7279 diff --git a/Carthage/Checkouts/SocketRocket b/Carthage/Checkouts/SocketRocket new file mode 160000 index 0000000..36e68c1 --- /dev/null +++ b/Carthage/Checkouts/SocketRocket @@ -0,0 +1 @@ +Subproject commit 36e68c11ab131747c401728e79b110e98d98a70f diff --git a/External/CocoaAsyncSocket b/External/CocoaAsyncSocket deleted file mode 160000 index 6e018dd..0000000 --- a/External/CocoaAsyncSocket +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6e018ddf7c456106f898efae66ea5e5c94737a96 diff --git a/External/MPMessagePack b/External/MPMessagePack deleted file mode 160000 index 700b121..0000000 --- a/External/MPMessagePack +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 700b121ec1fbeb947754c2efa3aa84830380795e diff --git a/External/SocketRocket b/External/SocketRocket deleted file mode 160000 index 192e7b7..0000000 --- a/External/SocketRocket +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 192e7b769bbed8e65d77361dfefcdde375bdf87f diff --git a/External/msgpack-objectivec b/External/msgpack-objectivec deleted file mode 160000 index 03ae604..0000000 --- a/External/msgpack-objectivec +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 03ae6049a627815170bbc42ebc8ba6452be563f9 diff --git a/External/xctest-additions b/External/xctest-additions deleted file mode 160000 index 2ed4b07..0000000 --- a/External/xctest-additions +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2ed4b07c8a8ba6866641bb411e6cfd5221786501 diff --git a/MDWamp Demo/AppDelegate.h b/MDWamp Demo/AppDelegate.h new file mode 100644 index 0000000..151a5c1 --- /dev/null +++ b/MDWamp Demo/AppDelegate.h @@ -0,0 +1,17 @@ +// +// AppDelegate.h +// MDWamp Demo +// +// Created by Pronk on 01/06/16. +// +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + + +@end + diff --git a/MDWampDemo/src/AppDelegate.m b/MDWamp Demo/AppDelegate.m similarity index 83% rename from MDWampDemo/src/AppDelegate.m rename to MDWamp Demo/AppDelegate.m index 9f17c10..c76ff1c 100644 --- a/MDWampDemo/src/AppDelegate.m +++ b/MDWamp Demo/AppDelegate.m @@ -1,46 +1,44 @@ // // AppDelegate.m -// MDWampDemo +// MDWamp Demo +// +// Created by Pronk on 01/06/16. // -// Created by Niko Usai on 27/06/14. -// Copyright (c) 2014 mogui.it. All rights reserved. // #import "AppDelegate.h" +@interface AppDelegate () + +@end + @implementation AppDelegate -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. - return YES; } - -- (void)applicationWillResignActive:(UIApplication *)application -{ + +- (void)applicationWillResignActive:(UIApplication *)application { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. } -- (void)applicationDidEnterBackground:(UIApplication *)application -{ - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. +- (void)applicationDidEnterBackground:(UIApplication *)application { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } -- (void)applicationWillEnterForeground:(UIApplication *)application -{ +- (void)applicationWillEnterForeground:(UIApplication *)application { // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. } -- (void)applicationDidBecomeActive:(UIApplication *)application -{ +- (void)applicationDidBecomeActive:(UIApplication *)application { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } -- (void)applicationWillTerminate:(UIApplication *)application -{ +- (void)applicationWillTerminate:(UIApplication *)application { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } diff --git a/MDWamp Demo/Assets.xcassets/AppIcon.appiconset/Contents.json b/MDWamp Demo/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..a4645e6 --- /dev/null +++ b/MDWamp Demo/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,38 @@ +{ + "images" : [ + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/MDWamp Demo/Assets.xcassets/first.imageset/Contents.json b/MDWamp Demo/Assets.xcassets/first.imageset/Contents.json new file mode 100644 index 0000000..33a7451 --- /dev/null +++ b/MDWamp Demo/Assets.xcassets/first.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "first.pdf" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/MDWamp Demo/Assets.xcassets/first.imageset/first.pdf b/MDWamp Demo/Assets.xcassets/first.imageset/first.pdf new file mode 100644 index 0000000..47d911d Binary files /dev/null and b/MDWamp Demo/Assets.xcassets/first.imageset/first.pdf differ diff --git a/MDWamp Demo/Assets.xcassets/second.imageset/Contents.json b/MDWamp Demo/Assets.xcassets/second.imageset/Contents.json new file mode 100644 index 0000000..03bd9c9 --- /dev/null +++ b/MDWamp Demo/Assets.xcassets/second.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "second.pdf" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/MDWamp Demo/Assets.xcassets/second.imageset/second.pdf b/MDWamp Demo/Assets.xcassets/second.imageset/second.pdf new file mode 100644 index 0000000..401614e Binary files /dev/null and b/MDWamp Demo/Assets.xcassets/second.imageset/second.pdf differ diff --git a/MDWamp Demo/Base.lproj/LaunchScreen.storyboard b/MDWamp Demo/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..2e721e1 --- /dev/null +++ b/MDWamp Demo/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MDWamp Demo/Base.lproj/Main.storyboard b/MDWamp Demo/Base.lproj/Main.storyboard new file mode 100644 index 0000000..5258761 --- /dev/null +++ b/MDWamp Demo/Base.lproj/Main.storyboard @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MDWamp Demo/FirstViewController.h b/MDWamp Demo/FirstViewController.h new file mode 100644 index 0000000..070b8dc --- /dev/null +++ b/MDWamp Demo/FirstViewController.h @@ -0,0 +1,15 @@ +// +// FirstViewController.h +// MDWamp Demo +// +// Created by Pronk on 01/06/16. +// +// + +#import + +@interface FirstViewController : UIViewController + + +@end + diff --git a/MDWamp Demo/FirstViewController.m b/MDWamp Demo/FirstViewController.m new file mode 100644 index 0000000..13801cf --- /dev/null +++ b/MDWamp Demo/FirstViewController.m @@ -0,0 +1,27 @@ +// +// FirstViewController.m +// MDWamp Demo +// +// Created by Pronk on 01/06/16. +// +// + +#import "FirstViewController.h" + +@interface FirstViewController () + +@end + +@implementation FirstViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view, typically from a nib. +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +@end diff --git a/MDWampDemo/MDWampDemo-Info.plist b/MDWamp Demo/Info.plist similarity index 76% rename from MDWampDemo/MDWampDemo-Info.plist rename to MDWamp Demo/Info.plist index 1f86759..e6060b3 100644 --- a/MDWampDemo/MDWampDemo-Info.plist +++ b/MDWamp Demo/Info.plist @@ -4,26 +4,26 @@ CFBundleDevelopmentRegion en - CFBundleDisplayName - ${PRODUCT_NAME} CFBundleExecutable - ${EXECUTABLE_NAME} + $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName - ${PRODUCT_NAME} + $(PRODUCT_NAME) CFBundlePackageType APPL CFBundleShortVersionString - 1.0 + 2.2.5 CFBundleSignature ???? CFBundleVersion - 1.0 + 1 LSRequiresIPhoneOS + UILaunchStoryboardName + LaunchScreen UIMainStoryboardFile Main UIRequiredDeviceCapabilities @@ -40,10 +40,12 @@ - UISupportedInterfaceOrientations + UISupportedInterfaceOrientations~ipad UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight diff --git a/MDWamp Demo/SecondViewController.h b/MDWamp Demo/SecondViewController.h new file mode 100644 index 0000000..05defce --- /dev/null +++ b/MDWamp Demo/SecondViewController.h @@ -0,0 +1,15 @@ +// +// SecondViewController.h +// MDWamp Demo +// +// Created by Pronk on 01/06/16. +// +// + +#import + +@interface SecondViewController : UIViewController + + +@end + diff --git a/MDWamp Demo/SecondViewController.m b/MDWamp Demo/SecondViewController.m new file mode 100644 index 0000000..7e1ba15 --- /dev/null +++ b/MDWamp Demo/SecondViewController.m @@ -0,0 +1,27 @@ +// +// SecondViewController.m +// MDWamp Demo +// +// Created by Pronk on 01/06/16. +// +// + +#import "SecondViewController.h" + +@interface SecondViewController () + +@end + +@implementation SecondViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view, typically from a nib. +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +@end diff --git a/MDWampDemo/src/main.m b/MDWamp Demo/main.m similarity index 57% rename from MDWampDemo/src/main.m rename to MDWamp Demo/main.m index b6c22f9..d8335f3 100644 --- a/MDWampDemo/src/main.m +++ b/MDWamp Demo/main.m @@ -1,17 +1,15 @@ // // main.m -// MDWampDemo +// MDWamp Demo +// +// Created by Pronk on 01/06/16. // -// Created by Niko Usai on 27/06/14. -// Copyright (c) 2014 mogui.it. All rights reserved. // #import - #import "AppDelegate.h" -int main(int argc, char * argv[]) -{ +int main(int argc, char * argv[]) { @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); } diff --git a/MDWamp iOSTests/Info.plist b/MDWamp iOSTests/Info.plist new file mode 100644 index 0000000..5d411dc --- /dev/null +++ b/MDWamp iOSTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 2.2.5 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/MDWampTests/MDStackTest.m b/MDWamp iOSTests/MDStackTest.m similarity index 100% rename from MDWampTests/MDStackTest.m rename to MDWamp iOSTests/MDStackTest.m diff --git a/MDWampTests/MDWampAdvancedTests.m b/MDWamp iOSTests/MDWampAdvancedTests.m similarity index 100% rename from MDWampTests/MDWampAdvancedTests.m rename to MDWamp iOSTests/MDWampAdvancedTests.m diff --git a/MDWampTests/MDWampClientConfigTests.m b/MDWamp iOSTests/MDWampClientConfigTests.m similarity index 100% rename from MDWampTests/MDWampClientConfigTests.m rename to MDWamp iOSTests/MDWampClientConfigTests.m diff --git a/MDWampTests/MDWampClientDelegateMock.h b/MDWamp iOSTests/MDWampClientDelegateMock.h similarity index 100% rename from MDWampTests/MDWampClientDelegateMock.h rename to MDWamp iOSTests/MDWampClientDelegateMock.h diff --git a/MDWampTests/MDWampClientDelegateMock.m b/MDWamp iOSTests/MDWampClientDelegateMock.m similarity index 100% rename from MDWampTests/MDWampClientDelegateMock.m rename to MDWamp iOSTests/MDWampClientDelegateMock.m diff --git a/MDWampTests/MDWampMessageFactoryTests.m b/MDWamp iOSTests/MDWampMessageFactoryTests.m similarity index 100% rename from MDWampTests/MDWampMessageFactoryTests.m rename to MDWamp iOSTests/MDWampMessageFactoryTests.m diff --git a/MDWampTests/MDWampMessagesTests.m b/MDWamp iOSTests/MDWampMessagesTests.m similarity index 100% rename from MDWampTests/MDWampMessagesTests.m rename to MDWamp iOSTests/MDWampMessagesTests.m diff --git a/MDWampTests/MDWampSerializationMock.h b/MDWamp iOSTests/MDWampSerializationMock.h similarity index 100% rename from MDWampTests/MDWampSerializationMock.h rename to MDWamp iOSTests/MDWampSerializationMock.h diff --git a/MDWampTests/MDWampSerializationMock.m b/MDWamp iOSTests/MDWampSerializationMock.m similarity index 100% rename from MDWampTests/MDWampSerializationMock.m rename to MDWamp iOSTests/MDWampSerializationMock.m diff --git a/MDWampTests/MDWampSerializations.m b/MDWamp iOSTests/MDWampSerializations.m similarity index 100% rename from MDWampTests/MDWampSerializations.m rename to MDWamp iOSTests/MDWampSerializations.m diff --git a/MDWampTests/MDWampTestIncludes.h b/MDWamp iOSTests/MDWampTestIncludes.h similarity index 100% rename from MDWampTests/MDWampTestIncludes.h rename to MDWamp iOSTests/MDWampTestIncludes.h diff --git a/MDWampTests/MDWampTests-Info.plist b/MDWamp iOSTests/MDWampTests-Info.plist similarity index 100% rename from MDWampTests/MDWampTests-Info.plist rename to MDWamp iOSTests/MDWampTests-Info.plist diff --git a/MDWampTests/MDWampTests.m b/MDWamp iOSTests/MDWampTests.m similarity index 100% rename from MDWampTests/MDWampTests.m rename to MDWamp iOSTests/MDWampTests.m diff --git a/MDWampTests/MDWampTransportMock.h b/MDWamp iOSTests/MDWampTransportMock.h similarity index 100% rename from MDWampTests/MDWampTransportMock.h rename to MDWamp iOSTests/MDWampTransportMock.h diff --git a/MDWampTests/MDWampTransportMock.m b/MDWamp iOSTests/MDWampTransportMock.m similarity index 100% rename from MDWampTests/MDWampTransportMock.m rename to MDWamp iOSTests/MDWampTransportMock.m diff --git a/MDWampTests/MDWampTransportRawSocketTests.m b/MDWamp iOSTests/MDWampTransportRawSocketTests.m similarity index 100% rename from MDWampTests/MDWampTransportRawSocketTests.m rename to MDWamp iOSTests/MDWampTransportRawSocketTests.m diff --git a/MDWampTests/MDWampTransportWebSocketTests.m b/MDWamp iOSTests/MDWampTransportWebSocketTests.m similarity index 100% rename from MDWampTests/MDWampTransportWebSocketTests.m rename to MDWamp iOSTests/MDWampTransportWebSocketTests.m diff --git a/MDWampTests/MDWampTransportdelegateMock.h b/MDWamp iOSTests/MDWampTransportdelegateMock.h similarity index 100% rename from MDWampTests/MDWampTransportdelegateMock.h rename to MDWamp iOSTests/MDWampTransportdelegateMock.h diff --git a/MDWampTests/MDWampTransportdelegateMock.m b/MDWamp iOSTests/MDWampTransportdelegateMock.m similarity index 100% rename from MDWampTests/MDWampTransportdelegateMock.m rename to MDWamp iOSTests/MDWampTransportdelegateMock.m diff --git a/MDWamp iOSTests/XCTAsyncTestCase.h b/MDWamp iOSTests/XCTAsyncTestCase.h new file mode 100755 index 0000000..e9468b7 --- /dev/null +++ b/MDWamp iOSTests/XCTAsyncTestCase.h @@ -0,0 +1,168 @@ +// +// XCTAsyncTestCase.h +// Modified by Sveinung Kval Bakken on 16/10/13 +// to serve as a drop-in replacement for GHAsyncTestCase using XCTest +// Original copyright notice below: +// +// GHAsyncTestCase.h +// GHUnit +// +// Created by Gabriel Handford on 4/8/09. +// Copyright 2009. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// + +#import + +/*! + Common wait statuses to use with waitForStatus:timeout:. + */ +enum { + kXCTUnitWaitStatusUnknown = 0, // Unknown wait status + kXCTUnitWaitStatusSuccess, // Wait status success + kXCTUnitWaitStatusFailure, // Wait status failure + kXCTUnitWaitStatusCancelled // Wait status cancelled +}; + +/*! + Asynchronous test case with wait and notify. + + If notify occurs before wait has started (if it was a synchronous call), this test + case will still work. + + Be sure to call prepare before the asynchronous method (otherwise an exception will raise). + + @interface MyAsyncTest : GHAsyncTestCase { } + @end + + @implementation MyAsyncTest + + - (void)testSuccess { + // Prepare for asynchronous call + [self prepare]; + + // Do asynchronous task here + [self performSelector:@selector(_succeed) withObject:nil afterDelay:0.1]; + + // Wait for notify + [self waitForStatus:kXCTUnitWaitStatusSuccess timeout:1.0]; + } + + - (void)_succeed { + // Notify the wait. Notice the forSelector points to the test above. + // This is so that stray notifies don't error or falsely succeed other tests. + // To ignore the check, forSelector can be NULL. + [self notify:kXCTUnitWaitStatusSuccess forSelector:@selector(testSuccess)]; + } + + @end + + */ +@interface XCTAsyncTestCase : XCTestCase { + + NSInteger waitForStatus_; + NSInteger notifiedStatus_; + + BOOL prepared_; // Whether prepared was called before waitForStatus:timeout: + NSRecursiveLock *lock_; // Lock to synchronize on + SEL waitSelector_; // The selector we are waiting on + + NSArray *_runLoopModes; +} + +/*! + Run loop modes to run while waiting; + Defaults to NSDefaultRunLoopMode, NSRunLoopCommonModes, NSConnectionReplyMode + */ +@property (strong, nonatomic) NSArray *runLoopModes; + +/*! + Prepare before calling the asynchronous method. + */ +- (void)prepare; + +/*! + Prepare and specify the selector we will use in notify. + + @param selector Selector + */ +- (void)prepare:(SEL)selector; + +/*! + Wait for notification of status or timeout. + + Be sure to prepare before calling your asynchronous method. + For example, + + - (void)testFoo { + [self prepare]; + + // Do asynchronous task here + + [self waitForStatus:kXCTUnitWaitStatusSuccess timeout:1.0]; + } + + @param status kXCTUnitWaitStatusSuccess, kXCTUnitWaitStatusFailure or custom status + @param timeout Timeout in seconds + */ +- (void)waitForStatus:(NSInteger)status timeout:(NSTimeInterval)timeout; + +/*! + @param status kXCTUnitWaitStatusSuccess, kXCTUnitWaitStatusFailure or custom status + @param timeout Timeout in seconds + @deprecated Use waitForTimeout: + */ +- (void)waitFor:(NSInteger)status timeout:(NSTimeInterval)timeout; + +/*! + Wait for timeout to occur. + Fails if we did _NOT_ timeout. + + @param timeout Timeout + */ +- (void)waitForTimeout:(NSTimeInterval)timeout; + +/*! + Notify waiting of status for test selector. + + @param status Status, for example, kXCTUnitWaitStatusSuccess + @param selector If not NULL, then will verify this selector is where we are waiting. This prevents stray asynchronous callbacks to fail a later test. + */ +- (void)notify:(NSInteger)status forSelector:(SEL)selector; + +/*! + Notify waiting of status for any selector. + + @param status Status, for example, kXCTUnitWaitStatusSuccess + */ +- (void)notify:(NSInteger)status; + +/*! + Run the run loops for the specified interval. + + @param interval Interval + @author Adapted from Robert Palmer, pauseForTimeout + */ +- (void)runForInterval:(NSTimeInterval)interval; + +@end \ No newline at end of file diff --git a/MDWampTests/XCTAsyncTestCase.m b/MDWamp iOSTests/XCTAsyncTestCase.m similarity index 100% rename from MDWampTests/XCTAsyncTestCase.m rename to MDWamp iOSTests/XCTAsyncTestCase.m diff --git a/MDWamp.podspec b/MDWamp.podspec new file mode 100644 index 0000000..72eb5f9 --- /dev/null +++ b/MDWamp.podspec @@ -0,0 +1,38 @@ +# +# Be sure to run `pod spec lint MDWamp.podspec' to ensure this is a +# valid spec and to remove all comments including this before submitting the spec. +# +# To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html +# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ +# + +Pod::Spec.new do |s| + + s.name = "MDWamp" + s.version = "2.2.5" + s.summary = "A client side objective-C implementation of the WebSocket subprotocol WAMP" + s.description = <<-DESC +MDWamp is a client side objective-C implementation of the WebSocket subprotocol [WAMP][wamp_link] (v2). + +With this library and with a server [implementation of WAMP protocol][wamp_impl] you can bring Real-time notification not only for a web app (as WebSocket was created for) but also on your mobile App, just like an inner-app Apple Push Notifcation Service, avoiding the hassle of long polling request to the server for getting new things. + DESC + s.homepage = "https://github.com/mogui/MDWamp" + s.license = { :type => "Apache 2.0", :file => "LICENSE" } + s.author = { "Niko Usai" => "mogui83@gmail.com" } + s.social_media_url = "http://twitter.com/mogui247" + s.requires_arc = true + s.ios.deployment_target = "8.0" + s.osx.deployment_target = "10.9" + # s.watchos.deployment_target = "2.0" + # s.tvos.deployment_target = "9.0" + s.source = { :git => "https://github.com/mogui/MDWamp.git", :tag => "#{s.version}" } + s.source_files = "Sources/**/*.{h,m,c}", + s.ios.frameworks = "MobileCoreServices", "CFNetwork", "Security" + s.osx.frameworks = "CFNetwork", "Security" + s.library = "icucore" + s.dependency 'CocoaAsyncSocket' + s.dependency 'MPMessagePack' + s.dependency 'SocketRocket', '>= 0.5.1' + + +end diff --git a/MDWamp.xcodeproj/project.pbxproj b/MDWamp.xcodeproj/project.pbxproj index 146e0f7..8b3edda 100644 --- a/MDWamp.xcodeproj/project.pbxproj +++ b/MDWamp.xcodeproj/project.pbxproj @@ -7,900 +7,795 @@ objects = { /* Begin PBXBuildFile section */ - 7604D70B185B499D0087773E /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7604D70A185B499D0087773E /* Cocoa.framework */; }; - 7604D720185B499D0087773E /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7604D71F185B499D0087773E /* XCTest.framework */; }; - 7604D721185B499E0087773E /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7604D70A185B499D0087773E /* Cocoa.framework */; }; - 7604D724185B499E0087773E /* MDWamp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7604D707185B499D0087773E /* MDWamp.framework */; }; - 7604D767185B6B880087773E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7604D73A185B4A7B0087773E /* Foundation.framework */; }; - 760DA6FB18EB0A9E006EC89C /* MDWampMessageFactoryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 760DA6FA18EB0A9E006EC89C /* MDWampMessageFactoryTests.m */; }; - 760DA6FD18EB0E7D006EC89C /* MDWampMessagesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 760DA6FC18EB0E7D006EC89C /* MDWampMessagesTests.m */; }; - 7619E69A18CF8E9F00B0209D /* MDWampTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7619E69918CF8E9F00B0209D /* MDWampTests.m */; }; - 76414F531950C8E900788300 /* MDWampTransportdelegateMock.m in Sources */ = {isa = PBXBuildFile; fileRef = 76414F521950C8E900788300 /* MDWampTransportdelegateMock.m */; }; - 764374A2194E238D000F29A8 /* MDStackTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 764374A1194E238D000F29A8 /* MDStackTest.m */; }; - 764F059E1969AE7B00EB1A8A /* MDWampTransportRawSocketTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 764F059D1969AE7B00EB1A8A /* MDWampTransportRawSocketTests.m */; }; - 764F05A61969B2A700EB1A8A /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 764F05A51969B2A700EB1A8A /* Security.framework */; }; - 7657A3B7195F594D00F58BB4 /* libMDWamp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7604D766185B6B880087773E /* libMDWamp.a */; }; - 7657A3B8195F598200F58BB4 /* libicucore.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 7698B1F619522D1C0045D400 /* libicucore.dylib */; }; - 765BAF9C19E722C800EC580D /* cmp.c in Sources */ = {isa = PBXBuildFile; fileRef = 765BAF8F19E722C800EC580D /* cmp.c */; }; - 765BAF9D19E722C800EC580D /* cmp.c in Sources */ = {isa = PBXBuildFile; fileRef = 765BAF8F19E722C800EC580D /* cmp.c */; }; - 765BAF9E19E722C800EC580D /* cmp.h in Headers */ = {isa = PBXBuildFile; fileRef = 765BAF9019E722C800EC580D /* cmp.h */; }; - 765BAF9F19E722C800EC580D /* MPMessagePack.h in Headers */ = {isa = PBXBuildFile; fileRef = 765BAF9119E722C800EC580D /* MPMessagePack.h */; }; - 765BAFA019E722C800EC580D /* MPMessagePackReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 765BAF9219E722C800EC580D /* MPMessagePackReader.h */; }; - 765BAFA119E722C800EC580D /* MPMessagePackReader.m in Sources */ = {isa = PBXBuildFile; fileRef = 765BAF9319E722C800EC580D /* MPMessagePackReader.m */; }; - 765BAFA219E722C800EC580D /* MPMessagePackReader.m in Sources */ = {isa = PBXBuildFile; fileRef = 765BAF9319E722C800EC580D /* MPMessagePackReader.m */; }; - 765BAFA319E722C800EC580D /* MPMessagePackWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = 765BAF9419E722C800EC580D /* MPMessagePackWriter.h */; }; - 765BAFA419E722C800EC580D /* MPMessagePackWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 765BAF9519E722C800EC580D /* MPMessagePackWriter.m */; }; - 765BAFA519E722C800EC580D /* MPMessagePackWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 765BAF9519E722C800EC580D /* MPMessagePackWriter.m */; }; - 765BAFA619E722C800EC580D /* MPOrderedDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 765BAF9619E722C800EC580D /* MPOrderedDictionary.h */; }; - 765BAFA719E722C800EC580D /* MPOrderedDictionary.m in Sources */ = {isa = PBXBuildFile; fileRef = 765BAF9719E722C800EC580D /* MPOrderedDictionary.m */; }; - 765BAFA819E722C800EC580D /* MPOrderedDictionary.m in Sources */ = {isa = PBXBuildFile; fileRef = 765BAF9719E722C800EC580D /* MPOrderedDictionary.m */; }; - 765BAFA919E722C800EC580D /* NSArray+MPMessagePack.h in Headers */ = {isa = PBXBuildFile; fileRef = 765BAF9819E722C800EC580D /* NSArray+MPMessagePack.h */; }; - 765BAFAA19E722C800EC580D /* NSArray+MPMessagePack.m in Sources */ = {isa = PBXBuildFile; fileRef = 765BAF9919E722C800EC580D /* NSArray+MPMessagePack.m */; }; - 765BAFAB19E722C800EC580D /* NSArray+MPMessagePack.m in Sources */ = {isa = PBXBuildFile; fileRef = 765BAF9919E722C800EC580D /* NSArray+MPMessagePack.m */; }; - 765BAFAC19E722C800EC580D /* NSDictionary+MPMessagePack.h in Headers */ = {isa = PBXBuildFile; fileRef = 765BAF9A19E722C800EC580D /* NSDictionary+MPMessagePack.h */; }; - 765BAFAD19E722C800EC580D /* NSDictionary+MPMessagePack.m in Sources */ = {isa = PBXBuildFile; fileRef = 765BAF9B19E722C800EC580D /* NSDictionary+MPMessagePack.m */; }; - 765BAFAE19E722C800EC580D /* NSDictionary+MPMessagePack.m in Sources */ = {isa = PBXBuildFile; fileRef = 765BAF9B19E722C800EC580D /* NSDictionary+MPMessagePack.m */; }; - 765DD2D118E484D000D4C19F /* MDWampTransportMock.m in Sources */ = {isa = PBXBuildFile; fileRef = 76EF81D318D1043700DFB13B /* MDWampTransportMock.m */; }; - 766E10E719E6B4390083173B /* MDWampClientConfigTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 766E10E619E6B4390083173B /* MDWampClientConfigTests.m */; }; - 766E10ED19E6C1E00083173B /* MDWampAdvancedTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 766E10EC19E6C1E00083173B /* MDWampAdvancedTests.m */; }; - 7673B7AF1A0FDA3F0072CDD3 /* MDWampTransportWebSocketTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7673B7AE1A0FDA3F0072CDD3 /* MDWampTransportWebSocketTests.m */; }; - 7698B1B41952278E0045D400 /* MDWampSerializations.m in Sources */ = {isa = PBXBuildFile; fileRef = 7698B1B31952278E0045D400 /* MDWampSerializations.m */; }; - 76A34EF0195DED5400233B76 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7604D73A185B4A7B0087773E /* Foundation.framework */; }; - 76A34EF1195DED5400233B76 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7698B1BF19522AF80045D400 /* CoreGraphics.framework */; }; - 76A34EF3195DED5400233B76 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76A34EF2195DED5400233B76 /* UIKit.framework */; }; - 76AE15751A0C21C50041016F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 76AE15581A0C21C50041016F /* Main.storyboard */; }; - 76AE15761A0C21C50041016F /* broken_link-32.png in Resources */ = {isa = PBXBuildFile; fileRef = 76AE155A1A0C21C50041016F /* broken_link-32.png */; }; - 76AE15771A0C21C50041016F /* collaboration.png in Resources */ = {isa = PBXBuildFile; fileRef = 76AE155B1A0C21C50041016F /* collaboration.png */; }; - 76AE15781A0C21C50041016F /* collaboration@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 76AE155C1A0C21C50041016F /* collaboration@2x.png */; }; - 76AE15791A0C21C50041016F /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 76AE155D1A0C21C50041016F /* InfoPlist.strings */; }; - 76AE157A1A0C21C50041016F /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 76AE155F1A0C21C50041016F /* Images.xcassets */; }; - 76AE157B1A0C21C50041016F /* link-32.png in Resources */ = {isa = PBXBuildFile; fileRef = 76AE15601A0C21C50041016F /* link-32.png */; }; - 76AE157C1A0C21C50041016F /* online-32.png in Resources */ = {isa = PBXBuildFile; fileRef = 76AE15611A0C21C50041016F /* online-32.png */; }; - 76AE157D1A0C21C50041016F /* online-32@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 76AE15621A0C21C50041016F /* online-32@2x.png */; }; - 76AE157E1A0C21C50041016F /* run_command.png in Resources */ = {isa = PBXBuildFile; fileRef = 76AE15631A0C21C50041016F /* run_command.png */; }; - 76AE157F1A0C21C50041016F /* run_command@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 76AE15641A0C21C50041016F /* run_command@2x.png */; }; - 76AE15801A0C21C50041016F /* save_as.png in Resources */ = {isa = PBXBuildFile; fileRef = 76AE15651A0C21C50041016F /* save_as.png */; }; - 76AE15811A0C21C50041016F /* save_as@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 76AE15661A0C21C50041016F /* save_as@2x.png */; }; - 76AE15821A0C21C50041016F /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15691A0C21C50041016F /* AppDelegate.m */; }; - 76AE15831A0C21C50041016F /* CallRPCViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE156B1A0C21C50041016F /* CallRPCViewController.m */; }; - 76AE15841A0C21C50041016F /* ChatStartViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE156D1A0C21C50041016F /* ChatStartViewController.m */; }; - 76AE15851A0C21C50041016F /* ChatViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE156F1A0C21C50041016F /* ChatViewController.m */; }; - 76AE15861A0C21C50041016F /* ConnectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15711A0C21C50041016F /* ConnectViewController.m */; }; - 76AE15871A0C21C50041016F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15721A0C21C50041016F /* main.m */; }; - 76AE15881A0C21C50041016F /* RegisterRPCViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15741A0C21C50041016F /* RegisterRPCViewController.m */; }; - 76AE15931A0C23130041016F /* SRWebSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15911A0C23130041016F /* SRWebSocket.h */; }; - 76AE15941A0C23130041016F /* SRWebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15921A0C23130041016F /* SRWebSocket.m */; }; - 76AE15951A0C23130041016F /* SRWebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15921A0C23130041016F /* SRWebSocket.m */; }; - 76AE15EB1A0C24150041016F /* NSMutableArray+MDStack.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15981A0C24150041016F /* NSMutableArray+MDStack.h */; }; - 76AE15EC1A0C24150041016F /* NSMutableArray+MDStack.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15991A0C24150041016F /* NSMutableArray+MDStack.m */; }; - 76AE15ED1A0C24150041016F /* NSMutableArray+MDStack.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15991A0C24150041016F /* NSMutableArray+MDStack.m */; }; - 76AE15EE1A0C24150041016F /* NSString+MDString.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE159A1A0C24150041016F /* NSString+MDString.h */; }; - 76AE15EF1A0C24150041016F /* NSString+MDString.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE159B1A0C24150041016F /* NSString+MDString.m */; }; - 76AE15F01A0C24150041016F /* NSString+MDString.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE159B1A0C24150041016F /* NSString+MDString.m */; }; - 76AE15F11A0C24150041016F /* MDWamp.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE159C1A0C24150041016F /* MDWamp.h */; }; - 76AE15F21A0C24150041016F /* MDWamp.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE159D1A0C24150041016F /* MDWamp.m */; }; - 76AE15F31A0C24150041016F /* MDWamp.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE159D1A0C24150041016F /* MDWamp.m */; }; - 76AE15F41A0C24150041016F /* MDWampClientConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE159E1A0C24150041016F /* MDWampClientConfig.h */; }; - 76AE15F51A0C24150041016F /* MDWampClientConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE159F1A0C24150041016F /* MDWampClientConfig.m */; }; - 76AE15F61A0C24150041016F /* MDWampClientConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE159F1A0C24150041016F /* MDWampClientConfig.m */; }; - 76AE15F71A0C24150041016F /* MDWampClientDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15A01A0C24150041016F /* MDWampClientDelegate.h */; }; - 76AE15F81A0C24150041016F /* MDWampConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15A11A0C24150041016F /* MDWampConstants.h */; }; - 76AE15F91A0C24150041016F /* MDWampConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15A21A0C24150041016F /* MDWampConstants.m */; }; - 76AE15FA1A0C24150041016F /* MDWampConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15A21A0C24150041016F /* MDWampConstants.m */; }; - 76AE15FB1A0C24150041016F /* MDWampAbort.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15A41A0C24150041016F /* MDWampAbort.h */; }; - 76AE15FC1A0C24150041016F /* MDWampAbort.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15A51A0C24150041016F /* MDWampAbort.m */; }; - 76AE15FD1A0C24150041016F /* MDWampAbort.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15A51A0C24150041016F /* MDWampAbort.m */; }; - 76AE15FE1A0C24150041016F /* MDWampAuthenticate.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15A61A0C24150041016F /* MDWampAuthenticate.h */; }; - 76AE15FF1A0C24150041016F /* MDWampAuthenticate.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15A71A0C24150041016F /* MDWampAuthenticate.m */; }; - 76AE16001A0C24150041016F /* MDWampAuthenticate.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15A71A0C24150041016F /* MDWampAuthenticate.m */; }; - 76AE16011A0C24150041016F /* MDWampCall.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15A81A0C24150041016F /* MDWampCall.h */; }; - 76AE16021A0C24150041016F /* MDWampCall.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15A91A0C24150041016F /* MDWampCall.m */; }; - 76AE16031A0C24150041016F /* MDWampCall.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15A91A0C24150041016F /* MDWampCall.m */; }; - 76AE16041A0C24150041016F /* MDWampCancel.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15AA1A0C24150041016F /* MDWampCancel.h */; }; - 76AE16051A0C24150041016F /* MDWampCancel.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15AB1A0C24150041016F /* MDWampCancel.m */; }; - 76AE16061A0C24150041016F /* MDWampCancel.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15AB1A0C24150041016F /* MDWampCancel.m */; }; - 76AE16071A0C24150041016F /* MDWampChallenge.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15AC1A0C24150041016F /* MDWampChallenge.h */; }; - 76AE16081A0C24150041016F /* MDWampChallenge.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15AD1A0C24150041016F /* MDWampChallenge.m */; }; - 76AE16091A0C24150041016F /* MDWampChallenge.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15AD1A0C24150041016F /* MDWampChallenge.m */; }; - 76AE160A1A0C24150041016F /* MDWampError.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15AE1A0C24150041016F /* MDWampError.h */; }; - 76AE160B1A0C24150041016F /* MDWampError.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15AF1A0C24150041016F /* MDWampError.m */; }; - 76AE160C1A0C24150041016F /* MDWampError.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15AF1A0C24150041016F /* MDWampError.m */; }; - 76AE160D1A0C24150041016F /* MDWampEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15B01A0C24150041016F /* MDWampEvent.h */; }; - 76AE160E1A0C24150041016F /* MDWampEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15B11A0C24150041016F /* MDWampEvent.m */; }; - 76AE160F1A0C24150041016F /* MDWampEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15B11A0C24150041016F /* MDWampEvent.m */; }; - 76AE16101A0C24150041016F /* MDWampGoodbye.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15B21A0C24150041016F /* MDWampGoodbye.h */; }; - 76AE16111A0C24150041016F /* MDWampGoodbye.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15B31A0C24150041016F /* MDWampGoodbye.m */; }; - 76AE16121A0C24150041016F /* MDWampGoodbye.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15B31A0C24150041016F /* MDWampGoodbye.m */; }; - 76AE16161A0C24150041016F /* MDWampHello.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15B61A0C24150041016F /* MDWampHello.h */; }; - 76AE16171A0C24150041016F /* MDWampHello.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15B71A0C24150041016F /* MDWampHello.m */; }; - 76AE16181A0C24150041016F /* MDWampHello.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15B71A0C24150041016F /* MDWampHello.m */; }; - 76AE16191A0C24150041016F /* MDWampInterrupt.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15B81A0C24150041016F /* MDWampInterrupt.h */; }; - 76AE161A1A0C24150041016F /* MDWampInterrupt.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15B91A0C24150041016F /* MDWampInterrupt.m */; }; - 76AE161B1A0C24150041016F /* MDWampInterrupt.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15B91A0C24150041016F /* MDWampInterrupt.m */; }; - 76AE161C1A0C24150041016F /* MDWampInvocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15BA1A0C24150041016F /* MDWampInvocation.h */; }; - 76AE161D1A0C24150041016F /* MDWampInvocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15BB1A0C24150041016F /* MDWampInvocation.m */; }; - 76AE161E1A0C24150041016F /* MDWampInvocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15BB1A0C24150041016F /* MDWampInvocation.m */; }; - 76AE161F1A0C24150041016F /* MDWampMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15BC1A0C24150041016F /* MDWampMessage.h */; }; - 76AE16201A0C24150041016F /* MDWampMessageFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15BD1A0C24150041016F /* MDWampMessageFactory.h */; }; - 76AE16211A0C24150041016F /* MDWampMessageFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15BE1A0C24150041016F /* MDWampMessageFactory.m */; }; - 76AE16221A0C24150041016F /* MDWampMessageFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15BE1A0C24150041016F /* MDWampMessageFactory.m */; }; - 76AE16231A0C24150041016F /* MDWampMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15BF1A0C24150041016F /* MDWampMessages.h */; }; - 76AE16241A0C24150041016F /* MDWampPublish.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15C01A0C24150041016F /* MDWampPublish.h */; }; - 76AE16251A0C24150041016F /* MDWampPublish.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15C11A0C24150041016F /* MDWampPublish.m */; }; - 76AE16261A0C24150041016F /* MDWampPublish.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15C11A0C24150041016F /* MDWampPublish.m */; }; - 76AE16271A0C24150041016F /* MDWampPublished.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15C21A0C24150041016F /* MDWampPublished.h */; }; - 76AE16281A0C24150041016F /* MDWampPublished.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15C31A0C24150041016F /* MDWampPublished.m */; }; - 76AE16291A0C24150041016F /* MDWampPublished.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15C31A0C24150041016F /* MDWampPublished.m */; }; - 76AE162A1A0C24150041016F /* MDWampRegister.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15C41A0C24150041016F /* MDWampRegister.h */; }; - 76AE162B1A0C24150041016F /* MDWampRegister.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15C51A0C24150041016F /* MDWampRegister.m */; }; - 76AE162C1A0C24150041016F /* MDWampRegister.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15C51A0C24150041016F /* MDWampRegister.m */; }; - 76AE162D1A0C24150041016F /* MDWampRegistered.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15C61A0C24150041016F /* MDWampRegistered.h */; }; - 76AE162E1A0C24150041016F /* MDWampRegistered.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15C71A0C24150041016F /* MDWampRegistered.m */; }; - 76AE162F1A0C24150041016F /* MDWampRegistered.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15C71A0C24150041016F /* MDWampRegistered.m */; }; - 76AE16301A0C24150041016F /* MDWampResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15C81A0C24150041016F /* MDWampResult.h */; }; - 76AE16311A0C24150041016F /* MDWampResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15C91A0C24150041016F /* MDWampResult.m */; }; - 76AE16321A0C24150041016F /* MDWampResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15C91A0C24150041016F /* MDWampResult.m */; }; - 76AE16331A0C24150041016F /* MDWampSubscribe.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15CA1A0C24150041016F /* MDWampSubscribe.h */; }; - 76AE16341A0C24150041016F /* MDWampSubscribe.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15CB1A0C24150041016F /* MDWampSubscribe.m */; }; - 76AE16351A0C24150041016F /* MDWampSubscribe.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15CB1A0C24150041016F /* MDWampSubscribe.m */; }; - 76AE16361A0C24150041016F /* MDWampSubscribed.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15CC1A0C24150041016F /* MDWampSubscribed.h */; }; - 76AE16371A0C24150041016F /* MDWampSubscribed.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15CD1A0C24150041016F /* MDWampSubscribed.m */; }; - 76AE16381A0C24150041016F /* MDWampSubscribed.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15CD1A0C24150041016F /* MDWampSubscribed.m */; }; - 76AE16391A0C24150041016F /* MDWampUnregister.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15CE1A0C24150041016F /* MDWampUnregister.h */; }; - 76AE163A1A0C24150041016F /* MDWampUnregister.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15CF1A0C24150041016F /* MDWampUnregister.m */; }; - 76AE163B1A0C24150041016F /* MDWampUnregister.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15CF1A0C24150041016F /* MDWampUnregister.m */; }; - 76AE163C1A0C24150041016F /* MDWampUnregistered.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15D01A0C24150041016F /* MDWampUnregistered.h */; }; - 76AE163D1A0C24150041016F /* MDWampUnregistered.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15D11A0C24150041016F /* MDWampUnregistered.m */; }; - 76AE163E1A0C24150041016F /* MDWampUnregistered.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15D11A0C24150041016F /* MDWampUnregistered.m */; }; - 76AE163F1A0C24150041016F /* MDWampUnsubscribe.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15D21A0C24150041016F /* MDWampUnsubscribe.h */; }; - 76AE16401A0C24150041016F /* MDWampUnsubscribe.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15D31A0C24150041016F /* MDWampUnsubscribe.m */; }; - 76AE16411A0C24150041016F /* MDWampUnsubscribe.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15D31A0C24150041016F /* MDWampUnsubscribe.m */; }; - 76AE16421A0C24150041016F /* MDWampUnsubscribed.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15D41A0C24150041016F /* MDWampUnsubscribed.h */; }; - 76AE16431A0C24150041016F /* MDWampUnsubscribed.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15D51A0C24150041016F /* MDWampUnsubscribed.m */; }; - 76AE16441A0C24150041016F /* MDWampUnsubscribed.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15D51A0C24150041016F /* MDWampUnsubscribed.m */; }; - 76AE16451A0C24150041016F /* MDWampWelcome.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15D61A0C24150041016F /* MDWampWelcome.h */; }; - 76AE16461A0C24150041016F /* MDWampWelcome.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15D71A0C24150041016F /* MDWampWelcome.m */; }; - 76AE16471A0C24150041016F /* MDWampWelcome.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15D71A0C24150041016F /* MDWampWelcome.m */; }; - 76AE16481A0C24150041016F /* MDWampYield.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15D81A0C24150041016F /* MDWampYield.h */; }; - 76AE16491A0C24150041016F /* MDWampYield.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15D91A0C24150041016F /* MDWampYield.m */; }; - 76AE164A1A0C24150041016F /* MDWampYield.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15D91A0C24150041016F /* MDWampYield.m */; }; - 76AE164B1A0C24150041016F /* MDWampSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15DB1A0C24150041016F /* MDWampSerialization.h */; }; - 76AE164C1A0C24150041016F /* MDWampSerializationJSON.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15DC1A0C24150041016F /* MDWampSerializationJSON.h */; }; - 76AE164D1A0C24150041016F /* MDWampSerializationJSON.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15DD1A0C24150041016F /* MDWampSerializationJSON.m */; }; - 76AE164E1A0C24150041016F /* MDWampSerializationJSON.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15DD1A0C24150041016F /* MDWampSerializationJSON.m */; }; - 76AE164F1A0C24150041016F /* MDWampSerializationMsgpack.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15DE1A0C24150041016F /* MDWampSerializationMsgpack.h */; }; - 76AE16501A0C24150041016F /* MDWampSerializationMsgpack.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15DF1A0C24150041016F /* MDWampSerializationMsgpack.m */; }; - 76AE16511A0C24150041016F /* MDWampSerializationMsgpack.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15DF1A0C24150041016F /* MDWampSerializationMsgpack.m */; }; - 76AE16521A0C24150041016F /* MDWampSerializations.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15E01A0C24150041016F /* MDWampSerializations.h */; }; - 76AE16531A0C24150041016F /* MDWampTransport.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15E21A0C24150041016F /* MDWampTransport.h */; }; - 76AE16541A0C24150041016F /* MDWampTransportDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15E31A0C24150041016F /* MDWampTransportDelegate.h */; }; - 76AE16551A0C24150041016F /* MDWampTransportRawSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15E41A0C24150041016F /* MDWampTransportRawSocket.h */; }; - 76AE16561A0C24150041016F /* MDWampTransportRawSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15E51A0C24150041016F /* MDWampTransportRawSocket.m */; }; - 76AE16571A0C24150041016F /* MDWampTransportRawSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15E51A0C24150041016F /* MDWampTransportRawSocket.m */; }; - 76AE16581A0C24150041016F /* MDWampTransports.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15E61A0C24150041016F /* MDWampTransports.h */; }; - 76AE16591A0C24150041016F /* MDWampTransportWebSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15E71A0C24150041016F /* MDWampTransportWebSocket.h */; }; - 76AE165A1A0C24150041016F /* MDWampTransportWebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15E81A0C24150041016F /* MDWampTransportWebSocket.m */; }; - 76AE165B1A0C24150041016F /* MDWampTransportWebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE15E81A0C24150041016F /* MDWampTransportWebSocket.m */; }; - 76AE165C1A0C24150041016F /* MDWamp-Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = 76AE15E91A0C24150041016F /* MDWamp-Prefix.pch */; }; - 76AE16611A0C29940041016F /* XCTAsyncTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AE16601A0C29940041016F /* XCTAsyncTestCase.m */; }; - 76CCC6F6185BD1F10056AB98 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 76CCC6EE185BD1F10056AB98 /* InfoPlist.strings */; }; - 76CCC6F7185BD1F10056AB98 /* MDWampClientDelegateMock.m in Sources */ = {isa = PBXBuildFile; fileRef = 76CCC6F1185BD1F10056AB98 /* MDWampClientDelegateMock.m */; }; - 76EF81DB18D1087000DFB13B /* MDWampSerializationMock.m in Sources */ = {isa = PBXBuildFile; fileRef = 76EF81DA18D1087000DFB13B /* MDWampSerializationMock.m */; }; - 76F5970F196894A60002773C /* GCDAsyncSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 76F5970D196894A60002773C /* GCDAsyncSocket.h */; }; - 76F59710196894A60002773C /* GCDAsyncSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 76F5970E196894A60002773C /* GCDAsyncSocket.m */; }; - 76F59711196894A60002773C /* GCDAsyncSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 76F5970E196894A60002773C /* GCDAsyncSocket.m */; }; + 33133AE81CFF7598003FCFC5 /* MDWamp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 33133ADD1CFF7598003FCFC5 /* MDWamp.framework */; }; + 33133B0A1CFF7657003FCFC5 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B091CFF7657003FCFC5 /* main.m */; }; + 33133B0D1CFF7657003FCFC5 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B0C1CFF7657003FCFC5 /* AppDelegate.m */; }; + 33133B101CFF7657003FCFC5 /* FirstViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B0F1CFF7657003FCFC5 /* FirstViewController.m */; }; + 33133B131CFF7657003FCFC5 /* SecondViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B121CFF7657003FCFC5 /* SecondViewController.m */; }; + 33133B161CFF7657003FCFC5 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 33133B141CFF7657003FCFC5 /* Main.storyboard */; }; + 33133B181CFF7657003FCFC5 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33133B171CFF7657003FCFC5 /* Assets.xcassets */; }; + 33133B1B1CFF7657003FCFC5 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 33133B191CFF7657003FCFC5 /* LaunchScreen.storyboard */; }; + 33133B831CFF77C7003FCFC5 /* NSMutableArray+MDStack.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B301CFF77C7003FCFC5 /* NSMutableArray+MDStack.h */; }; + 33133B841CFF77C7003FCFC5 /* NSMutableArray+MDStack.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B311CFF77C7003FCFC5 /* NSMutableArray+MDStack.m */; }; + 33133B851CFF77C7003FCFC5 /* NSString+MDString.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B321CFF77C7003FCFC5 /* NSString+MDString.h */; }; + 33133B861CFF77C7003FCFC5 /* NSString+MDString.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B331CFF77C7003FCFC5 /* NSString+MDString.m */; }; + 33133B8B1CFF77C7003FCFC5 /* MDWamp.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B381CFF77C7003FCFC5 /* MDWamp.h */; }; + 33133B8C1CFF77C7003FCFC5 /* MDWamp.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B391CFF77C7003FCFC5 /* MDWamp.m */; }; + 33133B8D1CFF77C7003FCFC5 /* MDWampClientConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B3A1CFF77C7003FCFC5 /* MDWampClientConfig.h */; }; + 33133B8E1CFF77C7003FCFC5 /* MDWampClientConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B3B1CFF77C7003FCFC5 /* MDWampClientConfig.m */; }; + 33133B8F1CFF77C7003FCFC5 /* MDWampClientDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B3C1CFF77C7003FCFC5 /* MDWampClientDelegate.h */; }; + 33133B901CFF77C7003FCFC5 /* MDWampConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B3D1CFF77C7003FCFC5 /* MDWampConstants.h */; }; + 33133B911CFF77C7003FCFC5 /* MDWampConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B3E1CFF77C7003FCFC5 /* MDWampConstants.m */; }; + 33133B921CFF77C7003FCFC5 /* MDWampAbort.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B401CFF77C7003FCFC5 /* MDWampAbort.h */; }; + 33133B931CFF77C7003FCFC5 /* MDWampAbort.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B411CFF77C7003FCFC5 /* MDWampAbort.m */; }; + 33133B941CFF77C7003FCFC5 /* MDWampAuthenticate.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B421CFF77C7003FCFC5 /* MDWampAuthenticate.h */; }; + 33133B951CFF77C7003FCFC5 /* MDWampAuthenticate.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B431CFF77C7003FCFC5 /* MDWampAuthenticate.m */; }; + 33133B961CFF77C7003FCFC5 /* MDWampCall.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B441CFF77C7003FCFC5 /* MDWampCall.h */; }; + 33133B971CFF77C7003FCFC5 /* MDWampCall.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B451CFF77C7003FCFC5 /* MDWampCall.m */; }; + 33133B981CFF77C7003FCFC5 /* MDWampCancel.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B461CFF77C7003FCFC5 /* MDWampCancel.h */; }; + 33133B991CFF77C7003FCFC5 /* MDWampCancel.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B471CFF77C7003FCFC5 /* MDWampCancel.m */; }; + 33133B9A1CFF77C7003FCFC5 /* MDWampChallenge.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B481CFF77C7003FCFC5 /* MDWampChallenge.h */; }; + 33133B9B1CFF77C7003FCFC5 /* MDWampChallenge.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B491CFF77C7003FCFC5 /* MDWampChallenge.m */; }; + 33133B9C1CFF77C7003FCFC5 /* MDWampError.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B4A1CFF77C7003FCFC5 /* MDWampError.h */; }; + 33133B9D1CFF77C7003FCFC5 /* MDWampError.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B4B1CFF77C7003FCFC5 /* MDWampError.m */; }; + 33133B9E1CFF77C7003FCFC5 /* MDWampEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B4C1CFF77C7003FCFC5 /* MDWampEvent.h */; }; + 33133B9F1CFF77C7003FCFC5 /* MDWampEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B4D1CFF77C7003FCFC5 /* MDWampEvent.m */; }; + 33133BA01CFF77C7003FCFC5 /* MDWampGoodbye.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B4E1CFF77C7003FCFC5 /* MDWampGoodbye.h */; }; + 33133BA11CFF77C7003FCFC5 /* MDWampGoodbye.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B4F1CFF77C7003FCFC5 /* MDWampGoodbye.m */; }; + 33133BA21CFF77C7003FCFC5 /* MDWampHello.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B501CFF77C7003FCFC5 /* MDWampHello.h */; }; + 33133BA31CFF77C7003FCFC5 /* MDWampHello.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B511CFF77C7003FCFC5 /* MDWampHello.m */; }; + 33133BA41CFF77C7003FCFC5 /* MDWampInterrupt.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B521CFF77C7003FCFC5 /* MDWampInterrupt.h */; }; + 33133BA51CFF77C7003FCFC5 /* MDWampInterrupt.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B531CFF77C7003FCFC5 /* MDWampInterrupt.m */; }; + 33133BA61CFF77C7003FCFC5 /* MDWampInvocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B541CFF77C7003FCFC5 /* MDWampInvocation.h */; }; + 33133BA71CFF77C7003FCFC5 /* MDWampInvocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B551CFF77C7003FCFC5 /* MDWampInvocation.m */; }; + 33133BA81CFF77C7003FCFC5 /* MDWampMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B561CFF77C7003FCFC5 /* MDWampMessage.h */; }; + 33133BA91CFF77C7003FCFC5 /* MDWampMessageFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B571CFF77C7003FCFC5 /* MDWampMessageFactory.h */; }; + 33133BAA1CFF77C7003FCFC5 /* MDWampMessageFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B581CFF77C7003FCFC5 /* MDWampMessageFactory.m */; }; + 33133BAB1CFF77C7003FCFC5 /* MDWampMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B591CFF77C7003FCFC5 /* MDWampMessages.h */; }; + 33133BAC1CFF77C7003FCFC5 /* MDWampPublish.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B5A1CFF77C7003FCFC5 /* MDWampPublish.h */; }; + 33133BAD1CFF77C7003FCFC5 /* MDWampPublish.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B5B1CFF77C7003FCFC5 /* MDWampPublish.m */; }; + 33133BAE1CFF77C7003FCFC5 /* MDWampPublished.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B5C1CFF77C7003FCFC5 /* MDWampPublished.h */; }; + 33133BAF1CFF77C7003FCFC5 /* MDWampPublished.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B5D1CFF77C7003FCFC5 /* MDWampPublished.m */; }; + 33133BB01CFF77C7003FCFC5 /* MDWampRegister.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B5E1CFF77C7003FCFC5 /* MDWampRegister.h */; }; + 33133BB11CFF77C7003FCFC5 /* MDWampRegister.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B5F1CFF77C7003FCFC5 /* MDWampRegister.m */; }; + 33133BB21CFF77C7003FCFC5 /* MDWampRegistered.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B601CFF77C7003FCFC5 /* MDWampRegistered.h */; }; + 33133BB31CFF77C7003FCFC5 /* MDWampRegistered.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B611CFF77C7003FCFC5 /* MDWampRegistered.m */; }; + 33133BB41CFF77C7003FCFC5 /* MDWampResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B621CFF77C7003FCFC5 /* MDWampResult.h */; }; + 33133BB51CFF77C7003FCFC5 /* MDWampResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B631CFF77C7003FCFC5 /* MDWampResult.m */; }; + 33133BB61CFF77C7003FCFC5 /* MDWampSubscribe.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B641CFF77C7003FCFC5 /* MDWampSubscribe.h */; }; + 33133BB71CFF77C7003FCFC5 /* MDWampSubscribe.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B651CFF77C7003FCFC5 /* MDWampSubscribe.m */; }; + 33133BB81CFF77C7003FCFC5 /* MDWampSubscribed.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B661CFF77C7003FCFC5 /* MDWampSubscribed.h */; }; + 33133BB91CFF77C7003FCFC5 /* MDWampSubscribed.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B671CFF77C7003FCFC5 /* MDWampSubscribed.m */; }; + 33133BBA1CFF77C7003FCFC5 /* MDWampUnregister.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B681CFF77C7003FCFC5 /* MDWampUnregister.h */; }; + 33133BBB1CFF77C7003FCFC5 /* MDWampUnregister.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B691CFF77C7003FCFC5 /* MDWampUnregister.m */; }; + 33133BBC1CFF77C7003FCFC5 /* MDWampUnregistered.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B6A1CFF77C7003FCFC5 /* MDWampUnregistered.h */; }; + 33133BBD1CFF77C7003FCFC5 /* MDWampUnregistered.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B6B1CFF77C7003FCFC5 /* MDWampUnregistered.m */; }; + 33133BBE1CFF77C7003FCFC5 /* MDWampUnsubscribe.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B6C1CFF77C7003FCFC5 /* MDWampUnsubscribe.h */; }; + 33133BBF1CFF77C7003FCFC5 /* MDWampUnsubscribe.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B6D1CFF77C7003FCFC5 /* MDWampUnsubscribe.m */; }; + 33133BC01CFF77C7003FCFC5 /* MDWampUnsubscribed.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B6E1CFF77C7003FCFC5 /* MDWampUnsubscribed.h */; }; + 33133BC11CFF77C7003FCFC5 /* MDWampUnsubscribed.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B6F1CFF77C7003FCFC5 /* MDWampUnsubscribed.m */; }; + 33133BC21CFF77C7003FCFC5 /* MDWampWelcome.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B701CFF77C7003FCFC5 /* MDWampWelcome.h */; }; + 33133BC31CFF77C7003FCFC5 /* MDWampWelcome.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B711CFF77C7003FCFC5 /* MDWampWelcome.m */; }; + 33133BC41CFF77C7003FCFC5 /* MDWampYield.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B721CFF77C7003FCFC5 /* MDWampYield.h */; }; + 33133BC51CFF77C7003FCFC5 /* MDWampYield.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B731CFF77C7003FCFC5 /* MDWampYield.m */; }; + 33133BC61CFF77C7003FCFC5 /* MDWampSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B751CFF77C7003FCFC5 /* MDWampSerialization.h */; }; + 33133BC71CFF77C7003FCFC5 /* MDWampSerializationJSON.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B761CFF77C7003FCFC5 /* MDWampSerializationJSON.h */; }; + 33133BC81CFF77C7003FCFC5 /* MDWampSerializationJSON.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B771CFF77C7003FCFC5 /* MDWampSerializationJSON.m */; }; + 33133BC91CFF77C7003FCFC5 /* MDWampSerializationMsgpack.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B781CFF77C7003FCFC5 /* MDWampSerializationMsgpack.h */; }; + 33133BCA1CFF77C7003FCFC5 /* MDWampSerializationMsgpack.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B791CFF77C7003FCFC5 /* MDWampSerializationMsgpack.m */; }; + 33133BCB1CFF77C7003FCFC5 /* MDWampSerializations.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B7A1CFF77C7003FCFC5 /* MDWampSerializations.h */; }; + 33133BCC1CFF77C7003FCFC5 /* MDWampTransport.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B7C1CFF77C7003FCFC5 /* MDWampTransport.h */; }; + 33133BCD1CFF77C7003FCFC5 /* MDWampTransportDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B7D1CFF77C7003FCFC5 /* MDWampTransportDelegate.h */; }; + 33133BCE1CFF77C7003FCFC5 /* MDWampTransportRawSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B7E1CFF77C7003FCFC5 /* MDWampTransportRawSocket.h */; }; + 33133BCF1CFF77C7003FCFC5 /* MDWampTransportRawSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B7F1CFF77C7003FCFC5 /* MDWampTransportRawSocket.m */; }; + 33133BD01CFF77C7003FCFC5 /* MDWampTransports.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B801CFF77C7003FCFC5 /* MDWampTransports.h */; }; + 33133BD11CFF77C7003FCFC5 /* MDWampTransportWebSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B811CFF77C7003FCFC5 /* MDWampTransportWebSocket.h */; }; + 33133BD21CFF77C7003FCFC5 /* MDWampTransportWebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B821CFF77C7003FCFC5 /* MDWampTransportWebSocket.m */; }; + 33220B5F1CFF99EB00F3C3DA /* GHODictionary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 33220B5D1CFF99EB00F3C3DA /* GHODictionary.framework */; }; + 33220B601CFF99EB00F3C3DA /* MPMessagePack.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 33220B5E1CFF99EB00F3C3DA /* MPMessagePack.framework */; }; + 33220B621CFF9A7C00F3C3DA /* CocoaAsyncSocket.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 33220B611CFF9A7C00F3C3DA /* CocoaAsyncSocket.framework */; }; + 33220B641CFF9B4500F3C3DA /* SocketRocket.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 33220B631CFF9B4500F3C3DA /* SocketRocket.framework */; }; + 33220B691CFF9C1F00F3C3DA /* CocoaAsyncSocket.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 33220B651CFF9C1F00F3C3DA /* CocoaAsyncSocket.framework */; }; + 33220B6A1CFF9C1F00F3C3DA /* GHODictionary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 33220B661CFF9C1F00F3C3DA /* GHODictionary.framework */; }; + 33220B6B1CFF9C1F00F3C3DA /* MPMessagePack.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 33220B671CFF9C1F00F3C3DA /* MPMessagePack.framework */; }; + 33220B6C1CFF9C1F00F3C3DA /* SocketRocket.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 33220B681CFF9C1F00F3C3DA /* SocketRocket.framework */; }; + 33220BA61D009BAB00F3C3DA /* MDWampTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 33220B8D1D009BAB00F3C3DA /* MDWampTests.m */; }; + 33220BA81D009BAB00F3C3DA /* MDStackTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 33220B911D009BAB00F3C3DA /* MDStackTest.m */; }; + 33220BA91D009BAB00F3C3DA /* MDWampAdvancedTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 33220B921D009BAB00F3C3DA /* MDWampAdvancedTests.m */; }; + 33220BAA1D009BAB00F3C3DA /* MDWampClientConfigTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 33220B931D009BAB00F3C3DA /* MDWampClientConfigTests.m */; }; + 33220BAB1D009BAB00F3C3DA /* MDWampClientDelegateMock.m in Sources */ = {isa = PBXBuildFile; fileRef = 33220B951D009BAB00F3C3DA /* MDWampClientDelegateMock.m */; }; + 33220BAC1D009BAB00F3C3DA /* MDWampMessageFactoryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 33220B961D009BAB00F3C3DA /* MDWampMessageFactoryTests.m */; }; + 33220BAD1D009BAB00F3C3DA /* MDWampMessagesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 33220B971D009BAB00F3C3DA /* MDWampMessagesTests.m */; }; + 33220BAF1D009BAB00F3C3DA /* MDWampSerializationMock.m in Sources */ = {isa = PBXBuildFile; fileRef = 33220B9A1D009BAB00F3C3DA /* MDWampSerializationMock.m */; }; + 33220BB01D009BAB00F3C3DA /* MDWampSerializations.m in Sources */ = {isa = PBXBuildFile; fileRef = 33220B9B1D009BAB00F3C3DA /* MDWampSerializations.m */; }; + 33220BB11D009BAB00F3C3DA /* MDWampTests-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 33220B9D1D009BAB00F3C3DA /* MDWampTests-Info.plist */; }; + 33220BB21D009BAB00F3C3DA /* MDWampTransportdelegateMock.m in Sources */ = {isa = PBXBuildFile; fileRef = 33220B9F1D009BAB00F3C3DA /* MDWampTransportdelegateMock.m */; }; + 33220BB31D009BAB00F3C3DA /* MDWampTransportMock.m in Sources */ = {isa = PBXBuildFile; fileRef = 33220BA11D009BAB00F3C3DA /* MDWampTransportMock.m */; }; + 33220BB61D009BAB00F3C3DA /* XCTAsyncTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 33220BA41D009BAB00F3C3DA /* XCTAsyncTestCase.m */; }; + 336F57451CFF7A1600811E8B /* MDWamp.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B381CFF77C7003FCFC5 /* MDWamp.h */; }; + 336F57461CFF7A1A00811E8B /* MDWamp.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B391CFF77C7003FCFC5 /* MDWamp.m */; }; + 336F57471CFF7A1A00811E8B /* MDWampClientConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B3A1CFF77C7003FCFC5 /* MDWampClientConfig.h */; }; + 336F57481CFF7A1A00811E8B /* MDWampClientConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B3B1CFF77C7003FCFC5 /* MDWampClientConfig.m */; }; + 336F57491CFF7A1A00811E8B /* MDWampClientDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B3C1CFF77C7003FCFC5 /* MDWampClientDelegate.h */; }; + 336F574A1CFF7A1A00811E8B /* MDWampConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B3D1CFF77C7003FCFC5 /* MDWampConstants.h */; }; + 336F574B1CFF7A1A00811E8B /* MDWampConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B3E1CFF77C7003FCFC5 /* MDWampConstants.m */; }; + 336F574C1CFF7A2300811E8B /* MDWampAbort.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B401CFF77C7003FCFC5 /* MDWampAbort.h */; }; + 336F574D1CFF7A2300811E8B /* MDWampAbort.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B411CFF77C7003FCFC5 /* MDWampAbort.m */; }; + 336F574E1CFF7A2300811E8B /* MDWampAuthenticate.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B421CFF77C7003FCFC5 /* MDWampAuthenticate.h */; }; + 336F574F1CFF7A2300811E8B /* MDWampAuthenticate.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B431CFF77C7003FCFC5 /* MDWampAuthenticate.m */; }; + 336F57501CFF7A2300811E8B /* MDWampCall.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B441CFF77C7003FCFC5 /* MDWampCall.h */; }; + 336F57511CFF7A2300811E8B /* MDWampCall.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B451CFF77C7003FCFC5 /* MDWampCall.m */; }; + 336F57521CFF7A2300811E8B /* MDWampCancel.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B461CFF77C7003FCFC5 /* MDWampCancel.h */; }; + 336F57531CFF7A2300811E8B /* MDWampCancel.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B471CFF77C7003FCFC5 /* MDWampCancel.m */; }; + 336F57541CFF7A2300811E8B /* MDWampChallenge.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B481CFF77C7003FCFC5 /* MDWampChallenge.h */; }; + 336F57551CFF7A2300811E8B /* MDWampChallenge.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B491CFF77C7003FCFC5 /* MDWampChallenge.m */; }; + 336F57561CFF7A2300811E8B /* MDWampError.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B4A1CFF77C7003FCFC5 /* MDWampError.h */; }; + 336F57571CFF7A2300811E8B /* MDWampError.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B4B1CFF77C7003FCFC5 /* MDWampError.m */; }; + 336F57581CFF7A2300811E8B /* MDWampEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B4C1CFF77C7003FCFC5 /* MDWampEvent.h */; }; + 336F57591CFF7A2300811E8B /* MDWampEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B4D1CFF77C7003FCFC5 /* MDWampEvent.m */; }; + 336F575A1CFF7A2300811E8B /* MDWampGoodbye.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B4E1CFF77C7003FCFC5 /* MDWampGoodbye.h */; }; + 336F575B1CFF7A2300811E8B /* MDWampGoodbye.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B4F1CFF77C7003FCFC5 /* MDWampGoodbye.m */; }; + 336F575C1CFF7A2300811E8B /* MDWampHello.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B501CFF77C7003FCFC5 /* MDWampHello.h */; }; + 336F575D1CFF7A2300811E8B /* MDWampHello.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B511CFF77C7003FCFC5 /* MDWampHello.m */; }; + 336F575E1CFF7A2300811E8B /* MDWampInterrupt.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B521CFF77C7003FCFC5 /* MDWampInterrupt.h */; }; + 336F575F1CFF7A2300811E8B /* MDWampInterrupt.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B531CFF77C7003FCFC5 /* MDWampInterrupt.m */; }; + 336F57601CFF7A2300811E8B /* MDWampInvocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B541CFF77C7003FCFC5 /* MDWampInvocation.h */; }; + 336F57611CFF7A2300811E8B /* MDWampInvocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B551CFF77C7003FCFC5 /* MDWampInvocation.m */; }; + 336F57621CFF7A2300811E8B /* MDWampMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B561CFF77C7003FCFC5 /* MDWampMessage.h */; }; + 336F57631CFF7A2300811E8B /* MDWampMessageFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B571CFF77C7003FCFC5 /* MDWampMessageFactory.h */; }; + 336F57641CFF7A2300811E8B /* MDWampMessageFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B581CFF77C7003FCFC5 /* MDWampMessageFactory.m */; }; + 336F57651CFF7A2300811E8B /* MDWampMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B591CFF77C7003FCFC5 /* MDWampMessages.h */; }; + 336F57661CFF7A2300811E8B /* MDWampPublish.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B5A1CFF77C7003FCFC5 /* MDWampPublish.h */; }; + 336F57671CFF7A2300811E8B /* MDWampPublish.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B5B1CFF77C7003FCFC5 /* MDWampPublish.m */; }; + 336F57681CFF7A2300811E8B /* MDWampPublished.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B5C1CFF77C7003FCFC5 /* MDWampPublished.h */; }; + 336F57691CFF7A2300811E8B /* MDWampPublished.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B5D1CFF77C7003FCFC5 /* MDWampPublished.m */; }; + 336F576A1CFF7A2300811E8B /* MDWampRegister.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B5E1CFF77C7003FCFC5 /* MDWampRegister.h */; }; + 336F576B1CFF7A2300811E8B /* MDWampRegister.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B5F1CFF77C7003FCFC5 /* MDWampRegister.m */; }; + 336F576C1CFF7A2300811E8B /* MDWampRegistered.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B601CFF77C7003FCFC5 /* MDWampRegistered.h */; }; + 336F576D1CFF7A2300811E8B /* MDWampRegistered.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B611CFF77C7003FCFC5 /* MDWampRegistered.m */; }; + 336F576E1CFF7A2300811E8B /* MDWampResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B621CFF77C7003FCFC5 /* MDWampResult.h */; }; + 336F576F1CFF7A2300811E8B /* MDWampResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B631CFF77C7003FCFC5 /* MDWampResult.m */; }; + 336F57701CFF7A2300811E8B /* MDWampSubscribe.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B641CFF77C7003FCFC5 /* MDWampSubscribe.h */; }; + 336F57711CFF7A2300811E8B /* MDWampSubscribe.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B651CFF77C7003FCFC5 /* MDWampSubscribe.m */; }; + 336F57721CFF7A2300811E8B /* MDWampSubscribed.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B661CFF77C7003FCFC5 /* MDWampSubscribed.h */; }; + 336F57731CFF7A2300811E8B /* MDWampSubscribed.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B671CFF77C7003FCFC5 /* MDWampSubscribed.m */; }; + 336F57741CFF7A2300811E8B /* MDWampUnregister.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B681CFF77C7003FCFC5 /* MDWampUnregister.h */; }; + 336F57751CFF7A2300811E8B /* MDWampUnregister.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B691CFF77C7003FCFC5 /* MDWampUnregister.m */; }; + 336F57761CFF7A2300811E8B /* MDWampUnregistered.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B6A1CFF77C7003FCFC5 /* MDWampUnregistered.h */; }; + 336F57771CFF7A2300811E8B /* MDWampUnregistered.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B6B1CFF77C7003FCFC5 /* MDWampUnregistered.m */; }; + 336F57781CFF7A2300811E8B /* MDWampUnsubscribe.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B6C1CFF77C7003FCFC5 /* MDWampUnsubscribe.h */; }; + 336F57791CFF7A2300811E8B /* MDWampUnsubscribe.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B6D1CFF77C7003FCFC5 /* MDWampUnsubscribe.m */; }; + 336F577A1CFF7A2300811E8B /* MDWampUnsubscribed.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B6E1CFF77C7003FCFC5 /* MDWampUnsubscribed.h */; }; + 336F577B1CFF7A2300811E8B /* MDWampUnsubscribed.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B6F1CFF77C7003FCFC5 /* MDWampUnsubscribed.m */; }; + 336F577C1CFF7A2300811E8B /* MDWampWelcome.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B701CFF77C7003FCFC5 /* MDWampWelcome.h */; }; + 336F577D1CFF7A2300811E8B /* MDWampWelcome.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B711CFF77C7003FCFC5 /* MDWampWelcome.m */; }; + 336F577E1CFF7A2300811E8B /* MDWampYield.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B721CFF77C7003FCFC5 /* MDWampYield.h */; }; + 336F577F1CFF7A2300811E8B /* MDWampYield.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B731CFF77C7003FCFC5 /* MDWampYield.m */; }; + 336F57801CFF7A2C00811E8B /* MDWampSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B751CFF77C7003FCFC5 /* MDWampSerialization.h */; }; + 336F57811CFF7A2C00811E8B /* MDWampSerializationJSON.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B761CFF77C7003FCFC5 /* MDWampSerializationJSON.h */; }; + 336F57821CFF7A2C00811E8B /* MDWampSerializationJSON.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B771CFF77C7003FCFC5 /* MDWampSerializationJSON.m */; }; + 336F57831CFF7A2C00811E8B /* MDWampSerializationMsgpack.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B781CFF77C7003FCFC5 /* MDWampSerializationMsgpack.h */; }; + 336F57841CFF7A2C00811E8B /* MDWampSerializationMsgpack.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B791CFF77C7003FCFC5 /* MDWampSerializationMsgpack.m */; }; + 336F57851CFF7A2C00811E8B /* MDWampSerializations.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B7A1CFF77C7003FCFC5 /* MDWampSerializations.h */; }; + 336F57861CFF7A3100811E8B /* MDWampTransport.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B7C1CFF77C7003FCFC5 /* MDWampTransport.h */; }; + 336F57871CFF7A3100811E8B /* MDWampTransportDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B7D1CFF77C7003FCFC5 /* MDWampTransportDelegate.h */; }; + 336F57881CFF7A3100811E8B /* MDWampTransportRawSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B7E1CFF77C7003FCFC5 /* MDWampTransportRawSocket.h */; }; + 336F57891CFF7A3100811E8B /* MDWampTransportRawSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B7F1CFF77C7003FCFC5 /* MDWampTransportRawSocket.m */; }; + 336F578A1CFF7A3100811E8B /* MDWampTransports.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B801CFF77C7003FCFC5 /* MDWampTransports.h */; }; + 336F578B1CFF7A3100811E8B /* MDWampTransportWebSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 33133B811CFF77C7003FCFC5 /* MDWampTransportWebSocket.h */; }; + 336F578C1CFF7A3100811E8B /* MDWampTransportWebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 33133B821CFF77C7003FCFC5 /* MDWampTransportWebSocket.m */; }; + 3383BD341D00A57E00A93869 /* Fastfile in Resources */ = {isa = PBXBuildFile; fileRef = 3383BD331D00A57E00A93869 /* Fastfile */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 7604D722185B499E0087773E /* PBXContainerItemProxy */ = { + 33133AE91CFF7598003FCFC5 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; - containerPortal = 7604D6FE185B499D0087773E /* Project object */; + containerPortal = 33133AD21CFF751A003FCFC5 /* Project object */; proxyType = 1; - remoteGlobalIDString = 7604D706185B499D0087773E; - remoteInfo = MDWamp; - }; - 7657A3B5195F594800F58BB4 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 7604D6FE185B499D0087773E /* Project object */; - proxyType = 1; - remoteGlobalIDString = 7604D765185B6B880087773E; - remoteInfo = libMDWamp; + remoteGlobalIDString = 33133ADC1CFF7598003FCFC5; + remoteInfo = "MDWamp iOS"; }; /* End PBXContainerItemProxy section */ -/* Begin PBXCopyFilesBuildPhase section */ - 7604D764185B6B880087773E /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = "include/$(PRODUCT_NAME)"; - dstSubfolderSpec = 16; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 7646E534185BCEAB004990DD /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 7; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 7646E536185BCF08004990DD /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 7; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - /* Begin PBXFileReference section */ - 7604D707185B499D0087773E /* MDWamp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MDWamp.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 7604D70A185B499D0087773E /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; - 7604D71E185B499D0087773E /* MDWampTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MDWampTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 7604D71F185B499D0087773E /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; - 7604D73A185B4A7B0087773E /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 7604D766185B6B880087773E /* libMDWamp.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libMDWamp.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 760DA6FA18EB0A9E006EC89C /* MDWampMessageFactoryTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampMessageFactoryTests.m; sourceTree = ""; }; - 760DA6FC18EB0E7D006EC89C /* MDWampMessagesTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampMessagesTests.m; sourceTree = ""; }; - 7619E69918CF8E9F00B0209D /* MDWampTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampTests.m; sourceTree = ""; }; - 762A51DE195CB2B000A3B344 /* READMEv1.md */ = {isa = PBXFileReference; lastKnownFileType = text; path = READMEv1.md; sourceTree = ""; }; - 762A51DF195CB2B000A3B344 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = text; path = README.md; sourceTree = ""; }; - 762A51E1195CB2B000A3B344 /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; - 76414F511950C8E900788300 /* MDWampTransportdelegateMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampTransportdelegateMock.h; sourceTree = ""; }; - 76414F521950C8E900788300 /* MDWampTransportdelegateMock.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampTransportdelegateMock.m; sourceTree = ""; }; - 764374A1194E238D000F29A8 /* MDStackTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDStackTest.m; sourceTree = ""; }; - 764F059D1969AE7B00EB1A8A /* MDWampTransportRawSocketTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampTransportRawSocketTests.m; sourceTree = ""; }; - 764F05A31969B26D00EB1A8A /* libssl.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libssl.dylib; path = usr/lib/libssl.dylib; sourceTree = SDKROOT; }; - 764F05A51969B2A700EB1A8A /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; - 7657671119E6850F0008967E /* MDWamp.podspec.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = MDWamp.podspec.json; sourceTree = ""; }; - 765BAF8F19E722C800EC580D /* cmp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cmp.c; path = MPMessagePack/cmp.c; sourceTree = ""; }; - 765BAF9019E722C800EC580D /* cmp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cmp.h; path = MPMessagePack/cmp.h; sourceTree = ""; }; - 765BAF9119E722C800EC580D /* MPMessagePack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MPMessagePack.h; path = MPMessagePack/MPMessagePack.h; sourceTree = ""; }; - 765BAF9219E722C800EC580D /* MPMessagePackReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MPMessagePackReader.h; path = MPMessagePack/MPMessagePackReader.h; sourceTree = ""; }; - 765BAF9319E722C800EC580D /* MPMessagePackReader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MPMessagePackReader.m; path = MPMessagePack/MPMessagePackReader.m; sourceTree = ""; }; - 765BAF9419E722C800EC580D /* MPMessagePackWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MPMessagePackWriter.h; path = MPMessagePack/MPMessagePackWriter.h; sourceTree = ""; }; - 765BAF9519E722C800EC580D /* MPMessagePackWriter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MPMessagePackWriter.m; path = MPMessagePack/MPMessagePackWriter.m; sourceTree = ""; }; - 765BAF9619E722C800EC580D /* MPOrderedDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MPOrderedDictionary.h; path = MPMessagePack/MPOrderedDictionary.h; sourceTree = ""; }; - 765BAF9719E722C800EC580D /* MPOrderedDictionary.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MPOrderedDictionary.m; path = MPMessagePack/MPOrderedDictionary.m; sourceTree = ""; }; - 765BAF9819E722C800EC580D /* NSArray+MPMessagePack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSArray+MPMessagePack.h"; path = "MPMessagePack/NSArray+MPMessagePack.h"; sourceTree = ""; }; - 765BAF9919E722C800EC580D /* NSArray+MPMessagePack.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSArray+MPMessagePack.m"; path = "MPMessagePack/NSArray+MPMessagePack.m"; sourceTree = ""; }; - 765BAF9A19E722C800EC580D /* NSDictionary+MPMessagePack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSDictionary+MPMessagePack.h"; path = "MPMessagePack/NSDictionary+MPMessagePack.h"; sourceTree = ""; }; - 765BAF9B19E722C800EC580D /* NSDictionary+MPMessagePack.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSDictionary+MPMessagePack.m"; path = "MPMessagePack/NSDictionary+MPMessagePack.m"; sourceTree = ""; }; - 766E10E619E6B4390083173B /* MDWampClientConfigTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampClientConfigTests.m; sourceTree = ""; }; - 766E10EC19E6C1E00083173B /* MDWampAdvancedTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampAdvancedTests.m; sourceTree = ""; }; - 7673B7AE1A0FDA3F0072CDD3 /* MDWampTransportWebSocketTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampTransportWebSocketTests.m; sourceTree = ""; }; - 7691AA151A0D168C007FE84C /* config.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; name = config.json; path = .crossbar/config.json; sourceTree = ""; }; - 7698B1B31952278E0045D400 /* MDWampSerializations.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampSerializations.m; sourceTree = ""; }; - 7698B1BF19522AF80045D400 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 7698B1F619522D1C0045D400 /* libicucore.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libicucore.dylib; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/usr/lib/libicucore.dylib; sourceTree = DEVELOPER_DIR; }; - 7698B1F819522D2B0045D400 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/System/Library/Frameworks/CFNetwork.framework; sourceTree = DEVELOPER_DIR; }; - 7698B1FA19522D310045D400 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/System/Library/Frameworks/Security.framework; sourceTree = DEVELOPER_DIR; }; - 76A34EEF195DED5400233B76 /* MDWampDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MDWampDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 76A34EF2195DED5400233B76 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; - 76A34EF6195DED5400233B76 /* MDWampDemo-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "MDWampDemo-Info.plist"; sourceTree = ""; }; - 76A34EFC195DED5400233B76 /* MDWampDemo-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MDWampDemo-Prefix.pch"; sourceTree = ""; }; - 76AE15591A0C21C50041016F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 76AE155A1A0C21C50041016F /* broken_link-32.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "broken_link-32.png"; sourceTree = ""; }; - 76AE155B1A0C21C50041016F /* collaboration.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = collaboration.png; sourceTree = ""; }; - 76AE155C1A0C21C50041016F /* collaboration@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "collaboration@2x.png"; sourceTree = ""; }; - 76AE155E1A0C21C50041016F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 76AE155F1A0C21C50041016F /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; - 76AE15601A0C21C50041016F /* link-32.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "link-32.png"; sourceTree = ""; }; - 76AE15611A0C21C50041016F /* online-32.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "online-32.png"; sourceTree = ""; }; - 76AE15621A0C21C50041016F /* online-32@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "online-32@2x.png"; sourceTree = ""; }; - 76AE15631A0C21C50041016F /* run_command.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = run_command.png; sourceTree = ""; }; - 76AE15641A0C21C50041016F /* run_command@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "run_command@2x.png"; sourceTree = ""; }; - 76AE15651A0C21C50041016F /* save_as.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = save_as.png; sourceTree = ""; }; - 76AE15661A0C21C50041016F /* save_as@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "save_as@2x.png"; sourceTree = ""; }; - 76AE15681A0C21C50041016F /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 76AE15691A0C21C50041016F /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 76AE156A1A0C21C50041016F /* CallRPCViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallRPCViewController.h; sourceTree = ""; }; - 76AE156B1A0C21C50041016F /* CallRPCViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CallRPCViewController.m; sourceTree = ""; }; - 76AE156C1A0C21C50041016F /* ChatStartViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChatStartViewController.h; sourceTree = ""; }; - 76AE156D1A0C21C50041016F /* ChatStartViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChatStartViewController.m; sourceTree = ""; }; - 76AE156E1A0C21C50041016F /* ChatViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChatViewController.h; sourceTree = ""; }; - 76AE156F1A0C21C50041016F /* ChatViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChatViewController.m; sourceTree = ""; }; - 76AE15701A0C21C50041016F /* ConnectViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConnectViewController.h; sourceTree = ""; }; - 76AE15711A0C21C50041016F /* ConnectViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ConnectViewController.m; sourceTree = ""; }; - 76AE15721A0C21C50041016F /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 76AE15731A0C21C50041016F /* RegisterRPCViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterRPCViewController.h; sourceTree = ""; }; - 76AE15741A0C21C50041016F /* RegisterRPCViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RegisterRPCViewController.m; sourceTree = ""; }; - 76AE15911A0C23130041016F /* SRWebSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SRWebSocket.h; path = External/SocketRocket/SocketRocket/SRWebSocket.h; sourceTree = ""; }; - 76AE15921A0C23130041016F /* SRWebSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SRWebSocket.m; path = External/SocketRocket/SocketRocket/SRWebSocket.m; sourceTree = ""; }; - 76AE15981A0C24150041016F /* NSMutableArray+MDStack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableArray+MDStack.h"; sourceTree = ""; }; - 76AE15991A0C24150041016F /* NSMutableArray+MDStack.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMutableArray+MDStack.m"; sourceTree = ""; }; - 76AE159A1A0C24150041016F /* NSString+MDString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+MDString.h"; sourceTree = ""; }; - 76AE159B1A0C24150041016F /* NSString+MDString.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+MDString.m"; sourceTree = ""; }; - 76AE159C1A0C24150041016F /* MDWamp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWamp.h; sourceTree = ""; }; - 76AE159D1A0C24150041016F /* MDWamp.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWamp.m; sourceTree = ""; }; - 76AE159E1A0C24150041016F /* MDWampClientConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampClientConfig.h; sourceTree = ""; }; - 76AE159F1A0C24150041016F /* MDWampClientConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampClientConfig.m; sourceTree = ""; }; - 76AE15A01A0C24150041016F /* MDWampClientDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampClientDelegate.h; sourceTree = ""; }; - 76AE15A11A0C24150041016F /* MDWampConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampConstants.h; sourceTree = ""; }; - 76AE15A21A0C24150041016F /* MDWampConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampConstants.m; sourceTree = ""; }; - 76AE15A41A0C24150041016F /* MDWampAbort.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampAbort.h; sourceTree = ""; }; - 76AE15A51A0C24150041016F /* MDWampAbort.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampAbort.m; sourceTree = ""; }; - 76AE15A61A0C24150041016F /* MDWampAuthenticate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampAuthenticate.h; sourceTree = ""; }; - 76AE15A71A0C24150041016F /* MDWampAuthenticate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampAuthenticate.m; sourceTree = ""; }; - 76AE15A81A0C24150041016F /* MDWampCall.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampCall.h; sourceTree = ""; }; - 76AE15A91A0C24150041016F /* MDWampCall.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampCall.m; sourceTree = ""; }; - 76AE15AA1A0C24150041016F /* MDWampCancel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampCancel.h; sourceTree = ""; }; - 76AE15AB1A0C24150041016F /* MDWampCancel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampCancel.m; sourceTree = ""; }; - 76AE15AC1A0C24150041016F /* MDWampChallenge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampChallenge.h; sourceTree = ""; }; - 76AE15AD1A0C24150041016F /* MDWampChallenge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampChallenge.m; sourceTree = ""; }; - 76AE15AE1A0C24150041016F /* MDWampError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampError.h; sourceTree = ""; }; - 76AE15AF1A0C24150041016F /* MDWampError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampError.m; sourceTree = ""; }; - 76AE15B01A0C24150041016F /* MDWampEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampEvent.h; sourceTree = ""; }; - 76AE15B11A0C24150041016F /* MDWampEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampEvent.m; sourceTree = ""; }; - 76AE15B21A0C24150041016F /* MDWampGoodbye.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampGoodbye.h; sourceTree = ""; }; - 76AE15B31A0C24150041016F /* MDWampGoodbye.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampGoodbye.m; sourceTree = ""; }; - 76AE15B61A0C24150041016F /* MDWampHello.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampHello.h; sourceTree = ""; }; - 76AE15B71A0C24150041016F /* MDWampHello.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampHello.m; sourceTree = ""; }; - 76AE15B81A0C24150041016F /* MDWampInterrupt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampInterrupt.h; sourceTree = ""; }; - 76AE15B91A0C24150041016F /* MDWampInterrupt.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampInterrupt.m; sourceTree = ""; }; - 76AE15BA1A0C24150041016F /* MDWampInvocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampInvocation.h; sourceTree = ""; }; - 76AE15BB1A0C24150041016F /* MDWampInvocation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampInvocation.m; sourceTree = ""; }; - 76AE15BC1A0C24150041016F /* MDWampMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampMessage.h; sourceTree = ""; }; - 76AE15BD1A0C24150041016F /* MDWampMessageFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampMessageFactory.h; sourceTree = ""; }; - 76AE15BE1A0C24150041016F /* MDWampMessageFactory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampMessageFactory.m; sourceTree = ""; }; - 76AE15BF1A0C24150041016F /* MDWampMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampMessages.h; sourceTree = ""; }; - 76AE15C01A0C24150041016F /* MDWampPublish.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampPublish.h; sourceTree = ""; }; - 76AE15C11A0C24150041016F /* MDWampPublish.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampPublish.m; sourceTree = ""; }; - 76AE15C21A0C24150041016F /* MDWampPublished.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampPublished.h; sourceTree = ""; }; - 76AE15C31A0C24150041016F /* MDWampPublished.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampPublished.m; sourceTree = ""; }; - 76AE15C41A0C24150041016F /* MDWampRegister.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampRegister.h; sourceTree = ""; }; - 76AE15C51A0C24150041016F /* MDWampRegister.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampRegister.m; sourceTree = ""; }; - 76AE15C61A0C24150041016F /* MDWampRegistered.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampRegistered.h; sourceTree = ""; }; - 76AE15C71A0C24150041016F /* MDWampRegistered.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampRegistered.m; sourceTree = ""; }; - 76AE15C81A0C24150041016F /* MDWampResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampResult.h; sourceTree = ""; }; - 76AE15C91A0C24150041016F /* MDWampResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampResult.m; sourceTree = ""; }; - 76AE15CA1A0C24150041016F /* MDWampSubscribe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampSubscribe.h; sourceTree = ""; }; - 76AE15CB1A0C24150041016F /* MDWampSubscribe.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampSubscribe.m; sourceTree = ""; }; - 76AE15CC1A0C24150041016F /* MDWampSubscribed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampSubscribed.h; sourceTree = ""; }; - 76AE15CD1A0C24150041016F /* MDWampSubscribed.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampSubscribed.m; sourceTree = ""; }; - 76AE15CE1A0C24150041016F /* MDWampUnregister.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampUnregister.h; sourceTree = ""; }; - 76AE15CF1A0C24150041016F /* MDWampUnregister.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampUnregister.m; sourceTree = ""; }; - 76AE15D01A0C24150041016F /* MDWampUnregistered.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampUnregistered.h; sourceTree = ""; }; - 76AE15D11A0C24150041016F /* MDWampUnregistered.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampUnregistered.m; sourceTree = ""; }; - 76AE15D21A0C24150041016F /* MDWampUnsubscribe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampUnsubscribe.h; sourceTree = ""; }; - 76AE15D31A0C24150041016F /* MDWampUnsubscribe.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampUnsubscribe.m; sourceTree = ""; }; - 76AE15D41A0C24150041016F /* MDWampUnsubscribed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampUnsubscribed.h; sourceTree = ""; }; - 76AE15D51A0C24150041016F /* MDWampUnsubscribed.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampUnsubscribed.m; sourceTree = ""; }; - 76AE15D61A0C24150041016F /* MDWampWelcome.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampWelcome.h; sourceTree = ""; }; - 76AE15D71A0C24150041016F /* MDWampWelcome.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampWelcome.m; sourceTree = ""; }; - 76AE15D81A0C24150041016F /* MDWampYield.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampYield.h; sourceTree = ""; }; - 76AE15D91A0C24150041016F /* MDWampYield.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampYield.m; sourceTree = ""; }; - 76AE15DB1A0C24150041016F /* MDWampSerialization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampSerialization.h; sourceTree = ""; }; - 76AE15DC1A0C24150041016F /* MDWampSerializationJSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampSerializationJSON.h; sourceTree = ""; }; - 76AE15DD1A0C24150041016F /* MDWampSerializationJSON.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampSerializationJSON.m; sourceTree = ""; }; - 76AE15DE1A0C24150041016F /* MDWampSerializationMsgpack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampSerializationMsgpack.h; sourceTree = ""; }; - 76AE15DF1A0C24150041016F /* MDWampSerializationMsgpack.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampSerializationMsgpack.m; sourceTree = ""; }; - 76AE15E01A0C24150041016F /* MDWampSerializations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampSerializations.h; sourceTree = ""; }; - 76AE15E21A0C24150041016F /* MDWampTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampTransport.h; sourceTree = ""; }; - 76AE15E31A0C24150041016F /* MDWampTransportDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampTransportDelegate.h; sourceTree = ""; }; - 76AE15E41A0C24150041016F /* MDWampTransportRawSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampTransportRawSocket.h; sourceTree = ""; }; - 76AE15E51A0C24150041016F /* MDWampTransportRawSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampTransportRawSocket.m; sourceTree = ""; }; - 76AE15E61A0C24150041016F /* MDWampTransports.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampTransports.h; sourceTree = ""; }; - 76AE15E71A0C24150041016F /* MDWampTransportWebSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampTransportWebSocket.h; sourceTree = ""; }; - 76AE15E81A0C24150041016F /* MDWampTransportWebSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampTransportWebSocket.m; sourceTree = ""; }; - 76AE15E91A0C24150041016F /* MDWamp-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MDWamp-Prefix.pch"; sourceTree = ""; }; - 76AE15EA1A0C24150041016F /* MDWamp-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "MDWamp-Info.plist"; sourceTree = ""; }; - 76AE165F1A0C29940041016F /* XCTAsyncTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XCTAsyncTestCase.h; path = "External/xctest-additions/XCTAsyncTestCase.h"; sourceTree = ""; }; - 76AE16601A0C29940041016F /* XCTAsyncTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = XCTAsyncTestCase.m; path = "External/xctest-additions/XCTAsyncTestCase.m"; sourceTree = ""; }; - 76CCC6EF185BD1F10056AB98 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 76CCC6F0185BD1F10056AB98 /* MDWampClientDelegateMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampClientDelegateMock.h; sourceTree = ""; }; - 76CCC6F1185BD1F10056AB98 /* MDWampClientDelegateMock.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampClientDelegateMock.m; sourceTree = ""; }; - 76CCC6F3185BD1F10056AB98 /* MDWampTestIncludes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampTestIncludes.h; sourceTree = ""; }; - 76CCC6F4185BD1F10056AB98 /* MDWampTests-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "MDWampTests-Info.plist"; sourceTree = ""; }; - 76EF81D218D1043700DFB13B /* MDWampTransportMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampTransportMock.h; sourceTree = ""; }; - 76EF81D318D1043700DFB13B /* MDWampTransportMock.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampTransportMock.m; sourceTree = ""; }; - 76EF81D918D1087000DFB13B /* MDWampSerializationMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampSerializationMock.h; sourceTree = ""; }; - 76EF81DA18D1087000DFB13B /* MDWampSerializationMock.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampSerializationMock.m; sourceTree = ""; }; - 76F5970D196894A60002773C /* GCDAsyncSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GCDAsyncSocket.h; path = External/CocoaAsyncSocket/Source/GCD/GCDAsyncSocket.h; sourceTree = ""; }; - 76F5970E196894A60002773C /* GCDAsyncSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GCDAsyncSocket.m; path = External/CocoaAsyncSocket/Source/GCD/GCDAsyncSocket.m; sourceTree = ""; }; + 33133ADD1CFF7598003FCFC5 /* MDWamp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MDWamp.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 33133AE71CFF7598003FCFC5 /* MDWamp iOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "MDWamp iOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + 33133AFA1CFF75B7003FCFC5 /* MDWamp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MDWamp.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 33133B061CFF7657003FCFC5 /* MDWamp Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "MDWamp Demo.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 33133B091CFF7657003FCFC5 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 33133B0B1CFF7657003FCFC5 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 33133B0C1CFF7657003FCFC5 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 33133B0E1CFF7657003FCFC5 /* FirstViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FirstViewController.h; sourceTree = ""; }; + 33133B0F1CFF7657003FCFC5 /* FirstViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FirstViewController.m; sourceTree = ""; }; + 33133B111CFF7657003FCFC5 /* SecondViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SecondViewController.h; sourceTree = ""; }; + 33133B121CFF7657003FCFC5 /* SecondViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SecondViewController.m; sourceTree = ""; }; + 33133B151CFF7657003FCFC5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 33133B171CFF7657003FCFC5 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 33133B1A1CFF7657003FCFC5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 33133B1C1CFF7657003FCFC5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 33133B301CFF77C7003FCFC5 /* NSMutableArray+MDStack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableArray+MDStack.h"; sourceTree = ""; }; + 33133B311CFF77C7003FCFC5 /* NSMutableArray+MDStack.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMutableArray+MDStack.m"; sourceTree = ""; }; + 33133B321CFF77C7003FCFC5 /* NSString+MDString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+MDString.h"; sourceTree = ""; }; + 33133B331CFF77C7003FCFC5 /* NSString+MDString.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+MDString.m"; sourceTree = ""; }; + 33133B341CFF77C7003FCFC5 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 33133B351CFF77C7003FCFC5 /* Info-iOS.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Info-iOS.plist"; sourceTree = ""; }; + 33133B361CFF77C7003FCFC5 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 33133B371CFF77C7003FCFC5 /* Info-OSX.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Info-OSX.plist"; sourceTree = ""; }; + 33133B381CFF77C7003FCFC5 /* MDWamp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWamp.h; sourceTree = ""; }; + 33133B391CFF77C7003FCFC5 /* MDWamp.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWamp.m; sourceTree = ""; }; + 33133B3A1CFF77C7003FCFC5 /* MDWampClientConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampClientConfig.h; sourceTree = ""; }; + 33133B3B1CFF77C7003FCFC5 /* MDWampClientConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampClientConfig.m; sourceTree = ""; }; + 33133B3C1CFF77C7003FCFC5 /* MDWampClientDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampClientDelegate.h; sourceTree = ""; }; + 33133B3D1CFF77C7003FCFC5 /* MDWampConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampConstants.h; sourceTree = ""; }; + 33133B3E1CFF77C7003FCFC5 /* MDWampConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampConstants.m; sourceTree = ""; }; + 33133B401CFF77C7003FCFC5 /* MDWampAbort.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampAbort.h; sourceTree = ""; }; + 33133B411CFF77C7003FCFC5 /* MDWampAbort.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampAbort.m; sourceTree = ""; }; + 33133B421CFF77C7003FCFC5 /* MDWampAuthenticate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampAuthenticate.h; sourceTree = ""; }; + 33133B431CFF77C7003FCFC5 /* MDWampAuthenticate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampAuthenticate.m; sourceTree = ""; }; + 33133B441CFF77C7003FCFC5 /* MDWampCall.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampCall.h; sourceTree = ""; }; + 33133B451CFF77C7003FCFC5 /* MDWampCall.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampCall.m; sourceTree = ""; }; + 33133B461CFF77C7003FCFC5 /* MDWampCancel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampCancel.h; sourceTree = ""; }; + 33133B471CFF77C7003FCFC5 /* MDWampCancel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampCancel.m; sourceTree = ""; }; + 33133B481CFF77C7003FCFC5 /* MDWampChallenge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampChallenge.h; sourceTree = ""; }; + 33133B491CFF77C7003FCFC5 /* MDWampChallenge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampChallenge.m; sourceTree = ""; }; + 33133B4A1CFF77C7003FCFC5 /* MDWampError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampError.h; sourceTree = ""; }; + 33133B4B1CFF77C7003FCFC5 /* MDWampError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampError.m; sourceTree = ""; }; + 33133B4C1CFF77C7003FCFC5 /* MDWampEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampEvent.h; sourceTree = ""; }; + 33133B4D1CFF77C7003FCFC5 /* MDWampEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampEvent.m; sourceTree = ""; }; + 33133B4E1CFF77C7003FCFC5 /* MDWampGoodbye.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampGoodbye.h; sourceTree = ""; }; + 33133B4F1CFF77C7003FCFC5 /* MDWampGoodbye.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampGoodbye.m; sourceTree = ""; }; + 33133B501CFF77C7003FCFC5 /* MDWampHello.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampHello.h; sourceTree = ""; }; + 33133B511CFF77C7003FCFC5 /* MDWampHello.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampHello.m; sourceTree = ""; }; + 33133B521CFF77C7003FCFC5 /* MDWampInterrupt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampInterrupt.h; sourceTree = ""; }; + 33133B531CFF77C7003FCFC5 /* MDWampInterrupt.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampInterrupt.m; sourceTree = ""; }; + 33133B541CFF77C7003FCFC5 /* MDWampInvocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampInvocation.h; sourceTree = ""; }; + 33133B551CFF77C7003FCFC5 /* MDWampInvocation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampInvocation.m; sourceTree = ""; }; + 33133B561CFF77C7003FCFC5 /* MDWampMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampMessage.h; sourceTree = ""; }; + 33133B571CFF77C7003FCFC5 /* MDWampMessageFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampMessageFactory.h; sourceTree = ""; }; + 33133B581CFF77C7003FCFC5 /* MDWampMessageFactory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampMessageFactory.m; sourceTree = ""; }; + 33133B591CFF77C7003FCFC5 /* MDWampMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampMessages.h; sourceTree = ""; }; + 33133B5A1CFF77C7003FCFC5 /* MDWampPublish.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampPublish.h; sourceTree = ""; }; + 33133B5B1CFF77C7003FCFC5 /* MDWampPublish.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampPublish.m; sourceTree = ""; }; + 33133B5C1CFF77C7003FCFC5 /* MDWampPublished.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampPublished.h; sourceTree = ""; }; + 33133B5D1CFF77C7003FCFC5 /* MDWampPublished.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampPublished.m; sourceTree = ""; }; + 33133B5E1CFF77C7003FCFC5 /* MDWampRegister.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampRegister.h; sourceTree = ""; }; + 33133B5F1CFF77C7003FCFC5 /* MDWampRegister.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampRegister.m; sourceTree = ""; }; + 33133B601CFF77C7003FCFC5 /* MDWampRegistered.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampRegistered.h; sourceTree = ""; }; + 33133B611CFF77C7003FCFC5 /* MDWampRegistered.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampRegistered.m; sourceTree = ""; }; + 33133B621CFF77C7003FCFC5 /* MDWampResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampResult.h; sourceTree = ""; }; + 33133B631CFF77C7003FCFC5 /* MDWampResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampResult.m; sourceTree = ""; }; + 33133B641CFF77C7003FCFC5 /* MDWampSubscribe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampSubscribe.h; sourceTree = ""; }; + 33133B651CFF77C7003FCFC5 /* MDWampSubscribe.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampSubscribe.m; sourceTree = ""; }; + 33133B661CFF77C7003FCFC5 /* MDWampSubscribed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampSubscribed.h; sourceTree = ""; }; + 33133B671CFF77C7003FCFC5 /* MDWampSubscribed.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampSubscribed.m; sourceTree = ""; }; + 33133B681CFF77C7003FCFC5 /* MDWampUnregister.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampUnregister.h; sourceTree = ""; }; + 33133B691CFF77C7003FCFC5 /* MDWampUnregister.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampUnregister.m; sourceTree = ""; }; + 33133B6A1CFF77C7003FCFC5 /* MDWampUnregistered.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampUnregistered.h; sourceTree = ""; }; + 33133B6B1CFF77C7003FCFC5 /* MDWampUnregistered.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampUnregistered.m; sourceTree = ""; }; + 33133B6C1CFF77C7003FCFC5 /* MDWampUnsubscribe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampUnsubscribe.h; sourceTree = ""; }; + 33133B6D1CFF77C7003FCFC5 /* MDWampUnsubscribe.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampUnsubscribe.m; sourceTree = ""; }; + 33133B6E1CFF77C7003FCFC5 /* MDWampUnsubscribed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampUnsubscribed.h; sourceTree = ""; }; + 33133B6F1CFF77C7003FCFC5 /* MDWampUnsubscribed.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampUnsubscribed.m; sourceTree = ""; }; + 33133B701CFF77C7003FCFC5 /* MDWampWelcome.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampWelcome.h; sourceTree = ""; }; + 33133B711CFF77C7003FCFC5 /* MDWampWelcome.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampWelcome.m; sourceTree = ""; }; + 33133B721CFF77C7003FCFC5 /* MDWampYield.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampYield.h; sourceTree = ""; }; + 33133B731CFF77C7003FCFC5 /* MDWampYield.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampYield.m; sourceTree = ""; }; + 33133B751CFF77C7003FCFC5 /* MDWampSerialization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampSerialization.h; sourceTree = ""; }; + 33133B761CFF77C7003FCFC5 /* MDWampSerializationJSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampSerializationJSON.h; sourceTree = ""; }; + 33133B771CFF77C7003FCFC5 /* MDWampSerializationJSON.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampSerializationJSON.m; sourceTree = ""; }; + 33133B781CFF77C7003FCFC5 /* MDWampSerializationMsgpack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampSerializationMsgpack.h; sourceTree = ""; }; + 33133B791CFF77C7003FCFC5 /* MDWampSerializationMsgpack.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampSerializationMsgpack.m; sourceTree = ""; }; + 33133B7A1CFF77C7003FCFC5 /* MDWampSerializations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampSerializations.h; sourceTree = ""; }; + 33133B7C1CFF77C7003FCFC5 /* MDWampTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampTransport.h; sourceTree = ""; }; + 33133B7D1CFF77C7003FCFC5 /* MDWampTransportDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampTransportDelegate.h; sourceTree = ""; }; + 33133B7E1CFF77C7003FCFC5 /* MDWampTransportRawSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampTransportRawSocket.h; sourceTree = ""; }; + 33133B7F1CFF77C7003FCFC5 /* MDWampTransportRawSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampTransportRawSocket.m; sourceTree = ""; }; + 33133B801CFF77C7003FCFC5 /* MDWampTransports.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampTransports.h; sourceTree = ""; }; + 33133B811CFF77C7003FCFC5 /* MDWampTransportWebSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampTransportWebSocket.h; sourceTree = ""; }; + 33133B821CFF77C7003FCFC5 /* MDWampTransportWebSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampTransportWebSocket.m; sourceTree = ""; }; + 33220B5D1CFF99EB00F3C3DA /* GHODictionary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GHODictionary.framework; path = "../Debug-iphonesimulator/GHODictionary.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 33220B5E1CFF99EB00F3C3DA /* MPMessagePack.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MPMessagePack.framework; path = "../Debug-iphonesimulator/MPMessagePack.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 33220B611CFF9A7C00F3C3DA /* CocoaAsyncSocket.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CocoaAsyncSocket.framework; path = "../../../../../../../../devel/MDWamp/Carthage/Checkouts/CocoaAsyncSocket/build/Debug-iphoneos/CocoaAsyncSocket.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 33220B631CFF9B4500F3C3DA /* SocketRocket.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SocketRocket.framework; path = "../../../../../../../../devel/MDWamp/Carthage/Checkouts/SocketRocket/build/Debug-iphoneos/SocketRocket.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 33220B651CFF9C1F00F3C3DA /* CocoaAsyncSocket.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CocoaAsyncSocket.framework; path = ../../../../../../../../devel/MDWamp/Carthage/Checkouts/CocoaAsyncSocket/build/Debug/CocoaAsyncSocket.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 33220B661CFF9C1F00F3C3DA /* GHODictionary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GHODictionary.framework; path = ../../../../../../../../devel/MDWamp/Carthage/Checkouts/GHODictionary/build/Debug/GHODictionary.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 33220B671CFF9C1F00F3C3DA /* MPMessagePack.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MPMessagePack.framework; path = ../../../../../../../../devel/MDWamp/Carthage/Checkouts/MPMessagePack/build/Debug/MPMessagePack.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 33220B681CFF9C1F00F3C3DA /* SocketRocket.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SocketRocket.framework; path = ../../../../../../../../devel/MDWamp/Carthage/Checkouts/SocketRocket/build/Debug/SocketRocket.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 33220B8D1D009BAB00F3C3DA /* MDWampTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampTests.m; sourceTree = ""; }; + 33220B911D009BAB00F3C3DA /* MDStackTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDStackTest.m; sourceTree = ""; }; + 33220B921D009BAB00F3C3DA /* MDWampAdvancedTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampAdvancedTests.m; sourceTree = ""; }; + 33220B931D009BAB00F3C3DA /* MDWampClientConfigTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampClientConfigTests.m; sourceTree = ""; }; + 33220B941D009BAB00F3C3DA /* MDWampClientDelegateMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampClientDelegateMock.h; sourceTree = ""; }; + 33220B951D009BAB00F3C3DA /* MDWampClientDelegateMock.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampClientDelegateMock.m; sourceTree = ""; }; + 33220B961D009BAB00F3C3DA /* MDWampMessageFactoryTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampMessageFactoryTests.m; sourceTree = ""; }; + 33220B971D009BAB00F3C3DA /* MDWampMessagesTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampMessagesTests.m; sourceTree = ""; }; + 33220B991D009BAB00F3C3DA /* MDWampSerializationMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampSerializationMock.h; sourceTree = ""; }; + 33220B9A1D009BAB00F3C3DA /* MDWampSerializationMock.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampSerializationMock.m; sourceTree = ""; }; + 33220B9B1D009BAB00F3C3DA /* MDWampSerializations.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampSerializations.m; sourceTree = ""; }; + 33220B9C1D009BAB00F3C3DA /* MDWampTestIncludes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampTestIncludes.h; sourceTree = ""; }; + 33220B9D1D009BAB00F3C3DA /* MDWampTests-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "MDWampTests-Info.plist"; sourceTree = ""; }; + 33220B9E1D009BAB00F3C3DA /* MDWampTransportdelegateMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampTransportdelegateMock.h; sourceTree = ""; }; + 33220B9F1D009BAB00F3C3DA /* MDWampTransportdelegateMock.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampTransportdelegateMock.m; sourceTree = ""; }; + 33220BA01D009BAB00F3C3DA /* MDWampTransportMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDWampTransportMock.h; sourceTree = ""; }; + 33220BA11D009BAB00F3C3DA /* MDWampTransportMock.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDWampTransportMock.m; sourceTree = ""; }; + 33220BA41D009BAB00F3C3DA /* XCTAsyncTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XCTAsyncTestCase.m; sourceTree = ""; }; + 336F578E1CFF7B2D00811E8B /* MDWamp.podspec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MDWamp.podspec; sourceTree = ""; }; + 336F578F1CFF7B2D00811E8B /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; + 336F57901CFF7B2D00811E8B /* MDWamp.podspec.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = MDWamp.podspec.json; sourceTree = ""; }; + 336F57911CFF7B2D00811E8B /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; + 3383BD311D00A12200A93869 /* XCTAsyncTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XCTAsyncTestCase.h; sourceTree = ""; }; + 3383BD331D00A57E00A93869 /* Fastfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Fastfile; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 7604D703185B499D0087773E /* Frameworks */ = { + 33133AD91CFF7598003FCFC5 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 764F05A61969B2A700EB1A8A /* Security.framework in Frameworks */, - 7604D70B185B499D0087773E /* Cocoa.framework in Frameworks */, + 33220B641CFF9B4500F3C3DA /* SocketRocket.framework in Frameworks */, + 33220B621CFF9A7C00F3C3DA /* CocoaAsyncSocket.framework in Frameworks */, + 33220B5F1CFF99EB00F3C3DA /* GHODictionary.framework in Frameworks */, + 33220B601CFF99EB00F3C3DA /* MPMessagePack.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 7604D71B185B499D0087773E /* Frameworks */ = { + 33133AE41CFF7598003FCFC5 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 7604D721185B499E0087773E /* Cocoa.framework in Frameworks */, - 7604D724185B499E0087773E /* MDWamp.framework in Frameworks */, - 7604D720185B499D0087773E /* XCTest.framework in Frameworks */, + 33133AE81CFF7598003FCFC5 /* MDWamp.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 7604D763185B6B880087773E /* Frameworks */ = { + 33133AF61CFF75B7003FCFC5 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 7604D767185B6B880087773E /* Foundation.framework in Frameworks */, + 33220B691CFF9C1F00F3C3DA /* CocoaAsyncSocket.framework in Frameworks */, + 33220B6A1CFF9C1F00F3C3DA /* GHODictionary.framework in Frameworks */, + 33220B6B1CFF9C1F00F3C3DA /* MPMessagePack.framework in Frameworks */, + 33220B6C1CFF9C1F00F3C3DA /* SocketRocket.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 76A34EEC195DED5400233B76 /* Frameworks */ = { + 33133B031CFF7657003FCFC5 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 7657A3B8195F598200F58BB4 /* libicucore.dylib in Frameworks */, - 7657A3B7195F594D00F58BB4 /* libMDWamp.a in Frameworks */, - 76A34EF1195DED5400233B76 /* CoreGraphics.framework in Frameworks */, - 76A34EF3195DED5400233B76 /* UIKit.framework in Frameworks */, - 76A34EF0195DED5400233B76 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 7604D6FD185B499D0087773E = { + 33133AD11CFF751A003FCFC5 = { isa = PBXGroup; children = ( - 76FD803B185BB3C800D1B5C0 /* MDWamp */, - 76ABE18919688CB500C68911 /* Libraries */, - 76CCC6ED185BD1F10056AB98 /* MDWampTests */, - 76A34EF4195DED5400233B76 /* MDWampDemo */, - 7604D709185B499D0087773E /* Frameworks */, - 7604D708185B499D0087773E /* Products */, - 762A51DE195CB2B000A3B344 /* READMEv1.md */, - 762A51DF195CB2B000A3B344 /* README.md */, - 762A51E1195CB2B000A3B344 /* LICENSE */, - 7657671119E6850F0008967E /* MDWamp.podspec.json */, - 7691AA151A0D168C007FE84C /* config.json */, + 336F578D1CFF7B2100811E8B /* Metadata */, + 33133B2E1CFF77C7003FCFC5 /* Sources */, + 33133AEB1CFF7598003FCFC5 /* MDWamp iOSTests */, + 33133B071CFF7657003FCFC5 /* MDWamp Demo */, + 336F57AA1CFF818100811E8B /* Frameworks */, + 33133ADE1CFF7598003FCFC5 /* Products */, ); sourceTree = ""; }; - 7604D708185B499D0087773E /* Products */ = { + 33133ADE1CFF7598003FCFC5 /* Products */ = { isa = PBXGroup; children = ( - 7604D707185B499D0087773E /* MDWamp.framework */, - 7604D71E185B499D0087773E /* MDWampTests.xctest */, - 7604D766185B6B880087773E /* libMDWamp.a */, - 76A34EEF195DED5400233B76 /* MDWampDemo.app */, + 33133ADD1CFF7598003FCFC5 /* MDWamp.framework */, + 33133AE71CFF7598003FCFC5 /* MDWamp iOSTests.xctest */, + 33133AFA1CFF75B7003FCFC5 /* MDWamp.framework */, + 33133B061CFF7657003FCFC5 /* MDWamp Demo.app */, ); name = Products; sourceTree = ""; }; - 7604D709185B499D0087773E /* Frameworks */ = { + 33133AEB1CFF7598003FCFC5 /* MDWamp iOSTests */ = { isa = PBXGroup; children = ( - 764F05A51969B2A700EB1A8A /* Security.framework */, - 764F05A31969B26D00EB1A8A /* libssl.dylib */, - 7698B1F619522D1C0045D400 /* libicucore.dylib */, - 7698B1FA19522D310045D400 /* Security.framework */, - 7698B1F819522D2B0045D400 /* CFNetwork.framework */, - 7604D70A185B499D0087773E /* Cocoa.framework */, - 7604D71F185B499D0087773E /* XCTest.framework */, - 7604D73A185B4A7B0087773E /* Foundation.framework */, - 7698B1BF19522AF80045D400 /* CoreGraphics.framework */, - 76A34EF2195DED5400233B76 /* UIKit.framework */, + 33133B361CFF77C7003FCFC5 /* Info.plist */, + 33220B911D009BAB00F3C3DA /* MDStackTest.m */, + 33220B921D009BAB00F3C3DA /* MDWampAdvancedTests.m */, + 33220B931D009BAB00F3C3DA /* MDWampClientConfigTests.m */, + 33220B941D009BAB00F3C3DA /* MDWampClientDelegateMock.h */, + 33220B951D009BAB00F3C3DA /* MDWampClientDelegateMock.m */, + 33220B961D009BAB00F3C3DA /* MDWampMessageFactoryTests.m */, + 33220B971D009BAB00F3C3DA /* MDWampMessagesTests.m */, + 33220B991D009BAB00F3C3DA /* MDWampSerializationMock.h */, + 33220B9A1D009BAB00F3C3DA /* MDWampSerializationMock.m */, + 33220B9B1D009BAB00F3C3DA /* MDWampSerializations.m */, + 33220B9C1D009BAB00F3C3DA /* MDWampTestIncludes.h */, + 33220B9D1D009BAB00F3C3DA /* MDWampTests-Info.plist */, + 33220B8D1D009BAB00F3C3DA /* MDWampTests.m */, + 33220B9E1D009BAB00F3C3DA /* MDWampTransportdelegateMock.h */, + 33220B9F1D009BAB00F3C3DA /* MDWampTransportdelegateMock.m */, + 33220BA01D009BAB00F3C3DA /* MDWampTransportMock.h */, + 33220BA11D009BAB00F3C3DA /* MDWampTransportMock.m */, + 3383BD311D00A12200A93869 /* XCTAsyncTestCase.h */, + 33220BA41D009BAB00F3C3DA /* XCTAsyncTestCase.m */, ); - name = Frameworks; - sourceTree = ""; - }; - 765BAF8E19E722C800EC580D /* MPMessagePack */ = { - isa = PBXGroup; - children = ( - 765BAF8F19E722C800EC580D /* cmp.c */, - 765BAF9019E722C800EC580D /* cmp.h */, - 765BAF9119E722C800EC580D /* MPMessagePack.h */, - 765BAF9219E722C800EC580D /* MPMessagePackReader.h */, - 765BAF9319E722C800EC580D /* MPMessagePackReader.m */, - 765BAF9419E722C800EC580D /* MPMessagePackWriter.h */, - 765BAF9519E722C800EC580D /* MPMessagePackWriter.m */, - 765BAF9619E722C800EC580D /* MPOrderedDictionary.h */, - 765BAF9719E722C800EC580D /* MPOrderedDictionary.m */, - 765BAF9819E722C800EC580D /* NSArray+MPMessagePack.h */, - 765BAF9919E722C800EC580D /* NSArray+MPMessagePack.m */, - 765BAF9A19E722C800EC580D /* NSDictionary+MPMessagePack.h */, - 765BAF9B19E722C800EC580D /* NSDictionary+MPMessagePack.m */, - ); - name = MPMessagePack; - path = External/MPMessagePack; + path = "MDWamp iOSTests"; sourceTree = ""; }; - 76A34EF4195DED5400233B76 /* MDWampDemo */ = { + 33133B071CFF7657003FCFC5 /* MDWamp Demo */ = { isa = PBXGroup; children = ( - 76AE15571A0C21C50041016F /* resources */, - 76AE15671A0C21C50041016F /* src */, - 76A34EF5195DED5400233B76 /* Supporting Files */, + 33133B341CFF77C7003FCFC5 /* Info.plist */, + 33133B0B1CFF7657003FCFC5 /* AppDelegate.h */, + 33133B0C1CFF7657003FCFC5 /* AppDelegate.m */, + 33133B0E1CFF7657003FCFC5 /* FirstViewController.h */, + 33133B0F1CFF7657003FCFC5 /* FirstViewController.m */, + 33133B111CFF7657003FCFC5 /* SecondViewController.h */, + 33133B121CFF7657003FCFC5 /* SecondViewController.m */, + 33133B141CFF7657003FCFC5 /* Main.storyboard */, + 33133B171CFF7657003FCFC5 /* Assets.xcassets */, + 33133B191CFF7657003FCFC5 /* LaunchScreen.storyboard */, + 33133B1C1CFF7657003FCFC5 /* Info.plist */, + 33133B081CFF7657003FCFC5 /* Supporting Files */, ); - path = MDWampDemo; + path = "MDWamp Demo"; sourceTree = ""; }; - 76A34EF5195DED5400233B76 /* Supporting Files */ = { + 33133B081CFF7657003FCFC5 /* Supporting Files */ = { isa = PBXGroup; children = ( - 76A34EF6195DED5400233B76 /* MDWampDemo-Info.plist */, - 76A34EFC195DED5400233B76 /* MDWampDemo-Prefix.pch */, + 33133B091CFF7657003FCFC5 /* main.m */, ); name = "Supporting Files"; sourceTree = ""; }; - 76ABE18919688CB500C68911 /* Libraries */ = { + 33133B2E1CFF77C7003FCFC5 /* Sources */ = { isa = PBXGroup; children = ( - 76AE165F1A0C29940041016F /* XCTAsyncTestCase.h */, - 76AE16601A0C29940041016F /* XCTAsyncTestCase.m */, - 76AE15911A0C23130041016F /* SRWebSocket.h */, - 76AE15921A0C23130041016F /* SRWebSocket.m */, - 765BAF8E19E722C800EC580D /* MPMessagePack */, - 76F5970D196894A60002773C /* GCDAsyncSocket.h */, - 76F5970E196894A60002773C /* GCDAsyncSocket.m */, + 33133B2F1CFF77C7003FCFC5 /* Categories */, + 33133B351CFF77C7003FCFC5 /* Info-iOS.plist */, + 33133B371CFF77C7003FCFC5 /* Info-OSX.plist */, + 33133B381CFF77C7003FCFC5 /* MDWamp.h */, + 33133B391CFF77C7003FCFC5 /* MDWamp.m */, + 33133B3A1CFF77C7003FCFC5 /* MDWampClientConfig.h */, + 33133B3B1CFF77C7003FCFC5 /* MDWampClientConfig.m */, + 33133B3C1CFF77C7003FCFC5 /* MDWampClientDelegate.h */, + 33133B3D1CFF77C7003FCFC5 /* MDWampConstants.h */, + 33133B3E1CFF77C7003FCFC5 /* MDWampConstants.m */, + 33133B3F1CFF77C7003FCFC5 /* MDWampMessages */, + 33133B741CFF77C7003FCFC5 /* MDWampSerializations */, + 33133B7B1CFF77C7003FCFC5 /* MDWampTransports */, ); - name = Libraries; + path = Sources; sourceTree = ""; }; - 76AE15571A0C21C50041016F /* resources */ = { + 33133B2F1CFF77C7003FCFC5 /* Categories */ = { isa = PBXGroup; children = ( - 76AE15581A0C21C50041016F /* Main.storyboard */, - 76AE155A1A0C21C50041016F /* broken_link-32.png */, - 76AE155B1A0C21C50041016F /* collaboration.png */, - 76AE155C1A0C21C50041016F /* collaboration@2x.png */, - 76AE155D1A0C21C50041016F /* InfoPlist.strings */, - 76AE155F1A0C21C50041016F /* Images.xcassets */, - 76AE15601A0C21C50041016F /* link-32.png */, - 76AE15611A0C21C50041016F /* online-32.png */, - 76AE15621A0C21C50041016F /* online-32@2x.png */, - 76AE15631A0C21C50041016F /* run_command.png */, - 76AE15641A0C21C50041016F /* run_command@2x.png */, - 76AE15651A0C21C50041016F /* save_as.png */, - 76AE15661A0C21C50041016F /* save_as@2x.png */, - ); - path = resources; - sourceTree = ""; - }; - 76AE15671A0C21C50041016F /* src */ = { - isa = PBXGroup; - children = ( - 76AE15681A0C21C50041016F /* AppDelegate.h */, - 76AE15691A0C21C50041016F /* AppDelegate.m */, - 76AE156A1A0C21C50041016F /* CallRPCViewController.h */, - 76AE156B1A0C21C50041016F /* CallRPCViewController.m */, - 76AE156C1A0C21C50041016F /* ChatStartViewController.h */, - 76AE156D1A0C21C50041016F /* ChatStartViewController.m */, - 76AE156E1A0C21C50041016F /* ChatViewController.h */, - 76AE156F1A0C21C50041016F /* ChatViewController.m */, - 76AE15701A0C21C50041016F /* ConnectViewController.h */, - 76AE15711A0C21C50041016F /* ConnectViewController.m */, - 76AE15721A0C21C50041016F /* main.m */, - 76AE15731A0C21C50041016F /* RegisterRPCViewController.h */, - 76AE15741A0C21C50041016F /* RegisterRPCViewController.m */, - ); - path = src; - sourceTree = ""; - }; - 76AE15961A0C24150041016F /* src */ = { - isa = PBXGroup; - children = ( - 76AE15971A0C24150041016F /* Categories */, - 76AE159C1A0C24150041016F /* MDWamp.h */, - 76AE159D1A0C24150041016F /* MDWamp.m */, - 76AE159E1A0C24150041016F /* MDWampClientConfig.h */, - 76AE159F1A0C24150041016F /* MDWampClientConfig.m */, - 76AE15A01A0C24150041016F /* MDWampClientDelegate.h */, - 76AE15A11A0C24150041016F /* MDWampConstants.h */, - 76AE15A21A0C24150041016F /* MDWampConstants.m */, - 76AE15A31A0C24150041016F /* MDWampMessages */, - 76AE15DA1A0C24150041016F /* MDWampSerializations */, - 76AE15E11A0C24150041016F /* MDWampTransports */, - ); - path = src; - sourceTree = ""; - }; - 76AE15971A0C24150041016F /* Categories */ = { - isa = PBXGroup; - children = ( - 76AE15981A0C24150041016F /* NSMutableArray+MDStack.h */, - 76AE15991A0C24150041016F /* NSMutableArray+MDStack.m */, - 76AE159A1A0C24150041016F /* NSString+MDString.h */, - 76AE159B1A0C24150041016F /* NSString+MDString.m */, + 33133B301CFF77C7003FCFC5 /* NSMutableArray+MDStack.h */, + 33133B311CFF77C7003FCFC5 /* NSMutableArray+MDStack.m */, + 33133B321CFF77C7003FCFC5 /* NSString+MDString.h */, + 33133B331CFF77C7003FCFC5 /* NSString+MDString.m */, ); path = Categories; sourceTree = ""; }; - 76AE15A31A0C24150041016F /* MDWampMessages */ = { + 33133B3F1CFF77C7003FCFC5 /* MDWampMessages */ = { isa = PBXGroup; children = ( - 76AE15A41A0C24150041016F /* MDWampAbort.h */, - 76AE15A51A0C24150041016F /* MDWampAbort.m */, - 76AE15A61A0C24150041016F /* MDWampAuthenticate.h */, - 76AE15A71A0C24150041016F /* MDWampAuthenticate.m */, - 76AE15A81A0C24150041016F /* MDWampCall.h */, - 76AE15A91A0C24150041016F /* MDWampCall.m */, - 76AE15AA1A0C24150041016F /* MDWampCancel.h */, - 76AE15AB1A0C24150041016F /* MDWampCancel.m */, - 76AE15AC1A0C24150041016F /* MDWampChallenge.h */, - 76AE15AD1A0C24150041016F /* MDWampChallenge.m */, - 76AE15AE1A0C24150041016F /* MDWampError.h */, - 76AE15AF1A0C24150041016F /* MDWampError.m */, - 76AE15B01A0C24150041016F /* MDWampEvent.h */, - 76AE15B11A0C24150041016F /* MDWampEvent.m */, - 76AE15B21A0C24150041016F /* MDWampGoodbye.h */, - 76AE15B31A0C24150041016F /* MDWampGoodbye.m */, - 76AE15B61A0C24150041016F /* MDWampHello.h */, - 76AE15B71A0C24150041016F /* MDWampHello.m */, - 76AE15B81A0C24150041016F /* MDWampInterrupt.h */, - 76AE15B91A0C24150041016F /* MDWampInterrupt.m */, - 76AE15BA1A0C24150041016F /* MDWampInvocation.h */, - 76AE15BB1A0C24150041016F /* MDWampInvocation.m */, - 76AE15BC1A0C24150041016F /* MDWampMessage.h */, - 76AE15BD1A0C24150041016F /* MDWampMessageFactory.h */, - 76AE15BE1A0C24150041016F /* MDWampMessageFactory.m */, - 76AE15BF1A0C24150041016F /* MDWampMessages.h */, - 76AE15C01A0C24150041016F /* MDWampPublish.h */, - 76AE15C11A0C24150041016F /* MDWampPublish.m */, - 76AE15C21A0C24150041016F /* MDWampPublished.h */, - 76AE15C31A0C24150041016F /* MDWampPublished.m */, - 76AE15C41A0C24150041016F /* MDWampRegister.h */, - 76AE15C51A0C24150041016F /* MDWampRegister.m */, - 76AE15C61A0C24150041016F /* MDWampRegistered.h */, - 76AE15C71A0C24150041016F /* MDWampRegistered.m */, - 76AE15C81A0C24150041016F /* MDWampResult.h */, - 76AE15C91A0C24150041016F /* MDWampResult.m */, - 76AE15CA1A0C24150041016F /* MDWampSubscribe.h */, - 76AE15CB1A0C24150041016F /* MDWampSubscribe.m */, - 76AE15CC1A0C24150041016F /* MDWampSubscribed.h */, - 76AE15CD1A0C24150041016F /* MDWampSubscribed.m */, - 76AE15CE1A0C24150041016F /* MDWampUnregister.h */, - 76AE15CF1A0C24150041016F /* MDWampUnregister.m */, - 76AE15D01A0C24150041016F /* MDWampUnregistered.h */, - 76AE15D11A0C24150041016F /* MDWampUnregistered.m */, - 76AE15D21A0C24150041016F /* MDWampUnsubscribe.h */, - 76AE15D31A0C24150041016F /* MDWampUnsubscribe.m */, - 76AE15D41A0C24150041016F /* MDWampUnsubscribed.h */, - 76AE15D51A0C24150041016F /* MDWampUnsubscribed.m */, - 76AE15D61A0C24150041016F /* MDWampWelcome.h */, - 76AE15D71A0C24150041016F /* MDWampWelcome.m */, - 76AE15D81A0C24150041016F /* MDWampYield.h */, - 76AE15D91A0C24150041016F /* MDWampYield.m */, + 33133B401CFF77C7003FCFC5 /* MDWampAbort.h */, + 33133B411CFF77C7003FCFC5 /* MDWampAbort.m */, + 33133B421CFF77C7003FCFC5 /* MDWampAuthenticate.h */, + 33133B431CFF77C7003FCFC5 /* MDWampAuthenticate.m */, + 33133B441CFF77C7003FCFC5 /* MDWampCall.h */, + 33133B451CFF77C7003FCFC5 /* MDWampCall.m */, + 33133B461CFF77C7003FCFC5 /* MDWampCancel.h */, + 33133B471CFF77C7003FCFC5 /* MDWampCancel.m */, + 33133B481CFF77C7003FCFC5 /* MDWampChallenge.h */, + 33133B491CFF77C7003FCFC5 /* MDWampChallenge.m */, + 33133B4A1CFF77C7003FCFC5 /* MDWampError.h */, + 33133B4B1CFF77C7003FCFC5 /* MDWampError.m */, + 33133B4C1CFF77C7003FCFC5 /* MDWampEvent.h */, + 33133B4D1CFF77C7003FCFC5 /* MDWampEvent.m */, + 33133B4E1CFF77C7003FCFC5 /* MDWampGoodbye.h */, + 33133B4F1CFF77C7003FCFC5 /* MDWampGoodbye.m */, + 33133B501CFF77C7003FCFC5 /* MDWampHello.h */, + 33133B511CFF77C7003FCFC5 /* MDWampHello.m */, + 33133B521CFF77C7003FCFC5 /* MDWampInterrupt.h */, + 33133B531CFF77C7003FCFC5 /* MDWampInterrupt.m */, + 33133B541CFF77C7003FCFC5 /* MDWampInvocation.h */, + 33133B551CFF77C7003FCFC5 /* MDWampInvocation.m */, + 33133B561CFF77C7003FCFC5 /* MDWampMessage.h */, + 33133B571CFF77C7003FCFC5 /* MDWampMessageFactory.h */, + 33133B581CFF77C7003FCFC5 /* MDWampMessageFactory.m */, + 33133B591CFF77C7003FCFC5 /* MDWampMessages.h */, + 33133B5A1CFF77C7003FCFC5 /* MDWampPublish.h */, + 33133B5B1CFF77C7003FCFC5 /* MDWampPublish.m */, + 33133B5C1CFF77C7003FCFC5 /* MDWampPublished.h */, + 33133B5D1CFF77C7003FCFC5 /* MDWampPublished.m */, + 33133B5E1CFF77C7003FCFC5 /* MDWampRegister.h */, + 33133B5F1CFF77C7003FCFC5 /* MDWampRegister.m */, + 33133B601CFF77C7003FCFC5 /* MDWampRegistered.h */, + 33133B611CFF77C7003FCFC5 /* MDWampRegistered.m */, + 33133B621CFF77C7003FCFC5 /* MDWampResult.h */, + 33133B631CFF77C7003FCFC5 /* MDWampResult.m */, + 33133B641CFF77C7003FCFC5 /* MDWampSubscribe.h */, + 33133B651CFF77C7003FCFC5 /* MDWampSubscribe.m */, + 33133B661CFF77C7003FCFC5 /* MDWampSubscribed.h */, + 33133B671CFF77C7003FCFC5 /* MDWampSubscribed.m */, + 33133B681CFF77C7003FCFC5 /* MDWampUnregister.h */, + 33133B691CFF77C7003FCFC5 /* MDWampUnregister.m */, + 33133B6A1CFF77C7003FCFC5 /* MDWampUnregistered.h */, + 33133B6B1CFF77C7003FCFC5 /* MDWampUnregistered.m */, + 33133B6C1CFF77C7003FCFC5 /* MDWampUnsubscribe.h */, + 33133B6D1CFF77C7003FCFC5 /* MDWampUnsubscribe.m */, + 33133B6E1CFF77C7003FCFC5 /* MDWampUnsubscribed.h */, + 33133B6F1CFF77C7003FCFC5 /* MDWampUnsubscribed.m */, + 33133B701CFF77C7003FCFC5 /* MDWampWelcome.h */, + 33133B711CFF77C7003FCFC5 /* MDWampWelcome.m */, + 33133B721CFF77C7003FCFC5 /* MDWampYield.h */, + 33133B731CFF77C7003FCFC5 /* MDWampYield.m */, ); path = MDWampMessages; sourceTree = ""; }; - 76AE15DA1A0C24150041016F /* MDWampSerializations */ = { + 33133B741CFF77C7003FCFC5 /* MDWampSerializations */ = { isa = PBXGroup; children = ( - 76AE15DB1A0C24150041016F /* MDWampSerialization.h */, - 76AE15DC1A0C24150041016F /* MDWampSerializationJSON.h */, - 76AE15DD1A0C24150041016F /* MDWampSerializationJSON.m */, - 76AE15DE1A0C24150041016F /* MDWampSerializationMsgpack.h */, - 76AE15DF1A0C24150041016F /* MDWampSerializationMsgpack.m */, - 76AE15E01A0C24150041016F /* MDWampSerializations.h */, + 33133B751CFF77C7003FCFC5 /* MDWampSerialization.h */, + 33133B761CFF77C7003FCFC5 /* MDWampSerializationJSON.h */, + 33133B771CFF77C7003FCFC5 /* MDWampSerializationJSON.m */, + 33133B781CFF77C7003FCFC5 /* MDWampSerializationMsgpack.h */, + 33133B791CFF77C7003FCFC5 /* MDWampSerializationMsgpack.m */, + 33133B7A1CFF77C7003FCFC5 /* MDWampSerializations.h */, ); path = MDWampSerializations; sourceTree = ""; }; - 76AE15E11A0C24150041016F /* MDWampTransports */ = { + 33133B7B1CFF77C7003FCFC5 /* MDWampTransports */ = { isa = PBXGroup; children = ( - 76AE15E21A0C24150041016F /* MDWampTransport.h */, - 76AE15E31A0C24150041016F /* MDWampTransportDelegate.h */, - 76AE15E41A0C24150041016F /* MDWampTransportRawSocket.h */, - 76AE15E51A0C24150041016F /* MDWampTransportRawSocket.m */, - 76AE15E61A0C24150041016F /* MDWampTransports.h */, - 76AE15E71A0C24150041016F /* MDWampTransportWebSocket.h */, - 76AE15E81A0C24150041016F /* MDWampTransportWebSocket.m */, + 33133B7C1CFF77C7003FCFC5 /* MDWampTransport.h */, + 33133B7D1CFF77C7003FCFC5 /* MDWampTransportDelegate.h */, + 33133B7E1CFF77C7003FCFC5 /* MDWampTransportRawSocket.h */, + 33133B7F1CFF77C7003FCFC5 /* MDWampTransportRawSocket.m */, + 33133B801CFF77C7003FCFC5 /* MDWampTransports.h */, + 33133B811CFF77C7003FCFC5 /* MDWampTransportWebSocket.h */, + 33133B821CFF77C7003FCFC5 /* MDWampTransportWebSocket.m */, ); path = MDWampTransports; sourceTree = ""; }; - 76CCC6ED185BD1F10056AB98 /* MDWampTests */ = { + 336F578D1CFF7B2100811E8B /* Metadata */ = { isa = PBXGroup; children = ( - 7673B7AE1A0FDA3F0072CDD3 /* MDWampTransportWebSocketTests.m */, - 76CCC6EE185BD1F10056AB98 /* InfoPlist.strings */, - 76CCC6F4185BD1F10056AB98 /* MDWampTests-Info.plist */, - 76CCC6FB185BD2210056AB98 /* Mock */, - 76CCC6F3185BD1F10056AB98 /* MDWampTestIncludes.h */, - 760DA6FA18EB0A9E006EC89C /* MDWampMessageFactoryTests.m */, - 760DA6FC18EB0E7D006EC89C /* MDWampMessagesTests.m */, - 7619E69918CF8E9F00B0209D /* MDWampTests.m */, - 766E10EC19E6C1E00083173B /* MDWampAdvancedTests.m */, - 764374A1194E238D000F29A8 /* MDStackTest.m */, - 764F059D1969AE7B00EB1A8A /* MDWampTransportRawSocketTests.m */, - 7698B1B31952278E0045D400 /* MDWampSerializations.m */, - 766E10E619E6B4390083173B /* MDWampClientConfigTests.m */, + 3383BD321D00A57E00A93869 /* fastlane */, + 336F578E1CFF7B2D00811E8B /* MDWamp.podspec */, + 336F578F1CFF7B2D00811E8B /* LICENSE */, + 336F57901CFF7B2D00811E8B /* MDWamp.podspec.json */, + 336F57911CFF7B2D00811E8B /* README.md */, ); - path = MDWampTests; + name = Metadata; sourceTree = ""; }; - 76CCC6FB185BD2210056AB98 /* Mock */ = { + 336F57AA1CFF818100811E8B /* Frameworks */ = { isa = PBXGroup; children = ( - 76CCC6F0185BD1F10056AB98 /* MDWampClientDelegateMock.h */, - 76CCC6F1185BD1F10056AB98 /* MDWampClientDelegateMock.m */, - 76EF81D218D1043700DFB13B /* MDWampTransportMock.h */, - 76EF81D318D1043700DFB13B /* MDWampTransportMock.m */, - 76EF81D918D1087000DFB13B /* MDWampSerializationMock.h */, - 76EF81DA18D1087000DFB13B /* MDWampSerializationMock.m */, - 76414F511950C8E900788300 /* MDWampTransportdelegateMock.h */, - 76414F521950C8E900788300 /* MDWampTransportdelegateMock.m */, + 33220B651CFF9C1F00F3C3DA /* CocoaAsyncSocket.framework */, + 33220B661CFF9C1F00F3C3DA /* GHODictionary.framework */, + 33220B671CFF9C1F00F3C3DA /* MPMessagePack.framework */, + 33220B681CFF9C1F00F3C3DA /* SocketRocket.framework */, + 33220B631CFF9B4500F3C3DA /* SocketRocket.framework */, + 33220B611CFF9A7C00F3C3DA /* CocoaAsyncSocket.framework */, + 33220B5D1CFF99EB00F3C3DA /* GHODictionary.framework */, + 33220B5E1CFF99EB00F3C3DA /* MPMessagePack.framework */, ); - name = Mock; + name = Frameworks; sourceTree = ""; }; - 76FD803B185BB3C800D1B5C0 /* MDWamp */ = { + 3383BD321D00A57E00A93869 /* fastlane */ = { isa = PBXGroup; children = ( - 76AE15961A0C24150041016F /* src */, - 76AE15E91A0C24150041016F /* MDWamp-Prefix.pch */, - 76AE15EA1A0C24150041016F /* MDWamp-Info.plist */, + 3383BD331D00A57E00A93869 /* Fastfile */, ); - path = MDWamp; + path = fastlane; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ - 7604D704185B499D0087773E /* Headers */ = { + 33133ADA1CFF7598003FCFC5 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 33133BA41CFF77C7003FCFC5 /* MDWampInterrupt.h in Headers */, + 33133BBA1CFF77C7003FCFC5 /* MDWampUnregister.h in Headers */, + 33133B961CFF77C7003FCFC5 /* MDWampCall.h in Headers */, + 33133BA61CFF77C7003FCFC5 /* MDWampInvocation.h in Headers */, + 33133BCE1CFF77C7003FCFC5 /* MDWampTransportRawSocket.h in Headers */, + 33133BA01CFF77C7003FCFC5 /* MDWampGoodbye.h in Headers */, + 33133BD01CFF77C7003FCFC5 /* MDWampTransports.h in Headers */, + 33133B8B1CFF77C7003FCFC5 /* MDWamp.h in Headers */, + 33133BA81CFF77C7003FCFC5 /* MDWampMessage.h in Headers */, + 33133BB21CFF77C7003FCFC5 /* MDWampRegistered.h in Headers */, + 33133B9C1CFF77C7003FCFC5 /* MDWampError.h in Headers */, + 33133BD11CFF77C7003FCFC5 /* MDWampTransportWebSocket.h in Headers */, + 33133B921CFF77C7003FCFC5 /* MDWampAbort.h in Headers */, + 33133B831CFF77C7003FCFC5 /* NSMutableArray+MDStack.h in Headers */, + 33133B941CFF77C7003FCFC5 /* MDWampAuthenticate.h in Headers */, + 33133B8F1CFF77C7003FCFC5 /* MDWampClientDelegate.h in Headers */, + 33133BA91CFF77C7003FCFC5 /* MDWampMessageFactory.h in Headers */, + 33133BC21CFF77C7003FCFC5 /* MDWampWelcome.h in Headers */, + 33133BAC1CFF77C7003FCFC5 /* MDWampPublish.h in Headers */, + 33133B981CFF77C7003FCFC5 /* MDWampCancel.h in Headers */, + 33133B851CFF77C7003FCFC5 /* NSString+MDString.h in Headers */, + 33133BB81CFF77C7003FCFC5 /* MDWampSubscribed.h in Headers */, + 33133B9A1CFF77C7003FCFC5 /* MDWampChallenge.h in Headers */, + 33133BBC1CFF77C7003FCFC5 /* MDWampUnregistered.h in Headers */, + 33133BCD1CFF77C7003FCFC5 /* MDWampTransportDelegate.h in Headers */, + 33133BB61CFF77C7003FCFC5 /* MDWampSubscribe.h in Headers */, + 33133BAB1CFF77C7003FCFC5 /* MDWampMessages.h in Headers */, + 33133BB01CFF77C7003FCFC5 /* MDWampRegister.h in Headers */, + 33133BAE1CFF77C7003FCFC5 /* MDWampPublished.h in Headers */, + 33133BC71CFF77C7003FCFC5 /* MDWampSerializationJSON.h in Headers */, + 33133B901CFF77C7003FCFC5 /* MDWampConstants.h in Headers */, + 33133BC01CFF77C7003FCFC5 /* MDWampUnsubscribed.h in Headers */, + 33133BC91CFF77C7003FCFC5 /* MDWampSerializationMsgpack.h in Headers */, + 33133BCB1CFF77C7003FCFC5 /* MDWampSerializations.h in Headers */, + 33133B8D1CFF77C7003FCFC5 /* MDWampClientConfig.h in Headers */, + 33133BBE1CFF77C7003FCFC5 /* MDWampUnsubscribe.h in Headers */, + 33133BC61CFF77C7003FCFC5 /* MDWampSerialization.h in Headers */, + 33133BA21CFF77C7003FCFC5 /* MDWampHello.h in Headers */, + 33133BC41CFF77C7003FCFC5 /* MDWampYield.h in Headers */, + 33133BCC1CFF77C7003FCFC5 /* MDWampTransport.h in Headers */, + 33133BB41CFF77C7003FCFC5 /* MDWampResult.h in Headers */, + 33133B9E1CFF77C7003FCFC5 /* MDWampEvent.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33133AF71CFF75B7003FCFC5 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 76AE15EB1A0C24150041016F /* NSMutableArray+MDStack.h in Headers */, - 76AE16041A0C24150041016F /* MDWampCancel.h in Headers */, - 76AE16421A0C24150041016F /* MDWampUnsubscribed.h in Headers */, - 76AE160A1A0C24150041016F /* MDWampError.h in Headers */, - 76AE16161A0C24150041016F /* MDWampHello.h in Headers */, - 76AE162D1A0C24150041016F /* MDWampRegistered.h in Headers */, - 76AE16521A0C24150041016F /* MDWampSerializations.h in Headers */, - 76AE15FB1A0C24150041016F /* MDWampAbort.h in Headers */, - 765BAFAC19E722C800EC580D /* NSDictionary+MPMessagePack.h in Headers */, - 76AE16071A0C24150041016F /* MDWampChallenge.h in Headers */, - 765BAFA919E722C800EC580D /* NSArray+MPMessagePack.h in Headers */, - 76AE16191A0C24150041016F /* MDWampInterrupt.h in Headers */, - 76AE16301A0C24150041016F /* MDWampResult.h in Headers */, - 76AE16361A0C24150041016F /* MDWampSubscribed.h in Headers */, - 76AE160D1A0C24150041016F /* MDWampEvent.h in Headers */, - 76F5970F196894A60002773C /* GCDAsyncSocket.h in Headers */, - 76AE16391A0C24150041016F /* MDWampUnregister.h in Headers */, - 76AE15FE1A0C24150041016F /* MDWampAuthenticate.h in Headers */, - 76AE16011A0C24150041016F /* MDWampCall.h in Headers */, - 76AE16271A0C24150041016F /* MDWampPublished.h in Headers */, - 76AE164B1A0C24150041016F /* MDWampSerialization.h in Headers */, - 76AE16101A0C24150041016F /* MDWampGoodbye.h in Headers */, - 76AE16201A0C24150041016F /* MDWampMessageFactory.h in Headers */, - 76AE163F1A0C24150041016F /* MDWampUnsubscribe.h in Headers */, - 76AE15F71A0C24150041016F /* MDWampClientDelegate.h in Headers */, - 76AE15F11A0C24150041016F /* MDWamp.h in Headers */, - 76AE16531A0C24150041016F /* MDWampTransport.h in Headers */, - 76AE163C1A0C24150041016F /* MDWampUnregistered.h in Headers */, - 76AE16541A0C24150041016F /* MDWampTransportDelegate.h in Headers */, - 76AE164F1A0C24150041016F /* MDWampSerializationMsgpack.h in Headers */, - 76AE161F1A0C24150041016F /* MDWampMessage.h in Headers */, - 76AE16231A0C24150041016F /* MDWampMessages.h in Headers */, - 76AE15EE1A0C24150041016F /* NSString+MDString.h in Headers */, - 765BAFA619E722C800EC580D /* MPOrderedDictionary.h in Headers */, - 765BAF9F19E722C800EC580D /* MPMessagePack.h in Headers */, - 76AE16481A0C24150041016F /* MDWampYield.h in Headers */, - 76AE162A1A0C24150041016F /* MDWampRegister.h in Headers */, - 76AE15F81A0C24150041016F /* MDWampConstants.h in Headers */, - 76AE16591A0C24150041016F /* MDWampTransportWebSocket.h in Headers */, - 76AE16551A0C24150041016F /* MDWampTransportRawSocket.h in Headers */, - 76AE16581A0C24150041016F /* MDWampTransports.h in Headers */, - 76AE164C1A0C24150041016F /* MDWampSerializationJSON.h in Headers */, - 76AE161C1A0C24150041016F /* MDWampInvocation.h in Headers */, - 76AE16241A0C24150041016F /* MDWampPublish.h in Headers */, - 76AE15931A0C23130041016F /* SRWebSocket.h in Headers */, - 76AE165C1A0C24150041016F /* MDWamp-Prefix.pch in Headers */, - 76AE16451A0C24150041016F /* MDWampWelcome.h in Headers */, - 765BAF9E19E722C800EC580D /* cmp.h in Headers */, - 765BAFA319E722C800EC580D /* MPMessagePackWriter.h in Headers */, - 765BAFA019E722C800EC580D /* MPMessagePackReader.h in Headers */, - 76AE15F41A0C24150041016F /* MDWampClientConfig.h in Headers */, - 76AE16331A0C24150041016F /* MDWampSubscribe.h in Headers */, + 336F57741CFF7A2300811E8B /* MDWampUnregister.h in Headers */, + 336F57621CFF7A2300811E8B /* MDWampMessage.h in Headers */, + 336F577E1CFF7A2300811E8B /* MDWampYield.h in Headers */, + 336F57521CFF7A2300811E8B /* MDWampCancel.h in Headers */, + 336F575C1CFF7A2300811E8B /* MDWampHello.h in Headers */, + 336F57451CFF7A1600811E8B /* MDWamp.h in Headers */, + 336F577C1CFF7A2300811E8B /* MDWampWelcome.h in Headers */, + 336F577A1CFF7A2300811E8B /* MDWampUnsubscribed.h in Headers */, + 336F57541CFF7A2300811E8B /* MDWampChallenge.h in Headers */, + 336F57661CFF7A2300811E8B /* MDWampPublish.h in Headers */, + 336F57881CFF7A3100811E8B /* MDWampTransportRawSocket.h in Headers */, + 336F57851CFF7A2C00811E8B /* MDWampSerializations.h in Headers */, + 336F57501CFF7A2300811E8B /* MDWampCall.h in Headers */, + 336F57651CFF7A2300811E8B /* MDWampMessages.h in Headers */, + 336F575A1CFF7A2300811E8B /* MDWampGoodbye.h in Headers */, + 336F578A1CFF7A3100811E8B /* MDWampTransports.h in Headers */, + 336F57681CFF7A2300811E8B /* MDWampPublished.h in Headers */, + 336F57721CFF7A2300811E8B /* MDWampSubscribed.h in Headers */, + 336F57801CFF7A2C00811E8B /* MDWampSerialization.h in Headers */, + 336F574C1CFF7A2300811E8B /* MDWampAbort.h in Headers */, + 336F576E1CFF7A2300811E8B /* MDWampResult.h in Headers */, + 336F576A1CFF7A2300811E8B /* MDWampRegister.h in Headers */, + 336F57811CFF7A2C00811E8B /* MDWampSerializationJSON.h in Headers */, + 336F57471CFF7A1A00811E8B /* MDWampClientConfig.h in Headers */, + 336F57761CFF7A2300811E8B /* MDWampUnregistered.h in Headers */, + 336F57831CFF7A2C00811E8B /* MDWampSerializationMsgpack.h in Headers */, + 336F578B1CFF7A3100811E8B /* MDWampTransportWebSocket.h in Headers */, + 336F575E1CFF7A2300811E8B /* MDWampInterrupt.h in Headers */, + 336F574E1CFF7A2300811E8B /* MDWampAuthenticate.h in Headers */, + 336F57861CFF7A3100811E8B /* MDWampTransport.h in Headers */, + 336F57581CFF7A2300811E8B /* MDWampEvent.h in Headers */, + 336F57781CFF7A2300811E8B /* MDWampUnsubscribe.h in Headers */, + 336F576C1CFF7A2300811E8B /* MDWampRegistered.h in Headers */, + 336F57871CFF7A3100811E8B /* MDWampTransportDelegate.h in Headers */, + 336F574A1CFF7A1A00811E8B /* MDWampConstants.h in Headers */, + 336F57491CFF7A1A00811E8B /* MDWampClientDelegate.h in Headers */, + 336F57631CFF7A2300811E8B /* MDWampMessageFactory.h in Headers */, + 336F57561CFF7A2300811E8B /* MDWampError.h in Headers */, + 336F57601CFF7A2300811E8B /* MDWampInvocation.h in Headers */, + 336F57701CFF7A2300811E8B /* MDWampSubscribe.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 7604D706185B499D0087773E /* MDWamp */ = { + 33133ADC1CFF7598003FCFC5 /* MDWamp iOS */ = { isa = PBXNativeTarget; - buildConfigurationList = 7604D72F185B499E0087773E /* Build configuration list for PBXNativeTarget "MDWamp" */; + buildConfigurationList = 33133AEF1CFF7598003FCFC5 /* Build configuration list for PBXNativeTarget "MDWamp iOS" */; buildPhases = ( - 7604D702185B499D0087773E /* Sources */, - 7604D703185B499D0087773E /* Frameworks */, - 7604D704185B499D0087773E /* Headers */, - 7604D705185B499D0087773E /* Resources */, - 7646E534185BCEAB004990DD /* CopyFiles */, - 76D8AE40194BA6E1003C0CEE /* ShellScript */, + 33133AD81CFF7598003FCFC5 /* Sources */, + 33133AD91CFF7598003FCFC5 /* Frameworks */, + 33133ADA1CFF7598003FCFC5 /* Headers */, + 33133ADB1CFF7598003FCFC5 /* Resources */, ); buildRules = ( ); dependencies = ( ); - name = MDWamp; - productName = MDWamp; - productReference = 7604D707185B499D0087773E /* MDWamp.framework */; + name = "MDWamp iOS"; + productName = "MDWamp iOS"; + productReference = 33133ADD1CFF7598003FCFC5 /* MDWamp.framework */; productType = "com.apple.product-type.framework"; }; - 7604D71D185B499D0087773E /* MDWampTests */ = { + 33133AE61CFF7598003FCFC5 /* MDWamp iOSTests */ = { isa = PBXNativeTarget; - buildConfigurationList = 7604D732185B499E0087773E /* Build configuration list for PBXNativeTarget "MDWampTests" */; + buildConfigurationList = 33133AF21CFF7598003FCFC5 /* Build configuration list for PBXNativeTarget "MDWamp iOSTests" */; buildPhases = ( - 7604D71A185B499D0087773E /* Sources */, - 7604D71B185B499D0087773E /* Frameworks */, - 7604D71C185B499D0087773E /* Resources */, - 7646E536185BCF08004990DD /* CopyFiles */, + 33133AE31CFF7598003FCFC5 /* Sources */, + 33133AE41CFF7598003FCFC5 /* Frameworks */, + 33133AE51CFF7598003FCFC5 /* Resources */, ); buildRules = ( ); dependencies = ( - 7604D723185B499E0087773E /* PBXTargetDependency */, + 33133AEA1CFF7598003FCFC5 /* PBXTargetDependency */, ); - name = MDWampTests; - productName = MDWampTests; - productReference = 7604D71E185B499D0087773E /* MDWampTests.xctest */; + name = "MDWamp iOSTests"; + productName = "MDWamp iOSTests"; + productReference = 33133AE71CFF7598003FCFC5 /* MDWamp iOSTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; - 7604D765185B6B880087773E /* libMDWamp */ = { + 33133AF91CFF75B7003FCFC5 /* MDWamp OSX */ = { isa = PBXNativeTarget; - buildConfigurationList = 7604D782185B6B880087773E /* Build configuration list for PBXNativeTarget "libMDWamp" */; + buildConfigurationList = 33133AFF1CFF75B7003FCFC5 /* Build configuration list for PBXNativeTarget "MDWamp OSX" */; buildPhases = ( - 7604D762185B6B880087773E /* Sources */, - 7604D763185B6B880087773E /* Frameworks */, - 7604D764185B6B880087773E /* CopyFiles */, + 33133AF51CFF75B7003FCFC5 /* Sources */, + 33133AF61CFF75B7003FCFC5 /* Frameworks */, + 33133AF71CFF75B7003FCFC5 /* Headers */, + 33133AF81CFF75B7003FCFC5 /* Resources */, ); buildRules = ( ); dependencies = ( ); - name = libMDWamp; - productName = libMDWamp; - productReference = 7604D766185B6B880087773E /* libMDWamp.a */; - productType = "com.apple.product-type.library.static"; + name = "MDWamp OSX"; + productName = "MDWamp OSX"; + productReference = 33133AFA1CFF75B7003FCFC5 /* MDWamp.framework */; + productType = "com.apple.product-type.framework"; }; - 76A34EEE195DED5400233B76 /* MDWampDemo */ = { + 33133B051CFF7657003FCFC5 /* MDWamp Demo */ = { isa = PBXNativeTarget; - buildConfigurationList = 76A34F1D195DED5400233B76 /* Build configuration list for PBXNativeTarget "MDWampDemo" */; + buildConfigurationList = 33133B281CFF7658003FCFC5 /* Build configuration list for PBXNativeTarget "MDWamp Demo" */; buildPhases = ( - 76A34EEB195DED5400233B76 /* Sources */, - 76A34EEC195DED5400233B76 /* Frameworks */, - 76A34EED195DED5400233B76 /* Resources */, + 33133B021CFF7657003FCFC5 /* Sources */, + 33133B031CFF7657003FCFC5 /* Frameworks */, + 33133B041CFF7657003FCFC5 /* Resources */, ); buildRules = ( ); dependencies = ( - 7657A3B6195F594800F58BB4 /* PBXTargetDependency */, ); - name = MDWampDemo; - productName = MDWampDemo; - productReference = 76A34EEF195DED5400233B76 /* MDWampDemo.app */; + name = "MDWamp Demo"; + productName = "MDWamp Demo"; + productReference = 33133B061CFF7657003FCFC5 /* MDWamp Demo.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - 7604D6FE185B499D0087773E /* Project object */ = { + 33133AD21CFF751A003FCFC5 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0720; - ORGANIZATIONNAME = mogui.it; + LastUpgradeCheck = 0730; TargetAttributes = { - 7604D71D185B499D0087773E = { - TestTargetID = 7604D706185B499D0087773E; + 33133ADC1CFF7598003FCFC5 = { + CreatedOnToolsVersion = 7.3.1; + DevelopmentTeam = 7ZVA8A38DQ; + }; + 33133AE61CFF7598003FCFC5 = { + CreatedOnToolsVersion = 7.3.1; + DevelopmentTeam = 7ZVA8A38DQ; + }; + 33133AF91CFF75B7003FCFC5 = { + CreatedOnToolsVersion = 7.3.1; + }; + 33133B051CFF7657003FCFC5 = { + CreatedOnToolsVersion = 7.3.1; + DevelopmentTeam = 7ZVA8A38DQ; }; }; }; - buildConfigurationList = 7604D701185B499D0087773E /* Build configuration list for PBXProject "MDWamp" */; + buildConfigurationList = 33133AD51CFF751A003FCFC5 /* Build configuration list for PBXProject "MDWamp" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; @@ -908,256 +803,220 @@ en, Base, ); - mainGroup = 7604D6FD185B499D0087773E; - productRefGroup = 7604D708185B499D0087773E /* Products */; + mainGroup = 33133AD11CFF751A003FCFC5; + productRefGroup = 33133ADE1CFF7598003FCFC5 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - 7604D706185B499D0087773E /* MDWamp */, - 7604D71D185B499D0087773E /* MDWampTests */, - 7604D765185B6B880087773E /* libMDWamp */, - 76A34EEE195DED5400233B76 /* MDWampDemo */, + 33133ADC1CFF7598003FCFC5 /* MDWamp iOS */, + 33133AE61CFF7598003FCFC5 /* MDWamp iOSTests */, + 33133AF91CFF75B7003FCFC5 /* MDWamp OSX */, + 33133B051CFF7657003FCFC5 /* MDWamp Demo */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 7604D705185B499D0087773E /* Resources */ = { + 33133ADB1CFF7598003FCFC5 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 7604D71C185B499D0087773E /* Resources */ = { + 33133AE51CFF7598003FCFC5 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 76CCC6F6185BD1F10056AB98 /* InfoPlist.strings in Resources */, + 3383BD341D00A57E00A93869 /* Fastfile in Resources */, + 33220BB11D009BAB00F3C3DA /* MDWampTests-Info.plist in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 76A34EED195DED5400233B76 /* Resources */ = { + 33133AF81CFF75B7003FCFC5 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 76AE15801A0C21C50041016F /* save_as.png in Resources */, - 76AE15791A0C21C50041016F /* InfoPlist.strings in Resources */, - 76AE15751A0C21C50041016F /* Main.storyboard in Resources */, - 76AE15761A0C21C50041016F /* broken_link-32.png in Resources */, - 76AE157B1A0C21C50041016F /* link-32.png in Resources */, - 76AE157E1A0C21C50041016F /* run_command.png in Resources */, - 76AE15771A0C21C50041016F /* collaboration.png in Resources */, - 76AE157A1A0C21C50041016F /* Images.xcassets in Resources */, - 76AE157F1A0C21C50041016F /* run_command@2x.png in Resources */, - 76AE157D1A0C21C50041016F /* online-32@2x.png in Resources */, - 76AE15781A0C21C50041016F /* collaboration@2x.png in Resources */, - 76AE157C1A0C21C50041016F /* online-32.png in Resources */, - 76AE15811A0C21C50041016F /* save_as@2x.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 76D8AE40194BA6E1003C0CEE /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; + 33133B041CFF7657003FCFC5 /* Resources */ = { + isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - ); - inputPaths = ( - ); - outputPaths = ( + 33133B1B1CFF7657003FCFC5 /* LaunchScreen.storyboard in Resources */, + 33133B181CFF7657003FCFC5 /* Assets.xcassets in Resources */, + 33133B161CFF7657003FCFC5 /* Main.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; - shellPath = "/bin/sh "; - shellScript = XcodeCoverage/exportenv.sh; }; -/* End PBXShellScriptBuildPhase section */ +/* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - 7604D702185B499D0087773E /* Sources */ = { + 33133AD81CFF7598003FCFC5 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 76AE160E1A0C24150041016F /* MDWampEvent.m in Sources */, - 76AE16401A0C24150041016F /* MDWampUnsubscribe.m in Sources */, - 76AE16461A0C24150041016F /* MDWampWelcome.m in Sources */, - 765BAFAD19E722C800EC580D /* NSDictionary+MPMessagePack.m in Sources */, - 76AE16051A0C24150041016F /* MDWampCancel.m in Sources */, - 765BAFA119E722C800EC580D /* MPMessagePackReader.m in Sources */, - 76AE161D1A0C24150041016F /* MDWampInvocation.m in Sources */, - 76AE15FC1A0C24150041016F /* MDWampAbort.m in Sources */, - 76AE16251A0C24150041016F /* MDWampPublish.m in Sources */, - 76AE160B1A0C24150041016F /* MDWampError.m in Sources */, - 76AE15F51A0C24150041016F /* MDWampClientConfig.m in Sources */, - 76AE161A1A0C24150041016F /* MDWampInterrupt.m in Sources */, - 76AE16081A0C24150041016F /* MDWampChallenge.m in Sources */, - 76AE163A1A0C24150041016F /* MDWampUnregister.m in Sources */, - 76AE162E1A0C24150041016F /* MDWampRegistered.m in Sources */, - 76F59710196894A60002773C /* GCDAsyncSocket.m in Sources */, - 76AE162B1A0C24150041016F /* MDWampRegister.m in Sources */, - 76AE16491A0C24150041016F /* MDWampYield.m in Sources */, - 76AE15EF1A0C24150041016F /* NSString+MDString.m in Sources */, - 76AE16111A0C24150041016F /* MDWampGoodbye.m in Sources */, - 765BAFAA19E722C800EC580D /* NSArray+MPMessagePack.m in Sources */, - 765BAF9C19E722C800EC580D /* cmp.c in Sources */, - 76AE16431A0C24150041016F /* MDWampUnsubscribed.m in Sources */, - 76AE16501A0C24150041016F /* MDWampSerializationMsgpack.m in Sources */, - 76AE15EC1A0C24150041016F /* NSMutableArray+MDStack.m in Sources */, - 76AE16021A0C24150041016F /* MDWampCall.m in Sources */, - 76AE16341A0C24150041016F /* MDWampSubscribe.m in Sources */, - 76AE16281A0C24150041016F /* MDWampPublished.m in Sources */, - 76AE165A1A0C24150041016F /* MDWampTransportWebSocket.m in Sources */, - 765BAFA719E722C800EC580D /* MPOrderedDictionary.m in Sources */, - 76AE16561A0C24150041016F /* MDWampTransportRawSocket.m in Sources */, - 76AE16171A0C24150041016F /* MDWampHello.m in Sources */, - 76AE16371A0C24150041016F /* MDWampSubscribed.m in Sources */, - 76AE15FF1A0C24150041016F /* MDWampAuthenticate.m in Sources */, - 76AE15F91A0C24150041016F /* MDWampConstants.m in Sources */, - 76AE163D1A0C24150041016F /* MDWampUnregistered.m in Sources */, - 76AE164D1A0C24150041016F /* MDWampSerializationJSON.m in Sources */, - 765BAFA419E722C800EC580D /* MPMessagePackWriter.m in Sources */, - 76AE15941A0C23130041016F /* SRWebSocket.m in Sources */, - 76AE16211A0C24150041016F /* MDWampMessageFactory.m in Sources */, - 76AE15F21A0C24150041016F /* MDWamp.m in Sources */, - 76AE16311A0C24150041016F /* MDWampResult.m in Sources */, + 33133B841CFF77C7003FCFC5 /* NSMutableArray+MDStack.m in Sources */, + 33133BCA1CFF77C7003FCFC5 /* MDWampSerializationMsgpack.m in Sources */, + 33133BA11CFF77C7003FCFC5 /* MDWampGoodbye.m in Sources */, + 33133BB11CFF77C7003FCFC5 /* MDWampRegister.m in Sources */, + 33133B971CFF77C7003FCFC5 /* MDWampCall.m in Sources */, + 33133BCF1CFF77C7003FCFC5 /* MDWampTransportRawSocket.m in Sources */, + 33133B861CFF77C7003FCFC5 /* NSString+MDString.m in Sources */, + 33133BC51CFF77C7003FCFC5 /* MDWampYield.m in Sources */, + 33133BC81CFF77C7003FCFC5 /* MDWampSerializationJSON.m in Sources */, + 33133BB31CFF77C7003FCFC5 /* MDWampRegistered.m in Sources */, + 33133BC11CFF77C7003FCFC5 /* MDWampUnsubscribed.m in Sources */, + 33133BD21CFF77C7003FCFC5 /* MDWampTransportWebSocket.m in Sources */, + 33133B931CFF77C7003FCFC5 /* MDWampAbort.m in Sources */, + 33133B8E1CFF77C7003FCFC5 /* MDWampClientConfig.m in Sources */, + 33133BC31CFF77C7003FCFC5 /* MDWampWelcome.m in Sources */, + 33133BA31CFF77C7003FCFC5 /* MDWampHello.m in Sources */, + 33133BB91CFF77C7003FCFC5 /* MDWampSubscribed.m in Sources */, + 33133B8C1CFF77C7003FCFC5 /* MDWamp.m in Sources */, + 33133B911CFF77C7003FCFC5 /* MDWampConstants.m in Sources */, + 33133BB71CFF77C7003FCFC5 /* MDWampSubscribe.m in Sources */, + 33133BBB1CFF77C7003FCFC5 /* MDWampUnregister.m in Sources */, + 33133B951CFF77C7003FCFC5 /* MDWampAuthenticate.m in Sources */, + 33133BA51CFF77C7003FCFC5 /* MDWampInterrupt.m in Sources */, + 33133B9F1CFF77C7003FCFC5 /* MDWampEvent.m in Sources */, + 33133BB51CFF77C7003FCFC5 /* MDWampResult.m in Sources */, + 33133B991CFF77C7003FCFC5 /* MDWampCancel.m in Sources */, + 33133BBF1CFF77C7003FCFC5 /* MDWampUnsubscribe.m in Sources */, + 33133BAF1CFF77C7003FCFC5 /* MDWampPublished.m in Sources */, + 33133BBD1CFF77C7003FCFC5 /* MDWampUnregistered.m in Sources */, + 33133BA71CFF77C7003FCFC5 /* MDWampInvocation.m in Sources */, + 33133B9B1CFF77C7003FCFC5 /* MDWampChallenge.m in Sources */, + 33133BAD1CFF77C7003FCFC5 /* MDWampPublish.m in Sources */, + 33133B9D1CFF77C7003FCFC5 /* MDWampError.m in Sources */, + 33133BAA1CFF77C7003FCFC5 /* MDWampMessageFactory.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 7604D71A185B499D0087773E /* Sources */ = { + 33133AE31CFF7598003FCFC5 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 765DD2D118E484D000D4C19F /* MDWampTransportMock.m in Sources */, - 760DA6FD18EB0E7D006EC89C /* MDWampMessagesTests.m in Sources */, - 76AE16611A0C29940041016F /* XCTAsyncTestCase.m in Sources */, - 766E10E719E6B4390083173B /* MDWampClientConfigTests.m in Sources */, - 7619E69A18CF8E9F00B0209D /* MDWampTests.m in Sources */, - 764F059E1969AE7B00EB1A8A /* MDWampTransportRawSocketTests.m in Sources */, - 76EF81DB18D1087000DFB13B /* MDWampSerializationMock.m in Sources */, - 760DA6FB18EB0A9E006EC89C /* MDWampMessageFactoryTests.m in Sources */, - 76414F531950C8E900788300 /* MDWampTransportdelegateMock.m in Sources */, - 76CCC6F7185BD1F10056AB98 /* MDWampClientDelegateMock.m in Sources */, - 7698B1B41952278E0045D400 /* MDWampSerializations.m in Sources */, - 766E10ED19E6C1E00083173B /* MDWampAdvancedTests.m in Sources */, - 764374A2194E238D000F29A8 /* MDStackTest.m in Sources */, - 7673B7AF1A0FDA3F0072CDD3 /* MDWampTransportWebSocketTests.m in Sources */, + 33220BB01D009BAB00F3C3DA /* MDWampSerializations.m in Sources */, + 33220BA61D009BAB00F3C3DA /* MDWampTests.m in Sources */, + 33220BB61D009BAB00F3C3DA /* XCTAsyncTestCase.m in Sources */, + 33220BAB1D009BAB00F3C3DA /* MDWampClientDelegateMock.m in Sources */, + 33220BA81D009BAB00F3C3DA /* MDStackTest.m in Sources */, + 33220BB31D009BAB00F3C3DA /* MDWampTransportMock.m in Sources */, + 33220BAA1D009BAB00F3C3DA /* MDWampClientConfigTests.m in Sources */, + 33220BB21D009BAB00F3C3DA /* MDWampTransportdelegateMock.m in Sources */, + 33220BAC1D009BAB00F3C3DA /* MDWampMessageFactoryTests.m in Sources */, + 33220BA91D009BAB00F3C3DA /* MDWampAdvancedTests.m in Sources */, + 33220BAF1D009BAB00F3C3DA /* MDWampSerializationMock.m in Sources */, + 33220BAD1D009BAB00F3C3DA /* MDWampMessagesTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 7604D762185B6B880087773E /* Sources */ = { + 33133AF51CFF75B7003FCFC5 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 76AE160F1A0C24150041016F /* MDWampEvent.m in Sources */, - 76AE16411A0C24150041016F /* MDWampUnsubscribe.m in Sources */, - 76AE16471A0C24150041016F /* MDWampWelcome.m in Sources */, - 765BAFAE19E722C800EC580D /* NSDictionary+MPMessagePack.m in Sources */, - 76AE16061A0C24150041016F /* MDWampCancel.m in Sources */, - 765BAFA219E722C800EC580D /* MPMessagePackReader.m in Sources */, - 76AE161E1A0C24150041016F /* MDWampInvocation.m in Sources */, - 76AE15FD1A0C24150041016F /* MDWampAbort.m in Sources */, - 76AE16261A0C24150041016F /* MDWampPublish.m in Sources */, - 76AE160C1A0C24150041016F /* MDWampError.m in Sources */, - 76AE15F61A0C24150041016F /* MDWampClientConfig.m in Sources */, - 76AE161B1A0C24150041016F /* MDWampInterrupt.m in Sources */, - 76AE16091A0C24150041016F /* MDWampChallenge.m in Sources */, - 76AE163B1A0C24150041016F /* MDWampUnregister.m in Sources */, - 76AE162F1A0C24150041016F /* MDWampRegistered.m in Sources */, - 76F59711196894A60002773C /* GCDAsyncSocket.m in Sources */, - 76AE162C1A0C24150041016F /* MDWampRegister.m in Sources */, - 76AE164A1A0C24150041016F /* MDWampYield.m in Sources */, - 76AE15F01A0C24150041016F /* NSString+MDString.m in Sources */, - 76AE16121A0C24150041016F /* MDWampGoodbye.m in Sources */, - 765BAFAB19E722C800EC580D /* NSArray+MPMessagePack.m in Sources */, - 765BAF9D19E722C800EC580D /* cmp.c in Sources */, - 76AE16441A0C24150041016F /* MDWampUnsubscribed.m in Sources */, - 76AE16511A0C24150041016F /* MDWampSerializationMsgpack.m in Sources */, - 76AE15ED1A0C24150041016F /* NSMutableArray+MDStack.m in Sources */, - 76AE16031A0C24150041016F /* MDWampCall.m in Sources */, - 76AE16351A0C24150041016F /* MDWampSubscribe.m in Sources */, - 76AE16291A0C24150041016F /* MDWampPublished.m in Sources */, - 76AE165B1A0C24150041016F /* MDWampTransportWebSocket.m in Sources */, - 765BAFA819E722C800EC580D /* MPOrderedDictionary.m in Sources */, - 76AE16571A0C24150041016F /* MDWampTransportRawSocket.m in Sources */, - 76AE16181A0C24150041016F /* MDWampHello.m in Sources */, - 76AE16381A0C24150041016F /* MDWampSubscribed.m in Sources */, - 76AE16001A0C24150041016F /* MDWampAuthenticate.m in Sources */, - 76AE15FA1A0C24150041016F /* MDWampConstants.m in Sources */, - 76AE163E1A0C24150041016F /* MDWampUnregistered.m in Sources */, - 76AE164E1A0C24150041016F /* MDWampSerializationJSON.m in Sources */, - 765BAFA519E722C800EC580D /* MPMessagePackWriter.m in Sources */, - 76AE15951A0C23130041016F /* SRWebSocket.m in Sources */, - 76AE16221A0C24150041016F /* MDWampMessageFactory.m in Sources */, - 76AE15F31A0C24150041016F /* MDWamp.m in Sources */, - 76AE16321A0C24150041016F /* MDWampResult.m in Sources */, + 336F57691CFF7A2300811E8B /* MDWampPublished.m in Sources */, + 336F57891CFF7A3100811E8B /* MDWampTransportRawSocket.m in Sources */, + 336F57591CFF7A2300811E8B /* MDWampEvent.m in Sources */, + 336F577D1CFF7A2300811E8B /* MDWampWelcome.m in Sources */, + 336F57641CFF7A2300811E8B /* MDWampMessageFactory.m in Sources */, + 336F574F1CFF7A2300811E8B /* MDWampAuthenticate.m in Sources */, + 336F575D1CFF7A2300811E8B /* MDWampHello.m in Sources */, + 336F57711CFF7A2300811E8B /* MDWampSubscribe.m in Sources */, + 336F57511CFF7A2300811E8B /* MDWampCall.m in Sources */, + 336F576B1CFF7A2300811E8B /* MDWampRegister.m in Sources */, + 336F575F1CFF7A2300811E8B /* MDWampInterrupt.m in Sources */, + 336F57821CFF7A2C00811E8B /* MDWampSerializationJSON.m in Sources */, + 336F574B1CFF7A1A00811E8B /* MDWampConstants.m in Sources */, + 336F577B1CFF7A2300811E8B /* MDWampUnsubscribed.m in Sources */, + 336F57841CFF7A2C00811E8B /* MDWampSerializationMsgpack.m in Sources */, + 336F578C1CFF7A3100811E8B /* MDWampTransportWebSocket.m in Sources */, + 336F57791CFF7A2300811E8B /* MDWampUnsubscribe.m in Sources */, + 336F57671CFF7A2300811E8B /* MDWampPublish.m in Sources */, + 336F576F1CFF7A2300811E8B /* MDWampResult.m in Sources */, + 336F57531CFF7A2300811E8B /* MDWampCancel.m in Sources */, + 336F57751CFF7A2300811E8B /* MDWampUnregister.m in Sources */, + 336F57771CFF7A2300811E8B /* MDWampUnregistered.m in Sources */, + 336F57731CFF7A2300811E8B /* MDWampSubscribed.m in Sources */, + 336F576D1CFF7A2300811E8B /* MDWampRegistered.m in Sources */, + 336F57481CFF7A1A00811E8B /* MDWampClientConfig.m in Sources */, + 336F57571CFF7A2300811E8B /* MDWampError.m in Sources */, + 336F57551CFF7A2300811E8B /* MDWampChallenge.m in Sources */, + 336F574D1CFF7A2300811E8B /* MDWampAbort.m in Sources */, + 336F57611CFF7A2300811E8B /* MDWampInvocation.m in Sources */, + 336F577F1CFF7A2300811E8B /* MDWampYield.m in Sources */, + 336F575B1CFF7A2300811E8B /* MDWampGoodbye.m in Sources */, + 336F57461CFF7A1A00811E8B /* MDWamp.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 76A34EEB195DED5400233B76 /* Sources */ = { + 33133B021CFF7657003FCFC5 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 76AE15871A0C21C50041016F /* main.m in Sources */, - 76AE15841A0C21C50041016F /* ChatStartViewController.m in Sources */, - 76AE15851A0C21C50041016F /* ChatViewController.m in Sources */, - 76AE15821A0C21C50041016F /* AppDelegate.m in Sources */, - 76AE15861A0C21C50041016F /* ConnectViewController.m in Sources */, - 76AE15881A0C21C50041016F /* RegisterRPCViewController.m in Sources */, - 76AE15831A0C21C50041016F /* CallRPCViewController.m in Sources */, + 33133B131CFF7657003FCFC5 /* SecondViewController.m in Sources */, + 33133B0D1CFF7657003FCFC5 /* AppDelegate.m in Sources */, + 33133B101CFF7657003FCFC5 /* FirstViewController.m in Sources */, + 33133B0A1CFF7657003FCFC5 /* main.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 7604D723185B499E0087773E /* PBXTargetDependency */ = { + 33133AEA1CFF7598003FCFC5 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 7604D706185B499D0087773E /* MDWamp */; - targetProxy = 7604D722185B499E0087773E /* PBXContainerItemProxy */; - }; - 7657A3B6195F594800F58BB4 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 7604D765185B6B880087773E /* libMDWamp */; - targetProxy = 7657A3B5195F594800F58BB4 /* PBXContainerItemProxy */; + target = 33133ADC1CFF7598003FCFC5 /* MDWamp iOS */; + targetProxy = 33133AE91CFF7598003FCFC5 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ - 76AE15581A0C21C50041016F /* Main.storyboard */ = { + 33133B141CFF7657003FCFC5 /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( - 76AE15591A0C21C50041016F /* Base */, + 33133B151CFF7657003FCFC5 /* Base */, ); name = Main.storyboard; sourceTree = ""; }; - 76AE155D1A0C21C50041016F /* InfoPlist.strings */ = { + 33133B191CFF7657003FCFC5 /* LaunchScreen.storyboard */ = { isa = PBXVariantGroup; children = ( - 76AE155E1A0C21C50041016F /* en */, + 33133B1A1CFF7657003FCFC5 /* Base */, ); - name = InfoPlist.strings; - sourceTree = ""; - }; - 76CCC6EE185BD1F10056AB98 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 76CCC6EF185BD1F10056AB98 /* en */, - ); - name = InfoPlist.strings; + name = LaunchScreen.storyboard; sourceTree = ""; }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ - 7604D72D185B499E0087773E /* Debug */ = { + 33133AD61CFF751A003FCFC5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + IPHONEOS_DEPLOYMENT_TARGET = 8.4; + MACOSX_DEPLOYMENT_TARGET = 10.10; + }; + name = Debug; + }; + 33133AD71CFF751A003FCFC5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + IPHONEOS_DEPLOYMENT_TARGET = 8.4; + MACOSX_DEPLOYMENT_TARGET = 10.10; + }; + name = Release; + }; + 33133AF01CFF7598003FCFC5 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; @@ -1166,11 +1025,22 @@ CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + FRAMEWORK_SEARCH_PATHS = "$(inherited)"; GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -1179,22 +1049,33 @@ GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 6.1; - MACOSX_DEPLOYMENT_TARGET = 10.8; + INFOPLIST_FILE = "Sources/Info-iOS.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.4; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; + PRODUCT_BUNDLE_IDENTIFIER = "it.mogui.MDWamp-iOS"; + PRODUCT_NAME = MDWamp; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; }; name = Debug; }; - 7604D72E185B499E0087773E /* Release */ = { + 33133AF11CFF7598003FCFC5 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; @@ -1203,285 +1084,390 @@ CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + FRAMEWORK_SEARCH_PATHS = "$(inherited)"; GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 6.1; - MACOSX_DEPLOYMENT_TARGET = 10.8; - SDKROOT = macosx; - }; - name = Release; - }; - 7604D730185B499E0087773E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - FRAMEWORK_VERSION = A; - GCC_GENERATE_TEST_COVERAGE_FILES = NO; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "MDWamp/MDWamp-Prefix.pch"; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/**", - ); - INFOPLIST_FILE = "MDWamp/MDWamp-Info.plist"; - MACOSX_DEPLOYMENT_TARGET = 10.8; - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_BUNDLE_IDENTIFIER = "it.mogui.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = MDWamp; - WRAPPER_EXTENSION = framework; - }; - name = Debug; - }; - 7604D731185B499E0087773E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - FRAMEWORK_VERSION = A; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "MDWamp/MDWamp-Prefix.pch"; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/**", - ); - INFOPLIST_FILE = "MDWamp/MDWamp-Info.plist"; - MACOSX_DEPLOYMENT_TARGET = 10.8; - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_BUNDLE_IDENTIFIER = "it.mogui.${PRODUCT_NAME:rfc1034identifier}"; + INFOPLIST_FILE = "Sources/Info-iOS.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.4; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = NO; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_BUNDLE_IDENTIFIER = "it.mogui.MDWamp-iOS"; PRODUCT_NAME = MDWamp; - WRAPPER_EXTENSION = framework; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; }; name = Release; }; - 7604D733185B499E0087773E /* Debug */ = { + 33133AF31CFF7598003FCFC5 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/MDWamp.framework/Versions/A/MDWamp"; - COMBINE_HIDPI_IMAGES = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(DEVELOPER_FRAMEWORKS_DIR)", - "$(inherited)", - ); - GCC_GENERATE_TEST_COVERAGE_FILES = NO; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "MDWamp/MDWamp-Prefix.pch"; + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/**", - ); - INFOPLIST_FILE = "MDWampTests/MDWampTests-Info.plist"; - MACOSX_DEPLOYMENT_TARGET = 10.8; - OTHER_LDFLAGS = ( - "$(inherited)", - "-framework", - XCTest, - ); - PRODUCT_BUNDLE_IDENTIFIER = "it.mogui.${PRODUCT_NAME:rfc1034identifier}"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = "MDWamp iOSTests/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_BUNDLE_IDENTIFIER = "it.mogui.MDWamp-iOSTests"; PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUNDLE_LOADER)"; - WRAPPER_EXTENSION = xctest; + SDKROOT = iphoneos; }; name = Debug; }; - 7604D734185B499E0087773E /* Release */ = { + 33133AF41CFF7598003FCFC5 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/MDWamp.framework/Versions/A/MDWamp"; - COMBINE_HIDPI_IMAGES = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(DEVELOPER_FRAMEWORKS_DIR)", - "$(inherited)", - ); - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "MDWamp/MDWamp-Prefix.pch"; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/**", - ); - INFOPLIST_FILE = "MDWampTests/MDWampTests-Info.plist"; - MACOSX_DEPLOYMENT_TARGET = 10.8; - OTHER_LDFLAGS = ( - "$(inherited)", - "-framework", - XCTest, - ); - PRODUCT_BUNDLE_IDENTIFIER = "it.mogui.${PRODUCT_NAME:rfc1034identifier}"; + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = "MDWamp iOSTests/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = "it.mogui.MDWamp-iOSTests"; PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUNDLE_LOADER)"; - WRAPPER_EXTENSION = xctest; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; }; name = Release; }; - 7604D783185B6B880087773E /* Debug */ = { + 33133B001CFF75B7003FCFC5 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; - DSTROOT = /tmp/libMDWamp.dst; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "MDWamp/MDWamp-Prefix.pch"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + FRAMEWORK_SEARCH_PATHS = "$(inherited)"; + FRAMEWORK_VERSION = A; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/**", - ); - IPHONEOS_DEPLOYMENT_TARGET = 7.0; - OTHER_LDFLAGS = "-ObjC"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = "Sources/Info-OSX.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.10; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_BUNDLE_IDENTIFIER = "it.mogui.MDWamp-OSX"; PRODUCT_NAME = MDWamp; - SDKROOT = iphoneos; + SDKROOT = macosx; SKIP_INSTALL = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; }; name = Debug; }; - 7604D784185B6B880087773E /* Release */ = { + 33133B011CFF75B7003FCFC5 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; - DSTROOT = /tmp/libMDWamp.dst; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "MDWamp/MDWamp-Prefix.pch"; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/**", - ); - IPHONEOS_DEPLOYMENT_TARGET = 7.0; - OTHER_LDFLAGS = "-ObjC"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + FRAMEWORK_SEARCH_PATHS = "$(inherited)"; + FRAMEWORK_VERSION = A; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = "Sources/Info-OSX.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.10; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = "it.mogui.MDWamp-OSX"; PRODUCT_NAME = MDWamp; - SDKROOT = iphoneos; + SDKROOT = macosx; SKIP_INSTALL = YES; - VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; }; name = Release; }; - 76A34F1E195DED5400233B76 /* Debug */ = { + 33133B291CFF7658003FCFC5 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(DEVELOPER_FRAMEWORKS_DIR)", - ); - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "MDWampDemo/MDWampDemo-Prefix.pch"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - INFOPLIST_FILE = "MDWampDemo/MDWampDemo-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 7.1; - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_BUNDLE_IDENTIFIER = "it.mogui.mdwamp.${PRODUCT_NAME:rfc1034identifier}"; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = "MDWamp Demo/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_BUNDLE_IDENTIFIER = "it.mogui.MDWamp-Demo"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; - WRAPPER_EXTENSION = app; + TARGETED_DEVICE_FAMILY = 2; }; name = Debug; }; - 76A34F1F195DED5400233B76 /* Release */ = { + 33133B2A1CFF7658003FCFC5 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(DEVELOPER_FRAMEWORKS_DIR)", - ); - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "MDWampDemo/MDWampDemo-Prefix.pch"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - INFOPLIST_FILE = "MDWampDemo/MDWampDemo-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 7.1; - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_BUNDLE_IDENTIFIER = "it.mogui.mdwamp.${PRODUCT_NAME:rfc1034identifier}"; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = "MDWamp Demo/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = "it.mogui.MDWamp-Demo"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = 2; VALIDATE_PRODUCT = YES; - WRAPPER_EXTENSION = app; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 7604D701185B499D0087773E /* Build configuration list for PBXProject "MDWamp" */ = { + 33133AD51CFF751A003FCFC5 /* Build configuration list for PBXProject "MDWamp" */ = { isa = XCConfigurationList; buildConfigurations = ( - 7604D72D185B499E0087773E /* Debug */, - 7604D72E185B499E0087773E /* Release */, + 33133AD61CFF751A003FCFC5 /* Debug */, + 33133AD71CFF751A003FCFC5 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 7604D72F185B499E0087773E /* Build configuration list for PBXNativeTarget "MDWamp" */ = { + 33133AEF1CFF7598003FCFC5 /* Build configuration list for PBXNativeTarget "MDWamp iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 7604D730185B499E0087773E /* Debug */, - 7604D731185B499E0087773E /* Release */, + 33133AF01CFF7598003FCFC5 /* Debug */, + 33133AF11CFF7598003FCFC5 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 7604D732185B499E0087773E /* Build configuration list for PBXNativeTarget "MDWampTests" */ = { + 33133AF21CFF7598003FCFC5 /* Build configuration list for PBXNativeTarget "MDWamp iOSTests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 7604D733185B499E0087773E /* Debug */, - 7604D734185B499E0087773E /* Release */, + 33133AF31CFF7598003FCFC5 /* Debug */, + 33133AF41CFF7598003FCFC5 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 7604D782185B6B880087773E /* Build configuration list for PBXNativeTarget "libMDWamp" */ = { + 33133AFF1CFF75B7003FCFC5 /* Build configuration list for PBXNativeTarget "MDWamp OSX" */ = { isa = XCConfigurationList; buildConfigurations = ( - 7604D783185B6B880087773E /* Debug */, - 7604D784185B6B880087773E /* Release */, + 33133B001CFF75B7003FCFC5 /* Debug */, + 33133B011CFF75B7003FCFC5 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 76A34F1D195DED5400233B76 /* Build configuration list for PBXNativeTarget "MDWampDemo" */ = { + 33133B281CFF7658003FCFC5 /* Build configuration list for PBXNativeTarget "MDWamp Demo" */ = { isa = XCConfigurationList; buildConfigurations = ( - 76A34F1E195DED5400233B76 /* Debug */, - 76A34F1F195DED5400233B76 /* Release */, + 33133B291CFF7658003FCFC5 /* Debug */, + 33133B2A1CFF7658003FCFC5 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; - rootObject = 7604D6FE185B499D0087773E /* Project object */; + rootObject = 33133AD21CFF751A003FCFC5 /* Project object */; } diff --git a/MDWamp.xcodeproj/project.xcworkspace/xcshareddata/MDWamp.xcscmblueprint b/MDWamp.xcodeproj/project.xcworkspace/xcshareddata/MDWamp.xcscmblueprint new file mode 100644 index 0000000..1783c36 --- /dev/null +++ b/MDWamp.xcodeproj/project.xcworkspace/xcshareddata/MDWamp.xcscmblueprint @@ -0,0 +1,51 @@ +{ + "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "65D58A67FEF44BCFD55A1DA7714DB9E9B2A1548B", + "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { + + }, + "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { + "ABB939127996C66F7E852A780552ADEEF03C6B13" : 0, + "65D58A67FEF44BCFD55A1DA7714DB9E9B2A1548B" : 0, + "A4A99C2526C784AB11C9858B5D8E389AE599C280" : 0, + "697C717FC055E6E0717DFD1A6FDE9FC75B2B36B5" : 0, + "1C75F1C5CFCB95B3702F6F632FA05ED5244B519E" : 0 + }, + "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "23320776-ACCE-4F8E-AC31-8A94C106556C", + "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { + "ABB939127996C66F7E852A780552ADEEF03C6B13" : "MDWamp\/Carthage\/Checkouts\/SocketRocket\/", + "65D58A67FEF44BCFD55A1DA7714DB9E9B2A1548B" : "MDWamp\/", + "A4A99C2526C784AB11C9858B5D8E389AE599C280" : "MDWamp\/Carthage\/Checkouts\/GHODictionary\/", + "697C717FC055E6E0717DFD1A6FDE9FC75B2B36B5" : "MDWamp\/Carthage\/Checkouts\/MPMessagePack\/", + "1C75F1C5CFCB95B3702F6F632FA05ED5244B519E" : "MDWamp\/Carthage\/Checkouts\/CocoaAsyncSocket\/" + }, + "DVTSourceControlWorkspaceBlueprintNameKey" : "MDWamp", + "DVTSourceControlWorkspaceBlueprintVersion" : 204, + "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "MDWamp.xcodeproj", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ + { + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/robbiehanson\/CocoaAsyncSocket.git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "1C75F1C5CFCB95B3702F6F632FA05ED5244B519E" + }, + { + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:mogui\/MDWamp.git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "65D58A67FEF44BCFD55A1DA7714DB9E9B2A1548B" + }, + { + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/gabriel\/MPMessagePack.git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "697C717FC055E6E0717DFD1A6FDE9FC75B2B36B5" + }, + { + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/gabriel\/GHODictionary.git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "A4A99C2526C784AB11C9858B5D8E389AE599C280" + }, + { + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/facebook\/SocketRocket.git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "ABB939127996C66F7E852A780552ADEEF03C6B13" + } + ] +} \ No newline at end of file diff --git a/MDWamp.xcodeproj/xcshareddata/xcschemes/libMDWamp.xcscheme b/MDWamp.xcodeproj/xcshareddata/xcschemes/MDWamp OSX.xcscheme similarity index 82% rename from MDWamp.xcodeproj/xcshareddata/xcschemes/libMDWamp.xcscheme rename to MDWamp.xcodeproj/xcshareddata/xcschemes/MDWamp OSX.xcscheme index 182a7b4..b75aac7 100644 --- a/MDWamp.xcodeproj/xcshareddata/xcschemes/libMDWamp.xcscheme +++ b/MDWamp.xcodeproj/xcshareddata/xcschemes/MDWamp OSX.xcscheme @@ -1,6 +1,6 @@ @@ -45,9 +45,9 @@ @@ -63,9 +63,9 @@ diff --git a/MDWamp.xcodeproj/xcshareddata/xcschemes/MDWampDemo.xcscheme b/MDWamp.xcodeproj/xcshareddata/xcschemes/MDWamp iOS.xcscheme similarity index 68% rename from MDWamp.xcodeproj/xcshareddata/xcschemes/MDWampDemo.xcscheme rename to MDWamp.xcodeproj/xcshareddata/xcschemes/MDWamp iOS.xcscheme index 164b11e..1bf8a50 100644 --- a/MDWamp.xcodeproj/xcshareddata/xcschemes/MDWampDemo.xcscheme +++ b/MDWamp.xcodeproj/xcshareddata/xcschemes/MDWamp iOS.xcscheme @@ -1,6 +1,6 @@ @@ -28,13 +28,23 @@ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES"> + + + + @@ -51,16 +61,15 @@ debugDocumentVersioning = "YES" debugServiceExtension = "internal" allowLocationSimulation = "YES"> - + - + @@ -70,16 +79,15 @@ savedToolIdentifier = "" useCustomWorkingDirectory = "NO" debugDocumentVersioning = "YES"> - + - + diff --git a/MDWamp.xcodeproj/xcshareddata/xcschemes/MDWamp.xcscheme b/MDWamp.xcodeproj/xcshareddata/xcschemes/MDWamp.xcscheme deleted file mode 100644 index 677d202..0000000 --- a/MDWamp.xcodeproj/xcshareddata/xcschemes/MDWamp.xcscheme +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/MDWamp.xcworkspace/contents.xcworkspacedata b/MDWamp.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..974d8f4 --- /dev/null +++ b/MDWamp.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,19 @@ + + + + + + + + + + + + + diff --git a/MDWamp.xcworkspace/xcshareddata/MDWamp.xcscmblueprint b/MDWamp.xcworkspace/xcshareddata/MDWamp.xcscmblueprint new file mode 100644 index 0000000..e134b32 --- /dev/null +++ b/MDWamp.xcworkspace/xcshareddata/MDWamp.xcscmblueprint @@ -0,0 +1,51 @@ +{ + "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "65D58A67FEF44BCFD55A1DA7714DB9E9B2A1548B", + "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { + + }, + "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { + "ABB939127996C66F7E852A780552ADEEF03C6B13" : 0, + "65D58A67FEF44BCFD55A1DA7714DB9E9B2A1548B" : 0, + "A4A99C2526C784AB11C9858B5D8E389AE599C280" : 0, + "697C717FC055E6E0717DFD1A6FDE9FC75B2B36B5" : 0, + "1C75F1C5CFCB95B3702F6F632FA05ED5244B519E" : 0 + }, + "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "4058E596-66E4-4ADF-8C96-A7E0812C90BF", + "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { + "ABB939127996C66F7E852A780552ADEEF03C6B13" : "MDWamp\/Carthage\/Checkouts\/SocketRocket\/", + "65D58A67FEF44BCFD55A1DA7714DB9E9B2A1548B" : "MDWamp\/", + "A4A99C2526C784AB11C9858B5D8E389AE599C280" : "MDWamp\/Carthage\/Checkouts\/GHODictionary\/", + "697C717FC055E6E0717DFD1A6FDE9FC75B2B36B5" : "MDWamp\/Submodules\/MPMessagePack\/", + "1C75F1C5CFCB95B3702F6F632FA05ED5244B519E" : "MDWamp\/Carthage\/Checkouts\/CocoaAsyncSocket\/" + }, + "DVTSourceControlWorkspaceBlueprintNameKey" : "MDWamp", + "DVTSourceControlWorkspaceBlueprintVersion" : 204, + "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "MDWamp.xcworkspace", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ + { + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/robbiehanson\/CocoaAsyncSocket.git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "1C75F1C5CFCB95B3702F6F632FA05ED5244B519E" + }, + { + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:mogui\/MDWamp.git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "65D58A67FEF44BCFD55A1DA7714DB9E9B2A1548B" + }, + { + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/gabriel\/MPMessagePack.git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "697C717FC055E6E0717DFD1A6FDE9FC75B2B36B5" + }, + { + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/gabriel\/GHODictionary.git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "A4A99C2526C784AB11C9858B5D8E389AE599C280" + }, + { + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/facebook\/SocketRocket.git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "ABB939127996C66F7E852A780552ADEEF03C6B13" + } + ] +} \ No newline at end of file diff --git a/MDWamp/MDWamp-Prefix.pch b/MDWamp/MDWamp-Prefix.pch deleted file mode 100644 index eb2007e..0000000 --- a/MDWamp/MDWamp-Prefix.pch +++ /dev/null @@ -1,9 +0,0 @@ -// -// Prefix header -// -// The contents of this file are implicitly included at the beginning of every source file. -// - -#ifdef __OBJC__ - #import -#endif diff --git a/MDWampDemo/MDWampDemo-Prefix.pch b/MDWampDemo/MDWampDemo-Prefix.pch deleted file mode 100644 index 01516be..0000000 --- a/MDWampDemo/MDWampDemo-Prefix.pch +++ /dev/null @@ -1,20 +0,0 @@ -// -// Prefix header -// -// The contents of this file are implicitly included at the beginning of every source file. -// - -#import -#import "AppDelegate.h" - -#ifndef __IPHONE_5_0 -#warning "This project uses features only available in iOS SDK 5.0 and later." -#endif - -#ifdef __OBJC__ - #import - #import - - - #define AppDel (AppDelegate *)[[UIApplication sharedApplication] delegate] -#endif diff --git a/MDWampDemo/resources/Base.lproj/Main.storyboard b/MDWampDemo/resources/Base.lproj/Main.storyboard deleted file mode 100644 index 898962e..0000000 --- a/MDWampDemo/resources/Base.lproj/Main.storyboard +++ /dev/null @@ -1,500 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/MDWampDemo/resources/Images.xcassets/AppIcon.appiconset/Contents.json b/MDWampDemo/resources/Images.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index a396706..0000000 --- a/MDWampDemo/resources/Images.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/MDWampDemo/resources/Images.xcassets/LaunchImage.launchimage/Contents.json b/MDWampDemo/resources/Images.xcassets/LaunchImage.launchimage/Contents.json deleted file mode 100644 index c79ebd3..0000000 --- a/MDWampDemo/resources/Images.xcassets/LaunchImage.launchimage/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "orientation" : "portrait", - "idiom" : "iphone", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "iphone", - "subtype" : "retina4", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/MDWampDemo/resources/Images.xcassets/first.imageset/Contents.json b/MDWampDemo/resources/Images.xcassets/first.imageset/Contents.json deleted file mode 100644 index a345b09..0000000 --- a/MDWampDemo/resources/Images.xcassets/first.imageset/Contents.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "first.png" - }, - { - "idiom" : "universal", - "scale" : "2x", - "filename" : "first@2x.png" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/MDWampDemo/resources/Images.xcassets/first.imageset/first.png b/MDWampDemo/resources/Images.xcassets/first.imageset/first.png deleted file mode 100644 index 9300ee2..0000000 Binary files a/MDWampDemo/resources/Images.xcassets/first.imageset/first.png and /dev/null differ diff --git a/MDWampDemo/resources/Images.xcassets/first.imageset/first@2x.png b/MDWampDemo/resources/Images.xcassets/first.imageset/first@2x.png deleted file mode 100644 index 374d78e..0000000 Binary files a/MDWampDemo/resources/Images.xcassets/first.imageset/first@2x.png and /dev/null differ diff --git a/MDWampDemo/resources/Images.xcassets/second.imageset/Contents.json b/MDWampDemo/resources/Images.xcassets/second.imageset/Contents.json deleted file mode 100644 index 2136402..0000000 --- a/MDWampDemo/resources/Images.xcassets/second.imageset/Contents.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "second.png" - }, - { - "idiom" : "universal", - "scale" : "2x", - "filename" : "second@2x.png" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/MDWampDemo/resources/Images.xcassets/second.imageset/second.png b/MDWampDemo/resources/Images.xcassets/second.imageset/second.png deleted file mode 100644 index 1100b48..0000000 Binary files a/MDWampDemo/resources/Images.xcassets/second.imageset/second.png and /dev/null differ diff --git a/MDWampDemo/resources/Images.xcassets/second.imageset/second@2x.png b/MDWampDemo/resources/Images.xcassets/second.imageset/second@2x.png deleted file mode 100644 index 368d38f..0000000 Binary files a/MDWampDemo/resources/Images.xcassets/second.imageset/second@2x.png and /dev/null differ diff --git a/MDWampDemo/resources/broken_link-32.png b/MDWampDemo/resources/broken_link-32.png deleted file mode 100644 index e31fe7a..0000000 Binary files a/MDWampDemo/resources/broken_link-32.png and /dev/null differ diff --git a/MDWampDemo/resources/collaboration.png b/MDWampDemo/resources/collaboration.png deleted file mode 100644 index 3bd69a3..0000000 Binary files a/MDWampDemo/resources/collaboration.png and /dev/null differ diff --git a/MDWampDemo/resources/collaboration@2x.png b/MDWampDemo/resources/collaboration@2x.png deleted file mode 100644 index 0a58f8b..0000000 Binary files a/MDWampDemo/resources/collaboration@2x.png and /dev/null differ diff --git a/MDWampDemo/resources/en.lproj/InfoPlist.strings b/MDWampDemo/resources/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28f..0000000 --- a/MDWampDemo/resources/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/MDWampDemo/resources/link-32.png b/MDWampDemo/resources/link-32.png deleted file mode 100755 index 100a336..0000000 Binary files a/MDWampDemo/resources/link-32.png and /dev/null differ diff --git a/MDWampDemo/resources/online-32.png b/MDWampDemo/resources/online-32.png deleted file mode 100644 index 55b8a6a..0000000 Binary files a/MDWampDemo/resources/online-32.png and /dev/null differ diff --git a/MDWampDemo/resources/online-32@2x.png b/MDWampDemo/resources/online-32@2x.png deleted file mode 100644 index 63de7a5..0000000 Binary files a/MDWampDemo/resources/online-32@2x.png and /dev/null differ diff --git a/MDWampDemo/resources/run_command.png b/MDWampDemo/resources/run_command.png deleted file mode 100644 index 633446a..0000000 Binary files a/MDWampDemo/resources/run_command.png and /dev/null differ diff --git a/MDWampDemo/resources/run_command@2x.png b/MDWampDemo/resources/run_command@2x.png deleted file mode 100644 index 53e3c5b..0000000 Binary files a/MDWampDemo/resources/run_command@2x.png and /dev/null differ diff --git a/MDWampDemo/resources/save_as.png b/MDWampDemo/resources/save_as.png deleted file mode 100644 index bbe8364..0000000 Binary files a/MDWampDemo/resources/save_as.png and /dev/null differ diff --git a/MDWampDemo/resources/save_as@2x.png b/MDWampDemo/resources/save_as@2x.png deleted file mode 100644 index 038ae3a..0000000 Binary files a/MDWampDemo/resources/save_as@2x.png and /dev/null differ diff --git a/MDWampDemo/src/AppDelegate.h b/MDWampDemo/src/AppDelegate.h deleted file mode 100644 index 2b7cad4..0000000 --- a/MDWampDemo/src/AppDelegate.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// AppDelegate.h -// MDWampDemo -// -// Created by Niko Usai on 27/06/14. -// Copyright (c) 2014 mogui.it. All rights reserved. -// - -#import -#import "MDWamp.h" - - - -@interface AppDelegate : UIResponder - -@property (strong, nonatomic) UIWindow *window; -@property (strong, nonatomic) MDWamp *wampConnection; -@end diff --git a/MDWampDemo/src/CallRPCViewController.h b/MDWampDemo/src/CallRPCViewController.h deleted file mode 100644 index 3071ec8..0000000 --- a/MDWampDemo/src/CallRPCViewController.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// CallRPCViewController.h -// MDWamp -// -// Created by Niko Usai on 04/07/14. -// Copyright (c) 2014 mogui.it. All rights reserved. -// - -#import - -@interface CallRPCViewController : UIViewController - -@property (weak, nonatomic) IBOutlet UITextField *procedureName; -@property (weak, nonatomic) IBOutlet UITextView *resultText; -- (IBAction)callProcedure:(id)sender; -@end diff --git a/MDWampDemo/src/CallRPCViewController.m b/MDWampDemo/src/CallRPCViewController.m deleted file mode 100644 index 595056d..0000000 --- a/MDWampDemo/src/CallRPCViewController.m +++ /dev/null @@ -1,89 +0,0 @@ -// -// CallRPCViewController.m -// MDWamp -// -// Created by Niko Usai on 04/07/14. -// Copyright (c) 2014 mogui.it. All rights reserved. -// - -#import "CallRPCViewController.h" - -@interface CallRPCViewController () { - UIImageView *tmpIv; -} - -@end - -@implementation CallRPCViewController - -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil -{ - self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; - if (self) { - // Custom initialization - } - return self; -} - -- (void)viewDidLoad -{ - [super viewDidLoad]; - // Do any additional setup after loading the view. -} - -- (void) viewDidAppear:(BOOL)animated -{ - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ - if (![[AppDel wampConnection] isConnected]) { - - self.tabBarController.selectedViewController = self.tabBarController.viewControllers[0]; - - UIAlertView *av = [[UIAlertView alloc] initWithTitle:@"!!" message:@"You must first connect!" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil]; - [av show]; - } - - }); -} - - --(BOOL)textFieldShouldReturn:(UITextField *)textField { - //Keyboard becomes visible - [textField resignFirstResponder]; - return YES; -} - -- (IBAction)callProcedure:(id)sender { - if (tmpIv) { - [tmpIv removeFromSuperview]; - } - - [[AppDel wampConnection] call:self.procedureName.text args:nil kwArgs:nil options:nil complete:^(MDWampResult *result, NSError *error) { - self.resultText.text = @""; - if (error) { - self.resultText.text = error.localizedDescription; - return; - } - - if (result.argumentsKw) { // is the device info - NSString *res = [NSString stringWithFormat:@"name: %@\nos: %@ %@", result.argumentsKw[@"name"], result.argumentsKw[@"systemName"], result.argumentsKw[@"systemVersion"]]; - self.resultText.text = res; - } else { // else is the screenshot - // NOTICE: in a real world application you will make - // a sort of application protocol with this messages to differ the response or you just know what procedures returns :P - NSString *arr = result.result; - NSData *decoded = [[NSData alloc] initWithBase64EncodedString:arr options:NSDataBase64DecodingIgnoreUnknownCharacters]; - UIImage *img = [UIImage imageWithData:decoded]; - tmpIv = [[UIImageView alloc] initWithFrame:self.resultText.frame]; - tmpIv.contentMode = UIViewContentModeScaleAspectFit; - tmpIv.image = img; - [UIView transitionWithView:self.view duration:0.5 - options:UIViewAnimationOptionTransitionCrossDissolve - animations:^ { - [self.view addSubview:tmpIv]; - } completion:nil]; - - } - }]; - -} -@end diff --git a/MDWampDemo/src/ChatStartViewController.h b/MDWampDemo/src/ChatStartViewController.h deleted file mode 100644 index c048ede..0000000 --- a/MDWampDemo/src/ChatStartViewController.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// ChatStartViewController.h -// MDWamp -// -// Created by Niko Usai on 27/06/14. -// Copyright (c) 2014 mogui.it. All rights reserved. -// - -#import - -@interface ChatStartViewController : UIViewController -@property (weak, nonatomic) IBOutlet UITextField *roomField; -@property (weak, nonatomic) IBOutlet UITextField *nickField; - -- (IBAction)join:(id)sender; -@end diff --git a/MDWampDemo/src/ChatStartViewController.m b/MDWampDemo/src/ChatStartViewController.m deleted file mode 100644 index 4b5d705..0000000 --- a/MDWampDemo/src/ChatStartViewController.m +++ /dev/null @@ -1,68 +0,0 @@ -// -// ChatStartViewController.m -// MDWamp -// -// Created by Niko Usai on 27/06/14. -// Copyright (c) 2014 mogui.it. All rights reserved. -// - -#import "ChatStartViewController.h" -#import "ChatViewController.h" -@interface ChatStartViewController () - -@end - -@implementation ChatStartViewController - -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil -{ - self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; - if (self) { - // Custom initialization - } - return self; -} - -- (void)viewDidLoad -{ - [super viewDidLoad]; - // Do any additional setup after loading the view. -} -- (void) viewDidAppear:(BOOL)animated -{ - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ - if (![[AppDel wampConnection] isConnected]) { - - self.tabBarController.selectedViewController = self.tabBarController.viewControllers[0]; - - UIAlertView *av = [[UIAlertView alloc] initWithTitle:@"!!" message:@"You must first connect!" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil]; - [av show]; - } - - }); -} -- (void)didReceiveMemoryWarning -{ - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender -{ - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - ChatViewController *vc = segue.destinationViewController; - vc.room = self.roomField.text; - vc.nickname = self.nickField.text; -} - -- (IBAction)join:(id)sender { -} -@end diff --git a/MDWampDemo/src/ChatViewController.h b/MDWampDemo/src/ChatViewController.h deleted file mode 100644 index ccafb1d..0000000 --- a/MDWampDemo/src/ChatViewController.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// SecondViewController.h -// MDWampDemo -// -// Created by Niko Usai on 27/06/14. -// Copyright (c) 2014 mogui.it. All rights reserved. -// - -#import - -@interface ChatViewController : UIViewController -@property (weak, nonatomic) IBOutlet UILabel *roomNameField; -@property (weak, nonatomic) IBOutlet UITableView *tableView; -@property (weak, nonatomic) IBOutlet UITextField *inputText; -@property (strong, nonatomic) NSString *nickname; -@property (strong, nonatomic) NSString *room; -@property (weak, nonatomic) IBOutlet UIView *inputControls; -- (IBAction)part:(id)sender; -- (IBAction)send:(id)sender; - -@end diff --git a/MDWampDemo/src/ChatViewController.m b/MDWampDemo/src/ChatViewController.m deleted file mode 100644 index 79f89e7..0000000 --- a/MDWampDemo/src/ChatViewController.m +++ /dev/null @@ -1,136 +0,0 @@ -// -// SecondViewController.m -// MDWampDemo -// -// Created by Niko Usai on 27/06/14. -// Copyright (c) 2014 mogui.it. All rights reserved. -// - -#import "ChatViewController.h" - -@interface ChatViewController () -@property (nonatomic, strong) NSMutableArray *messages; -@property (assign) BOOL cellIsLeft; - -@end - -@implementation ChatViewController - -- (void)viewDidLoad -{ - [super viewDidLoad]; - self.roomNameField.text = self.room; - self.messages = [[NSMutableArray alloc] init]; - MDWamp *wamp = [AppDel wampConnection]; - [wamp subscribe:[NSString stringWithFormat:@"com.mogui.%@", [self.room stringByReplacingOccurrencesOfString:@" " withString:@"-"]] options:nil onEvent:^(MDWampEvent *payload) { - if(payload.arguments && [payload.arguments count] > 0){ - - // message arrives - [self.messages addObject:payload.arguments[0]]; - [self.tableView reloadData]; - NSIndexPath *ip = [NSIndexPath indexPathForRow:([self.messages count]-1) inSection:0]; - [self.tableView scrollToRowAtIndexPath:ip atScrollPosition:UITableViewScrollPositionBottom animated:YES]; - } - } result:^(NSError *error) { - if (error) { - UIAlertView *av = [[UIAlertView alloc] initWithTitle:@"!!" message:error.localizedDescription delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil]; - [av show]; - [self.navigationController popViewControllerAnimated:YES]; - } else { - NSLog(@"Connectd to chat"); - } - }]; -} - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - return self.messages.count; -} - - -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - - BOOL samePosterAsBefore = NO; - - if (indexPath.row == 0) { - self.cellIsLeft = YES; - } else { - samePosterAsBefore = [self.messages[indexPath.row][@"nickname"] isEqual:self.messages[indexPath.row-1][@"nickname"]]; - - if (!samePosterAsBefore) { - self.cellIsLeft = !self.cellIsLeft; - } - } - - NSString *identifier; - if (self.cellIsLeft) { - identifier = @"LeftCell"; - } else { - identifier = @"RightCell"; - } - - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier forIndexPath:indexPath]; - - UILabel *name = (UILabel*)[cell viewWithTag:1]; - UILabel *text = (UILabel*)[cell viewWithTag:2]; - - if (indexPath.row == 0 || !samePosterAsBefore) { - name.text = self.messages[indexPath.row][@"nickname"]; - } else { - name.text = @""; - } - NSLog(@"%@", self.messages[indexPath.row]); - text.text = self.messages[indexPath.row][@"text"]; - return cell; -} - --(void)textFieldDidBeginEditing:(UITextField *)textField { - //Keyboard becomes visible - self.inputControls.frame = CGRectMake(self.inputControls.frame.origin.x, - self.inputControls.frame.origin.y - 215, - self.inputControls.frame.size.width, - self.inputControls.frame.size.height); //resize - CGRect tv = self.tableView.frame; - tv.size.height = tv.size.height - 215; - self.tableView.frame = tv; - -} - - -- (BOOL)textFieldShouldReturn:(UITextField *)textField -{ - [textField resignFirstResponder]; - self.inputControls.frame = CGRectMake(self.inputControls.frame.origin.x, - self.inputControls.frame.origin.y + 215, - self.inputControls.frame.size.width, - self.inputControls.frame.size.height); //resize - CGRect tv = self.tableView.frame; - tv.size.height = tv.size.height + 215; - self.tableView.frame = tv; - - return YES; -} - -- (IBAction)part:(id)sender { - // unregister - MDWamp *wamp = [AppDel wampConnection]; - [wamp unsubscribe:[NSString stringWithFormat:@"com.mogui.%@", [self.room stringByReplacingOccurrencesOfString:@" " withString:@"-"]] result:^(NSError *error) { - NSLog(@"%@", error); - if (!error) { - [self dismissViewControllerAnimated:YES completion:nil]; - } - }]; - -} - -- (IBAction)send:(id)sender { - if (![self.inputText.text isEqual:@""]) { - - - NSDictionary *payload = @{@"nickname":self.nickname, @"text":self.inputText.text}; - - [[AppDel wampConnection] publishTo:[NSString stringWithFormat:@"com.mogui.%@", [self.room stringByReplacingOccurrencesOfString:@" " withString:@"-"]] args:@[payload] kw:nil options:@{@"exclude_me":@NO} result:nil]; - self.inputText.text = @""; - - } -} -@end diff --git a/MDWampDemo/src/ConnectViewController.h b/MDWampDemo/src/ConnectViewController.h deleted file mode 100644 index 4bf93bd..0000000 --- a/MDWampDemo/src/ConnectViewController.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// FirstViewController.h -// MDWampDemo -// -// Created by Niko Usai on 27/06/14. -// Copyright (c) 2014 mogui.it. All rights reserved. -// - -#import - -@interface ConnectViewController : UIViewController -@property (weak, nonatomic) IBOutlet UITextField *hostField; -@property (weak, nonatomic) IBOutlet UITextField *realmField; -@property (weak, nonatomic) IBOutlet UIButton *connectButton; -@property (weak, nonatomic) IBOutlet UITextView *serverDetails; -@property (weak, nonatomic) IBOutlet UIButton *connectIcon; - - -- (IBAction)connect:(id)sender; -@end diff --git a/MDWampDemo/src/ConnectViewController.m b/MDWampDemo/src/ConnectViewController.m deleted file mode 100644 index 20bc3ca..0000000 --- a/MDWampDemo/src/ConnectViewController.m +++ /dev/null @@ -1,80 +0,0 @@ -// -// FirstViewController.m -// MDWampDemo -// -// Created by Niko Usai on 27/06/14. -// Copyright (c) 2014 mogui.it. All rights reserved. -// - -#import "ConnectViewController.h" - - -@interface ConnectViewController () -@property (assign) BOOL connected; -@end - -@implementation ConnectViewController - -- (void)viewDidLoad -{ - [super viewDidLoad]; - MDWampTransportWebSocket *transport = [[MDWampTransportWebSocket alloc] initWithServer:[NSURL URLWithString:self.hostField.text] protocolVersions:@[kMDWampProtocolWamp2json]]; - - // Test Raw socket - // MDWampTransportRawSocket *transport = [[MDWampTransportRawSocket alloc] initWithHost:@"127.0.0.1" port:9000]; - // [transport setSerialization:kMDWampSerializationJSON]; - // - (AppDel).wampConnection = [[MDWamp alloc] initWithTransport:transport realm:self.realmField.text delegate:self]; - - // Do any additional setup after loading the view, typically from a nib. -} -- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField -{ - if (self.connected) { - return NO; - } - return YES; -} - -- (BOOL)textFieldShouldReturn:(UITextField *)textField { - [textField resignFirstResponder]; - return YES; -} - -- (void)didReceiveMemoryWarning -{ - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - -- (IBAction)connect:(id)sender { - // CHECK empty fields - if (!self.connected) { - - [(AppDel).wampConnection connect]; - } else { - [(AppDel).wampConnection disconnect]; - } -} - -- (void) mdwamp:(MDWamp*)wamp sessionEstablished:(NSDictionary*)info { - - self.connected = YES; - [self.connectButton setTitle:@"DISCONNECT" forState:UIControlStateNormal]; - NSLog(@"serverd details: %@", info); - [self.connectIcon setHighlighted:YES]; - self.serverDetails.text = [NSString stringWithFormat:@"\n"\ - @"authid:\t %@\n"\ - @"authmethod:\t %@\n"\ - @"authrole:\t %@\n"\ - @"roles:\t %@\n", info[@"authid"], info[@"authmethod"], info[@"authrole"], [[info[@"roles"] allKeys] componentsJoinedByString:@", "]]; -} - -- (void) mdwamp:(MDWamp *)wamp closedSession:(NSInteger)code reason:(NSString*)reason details:(NSDictionary *)details { - [self.connectIcon setHighlighted:NO]; - self.connected = NO; - self.serverDetails.text = reason; - [self.connectButton setTitle:@"CONNECT" forState:UIControlStateNormal]; -} - -@end diff --git a/MDWampDemo/src/RegisterRPCViewController.h b/MDWampDemo/src/RegisterRPCViewController.h deleted file mode 100644 index b37f086..0000000 --- a/MDWampDemo/src/RegisterRPCViewController.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// RegisterRPCViewController.h -// MDWamp -// -// Created by Niko Usai on 03/07/14. -// Copyright (c) 2014 mogui.it. All rights reserved. -// - -#import - -@interface RegisterRPCViewController : UIViewController -@property (weak, nonatomic) IBOutlet UITextField *procedureName; - -@property (weak, nonatomic) IBOutlet UISegmentedControl *procedureAction; -@property (weak, nonatomic) IBOutlet UITextView *textArea; -@property (weak, nonatomic) IBOutlet UIButton *registerButton; -- (IBAction)register:(id)sender; -@end diff --git a/MDWampDemo/src/RegisterRPCViewController.m b/MDWampDemo/src/RegisterRPCViewController.m deleted file mode 100644 index f87fc2e..0000000 --- a/MDWampDemo/src/RegisterRPCViewController.m +++ /dev/null @@ -1,129 +0,0 @@ -// -// RegisterRPCViewController.m -// MDWamp -// -// Created by Niko Usai on 03/07/14. -// Copyright (c) 2014 mogui.it. All rights reserved. -// - -#import "RegisterRPCViewController.h" - -@interface RegisterRPCViewController () - -@end - -@implementation RegisterRPCViewController - -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil -{ - self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; - if (self) { - // Custom initialization - } - return self; -} - -- (void)viewDidLoad -{ - [super viewDidLoad]; - // Do any additional setup after loading the view. -} -- (void) viewDidAppear:(BOOL)animated -{ - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ - if (![[AppDel wampConnection] isConnected]) { - - self.tabBarController.selectedViewController = self.tabBarController.viewControllers[0]; - - UIAlertView *av = [[UIAlertView alloc] initWithTitle:@"!!" message:@"You must first connect!" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil]; - [av show]; - } - - }); -} - -- (void)didReceiveMemoryWarning -{ - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - - --(BOOL)textFieldShouldReturn:(UITextField *)textField { - //Keyboard becomes visible - [textField resignFirstResponder]; - [self register:nil]; - return YES; -} - -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender -{ - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ - -- (IBAction)register:(id)sender { - - - [self.procedureName resignFirstResponder]; - self.textArea.text = @""; - - if(self.procedureAction.enabled) { - - [[AppDel wampConnection] registerRPC:self.procedureName.text procedure:^(MDWamp *client, MDWampInvocation *invocation) { - - if(self.procedureAction.selectedSegmentIndex == 0) { - CGRect rect=self.view.bounds; - UIGraphicsBeginImageContext(rect.size); - - CGContextRef context=UIGraphicsGetCurrentContext(); - - [[AppDel window].layer renderInContext:context]; - - UIImage *image=UIGraphicsGetImageFromCurrentImageContext(); - UIGraphicsEndImageContext(); - NSData * data = UIImagePNGRepresentation(image); - NSString *b64 = [[NSString alloc] initWithData:[data base64EncodedDataWithOptions:NSDataBase64Encoding64CharacterLineLength] encoding:NSUTF8StringEncoding]; - [client resultForInvocation:invocation arguments:@[b64] argumentsKw:nil]; - } else { - [client resultForInvocation:invocation arguments:nil argumentsKw:@{ - @"systemVersion": [[UIDevice currentDevice] systemVersion], - @"systemName": [[UIDevice currentDevice] systemName], - @"name": [[UIDevice currentDevice] name] - }]; - } - - - } cancelHandler:nil registerResult:^(NSError *error) { - - if(error){ - UIAlertView *av = [[UIAlertView alloc] initWithTitle:@"!" message:error.localizedDescription delegate:nil cancelButtonTitle:@"Close" otherButtonTitles:nil, nil]; - [av show]; - } else { - self.textArea.text = @"Procedure registered!"; - self.procedureName.enabled = NO; - self.procedureAction.enabled = NO; - [self.registerButton setTitle:@"UNREGISTER" forState:UIControlStateNormal]; - } - }]; - } else { - [[AppDel wampConnection] unregisterRPC:self.procedureName.text result:^(NSError *error) { - if(error){ - UIAlertView *av = [[UIAlertView alloc] initWithTitle:@"!" message:error.localizedDescription delegate:nil cancelButtonTitle:@"Close" otherButtonTitles:nil, nil]; - [av show]; - } else { - self.textArea.text = @"Successfully unregistered"; - } - }]; - - self.procedureName.enabled = YES; - self.procedureAction.enabled = YES; - [self.registerButton setTitle:@"Register" forState:UIControlStateNormal]; - } -} -@end diff --git a/MDWampTests/MDWampProtocolVersion2Tests.m b/MDWampTests/MDWampProtocolVersion2Tests.m deleted file mode 100644 index 1d369ec..0000000 --- a/MDWampTests/MDWampProtocolVersion2Tests.m +++ /dev/null @@ -1,134 +0,0 @@ -// -// MDWampTests.m -// MDWamp -// -// Created by Niko Usai on 11/03/14. -// Copyright (c) 2014 mogui.it. All rights reserved. -// -#import -#import "XCTAsyncTestCase.h" -#import -#import -#import "NSMutableArray+MDStack.h" - -@interface MDWampProtocolVersion2Tests : XCTestCase -@property (strong, nonatomic) MDWampProtocolVersion2 *protocol; -@end - -@implementation MDWampProtocolVersion2Tests - -- (void)setUp -{ - [super setUp]; - _protocol = [[MDWampProtocolVersion2 alloc] init]; - -} - -- (void)tearDown -{ - // Put teardown code here. This method is called after the invocation of each test method in the class. - [super tearDown]; -} - -- (void) testSendHelloAndSendGoodbye -{ - XCTAssert([_protocol shouldSendGoodbye] && [_protocol shouldSendHello], @"Vesion 2 of protocol should send Hello and Goodbye"); -} - -- (void)testHello -{ - NSArray *payload = @[@1, @"somerealm", @{@"roles": @{@"publisher":@{}}}]; - - - MDWampHello *hello = (MDWampHello *)[_protocol unmarshallMessage:payload]; - - XCTAssertNotNil(hello, @"Message Must not be nil"); - XCTAssertNotNil([hello.roles objectForKey:@"publisher"], @"Checking Message integrity"); - XCTAssertEqualObjects(hello.realm, payload[1], @"Checking Message integrity"); - - NSArray *marshalled = [_protocol marshallMessage:hello]; - - XCTAssertEqualObjects(payload, marshalled, @"Marshalled Message should be equal to payload"); - -} - -- (void)testWelcome -{ - NSArray *payload = @[@2, @21233872738, @{@"roles": @{@"broker":@{}}}]; - - MDWampWelcome *msg = (MDWampWelcome *)[_protocol unmarshallMessage:payload]; - - XCTAssertNotNil(msg, @"Message Must not be nil"); - XCTAssertNotNil([msg.roles objectForKey:@"broker"], @"Checking Message integrity"); - XCTAssertEqualObjects(msg.session, payload[1], @"Checking Message integrity"); - - NSArray *marshalled = [_protocol marshallMessage:msg]; - - XCTAssertEqualObjects(payload, marshalled, @"Marshalled Message should be equal to payload"); -} - -- (void)testAbort -{ - NSArray *payload = @[@3, @{@"message": @"The realm does not exist."}, @"wamp.error.no_such_realm"]; - - MDWampAbort *msg = (MDWampAbort *)[_protocol unmarshallMessage:payload]; - - XCTAssertNotNil(msg, @"Message Must not be nil"); - XCTAssertNotNil([msg.details objectForKey:@"message"], @"Checking Message integrity"); - XCTAssertEqualObjects(msg.reason, payload[2], @"Checking Message integrity"); - - NSArray *marshalled = [_protocol marshallMessage:msg]; - - XCTAssertEqualObjects(payload, marshalled, @"Marshalled Message should be equal to payload"); -} - -- (void)testChallangeCode -{ - NSArray *payload = @[@4, @{@"message": @"The realm does not exist."}, @"wamp.error.no_such_realm"]; -} - -- (void)testAuthenticateCode -{ - NSArray *payload = @[@5, @{@"message": @"The realm does not exist."}, @"wamp.error.no_such_realm"]; -} - -- (void)testGoodbye -{ - NSArray *payload = @[@6, @{@"message": @"The host is shutting down now."}, @"wamp.error.system_shutdown"]; - - MDWampGoodbye *msg = (MDWampGoodbye *)[_protocol unmarshallMessage:payload]; - - XCTAssertNotNil(msg, @"Message Must not be nil"); - XCTAssertNotNil([msg.details objectForKey:@"message"], @"Checking Message integrity"); - XCTAssertEqualObjects(msg.reason, payload[2], @"Checking Message integrity"); - - NSArray *marshalled = [_protocol marshallMessage:msg]; - - XCTAssertEqualObjects(payload, marshalled, @"Marshalled Message should be equal to payload"); -} - -- (void)testHeartbitCode -{ - NSArray *payload = @[@7, @{@"message": @"The realm does not exist."}, @"wamp.error.no_such_realm"]; -} - -- (void)testError -{ - NSArray *payload = @[@8, @68, @123456789, @{}, @"com.myapp.error.object_write_protected", @[@"Object is write protected"], @{@"severity": @3}]; - - MDWampError *msg = (MDWampError *)[_protocol unmarshallMessage:payload]; - - XCTAssertNotNil(msg, @"Message Must not be nil"); - - XCTAssertEqualObjects(msg.error, payload[4], @"Checking Message integrity"); - XCTAssertEqualObjects(msg.type, payload[1], @"Checking Message integrity"); - XCTAssertEqualObjects(msg.request, payload[2], @"Checking Message integrity"); - XCTAssertEqualObjects(msg.arguments[0], payload[5][0], @"Checking Message integrity"); - XCTAssertEqualObjects(msg.argumentsKw[@"severity"], payload[6][@"severity"], @"Checking Message integrity"); - - NSArray *marshalled = [_protocol marshallMessage:msg]; - - XCTAssertEqualObjects(payload, marshalled, @"Marshalled Message should be equal to payload"); -} - -@end diff --git a/MDWampTests/XCTAsyncTestCase.m.LOCAL.48101.m b/MDWampTests/XCTAsyncTestCase.m.LOCAL.48101.m deleted file mode 100644 index 535d5ff..0000000 --- a/MDWampTests/XCTAsyncTestCase.m.LOCAL.48101.m +++ /dev/null @@ -1,186 +0,0 @@ -// -// XCTAsyncTestCase.m -// Modified by Sveinung Kval Bakken on 16/10/13 -// to serve as a drop-in replacement for GHAsyncTestCase using XCTest -// Original copyright notice below: -// -// GHAsyncTestCase.m -// GHUnit -// -// Created by Gabriel Handford on 4/8/09. -// Copyright 2009. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the "Software"), to deal in the Software without -// restriction, including without limitation the rights to use, -// copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following -// conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -// OTHER DEALINGS IN THE SOFTWARE. -// - -#import "XCTAsyncTestCase.h" -#import - -typedef enum { - kXCTUnitAsyncErrorNone, - kXCTUnitAsyncErrorUnprepared, - kXCTUnitAsyncErrorTimedOut, - kXCTUnitAsyncErrorInvalidStatus -} XCTUnitAsyncError; - -@implementation XCTAsyncTestCase - -@synthesize runLoopModes=_runLoopModes; - - -// Internal GHUnit setUp -- (void)setUp { - [super setUp]; - lock_ = [[NSRecursiveLock alloc] init]; - prepared_ = NO; - notifiedStatus_ = kXCTUnitWaitStatusUnknown; -} - -// Internal GHUnit tear down -- (void)tearDown { - [super tearDown]; - waitSelector_ = NULL; - if (prepared_) [lock_ unlock]; // If we prepared but never waited we need to unlock - lock_ = nil; -} - -- (void)prepare { - [self prepare:self.invocation.selector]; -} - -- (void)prepare:(SEL)selector { - [lock_ lock]; - prepared_ = YES; - waitSelector_ = selector; - notifiedStatus_ = kXCTUnitWaitStatusUnknown; -} - -- (XCTUnitAsyncError)_waitFor:(NSInteger)status timeout:(NSTimeInterval)timeout { - if (!prepared_) { - return kXCTUnitAsyncErrorUnprepared; - } - prepared_ = NO; - - waitForStatus_ = status; - - if (!_runLoopModes) - _runLoopModes = [NSArray arrayWithObjects:NSDefaultRunLoopMode, NSRunLoopCommonModes, nil]; - - NSTimeInterval checkEveryInterval = 0.05; - NSDate *runUntilDate = [NSDate dateWithTimeIntervalSinceNow:timeout]; - BOOL timedOut = NO; - NSUInteger runIndex = 0; - while(notifiedStatus_ == kXCTUnitWaitStatusUnknown) { - NSString *mode = [_runLoopModes objectAtIndex:(runIndex++ % [_runLoopModes count])]; - - [lock_ unlock]; - @autoreleasepool { - if (!mode || ![[NSRunLoop currentRunLoop] runMode:mode beforeDate:[NSDate dateWithTimeIntervalSinceNow:checkEveryInterval]]) - // If there were no run loop sources or timers then we should sleep for the interval - [NSThread sleepForTimeInterval:checkEveryInterval]; - } - [lock_ lock]; - - // If current date is after the run until date - if ([runUntilDate compare:[NSDate date]] == NSOrderedAscending) { - timedOut = YES; - break; - } - } - [lock_ unlock]; - - if (timedOut) { - return kXCTUnitAsyncErrorTimedOut; - } else if (waitForStatus_ != notifiedStatus_) { - return kXCTUnitAsyncErrorInvalidStatus; - } - - return kXCTUnitAsyncErrorNone; -} - -- (void)waitFor:(NSInteger)status timeout:(NSTimeInterval)timeout { - [NSException raise:NSDestinationInvalidException format:@"Deprecated; Use waitForStatus:timeout:"]; -} - -- (void)waitForStatus:(NSInteger)status timeout:(NSTimeInterval)timeout { - XCTUnitAsyncError error = [self _waitFor:status timeout:timeout]; - if (error == kXCTUnitAsyncErrorTimedOut) { - XCTFail(@"Request timed out"); - } else if (error == kXCTUnitAsyncErrorInvalidStatus) { - XCTFail(@"Request finished with the wrong status: %ld != %ld", (long)status, (long)notifiedStatus_); - } else if (error == kXCTUnitAsyncErrorUnprepared) { - XCTFail(@"Call prepare before calling asynchronous method and waitForStatus:timeout:"); - } -} - -- (void)waitForTimeout:(NSTimeInterval)timeout { - XCTUnitAsyncError error = [self _waitFor:-1 timeout:timeout]; - if (error != kXCTUnitAsyncErrorTimedOut) { - XCTFail(@"Request should have timed out"); - } -} - -// Similar to _waitFor:timeout: but just runs the loops -// From Robert Palmer, pauseForTimeout -- (void)runForInterval:(NSTimeInterval)interval { - NSTimeInterval checkEveryInterval = 0.05; - NSDate *runUntilDate = [NSDate dateWithTimeIntervalSinceNow:interval]; - - if (!_runLoopModes) - _runLoopModes = [NSArray arrayWithObjects:NSDefaultRunLoopMode, NSRunLoopCommonModes, nil]; - - NSUInteger runIndex = 0; - - while ([runUntilDate compare:[NSDate dateWithTimeIntervalSinceNow:0]] == NSOrderedDescending) { - NSString *mode = [_runLoopModes objectAtIndex:(runIndex++ % [_runLoopModes count])]; - - [lock_ unlock]; - @autoreleasepool { - if (!mode || ![[NSRunLoop currentRunLoop] runMode:mode beforeDate:[NSDate dateWithTimeIntervalSinceNow:checkEveryInterval]]) - // If there were no run loop sources or timers then we should sleep for the interval - [NSThread sleepForTimeInterval:checkEveryInterval]; - } - [lock_ lock]; - } -} - -- (void)notify:(NSInteger)status { - [self notify:status forSelector:NULL]; -} - -- (void)notify:(NSInteger)status forSelector:(SEL)selector { - // Note: If this is called from a stray thread or delayed call, we may not be in an autorelease pool - @autoreleasepool { - - // Make sure the notify is for the currently waiting test - if (selector != NULL && !sel_isEqual(waitSelector_, selector)) { - NSLog(@"Warning: Notified from %@ but we were waiting for %@", NSStringFromSelector(selector), NSStringFromSelector(waitSelector_)); - } else { - [lock_ lock]; - notifiedStatus_ = status; - [lock_ unlock]; - } - - } -} - -@end \ No newline at end of file diff --git a/MDWampTests/en.lproj/InfoPlist.strings b/MDWampTests/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28f..0000000 --- a/MDWampTests/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/READMEv1.md b/READMEv1.md deleted file mode 100644 index 644280c..0000000 --- a/READMEv1.md +++ /dev/null @@ -1,185 +0,0 @@ -# What is it MDWamp ? - -MDWamp is a client side objective-C implementation of the WebSocket subprotocol [WAMP][wamp_link]. -It uses [SocketRocket][socket_rocket] as WebSocket Protocol implementation. - -With this library and with a server [implementation of WAMP protocol][wamp_impl] you can bring Real-time notification not only for a web app (as WebSocket was created for) but also on your mobile App, just like an inner-app Apple Push Notifcation Service, avoiding the hassle of long polling request to the server for getting new things. - -WAMP in its creator words is: - -> an open WebSocket subprotocol that provides two asynchronous messaging patterns: RPC and PubSub. - -but what are RPC and PubSub? here's a [nice and neat explanation][faq] if you have doubts. - - -## Changes - -### 1.1.0 - -- Added OSX framework target -- dropped iOS 4 compatibility now iOS >= 5.0 is required -- added block callback for connection, rpc and pub/sub messages -- removed RPC and Event delegates (now they only works with blocks) -- added unit test - -## Installation - -### OSX -- By using [CocoaPods][cocoapods], just add to your Podfile - - pod 'MDWamp' - -- Use MDWamp.framework -Build the framework target of the project, just be sure to `git submodule init && git submodule update` to get the SocketRocket dependancy (see test part for more info) - - -# iOS -I'm [sick and tired of iOS shitting support for distributing libraries][staticlibpost] so just cocoapods support for ya: -Just add this to your Podfile - - pod "MDWamp" - - - -## API - -MDWamp is made of a main class `MDWamp` that does all the work it makes connection to the server and expose methods to publish an receive events to and from a topic, and to call Rempte Procedure. - -You start a connection initing an MDWamp object, and by setting some features like auto reconnect: - - // if you want debug log set this to YES, default is NO - [MDWamp setDebug:YES]; - - MDWamp *wamp = [[MDWamp alloc] initWithUrl:@"ws://localhost:9000" delegate:self]; - - // set if MDWAMP should automatically try to reconnect after a network fail default YES - [wamp setShouldAutoreconnect:YES]; - - // set number of times it tries to autoreconnect after a fail - [wamp setAutoreconnectMaxRetries:2]; - - // set seconds between each reconnection try - [wamp setAutoreconnectDelay:5]; - - -when your done and you want to fire the connection: - - [wamp connect]; - -to disconnect: - - [wamp disconnect]; - -You can optionally implement two methods in the delegate you've setted when initing MDWamp - -- `- (void) onOpen;` -Called when client connect to the server -- `- (void) onClose:(int)code reason:(NSString *)reason;` -Called when client disconnect from the server - -You can also provide similar callback instead of using the delegate: - - @property (nonatomic, copy) void (^onConnectionOpen)(MDWamp *client); - @property (nonatomic, copy) void (^onConnectionClose)(MDWamp *client, NSInteger code, NSString *reason); - -The Header files of `MDWamp` class and of the Delegates are all well commented so the API is trivial, anyway here are some usage examples - -### Call a remote procedure: - - [_wc call:@"http://example.com/simple/calc#add" complete:^(NSString *callURI, id result, NSError *error) { - if (error== nil) { - // do something with result - } else { - // handle the error - } - } args:@2, @3, nil]; - -### Publish to a topic] this json object `{"user" : ["foo", "bar"]}`: - - [wamp publish:[NSDictionary dictionaryWithObjectsAndKeys:[NSArray arrayWithObjects:@"foo", @"bar", nil],@"user", nil] toTopic:@"http://example.com/simple" excludeMe:NO]; - -### Subscribe to a Topic and handle received events: - - [client subscribeTopic:@"http://example.com/simple/simple" onEvent:^(id payload) { - // do something with the payload - }]; - -### Authenticate using WAMP-CRA: - - - (void) onOpen - { - [wamp authReqWithAppKey:appKey andExtra:nil]; - } - - - (void) onAuthReqWithAnswer:(NSString *)answer - { - [wamp authSignChallenge:answer withSecret:appSecret]; - } - - - (void) onAuthSignWithSignature:(NSString *)signature - { - [wamp authWithSignature:signature]; - } - - // then you have these callbakcs - - (void) onAuthWithAnswer:(NSString *)answer; - - (void) onAuthFailForCall:(NSString *)procCall withError:(NSError *)error; - -### Authenticate using WAMP-CRA (Block-based): - - - (void) onOpen - { - [wamp authWithKey:key Secret:secret Extra:nil - Success:^(NSString *answer) { - NSLog(@"Authenticated"); - } Error:^(NSString *procCall, NSString *errorURI, NSString *errorDetails) { - NSLog(@"Auth Fail:%@:%@",errorURI,errorDetails); - } - ]; - } - - -## Test -If you want to run the tests you have to add the SocketRockt dependancy this is handled by using submodules so: - -- clone the repository: `git clone git@github.com:mogui/MDWamp.git` -- `cd MDWamp` -- run a `git submodule init && git submodule update` inside the MDWamp cloned directory to init the SocketRocket dependancy. - -Once everything compiles smoothly, you need a WAMP server to test against. -The creator of the specification also have a nice test suite tool [autobahn test suite](http://autobahn.ws/testsuite/installation/) (it's for WebSocket in general not only WAMP) -The WAMP part though is undere heavy development nowdays for the new specification (WAMP v2) and not everuyhting works as it should, so temporarily, and just for the sake of the test, I suggest you to install it from my fork [over here](https://github.com/mogui/AutobahnTestSuite) -As for everything python I suggest to make a `virtualenv` - - git clone git://github.com/mogui/AutobahnTestSuite.git - cd AutobahnTestSuite - git checkout mdwamp - cd autobahntestsuite - python setup.py install - -Finally you can start the test server: - - wstest -d -m wampserver -w ws://localhost:9000 - -and run the test target from Xcode. - -##Authors -- [mogui](https://github.com/mogui/) -- [cvanderschuere](https://github.com/cvanderschuere) -- [JohnFricker](https://github.com/JohnFricker) - -## Copyright -Copyright © 2012 Niko Usai. See LICENSE for details. -WAMP is trademark of [Tavendo GmbH][tavendo]. - -[wamp_link]: http://wamp.ws/ -[wamp_impl]: http://wamp.ws/implementations -[cocoapods]: http://cocoapods.org/ -[luke]: https://github.com/lukeredpath -[ios_fake_framework_link]: https://github.com/kstenerud/iOS-Universal-Framework -[lib_pusher]: https://github.com/lukeredpath/libPusher -[socket_rocket]: https://github.com/square/SocketRocket -[downpage]: http://github.com/mogui/MDWamp/downloads] -[faq]: http://wamp.ws/faq#rpc -[tavendo]: http://www.tavendo.de/ -[staticlibpost]: http://blog.mogui.it/iOS-3rd-packaging.html \ No newline at end of file diff --git a/MDWamp/src/Categories/NSMutableArray+MDStack.h b/Sources/Categories/NSMutableArray+MDStack.h similarity index 100% rename from MDWamp/src/Categories/NSMutableArray+MDStack.h rename to Sources/Categories/NSMutableArray+MDStack.h diff --git a/MDWamp/src/Categories/NSMutableArray+MDStack.m b/Sources/Categories/NSMutableArray+MDStack.m similarity index 100% rename from MDWamp/src/Categories/NSMutableArray+MDStack.m rename to Sources/Categories/NSMutableArray+MDStack.m diff --git a/MDWamp/src/Categories/NSString+MDString.h b/Sources/Categories/NSString+MDString.h similarity index 100% rename from MDWamp/src/Categories/NSString+MDString.h rename to Sources/Categories/NSString+MDString.h diff --git a/MDWamp/src/Categories/NSString+MDString.m b/Sources/Categories/NSString+MDString.m similarity index 100% rename from MDWamp/src/Categories/NSString+MDString.m rename to Sources/Categories/NSString+MDString.m diff --git a/MDWamp/MDWamp-Info.plist b/Sources/Info-OSX.plist similarity index 68% rename from MDWamp/MDWamp-Info.plist rename to Sources/Info-OSX.plist index 50b4ca8..f8eea58 100644 --- a/MDWamp/MDWamp-Info.plist +++ b/Sources/Info-OSX.plist @@ -3,27 +3,23 @@ CFBundleDevelopmentRegion - English + en CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - + $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName - ${PRODUCT_NAME} + $(PRODUCT_NAME) CFBundlePackageType FMWK CFBundleShortVersionString - 2.2.4 + 2.2.5 CFBundleSignature ???? CFBundleVersion - 2.2.0 - NSHumanReadableCopyright - Copyright © 2013 mogui.it. All rights reserved. + $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Sources/Info-iOS.plist b/Sources/Info-iOS.plist new file mode 100644 index 0000000..f8eea58 --- /dev/null +++ b/Sources/Info-iOS.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 2.2.5 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/MDWamp/src/MDWamp.h b/Sources/MDWamp.h similarity index 97% rename from MDWamp/src/MDWamp.h rename to Sources/MDWamp.h index 7846b83..efdcbf8 100644 --- a/MDWamp/src/MDWamp.h +++ b/Sources/MDWamp.h @@ -17,6 +17,14 @@ // See the License for the specific language governing permissions and // limitations under the License. // +#import + +//! Project version number for MDWamp iOS. +FOUNDATION_EXPORT double MDWamp_VersionNumber; + +//! Project version string for MDWamp iOS. +FOUNDATION_EXPORT const unsigned char MDWamp_VersionString[]; + #import "MDWampConstants.h" #import "MDWampTransports.h" diff --git a/MDWamp/src/MDWamp.m b/Sources/MDWamp.m similarity index 100% rename from MDWamp/src/MDWamp.m rename to Sources/MDWamp.m diff --git a/MDWamp/src/MDWampClientConfig.h b/Sources/MDWampClientConfig.h similarity index 100% rename from MDWamp/src/MDWampClientConfig.h rename to Sources/MDWampClientConfig.h diff --git a/MDWamp/src/MDWampClientConfig.m b/Sources/MDWampClientConfig.m similarity index 100% rename from MDWamp/src/MDWampClientConfig.m rename to Sources/MDWampClientConfig.m diff --git a/MDWamp/src/MDWampClientDelegate.h b/Sources/MDWampClientDelegate.h similarity index 100% rename from MDWamp/src/MDWampClientDelegate.h rename to Sources/MDWampClientDelegate.h diff --git a/MDWamp/src/MDWampConstants.h b/Sources/MDWampConstants.h similarity index 100% rename from MDWamp/src/MDWampConstants.h rename to Sources/MDWampConstants.h diff --git a/MDWamp/src/MDWampConstants.m b/Sources/MDWampConstants.m similarity index 100% rename from MDWamp/src/MDWampConstants.m rename to Sources/MDWampConstants.m diff --git a/MDWamp/src/MDWampMessages/MDWampAbort.h b/Sources/MDWampMessages/MDWampAbort.h similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampAbort.h rename to Sources/MDWampMessages/MDWampAbort.h diff --git a/MDWamp/src/MDWampMessages/MDWampAbort.m b/Sources/MDWampMessages/MDWampAbort.m similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampAbort.m rename to Sources/MDWampMessages/MDWampAbort.m diff --git a/MDWamp/src/MDWampMessages/MDWampAuthenticate.h b/Sources/MDWampMessages/MDWampAuthenticate.h similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampAuthenticate.h rename to Sources/MDWampMessages/MDWampAuthenticate.h diff --git a/MDWamp/src/MDWampMessages/MDWampAuthenticate.m b/Sources/MDWampMessages/MDWampAuthenticate.m similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampAuthenticate.m rename to Sources/MDWampMessages/MDWampAuthenticate.m diff --git a/MDWamp/src/MDWampMessages/MDWampCall.h b/Sources/MDWampMessages/MDWampCall.h similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampCall.h rename to Sources/MDWampMessages/MDWampCall.h diff --git a/MDWamp/src/MDWampMessages/MDWampCall.m b/Sources/MDWampMessages/MDWampCall.m similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampCall.m rename to Sources/MDWampMessages/MDWampCall.m diff --git a/MDWamp/src/MDWampMessages/MDWampCancel.h b/Sources/MDWampMessages/MDWampCancel.h similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampCancel.h rename to Sources/MDWampMessages/MDWampCancel.h diff --git a/MDWamp/src/MDWampMessages/MDWampCancel.m b/Sources/MDWampMessages/MDWampCancel.m similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampCancel.m rename to Sources/MDWampMessages/MDWampCancel.m diff --git a/MDWamp/src/MDWampMessages/MDWampChallenge.h b/Sources/MDWampMessages/MDWampChallenge.h similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampChallenge.h rename to Sources/MDWampMessages/MDWampChallenge.h diff --git a/MDWamp/src/MDWampMessages/MDWampChallenge.m b/Sources/MDWampMessages/MDWampChallenge.m similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampChallenge.m rename to Sources/MDWampMessages/MDWampChallenge.m diff --git a/MDWamp/src/MDWampMessages/MDWampError.h b/Sources/MDWampMessages/MDWampError.h similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampError.h rename to Sources/MDWampMessages/MDWampError.h diff --git a/MDWamp/src/MDWampMessages/MDWampError.m b/Sources/MDWampMessages/MDWampError.m similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampError.m rename to Sources/MDWampMessages/MDWampError.m diff --git a/MDWamp/src/MDWampMessages/MDWampEvent.h b/Sources/MDWampMessages/MDWampEvent.h similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampEvent.h rename to Sources/MDWampMessages/MDWampEvent.h diff --git a/MDWamp/src/MDWampMessages/MDWampEvent.m b/Sources/MDWampMessages/MDWampEvent.m similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampEvent.m rename to Sources/MDWampMessages/MDWampEvent.m diff --git a/MDWamp/src/MDWampMessages/MDWampGoodbye.h b/Sources/MDWampMessages/MDWampGoodbye.h similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampGoodbye.h rename to Sources/MDWampMessages/MDWampGoodbye.h diff --git a/MDWamp/src/MDWampMessages/MDWampGoodbye.m b/Sources/MDWampMessages/MDWampGoodbye.m similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampGoodbye.m rename to Sources/MDWampMessages/MDWampGoodbye.m diff --git a/MDWamp/src/MDWampMessages/MDWampHello.h b/Sources/MDWampMessages/MDWampHello.h similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampHello.h rename to Sources/MDWampMessages/MDWampHello.h diff --git a/MDWamp/src/MDWampMessages/MDWampHello.m b/Sources/MDWampMessages/MDWampHello.m similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampHello.m rename to Sources/MDWampMessages/MDWampHello.m diff --git a/MDWamp/src/MDWampMessages/MDWampInterrupt.h b/Sources/MDWampMessages/MDWampInterrupt.h similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampInterrupt.h rename to Sources/MDWampMessages/MDWampInterrupt.h diff --git a/MDWamp/src/MDWampMessages/MDWampInterrupt.m b/Sources/MDWampMessages/MDWampInterrupt.m similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampInterrupt.m rename to Sources/MDWampMessages/MDWampInterrupt.m diff --git a/MDWamp/src/MDWampMessages/MDWampInvocation.h b/Sources/MDWampMessages/MDWampInvocation.h similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampInvocation.h rename to Sources/MDWampMessages/MDWampInvocation.h diff --git a/MDWamp/src/MDWampMessages/MDWampInvocation.m b/Sources/MDWampMessages/MDWampInvocation.m similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampInvocation.m rename to Sources/MDWampMessages/MDWampInvocation.m diff --git a/MDWamp/src/MDWampMessages/MDWampMessage.h b/Sources/MDWampMessages/MDWampMessage.h similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampMessage.h rename to Sources/MDWampMessages/MDWampMessage.h diff --git a/MDWamp/src/MDWampMessages/MDWampMessageFactory.h b/Sources/MDWampMessages/MDWampMessageFactory.h similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampMessageFactory.h rename to Sources/MDWampMessages/MDWampMessageFactory.h diff --git a/MDWamp/src/MDWampMessages/MDWampMessageFactory.m b/Sources/MDWampMessages/MDWampMessageFactory.m similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampMessageFactory.m rename to Sources/MDWampMessages/MDWampMessageFactory.m diff --git a/MDWamp/src/MDWampMessages/MDWampMessages.h b/Sources/MDWampMessages/MDWampMessages.h similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampMessages.h rename to Sources/MDWampMessages/MDWampMessages.h diff --git a/MDWamp/src/MDWampMessages/MDWampPublish.h b/Sources/MDWampMessages/MDWampPublish.h similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampPublish.h rename to Sources/MDWampMessages/MDWampPublish.h diff --git a/MDWamp/src/MDWampMessages/MDWampPublish.m b/Sources/MDWampMessages/MDWampPublish.m similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampPublish.m rename to Sources/MDWampMessages/MDWampPublish.m diff --git a/MDWamp/src/MDWampMessages/MDWampPublished.h b/Sources/MDWampMessages/MDWampPublished.h similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampPublished.h rename to Sources/MDWampMessages/MDWampPublished.h diff --git a/MDWamp/src/MDWampMessages/MDWampPublished.m b/Sources/MDWampMessages/MDWampPublished.m similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampPublished.m rename to Sources/MDWampMessages/MDWampPublished.m diff --git a/MDWamp/src/MDWampMessages/MDWampRegister.h b/Sources/MDWampMessages/MDWampRegister.h similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampRegister.h rename to Sources/MDWampMessages/MDWampRegister.h diff --git a/MDWamp/src/MDWampMessages/MDWampRegister.m b/Sources/MDWampMessages/MDWampRegister.m similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampRegister.m rename to Sources/MDWampMessages/MDWampRegister.m diff --git a/MDWamp/src/MDWampMessages/MDWampRegistered.h b/Sources/MDWampMessages/MDWampRegistered.h similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampRegistered.h rename to Sources/MDWampMessages/MDWampRegistered.h diff --git a/MDWamp/src/MDWampMessages/MDWampRegistered.m b/Sources/MDWampMessages/MDWampRegistered.m similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampRegistered.m rename to Sources/MDWampMessages/MDWampRegistered.m diff --git a/MDWamp/src/MDWampMessages/MDWampResult.h b/Sources/MDWampMessages/MDWampResult.h similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampResult.h rename to Sources/MDWampMessages/MDWampResult.h diff --git a/MDWamp/src/MDWampMessages/MDWampResult.m b/Sources/MDWampMessages/MDWampResult.m similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampResult.m rename to Sources/MDWampMessages/MDWampResult.m diff --git a/MDWamp/src/MDWampMessages/MDWampSubscribe.h b/Sources/MDWampMessages/MDWampSubscribe.h similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampSubscribe.h rename to Sources/MDWampMessages/MDWampSubscribe.h diff --git a/MDWamp/src/MDWampMessages/MDWampSubscribe.m b/Sources/MDWampMessages/MDWampSubscribe.m similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampSubscribe.m rename to Sources/MDWampMessages/MDWampSubscribe.m diff --git a/MDWamp/src/MDWampMessages/MDWampSubscribed.h b/Sources/MDWampMessages/MDWampSubscribed.h similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampSubscribed.h rename to Sources/MDWampMessages/MDWampSubscribed.h diff --git a/MDWamp/src/MDWampMessages/MDWampSubscribed.m b/Sources/MDWampMessages/MDWampSubscribed.m similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampSubscribed.m rename to Sources/MDWampMessages/MDWampSubscribed.m diff --git a/MDWamp/src/MDWampMessages/MDWampUnregister.h b/Sources/MDWampMessages/MDWampUnregister.h similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampUnregister.h rename to Sources/MDWampMessages/MDWampUnregister.h diff --git a/MDWamp/src/MDWampMessages/MDWampUnregister.m b/Sources/MDWampMessages/MDWampUnregister.m similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampUnregister.m rename to Sources/MDWampMessages/MDWampUnregister.m diff --git a/MDWamp/src/MDWampMessages/MDWampUnregistered.h b/Sources/MDWampMessages/MDWampUnregistered.h similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampUnregistered.h rename to Sources/MDWampMessages/MDWampUnregistered.h diff --git a/MDWamp/src/MDWampMessages/MDWampUnregistered.m b/Sources/MDWampMessages/MDWampUnregistered.m similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampUnregistered.m rename to Sources/MDWampMessages/MDWampUnregistered.m diff --git a/MDWamp/src/MDWampMessages/MDWampUnsubscribe.h b/Sources/MDWampMessages/MDWampUnsubscribe.h similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampUnsubscribe.h rename to Sources/MDWampMessages/MDWampUnsubscribe.h diff --git a/MDWamp/src/MDWampMessages/MDWampUnsubscribe.m b/Sources/MDWampMessages/MDWampUnsubscribe.m similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampUnsubscribe.m rename to Sources/MDWampMessages/MDWampUnsubscribe.m diff --git a/MDWamp/src/MDWampMessages/MDWampUnsubscribed.h b/Sources/MDWampMessages/MDWampUnsubscribed.h similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampUnsubscribed.h rename to Sources/MDWampMessages/MDWampUnsubscribed.h diff --git a/MDWamp/src/MDWampMessages/MDWampUnsubscribed.m b/Sources/MDWampMessages/MDWampUnsubscribed.m similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampUnsubscribed.m rename to Sources/MDWampMessages/MDWampUnsubscribed.m diff --git a/MDWamp/src/MDWampMessages/MDWampWelcome.h b/Sources/MDWampMessages/MDWampWelcome.h similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampWelcome.h rename to Sources/MDWampMessages/MDWampWelcome.h diff --git a/MDWamp/src/MDWampMessages/MDWampWelcome.m b/Sources/MDWampMessages/MDWampWelcome.m similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampWelcome.m rename to Sources/MDWampMessages/MDWampWelcome.m diff --git a/MDWamp/src/MDWampMessages/MDWampYield.h b/Sources/MDWampMessages/MDWampYield.h similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampYield.h rename to Sources/MDWampMessages/MDWampYield.h diff --git a/MDWamp/src/MDWampMessages/MDWampYield.m b/Sources/MDWampMessages/MDWampYield.m similarity index 100% rename from MDWamp/src/MDWampMessages/MDWampYield.m rename to Sources/MDWampMessages/MDWampYield.m diff --git a/MDWamp/src/MDWampSerializations/MDWampSerialization.h b/Sources/MDWampSerializations/MDWampSerialization.h similarity index 100% rename from MDWamp/src/MDWampSerializations/MDWampSerialization.h rename to Sources/MDWampSerializations/MDWampSerialization.h diff --git a/MDWamp/src/MDWampSerializations/MDWampSerializationJSON.h b/Sources/MDWampSerializations/MDWampSerializationJSON.h similarity index 100% rename from MDWamp/src/MDWampSerializations/MDWampSerializationJSON.h rename to Sources/MDWampSerializations/MDWampSerializationJSON.h diff --git a/MDWamp/src/MDWampSerializations/MDWampSerializationJSON.m b/Sources/MDWampSerializations/MDWampSerializationJSON.m similarity index 100% rename from MDWamp/src/MDWampSerializations/MDWampSerializationJSON.m rename to Sources/MDWampSerializations/MDWampSerializationJSON.m diff --git a/MDWamp/src/MDWampSerializations/MDWampSerializationMsgpack.h b/Sources/MDWampSerializations/MDWampSerializationMsgpack.h similarity index 100% rename from MDWamp/src/MDWampSerializations/MDWampSerializationMsgpack.h rename to Sources/MDWampSerializations/MDWampSerializationMsgpack.h diff --git a/MDWamp/src/MDWampSerializations/MDWampSerializationMsgpack.m b/Sources/MDWampSerializations/MDWampSerializationMsgpack.m similarity index 96% rename from MDWamp/src/MDWampSerializations/MDWampSerializationMsgpack.m rename to Sources/MDWampSerializations/MDWampSerializationMsgpack.m index f004fcb..613309b 100644 --- a/MDWamp/src/MDWampSerializations/MDWampSerializationMsgpack.m +++ b/Sources/MDWampSerializations/MDWampSerializationMsgpack.m @@ -19,7 +19,7 @@ // #import "MDWampSerializationMsgpack.h" -#import "MPMessagePack.h" +#import @implementation MDWampSerializationMsgpack diff --git a/MDWamp/src/MDWampSerializations/MDWampSerializations.h b/Sources/MDWampSerializations/MDWampSerializations.h similarity index 100% rename from MDWamp/src/MDWampSerializations/MDWampSerializations.h rename to Sources/MDWampSerializations/MDWampSerializations.h diff --git a/MDWamp/src/MDWampTransports/MDWampTransport.h b/Sources/MDWampTransports/MDWampTransport.h similarity index 100% rename from MDWamp/src/MDWampTransports/MDWampTransport.h rename to Sources/MDWampTransports/MDWampTransport.h diff --git a/MDWamp/src/MDWampTransports/MDWampTransportDelegate.h b/Sources/MDWampTransports/MDWampTransportDelegate.h similarity index 100% rename from MDWamp/src/MDWampTransports/MDWampTransportDelegate.h rename to Sources/MDWampTransports/MDWampTransportDelegate.h diff --git a/MDWamp/src/MDWampTransports/MDWampTransportRawSocket.h b/Sources/MDWampTransports/MDWampTransportRawSocket.h similarity index 100% rename from MDWamp/src/MDWampTransports/MDWampTransportRawSocket.h rename to Sources/MDWampTransports/MDWampTransportRawSocket.h diff --git a/MDWamp/src/MDWampTransports/MDWampTransportRawSocket.m b/Sources/MDWampTransports/MDWampTransportRawSocket.m similarity index 98% rename from MDWamp/src/MDWampTransports/MDWampTransportRawSocket.m rename to Sources/MDWampTransports/MDWampTransportRawSocket.m index a84bab4..7139a47 100644 --- a/MDWamp/src/MDWampTransports/MDWampTransportRawSocket.m +++ b/Sources/MDWampTransports/MDWampTransportRawSocket.m @@ -7,7 +7,7 @@ // #import "MDWampTransportRawSocket.h" -#import "GCDAsyncSocket.h" +#import @interface MDWampTransportRawSocket () @property (nonatomic, strong) GCDAsyncSocket *socket; diff --git a/MDWamp/src/MDWampTransports/MDWampTransportWebSocket.h b/Sources/MDWampTransports/MDWampTransportWebSocket.h similarity index 100% rename from MDWamp/src/MDWampTransports/MDWampTransportWebSocket.h rename to Sources/MDWampTransports/MDWampTransportWebSocket.h diff --git a/MDWamp/src/MDWampTransports/MDWampTransportWebSocket.m b/Sources/MDWampTransports/MDWampTransportWebSocket.m similarity index 99% rename from MDWamp/src/MDWampTransports/MDWampTransportWebSocket.m rename to Sources/MDWampTransports/MDWampTransportWebSocket.m index 47ab718..8ca63f9 100644 --- a/MDWamp/src/MDWampTransports/MDWampTransportWebSocket.m +++ b/Sources/MDWampTransports/MDWampTransportWebSocket.m @@ -19,7 +19,7 @@ // #import "MDWampTransportWebSocket.h" -#import "SRWebSocket.h" +#import #import "NSMutableArray+MDStack.h" NSString *const kMDWampProtocolWamp2json = @"wamp.2.json"; diff --git a/MDWamp/src/MDWampTransports/MDWampTransports.h b/Sources/MDWampTransports/MDWampTransports.h similarity index 100% rename from MDWamp/src/MDWampTransports/MDWampTransports.h rename to Sources/MDWampTransports/MDWampTransports.h diff --git a/XcodeCoverage/.gitignore b/XcodeCoverage/.gitignore deleted file mode 100755 index 137e678..0000000 --- a/XcodeCoverage/.gitignore +++ /dev/null @@ -1 +0,0 @@ -env.sh diff --git a/XcodeCoverage/LICENSE.txt b/XcodeCoverage/LICENSE.txt deleted file mode 100755 index 7696295..0000000 --- a/XcodeCoverage/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -Copyright 2014 Jonathan M. Reid -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -(MIT License) diff --git a/XcodeCoverage/README.md b/XcodeCoverage/README.md deleted file mode 100755 index 59d11a6..0000000 --- a/XcodeCoverage/README.md +++ /dev/null @@ -1,56 +0,0 @@ -![XcodeCoverage](http://qualitycoding.org/jrwp/wp-content/uploads/2014/03/XcodeCoverage.png) - -These scripts provide a simple way to generate HTML reports of the code coverage -of your Xcode project. - - -Installation -============ - -1. Fork this repository; you're probably going to want to make your own -modifications. -2. Place the XcodeCoverage folder in the same folder as your Xcode project. -3. Depending on your version of Xcode, you may need to get Xcode's coverage -instrumentation by going to Xcode Preferences, into Downloads, and installing -Command Line Tools. -4. In your Xcode project, enable these two build settings at the project level -for your Debug configuration only: - * Instrument Program Flow - * Generate Test Coverage Files -5. In your main target, add a Run Script build phase to execute -``XcodeCoverage/exportenv.sh`` - -A few people have been tripped up by the last step: Make sure you add the -script to your main target (your app or library), not your test target. - - -Execution -========= - -1. Run your unit tests -2. In Terminal, execute `getcov` in your project's XcodeCoverage folder. - -If you make changes to your test code without changing the production code and -want a clean slate, use the ``cleancov`` script. - -If you make changes to your production code, you should clear out all build -artifacts before measuring code coverage again. "Clean Build Folder" by holding -down the Option key in Xcode's "Product" menu. - -**Optional:** XcodeCoverage can prompt to run code coverage after running unit tests: - - * Edit Xcode scheme -> Test -> Post-actions - * Set "Shell" to: ``/bin/bash`` - * Set "Provide build settings from" to your main target - * Set script to: - ``source ${SRCROOT}/XcodeCoverage/run_code_coverage_post.sh`` - - -Modification -============ - -There are two places you may want to modify: - -1. In envcov.sh, ``LCOV_INFO`` determines the name shown in the report. -2. In getcov, edit ``exclude_data()`` to specify which files to exclude, for -example, third-party libraries. diff --git a/XcodeCoverage/cleancov b/XcodeCoverage/cleancov deleted file mode 100755 index bdf241d..0000000 --- a/XcodeCoverage/cleancov +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -# -# Copyright 2014 Jonathan M. Reid. See LICENSE.txt -# Created by: Jon Reid, http://qualitycoding.org/ -# Source: https://github.com/jonreid/XcodeCoverage -# - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -source ${DIR}/envcov.sh - -LCOV --zerocounters -d "${OBJ_DIR}" diff --git a/XcodeCoverage/envcov.sh b/XcodeCoverage/envcov.sh deleted file mode 100755 index 7644205..0000000 --- a/XcodeCoverage/envcov.sh +++ /dev/null @@ -1,20 +0,0 @@ -# -# Copyright 2014 Jonathan M. Reid. See LICENSE.txt -# Created by: Jon Reid, http://qualitycoding.org/ -# Source: https://github.com/jonreid/XcodeCoverage -# - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -source ${DIR}/env.sh - -# Change the report name if you like: -LCOV_INFO=Coverage.info - -XCODECOVERAGE_PATH="${SRCROOT}/XcodeCoverage" -LCOV_PATH="${XCODECOVERAGE_PATH}/lcov-1.10/bin" -OBJ_DIR=${OBJECT_FILE_DIR_normal}/${CURRENT_ARCH} - -# Fix for the new LLVM-COV that requires gcov to have a -v paramter -LCOV() { - ${LCOV_PATH}/lcov $* --gcov-tool ${XCODECOVERAGE_PATH}/llvm-cov-wrapper.sh -} diff --git a/XcodeCoverage/exportenv.sh b/XcodeCoverage/exportenv.sh deleted file mode 100755 index ac480eb..0000000 --- a/XcodeCoverage/exportenv.sh +++ /dev/null @@ -1,8 +0,0 @@ -# -# Copyright 2014 Jonathan M. Reid. See LICENSE.txt -# Created by: Jon Reid, http://qualitycoding.org/ -# Source: https://github.com/jonreid/XcodeCoverage -# - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -export | egrep '( BUILT_PRODUCTS_DIR)|(CURRENT_ARCH)|(OBJECT_FILE_DIR_normal)|(SRCROOT)|(OBJROOT)' > ${DIR}/env.sh diff --git a/XcodeCoverage/getcov b/XcodeCoverage/getcov deleted file mode 100755 index dba4e9c..0000000 --- a/XcodeCoverage/getcov +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh -# -# Copyright 2014 Jonathan M. Reid. See LICENSE.txt -# Created by: Jon Reid, http://qualitycoding.org/ -# Source: https://github.com/jonreid/XcodeCoverage -# - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -source ${DIR}/envcov.sh - -remove_old_report() -{ - pushd ${BUILT_PRODUCTS_DIR} - if [ -e lcov ]; then - rm -r lcov - fi - popd -} - -enter_lcov_dir() -{ - cd ${BUILT_PRODUCTS_DIR} - mkdir lcov - cd lcov -} - -gather_coverage() -{ - LCOV --capture --derive-func-data -b "${SRCROOT}" -d "${OBJ_DIR}" -o ${LCOV_INFO} -} - -exclude_data() -{ - LCOV --remove ${LCOV_INFO} "Applications/Xcode.app/*" -d "${OBJ_DIR}" -o ${LCOV_INFO} - LCOV --remove ${LCOV_INFO} "main.m" -d "${OBJ_DIR}" -o ${LCOV_INFO} - # Remove other patterns here... -} - -generate_report() -{ - "${LCOV_PATH}/genhtml" --output-directory . ${LCOV_INFO} - open index.html -} - -remove_old_report -enter_lcov_dir -gather_coverage -exclude_data -generate_report diff --git a/XcodeCoverage/lcov-1.10/COPYING b/XcodeCoverage/lcov-1.10/COPYING deleted file mode 100755 index d511905..0000000 --- a/XcodeCoverage/lcov-1.10/COPYING +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/XcodeCoverage/lcov-1.10/bin/genhtml b/XcodeCoverage/lcov-1.10/bin/genhtml deleted file mode 100755 index 8979f8c..0000000 --- a/XcodeCoverage/lcov-1.10/bin/genhtml +++ /dev/null @@ -1,5799 +0,0 @@ -#!/usr/bin/perl -w -# -# Copyright (c) International Business Machines Corp., 2002,2012 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or (at -# your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# -# genhtml -# -# This script generates HTML output from .info files as created by the -# geninfo script. Call it with --help and refer to the genhtml man page -# to get information on usage and available options. -# -# -# History: -# 2002-08-23 created by Peter Oberparleiter -# IBM Lab Boeblingen -# based on code by Manoj Iyer and -# Megan Bock -# IBM Austin -# 2002-08-27 / Peter Oberparleiter: implemented frame view -# 2002-08-29 / Peter Oberparleiter: implemented test description filtering -# so that by default only descriptions for test cases which -# actually hit some source lines are kept -# 2002-09-05 / Peter Oberparleiter: implemented --no-sourceview -# 2002-09-05 / Mike Kobler: One of my source file paths includes a "+" in -# the directory name. I found that genhtml.pl died when it -# encountered it. I was able to fix the problem by modifying -# the string with the escape character before parsing it. -# 2002-10-26 / Peter Oberparleiter: implemented --num-spaces -# 2003-04-07 / Peter Oberparleiter: fixed bug which resulted in an error -# when trying to combine .info files containing data without -# a test name -# 2003-04-10 / Peter Oberparleiter: extended fix by Mike to also cover -# other special characters -# 2003-04-30 / Peter Oberparleiter: made info write to STDERR, not STDOUT -# 2003-07-10 / Peter Oberparleiter: added line checksum support -# 2004-08-09 / Peter Oberparleiter: added configuration file support -# 2005-03-04 / Cal Pierog: added legend to HTML output, fixed coloring of -# "good coverage" background -# 2006-03-18 / Marcus Boerger: added --custom-intro, --custom-outro and -# overwrite --no-prefix if --prefix is present -# 2006-03-20 / Peter Oberparleiter: changes to custom_* function (rename -# to html_prolog/_epilog, minor modifications to implementation), -# changed prefix/noprefix handling to be consistent with current -# logic -# 2006-03-20 / Peter Oberparleiter: added --html-extension option -# 2008-07-14 / Tom Zoerner: added --function-coverage command line option; -# added function table to source file page -# 2008-08-13 / Peter Oberparleiter: modified function coverage -# implementation (now enabled per default), -# introduced sorting option (enabled per default) -# - -use strict; -use File::Basename; -use Getopt::Long; -use Digest::MD5 qw(md5_base64); - - -# Global constants -our $title = "LCOV - code coverage report"; -our $lcov_version = 'LCOV version 1.10'; -our $lcov_url = "http://ltp.sourceforge.net/coverage/lcov.php"; -our $tool_name = basename($0); - -# Specify coverage rate limits (in %) for classifying file entries -# HI: $hi_limit <= rate <= 100 graph color: green -# MED: $med_limit <= rate < $hi_limit graph color: orange -# LO: 0 <= rate < $med_limit graph color: red - -# For line coverage/all coverage types if not specified -our $hi_limit = 90; -our $med_limit = 75; - -# For function coverage -our $fn_hi_limit; -our $fn_med_limit; - -# For branch coverage -our $br_hi_limit; -our $br_med_limit; - -# Width of overview image -our $overview_width = 80; - -# Resolution of overview navigation: this number specifies the maximum -# difference in lines between the position a user selected from the overview -# and the position the source code window is scrolled to. -our $nav_resolution = 4; - -# Clicking a line in the overview image should show the source code view at -# a position a bit further up so that the requested line is not the first -# line in the window. This number specifies that offset in lines. -our $nav_offset = 10; - -# Clicking on a function name should show the source code at a position a -# few lines before the first line of code of that function. This number -# specifies that offset in lines. -our $func_offset = 2; - -our $overview_title = "top level"; - -# Width for line coverage information in the source code view -our $line_field_width = 12; - -# Width for branch coverage information in the source code view -our $br_field_width = 16; - -# Internal Constants - -# Header types -our $HDR_DIR = 0; -our $HDR_FILE = 1; -our $HDR_SOURCE = 2; -our $HDR_TESTDESC = 3; -our $HDR_FUNC = 4; - -# Sort types -our $SORT_FILE = 0; -our $SORT_LINE = 1; -our $SORT_FUNC = 2; -our $SORT_BRANCH = 3; - -# Fileview heading types -our $HEAD_NO_DETAIL = 1; -our $HEAD_DETAIL_HIDDEN = 2; -our $HEAD_DETAIL_SHOWN = 3; - -# Offsets for storing branch coverage data in vectors -our $BR_BLOCK = 0; -our $BR_BRANCH = 1; -our $BR_TAKEN = 2; -our $BR_VEC_ENTRIES = 3; -our $BR_VEC_WIDTH = 32; - -# Additional offsets used when converting branch coverage data to HTML -our $BR_LEN = 3; -our $BR_OPEN = 4; -our $BR_CLOSE = 5; - -# Branch data combination types -our $BR_SUB = 0; -our $BR_ADD = 1; - -# Error classes which users may specify to ignore during processing -our $ERROR_SOURCE = 0; -our %ERROR_ID = ( - "source" => $ERROR_SOURCE, -); - -# Data related prototypes -sub print_usage(*); -sub gen_html(); -sub html_create($$); -sub process_dir($); -sub process_file($$$); -sub info(@); -sub read_info_file($); -sub get_info_entry($); -sub set_info_entry($$$$$$$$$;$$$$$$); -sub get_prefix($@); -sub shorten_prefix($); -sub get_dir_list(@); -sub get_relative_base_path($); -sub read_testfile($); -sub get_date_string(); -sub create_sub_dir($); -sub subtract_counts($$); -sub add_counts($$); -sub apply_baseline($$); -sub remove_unused_descriptions(); -sub get_found_and_hit($); -sub get_affecting_tests($$$); -sub combine_info_files($$); -sub merge_checksums($$$); -sub combine_info_entries($$$); -sub apply_prefix($$); -sub system_no_output($@); -sub read_config($); -sub apply_config($); -sub get_html_prolog($); -sub get_html_epilog($); -sub write_dir_page($$$$$$$$$$$$$$$$$); -sub classify_rate($$$$); -sub br_taken_add($$); -sub br_taken_sub($$); -sub br_ivec_len($); -sub br_ivec_get($$); -sub br_ivec_push($$$$); -sub combine_brcount($$$); -sub get_br_found_and_hit($); -sub warn_handler($); -sub die_handler($); -sub parse_ignore_errors(@); -sub rate($$;$$$); - - -# HTML related prototypes -sub escape_html($); -sub get_bar_graph_code($$$); - -sub write_png_files(); -sub write_htaccess_file(); -sub write_css_file(); -sub write_description_file($$$$$$$); -sub write_function_table(*$$$$$$$$$$); - -sub write_html(*$); -sub write_html_prolog(*$$); -sub write_html_epilog(*$;$); - -sub write_header(*$$$$$$$$$$); -sub write_header_prolog(*$); -sub write_header_line(*@); -sub write_header_epilog(*$); - -sub write_file_table(*$$$$$$$); -sub write_file_table_prolog(*$@); -sub write_file_table_entry(*$$$@); -sub write_file_table_detail_entry(*$@); -sub write_file_table_epilog(*); - -sub write_test_table_prolog(*$); -sub write_test_table_entry(*$$); -sub write_test_table_epilog(*); - -sub write_source($$$$$$$); -sub write_source_prolog(*); -sub write_source_line(*$$$$$$); -sub write_source_epilog(*); - -sub write_frameset(*$$$); -sub write_overview_line(*$$$); -sub write_overview(*$$$$); - -# External prototype (defined in genpng) -sub gen_png($$$@); - - -# Global variables & initialization -our %info_data; # Hash containing all data from .info file -our $dir_prefix; # Prefix to remove from all sub directories -our %test_description; # Hash containing test descriptions if available -our $date = get_date_string(); - -our @info_filenames; # List of .info files to use as data source -our $test_title; # Title for output as written to each page header -our $output_directory; # Name of directory in which to store output -our $base_filename; # Optional name of file containing baseline data -our $desc_filename; # Name of file containing test descriptions -our $css_filename; # Optional name of external stylesheet file to use -our $quiet; # If set, suppress information messages -our $help; # Help option flag -our $version; # Version option flag -our $show_details; # If set, generate detailed directory view -our $no_prefix; # If set, do not remove filename prefix -our $func_coverage; # If set, generate function coverage statistics -our $no_func_coverage; # Disable func_coverage -our $br_coverage; # If set, generate branch coverage statistics -our $no_br_coverage; # Disable br_coverage -our $sort = 1; # If set, provide directory listings with sorted entries -our $no_sort; # Disable sort -our $frames; # If set, use frames for source code view -our $keep_descriptions; # If set, do not remove unused test case descriptions -our $no_sourceview; # If set, do not create a source code view for each file -our $highlight; # If set, highlight lines covered by converted data only -our $legend; # If set, include legend in output -our $tab_size = 8; # Number of spaces to use in place of tab -our $config; # Configuration file contents -our $html_prolog_file; # Custom HTML prolog file (up to and including ) -our $html_epilog_file; # Custom HTML epilog file (from onwards) -our $html_prolog; # Actual HTML prolog -our $html_epilog; # Actual HTML epilog -our $html_ext = "html"; # Extension for generated HTML files -our $html_gzip = 0; # Compress with gzip -our $demangle_cpp = 0; # Demangle C++ function names -our @opt_ignore_errors; # Ignore certain error classes during processing -our @ignore; -our $opt_config_file; # User-specified configuration file location -our %opt_rc; -our $charset = "UTF-8"; # Default charset for HTML pages -our @fileview_sortlist; -our @fileview_sortname = ("", "-sort-l", "-sort-f", "-sort-b"); -our @funcview_sortlist; -our @rate_name = ("Lo", "Med", "Hi"); -our @rate_png = ("ruby.png", "amber.png", "emerald.png"); -our $lcov_func_coverage = 1; -our $lcov_branch_coverage = 0; - -our $cwd = `pwd`; # Current working directory -chomp($cwd); -our $tool_dir = dirname($0); # Directory where genhtml tool is installed - - -# -# Code entry point -# - -$SIG{__WARN__} = \&warn_handler; -$SIG{__DIE__} = \&die_handler; - -# Prettify version string -$lcov_version =~ s/\$\s*Revision\s*:?\s*(\S+)\s*\$/$1/; - -# Add current working directory if $tool_dir is not already an absolute path -if (! ($tool_dir =~ /^\/(.*)$/)) -{ - $tool_dir = "$cwd/$tool_dir"; -} - -# Check command line for a configuration file name -Getopt::Long::Configure("pass_through", "no_auto_abbrev"); -GetOptions("config-file=s" => \$opt_config_file, - "rc=s%" => \%opt_rc); -Getopt::Long::Configure("default"); - -# Read configuration file if available -if (defined($opt_config_file)) { - $config = read_config($opt_config_file); -} elsif (defined($ENV{"HOME"}) && (-r $ENV{"HOME"}."/.lcovrc")) -{ - $config = read_config($ENV{"HOME"}."/.lcovrc"); -} -elsif (-r "/etc/lcovrc") -{ - $config = read_config("/etc/lcovrc"); -} - -if ($config || %opt_rc) -{ - # Copy configuration file and --rc values to variables - apply_config({ - "genhtml_css_file" => \$css_filename, - "genhtml_hi_limit" => \$hi_limit, - "genhtml_med_limit" => \$med_limit, - "genhtml_line_field_width" => \$line_field_width, - "genhtml_overview_width" => \$overview_width, - "genhtml_nav_resolution" => \$nav_resolution, - "genhtml_nav_offset" => \$nav_offset, - "genhtml_keep_descriptions" => \$keep_descriptions, - "genhtml_no_prefix" => \$no_prefix, - "genhtml_no_source" => \$no_sourceview, - "genhtml_num_spaces" => \$tab_size, - "genhtml_highlight" => \$highlight, - "genhtml_legend" => \$legend, - "genhtml_html_prolog" => \$html_prolog_file, - "genhtml_html_epilog" => \$html_epilog_file, - "genhtml_html_extension" => \$html_ext, - "genhtml_html_gzip" => \$html_gzip, - "genhtml_function_hi_limit" => \$fn_hi_limit, - "genhtml_function_med_limit" => \$fn_med_limit, - "genhtml_function_coverage" => \$func_coverage, - "genhtml_branch_hi_limit" => \$br_hi_limit, - "genhtml_branch_med_limit" => \$br_med_limit, - "genhtml_branch_coverage" => \$br_coverage, - "genhtml_branch_field_width" => \$br_field_width, - "genhtml_sort" => \$sort, - "genhtml_charset" => \$charset, - "lcov_function_coverage" => \$lcov_func_coverage, - "lcov_branch_coverage" => \$lcov_branch_coverage, - }); -} - -# Copy related values if not specified -$fn_hi_limit = $hi_limit if (!defined($fn_hi_limit)); -$fn_med_limit = $med_limit if (!defined($fn_med_limit)); -$br_hi_limit = $hi_limit if (!defined($br_hi_limit)); -$br_med_limit = $med_limit if (!defined($br_med_limit)); -$func_coverage = $lcov_func_coverage if (!defined($func_coverage)); -$br_coverage = $lcov_branch_coverage if (!defined($br_coverage)); - -# Parse command line options -if (!GetOptions("output-directory|o=s" => \$output_directory, - "title|t=s" => \$test_title, - "description-file|d=s" => \$desc_filename, - "keep-descriptions|k" => \$keep_descriptions, - "css-file|c=s" => \$css_filename, - "baseline-file|b=s" => \$base_filename, - "prefix|p=s" => \$dir_prefix, - "num-spaces=i" => \$tab_size, - "no-prefix" => \$no_prefix, - "no-sourceview" => \$no_sourceview, - "show-details|s" => \$show_details, - "frames|f" => \$frames, - "highlight" => \$highlight, - "legend" => \$legend, - "quiet|q" => \$quiet, - "help|h|?" => \$help, - "version|v" => \$version, - "html-prolog=s" => \$html_prolog_file, - "html-epilog=s" => \$html_epilog_file, - "html-extension=s" => \$html_ext, - "html-gzip" => \$html_gzip, - "function-coverage" => \$func_coverage, - "no-function-coverage" => \$no_func_coverage, - "branch-coverage" => \$br_coverage, - "no-branch-coverage" => \$no_br_coverage, - "sort" => \$sort, - "no-sort" => \$no_sort, - "demangle-cpp" => \$demangle_cpp, - "ignore-errors=s" => \@opt_ignore_errors, - "config-file=s" => \$opt_config_file, - "rc=s%" => \%opt_rc, - )) -{ - print(STDERR "Use $tool_name --help to get usage information\n"); - exit(1); -} else { - # Merge options - if ($no_func_coverage) { - $func_coverage = 0; - } - if ($no_br_coverage) { - $br_coverage = 0; - } - - # Merge sort options - if ($no_sort) { - $sort = 0; - } -} - -@info_filenames = @ARGV; - -# Check for help option -if ($help) -{ - print_usage(*STDOUT); - exit(0); -} - -# Check for version option -if ($version) -{ - print("$tool_name: $lcov_version\n"); - exit(0); -} - -# Determine which errors the user wants us to ignore -parse_ignore_errors(@opt_ignore_errors); - -# Check for info filename -if (!@info_filenames) -{ - die("No filename specified\n". - "Use $tool_name --help to get usage information\n"); -} - -# Generate a title if none is specified -if (!$test_title) -{ - if (scalar(@info_filenames) == 1) - { - # Only one filename specified, use it as title - $test_title = basename($info_filenames[0]); - } - else - { - # More than one filename specified, used default title - $test_title = "unnamed"; - } -} - -# Make sure css_filename is an absolute path (in case we're changing -# directories) -if ($css_filename) -{ - if (!($css_filename =~ /^\/(.*)$/)) - { - $css_filename = $cwd."/".$css_filename; - } -} - -# Make sure tab_size is within valid range -if ($tab_size < 1) -{ - print(STDERR "ERROR: invalid number of spaces specified: ". - "$tab_size!\n"); - exit(1); -} - -# Get HTML prolog and epilog -$html_prolog = get_html_prolog($html_prolog_file); -$html_epilog = get_html_epilog($html_epilog_file); - -# Issue a warning if --no-sourceview is enabled together with --frames -if ($no_sourceview && defined($frames)) -{ - warn("WARNING: option --frames disabled because --no-sourceview ". - "was specified!\n"); - $frames = undef; -} - -# Issue a warning if --no-prefix is enabled together with --prefix -if ($no_prefix && defined($dir_prefix)) -{ - warn("WARNING: option --prefix disabled because --no-prefix was ". - "specified!\n"); - $dir_prefix = undef; -} - -@fileview_sortlist = ($SORT_FILE); -@funcview_sortlist = ($SORT_FILE); - -if ($sort) { - push(@fileview_sortlist, $SORT_LINE); - push(@fileview_sortlist, $SORT_FUNC) if ($func_coverage); - push(@fileview_sortlist, $SORT_BRANCH) if ($br_coverage); - push(@funcview_sortlist, $SORT_LINE); -} - -if ($frames) -{ - # Include genpng code needed for overview image generation - do("$tool_dir/genpng"); -} - -# Ensure that the c++filt tool is available when using --demangle-cpp -if ($demangle_cpp) -{ - if (system_no_output(3, "c++filt", "--version")) { - die("ERROR: could not find c++filt tool needed for ". - "--demangle-cpp\n"); - } -} - -# Make sure output_directory exists, create it if necessary -if ($output_directory) -{ - stat($output_directory); - - if (! -e _) - { - create_sub_dir($output_directory); - } -} - -# Do something -gen_html(); - -exit(0); - - - -# -# print_usage(handle) -# -# Print usage information. -# - -sub print_usage(*) -{ - local *HANDLE = $_[0]; - - print(HANDLE <'$filename'") - or die("ERROR: cannot open $filename for writing ". - "(gzip)!\n"); - } - else - { - open($handle, ">", $filename) - or die("ERROR: cannot open $filename for writing!\n"); - } -} - -sub write_dir_page($$$$$$$$$$$$$$$$$) -{ - my ($name, $rel_dir, $base_dir, $title, $trunc_dir, $overall_found, - $overall_hit, $total_fn_found, $total_fn_hit, $total_br_found, - $total_br_hit, $overview, $testhash, $testfnchash, $testbrhash, - $view_type, $sort_type) = @_; - - # Generate directory overview page including details - html_create(*HTML_HANDLE, "$rel_dir/index$name.$html_ext"); - if (!defined($trunc_dir)) { - $trunc_dir = ""; - } - $title .= " - " if ($trunc_dir ne ""); - write_html_prolog(*HTML_HANDLE, $base_dir, "LCOV - $title$trunc_dir"); - write_header(*HTML_HANDLE, $view_type, $trunc_dir, $rel_dir, - $overall_found, $overall_hit, $total_fn_found, - $total_fn_hit, $total_br_found, $total_br_hit, $sort_type); - write_file_table(*HTML_HANDLE, $base_dir, $overview, $testhash, - $testfnchash, $testbrhash, $view_type, $sort_type); - write_html_epilog(*HTML_HANDLE, $base_dir); - close(*HTML_HANDLE); -} - - -# -# process_dir(dir_name) -# - -sub process_dir($) -{ - my $abs_dir = $_[0]; - my $trunc_dir; - my $rel_dir = $abs_dir; - my $base_dir; - my $filename; - my %overview; - my $lines_found; - my $lines_hit; - my $fn_found; - my $fn_hit; - my $br_found; - my $br_hit; - my $overall_found=0; - my $overall_hit=0; - my $total_fn_found=0; - my $total_fn_hit=0; - my $total_br_found = 0; - my $total_br_hit = 0; - my $base_name; - my $extension; - my $testdata; - my %testhash; - my $testfncdata; - my %testfnchash; - my $testbrdata; - my %testbrhash; - my @sort_list; - local *HTML_HANDLE; - - # Remove prefix if applicable - if (!$no_prefix) - { - # Match directory name beginning with $dir_prefix - $rel_dir = apply_prefix($rel_dir, $dir_prefix); - } - - $trunc_dir = $rel_dir; - - # Remove leading / - if ($rel_dir =~ /^\/(.*)$/) - { - $rel_dir = substr($rel_dir, 1); - } - - # Handle files in root directory gracefully - $rel_dir = "root" if ($rel_dir eq ""); - $trunc_dir = "root" if ($trunc_dir eq ""); - - $base_dir = get_relative_base_path($rel_dir); - - create_sub_dir($rel_dir); - - # Match filenames which specify files in this directory, not including - # sub-directories - foreach $filename (grep(/^\Q$abs_dir\E\/[^\/]*$/,keys(%info_data))) - { - my $page_link; - my $func_link; - - ($lines_found, $lines_hit, $fn_found, $fn_hit, $br_found, - $br_hit, $testdata, $testfncdata, $testbrdata) = - process_file($trunc_dir, $rel_dir, $filename); - - $base_name = basename($filename); - - if ($no_sourceview) { - $page_link = ""; - } elsif ($frames) { - # Link to frameset page - $page_link = "$base_name.gcov.frameset.$html_ext"; - } else { - # Link directory to source code view page - $page_link = "$base_name.gcov.$html_ext"; - } - $overview{$base_name} = [$lines_found, $lines_hit, $fn_found, - $fn_hit, $br_found, $br_hit, - $page_link, - get_rate($lines_found, $lines_hit), - get_rate($fn_found, $fn_hit), - get_rate($br_found, $br_hit)]; - - $testhash{$base_name} = $testdata; - $testfnchash{$base_name} = $testfncdata; - $testbrhash{$base_name} = $testbrdata; - - $overall_found += $lines_found; - $overall_hit += $lines_hit; - - $total_fn_found += $fn_found; - $total_fn_hit += $fn_hit; - - $total_br_found += $br_found; - $total_br_hit += $br_hit; - } - - # Create sorted pages - foreach (@fileview_sortlist) { - # Generate directory overview page (without details) - write_dir_page($fileview_sortname[$_], $rel_dir, $base_dir, - $test_title, $trunc_dir, $overall_found, - $overall_hit, $total_fn_found, $total_fn_hit, - $total_br_found, $total_br_hit, \%overview, {}, - {}, {}, 1, $_); - if (!$show_details) { - next; - } - # Generate directory overview page including details - write_dir_page("-detail".$fileview_sortname[$_], $rel_dir, - $base_dir, $test_title, $trunc_dir, - $overall_found, $overall_hit, $total_fn_found, - $total_fn_hit, $total_br_found, $total_br_hit, - \%overview, \%testhash, \%testfnchash, - \%testbrhash, 1, $_); - } - - # Calculate resulting line counts - return ($overall_found, $overall_hit, $total_fn_found, $total_fn_hit, - $total_br_found, $total_br_hit); -} - - -# -# get_converted_lines(testdata) -# -# Return hash of line numbers of those lines which were only covered in -# converted data sets. -# - -sub get_converted_lines($) -{ - my $testdata = $_[0]; - my $testcount; - my %converted; - my %nonconverted; - my $hash; - my $testcase; - my $line; - my %result; - - - # Get a hash containing line numbers with positive counts both for - # converted and original data sets - foreach $testcase (keys(%{$testdata})) - { - # Check to see if this is a converted data set - if ($testcase =~ /,diff$/) - { - $hash = \%converted; - } - else - { - $hash = \%nonconverted; - } - - $testcount = $testdata->{$testcase}; - # Add lines with a positive count to hash - foreach $line (keys%{$testcount}) - { - if ($testcount->{$line} > 0) - { - $hash->{$line} = 1; - } - } - } - - # Combine both hashes to resulting list - foreach $line (keys(%converted)) - { - if (!defined($nonconverted{$line})) - { - $result{$line} = 1; - } - } - - return \%result; -} - - -sub write_function_page($$$$$$$$$$$$$$$$$$) -{ - my ($base_dir, $rel_dir, $trunc_dir, $base_name, $title, - $lines_found, $lines_hit, $fn_found, $fn_hit, $br_found, $br_hit, - $sumcount, $funcdata, $sumfnccount, $testfncdata, $sumbrcount, - $testbrdata, $sort_type) = @_; - my $pagetitle; - my $filename; - - # Generate function table for this file - if ($sort_type == 0) { - $filename = "$rel_dir/$base_name.func.$html_ext"; - } else { - $filename = "$rel_dir/$base_name.func-sort-c.$html_ext"; - } - html_create(*HTML_HANDLE, $filename); - $pagetitle = "LCOV - $title - $trunc_dir/$base_name - functions"; - write_html_prolog(*HTML_HANDLE, $base_dir, $pagetitle); - write_header(*HTML_HANDLE, 4, "$trunc_dir/$base_name", - "$rel_dir/$base_name", $lines_found, $lines_hit, - $fn_found, $fn_hit, $br_found, $br_hit, $sort_type); - write_function_table(*HTML_HANDLE, "$base_name.gcov.$html_ext", - $sumcount, $funcdata, - $sumfnccount, $testfncdata, $sumbrcount, - $testbrdata, $base_name, - $base_dir, $sort_type); - write_html_epilog(*HTML_HANDLE, $base_dir, 1); - close(*HTML_HANDLE); -} - - -# -# process_file(trunc_dir, rel_dir, filename) -# - -sub process_file($$$) -{ - info("Processing file ".apply_prefix($_[2], $dir_prefix)."\n"); - - my $trunc_dir = $_[0]; - my $rel_dir = $_[1]; - my $filename = $_[2]; - my $base_name = basename($filename); - my $base_dir = get_relative_base_path($rel_dir); - my $testdata; - my $testcount; - my $sumcount; - my $funcdata; - my $checkdata; - my $testfncdata; - my $sumfnccount; - my $testbrdata; - my $sumbrcount; - my $lines_found; - my $lines_hit; - my $fn_found; - my $fn_hit; - my $br_found; - my $br_hit; - my $converted; - my @source; - my $pagetitle; - local *HTML_HANDLE; - - ($testdata, $sumcount, $funcdata, $checkdata, $testfncdata, - $sumfnccount, $testbrdata, $sumbrcount, $lines_found, $lines_hit, - $fn_found, $fn_hit, $br_found, $br_hit) - = get_info_entry($info_data{$filename}); - - # Return after this point in case user asked us not to generate - # source code view - if ($no_sourceview) - { - return ($lines_found, $lines_hit, $fn_found, $fn_hit, - $br_found, $br_hit, $testdata, $testfncdata, - $testbrdata); - } - - $converted = get_converted_lines($testdata); - # Generate source code view for this file - html_create(*HTML_HANDLE, "$rel_dir/$base_name.gcov.$html_ext"); - $pagetitle = "LCOV - $test_title - $trunc_dir/$base_name"; - write_html_prolog(*HTML_HANDLE, $base_dir, $pagetitle); - write_header(*HTML_HANDLE, 2, "$trunc_dir/$base_name", - "$rel_dir/$base_name", $lines_found, $lines_hit, - $fn_found, $fn_hit, $br_found, $br_hit, 0); - @source = write_source(*HTML_HANDLE, $filename, $sumcount, $checkdata, - $converted, $funcdata, $sumbrcount); - - write_html_epilog(*HTML_HANDLE, $base_dir, 1); - close(*HTML_HANDLE); - - if ($func_coverage) { - # Create function tables - foreach (@funcview_sortlist) { - write_function_page($base_dir, $rel_dir, $trunc_dir, - $base_name, $test_title, - $lines_found, $lines_hit, - $fn_found, $fn_hit, $br_found, - $br_hit, $sumcount, - $funcdata, $sumfnccount, - $testfncdata, $sumbrcount, - $testbrdata, $_); - } - } - - # Additional files are needed in case of frame output - if (!$frames) - { - return ($lines_found, $lines_hit, $fn_found, $fn_hit, - $br_found, $br_hit, $testdata, $testfncdata, - $testbrdata); - } - - # Create overview png file - gen_png("$rel_dir/$base_name.gcov.png", $overview_width, $tab_size, - @source); - - # Create frameset page - html_create(*HTML_HANDLE, - "$rel_dir/$base_name.gcov.frameset.$html_ext"); - write_frameset(*HTML_HANDLE, $base_dir, $base_name, $pagetitle); - close(*HTML_HANDLE); - - # Write overview frame - html_create(*HTML_HANDLE, - "$rel_dir/$base_name.gcov.overview.$html_ext"); - write_overview(*HTML_HANDLE, $base_dir, $base_name, $pagetitle, - scalar(@source)); - close(*HTML_HANDLE); - - return ($lines_found, $lines_hit, $fn_found, $fn_hit, $br_found, - $br_hit, $testdata, $testfncdata, $testbrdata); -} - - -# -# read_info_file(info_filename) -# -# Read in the contents of the .info file specified by INFO_FILENAME. Data will -# be returned as a reference to a hash containing the following mappings: -# -# %result: for each filename found in file -> \%data -# -# %data: "test" -> \%testdata -# "sum" -> \%sumcount -# "func" -> \%funcdata -# "found" -> $lines_found (number of instrumented lines found in file) -# "hit" -> $lines_hit (number of executed lines in file) -# "check" -> \%checkdata -# "testfnc" -> \%testfncdata -# "sumfnc" -> \%sumfnccount -# "testbr" -> \%testbrdata -# "sumbr" -> \%sumbrcount -# -# %testdata : name of test affecting this file -> \%testcount -# %testfncdata: name of test affecting this file -> \%testfnccount -# %testbrdata: name of test affecting this file -> \%testbrcount -# -# %testcount : line number -> execution count for a single test -# %testfnccount: function name -> execution count for a single test -# %testbrcount : line number -> branch coverage data for a single test -# %sumcount : line number -> execution count for all tests -# %sumfnccount : function name -> execution count for all tests -# %sumbrcount : line number -> branch coverage data for all tests -# %funcdata : function name -> line number -# %checkdata : line number -> checksum of source code line -# $brdata : vector of items: block, branch, taken -# -# Note that .info file sections referring to the same file and test name -# will automatically be combined by adding all execution counts. -# -# Note that if INFO_FILENAME ends with ".gz", it is assumed that the file -# is compressed using GZIP. If available, GUNZIP will be used to decompress -# this file. -# -# Die on error. -# - -sub read_info_file($) -{ - my $tracefile = $_[0]; # Name of tracefile - my %result; # Resulting hash: file -> data - my $data; # Data handle for current entry - my $testdata; # " " - my $testcount; # " " - my $sumcount; # " " - my $funcdata; # " " - my $checkdata; # " " - my $testfncdata; - my $testfnccount; - my $sumfnccount; - my $testbrdata; - my $testbrcount; - my $sumbrcount; - my $line; # Current line read from .info file - my $testname; # Current test name - my $filename; # Current filename - my $hitcount; # Count for lines hit - my $count; # Execution count of current line - my $negative; # If set, warn about negative counts - my $changed_testname; # If set, warn about changed testname - my $line_checksum; # Checksum of current line - my $br_found; - my $br_hit; - local *INFO_HANDLE; # Filehandle for .info file - - info("Reading data file $tracefile\n"); - - # Check if file exists and is readable - stat($_[0]); - if (!(-r _)) - { - die("ERROR: cannot read file $_[0]!\n"); - } - - # Check if this is really a plain file - if (!(-f _)) - { - die("ERROR: not a plain file: $_[0]!\n"); - } - - # Check for .gz extension - if ($_[0] =~ /\.gz$/) - { - # Check for availability of GZIP tool - system_no_output(1, "gunzip" ,"-h") - and die("ERROR: gunzip command not available!\n"); - - # Check integrity of compressed file - system_no_output(1, "gunzip", "-t", $_[0]) - and die("ERROR: integrity check failed for ". - "compressed file $_[0]!\n"); - - # Open compressed file - open(INFO_HANDLE, "-|", "gunzip -c '$_[0]'") - or die("ERROR: cannot start gunzip to decompress ". - "file $_[0]!\n"); - } - else - { - # Open decompressed file - open(INFO_HANDLE, "<", $_[0]) - or die("ERROR: cannot read file $_[0]!\n"); - } - - $testname = ""; - while () - { - chomp($_); - $line = $_; - - # Switch statement - foreach ($line) - { - /^TN:([^,]*)(,diff)?/ && do - { - # Test name information found - $testname = defined($1) ? $1 : ""; - if ($testname =~ s/\W/_/g) - { - $changed_testname = 1; - } - $testname .= $2 if (defined($2)); - last; - }; - - /^[SK]F:(.*)/ && do - { - # Filename information found - # Retrieve data for new entry - $filename = $1; - - $data = $result{$filename}; - ($testdata, $sumcount, $funcdata, $checkdata, - $testfncdata, $sumfnccount, $testbrdata, - $sumbrcount) = - get_info_entry($data); - - if (defined($testname)) - { - $testcount = $testdata->{$testname}; - $testfnccount = $testfncdata->{$testname}; - $testbrcount = $testbrdata->{$testname}; - } - else - { - $testcount = {}; - $testfnccount = {}; - $testbrcount = {}; - } - last; - }; - - /^DA:(\d+),(-?\d+)(,[^,\s]+)?/ && do - { - # Fix negative counts - $count = $2 < 0 ? 0 : $2; - if ($2 < 0) - { - $negative = 1; - } - # Execution count found, add to structure - # Add summary counts - $sumcount->{$1} += $count; - - # Add test-specific counts - if (defined($testname)) - { - $testcount->{$1} += $count; - } - - # Store line checksum if available - if (defined($3)) - { - $line_checksum = substr($3, 1); - - # Does it match a previous definition - if (defined($checkdata->{$1}) && - ($checkdata->{$1} ne - $line_checksum)) - { - die("ERROR: checksum mismatch ". - "at $filename:$1\n"); - } - - $checkdata->{$1} = $line_checksum; - } - last; - }; - - /^FN:(\d+),([^,]+)/ && do - { - last if (!$func_coverage); - - # Function data found, add to structure - $funcdata->{$2} = $1; - - # Also initialize function call data - if (!defined($sumfnccount->{$2})) { - $sumfnccount->{$2} = 0; - } - if (defined($testname)) - { - if (!defined($testfnccount->{$2})) { - $testfnccount->{$2} = 0; - } - } - last; - }; - - /^FNDA:(\d+),([^,]+)/ && do - { - last if (!$func_coverage); - # Function call count found, add to structure - # Add summary counts - $sumfnccount->{$2} += $1; - - # Add test-specific counts - if (defined($testname)) - { - $testfnccount->{$2} += $1; - } - last; - }; - - /^BRDA:(\d+),(\d+),(\d+),(\d+|-)/ && do { - # Branch coverage data found - my ($line, $block, $branch, $taken) = - ($1, $2, $3, $4); - - last if (!$br_coverage); - $sumbrcount->{$line} = - br_ivec_push($sumbrcount->{$line}, - $block, $branch, $taken); - - # Add test-specific counts - if (defined($testname)) { - $testbrcount->{$line} = - br_ivec_push( - $testbrcount->{$line}, - $block, $branch, - $taken); - } - last; - }; - - /^end_of_record/ && do - { - # Found end of section marker - if ($filename) - { - # Store current section data - if (defined($testname)) - { - $testdata->{$testname} = - $testcount; - $testfncdata->{$testname} = - $testfnccount; - $testbrdata->{$testname} = - $testbrcount; - } - - set_info_entry($data, $testdata, - $sumcount, $funcdata, - $checkdata, $testfncdata, - $sumfnccount, - $testbrdata, - $sumbrcount); - $result{$filename} = $data; - last; - } - }; - - # default - last; - } - } - close(INFO_HANDLE); - - # Calculate lines_found and lines_hit for each file - foreach $filename (keys(%result)) - { - $data = $result{$filename}; - - ($testdata, $sumcount, undef, undef, $testfncdata, - $sumfnccount, $testbrdata, $sumbrcount) = - get_info_entry($data); - - # Filter out empty files - if (scalar(keys(%{$sumcount})) == 0) - { - delete($result{$filename}); - next; - } - # Filter out empty test cases - foreach $testname (keys(%{$testdata})) - { - if (!defined($testdata->{$testname}) || - scalar(keys(%{$testdata->{$testname}})) == 0) - { - delete($testdata->{$testname}); - delete($testfncdata->{$testname}); - } - } - - $data->{"found"} = scalar(keys(%{$sumcount})); - $hitcount = 0; - - foreach (keys(%{$sumcount})) - { - if ($sumcount->{$_} > 0) { $hitcount++; } - } - - $data->{"hit"} = $hitcount; - - # Get found/hit values for function call data - $data->{"f_found"} = scalar(keys(%{$sumfnccount})); - $hitcount = 0; - - foreach (keys(%{$sumfnccount})) { - if ($sumfnccount->{$_} > 0) { - $hitcount++; - } - } - $data->{"f_hit"} = $hitcount; - - # Get found/hit values for branch data - ($br_found, $br_hit) = get_br_found_and_hit($sumbrcount); - - $data->{"b_found"} = $br_found; - $data->{"b_hit"} = $br_hit; - } - - if (scalar(keys(%result)) == 0) - { - die("ERROR: no valid records found in tracefile $tracefile\n"); - } - if ($negative) - { - warn("WARNING: negative counts found in tracefile ". - "$tracefile\n"); - } - if ($changed_testname) - { - warn("WARNING: invalid characters removed from testname in ". - "tracefile $tracefile\n"); - } - - return(\%result); -} - - -# -# get_info_entry(hash_ref) -# -# Retrieve data from an entry of the structure generated by read_info_file(). -# Return a list of references to hashes: -# (test data hash ref, sum count hash ref, funcdata hash ref, checkdata hash -# ref, testfncdata hash ref, sumfnccount hash ref, lines found, lines hit, -# functions found, functions hit) -# - -sub get_info_entry($) -{ - my $testdata_ref = $_[0]->{"test"}; - my $sumcount_ref = $_[0]->{"sum"}; - my $funcdata_ref = $_[0]->{"func"}; - my $checkdata_ref = $_[0]->{"check"}; - my $testfncdata = $_[0]->{"testfnc"}; - my $sumfnccount = $_[0]->{"sumfnc"}; - my $testbrdata = $_[0]->{"testbr"}; - my $sumbrcount = $_[0]->{"sumbr"}; - my $lines_found = $_[0]->{"found"}; - my $lines_hit = $_[0]->{"hit"}; - my $fn_found = $_[0]->{"f_found"}; - my $fn_hit = $_[0]->{"f_hit"}; - my $br_found = $_[0]->{"b_found"}; - my $br_hit = $_[0]->{"b_hit"}; - - return ($testdata_ref, $sumcount_ref, $funcdata_ref, $checkdata_ref, - $testfncdata, $sumfnccount, $testbrdata, $sumbrcount, - $lines_found, $lines_hit, $fn_found, $fn_hit, - $br_found, $br_hit); -} - - -# -# set_info_entry(hash_ref, testdata_ref, sumcount_ref, funcdata_ref, -# checkdata_ref, testfncdata_ref, sumfcncount_ref, -# testbrdata_ref, sumbrcount_ref[,lines_found, -# lines_hit, f_found, f_hit, $b_found, $b_hit]) -# -# Update the hash referenced by HASH_REF with the provided data references. -# - -sub set_info_entry($$$$$$$$$;$$$$$$) -{ - my $data_ref = $_[0]; - - $data_ref->{"test"} = $_[1]; - $data_ref->{"sum"} = $_[2]; - $data_ref->{"func"} = $_[3]; - $data_ref->{"check"} = $_[4]; - $data_ref->{"testfnc"} = $_[5]; - $data_ref->{"sumfnc"} = $_[6]; - $data_ref->{"testbr"} = $_[7]; - $data_ref->{"sumbr"} = $_[8]; - - if (defined($_[9])) { $data_ref->{"found"} = $_[9]; } - if (defined($_[10])) { $data_ref->{"hit"} = $_[10]; } - if (defined($_[11])) { $data_ref->{"f_found"} = $_[11]; } - if (defined($_[12])) { $data_ref->{"f_hit"} = $_[12]; } - if (defined($_[13])) { $data_ref->{"b_found"} = $_[13]; } - if (defined($_[14])) { $data_ref->{"b_hit"} = $_[14]; } -} - - -# -# add_counts(data1_ref, data2_ref) -# -# DATA1_REF and DATA2_REF are references to hashes containing a mapping -# -# line number -> execution count -# -# Return a list (RESULT_REF, LINES_FOUND, LINES_HIT) where RESULT_REF -# is a reference to a hash containing the combined mapping in which -# execution counts are added. -# - -sub add_counts($$) -{ - my %data1 = %{$_[0]}; # Hash 1 - my %data2 = %{$_[1]}; # Hash 2 - my %result; # Resulting hash - my $line; # Current line iteration scalar - my $data1_count; # Count of line in hash1 - my $data2_count; # Count of line in hash2 - my $found = 0; # Total number of lines found - my $hit = 0; # Number of lines with a count > 0 - - foreach $line (keys(%data1)) - { - $data1_count = $data1{$line}; - $data2_count = $data2{$line}; - - # Add counts if present in both hashes - if (defined($data2_count)) { $data1_count += $data2_count; } - - # Store sum in %result - $result{$line} = $data1_count; - - $found++; - if ($data1_count > 0) { $hit++; } - } - - # Add lines unique to data2 - foreach $line (keys(%data2)) - { - # Skip lines already in data1 - if (defined($data1{$line})) { next; } - - # Copy count from data2 - $result{$line} = $data2{$line}; - - $found++; - if ($result{$line} > 0) { $hit++; } - } - - return (\%result, $found, $hit); -} - - -# -# merge_checksums(ref1, ref2, filename) -# -# REF1 and REF2 are references to hashes containing a mapping -# -# line number -> checksum -# -# Merge checksum lists defined in REF1 and REF2 and return reference to -# resulting hash. Die if a checksum for a line is defined in both hashes -# but does not match. -# - -sub merge_checksums($$$) -{ - my $ref1 = $_[0]; - my $ref2 = $_[1]; - my $filename = $_[2]; - my %result; - my $line; - - foreach $line (keys(%{$ref1})) - { - if (defined($ref2->{$line}) && - ($ref1->{$line} ne $ref2->{$line})) - { - die("ERROR: checksum mismatch at $filename:$line\n"); - } - $result{$line} = $ref1->{$line}; - } - - foreach $line (keys(%{$ref2})) - { - $result{$line} = $ref2->{$line}; - } - - return \%result; -} - - -# -# merge_func_data(funcdata1, funcdata2, filename) -# - -sub merge_func_data($$$) -{ - my ($funcdata1, $funcdata2, $filename) = @_; - my %result; - my $func; - - if (defined($funcdata1)) { - %result = %{$funcdata1}; - } - - foreach $func (keys(%{$funcdata2})) { - my $line1 = $result{$func}; - my $line2 = $funcdata2->{$func}; - - if (defined($line1) && ($line1 != $line2)) { - warn("WARNING: function data mismatch at ". - "$filename:$line2\n"); - next; - } - $result{$func} = $line2; - } - - return \%result; -} - - -# -# add_fnccount(fnccount1, fnccount2) -# -# Add function call count data. Return list (fnccount_added, f_found, f_hit) -# - -sub add_fnccount($$) -{ - my ($fnccount1, $fnccount2) = @_; - my %result; - my $fn_found; - my $fn_hit; - my $function; - - if (defined($fnccount1)) { - %result = %{$fnccount1}; - } - foreach $function (keys(%{$fnccount2})) { - $result{$function} += $fnccount2->{$function}; - } - $fn_found = scalar(keys(%result)); - $fn_hit = 0; - foreach $function (keys(%result)) { - if ($result{$function} > 0) { - $fn_hit++; - } - } - - return (\%result, $fn_found, $fn_hit); -} - -# -# add_testfncdata(testfncdata1, testfncdata2) -# -# Add function call count data for several tests. Return reference to -# added_testfncdata. -# - -sub add_testfncdata($$) -{ - my ($testfncdata1, $testfncdata2) = @_; - my %result; - my $testname; - - foreach $testname (keys(%{$testfncdata1})) { - if (defined($testfncdata2->{$testname})) { - my $fnccount; - - # Function call count data for this testname exists - # in both data sets: add - ($fnccount) = add_fnccount( - $testfncdata1->{$testname}, - $testfncdata2->{$testname}); - $result{$testname} = $fnccount; - next; - } - # Function call count data for this testname is unique to - # data set 1: copy - $result{$testname} = $testfncdata1->{$testname}; - } - - # Add count data for testnames unique to data set 2 - foreach $testname (keys(%{$testfncdata2})) { - if (!defined($result{$testname})) { - $result{$testname} = $testfncdata2->{$testname}; - } - } - return \%result; -} - - -# -# brcount_to_db(brcount) -# -# Convert brcount data to the following format: -# -# db: line number -> block hash -# block hash: block number -> branch hash -# branch hash: branch number -> taken value -# - -sub brcount_to_db($) -{ - my ($brcount) = @_; - my $line; - my $db; - - # Add branches from first count to database - foreach $line (keys(%{$brcount})) { - my $brdata = $brcount->{$line}; - my $i; - my $num = br_ivec_len($brdata); - - for ($i = 0; $i < $num; $i++) { - my ($block, $branch, $taken) = br_ivec_get($brdata, $i); - - $db->{$line}->{$block}->{$branch} = $taken; - } - } - - return $db; -} - - -# -# db_to_brcount(db) -# -# Convert branch coverage data back to brcount format. -# - -sub db_to_brcount($) -{ - my ($db) = @_; - my $line; - my $brcount = {}; - my $br_found = 0; - my $br_hit = 0; - - # Convert database back to brcount format - foreach $line (sort({$a <=> $b} keys(%{$db}))) { - my $ldata = $db->{$line}; - my $brdata; - my $block; - - foreach $block (sort({$a <=> $b} keys(%{$ldata}))) { - my $bdata = $ldata->{$block}; - my $branch; - - foreach $branch (sort({$a <=> $b} keys(%{$bdata}))) { - my $taken = $bdata->{$branch}; - - $br_found++; - $br_hit++ if ($taken ne "-" && $taken > 0); - $brdata = br_ivec_push($brdata, $block, - $branch, $taken); - } - } - $brcount->{$line} = $brdata; - } - - return ($brcount, $br_found, $br_hit); -} - - -# -# combine_brcount(brcount1, brcount2, type) -# -# If add is BR_ADD, add branch coverage data and return list (brcount_added, -# br_found, br_hit). If add is BR_SUB, subtract the taken values of brcount2 -# from brcount1 and return (brcount_sub, br_found, br_hit). -# - -sub combine_brcount($$$) -{ - my ($brcount1, $brcount2, $type) = @_; - my $line; - my $block; - my $branch; - my $taken; - my $db; - my $br_found = 0; - my $br_hit = 0; - my $result; - - # Convert branches from first count to database - $db = brcount_to_db($brcount1); - # Combine values from database and second count - foreach $line (keys(%{$brcount2})) { - my $brdata = $brcount2->{$line}; - my $num = br_ivec_len($brdata); - my $i; - - for ($i = 0; $i < $num; $i++) { - ($block, $branch, $taken) = br_ivec_get($brdata, $i); - my $new_taken = $db->{$line}->{$block}->{$branch}; - - if ($type == $BR_ADD) { - $new_taken = br_taken_add($new_taken, $taken); - } elsif ($type == $BR_SUB) { - $new_taken = br_taken_sub($new_taken, $taken); - } - $db->{$line}->{$block}->{$branch} = $new_taken - if (defined($new_taken)); - } - } - # Convert database back to brcount format - ($result, $br_found, $br_hit) = db_to_brcount($db); - - return ($result, $br_found, $br_hit); -} - - -# -# add_testbrdata(testbrdata1, testbrdata2) -# -# Add branch coverage data for several tests. Return reference to -# added_testbrdata. -# - -sub add_testbrdata($$) -{ - my ($testbrdata1, $testbrdata2) = @_; - my %result; - my $testname; - - foreach $testname (keys(%{$testbrdata1})) { - if (defined($testbrdata2->{$testname})) { - my $brcount; - - # Branch coverage data for this testname exists - # in both data sets: add - ($brcount) = combine_brcount($testbrdata1->{$testname}, - $testbrdata2->{$testname}, $BR_ADD); - $result{$testname} = $brcount; - next; - } - # Branch coverage data for this testname is unique to - # data set 1: copy - $result{$testname} = $testbrdata1->{$testname}; - } - - # Add count data for testnames unique to data set 2 - foreach $testname (keys(%{$testbrdata2})) { - if (!defined($result{$testname})) { - $result{$testname} = $testbrdata2->{$testname}; - } - } - return \%result; -} - - -# -# combine_info_entries(entry_ref1, entry_ref2, filename) -# -# Combine .info data entry hashes referenced by ENTRY_REF1 and ENTRY_REF2. -# Return reference to resulting hash. -# - -sub combine_info_entries($$$) -{ - my $entry1 = $_[0]; # Reference to hash containing first entry - my $testdata1; - my $sumcount1; - my $funcdata1; - my $checkdata1; - my $testfncdata1; - my $sumfnccount1; - my $testbrdata1; - my $sumbrcount1; - - my $entry2 = $_[1]; # Reference to hash containing second entry - my $testdata2; - my $sumcount2; - my $funcdata2; - my $checkdata2; - my $testfncdata2; - my $sumfnccount2; - my $testbrdata2; - my $sumbrcount2; - - my %result; # Hash containing combined entry - my %result_testdata; - my $result_sumcount = {}; - my $result_funcdata; - my $result_testfncdata; - my $result_sumfnccount; - my $result_testbrdata; - my $result_sumbrcount; - my $lines_found; - my $lines_hit; - my $fn_found; - my $fn_hit; - my $br_found; - my $br_hit; - - my $testname; - my $filename = $_[2]; - - # Retrieve data - ($testdata1, $sumcount1, $funcdata1, $checkdata1, $testfncdata1, - $sumfnccount1, $testbrdata1, $sumbrcount1) = get_info_entry($entry1); - ($testdata2, $sumcount2, $funcdata2, $checkdata2, $testfncdata2, - $sumfnccount2, $testbrdata2, $sumbrcount2) = get_info_entry($entry2); - - # Merge checksums - $checkdata1 = merge_checksums($checkdata1, $checkdata2, $filename); - - # Combine funcdata - $result_funcdata = merge_func_data($funcdata1, $funcdata2, $filename); - - # Combine function call count data - $result_testfncdata = add_testfncdata($testfncdata1, $testfncdata2); - ($result_sumfnccount, $fn_found, $fn_hit) = - add_fnccount($sumfnccount1, $sumfnccount2); - - # Combine branch coverage data - $result_testbrdata = add_testbrdata($testbrdata1, $testbrdata2); - ($result_sumbrcount, $br_found, $br_hit) = - combine_brcount($sumbrcount1, $sumbrcount2, $BR_ADD); - - # Combine testdata - foreach $testname (keys(%{$testdata1})) - { - if (defined($testdata2->{$testname})) - { - # testname is present in both entries, requires - # combination - ($result_testdata{$testname}) = - add_counts($testdata1->{$testname}, - $testdata2->{$testname}); - } - else - { - # testname only present in entry1, add to result - $result_testdata{$testname} = $testdata1->{$testname}; - } - - # update sum count hash - ($result_sumcount, $lines_found, $lines_hit) = - add_counts($result_sumcount, - $result_testdata{$testname}); - } - - foreach $testname (keys(%{$testdata2})) - { - # Skip testnames already covered by previous iteration - if (defined($testdata1->{$testname})) { next; } - - # testname only present in entry2, add to result hash - $result_testdata{$testname} = $testdata2->{$testname}; - - # update sum count hash - ($result_sumcount, $lines_found, $lines_hit) = - add_counts($result_sumcount, - $result_testdata{$testname}); - } - - # Calculate resulting sumcount - - # Store result - set_info_entry(\%result, \%result_testdata, $result_sumcount, - $result_funcdata, $checkdata1, $result_testfncdata, - $result_sumfnccount, $result_testbrdata, - $result_sumbrcount, $lines_found, $lines_hit, - $fn_found, $fn_hit, $br_found, $br_hit); - - return(\%result); -} - - -# -# combine_info_files(info_ref1, info_ref2) -# -# Combine .info data in hashes referenced by INFO_REF1 and INFO_REF2. Return -# reference to resulting hash. -# - -sub combine_info_files($$) -{ - my %hash1 = %{$_[0]}; - my %hash2 = %{$_[1]}; - my $filename; - - foreach $filename (keys(%hash2)) - { - if ($hash1{$filename}) - { - # Entry already exists in hash1, combine them - $hash1{$filename} = - combine_info_entries($hash1{$filename}, - $hash2{$filename}, - $filename); - } - else - { - # Entry is unique in both hashes, simply add to - # resulting hash - $hash1{$filename} = $hash2{$filename}; - } - } - - return(\%hash1); -} - - -# -# get_prefix(min_dir, filename_list) -# -# Search FILENAME_LIST for a directory prefix which is common to as many -# list entries as possible, so that removing this prefix will minimize the -# sum of the lengths of all resulting shortened filenames while observing -# that no filename has less than MIN_DIR parent directories. -# - -sub get_prefix($@) -{ - my ($min_dir, @filename_list) = @_; - my %prefix; # mapping: prefix -> sum of lengths - my $current; # Temporary iteration variable - - # Find list of prefixes - foreach (@filename_list) - { - # Need explicit assignment to get a copy of $_ so that - # shortening the contained prefix does not affect the list - $current = $_; - while ($current = shorten_prefix($current)) - { - $current .= "/"; - - # Skip rest if the remaining prefix has already been - # added to hash - if (exists($prefix{$current})) { last; } - - # Initialize with 0 - $prefix{$current}="0"; - } - - } - - # Remove all prefixes that would cause filenames to have less than - # the minimum number of parent directories - foreach my $filename (@filename_list) { - my $dir = dirname($filename); - - for (my $i = 0; $i < $min_dir; $i++) { - delete($prefix{$dir."/"}); - $dir = shorten_prefix($dir); - } - } - - # Check if any prefix remains - return undef if (!%prefix); - - # Calculate sum of lengths for all prefixes - foreach $current (keys(%prefix)) - { - foreach (@filename_list) - { - # Add original length - $prefix{$current} += length($_); - - # Check whether prefix matches - if (substr($_, 0, length($current)) eq $current) - { - # Subtract prefix length for this filename - $prefix{$current} -= length($current); - } - } - } - - # Find and return prefix with minimal sum - $current = (keys(%prefix))[0]; - - foreach (keys(%prefix)) - { - if ($prefix{$_} < $prefix{$current}) - { - $current = $_; - } - } - - $current =~ s/\/$//; - - return($current); -} - - -# -# shorten_prefix(prefix) -# -# Return PREFIX shortened by last directory component. -# - -sub shorten_prefix($) -{ - my @list = split("/", $_[0]); - - pop(@list); - return join("/", @list); -} - - - -# -# get_dir_list(filename_list) -# -# Return sorted list of directories for each entry in given FILENAME_LIST. -# - -sub get_dir_list(@) -{ - my %result; - - foreach (@_) - { - $result{shorten_prefix($_)} = ""; - } - - return(sort(keys(%result))); -} - - -# -# get_relative_base_path(subdirectory) -# -# Return a relative path string which references the base path when applied -# in SUBDIRECTORY. -# -# Example: get_relative_base_path("fs/mm") -> "../../" -# - -sub get_relative_base_path($) -{ - my $result = ""; - my $index; - - # Make an empty directory path a special case - if (!$_[0]) { return(""); } - - # Count number of /s in path - $index = ($_[0] =~ s/\//\//g); - - # Add a ../ to $result for each / in the directory path + 1 - for (; $index>=0; $index--) - { - $result .= "../"; - } - - return $result; -} - - -# -# read_testfile(test_filename) -# -# Read in file TEST_FILENAME which contains test descriptions in the format: -# -# TN: -# TD: -# -# for each test case. Return a reference to a hash containing a mapping -# -# test name -> test description. -# -# Die on error. -# - -sub read_testfile($) -{ - my %result; - my $test_name; - my $changed_testname; - local *TEST_HANDLE; - - open(TEST_HANDLE, "<", $_[0]) - or die("ERROR: cannot open $_[0]!\n"); - - while () - { - chomp($_); - - # Match lines beginning with TN: - if (/^TN:\s+(.*?)\s*$/) - { - # Store name for later use - $test_name = $1; - if ($test_name =~ s/\W/_/g) - { - $changed_testname = 1; - } - } - - # Match lines beginning with TD: - if (/^TD:\s+(.*?)\s*$/) - { - # Check for empty line - if ($1) - { - # Add description to hash - $result{$test_name} .= " $1"; - } - else - { - # Add empty line - $result{$test_name} .= "\n\n"; - } - } - } - - close(TEST_HANDLE); - - if ($changed_testname) - { - warn("WARNING: invalid characters removed from testname in ". - "descriptions file $_[0]\n"); - } - - return \%result; -} - - -# -# escape_html(STRING) -# -# Return a copy of STRING in which all occurrences of HTML special characters -# are escaped. -# - -sub escape_html($) -{ - my $string = $_[0]; - - if (!$string) { return ""; } - - $string =~ s/&/&/g; # & -> & - $string =~ s/ < - $string =~ s/>/>/g; # > -> > - $string =~ s/\"/"/g; # " -> " - - while ($string =~ /^([^\t]*)(\t)/) - { - my $replacement = " "x($tab_size - (length($1) % $tab_size)); - $string =~ s/^([^\t]*)(\t)/$1$replacement/; - } - - $string =~ s/\n/
/g; # \n ->
- - return $string; -} - - -# -# get_date_string() -# -# Return the current date in the form: yyyy-mm-dd -# - -sub get_date_string() -{ - my $year; - my $month; - my $day; - - ($year, $month, $day) = (localtime())[5, 4, 3]; - - return sprintf("%d-%02d-%02d", $year+1900, $month+1, $day); -} - - -# -# create_sub_dir(dir_name) -# -# Create subdirectory DIR_NAME if it does not already exist, including all its -# parent directories. -# -# Die on error. -# - -sub create_sub_dir($) -{ - my ($dir) = @_; - - system("mkdir", "-p" ,$dir) - and die("ERROR: cannot create directory $dir!\n"); -} - - -# -# write_description_file(descriptions, overall_found, overall_hit, -# total_fn_found, total_fn_hit, total_br_found, -# total_br_hit) -# -# Write HTML file containing all test case descriptions. DESCRIPTIONS is a -# reference to a hash containing a mapping -# -# test case name -> test case description -# -# Die on error. -# - -sub write_description_file($$$$$$$) -{ - my %description = %{$_[0]}; - my $found = $_[1]; - my $hit = $_[2]; - my $fn_found = $_[3]; - my $fn_hit = $_[4]; - my $br_found = $_[5]; - my $br_hit = $_[6]; - my $test_name; - local *HTML_HANDLE; - - html_create(*HTML_HANDLE,"descriptions.$html_ext"); - write_html_prolog(*HTML_HANDLE, "", "LCOV - test case descriptions"); - write_header(*HTML_HANDLE, 3, "", "", $found, $hit, $fn_found, - $fn_hit, $br_found, $br_hit, 0); - - write_test_table_prolog(*HTML_HANDLE, - "Test case descriptions - alphabetical list"); - - foreach $test_name (sort(keys(%description))) - { - write_test_table_entry(*HTML_HANDLE, $test_name, - escape_html($description{$test_name})); - } - - write_test_table_epilog(*HTML_HANDLE); - write_html_epilog(*HTML_HANDLE, ""); - - close(*HTML_HANDLE); -} - - - -# -# write_png_files() -# -# Create all necessary .png files for the HTML-output in the current -# directory. .png-files are used as bar graphs. -# -# Die on error. -# - -sub write_png_files() -{ - my %data; - local *PNG_HANDLE; - - $data{"ruby.png"} = - [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, - 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x25, - 0xdb, 0x56, 0xca, 0x00, 0x00, 0x00, 0x07, 0x74, 0x49, 0x4d, - 0x45, 0x07, 0xd2, 0x07, 0x11, 0x0f, 0x18, 0x10, 0x5d, 0x57, - 0x34, 0x6e, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, - 0x00, 0x00, 0x0b, 0x12, 0x00, 0x00, 0x0b, 0x12, 0x01, 0xd2, - 0xdd, 0x7e, 0xfc, 0x00, 0x00, 0x00, 0x04, 0x67, 0x41, 0x4d, - 0x41, 0x00, 0x00, 0xb1, 0x8f, 0x0b, 0xfc, 0x61, 0x05, 0x00, - 0x00, 0x00, 0x06, 0x50, 0x4c, 0x54, 0x45, 0xff, 0x35, 0x2f, - 0x00, 0x00, 0x00, 0xd0, 0x33, 0x9a, 0x9d, 0x00, 0x00, 0x00, - 0x0a, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x60, 0x00, - 0x00, 0x00, 0x02, 0x00, 0x01, 0xe5, 0x27, 0xde, 0xfc, 0x00, - 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, - 0x82]; - $data{"amber.png"} = - [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, - 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x25, - 0xdb, 0x56, 0xca, 0x00, 0x00, 0x00, 0x07, 0x74, 0x49, 0x4d, - 0x45, 0x07, 0xd2, 0x07, 0x11, 0x0f, 0x28, 0x04, 0x98, 0xcb, - 0xd6, 0xe0, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, - 0x00, 0x00, 0x0b, 0x12, 0x00, 0x00, 0x0b, 0x12, 0x01, 0xd2, - 0xdd, 0x7e, 0xfc, 0x00, 0x00, 0x00, 0x04, 0x67, 0x41, 0x4d, - 0x41, 0x00, 0x00, 0xb1, 0x8f, 0x0b, 0xfc, 0x61, 0x05, 0x00, - 0x00, 0x00, 0x06, 0x50, 0x4c, 0x54, 0x45, 0xff, 0xe0, 0x50, - 0x00, 0x00, 0x00, 0xa2, 0x7a, 0xda, 0x7e, 0x00, 0x00, 0x00, - 0x0a, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x60, 0x00, - 0x00, 0x00, 0x02, 0x00, 0x01, 0xe5, 0x27, 0xde, 0xfc, 0x00, - 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, - 0x82]; - $data{"emerald.png"} = - [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, - 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x25, - 0xdb, 0x56, 0xca, 0x00, 0x00, 0x00, 0x07, 0x74, 0x49, 0x4d, - 0x45, 0x07, 0xd2, 0x07, 0x11, 0x0f, 0x22, 0x2b, 0xc9, 0xf5, - 0x03, 0x33, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, - 0x00, 0x00, 0x0b, 0x12, 0x00, 0x00, 0x0b, 0x12, 0x01, 0xd2, - 0xdd, 0x7e, 0xfc, 0x00, 0x00, 0x00, 0x04, 0x67, 0x41, 0x4d, - 0x41, 0x00, 0x00, 0xb1, 0x8f, 0x0b, 0xfc, 0x61, 0x05, 0x00, - 0x00, 0x00, 0x06, 0x50, 0x4c, 0x54, 0x45, 0x1b, 0xea, 0x59, - 0x0a, 0x0a, 0x0a, 0x0f, 0xba, 0x50, 0x83, 0x00, 0x00, 0x00, - 0x0a, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x60, 0x00, - 0x00, 0x00, 0x02, 0x00, 0x01, 0xe5, 0x27, 0xde, 0xfc, 0x00, - 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, - 0x82]; - $data{"snow.png"} = - [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, - 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x25, - 0xdb, 0x56, 0xca, 0x00, 0x00, 0x00, 0x07, 0x74, 0x49, 0x4d, - 0x45, 0x07, 0xd2, 0x07, 0x11, 0x0f, 0x1e, 0x1d, 0x75, 0xbc, - 0xef, 0x55, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, - 0x00, 0x00, 0x0b, 0x12, 0x00, 0x00, 0x0b, 0x12, 0x01, 0xd2, - 0xdd, 0x7e, 0xfc, 0x00, 0x00, 0x00, 0x04, 0x67, 0x41, 0x4d, - 0x41, 0x00, 0x00, 0xb1, 0x8f, 0x0b, 0xfc, 0x61, 0x05, 0x00, - 0x00, 0x00, 0x06, 0x50, 0x4c, 0x54, 0x45, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x55, 0xc2, 0xd3, 0x7e, 0x00, 0x00, 0x00, - 0x0a, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x60, 0x00, - 0x00, 0x00, 0x02, 0x00, 0x01, 0xe5, 0x27, 0xde, 0xfc, 0x00, - 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, - 0x82]; - $data{"glass.png"} = - [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, - 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x25, - 0xdb, 0x56, 0xca, 0x00, 0x00, 0x00, 0x04, 0x67, 0x41, 0x4d, - 0x41, 0x00, 0x00, 0xb1, 0x8f, 0x0b, 0xfc, 0x61, 0x05, 0x00, - 0x00, 0x00, 0x06, 0x50, 0x4c, 0x54, 0x45, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x55, 0xc2, 0xd3, 0x7e, 0x00, 0x00, 0x00, - 0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, - 0x00, 0x00, 0x00, 0x01, 0x62, 0x4b, 0x47, 0x44, 0x00, 0x88, - 0x05, 0x1d, 0x48, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, - 0x73, 0x00, 0x00, 0x0b, 0x12, 0x00, 0x00, 0x0b, 0x12, 0x01, - 0xd2, 0xdd, 0x7e, 0xfc, 0x00, 0x00, 0x00, 0x07, 0x74, 0x49, - 0x4d, 0x45, 0x07, 0xd2, 0x07, 0x13, 0x0f, 0x08, 0x19, 0xc4, - 0x40, 0x56, 0x10, 0x00, 0x00, 0x00, 0x0a, 0x49, 0x44, 0x41, - 0x54, 0x78, 0x9c, 0x63, 0x60, 0x00, 0x00, 0x00, 0x02, 0x00, - 0x01, 0x48, 0xaf, 0xa4, 0x71, 0x00, 0x00, 0x00, 0x00, 0x49, - 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82]; - $data{"updown.png"} = - [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, - 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x0a, - 0x00, 0x00, 0x00, 0x0e, 0x08, 0x06, 0x00, 0x00, 0x00, 0x16, - 0xa3, 0x8d, 0xab, 0x00, 0x00, 0x00, 0x3c, 0x49, 0x44, 0x41, - 0x54, 0x28, 0xcf, 0x63, 0x60, 0x40, 0x03, 0xff, 0xa1, 0x00, - 0x5d, 0x9c, 0x11, 0x5d, 0x11, 0x8a, 0x24, 0x23, 0x23, 0x23, - 0x86, 0x42, 0x6c, 0xa6, 0x20, 0x2b, 0x66, 0xc4, 0xa7, 0x08, - 0x59, 0x31, 0x23, 0x21, 0x45, 0x30, 0xc0, 0xc4, 0x30, 0x60, - 0x80, 0xfa, 0x6e, 0x24, 0x3e, 0x78, 0x48, 0x0a, 0x70, 0x62, - 0xa2, 0x90, 0x81, 0xd8, 0x44, 0x01, 0x00, 0xe9, 0x5c, 0x2f, - 0xf5, 0xe2, 0x9d, 0x0f, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x49, - 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82] if ($sort); - foreach (keys(%data)) - { - open(PNG_HANDLE, ">", $_) - or die("ERROR: cannot create $_!\n"); - binmode(PNG_HANDLE); - print(PNG_HANDLE map(chr,@{$data{$_}})); - close(PNG_HANDLE); - } -} - - -# -# write_htaccess_file() -# - -sub write_htaccess_file() -{ - local *HTACCESS_HANDLE; - my $htaccess_data; - - open(*HTACCESS_HANDLE, ">", ".htaccess") - or die("ERROR: cannot open .htaccess for writing!\n"); - - $htaccess_data = (<<"END_OF_HTACCESS") -AddEncoding x-gzip .html -END_OF_HTACCESS - ; - - print(HTACCESS_HANDLE $htaccess_data); - close(*HTACCESS_HANDLE); -} - - -# -# write_css_file() -# -# Write the cascading style sheet file gcov.css to the current directory. -# This file defines basic layout attributes of all generated HTML pages. -# - -sub write_css_file() -{ - local *CSS_HANDLE; - - # Check for a specified external style sheet file - if ($css_filename) - { - # Simply copy that file - system("cp", $css_filename, "gcov.css") - and die("ERROR: cannot copy file $css_filename!\n"); - return; - } - - open(CSS_HANDLE, ">", "gcov.css") - or die ("ERROR: cannot open gcov.css for writing!\n"); - - - # ************************************************************* - - my $css_data = ($_=<<"END_OF_CSS") - /* All views: initial background and text color */ - body - { - color: #000000; - background-color: #FFFFFF; - } - - /* All views: standard link format*/ - a:link - { - color: #284FA8; - text-decoration: underline; - } - - /* All views: standard link - visited format */ - a:visited - { - color: #00CB40; - text-decoration: underline; - } - - /* All views: standard link - activated format */ - a:active - { - color: #FF0040; - text-decoration: underline; - } - - /* All views: main title format */ - td.title - { - text-align: center; - padding-bottom: 10px; - font-family: sans-serif; - font-size: 20pt; - font-style: italic; - font-weight: bold; - } - - /* All views: header item format */ - td.headerItem - { - text-align: right; - padding-right: 6px; - font-family: sans-serif; - font-weight: bold; - vertical-align: top; - white-space: nowrap; - } - - /* All views: header item value format */ - td.headerValue - { - text-align: left; - color: #284FA8; - font-family: sans-serif; - font-weight: bold; - white-space: nowrap; - } - - /* All views: header item coverage table heading */ - td.headerCovTableHead - { - text-align: center; - padding-right: 6px; - padding-left: 6px; - padding-bottom: 0px; - font-family: sans-serif; - font-size: 80%; - white-space: nowrap; - } - - /* All views: header item coverage table entry */ - td.headerCovTableEntry - { - text-align: right; - color: #284FA8; - font-family: sans-serif; - font-weight: bold; - white-space: nowrap; - padding-left: 12px; - padding-right: 4px; - background-color: #DAE7FE; - } - - /* All views: header item coverage table entry for high coverage rate */ - td.headerCovTableEntryHi - { - text-align: right; - color: #000000; - font-family: sans-serif; - font-weight: bold; - white-space: nowrap; - padding-left: 12px; - padding-right: 4px; - background-color: #A7FC9D; - } - - /* All views: header item coverage table entry for medium coverage rate */ - td.headerCovTableEntryMed - { - text-align: right; - color: #000000; - font-family: sans-serif; - font-weight: bold; - white-space: nowrap; - padding-left: 12px; - padding-right: 4px; - background-color: #FFEA20; - } - - /* All views: header item coverage table entry for ow coverage rate */ - td.headerCovTableEntryLo - { - text-align: right; - color: #000000; - font-family: sans-serif; - font-weight: bold; - white-space: nowrap; - padding-left: 12px; - padding-right: 4px; - background-color: #FF0000; - } - - /* All views: header legend value for legend entry */ - td.headerValueLeg - { - text-align: left; - color: #000000; - font-family: sans-serif; - font-size: 80%; - white-space: nowrap; - padding-top: 4px; - } - - /* All views: color of horizontal ruler */ - td.ruler - { - background-color: #6688D4; - } - - /* All views: version string format */ - td.versionInfo - { - text-align: center; - padding-top: 2px; - font-family: sans-serif; - font-style: italic; - } - - /* Directory view/File view (all)/Test case descriptions: - table headline format */ - td.tableHead - { - text-align: center; - color: #FFFFFF; - background-color: #6688D4; - font-family: sans-serif; - font-size: 120%; - font-weight: bold; - white-space: nowrap; - padding-left: 4px; - padding-right: 4px; - } - - span.tableHeadSort - { - padding-right: 4px; - } - - /* Directory view/File view (all): filename entry format */ - td.coverFile - { - text-align: left; - padding-left: 10px; - padding-right: 20px; - color: #284FA8; - background-color: #DAE7FE; - font-family: monospace; - } - - /* Directory view/File view (all): bar-graph entry format*/ - td.coverBar - { - padding-left: 10px; - padding-right: 10px; - background-color: #DAE7FE; - } - - /* Directory view/File view (all): bar-graph outline color */ - td.coverBarOutline - { - background-color: #000000; - } - - /* Directory view/File view (all): percentage entry for files with - high coverage rate */ - td.coverPerHi - { - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #A7FC9D; - font-weight: bold; - font-family: sans-serif; - } - - /* Directory view/File view (all): line count entry for files with - high coverage rate */ - td.coverNumHi - { - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #A7FC9D; - white-space: nowrap; - font-family: sans-serif; - } - - /* Directory view/File view (all): percentage entry for files with - medium coverage rate */ - td.coverPerMed - { - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #FFEA20; - font-weight: bold; - font-family: sans-serif; - } - - /* Directory view/File view (all): line count entry for files with - medium coverage rate */ - td.coverNumMed - { - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #FFEA20; - white-space: nowrap; - font-family: sans-serif; - } - - /* Directory view/File view (all): percentage entry for files with - low coverage rate */ - td.coverPerLo - { - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #FF0000; - font-weight: bold; - font-family: sans-serif; - } - - /* Directory view/File view (all): line count entry for files with - low coverage rate */ - td.coverNumLo - { - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #FF0000; - white-space: nowrap; - font-family: sans-serif; - } - - /* File view (all): "show/hide details" link format */ - a.detail:link - { - color: #B8D0FF; - font-size:80%; - } - - /* File view (all): "show/hide details" link - visited format */ - a.detail:visited - { - color: #B8D0FF; - font-size:80%; - } - - /* File view (all): "show/hide details" link - activated format */ - a.detail:active - { - color: #FFFFFF; - font-size:80%; - } - - /* File view (detail): test name entry */ - td.testName - { - text-align: right; - padding-right: 10px; - background-color: #DAE7FE; - font-family: sans-serif; - } - - /* File view (detail): test percentage entry */ - td.testPer - { - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #DAE7FE; - font-family: sans-serif; - } - - /* File view (detail): test lines count entry */ - td.testNum - { - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #DAE7FE; - font-family: sans-serif; - } - - /* Test case descriptions: test name format*/ - dt - { - font-family: sans-serif; - font-weight: bold; - } - - /* Test case descriptions: description table body */ - td.testDescription - { - padding-top: 10px; - padding-left: 30px; - padding-bottom: 10px; - padding-right: 30px; - background-color: #DAE7FE; - } - - /* Source code view: function entry */ - td.coverFn - { - text-align: left; - padding-left: 10px; - padding-right: 20px; - color: #284FA8; - background-color: #DAE7FE; - font-family: monospace; - } - - /* Source code view: function entry zero count*/ - td.coverFnLo - { - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #FF0000; - font-weight: bold; - font-family: sans-serif; - } - - /* Source code view: function entry nonzero count*/ - td.coverFnHi - { - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #DAE7FE; - font-weight: bold; - font-family: sans-serif; - } - - /* Source code view: source code format */ - pre.source - { - font-family: monospace; - white-space: pre; - margin-top: 2px; - } - - /* Source code view: line number format */ - span.lineNum - { - background-color: #EFE383; - } - - /* Source code view: format for lines which were executed */ - td.lineCov, - span.lineCov - { - background-color: #CAD7FE; - } - - /* Source code view: format for Cov legend */ - span.coverLegendCov - { - padding-left: 10px; - padding-right: 10px; - padding-bottom: 2px; - background-color: #CAD7FE; - } - - /* Source code view: format for lines which were not executed */ - td.lineNoCov, - span.lineNoCov - { - background-color: #FF6230; - } - - /* Source code view: format for NoCov legend */ - span.coverLegendNoCov - { - padding-left: 10px; - padding-right: 10px; - padding-bottom: 2px; - background-color: #FF6230; - } - - /* Source code view (function table): standard link - visited format */ - td.lineNoCov > a:visited, - td.lineCov > a:visited - { - color: black; - text-decoration: underline; - } - - /* Source code view: format for lines which were executed only in a - previous version */ - span.lineDiffCov - { - background-color: #B5F7AF; - } - - /* Source code view: format for branches which were executed - * and taken */ - span.branchCov - { - background-color: #CAD7FE; - } - - /* Source code view: format for branches which were executed - * but not taken */ - span.branchNoCov - { - background-color: #FF6230; - } - - /* Source code view: format for branches which were not executed */ - span.branchNoExec - { - background-color: #FF6230; - } - - /* Source code view: format for the source code heading line */ - pre.sourceHeading - { - white-space: pre; - font-family: monospace; - font-weight: bold; - margin: 0px; - } - - /* All views: header legend value for low rate */ - td.headerValueLegL - { - font-family: sans-serif; - text-align: center; - white-space: nowrap; - padding-left: 4px; - padding-right: 2px; - background-color: #FF0000; - font-size: 80%; - } - - /* All views: header legend value for med rate */ - td.headerValueLegM - { - font-family: sans-serif; - text-align: center; - white-space: nowrap; - padding-left: 2px; - padding-right: 2px; - background-color: #FFEA20; - font-size: 80%; - } - - /* All views: header legend value for hi rate */ - td.headerValueLegH - { - font-family: sans-serif; - text-align: center; - white-space: nowrap; - padding-left: 2px; - padding-right: 4px; - background-color: #A7FC9D; - font-size: 80%; - } - - /* All views except source code view: legend format for low coverage */ - span.coverLegendCovLo - { - padding-left: 10px; - padding-right: 10px; - padding-top: 2px; - background-color: #FF0000; - } - - /* All views except source code view: legend format for med coverage */ - span.coverLegendCovMed - { - padding-left: 10px; - padding-right: 10px; - padding-top: 2px; - background-color: #FFEA20; - } - - /* All views except source code view: legend format for hi coverage */ - span.coverLegendCovHi - { - padding-left: 10px; - padding-right: 10px; - padding-top: 2px; - background-color: #A7FC9D; - } -END_OF_CSS - ; - - # ************************************************************* - - - # Remove leading tab from all lines - $css_data =~ s/^\t//gm; - - print(CSS_HANDLE $css_data); - - close(CSS_HANDLE); -} - - -# -# get_bar_graph_code(base_dir, cover_found, cover_hit) -# -# Return a string containing HTML code which implements a bar graph display -# for a coverage rate of cover_hit * 100 / cover_found. -# - -sub get_bar_graph_code($$$) -{ - my ($base_dir, $found, $hit) = @_; - my $rate; - my $alt; - my $width; - my $remainder; - my $png_name; - my $graph_code; - - # Check number of instrumented lines - if ($_[1] == 0) { return ""; } - - $alt = rate($hit, $found, "%"); - $width = rate($hit, $found, undef, 0); - $remainder = 100 - $width; - - # Decide which .png file to use - $png_name = $rate_png[classify_rate($found, $hit, $med_limit, - $hi_limit)]; - - if ($width == 0) - { - # Zero coverage - $graph_code = (<$alt -END_OF_HTML - ; - } - elsif ($width == 100) - { - # Full coverage - $graph_code = (<$alt -END_OF_HTML - ; - } - else - { - # Positive coverage - $graph_code = (<$alt$alt -END_OF_HTML - ; - } - - # Remove leading tabs from all lines - $graph_code =~ s/^\t+//gm; - chomp($graph_code); - - return($graph_code); -} - -# -# sub classify_rate(found, hit, med_limit, high_limit) -# -# Return 0 for low rate, 1 for medium rate and 2 for hi rate. -# - -sub classify_rate($$$$) -{ - my ($found, $hit, $med, $hi) = @_; - my $rate; - - if ($found == 0) { - return 2; - } - $rate = rate($hit, $found); - if ($rate < $med) { - return 0; - } elsif ($rate < $hi) { - return 1; - } - return 2; -} - - -# -# write_html(filehandle, html_code) -# -# Write out HTML_CODE to FILEHANDLE while removing a leading tabulator mark -# in each line of HTML_CODE. -# - -sub write_html(*$) -{ - local *HTML_HANDLE = $_[0]; - my $html_code = $_[1]; - - # Remove leading tab from all lines - $html_code =~ s/^\t//gm; - - print(HTML_HANDLE $html_code) - or die("ERROR: cannot write HTML data ($!)\n"); -} - - -# -# write_html_prolog(filehandle, base_dir, pagetitle) -# -# Write an HTML prolog common to all HTML files to FILEHANDLE. PAGETITLE will -# be used as HTML page title. BASE_DIR contains a relative path which points -# to the base directory. -# - -sub write_html_prolog(*$$) -{ - my $basedir = $_[1]; - my $pagetitle = $_[2]; - my $prolog; - - $prolog = $html_prolog; - $prolog =~ s/\@pagetitle\@/$pagetitle/g; - $prolog =~ s/\@basedir\@/$basedir/g; - - write_html($_[0], $prolog); -} - - -# -# write_header_prolog(filehandle, base_dir) -# -# Write beginning of page header HTML code. -# - -sub write_header_prolog(*$) -{ - # ************************************************************* - - write_html($_[0], < - $title - - - - - -END_OF_HTML - ; - - # ************************************************************* -} - - -# -# write_header_line(handle, content) -# -# Write a header line with the specified table contents. -# - -sub write_header_line(*@) -{ - my ($handle, @content) = @_; - my $entry; - - write_html($handle, " \n"); - foreach $entry (@content) { - my ($width, $class, $text, $colspan) = @{$entry}; - - if (defined($width)) { - $width = " width=\"$width\""; - } else { - $width = ""; - } - if (defined($class)) { - $class = " class=\"$class\""; - } else { - $class = ""; - } - if (defined($colspan)) { - $colspan = " colspan=\"$colspan\""; - } else { - $colspan = ""; - } - $text = "" if (!defined($text)); - write_html($handle, - " $text\n"); - } - write_html($handle, " \n"); -} - - -# -# write_header_epilog(filehandle, base_dir) -# -# Write end of page header HTML code. -# - -sub write_header_epilog(*$) -{ - # ************************************************************* - - write_html($_[0], < -
- - - - - - -END_OF_HTML - ; - - # ************************************************************* -} - - -# -# write_file_table_prolog(handle, file_heading, ([heading, num_cols], ...)) -# -# Write heading for file table. -# - -sub write_file_table_prolog(*$@) -{ - my ($handle, $file_heading, @columns) = @_; - my $num_columns = 0; - my $file_width; - my $col; - my $width; - - $width = 20 if (scalar(@columns) == 1); - $width = 10 if (scalar(@columns) == 2); - $width = 8 if (scalar(@columns) > 2); - - foreach $col (@columns) { - my ($heading, $cols) = @{$col}; - - $num_columns += $cols; - } - $file_width = 100 - $num_columns * $width; - - # Table definition - write_html($handle, < - - - - -END_OF_HTML - # Empty first row - foreach $col (@columns) { - my ($heading, $cols) = @{$col}; - - while ($cols-- > 0) { - write_html($handle, < -END_OF_HTML - } - } - # Next row - write_html($handle, < - - - -END_OF_HTML - # Heading row - foreach $col (@columns) { - my ($heading, $cols) = @{$col}; - my $colspan = ""; - - $colspan = " colspan=$cols" if ($cols > 1); - write_html($handle, <$heading -END_OF_HTML - } - write_html($handle, < -END_OF_HTML -} - - -# write_file_table_entry(handle, base_dir, filename, page_link, -# ([ found, hit, med_limit, hi_limit, graph ], ..) -# -# Write an entry of the file table. -# - -sub write_file_table_entry(*$$$@) -{ - my ($handle, $base_dir, $filename, $page_link, @entries) = @_; - my $file_code; - my $entry; - my $esc_filename = escape_html($filename); - - # Add link to source if provided - if (defined($page_link) && $page_link ne "") { - $file_code = "$esc_filename"; - } else { - $file_code = $esc_filename; - } - - # First column: filename - write_html($handle, < - -END_OF_HTML - # Columns as defined - foreach $entry (@entries) { - my ($found, $hit, $med, $hi, $graph) = @{$entry}; - my $bar_graph; - my $class; - my $rate; - - # Generate bar graph if requested - if ($graph) { - $bar_graph = get_bar_graph_code($base_dir, $found, - $hit); - write_html($handle, < - $bar_graph - -END_OF_HTML - } - # Get rate color and text - if ($found == 0) { - $rate = "-"; - $class = "Hi"; - } else { - $rate = rate($hit, $found, " %"); - $class = $rate_name[classify_rate($found, $hit, - $med, $hi)]; - } - write_html($handle, <$rate - -END_OF_HTML - } - # End of row - write_html($handle, < -END_OF_HTML -} - - -# -# write_file_table_detail_entry(filehandle, test_name, ([found, hit], ...)) -# -# Write entry for detail section in file table. -# - -sub write_file_table_detail_entry(*$@) -{ - my ($handle, $test, @entries) = @_; - my $entry; - - if ($test eq "") { - $test = "<unnamed>"; - } elsif ($test =~ /^(.*),diff$/) { - $test = $1." (converted)"; - } - # Testname - write_html($handle, < - -END_OF_HTML - # Test data - foreach $entry (@entries) { - my ($found, $hit) = @{$entry}; - my $rate = rate($hit, $found, " %"); - - write_html($handle, <$rate - -END_OF_HTML - } - - write_html($handle, < - -END_OF_HTML - - # ************************************************************* -} - - -# -# write_file_table_epilog(filehandle) -# -# Write end of file table HTML code. -# - -sub write_file_table_epilog(*) -{ - # ************************************************************* - - write_html($_[0], < - -
- -END_OF_HTML - ; - - # ************************************************************* -} - - -# -# write_test_table_prolog(filehandle, table_heading) -# -# Write heading for test case description table. -# - -sub write_test_table_prolog(*$) -{ - # ************************************************************* - - write_html($_[0], < -

$file_heading$file_code$hit / $found$test$hit / $found
- - - - - - - - - - - - -

$_[1]
-
-END_OF_HTML - ; - - # ************************************************************* -} - - -# -# write_test_table_entry(filehandle, test_name, test_description) -# -# Write entry for the test table. -# - -sub write_test_table_entry(*$$) -{ - # ************************************************************* - - write_html($_[0], <$_[1]  -
$_[2]

-END_OF_HTML - ; - - # ************************************************************* -} - - -# -# write_test_table_epilog(filehandle) -# -# Write end of test description table HTML code. -# - -sub write_test_table_epilog(*) -{ - # ************************************************************* - - write_html($_[0], < -
- -
- -END_OF_HTML - ; - - # ************************************************************* -} - - -sub fmt_centered($$) -{ - my ($width, $text) = @_; - my $w0 = length($text); - my $w1 = int(($width - $w0) / 2); - my $w2 = $width - $w0 - $w1; - - return (" "x$w1).$text.(" "x$w2); -} - - -# -# write_source_prolog(filehandle) -# -# Write start of source code table. -# - -sub write_source_prolog(*) -{ - my $lineno_heading = " "; - my $branch_heading = ""; - my $line_heading = fmt_centered($line_field_width, "Line data"); - my $source_heading = " Source code"; - - if ($br_coverage) { - $branch_heading = fmt_centered($br_field_width, "Branch data"). - " "; - } - # ************************************************************* - - write_html($_[0], < - -
- - - -
${lineno_heading}${branch_heading}${line_heading} ${source_heading}
-
-END_OF_HTML
-	;
-
-	# *************************************************************
-}
-
-
-#
-# get_branch_blocks(brdata)
-#
-# Group branches that belong to the same basic block.
-#
-# Returns: [block1, block2, ...]
-# block:   [branch1, branch2, ...]
-# branch:  [block_num, branch_num, taken_count, text_length, open, close]
-#
-
-sub get_branch_blocks($)
-{
-	my ($brdata) = @_;
-	my $last_block_num;
-	my $block = [];
-	my @blocks;
-	my $i;
-	my $num = br_ivec_len($brdata);
-
-	# Group branches
-	for ($i = 0; $i < $num; $i++) {
-		my ($block_num, $branch, $taken) = br_ivec_get($brdata, $i);
-		my $br;
-
-		if (defined($last_block_num) && $block_num != $last_block_num) {
-			push(@blocks, $block);
-			$block = [];
-		}
-		$br = [$block_num, $branch, $taken, 3, 0, 0];
-		push(@{$block}, $br);
-		$last_block_num = $block_num;
-	}
-	push(@blocks, $block) if (scalar(@{$block}) > 0);
-
-	# Add braces to first and last branch in group
-	foreach $block (@blocks) {
-		$block->[0]->[$BR_OPEN] = 1;
-		$block->[0]->[$BR_LEN]++;
-		$block->[scalar(@{$block}) - 1]->[$BR_CLOSE] = 1;
-		$block->[scalar(@{$block}) - 1]->[$BR_LEN]++;
-	}
-
-	return @blocks;
-}
-
-#
-# get_block_len(block)
-#
-# Calculate total text length of all branches in a block of branches.
-#
-
-sub get_block_len($)
-{
-	my ($block) = @_;
-	my $len = 0;
-	my $branch;
-
-	foreach $branch (@{$block}) {
-		$len += $branch->[$BR_LEN];
-	}
-
-	return $len;
-}
-
-
-#
-# get_branch_html(brdata)
-#
-# Return a list of HTML lines which represent the specified branch coverage
-# data in source code view.
-#
-
-sub get_branch_html($)
-{
-	my ($brdata) = @_;
-	my @blocks = get_branch_blocks($brdata);
-	my $block;
-	my $branch;
-	my $line_len = 0;
-	my $line = [];	# [branch2|" ", branch|" ", ...]
-	my @lines;	# [line1, line2, ...]
-	my @result;
-
-	# Distribute blocks to lines
-	foreach $block (@blocks) {
-		my $block_len = get_block_len($block);
-
-		# Does this block fit into the current line?
-		if ($line_len + $block_len <= $br_field_width) {
-			# Add it
-			$line_len += $block_len;
-			push(@{$line}, @{$block});
-			next;
-		} elsif ($block_len <= $br_field_width) {
-			# It would fit if the line was empty - add it to new
-			# line
-			push(@lines, $line);
-			$line_len = $block_len;
-			$line = [ @{$block} ];
-			next;
-		}
-		# Split the block into several lines
-		foreach $branch (@{$block}) {
-			if ($line_len + $branch->[$BR_LEN] >= $br_field_width) {
-				# Start a new line
-				if (($line_len + 1 <= $br_field_width) &&
-				    scalar(@{$line}) > 0 &&
-				    !$line->[scalar(@$line) - 1]->[$BR_CLOSE]) {
-					# Try to align branch symbols to be in
-					# one # row
-					push(@{$line}, " ");
-				}
-				push(@lines, $line);
-				$line_len = 0;
-				$line = [];
-			}
-			push(@{$line}, $branch);
-			$line_len += $branch->[$BR_LEN];
-		}
-	}
-	push(@lines, $line);
-
-	# Convert to HTML
-	foreach $line (@lines) {
-		my $current = "";
-		my $current_len = 0;
-
-		foreach $branch (@$line) {
-			# Skip alignment space
-			if ($branch eq " ") {
-				$current .= " ";
-				$current_len++;
-				next;
-			}
-
-			my ($block_num, $br_num, $taken, $len, $open, $close) =
-			   @{$branch};
-			my $class;
-			my $title;
-			my $text;
-
-			if ($taken eq '-') {
-				$class	= "branchNoExec";
-				$text	= " # ";
-				$title	= "Branch $br_num was not executed";
-			} elsif ($taken == 0) {
-				$class	= "branchNoCov";
-				$text	= " - ";
-				$title	= "Branch $br_num was not taken";
-			} else {
-				$class	= "branchCov";
-				$text	= " + ";
-				$title	= "Branch $br_num was taken $taken ".
-					  "time";
-				$title .= "s" if ($taken > 1);
-			}
-			$current .= "[" if ($open);
-			$current .= "";
-			$current .= $text."";
-			$current .= "]" if ($close);
-			$current_len += $len;
-		}
-
-		# Right-align result text
-		if ($current_len < $br_field_width) {
-			$current = (" "x($br_field_width - $current_len)).
-				   $current;
-		}
-		push(@result, $current);
-	}
-
-	return @result;
-}
-
-
-#
-# format_count(count, width)
-#
-# Return a right-aligned representation of count that fits in width characters.
-#
-
-sub format_count($$)
-{
-	my ($count, $width) = @_;
-	my $result;
-	my $exp;
-
-	$result = sprintf("%*.0f", $width, $count);
-	while (length($result) > $width) {
-		last if ($count < 10);
-		$exp++;
-		$count = int($count/10);
-		$result = sprintf("%*s", $width, ">$count*10^$exp");
-	}
-	return $result;
-}
-
-#
-# write_source_line(filehandle, line_num, source, hit_count, converted,
-#                   brdata, add_anchor)
-#
-# Write formatted source code line. Return a line in a format as needed
-# by gen_png()
-#
-
-sub write_source_line(*$$$$$$)
-{
-	my ($handle, $line, $source, $count, $converted, $brdata,
-	    $add_anchor) = @_;
-	my $source_format;
-	my $count_format;
-	my $result;
-	my $anchor_start = "";
-	my $anchor_end = "";
-	my $count_field_width = $line_field_width - 1;
-	my @br_html;
-	my $html;
-
-	# Get branch HTML data for this line
-	@br_html = get_branch_html($brdata) if ($br_coverage);
-
-	if (!defined($count)) {
-		$result		= "";
-		$source_format	= "";
-		$count_format	= " "x$count_field_width;
-	}
-	elsif ($count == 0) {
-		$result		= $count;
-		$source_format	= '';
-		$count_format	= format_count($count, $count_field_width);
-	}
-	elsif ($converted && defined($highlight)) {
-		$result		= "*".$count;
-		$source_format	= '';
-		$count_format	= format_count($count, $count_field_width);
-	}
-	else {
-		$result		= $count;
-		$source_format	= '';
-		$count_format	= format_count($count, $count_field_width);
-	}
-	$result .= ":".$source;
-
-	# Write out a line number navigation anchor every $nav_resolution
-	# lines if necessary
-	if ($add_anchor)
-	{
-		$anchor_start	= "";
-		$anchor_end	= "";
-	}
-
-
-	# *************************************************************
-
-	$html = $anchor_start;
-	$html .= "".sprintf("%8d", $line)." ";
-	$html .= shift(@br_html).":" if ($br_coverage);
-	$html .= "$source_format$count_format : ";
-	$html .= escape_html($source);
-	$html .= "" if ($source_format);
-	$html .= $anchor_end."\n";
-
-	write_html($handle, $html);
-
-	if ($br_coverage) {
-		# Add lines for overlong branch information
-		foreach (@br_html) {
-			write_html($handle, "".
-				   "         $_\n");
-		}
-	}
-	# *************************************************************
-
-	return($result);
-}
-
-
-#
-# write_source_epilog(filehandle)
-#
-# Write end of source code table.
-#
-
-sub write_source_epilog(*)
-{
-	# *************************************************************
-
-	write_html($_[0], <
-	      
-	    
-	  
-	  
- -END_OF_HTML - ; - - # ************************************************************* -} - - -# -# write_html_epilog(filehandle, base_dir[, break_frames]) -# -# Write HTML page footer to FILEHANDLE. BREAK_FRAMES should be set when -# this page is embedded in a frameset, clicking the URL link will then -# break this frameset. -# - -sub write_html_epilog(*$;$) -{ - my $basedir = $_[1]; - my $break_code = ""; - my $epilog; - - if (defined($_[2])) - { - $break_code = " target=\"_parent\""; - } - - # ************************************************************* - - write_html($_[0], < - - Generated by: $lcov_version - -
-END_OF_HTML - ; - - $epilog = $html_epilog; - $epilog =~ s/\@basedir\@/$basedir/g; - - write_html($_[0], $epilog); -} - - -# -# write_frameset(filehandle, basedir, basename, pagetitle) -# -# - -sub write_frameset(*$$$) -{ - my $frame_width = $overview_width + 40; - - # ************************************************************* - - write_html($_[0], < - - - - - - $_[3] - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - -END_OF_HTML - ; - - # ************************************************************* -} - - -# -# sub write_overview_line(filehandle, basename, line, link) -# -# - -sub write_overview_line(*$$$) -{ - my $y1 = $_[2] - 1; - my $y2 = $y1 + $nav_resolution - 1; - my $x2 = $overview_width - 1; - - # ************************************************************* - - write_html($_[0], < -END_OF_HTML - ; - - # ************************************************************* -} - - -# -# write_overview(filehandle, basedir, basename, pagetitle, lines) -# -# - -sub write_overview(*$$$$) -{ - my $index; - my $max_line = $_[4] - 1; - my $offset; - - # ************************************************************* - - write_html($_[0], < - - - - - $_[3] - - - - - - -END_OF_HTML - ; - - # ************************************************************* - - # Make $offset the next higher multiple of $nav_resolution - $offset = ($nav_offset + $nav_resolution - 1) / $nav_resolution; - $offset = sprintf("%d", $offset ) * $nav_resolution; - - # Create image map for overview image - for ($index = 1; $index <= $_[4]; $index += $nav_resolution) - { - # Enforce nav_offset - if ($index < $offset + 1) - { - write_overview_line($_[0], $_[2], $index, 1); - } - else - { - write_overview_line($_[0], $_[2], $index, $index - $offset); - } - } - - # ************************************************************* - - write_html($_[0], < - -
- Top

- Overview -
- - -END_OF_HTML - ; - - # ************************************************************* -} - - -sub max($$) -{ - my ($a, $b) = @_; - - return $a if ($a > $b); - return $b; -} - - -# -# write_header(filehandle, type, trunc_file_name, rel_file_name, lines_found, -# lines_hit, funcs_found, funcs_hit, sort_type) -# -# Write a complete standard page header. TYPE may be (0, 1, 2, 3, 4) -# corresponding to (directory view header, file view header, source view -# header, test case description header, function view header) -# - -sub write_header(*$$$$$$$$$$) -{ - local *HTML_HANDLE = $_[0]; - my $type = $_[1]; - my $trunc_name = $_[2]; - my $rel_filename = $_[3]; - my $lines_found = $_[4]; - my $lines_hit = $_[5]; - my $fn_found = $_[6]; - my $fn_hit = $_[7]; - my $br_found = $_[8]; - my $br_hit = $_[9]; - my $sort_type = $_[10]; - my $base_dir; - my $view; - my $test; - my $base_name; - my $style; - my $rate; - my @row_left; - my @row_right; - my $num_rows; - my $i; - my $esc_trunc_name = escape_html($trunc_name); - - $base_name = basename($rel_filename); - - # Prepare text for "current view" field - if ($type == $HDR_DIR) - { - # Main overview - $base_dir = ""; - $view = $overview_title; - } - elsif ($type == $HDR_FILE) - { - # Directory overview - $base_dir = get_relative_base_path($rel_filename); - $view = "". - "$overview_title - $esc_trunc_name"; - } - elsif ($type == $HDR_SOURCE || $type == $HDR_FUNC) - { - # File view - my $dir_name = dirname($rel_filename); - my $esc_base_name = escape_html($base_name); - my $esc_dir_name = escape_html($dir_name); - - $base_dir = get_relative_base_path($dir_name); - if ($frames) - { - # Need to break frameset when clicking any of these - # links - $view = "$overview_title - ". - "". - "$esc_dir_name - $esc_base_name"; - } - else - { - $view = "". - "$overview_title - ". - "". - "$esc_dir_name - $esc_base_name"; - } - - # Add function suffix - if ($func_coverage) { - $view .= ""; - if ($type == $HDR_SOURCE) { - $view .= " (source / functions)"; - } elsif ($type == $HDR_FUNC) { - $view .= " (source / functions)"; - } - $view .= ""; - } - } - elsif ($type == $HDR_TESTDESC) - { - # Test description header - $base_dir = ""; - $view = "". - "$overview_title - test case descriptions"; - } - - # Prepare text for "test" field - $test = escape_html($test_title); - - # Append link to test description page if available - if (%test_description && ($type != $HDR_TESTDESC)) - { - if ($frames && ($type == $HDR_SOURCE || $type == $HDR_FUNC)) - { - # Need to break frameset when clicking this link - $test .= " ( ". - "". - "view descriptions )"; - } - else - { - $test .= " ( ". - "". - "view descriptions )"; - } - } - - # Write header - write_header_prolog(*HTML_HANDLE, $base_dir); - - # Left row - push(@row_left, [[ "10%", "headerItem", "Current view:" ], - [ "35%", "headerValue", $view ]]); - push(@row_left, [[undef, "headerItem", "Test:"], - [undef, "headerValue", $test]]); - push(@row_left, [[undef, "headerItem", "Date:"], - [undef, "headerValue", $date]]); - - # Right row - if ($legend && ($type == $HDR_SOURCE || $type == $HDR_FUNC)) { - my $text = <hit
- not hit -END_OF_HTML - if ($br_coverage) { - $text .= <+
taken - - not taken - # not executed -END_OF_HTML - } - push(@row_left, [[undef, "headerItem", "Legend:"], - [undef, "headerValueLeg", $text]]); - } elsif ($legend && ($type != $HDR_TESTDESC)) { - my $text = <low: < $med_limit % - medium: >= $med_limit % - high: >= $hi_limit % -END_OF_HTML - push(@row_left, [[undef, "headerItem", "Legend:"], - [undef, "headerValueLeg", $text]]); - } - if ($type == $HDR_TESTDESC) { - push(@row_right, [[ "55%" ]]); - } else { - push(@row_right, [["15%", undef, undef ], - ["10%", "headerCovTableHead", "Hit" ], - ["10%", "headerCovTableHead", "Total" ], - ["15%", "headerCovTableHead", "Coverage"]]); - } - # Line coverage - $style = $rate_name[classify_rate($lines_found, $lines_hit, - $med_limit, $hi_limit)]; - $rate = rate($lines_hit, $lines_found, " %"); - push(@row_right, [[undef, "headerItem", "Lines:"], - [undef, "headerCovTableEntry", $lines_hit], - [undef, "headerCovTableEntry", $lines_found], - [undef, "headerCovTableEntry$style", $rate]]) - if ($type != $HDR_TESTDESC); - # Function coverage - if ($func_coverage) { - $style = $rate_name[classify_rate($fn_found, $fn_hit, - $fn_med_limit, $fn_hi_limit)]; - $rate = rate($fn_hit, $fn_found, " %"); - push(@row_right, [[undef, "headerItem", "Functions:"], - [undef, "headerCovTableEntry", $fn_hit], - [undef, "headerCovTableEntry", $fn_found], - [undef, "headerCovTableEntry$style", $rate]]) - if ($type != $HDR_TESTDESC); - } - # Branch coverage - if ($br_coverage) { - $style = $rate_name[classify_rate($br_found, $br_hit, - $br_med_limit, $br_hi_limit)]; - $rate = rate($br_hit, $br_found, " %"); - push(@row_right, [[undef, "headerItem", "Branches:"], - [undef, "headerCovTableEntry", $br_hit], - [undef, "headerCovTableEntry", $br_found], - [undef, "headerCovTableEntry$style", $rate]]) - if ($type != $HDR_TESTDESC); - } - - # Print rows - $num_rows = max(scalar(@row_left), scalar(@row_right)); - for ($i = 0; $i < $num_rows; $i++) { - my $left = $row_left[$i]; - my $right = $row_right[$i]; - - if (!defined($left)) { - $left = [[undef, undef, undef], [undef, undef, undef]]; - } - if (!defined($right)) { - $right = []; - } - write_header_line(*HTML_HANDLE, @{$left}, - [ $i == 0 ? "5%" : undef, undef, undef], - @{$right}); - } - - # Fourth line - write_header_epilog(*HTML_HANDLE, $base_dir); -} - - -# -# get_sorted_keys(hash_ref, sort_type) -# - -sub get_sorted_keys($$) -{ - my ($hash, $type) = @_; - - if ($type == $SORT_FILE) { - # Sort by name - return sort(keys(%{$hash})); - } elsif ($type == $SORT_LINE) { - # Sort by line coverage - return sort({$hash->{$a}[7] <=> $hash->{$b}[7]} keys(%{$hash})); - } elsif ($type == $SORT_FUNC) { - # Sort by function coverage; - return sort({$hash->{$a}[8] <=> $hash->{$b}[8]} keys(%{$hash})); - } elsif ($type == $SORT_BRANCH) { - # Sort by br coverage; - return sort({$hash->{$a}[9] <=> $hash->{$b}[9]} keys(%{$hash})); - } -} - -sub get_sort_code($$$) -{ - my ($link, $alt, $base) = @_; - my $png; - my $link_start; - my $link_end; - - if (!defined($link)) { - $png = "glass.png"; - $link_start = ""; - $link_end = ""; - } else { - $png = "updown.png"; - $link_start = ''; - $link_end = ""; - } - - return ' '.$link_start. - ''.$link_end.''; -} - -sub get_file_code($$$$) -{ - my ($type, $text, $sort_button, $base) = @_; - my $result = $text; - my $link; - - if ($sort_button) { - if ($type == $HEAD_NO_DETAIL) { - $link = "index.$html_ext"; - } else { - $link = "index-detail.$html_ext"; - } - } - $result .= get_sort_code($link, "Sort by name", $base); - - return $result; -} - -sub get_line_code($$$$$) -{ - my ($type, $sort_type, $text, $sort_button, $base) = @_; - my $result = $text; - my $sort_link; - - if ($type == $HEAD_NO_DETAIL) { - # Just text - if ($sort_button) { - $sort_link = "index-sort-l.$html_ext"; - } - } elsif ($type == $HEAD_DETAIL_HIDDEN) { - # Text + link to detail view - $result .= ' ( show details )'; - if ($sort_button) { - $sort_link = "index-sort-l.$html_ext"; - } - } else { - # Text + link to standard view - $result .= ' ( hide details )'; - if ($sort_button) { - $sort_link = "index-detail-sort-l.$html_ext"; - } - } - # Add sort button - $result .= get_sort_code($sort_link, "Sort by line coverage", $base); - - return $result; -} - -sub get_func_code($$$$) -{ - my ($type, $text, $sort_button, $base) = @_; - my $result = $text; - my $link; - - if ($sort_button) { - if ($type == $HEAD_NO_DETAIL) { - $link = "index-sort-f.$html_ext"; - } else { - $link = "index-detail-sort-f.$html_ext"; - } - } - $result .= get_sort_code($link, "Sort by function coverage", $base); - return $result; -} - -sub get_br_code($$$$) -{ - my ($type, $text, $sort_button, $base) = @_; - my $result = $text; - my $link; - - if ($sort_button) { - if ($type == $HEAD_NO_DETAIL) { - $link = "index-sort-b.$html_ext"; - } else { - $link = "index-detail-sort-b.$html_ext"; - } - } - $result .= get_sort_code($link, "Sort by branch coverage", $base); - return $result; -} - -# -# write_file_table(filehandle, base_dir, overview, testhash, testfnchash, -# testbrhash, fileview, sort_type) -# -# Write a complete file table. OVERVIEW is a reference to a hash containing -# the following mapping: -# -# filename -> "lines_found,lines_hit,funcs_found,funcs_hit,page_link, -# func_link" -# -# TESTHASH is a reference to the following hash: -# -# filename -> \%testdata -# %testdata: name of test affecting this file -> \%testcount -# %testcount: line number -> execution count for a single test -# -# Heading of first column is "Filename" if FILEVIEW is true, "Directory name" -# otherwise. -# - -sub write_file_table(*$$$$$$$) -{ - local *HTML_HANDLE = $_[0]; - my $base_dir = $_[1]; - my $overview = $_[2]; - my $testhash = $_[3]; - my $testfnchash = $_[4]; - my $testbrhash = $_[5]; - my $fileview = $_[6]; - my $sort_type = $_[7]; - my $filename; - my $bar_graph; - my $hit; - my $found; - my $fn_found; - my $fn_hit; - my $br_found; - my $br_hit; - my $page_link; - my $testname; - my $testdata; - my $testfncdata; - my $testbrdata; - my %affecting_tests; - my $line_code = ""; - my $func_code; - my $br_code; - my $file_code; - my @head_columns; - - # Determine HTML code for column headings - if (($base_dir ne "") && $show_details) - { - my $detailed = keys(%{$testhash}); - - $file_code = get_file_code($detailed ? $HEAD_DETAIL_HIDDEN : - $HEAD_NO_DETAIL, - $fileview ? "Filename" : "Directory", - $sort && $sort_type != $SORT_FILE, - $base_dir); - $line_code = get_line_code($detailed ? $HEAD_DETAIL_SHOWN : - $HEAD_DETAIL_HIDDEN, - $sort_type, - "Line Coverage", - $sort && $sort_type != $SORT_LINE, - $base_dir); - $func_code = get_func_code($detailed ? $HEAD_DETAIL_HIDDEN : - $HEAD_NO_DETAIL, - "Functions", - $sort && $sort_type != $SORT_FUNC, - $base_dir); - $br_code = get_br_code($detailed ? $HEAD_DETAIL_HIDDEN : - $HEAD_NO_DETAIL, - "Branches", - $sort && $sort_type != $SORT_BRANCH, - $base_dir); - } else { - $file_code = get_file_code($HEAD_NO_DETAIL, - $fileview ? "Filename" : "Directory", - $sort && $sort_type != $SORT_FILE, - $base_dir); - $line_code = get_line_code($HEAD_NO_DETAIL, $sort_type, "Line Coverage", - $sort && $sort_type != $SORT_LINE, - $base_dir); - $func_code = get_func_code($HEAD_NO_DETAIL, "Functions", - $sort && $sort_type != $SORT_FUNC, - $base_dir); - $br_code = get_br_code($HEAD_NO_DETAIL, "Branches", - $sort && $sort_type != $SORT_BRANCH, - $base_dir); - } - push(@head_columns, [ $line_code, 3 ]); - push(@head_columns, [ $func_code, 2]) if ($func_coverage); - push(@head_columns, [ $br_code, 2]) if ($br_coverage); - - write_file_table_prolog(*HTML_HANDLE, $file_code, @head_columns); - - foreach $filename (get_sorted_keys($overview, $sort_type)) - { - my @columns; - ($found, $hit, $fn_found, $fn_hit, $br_found, $br_hit, - $page_link) = @{$overview->{$filename}}; - - # Line coverage - push(@columns, [$found, $hit, $med_limit, $hi_limit, 1]); - # Function coverage - if ($func_coverage) { - push(@columns, [$fn_found, $fn_hit, $fn_med_limit, - $fn_hi_limit, 0]); - } - # Branch coverage - if ($br_coverage) { - push(@columns, [$br_found, $br_hit, $br_med_limit, - $br_hi_limit, 0]); - } - write_file_table_entry(*HTML_HANDLE, $base_dir, $filename, - $page_link, @columns); - - $testdata = $testhash->{$filename}; - $testfncdata = $testfnchash->{$filename}; - $testbrdata = $testbrhash->{$filename}; - - # Check whether we should write test specific coverage - # as well - if (!($show_details && $testdata)) { next; } - - # Filter out those tests that actually affect this file - %affecting_tests = %{ get_affecting_tests($testdata, - $testfncdata, $testbrdata) }; - - # Does any of the tests affect this file at all? - if (!%affecting_tests) { next; } - - foreach $testname (keys(%affecting_tests)) - { - my @results; - ($found, $hit, $fn_found, $fn_hit, $br_found, $br_hit) = - split(",", $affecting_tests{$testname}); - - # Insert link to description of available - if ($test_description{$testname}) - { - $testname = "". - "$testname"; - } - - push(@results, [$found, $hit]); - push(@results, [$fn_found, $fn_hit]) if ($func_coverage); - push(@results, [$br_found, $br_hit]) if ($br_coverage); - write_file_table_detail_entry(*HTML_HANDLE, $testname, - @results); - } - } - - write_file_table_epilog(*HTML_HANDLE); -} - - -# -# get_found_and_hit(hash) -# -# Return the count for entries (found) and entries with an execution count -# greater than zero (hit) in a hash (linenumber -> execution count) as -# a list (found, hit) -# - -sub get_found_and_hit($) -{ - my %hash = %{$_[0]}; - my $found = 0; - my $hit = 0; - - # Calculate sum - $found = 0; - $hit = 0; - - foreach (keys(%hash)) - { - $found++; - if ($hash{$_}>0) { $hit++; } - } - - return ($found, $hit); -} - - -# -# get_func_found_and_hit(sumfnccount) -# -# Return (f_found, f_hit) for sumfnccount -# - -sub get_func_found_and_hit($) -{ - my ($sumfnccount) = @_; - my $function; - my $fn_found; - my $fn_hit; - - $fn_found = scalar(keys(%{$sumfnccount})); - $fn_hit = 0; - foreach $function (keys(%{$sumfnccount})) { - if ($sumfnccount->{$function} > 0) { - $fn_hit++; - } - } - return ($fn_found, $fn_hit); -} - - -# -# br_taken_to_num(taken) -# -# Convert a branch taken value .info format to number format. -# - -sub br_taken_to_num($) -{ - my ($taken) = @_; - - return 0 if ($taken eq '-'); - return $taken + 1; -} - - -# -# br_num_to_taken(taken) -# -# Convert a branch taken value in number format to .info format. -# - -sub br_num_to_taken($) -{ - my ($taken) = @_; - - return '-' if ($taken == 0); - return $taken - 1; -} - - -# -# br_taken_add(taken1, taken2) -# -# Return the result of taken1 + taken2 for 'branch taken' values. -# - -sub br_taken_add($$) -{ - my ($t1, $t2) = @_; - - return $t1 if (!defined($t2)); - return $t2 if (!defined($t1)); - return $t1 if ($t2 eq '-'); - return $t2 if ($t1 eq '-'); - return $t1 + $t2; -} - - -# -# br_taken_sub(taken1, taken2) -# -# Return the result of taken1 - taken2 for 'branch taken' values. Return 0 -# if the result would become negative. -# - -sub br_taken_sub($$) -{ - my ($t1, $t2) = @_; - - return $t1 if (!defined($t2)); - return undef if (!defined($t1)); - return $t1 if ($t1 eq '-'); - return $t1 if ($t2 eq '-'); - return 0 if $t2 > $t1; - return $t1 - $t2; -} - - -# -# br_ivec_len(vector) -# -# Return the number of entries in the branch coverage vector. -# - -sub br_ivec_len($) -{ - my ($vec) = @_; - - return 0 if (!defined($vec)); - return (length($vec) * 8 / $BR_VEC_WIDTH) / $BR_VEC_ENTRIES; -} - - -# -# br_ivec_get(vector, number) -# -# Return an entry from the branch coverage vector. -# - -sub br_ivec_get($$) -{ - my ($vec, $num) = @_; - my $block; - my $branch; - my $taken; - my $offset = $num * $BR_VEC_ENTRIES; - - # Retrieve data from vector - $block = vec($vec, $offset + $BR_BLOCK, $BR_VEC_WIDTH); - $branch = vec($vec, $offset + $BR_BRANCH, $BR_VEC_WIDTH); - $taken = vec($vec, $offset + $BR_TAKEN, $BR_VEC_WIDTH); - - # Decode taken value from an integer - $taken = br_num_to_taken($taken); - - return ($block, $branch, $taken); -} - - -# -# br_ivec_push(vector, block, branch, taken) -# -# Add an entry to the branch coverage vector. If an entry with the same -# branch ID already exists, add the corresponding taken values. -# - -sub br_ivec_push($$$$) -{ - my ($vec, $block, $branch, $taken) = @_; - my $offset; - my $num = br_ivec_len($vec); - my $i; - - $vec = "" if (!defined($vec)); - - # Check if branch already exists in vector - for ($i = 0; $i < $num; $i++) { - my ($v_block, $v_branch, $v_taken) = br_ivec_get($vec, $i); - - next if ($v_block != $block || $v_branch != $branch); - - # Add taken counts - $taken = br_taken_add($taken, $v_taken); - last; - } - - $offset = $i * $BR_VEC_ENTRIES; - $taken = br_taken_to_num($taken); - - # Add to vector - vec($vec, $offset + $BR_BLOCK, $BR_VEC_WIDTH) = $block; - vec($vec, $offset + $BR_BRANCH, $BR_VEC_WIDTH) = $branch; - vec($vec, $offset + $BR_TAKEN, $BR_VEC_WIDTH) = $taken; - - return $vec; -} - - -# -# get_br_found_and_hit(sumbrcount) -# -# Return (br_found, br_hit) for sumbrcount -# - -sub get_br_found_and_hit($) -{ - my ($sumbrcount) = @_; - my $line; - my $br_found = 0; - my $br_hit = 0; - - foreach $line (keys(%{$sumbrcount})) { - my $brdata = $sumbrcount->{$line}; - my $i; - my $num = br_ivec_len($brdata); - - for ($i = 0; $i < $num; $i++) { - my $taken; - - (undef, undef, $taken) = br_ivec_get($brdata, $i); - - $br_found++; - $br_hit++ if ($taken ne "-" && $taken > 0); - } - } - - return ($br_found, $br_hit); -} - - -# -# get_affecting_tests(testdata, testfncdata, testbrdata) -# -# HASHREF contains a mapping filename -> (linenumber -> exec count). Return -# a hash containing mapping filename -> "lines found, lines hit" for each -# filename which has a nonzero hit count. -# - -sub get_affecting_tests($$$) -{ - my ($testdata, $testfncdata, $testbrdata) = @_; - my $testname; - my $testcount; - my $testfnccount; - my $testbrcount; - my %result; - my $found; - my $hit; - my $fn_found; - my $fn_hit; - my $br_found; - my $br_hit; - - foreach $testname (keys(%{$testdata})) - { - # Get (line number -> count) hash for this test case - $testcount = $testdata->{$testname}; - $testfnccount = $testfncdata->{$testname}; - $testbrcount = $testbrdata->{$testname}; - - # Calculate sum - ($found, $hit) = get_found_and_hit($testcount); - ($fn_found, $fn_hit) = get_func_found_and_hit($testfnccount); - ($br_found, $br_hit) = get_br_found_and_hit($testbrcount); - - if ($hit>0) - { - $result{$testname} = "$found,$hit,$fn_found,$fn_hit,". - "$br_found,$br_hit"; - } - } - - return(\%result); -} - - -sub get_hash_reverse($) -{ - my ($hash) = @_; - my %result; - - foreach (keys(%{$hash})) { - $result{$hash->{$_}} = $_; - } - - return \%result; -} - -# -# write_source(filehandle, source_filename, count_data, checksum_data, -# converted_data, func_data, sumbrcount) -# -# Write an HTML view of a source code file. Returns a list containing -# data as needed by gen_png(). -# -# Die on error. -# - -sub write_source($$$$$$$) -{ - local *HTML_HANDLE = $_[0]; - local *SOURCE_HANDLE; - my $source_filename = $_[1]; - my %count_data; - my $line_number; - my @result; - my $checkdata = $_[3]; - my $converted = $_[4]; - my $funcdata = $_[5]; - my $sumbrcount = $_[6]; - my $datafunc = get_hash_reverse($funcdata); - my $add_anchor; - my @file; - - if ($_[2]) - { - %count_data = %{$_[2]}; - } - - if (!open(SOURCE_HANDLE, "<", $source_filename)) { - my @lines; - my $last_line = 0; - - if (!$ignore[$ERROR_SOURCE]) { - die("ERROR: cannot read $source_filename\n"); - } - - # Continue without source file - warn("WARNING: cannot read $source_filename!\n"); - - @lines = sort( { $a <=> $b } keys(%count_data)); - if (@lines) { - $last_line = $lines[scalar(@lines) - 1]; - } - return ( ":" ) if ($last_line < 1); - - # Simulate gcov behavior - for ($line_number = 1; $line_number <= $last_line; - $line_number++) { - push(@file, "/* EOF */"); - } - } else { - @file = ; - } - - write_source_prolog(*HTML_HANDLE); - $line_number = 0; - foreach (@file) { - $line_number++; - chomp($_); - - # Also remove CR from line-end - s/\015$//; - - # Source code matches coverage data? - if (defined($checkdata->{$line_number}) && - ($checkdata->{$line_number} ne md5_base64($_))) - { - die("ERROR: checksum mismatch at $source_filename:". - "$line_number\n"); - } - - $add_anchor = 0; - if ($frames) { - if (($line_number - 1) % $nav_resolution == 0) { - $add_anchor = 1; - } - } - if ($func_coverage) { - if ($line_number == 1) { - $add_anchor = 1; - } elsif (defined($datafunc->{$line_number + - $func_offset})) { - $add_anchor = 1; - } - } - push (@result, - write_source_line(HTML_HANDLE, $line_number, - $_, $count_data{$line_number}, - $converted->{$line_number}, - $sumbrcount->{$line_number}, $add_anchor)); - } - - close(SOURCE_HANDLE); - write_source_epilog(*HTML_HANDLE); - return(@result); -} - - -sub funcview_get_func_code($$$) -{ - my ($name, $base, $type) = @_; - my $result; - my $link; - - if ($sort && $type == 1) { - $link = "$name.func.$html_ext"; - } - $result = "Function Name"; - $result .= get_sort_code($link, "Sort by function name", $base); - - return $result; -} - -sub funcview_get_count_code($$$) -{ - my ($name, $base, $type) = @_; - my $result; - my $link; - - if ($sort && $type == 0) { - $link = "$name.func-sort-c.$html_ext"; - } - $result = "Hit count"; - $result .= get_sort_code($link, "Sort by hit count", $base); - - return $result; -} - -# -# funcview_get_sorted(funcdata, sumfncdata, sort_type) -# -# Depending on the value of sort_type, return a list of functions sorted -# by name (type 0) or by the associated call count (type 1). -# - -sub funcview_get_sorted($$$) -{ - my ($funcdata, $sumfncdata, $type) = @_; - - if ($type == 0) { - return sort(keys(%{$funcdata})); - } - return sort({$sumfncdata->{$b} <=> $sumfncdata->{$a}} - keys(%{$sumfncdata})); -} - -# -# write_function_table(filehandle, source_file, sumcount, funcdata, -# sumfnccount, testfncdata, sumbrcount, testbrdata, -# base_name, base_dir, sort_type) -# -# Write an HTML table listing all functions in a source file, including -# also function call counts and line coverages inside of each function. -# -# Die on error. -# - -sub write_function_table(*$$$$$$$$$$) -{ - local *HTML_HANDLE = $_[0]; - my $source = $_[1]; - my $sumcount = $_[2]; - my $funcdata = $_[3]; - my $sumfncdata = $_[4]; - my $testfncdata = $_[5]; - my $sumbrcount = $_[6]; - my $testbrdata = $_[7]; - my $name = $_[8]; - my $base = $_[9]; - my $type = $_[10]; - my $func; - my $func_code; - my $count_code; - - # Get HTML code for headings - $func_code = funcview_get_func_code($name, $base, $type); - $count_code = funcview_get_count_code($name, $base, $type); - write_html(*HTML_HANDLE, < - - - - - - -END_OF_HTML - ; - - # Get a sorted table - foreach $func (funcview_get_sorted($funcdata, $sumfncdata, $type)) { - if (!defined($funcdata->{$func})) - { - next; - } - - my $startline = $funcdata->{$func} - $func_offset; - my $name = $func; - my $count = $sumfncdata->{$name}; - my $countstyle; - - # Demangle C++ function names if requested - if ($demangle_cpp) { - $name = `c++filt "$name"`; - chomp($name); - } - # Escape any remaining special characters - $name = escape_html($name); - if ($startline < 1) { - $startline = 1; - } - if ($count == 0) { - $countstyle = "coverFnLo"; - } else { - $countstyle = "coverFnHi"; - } - - write_html(*HTML_HANDLE, < - - - -END_OF_HTML - ; - } - write_html(*HTML_HANDLE, < -
- -END_OF_HTML - ; -} - - -# -# info(printf_parameter) -# -# Use printf to write PRINTF_PARAMETER to stdout only when the $quiet flag -# is not set. -# - -sub info(@) -{ - if (!$quiet) - { - # Print info string - printf(@_); - } -} - - -# -# subtract_counts(data_ref, base_ref) -# - -sub subtract_counts($$) -{ - my %data = %{$_[0]}; - my %base = %{$_[1]}; - my $line; - my $data_count; - my $base_count; - my $hit = 0; - my $found = 0; - - foreach $line (keys(%data)) - { - $found++; - $data_count = $data{$line}; - $base_count = $base{$line}; - - if (defined($base_count)) - { - $data_count -= $base_count; - - # Make sure we don't get negative numbers - if ($data_count<0) { $data_count = 0; } - } - - $data{$line} = $data_count; - if ($data_count > 0) { $hit++; } - } - - return (\%data, $found, $hit); -} - - -# -# subtract_fnccounts(data, base) -# -# Subtract function call counts found in base from those in data. -# Return (data, f_found, f_hit). -# - -sub subtract_fnccounts($$) -{ - my %data; - my %base; - my $func; - my $data_count; - my $base_count; - my $fn_hit = 0; - my $fn_found = 0; - - %data = %{$_[0]} if (defined($_[0])); - %base = %{$_[1]} if (defined($_[1])); - foreach $func (keys(%data)) { - $fn_found++; - $data_count = $data{$func}; - $base_count = $base{$func}; - - if (defined($base_count)) { - $data_count -= $base_count; - - # Make sure we don't get negative numbers - if ($data_count < 0) { - $data_count = 0; - } - } - - $data{$func} = $data_count; - if ($data_count > 0) { - $fn_hit++; - } - } - - return (\%data, $fn_found, $fn_hit); -} - - -# -# apply_baseline(data_ref, baseline_ref) -# -# Subtract the execution counts found in the baseline hash referenced by -# BASELINE_REF from actual data in DATA_REF. -# - -sub apply_baseline($$) -{ - my %data_hash = %{$_[0]}; - my %base_hash = %{$_[1]}; - my $filename; - my $testname; - my $data; - my $data_testdata; - my $data_funcdata; - my $data_checkdata; - my $data_testfncdata; - my $data_testbrdata; - my $data_count; - my $data_testfnccount; - my $data_testbrcount; - my $base; - my $base_checkdata; - my $base_sumfnccount; - my $base_sumbrcount; - my $base_count; - my $sumcount; - my $sumfnccount; - my $sumbrcount; - my $found; - my $hit; - my $fn_found; - my $fn_hit; - my $br_found; - my $br_hit; - - foreach $filename (keys(%data_hash)) - { - # Get data set for data and baseline - $data = $data_hash{$filename}; - $base = $base_hash{$filename}; - - # Skip data entries for which no base entry exists - if (!defined($base)) - { - next; - } - - # Get set entries for data and baseline - ($data_testdata, undef, $data_funcdata, $data_checkdata, - $data_testfncdata, undef, $data_testbrdata) = - get_info_entry($data); - (undef, $base_count, undef, $base_checkdata, undef, - $base_sumfnccount, undef, $base_sumbrcount) = - get_info_entry($base); - - # Check for compatible checksums - merge_checksums($data_checkdata, $base_checkdata, $filename); - - # sumcount has to be calculated anew - $sumcount = {}; - $sumfnccount = {}; - $sumbrcount = {}; - - # For each test case, subtract test specific counts - foreach $testname (keys(%{$data_testdata})) - { - # Get counts of both data and baseline - $data_count = $data_testdata->{$testname}; - $data_testfnccount = $data_testfncdata->{$testname}; - $data_testbrcount = $data_testbrdata->{$testname}; - - ($data_count, undef, $hit) = - subtract_counts($data_count, $base_count); - ($data_testfnccount) = - subtract_fnccounts($data_testfnccount, - $base_sumfnccount); - ($data_testbrcount) = - combine_brcount($data_testbrcount, - $base_sumbrcount, $BR_SUB); - - - # Check whether this test case did hit any line at all - if ($hit > 0) - { - # Write back resulting hash - $data_testdata->{$testname} = $data_count; - $data_testfncdata->{$testname} = - $data_testfnccount; - $data_testbrdata->{$testname} = - $data_testbrcount; - } - else - { - # Delete test case which did not impact this - # file - delete($data_testdata->{$testname}); - delete($data_testfncdata->{$testname}); - delete($data_testbrdata->{$testname}); - } - - # Add counts to sum of counts - ($sumcount, $found, $hit) = - add_counts($sumcount, $data_count); - ($sumfnccount, $fn_found, $fn_hit) = - add_fnccount($sumfnccount, $data_testfnccount); - ($sumbrcount, $br_found, $br_hit) = - combine_brcount($sumbrcount, $data_testbrcount, - $BR_ADD); - } - - # Write back resulting entry - set_info_entry($data, $data_testdata, $sumcount, $data_funcdata, - $data_checkdata, $data_testfncdata, $sumfnccount, - $data_testbrdata, $sumbrcount, $found, $hit, - $fn_found, $fn_hit, $br_found, $br_hit); - - $data_hash{$filename} = $data; - } - - return (\%data_hash); -} - - -# -# remove_unused_descriptions() -# -# Removes all test descriptions from the global hash %test_description which -# are not present in %info_data. -# - -sub remove_unused_descriptions() -{ - my $filename; # The current filename - my %test_list; # Hash containing found test names - my $test_data; # Reference to hash test_name -> count_data - my $before; # Initial number of descriptions - my $after; # Remaining number of descriptions - - $before = scalar(keys(%test_description)); - - foreach $filename (keys(%info_data)) - { - ($test_data) = get_info_entry($info_data{$filename}); - foreach (keys(%{$test_data})) - { - $test_list{$_} = ""; - } - } - - # Remove descriptions for tests which are not in our list - foreach (keys(%test_description)) - { - if (!defined($test_list{$_})) - { - delete($test_description{$_}); - } - } - - $after = scalar(keys(%test_description)); - if ($after < $before) - { - info("Removed ".($before - $after). - " unused descriptions, $after remaining.\n"); - } -} - - -# -# apply_prefix(filename, prefix) -# -# If FILENAME begins with PREFIX, remove PREFIX from FILENAME and return -# resulting string, otherwise return FILENAME. -# - -sub apply_prefix($$) -{ - my $filename = $_[0]; - my $prefix = $_[1]; - - if (defined($prefix) && ($prefix ne "")) - { - if ($filename =~ /^\Q$prefix\E\/(.*)$/) - { - return substr($filename, length($prefix) + 1); - } - } - - return $filename; -} - - -# -# system_no_output(mode, parameters) -# -# Call an external program using PARAMETERS while suppressing depending on -# the value of MODE: -# -# MODE & 1: suppress STDOUT -# MODE & 2: suppress STDERR -# -# Return 0 on success, non-zero otherwise. -# - -sub system_no_output($@) -{ - my $mode = shift; - my $result; - local *OLD_STDERR; - local *OLD_STDOUT; - - # Save old stdout and stderr handles - ($mode & 1) && open(OLD_STDOUT, ">>&", "STDOUT"); - ($mode & 2) && open(OLD_STDERR, ">>&", "STDERR"); - - # Redirect to /dev/null - ($mode & 1) && open(STDOUT, ">", "/dev/null"); - ($mode & 2) && open(STDERR, ">", "/dev/null"); - - system(@_); - $result = $?; - - # Close redirected handles - ($mode & 1) && close(STDOUT); - ($mode & 2) && close(STDERR); - - # Restore old handles - ($mode & 1) && open(STDOUT, ">>&", "OLD_STDOUT"); - ($mode & 2) && open(STDERR, ">>&", "OLD_STDERR"); - - return $result; -} - - -# -# read_config(filename) -# -# Read configuration file FILENAME and return a reference to a hash containing -# all valid key=value pairs found. -# - -sub read_config($) -{ - my $filename = $_[0]; - my %result; - my $key; - my $value; - local *HANDLE; - - if (!open(HANDLE, "<", $filename)) - { - warn("WARNING: cannot read configuration file $filename\n"); - return undef; - } - while () - { - chomp; - # Skip comments - s/#.*//; - # Remove leading blanks - s/^\s+//; - # Remove trailing blanks - s/\s+$//; - next unless length; - ($key, $value) = split(/\s*=\s*/, $_, 2); - if (defined($key) && defined($value)) - { - $result{$key} = $value; - } - else - { - warn("WARNING: malformed statement in line $. ". - "of configuration file $filename\n"); - } - } - close(HANDLE); - return \%result; -} - - -# -# apply_config(REF) -# -# REF is a reference to a hash containing the following mapping: -# -# key_string => var_ref -# -# where KEY_STRING is a keyword and VAR_REF is a reference to an associated -# variable. If the global configuration hashes CONFIG or OPT_RC contain a value -# for keyword KEY_STRING, VAR_REF will be assigned the value for that keyword. -# - -sub apply_config($) -{ - my $ref = $_[0]; - - foreach (keys(%{$ref})) - { - if (defined($opt_rc{$_})) { - ${$ref->{$_}} = $opt_rc{$_}; - } elsif (defined($config->{$_})) { - ${$ref->{$_}} = $config->{$_}; - } - } -} - - -# -# get_html_prolog(FILENAME) -# -# If FILENAME is defined, return contents of file. Otherwise return default -# HTML prolog. Die on error. -# - -sub get_html_prolog($) -{ - my $filename = $_[0]; - my $result = ""; - - if (defined($filename)) - { - local *HANDLE; - - open(HANDLE, "<", $filename) - or die("ERROR: cannot open html prolog $filename!\n"); - while () - { - $result .= $_; - } - close(HANDLE); - } - else - { - $result = < - - - - - - \@pagetitle\@ - - - - - -END_OF_HTML - ; - } - - return $result; -} - - -# -# get_html_epilog(FILENAME) -# -# If FILENAME is defined, return contents of file. Otherwise return default -# HTML epilog. Die on error. -# -sub get_html_epilog($) -{ - my $filename = $_[0]; - my $result = ""; - - if (defined($filename)) - { - local *HANDLE; - - open(HANDLE, "<", $filename) - or die("ERROR: cannot open html epilog $filename!\n"); - while () - { - $result .= $_; - } - close(HANDLE); - } - else - { - $result = < - -END_OF_HTML - ; - } - - return $result; - -} - -sub warn_handler($) -{ - my ($msg) = @_; - - warn("$tool_name: $msg"); -} - -sub die_handler($) -{ - my ($msg) = @_; - - die("$tool_name: $msg"); -} - -# -# parse_ignore_errors(@ignore_errors) -# -# Parse user input about which errors to ignore. -# - -sub parse_ignore_errors(@) -{ - my (@ignore_errors) = @_; - my @items; - my $item; - - return if (!@ignore_errors); - - foreach $item (@ignore_errors) { - $item =~ s/\s//g; - if ($item =~ /,/) { - # Split and add comma-separated parameters - push(@items, split(/,/, $item)); - } else { - # Add single parameter - push(@items, $item); - } - } - foreach $item (@items) { - my $item_id = $ERROR_ID{lc($item)}; - - if (!defined($item_id)) { - die("ERROR: unknown argument for --ignore-errors: ". - "$item\n"); - } - $ignore[$item_id] = 1; - } -} - -# -# rate(hit, found[, suffix, precision, width]) -# -# Return the coverage rate [0..100] for HIT and FOUND values. 0 is only -# returned when HIT is 0. 100 is only returned when HIT equals FOUND. -# PRECISION specifies the precision of the result. SUFFIX defines a -# string that is appended to the result if FOUND is non-zero. Spaces -# are added to the start of the resulting string until it is at least WIDTH -# characters wide. -# - -sub rate($$;$$$) -{ - my ($hit, $found, $suffix, $precision, $width) = @_; - my $rate; - - # Assign defaults if necessary - $precision = 1 if (!defined($precision)); - $suffix = "" if (!defined($suffix)); - $width = 0 if (!defined($width)); - - return sprintf("%*s", $width, "-") if (!defined($found) || $found == 0); - $rate = sprintf("%.*f", $precision, $hit * 100 / $found); - - # Adjust rates if necessary - if ($rate == 0 && $hit > 0) { - $rate = sprintf("%.*f", $precision, 1 / 10 ** $precision); - } elsif ($rate == 100 && $hit != $found) { - $rate = sprintf("%.*f", $precision, 100 - 1 / 10 ** $precision); - } - - return sprintf("%*s", $width, $rate.$suffix); -} diff --git a/XcodeCoverage/lcov-1.10/bin/geninfo b/XcodeCoverage/lcov-1.10/bin/geninfo deleted file mode 100755 index 9325f9d..0000000 --- a/XcodeCoverage/lcov-1.10/bin/geninfo +++ /dev/null @@ -1,3657 +0,0 @@ -#!/usr/bin/perl -w -# -# Copyright (c) International Business Machines Corp., 2002,2012 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or (at -# your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# -# geninfo -# -# This script generates .info files from data files as created by code -# instrumented with gcc's built-in profiling mechanism. Call it with -# --help and refer to the geninfo man page to get information on usage -# and available options. -# -# -# Authors: -# 2002-08-23 created by Peter Oberparleiter -# IBM Lab Boeblingen -# based on code by Manoj Iyer and -# Megan Bock -# IBM Austin -# 2002-09-05 / Peter Oberparleiter: implemented option that allows file list -# 2003-04-16 / Peter Oberparleiter: modified read_gcov so that it can also -# parse the new gcov format which is to be introduced in gcc 3.3 -# 2003-04-30 / Peter Oberparleiter: made info write to STDERR, not STDOUT -# 2003-07-03 / Peter Oberparleiter: added line checksum support, added -# --no-checksum -# 2003-09-18 / Nigel Hinds: capture branch coverage data from GCOV -# 2003-12-11 / Laurent Deniel: added --follow option -# workaround gcov (<= 3.2.x) bug with empty .da files -# 2004-01-03 / Laurent Deniel: Ignore empty .bb files -# 2004-02-16 / Andreas Krebbel: Added support for .gcno/.gcda files and -# gcov versioning -# 2004-08-09 / Peter Oberparleiter: added configuration file support -# 2008-07-14 / Tom Zoerner: added --function-coverage command line option -# 2008-08-13 / Peter Oberparleiter: modified function coverage -# implementation (now enabled per default) -# - -use strict; -use File::Basename; -use File::Spec::Functions qw /abs2rel catdir file_name_is_absolute splitdir - splitpath catpath/; -use Getopt::Long; -use Digest::MD5 qw(md5_base64); -if( $^O eq "msys" ) -{ - require File::Spec::Win32; -} - -# Constants -our $lcov_version = 'LCOV version 1.10'; -our $lcov_url = "http://ltp.sourceforge.net/coverage/lcov.php"; -our $gcov_tool = "gcov"; -our $tool_name = basename($0); - -our $GCOV_VERSION_4_7_0 = 0x40700; -our $GCOV_VERSION_3_4_0 = 0x30400; -our $GCOV_VERSION_3_3_0 = 0x30300; -our $GCNO_FUNCTION_TAG = 0x01000000; -our $GCNO_LINES_TAG = 0x01450000; -our $GCNO_FILE_MAGIC = 0x67636e6f; -our $BBG_FILE_MAGIC = 0x67626267; - -# Error classes which users may specify to ignore during processing -our $ERROR_GCOV = 0; -our $ERROR_SOURCE = 1; -our $ERROR_GRAPH = 2; -our %ERROR_ID = ( - "gcov" => $ERROR_GCOV, - "source" => $ERROR_SOURCE, - "graph" => $ERROR_GRAPH, -); - -our $EXCL_START = "LCOV_EXCL_START"; -our $EXCL_STOP = "LCOV_EXCL_STOP"; -our $EXCL_LINE = "LCOV_EXCL_LINE"; - -# Compatibility mode values -our $COMPAT_VALUE_OFF = 0; -our $COMPAT_VALUE_ON = 1; -our $COMPAT_VALUE_AUTO = 2; - -# Compatibility mode value names -our %COMPAT_NAME_TO_VALUE = ( - "off" => $COMPAT_VALUE_OFF, - "on" => $COMPAT_VALUE_ON, - "auto" => $COMPAT_VALUE_AUTO, -); - -# Compatiblity modes -our $COMPAT_MODE_LIBTOOL = 1 << 0; -our $COMPAT_MODE_HAMMER = 1 << 1; -our $COMPAT_MODE_SPLIT_CRC = 1 << 2; - -# Compatibility mode names -our %COMPAT_NAME_TO_MODE = ( - "libtool" => $COMPAT_MODE_LIBTOOL, - "hammer" => $COMPAT_MODE_HAMMER, - "split_crc" => $COMPAT_MODE_SPLIT_CRC, - "android_4_4_0" => $COMPAT_MODE_SPLIT_CRC, -); - -# Map modes to names -our %COMPAT_MODE_TO_NAME = ( - $COMPAT_MODE_LIBTOOL => "libtool", - $COMPAT_MODE_HAMMER => "hammer", - $COMPAT_MODE_SPLIT_CRC => "split_crc", -); - -# Compatibility mode default values -our %COMPAT_MODE_DEFAULTS = ( - $COMPAT_MODE_LIBTOOL => $COMPAT_VALUE_ON, - $COMPAT_MODE_HAMMER => $COMPAT_VALUE_AUTO, - $COMPAT_MODE_SPLIT_CRC => $COMPAT_VALUE_AUTO, -); - -# Compatibility mode auto-detection routines -sub compat_hammer_autodetect(); -our %COMPAT_MODE_AUTO = ( - $COMPAT_MODE_HAMMER => \&compat_hammer_autodetect, - $COMPAT_MODE_SPLIT_CRC => 1, # will be done later -); - -our $BR_LINE = 0; -our $BR_BLOCK = 1; -our $BR_BRANCH = 2; -our $BR_TAKEN = 3; -our $BR_VEC_ENTRIES = 4; -our $BR_VEC_WIDTH = 32; - -our $UNNAMED_BLOCK = 9999; - -# Prototypes -sub print_usage(*); -sub gen_info($); -sub process_dafile($$); -sub match_filename($@); -sub solve_ambiguous_match($$$); -sub split_filename($); -sub solve_relative_path($$); -sub read_gcov_header($); -sub read_gcov_file($); -sub info(@); -sub get_gcov_version(); -sub system_no_output($@); -sub read_config($); -sub apply_config($); -sub get_exclusion_data($); -sub apply_exclusion_data($$); -sub process_graphfile($$); -sub filter_fn_name($); -sub warn_handler($); -sub die_handler($); -sub graph_error($$); -sub graph_expect($); -sub graph_read(*$;$$); -sub graph_skip(*$;$); -sub sort_uniq(@); -sub sort_uniq_lex(@); -sub graph_cleanup($); -sub graph_find_base($); -sub graph_from_bb($$$); -sub graph_add_order($$$); -sub read_bb_word(*;$); -sub read_bb_value(*;$); -sub read_bb_string(*$); -sub read_bb($); -sub read_bbg_word(*;$); -sub read_bbg_value(*;$); -sub read_bbg_string(*); -sub read_bbg_lines_record(*$$$$$); -sub read_bbg($); -sub read_gcno_word(*;$$); -sub read_gcno_value(*$;$$); -sub read_gcno_string(*$); -sub read_gcno_lines_record(*$$$$$$); -sub determine_gcno_split_crc($$$); -sub read_gcno_function_record(*$$$$); -sub read_gcno($); -sub get_gcov_capabilities(); -sub get_overall_line($$$$); -sub print_overall_rate($$$$$$$$$); -sub br_gvec_len($); -sub br_gvec_get($$); -sub debug($); -sub int_handler(); -sub parse_ignore_errors(@); -sub is_external($); -sub compat_name($); -sub parse_compat_modes($); -sub is_compat($); -sub is_compat_auto($); - - -# Global variables -our $gcov_version; -our $gcov_version_string; -our $graph_file_extension; -our $data_file_extension; -our @data_directory; -our $test_name = ""; -our $quiet; -our $help; -our $output_filename; -our $base_directory; -our $version; -our $follow; -our $checksum; -our $no_checksum; -our $opt_compat_libtool; -our $opt_no_compat_libtool; -our $rc_adjust_src_path;# Regexp specifying parts to remove from source path -our $adjust_src_pattern; -our $adjust_src_replace; -our $adjust_testname; -our $config; # Configuration file contents -our @ignore_errors; # List of errors to ignore (parameter) -our @ignore; # List of errors to ignore (array) -our $initial; -our $no_recursion = 0; -our $maxdepth; -our $no_markers = 0; -our $opt_derive_func_data = 0; -our $opt_external = 1; -our $opt_no_external; -our $debug = 0; -our $gcov_caps; -our @gcov_options; -our @internal_dirs; -our $opt_config_file; -our $opt_gcov_all_blocks = 1; -our $opt_compat; -our %opt_rc; -our %compat_value; -our $gcno_split_crc; -our $func_coverage = 1; -our $br_coverage = 0; -our $rc_auto_base = 1; - -our $cwd = `pwd`; -chomp($cwd); - - -# -# Code entry point -# - -# Register handler routine to be called when interrupted -$SIG{"INT"} = \&int_handler; -$SIG{__WARN__} = \&warn_handler; -$SIG{__DIE__} = \&die_handler; - -# Prettify version string -$lcov_version =~ s/\$\s*Revision\s*:?\s*(\S+)\s*\$/$1/; - -# Set LANG so that gcov output will be in a unified format -$ENV{"LANG"} = "C"; - -# Check command line for a configuration file name -Getopt::Long::Configure("pass_through", "no_auto_abbrev"); -GetOptions("config-file=s" => \$opt_config_file, - "rc=s%" => \%opt_rc); -Getopt::Long::Configure("default"); - -# Read configuration file if available -if (defined($opt_config_file)) { - $config = read_config($opt_config_file); -} elsif (defined($ENV{"HOME"}) && (-r $ENV{"HOME"}."/.lcovrc")) -{ - $config = read_config($ENV{"HOME"}."/.lcovrc"); -} -elsif (-r "/etc/lcovrc") -{ - $config = read_config("/etc/lcovrc"); -} - -if ($config || %opt_rc) -{ - # Copy configuration file and --rc values to variables - apply_config({ - "geninfo_gcov_tool" => \$gcov_tool, - "geninfo_adjust_testname" => \$adjust_testname, - "geninfo_checksum" => \$checksum, - "geninfo_no_checksum" => \$no_checksum, # deprecated - "geninfo_compat_libtool" => \$opt_compat_libtool, - "geninfo_external" => \$opt_external, - "geninfo_gcov_all_blocks" => \$opt_gcov_all_blocks, - "geninfo_compat" => \$opt_compat, - "geninfo_adjust_src_path" => \$rc_adjust_src_path, - "geninfo_auto_base" => \$rc_auto_base, - "lcov_function_coverage" => \$func_coverage, - "lcov_branch_coverage" => \$br_coverage, - }); - - # Merge options - if (defined($no_checksum)) - { - $checksum = ($no_checksum ? 0 : 1); - $no_checksum = undef; - } - - # Check regexp - if (defined($rc_adjust_src_path)) { - my ($pattern, $replace) = split(/\s*=>\s*/, - $rc_adjust_src_path); - local $SIG{__DIE__}; - eval '$adjust_src_pattern = qr>'.$pattern.'>;'; - if (!defined($adjust_src_pattern)) { - my $msg = $@; - - chomp($msg); - $msg =~ s/at \(eval.*$//; - warn("WARNING: invalid pattern in ". - "geninfo_adjust_src_path: $msg\n"); - } elsif (!defined($replace)) { - # If no replacement is specified, simply remove pattern - $adjust_src_replace = ""; - } else { - $adjust_src_replace = $replace; - } - } -} - -# Parse command line options -if (!GetOptions("test-name|t=s" => \$test_name, - "output-filename|o=s" => \$output_filename, - "checksum" => \$checksum, - "no-checksum" => \$no_checksum, - "base-directory|b=s" => \$base_directory, - "version|v" =>\$version, - "quiet|q" => \$quiet, - "help|h|?" => \$help, - "follow|f" => \$follow, - "compat-libtool" => \$opt_compat_libtool, - "no-compat-libtool" => \$opt_no_compat_libtool, - "gcov-tool=s" => \$gcov_tool, - "ignore-errors=s" => \@ignore_errors, - "initial|i" => \$initial, - "no-recursion" => \$no_recursion, - "no-markers" => \$no_markers, - "derive-func-data" => \$opt_derive_func_data, - "debug" => \$debug, - "external" => \$opt_external, - "no-external" => \$opt_no_external, - "compat=s" => \$opt_compat, - "config-file=s" => \$opt_config_file, - "rc=s%" => \%opt_rc, - )) -{ - print(STDERR "Use $tool_name --help to get usage information\n"); - exit(1); -} -else -{ - # Merge options - if (defined($no_checksum)) - { - $checksum = ($no_checksum ? 0 : 1); - $no_checksum = undef; - } - - if (defined($opt_no_compat_libtool)) - { - $opt_compat_libtool = ($opt_no_compat_libtool ? 0 : 1); - $opt_no_compat_libtool = undef; - } - - if (defined($opt_no_external)) { - $opt_external = 0; - $opt_no_external = undef; - } -} - -@data_directory = @ARGV; - -# Check for help option -if ($help) -{ - print_usage(*STDOUT); - exit(0); -} - -# Check for version option -if ($version) -{ - print("$tool_name: $lcov_version\n"); - exit(0); -} - -# Check gcov tool -if (system_no_output(3, $gcov_tool, "--help") == -1) -{ - die("ERROR: need tool $gcov_tool!\n"); -} - -($gcov_version, $gcov_version_string) = get_gcov_version(); - -# Determine gcov options -$gcov_caps = get_gcov_capabilities(); -push(@gcov_options, "-b") if ($gcov_caps->{'branch-probabilities'} && - ($br_coverage || $func_coverage)); -push(@gcov_options, "-c") if ($gcov_caps->{'branch-counts'} && - $br_coverage); -push(@gcov_options, "-a") if ($gcov_caps->{'all-blocks'} && - $opt_gcov_all_blocks && $br_coverage); -push(@gcov_options, "-p") if ($gcov_caps->{'preserve-paths'}); - -# Determine compatibility modes -parse_compat_modes($opt_compat); - -# Determine which errors the user wants us to ignore -parse_ignore_errors(@ignore_errors); - -# Make sure test names only contain valid characters -if ($test_name =~ s/\W/_/g) -{ - warn("WARNING: invalid characters removed from testname!\n"); -} - -# Adjust test name to include uname output if requested -if ($adjust_testname) -{ - $test_name .= "__".`uname -a`; - $test_name =~ s/\W/_/g; -} - -# Make sure base_directory contains an absolute path specification -if ($base_directory) -{ - $base_directory = solve_relative_path($cwd, $base_directory); -} - -# Check for follow option -if ($follow) -{ - $follow = "-follow" -} -else -{ - $follow = ""; -} - -# Determine checksum mode -if (defined($checksum)) -{ - # Normalize to boolean - $checksum = ($checksum ? 1 : 0); -} -else -{ - # Default is off - $checksum = 0; -} - -# Determine max depth for recursion -if ($no_recursion) -{ - $maxdepth = "-maxdepth 1"; -} -else -{ - $maxdepth = ""; -} - -# Check for directory name -if (!@data_directory) -{ - die("No directory specified\n". - "Use $tool_name --help to get usage information\n"); -} -else -{ - foreach (@data_directory) - { - stat($_); - if (!-r _) - { - die("ERROR: cannot read $_!\n"); - } - } -} - -if ($gcov_version < $GCOV_VERSION_3_4_0) -{ - if (is_compat($COMPAT_MODE_HAMMER)) - { - $data_file_extension = ".da"; - $graph_file_extension = ".bbg"; - } - else - { - $data_file_extension = ".da"; - $graph_file_extension = ".bb"; - } -} -else -{ - $data_file_extension = ".gcda"; - $graph_file_extension = ".gcno"; -} - -# Check output filename -if (defined($output_filename) && ($output_filename ne "-")) -{ - # Initially create output filename, data is appended - # for each data file processed - local *DUMMY_HANDLE; - open(DUMMY_HANDLE, ">", $output_filename) - or die("ERROR: cannot create $output_filename!\n"); - close(DUMMY_HANDLE); - - # Make $output_filename an absolute path because we're going - # to change directories while processing files - if (!($output_filename =~ /^\/(.*)$/)) - { - $output_filename = $cwd."/".$output_filename; - } -} - -# Build list of directories to identify external files -foreach my $entry(@data_directory, $base_directory) { - next if (!defined($entry)); - push(@internal_dirs, solve_relative_path($cwd, $entry)); -} - -# Do something -foreach my $entry (@data_directory) { - gen_info($entry); -} - -if ($initial && $br_coverage) { - warn("Note: --initial does not generate branch coverage ". - "data\n"); -} -info("Finished .info-file creation\n"); - -exit(0); - - - -# -# print_usage(handle) -# -# Print usage information. -# - -sub print_usage(*) -{ - local *HANDLE = $_[0]; - - print(HANDLE < -# -# For each source file name referenced in the data file, there is a section -# containing source code and coverage data: -# -# SF: -# FN:, for each function -# DA:, for each instrumented line -# LH: greater than 0 -# LF: -# -# Sections are separated by: -# -# end_of_record -# -# In addition to the main source code file there are sections for each -# #included file containing executable code. Note that the absolute path -# of a source file is generated by interpreting the contents of the respective -# graph file. Relative filenames are prefixed with the directory in which the -# graph file is found. Note also that symbolic links to the graph file will be -# resolved so that the actual file path is used instead of the path to a link. -# This approach is necessary for the mechanism to work with the /proc/gcov -# files. -# -# Die on error. -# - -sub gen_info($) -{ - my $directory = $_[0]; - my @file_list; - my $file; - my $prefix; - my $type; - my $ext; - - if ($initial) { - $type = "graph"; - $ext = $graph_file_extension; - } else { - $type = "data"; - $ext = $data_file_extension; - } - - if (-d $directory) - { - info("Scanning $directory for $ext files ...\n"); - - @file_list = `find "$directory" $maxdepth $follow -name \\*$ext -type f 2>/dev/null`; - chomp(@file_list); - @file_list or - die("ERROR: no $ext files found in $directory!\n"); - $prefix = get_common_prefix(1, @file_list); - info("Found %d %s files in %s\n", $#file_list+1, $type, - $directory); - } - else - { - @file_list = ($directory); - $prefix = ""; - } - - # Process all files in list - foreach $file (@file_list) { - # Process file - if ($initial) { - process_graphfile($file, $prefix); - } else { - process_dafile($file, $prefix); - } - } -} - - -# -# derive_data(contentdata, funcdata, bbdata) -# -# Calculate function coverage data by combining line coverage data and the -# list of lines belonging to a function. -# -# contentdata: [ instr1, count1, source1, instr2, count2, source2, ... ] -# instr: Instrumentation flag for line n -# count: Execution count for line n -# source: Source code for line n -# -# funcdata: [ count1, func1, count2, func2, ... ] -# count: Execution count for function number n -# func: Function name for function number n -# -# bbdata: function_name -> [ line1, line2, ... ] -# line: Line number belonging to the corresponding function -# - -sub derive_data($$$) -{ - my ($contentdata, $funcdata, $bbdata) = @_; - my @gcov_content = @{$contentdata}; - my @gcov_functions = @{$funcdata}; - my %fn_count; - my %ln_fn; - my $line; - my $maxline; - my %fn_name; - my $fn; - my $count; - - if (!defined($bbdata)) { - return @gcov_functions; - } - - # First add existing function data - while (@gcov_functions) { - $count = shift(@gcov_functions); - $fn = shift(@gcov_functions); - - $fn_count{$fn} = $count; - } - - # Convert line coverage data to function data - foreach $fn (keys(%{$bbdata})) { - my $line_data = $bbdata->{$fn}; - my $line; - my $fninstr = 0; - - if ($fn eq "") { - next; - } - # Find the lowest line count for this function - $count = 0; - foreach $line (@$line_data) { - my $linstr = $gcov_content[ ( $line - 1 ) * 3 + 0 ]; - my $lcount = $gcov_content[ ( $line - 1 ) * 3 + 1 ]; - - next if (!$linstr); - $fninstr = 1; - if (($lcount > 0) && - (($count == 0) || ($lcount < $count))) { - $count = $lcount; - } - } - next if (!$fninstr); - $fn_count{$fn} = $count; - } - - - # Check if we got data for all functions - foreach $fn (keys(%fn_name)) { - if ($fn eq "") { - next; - } - if (defined($fn_count{$fn})) { - next; - } - warn("WARNING: no derived data found for function $fn\n"); - } - - # Convert hash to list in @gcov_functions format - foreach $fn (sort(keys(%fn_count))) { - push(@gcov_functions, $fn_count{$fn}, $fn); - } - - return @gcov_functions; -} - -# -# get_filenames(directory, pattern) -# -# Return a list of filenames found in directory which match the specified -# pattern. -# -# Die on error. -# - -sub get_filenames($$) -{ - my ($dirname, $pattern) = @_; - my @result; - my $directory; - local *DIR; - - opendir(DIR, $dirname) or - die("ERROR: cannot read directory $dirname\n"); - while ($directory = readdir(DIR)) { - push(@result, $directory) if ($directory =~ /$pattern/); - } - closedir(DIR); - - return @result; -} - -# -# process_dafile(da_filename, dir) -# -# Create a .info file for a single data file. -# -# Die on error. -# - -sub process_dafile($$) -{ - my ($file, $dir) = @_; - my $da_filename; # Name of data file to process - my $da_dir; # Directory of data file - my $source_dir; # Directory of source file - my $da_basename; # data filename without ".da/.gcda" extension - my $bb_filename; # Name of respective graph file - my $bb_basename; # Basename of the original graph file - my $graph; # Contents of graph file - my $instr; # Contents of graph file part 2 - my $gcov_error; # Error code of gcov tool - my $object_dir; # Directory containing all object files - my $source_filename; # Name of a source code file - my $gcov_file; # Name of a .gcov file - my @gcov_content; # Content of a .gcov file - my $gcov_branches; # Branch content of a .gcov file - my @gcov_functions; # Function calls of a .gcov file - my @gcov_list; # List of generated .gcov files - my $line_number; # Line number count - my $lines_hit; # Number of instrumented lines hit - my $lines_found; # Number of instrumented lines found - my $funcs_hit; # Number of instrumented functions hit - my $funcs_found; # Number of instrumented functions found - my $br_hit; - my $br_found; - my $source; # gcov source header information - my $object; # gcov object header information - my @matches; # List of absolute paths matching filename - my @unprocessed; # List of unprocessed source code files - my $base_dir; # Base directory for current file - my @tmp_links; # Temporary links to be cleaned up - my @result; - my $index; - my $da_renamed; # If data file is to be renamed - local *INFO_HANDLE; - - info("Processing %s\n", abs2rel($file, $dir)); - # Get path to data file in absolute and normalized form (begins with /, - # contains no more ../ or ./) - $da_filename = solve_relative_path($cwd, $file); - - # Get directory and basename of data file - ($da_dir, $da_basename) = split_filename($da_filename); - - $source_dir = $da_dir; - if (is_compat($COMPAT_MODE_LIBTOOL)) { - # Avoid files from .libs dirs - $source_dir =~ s/\.libs$//; - } - - if (-z $da_filename) - { - $da_renamed = 1; - } - else - { - $da_renamed = 0; - } - - # Construct base_dir for current file - if ($base_directory) - { - $base_dir = $base_directory; - } - else - { - $base_dir = $source_dir; - } - - # Check for writable $base_dir (gcov will try to write files there) - stat($base_dir); - if (!-w _) - { - die("ERROR: cannot write to directory $base_dir!\n"); - } - - # Construct name of graph file - $bb_basename = $da_basename.$graph_file_extension; - $bb_filename = "$da_dir/$bb_basename"; - - # Find out the real location of graph file in case we're just looking at - # a link - while (readlink($bb_filename)) - { - my $last_dir = dirname($bb_filename); - - $bb_filename = readlink($bb_filename); - $bb_filename = solve_relative_path($last_dir, $bb_filename); - } - - # Ignore empty graph file (e.g. source file with no statement) - if (-z $bb_filename) - { - warn("WARNING: empty $bb_filename (skipped)\n"); - return; - } - - # Read contents of graph file into hash. We need it later to find out - # the absolute path to each .gcov file created as well as for - # information about functions and their source code positions. - if ($gcov_version < $GCOV_VERSION_3_4_0) - { - if (is_compat($COMPAT_MODE_HAMMER)) - { - ($instr, $graph) = read_bbg($bb_filename); - } - else - { - ($instr, $graph) = read_bb($bb_filename); - } - } - else - { - ($instr, $graph) = read_gcno($bb_filename); - } - - # Try to find base directory automatically if requested by user - if ($rc_auto_base) { - $base_dir = find_base_from_graph($base_dir, $instr, $graph); - } - - ($instr, $graph) = adjust_graph_filenames($base_dir, $instr, $graph); - - # Set $object_dir to real location of object files. This may differ - # from $da_dir if the graph file is just a link to the "real" object - # file location. - $object_dir = dirname($bb_filename); - - # Is the data file in a different directory? (this happens e.g. with - # the gcov-kernel patch) - if ($object_dir ne $da_dir) - { - # Need to create link to data file in $object_dir - system("ln", "-s", $da_filename, - "$object_dir/$da_basename$data_file_extension") - and die ("ERROR: cannot create link $object_dir/". - "$da_basename$data_file_extension!\n"); - push(@tmp_links, - "$object_dir/$da_basename$data_file_extension"); - # Need to create link to graph file if basename of link - # and file are different (CONFIG_MODVERSION compat) - if ((basename($bb_filename) ne $bb_basename) && - (! -e "$object_dir/$bb_basename")) { - symlink($bb_filename, "$object_dir/$bb_basename") or - warn("WARNING: cannot create link ". - "$object_dir/$bb_basename\n"); - push(@tmp_links, "$object_dir/$bb_basename"); - } - } - - # Change to directory containing data files and apply GCOV - debug("chdir($base_dir)\n"); - chdir($base_dir); - - if ($da_renamed) - { - # Need to rename empty data file to workaround - # gcov <= 3.2.x bug (Abort) - system_no_output(3, "mv", "$da_filename", "$da_filename.ori") - and die ("ERROR: cannot rename $da_filename\n"); - } - - # Execute gcov command and suppress standard output - $gcov_error = system_no_output(1, $gcov_tool, $da_filename, - "-o", $object_dir, @gcov_options); - - if ($da_renamed) - { - system_no_output(3, "mv", "$da_filename.ori", "$da_filename") - and die ("ERROR: cannot rename $da_filename.ori"); - } - - # Clean up temporary links - foreach (@tmp_links) { - unlink($_); - } - - if ($gcov_error) - { - if ($ignore[$ERROR_GCOV]) - { - warn("WARNING: GCOV failed for $da_filename!\n"); - return; - } - die("ERROR: GCOV failed for $da_filename!\n"); - } - - # Collect data from resulting .gcov files and create .info file - @gcov_list = get_filenames('.', '\.gcov$'); - - # Check for files - if (!@gcov_list) - { - warn("WARNING: gcov did not create any files for ". - "$da_filename!\n"); - } - - # Check whether we're writing to a single file - if ($output_filename) - { - if ($output_filename eq "-") - { - *INFO_HANDLE = *STDOUT; - } - else - { - # Append to output file - open(INFO_HANDLE, ">>", $output_filename) - or die("ERROR: cannot write to ". - "$output_filename!\n"); - } - } - else - { - # Open .info file for output - open(INFO_HANDLE, ">", "$da_filename.info") - or die("ERROR: cannot create $da_filename.info!\n"); - } - - # Write test name - printf(INFO_HANDLE "TN:%s\n", $test_name); - - # Traverse the list of generated .gcov files and combine them into a - # single .info file - @unprocessed = keys(%{$instr}); - foreach $gcov_file (sort(@gcov_list)) - { - my $i; - my $num; - - # Skip gcov file for gcc built-in code - next if ($gcov_file eq ".gcov"); - - ($source, $object) = read_gcov_header($gcov_file); - - if (!defined($source)) { - # Derive source file name from gcov file name if - # header format could not be parsed - $source = $gcov_file; - $source =~ s/\.gcov$//; - } - - $source = solve_relative_path($base_dir, $source); - - if (defined($adjust_src_pattern)) { - # Apply transformation as specified by user - $source =~ s/$adjust_src_pattern/$adjust_src_replace/g; - } - - # gcov will happily create output even if there's no source code - # available - this interferes with checksum creation so we need - # to pull the emergency brake here. - if (! -r $source && $checksum) - { - if ($ignore[$ERROR_SOURCE]) - { - warn("WARNING: could not read source file ". - "$source\n"); - next; - } - die("ERROR: could not read source file $source\n"); - } - - @matches = match_filename($source, keys(%{$instr})); - - # Skip files that are not mentioned in the graph file - if (!@matches) - { - warn("WARNING: cannot find an entry for ".$gcov_file. - " in $graph_file_extension file, skipping ". - "file!\n"); - unlink($gcov_file); - next; - } - - # Read in contents of gcov file - @result = read_gcov_file($gcov_file); - if (!defined($result[0])) { - warn("WARNING: skipping unreadable file ". - $gcov_file."\n"); - unlink($gcov_file); - next; - } - @gcov_content = @{$result[0]}; - $gcov_branches = $result[1]; - @gcov_functions = @{$result[2]}; - - # Skip empty files - if (!@gcov_content) - { - warn("WARNING: skipping empty file ".$gcov_file."\n"); - unlink($gcov_file); - next; - } - - if (scalar(@matches) == 1) - { - # Just one match - $source_filename = $matches[0]; - } - else - { - # Try to solve the ambiguity - $source_filename = solve_ambiguous_match($gcov_file, - \@matches, \@gcov_content); - } - - # Remove processed file from list - for ($index = scalar(@unprocessed) - 1; $index >= 0; $index--) - { - if ($unprocessed[$index] eq $source_filename) - { - splice(@unprocessed, $index, 1); - last; - } - } - - # Skip external files if requested - if (!$opt_external) { - if (is_external($source_filename)) { - info(" ignoring data for external file ". - "$source_filename\n"); - unlink($gcov_file); - next; - } - } - - # Write absolute path of source file - printf(INFO_HANDLE "SF:%s\n", $source_filename); - - # If requested, derive function coverage data from - # line coverage data of the first line of a function - if ($opt_derive_func_data) { - @gcov_functions = - derive_data(\@gcov_content, \@gcov_functions, - $graph->{$source_filename}); - } - - # Write function-related information - if (defined($graph->{$source_filename})) - { - my $fn_data = $graph->{$source_filename}; - my $fn; - - foreach $fn (sort - {$fn_data->{$a}->[0] <=> $fn_data->{$b}->[0]} - keys(%{$fn_data})) { - my $ln_data = $fn_data->{$fn}; - my $line = $ln_data->[0]; - - # Skip empty function - if ($fn eq "") { - next; - } - # Remove excluded functions - if (!$no_markers) { - my $gfn; - my $found = 0; - - foreach $gfn (@gcov_functions) { - if ($gfn eq $fn) { - $found = 1; - last; - } - } - if (!$found) { - next; - } - } - - # Normalize function name - $fn = filter_fn_name($fn); - - print(INFO_HANDLE "FN:$line,$fn\n"); - } - } - - #-- - #-- FNDA: , - #-- FNF: overall count of functions - #-- FNH: overall count of functions with non-zero call count - #-- - $funcs_found = 0; - $funcs_hit = 0; - while (@gcov_functions) - { - my $count = shift(@gcov_functions); - my $fn = shift(@gcov_functions); - - $fn = filter_fn_name($fn); - printf(INFO_HANDLE "FNDA:$count,$fn\n"); - $funcs_found++; - $funcs_hit++ if ($count > 0); - } - if ($funcs_found > 0) { - printf(INFO_HANDLE "FNF:%s\n", $funcs_found); - printf(INFO_HANDLE "FNH:%s\n", $funcs_hit); - } - - # Write coverage information for each instrumented branch: - # - # BRDA:,,, - # - # where 'taken' is the number of times the branch was taken - # or '-' if the block to which the branch belongs was never - # executed - $br_found = 0; - $br_hit = 0; - $num = br_gvec_len($gcov_branches); - for ($i = 0; $i < $num; $i++) { - my ($line, $block, $branch, $taken) = - br_gvec_get($gcov_branches, $i); - - print(INFO_HANDLE "BRDA:$line,$block,$branch,$taken\n"); - $br_found++; - $br_hit++ if ($taken ne '-' && $taken > 0); - } - if ($br_found > 0) { - printf(INFO_HANDLE "BRF:%s\n", $br_found); - printf(INFO_HANDLE "BRH:%s\n", $br_hit); - } - - # Reset line counters - $line_number = 0; - $lines_found = 0; - $lines_hit = 0; - - # Write coverage information for each instrumented line - # Note: @gcov_content contains a list of (flag, count, source) - # tuple for each source code line - while (@gcov_content) - { - $line_number++; - - # Check for instrumented line - if ($gcov_content[0]) - { - $lines_found++; - printf(INFO_HANDLE "DA:".$line_number.",". - $gcov_content[1].($checksum ? - ",". md5_base64($gcov_content[2]) : ""). - "\n"); - - # Increase $lines_hit in case of an execution - # count>0 - if ($gcov_content[1] > 0) { $lines_hit++; } - } - - # Remove already processed data from array - splice(@gcov_content,0,3); - } - - # Write line statistics and section separator - printf(INFO_HANDLE "LF:%s\n", $lines_found); - printf(INFO_HANDLE "LH:%s\n", $lines_hit); - print(INFO_HANDLE "end_of_record\n"); - - # Remove .gcov file after processing - unlink($gcov_file); - } - - # Check for files which show up in the graph file but were never - # processed - if (@unprocessed && @gcov_list) - { - foreach (@unprocessed) - { - warn("WARNING: no data found for $_\n"); - } - } - - if (!($output_filename && ($output_filename eq "-"))) - { - close(INFO_HANDLE); - } - - # Change back to initial directory - chdir($cwd); -} - - -# -# solve_relative_path(path, dir) -# -# Solve relative path components of DIR which, if not absolute, resides in PATH. -# - -sub solve_relative_path($$) -{ - my $path = $_[0]; - my $dir = $_[1]; - my $volume; - my $directories; - my $filename; - my @dirs; # holds path elements - my $result; - - # Convert from Windows path to msys path - if( $^O eq "msys" ) - { - # search for a windows drive letter at the beginning - ($volume, $directories, $filename) = File::Spec::Win32->splitpath( $dir ); - if( $volume ne '' ) - { - my $uppercase_volume; - # transform c/d\../e/f\g to Windows style c\d\..\e\f\g - $dir = File::Spec::Win32->canonpath( $dir ); - # use Win32 module to retrieve path components - # $uppercase_volume is not used any further - ( $uppercase_volume, $directories, $filename ) = File::Spec::Win32->splitpath( $dir ); - @dirs = File::Spec::Win32->splitdir( $directories ); - - # prepend volume, since in msys C: is always mounted to /c - $volume =~ s|^([a-zA-Z]+):|/\L$1\E|; - unshift( @dirs, $volume ); - - # transform to Unix style '/' path - $directories = File::Spec->catdir( @dirs ); - $dir = File::Spec->catpath( '', $directories, $filename ); - } else { - # eliminate '\' path separators - $dir = File::Spec->canonpath( $dir ); - } - } - - $result = $dir; - # Prepend path if not absolute - if ($dir =~ /^[^\/]/) - { - $result = "$path/$result"; - } - - # Remove // - $result =~ s/\/\//\//g; - - # Remove . - $result =~ s/\/\.\//\//g; - $result =~ s/\/\.$/\//g; - - # Remove trailing / - $result =~ s/\/$//g; - - # Solve .. - while ($result =~ s/\/[^\/]+\/\.\.\//\//) - { - } - - # Remove preceding .. - $result =~ s/^\/\.\.\//\//g; - - return $result; -} - - -# -# match_filename(gcov_filename, list) -# -# Return a list of those entries of LIST which match the relative filename -# GCOV_FILENAME. -# - -sub match_filename($@) -{ - my ($filename, @list) = @_; - my ($vol, $dir, $file) = splitpath($filename); - my @comp = splitdir($dir); - my $comps = scalar(@comp); - my $entry; - my @result; - -entry: - foreach $entry (@list) { - my ($evol, $edir, $efile) = splitpath($entry); - my @ecomp; - my $ecomps; - my $i; - - # Filename component must match - if ($efile ne $file) { - next; - } - # Check directory components last to first for match - @ecomp = splitdir($edir); - $ecomps = scalar(@ecomp); - if ($ecomps < $comps) { - next; - } - for ($i = 0; $i < $comps; $i++) { - if ($comp[$comps - $i - 1] ne - $ecomp[$ecomps - $i - 1]) { - next entry; - } - } - push(@result, $entry), - } - - return @result; -} - -# -# solve_ambiguous_match(rel_filename, matches_ref, gcov_content_ref) -# -# Try to solve ambiguous matches of mapping (gcov file) -> (source code) file -# by comparing source code provided in the GCOV file with that of the files -# in MATCHES. REL_FILENAME identifies the relative filename of the gcov -# file. -# -# Return the one real match or die if there is none. -# - -sub solve_ambiguous_match($$$) -{ - my $rel_name = $_[0]; - my $matches = $_[1]; - my $content = $_[2]; - my $filename; - my $index; - my $no_match; - local *SOURCE; - - # Check the list of matches - foreach $filename (@$matches) - { - - # Compare file contents - open(SOURCE, "<", $filename) - or die("ERROR: cannot read $filename!\n"); - - $no_match = 0; - for ($index = 2; ; $index += 3) - { - chomp; - - # Also remove CR from line-end - s/\015$//; - - if ($_ ne @$content[$index]) - { - $no_match = 1; - last; - } - } - - close(SOURCE); - - if (!$no_match) - { - info("Solved source file ambiguity for $rel_name\n"); - return $filename; - } - } - - die("ERROR: could not match gcov data for $rel_name!\n"); -} - - -# -# split_filename(filename) -# -# Return (path, filename, extension) for a given FILENAME. -# - -sub split_filename($) -{ - my @path_components = split('/', $_[0]); - my @file_components = split('\.', pop(@path_components)); - my $extension = pop(@file_components); - - return (join("/",@path_components), join(".",@file_components), - $extension); -} - - -# -# read_gcov_header(gcov_filename) -# -# Parse file GCOV_FILENAME and return a list containing the following -# information: -# -# (source, object) -# -# where: -# -# source: complete relative path of the source code file (gcc >= 3.3 only) -# object: name of associated graph file -# -# Die on error. -# - -sub read_gcov_header($) -{ - my $source; - my $object; - local *INPUT; - - if (!open(INPUT, "<", $_[0])) - { - if ($ignore_errors[$ERROR_GCOV]) - { - warn("WARNING: cannot read $_[0]!\n"); - return (undef,undef); - } - die("ERROR: cannot read $_[0]!\n"); - } - - while () - { - chomp($_); - - # Also remove CR from line-end - s/\015$//; - - if (/^\s+-:\s+0:Source:(.*)$/) - { - # Source: header entry - $source = $1; - } - elsif (/^\s+-:\s+0:Object:(.*)$/) - { - # Object: header entry - $object = $1; - } - else - { - last; - } - } - - close(INPUT); - - return ($source, $object); -} - - -# -# br_gvec_len(vector) -# -# Return the number of entries in the branch coverage vector. -# - -sub br_gvec_len($) -{ - my ($vec) = @_; - - return 0 if (!defined($vec)); - return (length($vec) * 8 / $BR_VEC_WIDTH) / $BR_VEC_ENTRIES; -} - - -# -# br_gvec_get(vector, number) -# -# Return an entry from the branch coverage vector. -# - -sub br_gvec_get($$) -{ - my ($vec, $num) = @_; - my $line; - my $block; - my $branch; - my $taken; - my $offset = $num * $BR_VEC_ENTRIES; - - # Retrieve data from vector - $line = vec($vec, $offset + $BR_LINE, $BR_VEC_WIDTH); - $block = vec($vec, $offset + $BR_BLOCK, $BR_VEC_WIDTH); - $branch = vec($vec, $offset + $BR_BRANCH, $BR_VEC_WIDTH); - $taken = vec($vec, $offset + $BR_TAKEN, $BR_VEC_WIDTH); - - # Decode taken value from an integer - if ($taken == 0) { - $taken = "-"; - } else { - $taken--; - } - - return ($line, $block, $branch, $taken); -} - - -# -# br_gvec_push(vector, line, block, branch, taken) -# -# Add an entry to the branch coverage vector. -# - -sub br_gvec_push($$$$$) -{ - my ($vec, $line, $block, $branch, $taken) = @_; - my $offset; - - $vec = "" if (!defined($vec)); - $offset = br_gvec_len($vec) * $BR_VEC_ENTRIES; - - # Encode taken value into an integer - if ($taken eq "-") { - $taken = 0; - } else { - $taken++; - } - - # Add to vector - vec($vec, $offset + $BR_LINE, $BR_VEC_WIDTH) = $line; - vec($vec, $offset + $BR_BLOCK, $BR_VEC_WIDTH) = $block; - vec($vec, $offset + $BR_BRANCH, $BR_VEC_WIDTH) = $branch; - vec($vec, $offset + $BR_TAKEN, $BR_VEC_WIDTH) = $taken; - - return $vec; -} - - -# -# read_gcov_file(gcov_filename) -# -# Parse file GCOV_FILENAME (.gcov file format) and return the list: -# (reference to gcov_content, reference to gcov_branch, reference to gcov_func) -# -# gcov_content is a list of 3 elements -# (flag, count, source) for each source code line: -# -# $result[($line_number-1)*3+0] = instrumentation flag for line $line_number -# $result[($line_number-1)*3+1] = execution count for line $line_number -# $result[($line_number-1)*3+2] = source code text for line $line_number -# -# gcov_branch is a vector of 4 4-byte long elements for each branch: -# line number, block number, branch number, count + 1 or 0 -# -# gcov_func is a list of 2 elements -# (number of calls, function name) for each function -# -# Die on error. -# - -sub read_gcov_file($) -{ - my $filename = $_[0]; - my @result = (); - my $branches = ""; - my @functions = (); - my $number; - my $exclude_flag = 0; - my $exclude_line = 0; - my $last_block = $UNNAMED_BLOCK; - my $last_line = 0; - local *INPUT; - - if (!open(INPUT, "<", $filename)) { - if ($ignore_errors[$ERROR_GCOV]) - { - warn("WARNING: cannot read $filename!\n"); - return (undef, undef, undef); - } - die("ERROR: cannot read $filename!\n"); - } - - if ($gcov_version < $GCOV_VERSION_3_3_0) - { - # Expect gcov format as used in gcc < 3.3 - while () - { - chomp($_); - - # Also remove CR from line-end - s/\015$//; - - if (/^branch\s+(\d+)\s+taken\s+=\s+(\d+)/) { - next if (!$br_coverage); - next if ($exclude_line); - $branches = br_gvec_push($branches, $last_line, - $last_block, $1, $2); - } elsif (/^branch\s+(\d+)\s+never\s+executed/) { - next if (!$br_coverage); - next if ($exclude_line); - $branches = br_gvec_push($branches, $last_line, - $last_block, $1, '-'); - } - elsif (/^call/ || /^function/) - { - # Function call return data - } - else - { - $last_line++; - # Check for exclusion markers - if (!$no_markers) { - if (/$EXCL_STOP/) { - $exclude_flag = 0; - } elsif (/$EXCL_START/) { - $exclude_flag = 1; - } - if (/$EXCL_LINE/ || $exclude_flag) { - $exclude_line = 1; - } else { - $exclude_line = 0; - } - } - # Source code execution data - if (/^\t\t(.*)$/) - { - # Uninstrumented line - push(@result, 0); - push(@result, 0); - push(@result, $1); - next; - } - $number = (split(" ",substr($_, 0, 16)))[0]; - - # Check for zero count which is indicated - # by ###### - if ($number eq "######") { $number = 0; } - - if ($exclude_line) { - # Register uninstrumented line instead - push(@result, 0); - push(@result, 0); - } else { - push(@result, 1); - push(@result, $number); - } - push(@result, substr($_, 16)); - } - } - } - else - { - # Expect gcov format as used in gcc >= 3.3 - while () - { - chomp($_); - - # Also remove CR from line-end - s/\015$//; - - if (/^\s*(\d+|\$+):\s*(\d+)-block\s+(\d+)\s*$/) { - # Block information - used to group related - # branches - $last_line = $2; - $last_block = $3; - } elsif (/^branch\s+(\d+)\s+taken\s+(\d+)/) { - next if (!$br_coverage); - next if ($exclude_line); - $branches = br_gvec_push($branches, $last_line, - $last_block, $1, $2); - } elsif (/^branch\s+(\d+)\s+never\s+executed/) { - next if (!$br_coverage); - next if ($exclude_line); - $branches = br_gvec_push($branches, $last_line, - $last_block, $1, '-'); - } - elsif (/^function\s+(.+)\s+called\s+(\d+)\s+/) - { - next if (!$func_coverage); - if ($exclude_line) { - next; - } - push(@functions, $2, $1); - } - elsif (/^call/) - { - # Function call return data - } - elsif (/^\s*([^:]+):\s*([^:]+):(.*)$/) - { - my ($count, $line, $code) = ($1, $2, $3); - - $last_line = $line; - $last_block = $UNNAMED_BLOCK; - # Check for exclusion markers - if (!$no_markers) { - if (/$EXCL_STOP/) { - $exclude_flag = 0; - } elsif (/$EXCL_START/) { - $exclude_flag = 1; - } - if (/$EXCL_LINE/ || $exclude_flag) { - $exclude_line = 1; - } else { - $exclude_line = 0; - } - } - # :: - if ($line eq "0") - { - # Extra data - } - elsif ($count eq "-") - { - # Uninstrumented line - push(@result, 0); - push(@result, 0); - push(@result, $code); - } - else - { - if ($exclude_line) { - push(@result, 0); - push(@result, 0); - } else { - # Check for zero count - if ($count eq "#####") { - $count = 0; - } - push(@result, 1); - push(@result, $count); - } - push(@result, $code); - } - } - } - } - - close(INPUT); - if ($exclude_flag) { - warn("WARNING: unterminated exclusion section in $filename\n"); - } - return(\@result, $branches, \@functions); -} - - -# -# Get the GCOV tool version. Return an integer number which represents the -# GCOV version. Version numbers can be compared using standard integer -# operations. -# - -sub get_gcov_version() -{ - local *HANDLE; - my $version_string; - my $result; - - open(GCOV_PIPE, "-|", "$gcov_tool -v") - or die("ERROR: cannot retrieve gcov version!\n"); - $version_string = ; - close(GCOV_PIPE); - - $result = 0; - if ($version_string =~ /(\d+)\.(\d+)(\.(\d+))?/) - { - if (defined($4)) - { - info("Found gcov version: $1.$2.$4\n"); - $result = $1 << 16 | $2 << 8 | $4; - } - else - { - info("Found gcov version: $1.$2\n"); - $result = $1 << 16 | $2 << 8; - } - } - return ($result, $version_string); -} - - -# -# info(printf_parameter) -# -# Use printf to write PRINTF_PARAMETER to stdout only when the $quiet flag -# is not set. -# - -sub info(@) -{ - if (!$quiet) - { - # Print info string - if (defined($output_filename) && ($output_filename eq "-")) - { - # Don't interfere with the .info output to STDOUT - printf(STDERR @_); - } - else - { - printf(@_); - } - } -} - - -# -# int_handler() -# -# Called when the script was interrupted by an INT signal (e.g. CTRl-C) -# - -sub int_handler() -{ - if ($cwd) { chdir($cwd); } - info("Aborted.\n"); - exit(1); -} - - -# -# system_no_output(mode, parameters) -# -# Call an external program using PARAMETERS while suppressing depending on -# the value of MODE: -# -# MODE & 1: suppress STDOUT -# MODE & 2: suppress STDERR -# -# Return 0 on success, non-zero otherwise. -# - -sub system_no_output($@) -{ - my $mode = shift; - my $result; - local *OLD_STDERR; - local *OLD_STDOUT; - - # Save old stdout and stderr handles - ($mode & 1) && open(OLD_STDOUT, ">>&", "STDOUT"); - ($mode & 2) && open(OLD_STDERR, ">>&", "STDERR"); - - # Redirect to /dev/null - ($mode & 1) && open(STDOUT, ">", "/dev/null"); - ($mode & 2) && open(STDERR, ">", "/dev/null"); - - debug("system(".join(' ', @_).")\n"); - system(@_); - $result = $?; - - # Close redirected handles - ($mode & 1) && close(STDOUT); - ($mode & 2) && close(STDERR); - - # Restore old handles - ($mode & 1) && open(STDOUT, ">>&", "OLD_STDOUT"); - ($mode & 2) && open(STDERR, ">>&", "OLD_STDERR"); - - return $result; -} - - -# -# read_config(filename) -# -# Read configuration file FILENAME and return a reference to a hash containing -# all valid key=value pairs found. -# - -sub read_config($) -{ - my $filename = $_[0]; - my %result; - my $key; - my $value; - local *HANDLE; - - if (!open(HANDLE, "<", $filename)) - { - warn("WARNING: cannot read configuration file $filename\n"); - return undef; - } - while () - { - chomp; - # Skip comments - s/#.*//; - # Remove leading blanks - s/^\s+//; - # Remove trailing blanks - s/\s+$//; - next unless length; - ($key, $value) = split(/\s*=\s*/, $_, 2); - if (defined($key) && defined($value)) - { - $result{$key} = $value; - } - else - { - warn("WARNING: malformed statement in line $. ". - "of configuration file $filename\n"); - } - } - close(HANDLE); - return \%result; -} - - -# -# apply_config(REF) -# -# REF is a reference to a hash containing the following mapping: -# -# key_string => var_ref -# -# where KEY_STRING is a keyword and VAR_REF is a reference to an associated -# variable. If the global configuration hashes CONFIG or OPT_RC contain a value -# for keyword KEY_STRING, VAR_REF will be assigned the value for that keyword. -# - -sub apply_config($) -{ - my $ref = $_[0]; - - foreach (keys(%{$ref})) - { - if (defined($opt_rc{$_})) { - ${$ref->{$_}} = $opt_rc{$_}; - } elsif (defined($config->{$_})) { - ${$ref->{$_}} = $config->{$_}; - } - } -} - - -# -# get_exclusion_data(filename) -# -# Scan specified source code file for exclusion markers and return -# linenumber -> 1 -# for all lines which should be excluded. -# - -sub get_exclusion_data($) -{ - my ($filename) = @_; - my %list; - my $flag = 0; - local *HANDLE; - - if (!open(HANDLE, "<", $filename)) { - warn("WARNING: could not open $filename\n"); - return undef; - } - while () { - if (/$EXCL_STOP/) { - $flag = 0; - } elsif (/$EXCL_START/) { - $flag = 1; - } - if (/$EXCL_LINE/ || $flag) { - $list{$.} = 1; - } - } - close(HANDLE); - - if ($flag) { - warn("WARNING: unterminated exclusion section in $filename\n"); - } - - return \%list; -} - - -# -# apply_exclusion_data(instr, graph) -# -# Remove lines from instr and graph data structures which are marked -# for exclusion in the source code file. -# -# Return adjusted (instr, graph). -# -# graph : file name -> function data -# function data : function name -> line data -# line data : [ line1, line2, ... ] -# -# instr : filename -> line data -# line data : [ line1, line2, ... ] -# - -sub apply_exclusion_data($$) -{ - my ($instr, $graph) = @_; - my $filename; - my %excl_data; - my $excl_read_failed = 0; - - # Collect exclusion marker data - foreach $filename (sort_uniq_lex(keys(%{$graph}), keys(%{$instr}))) { - my $excl = get_exclusion_data($filename); - - # Skip and note if file could not be read - if (!defined($excl)) { - $excl_read_failed = 1; - next; - } - - # Add to collection if there are markers - $excl_data{$filename} = $excl if (keys(%{$excl}) > 0); - } - - # Warn if not all source files could be read - if ($excl_read_failed) { - warn("WARNING: some exclusion markers may be ignored\n"); - } - - # Skip if no markers were found - return ($instr, $graph) if (keys(%excl_data) == 0); - - # Apply exclusion marker data to graph - foreach $filename (keys(%excl_data)) { - my $function_data = $graph->{$filename}; - my $excl = $excl_data{$filename}; - my $function; - - next if (!defined($function_data)); - - foreach $function (keys(%{$function_data})) { - my $line_data = $function_data->{$function}; - my $line; - my @new_data; - - # To be consistent with exclusion parser in non-initial - # case we need to remove a function if the first line - # was excluded - if ($excl->{$line_data->[0]}) { - delete($function_data->{$function}); - next; - } - # Copy only lines which are not excluded - foreach $line (@{$line_data}) { - push(@new_data, $line) if (!$excl->{$line}); - } - - # Store modified list - if (scalar(@new_data) > 0) { - $function_data->{$function} = \@new_data; - } else { - # All of this function was excluded - delete($function_data->{$function}); - } - } - - # Check if all functions of this file were excluded - if (keys(%{$function_data}) == 0) { - delete($graph->{$filename}); - } - } - - # Apply exclusion marker data to instr - foreach $filename (keys(%excl_data)) { - my $line_data = $instr->{$filename}; - my $excl = $excl_data{$filename}; - my $line; - my @new_data; - - next if (!defined($line_data)); - - # Copy only lines which are not excluded - foreach $line (@{$line_data}) { - push(@new_data, $line) if (!$excl->{$line}); - } - - # Store modified list - $instr->{$filename} = \@new_data; - } - - return ($instr, $graph); -} - - -sub process_graphfile($$) -{ - my ($file, $dir) = @_; - my $graph_filename = $file; - my $graph_dir; - my $graph_basename; - my $source_dir; - my $base_dir; - my $graph; - my $instr; - my $filename; - local *INFO_HANDLE; - - info("Processing %s\n", abs2rel($file, $dir)); - - # Get path to data file in absolute and normalized form (begins with /, - # contains no more ../ or ./) - $graph_filename = solve_relative_path($cwd, $graph_filename); - - # Get directory and basename of data file - ($graph_dir, $graph_basename) = split_filename($graph_filename); - - $source_dir = $graph_dir; - if (is_compat($COMPAT_MODE_LIBTOOL)) { - # Avoid files from .libs dirs - $source_dir =~ s/\.libs$//; - } - - # Construct base_dir for current file - if ($base_directory) - { - $base_dir = $base_directory; - } - else - { - $base_dir = $source_dir; - } - - if ($gcov_version < $GCOV_VERSION_3_4_0) - { - if (is_compat($COMPAT_MODE_HAMMER)) - { - ($instr, $graph) = read_bbg($graph_filename); - } - else - { - ($instr, $graph) = read_bb($graph_filename); - } - } - else - { - ($instr, $graph) = read_gcno($graph_filename); - } - - # Try to find base directory automatically if requested by user - if ($rc_auto_base) { - $base_dir = find_base_from_graph($base_dir, $instr, $graph); - } - - ($instr, $graph) = adjust_graph_filenames($base_dir, $instr, $graph); - - if (!$no_markers) { - # Apply exclusion marker data to graph file data - ($instr, $graph) = apply_exclusion_data($instr, $graph); - } - - # Check whether we're writing to a single file - if ($output_filename) - { - if ($output_filename eq "-") - { - *INFO_HANDLE = *STDOUT; - } - else - { - # Append to output file - open(INFO_HANDLE, ">>", $output_filename) - or die("ERROR: cannot write to ". - "$output_filename!\n"); - } - } - else - { - # Open .info file for output - open(INFO_HANDLE, ">", "$graph_filename.info") - or die("ERROR: cannot create $graph_filename.info!\n"); - } - - # Write test name - printf(INFO_HANDLE "TN:%s\n", $test_name); - foreach $filename (sort(keys(%{$instr}))) - { - my $funcdata = $graph->{$filename}; - my $line; - my $linedata; - - print(INFO_HANDLE "SF:$filename\n"); - - if (defined($funcdata) && $func_coverage) { - my @functions = sort {$funcdata->{$a}->[0] <=> - $funcdata->{$b}->[0]} - keys(%{$funcdata}); - my $func; - - # Gather list of instrumented lines and functions - foreach $func (@functions) { - $linedata = $funcdata->{$func}; - - # Print function name and starting line - print(INFO_HANDLE "FN:".$linedata->[0]. - ",".filter_fn_name($func)."\n"); - } - # Print zero function coverage data - foreach $func (@functions) { - print(INFO_HANDLE "FNDA:0,". - filter_fn_name($func)."\n"); - } - # Print function summary - print(INFO_HANDLE "FNF:".scalar(@functions)."\n"); - print(INFO_HANDLE "FNH:0\n"); - } - # Print zero line coverage data - foreach $line (@{$instr->{$filename}}) { - print(INFO_HANDLE "DA:$line,0\n"); - } - # Print line summary - print(INFO_HANDLE "LF:".scalar(@{$instr->{$filename}})."\n"); - print(INFO_HANDLE "LH:0\n"); - - print(INFO_HANDLE "end_of_record\n"); - } - if (!($output_filename && ($output_filename eq "-"))) - { - close(INFO_HANDLE); - } -} - -sub filter_fn_name($) -{ - my ($fn) = @_; - - # Remove characters used internally as function name delimiters - $fn =~ s/[,=]/_/g; - - return $fn; -} - -sub warn_handler($) -{ - my ($msg) = @_; - - warn("$tool_name: $msg"); -} - -sub die_handler($) -{ - my ($msg) = @_; - - die("$tool_name: $msg"); -} - - -# -# graph_error(filename, message) -# -# Print message about error in graph file. If ignore_graph_error is set, return. -# Otherwise abort. -# - -sub graph_error($$) -{ - my ($filename, $msg) = @_; - - if ($ignore[$ERROR_GRAPH]) { - warn("WARNING: $filename: $msg - skipping\n"); - return; - } - die("ERROR: $filename: $msg\n"); -} - -# -# graph_expect(description) -# -# If debug is set to a non-zero value, print the specified description of what -# is expected to be read next from the graph file. -# - -sub graph_expect($) -{ - my ($msg) = @_; - - if (!$debug || !defined($msg)) { - return; - } - - print(STDERR "DEBUG: expecting $msg\n"); -} - -# -# graph_read(handle, bytes[, description, peek]) -# -# Read and return the specified number of bytes from handle. Return undef -# if the number of bytes could not be read. If PEEK is non-zero, reset -# file position after read. -# - -sub graph_read(*$;$$) -{ - my ($handle, $length, $desc, $peek) = @_; - my $data; - my $result; - my $pos; - - graph_expect($desc); - if ($peek) { - $pos = tell($handle); - if ($pos == -1) { - warn("Could not get current file position: $!\n"); - return undef; - } - } - $result = read($handle, $data, $length); - if ($debug) { - my $op = $peek ? "peek" : "read"; - my $ascii = ""; - my $hex = ""; - my $i; - - print(STDERR "DEBUG: $op($length)=$result: "); - for ($i = 0; $i < length($data); $i++) { - my $c = substr($data, $i, 1);; - my $n = ord($c); - - $hex .= sprintf("%02x ", $n); - if ($n >= 32 && $n <= 127) { - $ascii .= $c; - } else { - $ascii .= "."; - } - } - print(STDERR "$hex |$ascii|"); - print(STDERR "\n"); - } - if ($peek) { - if (!seek($handle, $pos, 0)) { - warn("Could not set file position: $!\n"); - return undef; - } - } - if ($result != $length) { - return undef; - } - return $data; -} - -# -# graph_skip(handle, bytes[, description]) -# -# Read and discard the specified number of bytes from handle. Return non-zero -# if bytes could be read, zero otherwise. -# - -sub graph_skip(*$;$) -{ - my ($handle, $length, $desc) = @_; - - if (defined(graph_read($handle, $length, $desc))) { - return 1; - } - return 0; -} - -# -# sort_uniq(list) -# -# Return list in numerically ascending order and without duplicate entries. -# - -sub sort_uniq(@) -{ - my (@list) = @_; - my %hash; - - foreach (@list) { - $hash{$_} = 1; - } - return sort { $a <=> $b } keys(%hash); -} - -# -# sort_uniq_lex(list) -# -# Return list in lexically ascending order and without duplicate entries. -# - -sub sort_uniq_lex(@) -{ - my (@list) = @_; - my %hash; - - foreach (@list) { - $hash{$_} = 1; - } - return sort keys(%hash); -} - -# -# parent_dir(dir) -# -# Return parent directory for DIR. DIR must not contain relative path -# components. -# - -sub parent_dir($) -{ - my ($dir) = @_; - my ($v, $d, $f) = splitpath($dir, 1); - my @dirs = splitdir($d); - - pop(@dirs); - - return catpath($v, catdir(@dirs), $f); -} - -# -# find_base_from_graph(base_dir, instr, graph) -# -# Try to determine the base directory of the graph file specified by INSTR -# and GRAPH. The base directory is the base for all relative filenames in -# the graph file. It is defined by the current working directory at time -# of compiling the source file. -# -# This function implements a heuristic which relies on the following -# assumptions: -# - all files used for compilation are still present at their location -# - the base directory is either BASE_DIR or one of its parent directories -# - files by the same name are not present in multiple parent directories -# - -sub find_base_from_graph($$$) -{ - my ($base_dir, $instr, $graph) = @_; - my $old_base; - my $best_miss; - my $best_base; - my %rel_files; - - # Determine list of relative paths - foreach my $filename (keys(%{$instr}), keys(%{$graph})) { - next if (file_name_is_absolute($filename)); - - $rel_files{$filename} = 1; - } - - # Early exit if there are no relative paths - return $base_dir if (!%rel_files); - - do { - my $miss = 0; - - foreach my $filename (keys(%rel_files)) { - if (!-e solve_relative_path($base_dir, $filename)) { - $miss++; - } - } - - debug("base_dir=$base_dir miss=$miss\n"); - - # Exit if we find an exact match with no misses - return $base_dir if ($miss == 0); - - # No exact match, aim for the one with the least source file - # misses - if (!defined($best_base) || $miss < $best_miss) { - $best_base = $base_dir; - $best_miss = $miss; - } - - # Repeat until there's no more parent directory - $old_base = $base_dir; - $base_dir = parent_dir($base_dir); - } while ($old_base ne $base_dir); - - return $best_base; -} - -# -# adjust_graph_filenames(base_dir, instr, graph) -# -# Make relative paths in INSTR and GRAPH absolute and apply -# geninfo_adjust_src_path setting to graph file data. -# - -sub adjust_graph_filenames($$$) -{ - my ($base_dir, $instr, $graph) = @_; - - foreach my $filename (keys(%{$instr})) { - my $old_filename = $filename; - - # Convert to absolute canonical form - $filename = solve_relative_path($base_dir, $filename); - - # Apply adjustment - if (defined($adjust_src_pattern)) { - $filename =~ s/$adjust_src_pattern/$adjust_src_replace/g; - } - - if ($filename ne $old_filename) { - $instr->{$filename} = delete($instr->{$old_filename}); - } - } - - foreach my $filename (keys(%{$graph})) { - my $old_filename = $filename; - - # Make absolute - # Convert to absolute canonical form - $filename = solve_relative_path($base_dir, $filename); - - # Apply adjustment - if (defined($adjust_src_pattern)) { - $filename =~ s/$adjust_src_pattern/$adjust_src_replace/g; - } - - if ($filename ne $old_filename) { - $graph->{$filename} = delete($graph->{$old_filename}); - } - } - - return ($instr, $graph); -} - -# -# graph_cleanup(graph) -# -# Remove entries for functions with no lines. Remove duplicate line numbers. -# Sort list of line numbers numerically ascending. -# - -sub graph_cleanup($) -{ - my ($graph) = @_; - my $filename; - - foreach $filename (keys(%{$graph})) { - my $per_file = $graph->{$filename}; - my $function; - - foreach $function (keys(%{$per_file})) { - my $lines = $per_file->{$function}; - - if (scalar(@$lines) == 0) { - # Remove empty function - delete($per_file->{$function}); - next; - } - # Normalize list - $per_file->{$function} = [ sort_uniq(@$lines) ]; - } - if (scalar(keys(%{$per_file})) == 0) { - # Remove empty file - delete($graph->{$filename}); - } - } -} - -# -# graph_find_base(bb) -# -# Try to identify the filename which is the base source file for the -# specified bb data. -# - -sub graph_find_base($) -{ - my ($bb) = @_; - my %file_count; - my $basefile; - my $file; - my $func; - my $filedata; - my $count; - my $num; - - # Identify base name for this bb data. - foreach $func (keys(%{$bb})) { - $filedata = $bb->{$func}; - - foreach $file (keys(%{$filedata})) { - $count = $file_count{$file}; - - # Count file occurrence - $file_count{$file} = defined($count) ? $count + 1 : 1; - } - } - $count = 0; - $num = 0; - foreach $file (keys(%file_count)) { - if ($file_count{$file} > $count) { - # The file that contains code for the most functions - # is likely the base file - $count = $file_count{$file}; - $num = 1; - $basefile = $file; - } elsif ($file_count{$file} == $count) { - # If more than one file could be the basefile, we - # don't have a basefile - $basefile = undef; - } - } - - return $basefile; -} - -# -# graph_from_bb(bb, fileorder, bb_filename) -# -# Convert data from bb to the graph format and list of instrumented lines. -# Returns (instr, graph). -# -# bb : function name -> file data -# : undef -> file order -# file data : filename -> line data -# line data : [ line1, line2, ... ] -# -# file order : function name -> [ filename1, filename2, ... ] -# -# graph : file name -> function data -# function data : function name -> line data -# line data : [ line1, line2, ... ] -# -# instr : filename -> line data -# line data : [ line1, line2, ... ] -# - -sub graph_from_bb($$$) -{ - my ($bb, $fileorder, $bb_filename) = @_; - my $graph = {}; - my $instr = {}; - my $basefile; - my $file; - my $func; - my $filedata; - my $linedata; - my $order; - - $basefile = graph_find_base($bb); - # Create graph structure - foreach $func (keys(%{$bb})) { - $filedata = $bb->{$func}; - $order = $fileorder->{$func}; - - # Account for lines in functions - if (defined($basefile) && defined($filedata->{$basefile})) { - # If the basefile contributes to this function, - # account this function to the basefile. - $graph->{$basefile}->{$func} = $filedata->{$basefile}; - } else { - # If the basefile does not contribute to this function, - # account this function to the first file contributing - # lines. - $graph->{$order->[0]}->{$func} = - $filedata->{$order->[0]}; - } - - foreach $file (keys(%{$filedata})) { - # Account for instrumented lines - $linedata = $filedata->{$file}; - push(@{$instr->{$file}}, @$linedata); - } - } - # Clean up array of instrumented lines - foreach $file (keys(%{$instr})) { - $instr->{$file} = [ sort_uniq(@{$instr->{$file}}) ]; - } - - return ($instr, $graph); -} - -# -# graph_add_order(fileorder, function, filename) -# -# Add an entry for filename to the fileorder data set for function. -# - -sub graph_add_order($$$) -{ - my ($fileorder, $function, $filename) = @_; - my $item; - my $list; - - $list = $fileorder->{$function}; - foreach $item (@$list) { - if ($item eq $filename) { - return; - } - } - push(@$list, $filename); - $fileorder->{$function} = $list; -} - -# -# read_bb_word(handle[, description]) -# -# Read and return a word in .bb format from handle. -# - -sub read_bb_word(*;$) -{ - my ($handle, $desc) = @_; - - return graph_read($handle, 4, $desc); -} - -# -# read_bb_value(handle[, description]) -# -# Read a word in .bb format from handle and return the word and its integer -# value. -# - -sub read_bb_value(*;$) -{ - my ($handle, $desc) = @_; - my $word; - - $word = read_bb_word($handle, $desc); - return undef if (!defined($word)); - - return ($word, unpack("V", $word)); -} - -# -# read_bb_string(handle, delimiter) -# -# Read and return a string in .bb format from handle up to the specified -# delimiter value. -# - -sub read_bb_string(*$) -{ - my ($handle, $delimiter) = @_; - my $word; - my $value; - my $string = ""; - - graph_expect("string"); - do { - ($word, $value) = read_bb_value($handle, "string or delimiter"); - return undef if (!defined($value)); - if ($value != $delimiter) { - $string .= $word; - } - } while ($value != $delimiter); - $string =~ s/\0//g; - - return $string; -} - -# -# read_bb(filename) -# -# Read the contents of the specified .bb file and return (instr, graph), where: -# -# instr : filename -> line data -# line data : [ line1, line2, ... ] -# -# graph : filename -> file_data -# file_data : function name -> line_data -# line_data : [ line1, line2, ... ] -# -# See the gcov info pages of gcc 2.95 for a description of the .bb file format. -# - -sub read_bb($) -{ - my ($bb_filename) = @_; - my $minus_one = 0x80000001; - my $minus_two = 0x80000002; - my $value; - my $filename; - my $function; - my $bb = {}; - my $fileorder = {}; - my $instr; - my $graph; - local *HANDLE; - - open(HANDLE, "<", $bb_filename) or goto open_error; - binmode(HANDLE); - while (!eof(HANDLE)) { - $value = read_bb_value(*HANDLE, "data word"); - goto incomplete if (!defined($value)); - if ($value == $minus_one) { - # Source file name - graph_expect("filename"); - $filename = read_bb_string(*HANDLE, $minus_one); - goto incomplete if (!defined($filename)); - } elsif ($value == $minus_two) { - # Function name - graph_expect("function name"); - $function = read_bb_string(*HANDLE, $minus_two); - goto incomplete if (!defined($function)); - } elsif ($value > 0) { - # Line number - if (!defined($filename) || !defined($function)) { - warn("WARNING: unassigned line number ". - "$value\n"); - next; - } - push(@{$bb->{$function}->{$filename}}, $value); - graph_add_order($fileorder, $function, $filename); - } - } - close(HANDLE); - ($instr, $graph) = graph_from_bb($bb, $fileorder, $bb_filename); - graph_cleanup($graph); - - return ($instr, $graph); - -open_error: - graph_error($bb_filename, "could not open file"); - return undef; -incomplete: - graph_error($bb_filename, "reached unexpected end of file"); - return undef; -} - -# -# read_bbg_word(handle[, description]) -# -# Read and return a word in .bbg format. -# - -sub read_bbg_word(*;$) -{ - my ($handle, $desc) = @_; - - return graph_read($handle, 4, $desc); -} - -# -# read_bbg_value(handle[, description]) -# -# Read a word in .bbg format from handle and return its integer value. -# - -sub read_bbg_value(*;$) -{ - my ($handle, $desc) = @_; - my $word; - - $word = read_bbg_word($handle, $desc); - return undef if (!defined($word)); - - return unpack("N", $word); -} - -# -# read_bbg_string(handle) -# -# Read and return a string in .bbg format. -# - -sub read_bbg_string(*) -{ - my ($handle, $desc) = @_; - my $length; - my $string; - - graph_expect("string"); - # Read string length - $length = read_bbg_value($handle, "string length"); - return undef if (!defined($length)); - if ($length == 0) { - return ""; - } - # Read string - $string = graph_read($handle, $length, "string"); - return undef if (!defined($string)); - # Skip padding - graph_skip($handle, 4 - $length % 4, "string padding") or return undef; - - return $string; -} - -# -# read_bbg_lines_record(handle, bbg_filename, bb, fileorder, filename, -# function) -# -# Read a bbg format lines record from handle and add the relevant data to -# bb and fileorder. Return filename on success, undef on error. -# - -sub read_bbg_lines_record(*$$$$$) -{ - my ($handle, $bbg_filename, $bb, $fileorder, $filename, $function) = @_; - my $string; - my $lineno; - - graph_expect("lines record"); - # Skip basic block index - graph_skip($handle, 4, "basic block index") or return undef; - while (1) { - # Read line number - $lineno = read_bbg_value($handle, "line number"); - return undef if (!defined($lineno)); - if ($lineno == 0) { - # Got a marker for a new filename - graph_expect("filename"); - $string = read_bbg_string($handle); - return undef if (!defined($string)); - # Check for end of record - if ($string eq "") { - return $filename; - } - $filename = $string; - if (!exists($bb->{$function}->{$filename})) { - $bb->{$function}->{$filename} = []; - } - next; - } - # Got an actual line number - if (!defined($filename)) { - warn("WARNING: unassigned line number in ". - "$bbg_filename\n"); - next; - } - push(@{$bb->{$function}->{$filename}}, $lineno); - graph_add_order($fileorder, $function, $filename); - } -} - -# -# read_bbg(filename) -# -# Read the contents of the specified .bbg file and return the following mapping: -# graph: filename -> file_data -# file_data: function name -> line_data -# line_data: [ line1, line2, ... ] -# -# See the gcov-io.h file in the SLES 9 gcc 3.3.3 source code for a description -# of the .bbg format. -# - -sub read_bbg($) -{ - my ($bbg_filename) = @_; - my $file_magic = 0x67626267; - my $tag_function = 0x01000000; - my $tag_lines = 0x01450000; - my $word; - my $tag; - my $length; - my $function; - my $filename; - my $bb = {}; - my $fileorder = {}; - my $instr; - my $graph; - local *HANDLE; - - open(HANDLE, "<", $bbg_filename) or goto open_error; - binmode(HANDLE); - # Read magic - $word = read_bbg_value(*HANDLE, "file magic"); - goto incomplete if (!defined($word)); - # Check magic - if ($word != $file_magic) { - goto magic_error; - } - # Skip version - graph_skip(*HANDLE, 4, "version") or goto incomplete; - while (!eof(HANDLE)) { - # Read record tag - $tag = read_bbg_value(*HANDLE, "record tag"); - goto incomplete if (!defined($tag)); - # Read record length - $length = read_bbg_value(*HANDLE, "record length"); - goto incomplete if (!defined($tag)); - if ($tag == $tag_function) { - graph_expect("function record"); - # Read function name - graph_expect("function name"); - $function = read_bbg_string(*HANDLE); - goto incomplete if (!defined($function)); - $filename = undef; - # Skip function checksum - graph_skip(*HANDLE, 4, "function checksum") - or goto incomplete; - } elsif ($tag == $tag_lines) { - # Read lines record - $filename = read_bbg_lines_record(HANDLE, $bbg_filename, - $bb, $fileorder, $filename, - $function); - goto incomplete if (!defined($filename)); - } else { - # Skip record contents - graph_skip(*HANDLE, $length, "unhandled record") - or goto incomplete; - } - } - close(HANDLE); - ($instr, $graph) = graph_from_bb($bb, $fileorder, $bbg_filename); - graph_cleanup($graph); - - return ($instr, $graph); - -open_error: - graph_error($bbg_filename, "could not open file"); - return undef; -incomplete: - graph_error($bbg_filename, "reached unexpected end of file"); - return undef; -magic_error: - graph_error($bbg_filename, "found unrecognized bbg file magic"); - return undef; -} - -# -# read_gcno_word(handle[, description, peek]) -# -# Read and return a word in .gcno format. -# - -sub read_gcno_word(*;$$) -{ - my ($handle, $desc, $peek) = @_; - - return graph_read($handle, 4, $desc, $peek); -} - -# -# read_gcno_value(handle, big_endian[, description, peek]) -# -# Read a word in .gcno format from handle and return its integer value -# according to the specified endianness. If PEEK is non-zero, reset file -# position after read. -# - -sub read_gcno_value(*$;$$) -{ - my ($handle, $big_endian, $desc, $peek) = @_; - my $word; - my $pos; - - $word = read_gcno_word($handle, $desc, $peek); - return undef if (!defined($word)); - if ($big_endian) { - return unpack("N", $word); - } else { - return unpack("V", $word); - } -} - -# -# read_gcno_string(handle, big_endian) -# -# Read and return a string in .gcno format. -# - -sub read_gcno_string(*$) -{ - my ($handle, $big_endian) = @_; - my $length; - my $string; - - graph_expect("string"); - # Read string length - $length = read_gcno_value($handle, $big_endian, "string length"); - return undef if (!defined($length)); - if ($length == 0) { - return ""; - } - $length *= 4; - # Read string - $string = graph_read($handle, $length, "string and padding"); - return undef if (!defined($string)); - $string =~ s/\0//g; - - return $string; -} - -# -# read_gcno_lines_record(handle, gcno_filename, bb, fileorder, filename, -# function, big_endian) -# -# Read a gcno format lines record from handle and add the relevant data to -# bb and fileorder. Return filename on success, undef on error. -# - -sub read_gcno_lines_record(*$$$$$$) -{ - my ($handle, $gcno_filename, $bb, $fileorder, $filename, $function, - $big_endian) = @_; - my $string; - my $lineno; - - graph_expect("lines record"); - # Skip basic block index - graph_skip($handle, 4, "basic block index") or return undef; - while (1) { - # Read line number - $lineno = read_gcno_value($handle, $big_endian, "line number"); - return undef if (!defined($lineno)); - if ($lineno == 0) { - # Got a marker for a new filename - graph_expect("filename"); - $string = read_gcno_string($handle, $big_endian); - return undef if (!defined($string)); - # Check for end of record - if ($string eq "") { - return $filename; - } - $filename = $string; - if (!exists($bb->{$function}->{$filename})) { - $bb->{$function}->{$filename} = []; - } - next; - } - # Got an actual line number - if (!defined($filename)) { - warn("WARNING: unassigned line number in ". - "$gcno_filename\n"); - next; - } - # Add to list - push(@{$bb->{$function}->{$filename}}, $lineno); - graph_add_order($fileorder, $function, $filename); - } -} - -# -# determine_gcno_split_crc(handle, big_endian, rec_length) -# -# Determine if HANDLE refers to a .gcno file with a split checksum function -# record format. Return non-zero in case of split checksum format, zero -# otherwise, undef in case of read error. -# - -sub determine_gcno_split_crc($$$) -{ - my ($handle, $big_endian, $rec_length) = @_; - my $strlen; - my $overlong_string; - - return 1 if ($gcov_version >= $GCOV_VERSION_4_7_0); - return 1 if (is_compat($COMPAT_MODE_SPLIT_CRC)); - - # Heuristic: - # Decide format based on contents of next word in record: - # - pre-gcc 4.7 - # This is the function name length / 4 which should be - # less than the remaining record length - # - gcc 4.7 - # This is a checksum, likely with high-order bits set, - # resulting in a large number - $strlen = read_gcno_value($handle, $big_endian, undef, 1); - return undef if (!defined($strlen)); - $overlong_string = 1 if ($strlen * 4 >= $rec_length - 12); - - if ($overlong_string) { - if (is_compat_auto($COMPAT_MODE_SPLIT_CRC)) { - info("Auto-detected compatibility mode for split ". - "checksum .gcno file format\n"); - - return 1; - } else { - # Sanity check - warn("Found overlong string in function record: ". - "try '--compat split_crc'\n"); - } - } - - return 0; -} - -# -# read_gcno_function_record(handle, graph, big_endian, rec_length) -# -# Read a gcno format function record from handle and add the relevant data -# to graph. Return (filename, function) on success, undef on error. -# - -sub read_gcno_function_record(*$$$$) -{ - my ($handle, $bb, $fileorder, $big_endian, $rec_length) = @_; - my $filename; - my $function; - my $lineno; - my $lines; - - graph_expect("function record"); - # Skip ident and checksum - graph_skip($handle, 8, "function ident and checksum") or return undef; - # Determine if this is a function record with split checksums - if (!defined($gcno_split_crc)) { - $gcno_split_crc = determine_gcno_split_crc($handle, $big_endian, - $rec_length); - return undef if (!defined($gcno_split_crc)); - } - # Skip cfg checksum word in case of split checksums - graph_skip($handle, 4, "function cfg checksum") if ($gcno_split_crc); - # Read function name - graph_expect("function name"); - $function = read_gcno_string($handle, $big_endian); - return undef if (!defined($function)); - # Read filename - graph_expect("filename"); - $filename = read_gcno_string($handle, $big_endian); - return undef if (!defined($filename)); - # Read first line number - $lineno = read_gcno_value($handle, $big_endian, "initial line number"); - return undef if (!defined($lineno)); - # Add to list - push(@{$bb->{$function}->{$filename}}, $lineno); - graph_add_order($fileorder, $function, $filename); - - return ($filename, $function); -} - -# -# read_gcno(filename) -# -# Read the contents of the specified .gcno file and return the following -# mapping: -# graph: filename -> file_data -# file_data: function name -> line_data -# line_data: [ line1, line2, ... ] -# -# See the gcov-io.h file in the gcc 3.3 source code for a description of -# the .gcno format. -# - -sub read_gcno($) -{ - my ($gcno_filename) = @_; - my $file_magic = 0x67636e6f; - my $tag_function = 0x01000000; - my $tag_lines = 0x01450000; - my $big_endian; - my $word; - my $tag; - my $length; - my $filename; - my $function; - my $bb = {}; - my $fileorder = {}; - my $instr; - my $graph; - local *HANDLE; - - open(HANDLE, "<", $gcno_filename) or goto open_error; - binmode(HANDLE); - # Read magic - $word = read_gcno_word(*HANDLE, "file magic"); - goto incomplete if (!defined($word)); - # Determine file endianness - if (unpack("N", $word) == $file_magic) { - $big_endian = 1; - } elsif (unpack("V", $word) == $file_magic) { - $big_endian = 0; - } else { - goto magic_error; - } - # Skip version and stamp - graph_skip(*HANDLE, 8, "version and stamp") or goto incomplete; - while (!eof(HANDLE)) { - my $next_pos; - my $curr_pos; - - # Read record tag - $tag = read_gcno_value(*HANDLE, $big_endian, "record tag"); - goto incomplete if (!defined($tag)); - # Read record length - $length = read_gcno_value(*HANDLE, $big_endian, - "record length"); - goto incomplete if (!defined($length)); - # Convert length to bytes - $length *= 4; - # Calculate start of next record - $next_pos = tell(HANDLE); - goto tell_error if ($next_pos == -1); - $next_pos += $length; - # Process record - if ($tag == $tag_function) { - ($filename, $function) = read_gcno_function_record( - *HANDLE, $bb, $fileorder, $big_endian, - $length); - goto incomplete if (!defined($function)); - } elsif ($tag == $tag_lines) { - # Read lines record - $filename = read_gcno_lines_record(*HANDLE, - $gcno_filename, $bb, $fileorder, - $filename, $function, - $big_endian); - goto incomplete if (!defined($filename)); - } else { - # Skip record contents - graph_skip(*HANDLE, $length, "unhandled record") - or goto incomplete; - } - # Ensure that we are at the start of the next record - $curr_pos = tell(HANDLE); - goto tell_error if ($curr_pos == -1); - next if ($curr_pos == $next_pos); - goto record_error if ($curr_pos > $next_pos); - graph_skip(*HANDLE, $next_pos - $curr_pos, - "unhandled record content") - or goto incomplete; - } - close(HANDLE); - ($instr, $graph) = graph_from_bb($bb, $fileorder, $gcno_filename); - graph_cleanup($graph); - - return ($instr, $graph); - -open_error: - graph_error($gcno_filename, "could not open file"); - return undef; -incomplete: - graph_error($gcno_filename, "reached unexpected end of file"); - return undef; -magic_error: - graph_error($gcno_filename, "found unrecognized gcno file magic"); - return undef; -tell_error: - graph_error($gcno_filename, "could not determine file position"); - return undef; -record_error: - graph_error($gcno_filename, "found unrecognized record format"); - return undef; -} - -sub debug($) -{ - my ($msg) = @_; - - return if (!$debug); - print(STDERR "DEBUG: $msg"); -} - -# -# get_gcov_capabilities -# -# Determine the list of available gcov options. -# - -sub get_gcov_capabilities() -{ - my $help = `$gcov_tool --help`; - my %capabilities; - - foreach (split(/\n/, $help)) { - next if (!/--(\S+)/); - next if ($1 eq 'help'); - next if ($1 eq 'version'); - next if ($1 eq 'object-directory'); - - $capabilities{$1} = 1; - debug("gcov has capability '$1'\n"); - } - - return \%capabilities; -} - -# -# parse_ignore_errors(@ignore_errors) -# -# Parse user input about which errors to ignore. -# - -sub parse_ignore_errors(@) -{ - my (@ignore_errors) = @_; - my @items; - my $item; - - return if (!@ignore_errors); - - foreach $item (@ignore_errors) { - $item =~ s/\s//g; - if ($item =~ /,/) { - # Split and add comma-separated parameters - push(@items, split(/,/, $item)); - } else { - # Add single parameter - push(@items, $item); - } - } - foreach $item (@items) { - my $item_id = $ERROR_ID{lc($item)}; - - if (!defined($item_id)) { - die("ERROR: unknown argument for --ignore-errors: ". - "$item\n"); - } - $ignore[$item_id] = 1; - } -} - -# -# is_external(filename) -# -# Determine if a file is located outside of the specified data directories. -# - -sub is_external($) -{ - my ($filename) = @_; - my $dir; - - foreach $dir (@internal_dirs) { - return 0 if ($filename =~ /^\Q$dir\/\E/); - } - return 1; -} - -# -# compat_name(mode) -# -# Return the name of compatibility mode MODE. -# - -sub compat_name($) -{ - my ($mode) = @_; - my $name = $COMPAT_MODE_TO_NAME{$mode}; - - return $name if (defined($name)); - - return ""; -} - -# -# parse_compat_modes(opt) -# -# Determine compatibility mode settings. -# - -sub parse_compat_modes($) -{ - my ($opt) = @_; - my @opt_list; - my %specified; - - # Initialize with defaults - %compat_value = %COMPAT_MODE_DEFAULTS; - - # Add old style specifications - if (defined($opt_compat_libtool)) { - $compat_value{$COMPAT_MODE_LIBTOOL} = - $opt_compat_libtool ? $COMPAT_VALUE_ON - : $COMPAT_VALUE_OFF; - } - - # Parse settings - if (defined($opt)) { - @opt_list = split(/\s*,\s*/, $opt); - } - foreach my $directive (@opt_list) { - my ($mode, $value); - - # Either - # mode=off|on|auto or - # mode (implies on) - if ($directive !~ /^(\w+)=(\w+)$/ && - $directive !~ /^(\w+)$/) { - die("ERROR: Unknown compatibility mode specification: ". - "$directive!\n"); - } - # Determine mode - $mode = $COMPAT_NAME_TO_MODE{lc($1)}; - if (!defined($mode)) { - die("ERROR: Unknown compatibility mode '$1'!\n"); - } - $specified{$mode} = 1; - # Determine value - if (defined($2)) { - $value = $COMPAT_NAME_TO_VALUE{lc($2)}; - if (!defined($value)) { - die("ERROR: Unknown compatibility mode ". - "value '$2'!\n"); - } - } else { - $value = $COMPAT_VALUE_ON; - } - $compat_value{$mode} = $value; - } - # Perform auto-detection - foreach my $mode (sort(keys(%compat_value))) { - my $value = $compat_value{$mode}; - my $is_autodetect = ""; - my $name = compat_name($mode); - - if ($value == $COMPAT_VALUE_AUTO) { - my $autodetect = $COMPAT_MODE_AUTO{$mode}; - - if (!defined($autodetect)) { - die("ERROR: No auto-detection for ". - "mode '$name' available!\n"); - } - - if (ref($autodetect) eq "CODE") { - $value = &$autodetect(); - $compat_value{$mode} = $value; - $is_autodetect = " (auto-detected)"; - } - } - - if ($specified{$mode}) { - if ($value == $COMPAT_VALUE_ON) { - info("Enabling compatibility mode ". - "'$name'$is_autodetect\n"); - } elsif ($value == $COMPAT_VALUE_OFF) { - info("Disabling compatibility mode ". - "'$name'$is_autodetect\n"); - } else { - info("Using delayed auto-detection for ". - "compatibility mode ". - "'$name'\n"); - } - } - } -} - -sub compat_hammer_autodetect() -{ - if ($gcov_version_string =~ /suse/i && $gcov_version == 0x30303 || - $gcov_version_string =~ /mandrake/i && $gcov_version == 0x30302) - { - info("Auto-detected compatibility mode for GCC 3.3 (hammer)\n"); - return $COMPAT_VALUE_ON; - } - return $COMPAT_VALUE_OFF; -} - -# -# is_compat(mode) -# -# Return non-zero if compatibility mode MODE is enabled. -# - -sub is_compat($) -{ - my ($mode) = @_; - - return 1 if ($compat_value{$mode} == $COMPAT_VALUE_ON); - return 0; -} - -# -# is_compat_auto(mode) -# -# Return non-zero if compatibility mode MODE is set to auto-detect. -# - -sub is_compat_auto($) -{ - my ($mode) = @_; - - return 1 if ($compat_value{$mode} == $COMPAT_VALUE_AUTO); - return 0; -} diff --git a/XcodeCoverage/lcov-1.10/bin/lcov b/XcodeCoverage/lcov-1.10/bin/lcov deleted file mode 100755 index 1a7f525..0000000 --- a/XcodeCoverage/lcov-1.10/bin/lcov +++ /dev/null @@ -1,4303 +0,0 @@ -#!/usr/bin/perl -w -# -# Copyright (c) International Business Machines Corp., 2002,2012 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or (at -# your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# -# lcov -# -# This is a wrapper script which provides a single interface for accessing -# LCOV coverage data. -# -# -# History: -# 2002-08-29 created by Peter Oberparleiter -# IBM Lab Boeblingen -# 2002-09-05 / Peter Oberparleiter: implemented --kernel-directory + -# multiple directories -# 2002-10-16 / Peter Oberparleiter: implemented --add-tracefile option -# 2002-10-17 / Peter Oberparleiter: implemented --extract option -# 2002-11-04 / Peter Oberparleiter: implemented --list option -# 2003-03-07 / Paul Larson: Changed to make it work with the latest gcov -# kernel patch. This will break it with older gcov-kernel -# patches unless you change the value of $gcovmod in this script -# 2003-04-07 / Peter Oberparleiter: fixed bug which resulted in an error -# when trying to combine .info files containing data without -# a test name -# 2003-04-10 / Peter Oberparleiter: extended Paul's change so that LCOV -# works both with the new and the old gcov-kernel patch -# 2003-04-10 / Peter Oberparleiter: added $gcov_dir constant in anticipation -# of a possible move of the gcov kernel directory to another -# file system in a future version of the gcov-kernel patch -# 2003-04-15 / Paul Larson: make info write to STDERR, not STDOUT -# 2003-04-15 / Paul Larson: added --remove option -# 2003-04-30 / Peter Oberparleiter: renamed --reset to --zerocounters -# to remove naming ambiguity with --remove -# 2003-04-30 / Peter Oberparleiter: adjusted help text to include --remove -# 2003-06-27 / Peter Oberparleiter: implemented --diff -# 2003-07-03 / Peter Oberparleiter: added line checksum support, added -# --no-checksum -# 2003-12-11 / Laurent Deniel: added --follow option -# 2004-03-29 / Peter Oberparleiter: modified --diff option to better cope with -# ambiguous patch file entries, modified --capture option to use -# modprobe before insmod (needed for 2.6) -# 2004-03-30 / Peter Oberparleiter: added --path option -# 2004-08-09 / Peter Oberparleiter: added configuration file support -# 2008-08-13 / Peter Oberparleiter: added function coverage support -# - -use strict; -use File::Basename; -use File::Path; -use File::Find; -use File::Temp qw /tempdir/; -use File::Spec::Functions qw /abs2rel canonpath catdir catfile catpath - file_name_is_absolute rootdir splitdir splitpath/; -use Getopt::Long; -use Cwd qw /abs_path getcwd/; - - -# Global constants -our $lcov_version = 'LCOV version 1.10'; -our $lcov_url = "http://ltp.sourceforge.net/coverage/lcov.php"; -our $tool_name = basename($0); - -# Directory containing gcov kernel files -our $gcov_dir; - -# Where to create temporary directories -our $tmp_dir; - -# Internal constants -our $GKV_PROC = 0; # gcov-kernel data in /proc via external patch -our $GKV_SYS = 1; # gcov-kernel data in /sys via vanilla 2.6.31+ -our @GKV_NAME = ( "external", "upstream" ); -our $pkg_gkv_file = ".gcov_kernel_version"; -our $pkg_build_file = ".build_directory"; - -our $BR_BLOCK = 0; -our $BR_BRANCH = 1; -our $BR_TAKEN = 2; -our $BR_VEC_ENTRIES = 3; -our $BR_VEC_WIDTH = 32; - -# Branch data combination types -our $BR_SUB = 0; -our $BR_ADD = 1; - -# Prototypes -sub print_usage(*); -sub check_options(); -sub userspace_reset(); -sub userspace_capture(); -sub kernel_reset(); -sub kernel_capture(); -sub kernel_capture_initial(); -sub package_capture(); -sub add_traces(); -sub read_info_file($); -sub get_info_entry($); -sub set_info_entry($$$$$$$$$;$$$$$$); -sub add_counts($$); -sub merge_checksums($$$); -sub combine_info_entries($$$); -sub combine_info_files($$); -sub write_info_file(*$); -sub extract(); -sub remove(); -sub list(); -sub get_common_filename($$); -sub read_diff($); -sub diff(); -sub system_no_output($@); -sub read_config($); -sub apply_config($); -sub info(@); -sub create_temp_dir(); -sub transform_pattern($); -sub warn_handler($); -sub die_handler($); -sub abort_handler($); -sub temp_cleanup(); -sub setup_gkv(); -sub get_overall_line($$$$); -sub print_overall_rate($$$$$$$$$); -sub lcov_geninfo(@); -sub create_package($$$;$); -sub get_func_found_and_hit($); -sub br_ivec_get($$); -sub summary(); -sub rate($$;$$$); - -# Global variables & initialization -our @directory; # Specifies where to get coverage data from -our @kernel_directory; # If set, captures only from specified kernel subdirs -our @add_tracefile; # If set, reads in and combines all files in list -our $list; # If set, list contents of tracefile -our $extract; # If set, extracts parts of tracefile -our $remove; # If set, removes parts of tracefile -our $diff; # If set, modifies tracefile according to diff -our $reset; # If set, reset all coverage data to zero -our $capture; # If set, capture data -our $output_filename; # Name for file to write coverage data to -our $test_name = ""; # Test case name -our $quiet = ""; # If set, suppress information messages -our $help; # Help option flag -our $version; # Version option flag -our $convert_filenames; # If set, convert filenames when applying diff -our $strip; # If set, strip leading directories when applying diff -our $temp_dir_name; # Name of temporary directory -our $cwd = `pwd`; # Current working directory -our $to_file; # If set, indicates that output is written to a file -our $follow; # If set, indicates that find shall follow links -our $diff_path = ""; # Path removed from tracefile when applying diff -our $base_directory; # Base directory (cwd of gcc during compilation) -our $checksum; # If set, calculate a checksum for each line -our $no_checksum; # If set, don't calculate a checksum for each line -our $compat_libtool; # If set, indicates that libtool mode is to be enabled -our $no_compat_libtool; # If set, indicates that libtool mode is to be disabled -our $gcov_tool; -our @opt_ignore_errors; -our $initial; -our $no_recursion = 0; -our $to_package; -our $from_package; -our $maxdepth; -our $no_markers; -our $config; # Configuration file contents -chomp($cwd); -our $tool_dir = dirname($0); # Directory where genhtml tool is installed -our @temp_dirs; -our $gcov_gkv; # gcov kernel support version found on machine -our $opt_derive_func_data; -our $opt_debug; -our $opt_list_full_path; -our $opt_no_list_full_path; -our $opt_list_width = 80; -our $opt_list_truncate_max = 20; -our $opt_external; -our $opt_no_external; -our $opt_config_file; -our %opt_rc; -our @opt_summary; -our $opt_compat; -our $ln_overall_found; -our $ln_overall_hit; -our $fn_overall_found; -our $fn_overall_hit; -our $br_overall_found; -our $br_overall_hit; -our $func_coverage = 1; -our $br_coverage = 0; - - -# -# Code entry point -# - -$SIG{__WARN__} = \&warn_handler; -$SIG{__DIE__} = \&die_handler; -$SIG{'INT'} = \&abort_handler; -$SIG{'QUIT'} = \&abort_handler; - -# Prettify version string -$lcov_version =~ s/\$\s*Revision\s*:?\s*(\S+)\s*\$/$1/; - -# Add current working directory if $tool_dir is not already an absolute path -if (! ($tool_dir =~ /^\/(.*)$/)) -{ - $tool_dir = "$cwd/$tool_dir"; -} - -# Check command line for a configuration file name -Getopt::Long::Configure("pass_through", "no_auto_abbrev"); -GetOptions("config-file=s" => \$opt_config_file, - "rc=s%" => \%opt_rc); -Getopt::Long::Configure("default"); - -# Read configuration file if available -if (defined($opt_config_file)) { - $config = read_config($opt_config_file); -} elsif (defined($ENV{"HOME"}) && (-r $ENV{"HOME"}."/.lcovrc")) -{ - $config = read_config($ENV{"HOME"}."/.lcovrc"); -} -elsif (-r "/etc/lcovrc") -{ - $config = read_config("/etc/lcovrc"); -} - -if ($config || %opt_rc) -{ - # Copy configuration file and --rc values to variables - apply_config({ - "lcov_gcov_dir" => \$gcov_dir, - "lcov_tmp_dir" => \$tmp_dir, - "lcov_list_full_path" => \$opt_list_full_path, - "lcov_list_width" => \$opt_list_width, - "lcov_list_truncate_max"=> \$opt_list_truncate_max, - "lcov_branch_coverage" => \$br_coverage, - "lcov_function_coverage"=> \$func_coverage, - }); -} - -# Parse command line options -if (!GetOptions("directory|d|di=s" => \@directory, - "add-tracefile|a=s" => \@add_tracefile, - "list|l=s" => \$list, - "kernel-directory|k=s" => \@kernel_directory, - "extract|e=s" => \$extract, - "remove|r=s" => \$remove, - "diff=s" => \$diff, - "convert-filenames" => \$convert_filenames, - "strip=i" => \$strip, - "capture|c" => \$capture, - "output-file|o=s" => \$output_filename, - "test-name|t=s" => \$test_name, - "zerocounters|z" => \$reset, - "quiet|q" => \$quiet, - "help|h|?" => \$help, - "version|v" => \$version, - "follow|f" => \$follow, - "path=s" => \$diff_path, - "base-directory|b=s" => \$base_directory, - "checksum" => \$checksum, - "no-checksum" => \$no_checksum, - "compat-libtool" => \$compat_libtool, - "no-compat-libtool" => \$no_compat_libtool, - "gcov-tool=s" => \$gcov_tool, - "ignore-errors=s" => \@opt_ignore_errors, - "initial|i" => \$initial, - "no-recursion" => \$no_recursion, - "to-package=s" => \$to_package, - "from-package=s" => \$from_package, - "no-markers" => \$no_markers, - "derive-func-data" => \$opt_derive_func_data, - "debug" => \$opt_debug, - "list-full-path" => \$opt_list_full_path, - "no-list-full-path" => \$opt_no_list_full_path, - "external" => \$opt_external, - "no-external" => \$opt_no_external, - "summary=s" => \@opt_summary, - "compat=s" => \$opt_compat, - "config-file=s" => \$opt_config_file, - "rc=s%" => \%opt_rc, - )) -{ - print(STDERR "Use $tool_name --help to get usage information\n"); - exit(1); -} -else -{ - # Merge options - if (defined($no_checksum)) - { - $checksum = ($no_checksum ? 0 : 1); - $no_checksum = undef; - } - - if (defined($no_compat_libtool)) - { - $compat_libtool = ($no_compat_libtool ? 0 : 1); - $no_compat_libtool = undef; - } - - if (defined($opt_no_list_full_path)) - { - $opt_list_full_path = ($opt_no_list_full_path ? 0 : 1); - $opt_no_list_full_path = undef; - } - - if (defined($opt_no_external)) { - $opt_external = 0; - $opt_no_external = undef; - } -} - -# Check for help option -if ($help) -{ - print_usage(*STDOUT); - exit(0); -} - -# Check for version option -if ($version) -{ - print("$tool_name: $lcov_version\n"); - exit(0); -} - -# Check list width option -if ($opt_list_width <= 40) { - die("ERROR: lcov_list_width parameter out of range (needs to be ". - "larger than 40)\n"); -} - -# Normalize --path text -$diff_path =~ s/\/$//; - -if ($follow) -{ - $follow = "-follow"; -} -else -{ - $follow = ""; -} - -if ($no_recursion) -{ - $maxdepth = "-maxdepth 1"; -} -else -{ - $maxdepth = ""; -} - -# Check for valid options -check_options(); - -# Only --extract, --remove and --diff allow unnamed parameters -if (@ARGV && !($extract || $remove || $diff || @opt_summary)) -{ - die("Extra parameter found: '".join(" ", @ARGV)."'\n". - "Use $tool_name --help to get usage information\n"); -} - -# Check for output filename -$to_file = ($output_filename && ($output_filename ne "-")); - -if ($capture) -{ - if (!$to_file) - { - # Option that tells geninfo to write to stdout - $output_filename = "-"; - } -} - -# Determine kernel directory for gcov data -if (!$from_package && !@directory && ($capture || $reset)) { - ($gcov_gkv, $gcov_dir) = setup_gkv(); -} - -# Check for requested functionality -if ($reset) -{ - # Differentiate between user space and kernel reset - if (@directory) - { - userspace_reset(); - } - else - { - kernel_reset(); - } -} -elsif ($capture) -{ - # Capture source can be user space, kernel or package - if ($from_package) { - package_capture(); - } elsif (@directory) { - userspace_capture(); - } else { - if ($initial) { - if (defined($to_package)) { - die("ERROR: --initial cannot be used together ". - "with --to-package\n"); - } - kernel_capture_initial(); - } else { - kernel_capture(); - } - } -} -elsif (@add_tracefile) -{ - ($ln_overall_found, $ln_overall_hit, - $fn_overall_found, $fn_overall_hit, - $br_overall_found, $br_overall_hit) = add_traces(); -} -elsif ($remove) -{ - ($ln_overall_found, $ln_overall_hit, - $fn_overall_found, $fn_overall_hit, - $br_overall_found, $br_overall_hit) = remove(); -} -elsif ($extract) -{ - ($ln_overall_found, $ln_overall_hit, - $fn_overall_found, $fn_overall_hit, - $br_overall_found, $br_overall_hit) = extract(); -} -elsif ($list) -{ - list(); -} -elsif ($diff) -{ - if (scalar(@ARGV) != 1) - { - die("ERROR: option --diff requires one additional argument!\n". - "Use $tool_name --help to get usage information\n"); - } - ($ln_overall_found, $ln_overall_hit, - $fn_overall_found, $fn_overall_hit, - $br_overall_found, $br_overall_hit) = diff(); -} -elsif (@opt_summary) -{ - ($ln_overall_found, $ln_overall_hit, - $fn_overall_found, $fn_overall_hit, - $br_overall_found, $br_overall_hit) = summary(); -} - -temp_cleanup(); - -if (defined($ln_overall_found)) { - print_overall_rate(1, $ln_overall_found, $ln_overall_hit, - 1, $fn_overall_found, $fn_overall_hit, - 1, $br_overall_found, $br_overall_hit); -} else { - info("Done.\n") if (!$list && !$capture); -} -exit(0); - -# -# print_usage(handle) -# -# Print usage information. -# - -sub print_usage(*) -{ - local *HANDLE = $_[0]; - - print(HANDLE < 1) - { - die("ERROR: only one of -z, -c, -a, -e, -r, -l, ". - "--diff or --summary allowed!\n". - "Use $tool_name --help to get usage information\n"); - } -} - - -# -# userspace_reset() -# -# Reset coverage data found in DIRECTORY by deleting all contained .da files. -# -# Die on error. -# - -sub userspace_reset() -{ - my $current_dir; - my @file_list; - - foreach $current_dir (@directory) - { - info("Deleting all .da files in $current_dir". - ($no_recursion?"\n":" and subdirectories\n")); - @file_list = `find "$current_dir" $maxdepth $follow -name \\*\\.da -o -name \\*\\.gcda -type f 2>/dev/null`; - chomp(@file_list); - foreach (@file_list) - { - unlink($_) or die("ERROR: cannot remove file $_!\n"); - } - } -} - - -# -# userspace_capture() -# -# Capture coverage data found in DIRECTORY and write it to a package (if -# TO_PACKAGE specified) or to OUTPUT_FILENAME or STDOUT. -# -# Die on error. -# - -sub userspace_capture() -{ - my $dir; - my $build; - - if (!defined($to_package)) { - lcov_geninfo(@directory); - return; - } - if (scalar(@directory) != 1) { - die("ERROR: -d may be specified only once with --to-package\n"); - } - $dir = $directory[0]; - if (defined($base_directory)) { - $build = $base_directory; - } else { - $build = $dir; - } - create_package($to_package, $dir, $build); -} - - -# -# kernel_reset() -# -# Reset kernel coverage. -# -# Die on error. -# - -sub kernel_reset() -{ - local *HANDLE; - my $reset_file; - - info("Resetting kernel execution counters\n"); - if (-e "$gcov_dir/vmlinux") { - $reset_file = "$gcov_dir/vmlinux"; - } elsif (-e "$gcov_dir/reset") { - $reset_file = "$gcov_dir/reset"; - } else { - die("ERROR: no reset control found in $gcov_dir\n"); - } - open(HANDLE, ">", $reset_file) or - die("ERROR: cannot write to $reset_file!\n"); - print(HANDLE "0"); - close(HANDLE); -} - - -# -# lcov_copy_single(from, to) -# -# Copy single regular file FROM to TO without checking its size. This is -# required to work with special files generated by the kernel -# seq_file-interface. -# -# -sub lcov_copy_single($$) -{ - my ($from, $to) = @_; - my $content; - local $/; - local *HANDLE; - - open(HANDLE, "<", $from) or die("ERROR: cannot read $from: $!\n"); - $content = ; - close(HANDLE); - open(HANDLE, ">", $to) or die("ERROR: cannot write $from: $!\n"); - if (defined($content)) { - print(HANDLE $content); - } - close(HANDLE); -} - -# -# lcov_find(dir, function, data[, extension, ...)]) -# -# Search DIR for files and directories whose name matches PATTERN and run -# FUNCTION for each match. If not pattern is specified, match all names. -# -# FUNCTION has the following prototype: -# function(dir, relative_name, data) -# -# Where: -# dir: the base directory for this search -# relative_name: the name relative to the base directory of this entry -# data: the DATA variable passed to lcov_find -# -sub lcov_find($$$;@) -{ - my ($dir, $fn, $data, @pattern) = @_; - my $result; - my $_fn = sub { - my $filename = $File::Find::name; - - if (defined($result)) { - return; - } - $filename = abs2rel($filename, $dir); - foreach (@pattern) { - if ($filename =~ /$_/) { - goto ok; - } - } - return; - ok: - $result = &$fn($dir, $filename, $data); - }; - if (scalar(@pattern) == 0) { - @pattern = ".*"; - } - find( { wanted => $_fn, no_chdir => 1 }, $dir); - - return $result; -} - -# -# lcov_copy_fn(from, rel, to) -# -# Copy directories, files and links from/rel to to/rel. -# - -sub lcov_copy_fn($$$) -{ - my ($from, $rel, $to) = @_; - my $absfrom = canonpath(catfile($from, $rel)); - my $absto = canonpath(catfile($to, $rel)); - - if (-d) { - if (! -d $absto) { - mkpath($absto) or - die("ERROR: cannot create directory $absto\n"); - chmod(0700, $absto); - } - } elsif (-l) { - # Copy symbolic link - my $link = readlink($absfrom); - - if (!defined($link)) { - die("ERROR: cannot read link $absfrom: $!\n"); - } - symlink($link, $absto) or - die("ERROR: cannot create link $absto: $!\n"); - } else { - lcov_copy_single($absfrom, $absto); - chmod(0600, $absto); - } - return undef; -} - -# -# lcov_copy(from, to, subdirs) -# -# Copy all specified SUBDIRS and files from directory FROM to directory TO. For -# regular files, copy file contents without checking its size. This is required -# to work with seq_file-generated files. -# - -sub lcov_copy($$;@) -{ - my ($from, $to, @subdirs) = @_; - my @pattern; - - foreach (@subdirs) { - push(@pattern, "^$_"); - } - lcov_find($from, \&lcov_copy_fn, $to, @pattern); -} - -# -# lcov_geninfo(directory) -# -# Call geninfo for the specified directory and with the parameters specified -# at the command line. -# - -sub lcov_geninfo(@) -{ - my (@dir) = @_; - my @param; - - # Capture data - info("Capturing coverage data from ".join(" ", @dir)."\n"); - @param = ("$tool_dir/geninfo", @dir); - if ($output_filename) - { - @param = (@param, "--output-filename", $output_filename); - } - if ($test_name) - { - @param = (@param, "--test-name", $test_name); - } - if ($follow) - { - @param = (@param, "--follow"); - } - if ($quiet) - { - @param = (@param, "--quiet"); - } - if (defined($checksum)) - { - if ($checksum) - { - @param = (@param, "--checksum"); - } - else - { - @param = (@param, "--no-checksum"); - } - } - if ($base_directory) - { - @param = (@param, "--base-directory", $base_directory); - } - if ($no_compat_libtool) - { - @param = (@param, "--no-compat-libtool"); - } - elsif ($compat_libtool) - { - @param = (@param, "--compat-libtool"); - } - if ($gcov_tool) - { - @param = (@param, "--gcov-tool", $gcov_tool); - } - foreach (@opt_ignore_errors) { - @param = (@param, "--ignore-errors", $_); - } - if ($no_recursion) { - @param = (@param, "--no-recursion"); - } - if ($initial) - { - @param = (@param, "--initial"); - } - if ($no_markers) - { - @param = (@param, "--no-markers"); - } - if ($opt_derive_func_data) - { - @param = (@param, "--derive-func-data"); - } - if ($opt_debug) - { - @param = (@param, "--debug"); - } - if (defined($opt_external) && $opt_external) - { - @param = (@param, "--external"); - } - if (defined($opt_external) && !$opt_external) - { - @param = (@param, "--no-external"); - } - if (defined($opt_compat)) { - @param = (@param, "--compat", $opt_compat); - } - if (%opt_rc) { - foreach my $key (keys(%opt_rc)) { - @param = (@param, "--rc", "$key=".$opt_rc{$key}); - } - } - - system(@param) and exit($? >> 8); -} - -# -# read_file(filename) -# -# Return the contents of the file defined by filename. -# - -sub read_file($) -{ - my ($filename) = @_; - my $content; - local $\; - local *HANDLE; - - open(HANDLE, "<", $filename) || return undef; - $content = ; - close(HANDLE); - - return $content; -} - -# -# get_package(package_file) -# -# Unpack unprocessed coverage data files from package_file to a temporary -# directory and return directory name, build directory and gcov kernel version -# as found in package. -# - -sub get_package($) -{ - my ($file) = @_; - my $dir = create_temp_dir(); - my $gkv; - my $build; - my $cwd = getcwd(); - my $count; - local *HANDLE; - - info("Reading package $file:\n"); - info(" data directory .......: $dir\n"); - $file = abs_path($file); - chdir($dir); - open(HANDLE, "-|", "tar xvfz '$file' 2>/dev/null") - or die("ERROR: could not process package $file\n"); - while () { - if (/\.da$/ || /\.gcda$/) { - $count++; - } - } - close(HANDLE); - $build = read_file("$dir/$pkg_build_file"); - if (defined($build)) { - info(" build directory ......: $build\n"); - } - $gkv = read_file("$dir/$pkg_gkv_file"); - if (defined($gkv)) { - $gkv = int($gkv); - if ($gkv != $GKV_PROC && $gkv != $GKV_SYS) { - die("ERROR: unsupported gcov kernel version found ". - "($gkv)\n"); - } - info(" content type .........: kernel data\n"); - info(" gcov kernel version ..: %s\n", $GKV_NAME[$gkv]); - } else { - info(" content type .........: application data\n"); - } - info(" data files ...........: $count\n"); - chdir($cwd); - - return ($dir, $build, $gkv); -} - -# -# write_file(filename, $content) -# -# Create a file named filename and write the specified content to it. -# - -sub write_file($$) -{ - my ($filename, $content) = @_; - local *HANDLE; - - open(HANDLE, ">", $filename) || return 0; - print(HANDLE $content); - close(HANDLE) || return 0; - - return 1; -} - -# count_package_data(filename) -# -# Count the number of coverage data files in the specified package file. -# - -sub count_package_data($) -{ - my ($filename) = @_; - local *HANDLE; - my $count = 0; - - open(HANDLE, "-|", "tar tfz '$filename'") or return undef; - while () { - if (/\.da$/ || /\.gcda$/) { - $count++; - } - } - close(HANDLE); - return $count; -} - -# -# create_package(package_file, source_directory, build_directory[, -# kernel_gcov_version]) -# -# Store unprocessed coverage data files from source_directory to package_file. -# - -sub create_package($$$;$) -{ - my ($file, $dir, $build, $gkv) = @_; - my $cwd = getcwd(); - - # Print information about the package - info("Creating package $file:\n"); - info(" data directory .......: $dir\n"); - - # Handle build directory - if (defined($build)) { - info(" build directory ......: $build\n"); - write_file("$dir/$pkg_build_file", $build) - or die("ERROR: could not write to ". - "$dir/$pkg_build_file\n"); - } - - # Handle gcov kernel version data - if (defined($gkv)) { - info(" content type .........: kernel data\n"); - info(" gcov kernel version ..: %s\n", $GKV_NAME[$gkv]); - write_file("$dir/$pkg_gkv_file", $gkv) - or die("ERROR: could not write to ". - "$dir/$pkg_gkv_file\n"); - } else { - info(" content type .........: application data\n"); - } - - # Create package - $file = abs_path($file); - chdir($dir); - system("tar cfz $file .") - and die("ERROR: could not create package $file\n"); - - # Remove temporary files - unlink("$dir/$pkg_build_file"); - unlink("$dir/$pkg_gkv_file"); - - # Show number of data files - if (!$quiet) { - my $count = count_package_data($file); - - if (defined($count)) { - info(" data files ...........: $count\n"); - } - } - chdir($cwd); -} - -sub find_link_fn($$$) -{ - my ($from, $rel, $filename) = @_; - my $absfile = catfile($from, $rel, $filename); - - if (-l $absfile) { - return $absfile; - } - return undef; -} - -# -# get_base(dir) -# -# Return (BASE, OBJ), where -# - BASE: is the path to the kernel base directory relative to dir -# - OBJ: is the absolute path to the kernel build directory -# - -sub get_base($) -{ - my ($dir) = @_; - my $marker = "kernel/gcov/base.gcno"; - my $markerfile; - my $sys; - my $obj; - my $link; - - $markerfile = lcov_find($dir, \&find_link_fn, $marker); - if (!defined($markerfile)) { - return (undef, undef); - } - - # sys base is parent of parent of markerfile. - $sys = abs2rel(dirname(dirname(dirname($markerfile))), $dir); - - # obj base is parent of parent of markerfile link target. - $link = readlink($markerfile); - if (!defined($link)) { - die("ERROR: could not read $markerfile\n"); - } - $obj = dirname(dirname(dirname($link))); - - return ($sys, $obj); -} - -# -# apply_base_dir(data_dir, base_dir, build_dir, @directories) -# -# Make entries in @directories relative to data_dir. -# - -sub apply_base_dir($$$@) -{ - my ($data, $base, $build, @dirs) = @_; - my $dir; - my @result; - - foreach $dir (@dirs) { - # Is directory path relative to data directory? - if (-d catdir($data, $dir)) { - push(@result, $dir); - next; - } - # Relative to the auto-detected base-directory? - if (defined($base)) { - if (-d catdir($data, $base, $dir)) { - push(@result, catdir($base, $dir)); - next; - } - } - # Relative to the specified base-directory? - if (defined($base_directory)) { - if (file_name_is_absolute($base_directory)) { - $base = abs2rel($base_directory, rootdir()); - } else { - $base = $base_directory; - } - if (-d catdir($data, $base, $dir)) { - push(@result, catdir($base, $dir)); - next; - } - } - # Relative to the build directory? - if (defined($build)) { - if (file_name_is_absolute($build)) { - $base = abs2rel($build, rootdir()); - } else { - $base = $build; - } - if (-d catdir($data, $base, $dir)) { - push(@result, catdir($base, $dir)); - next; - } - } - die("ERROR: subdirectory $dir not found\n". - "Please use -b to specify the correct directory\n"); - } - return @result; -} - -# -# copy_gcov_dir(dir, [@subdirectories]) -# -# Create a temporary directory and copy all or, if specified, only some -# subdirectories from dir to that directory. Return the name of the temporary -# directory. -# - -sub copy_gcov_dir($;@) -{ - my ($data, @dirs) = @_; - my $tempdir = create_temp_dir(); - - info("Copying data to temporary directory $tempdir\n"); - lcov_copy($data, $tempdir, @dirs); - - return $tempdir; -} - -# -# kernel_capture_initial -# -# Capture initial kernel coverage data, i.e. create a coverage data file from -# static graph files which contains zero coverage data for all instrumented -# lines. -# - -sub kernel_capture_initial() -{ - my $build; - my $source; - my @params; - - if (defined($base_directory)) { - $build = $base_directory; - $source = "specified"; - } else { - (undef, $build) = get_base($gcov_dir); - if (!defined($build)) { - die("ERROR: could not auto-detect build directory.\n". - "Please use -b to specify the build directory\n"); - } - $source = "auto-detected"; - } - info("Using $build as kernel build directory ($source)\n"); - # Build directory needs to be passed to geninfo - $base_directory = $build; - if (@kernel_directory) { - foreach my $dir (@kernel_directory) { - push(@params, "$build/$dir"); - } - } else { - push(@params, $build); - } - lcov_geninfo(@params); -} - -# -# kernel_capture_from_dir(directory, gcov_kernel_version, build) -# -# Perform the actual kernel coverage capturing from the specified directory -# assuming that the data was copied from the specified gcov kernel version. -# - -sub kernel_capture_from_dir($$$) -{ - my ($dir, $gkv, $build) = @_; - - # Create package or coverage file - if (defined($to_package)) { - create_package($to_package, $dir, $build, $gkv); - } else { - # Build directory needs to be passed to geninfo - $base_directory = $build; - lcov_geninfo($dir); - } -} - -# -# adjust_kernel_dir(dir, build) -# -# Adjust directories specified with -k so that they point to the directory -# relative to DIR. Return the build directory if specified or the auto- -# detected build-directory. -# - -sub adjust_kernel_dir($$) -{ - my ($dir, $build) = @_; - my ($sys_base, $build_auto) = get_base($dir); - - if (!defined($build)) { - $build = $build_auto; - } - if (!defined($build)) { - die("ERROR: could not auto-detect build directory.\n". - "Please use -b to specify the build directory\n"); - } - # Make @kernel_directory relative to sysfs base - if (@kernel_directory) { - @kernel_directory = apply_base_dir($dir, $sys_base, $build, - @kernel_directory); - } - return $build; -} - -sub kernel_capture() -{ - my $data_dir; - my $build = $base_directory; - - if ($gcov_gkv == $GKV_SYS) { - $build = adjust_kernel_dir($gcov_dir, $build); - } - $data_dir = copy_gcov_dir($gcov_dir, @kernel_directory); - kernel_capture_from_dir($data_dir, $gcov_gkv, $build); -} - -# -# package_capture() -# -# Capture coverage data from a package of unprocessed coverage data files -# as generated by lcov --to-package. -# - -sub package_capture() -{ - my $dir; - my $build; - my $gkv; - - ($dir, $build, $gkv) = get_package($from_package); - - # Check for build directory - if (defined($base_directory)) { - if (defined($build)) { - info("Using build directory specified by -b.\n"); - } - $build = $base_directory; - } - - # Do the actual capture - if (defined($gkv)) { - if ($gkv == $GKV_SYS) { - $build = adjust_kernel_dir($dir, $build); - } - if (@kernel_directory) { - $dir = copy_gcov_dir($dir, @kernel_directory); - } - kernel_capture_from_dir($dir, $gkv, $build); - } else { - # Build directory needs to be passed to geninfo - $base_directory = $build; - lcov_geninfo($dir); - } -} - - -# -# info(printf_parameter) -# -# Use printf to write PRINTF_PARAMETER to stdout only when the $quiet flag -# is not set. -# - -sub info(@) -{ - if (!$quiet) - { - # Print info string - if ($to_file) - { - printf(@_) - } - else - { - # Don't interfere with the .info output to STDOUT - printf(STDERR @_); - } - } -} - - -# -# create_temp_dir() -# -# Create a temporary directory and return its path. -# -# Die on error. -# - -sub create_temp_dir() -{ - my $dir; - - if (defined($tmp_dir)) { - $dir = tempdir(DIR => $tmp_dir, CLEANUP => 1); - } else { - $dir = tempdir(CLEANUP => 1); - } - if (!defined($dir)) { - die("ERROR: cannot create temporary directory\n"); - } - push(@temp_dirs, $dir); - - return $dir; -} - - -# -# br_taken_to_num(taken) -# -# Convert a branch taken value .info format to number format. -# - -sub br_taken_to_num($) -{ - my ($taken) = @_; - - return 0 if ($taken eq '-'); - return $taken + 1; -} - - -# -# br_num_to_taken(taken) -# -# Convert a branch taken value in number format to .info format. -# - -sub br_num_to_taken($) -{ - my ($taken) = @_; - - return '-' if ($taken == 0); - return $taken - 1; -} - - -# -# br_taken_add(taken1, taken2) -# -# Return the result of taken1 + taken2 for 'branch taken' values. -# - -sub br_taken_add($$) -{ - my ($t1, $t2) = @_; - - return $t1 if (!defined($t2)); - return $t2 if (!defined($t1)); - return $t1 if ($t2 eq '-'); - return $t2 if ($t1 eq '-'); - return $t1 + $t2; -} - - -# -# br_taken_sub(taken1, taken2) -# -# Return the result of taken1 - taken2 for 'branch taken' values. Return 0 -# if the result would become negative. -# - -sub br_taken_sub($$) -{ - my ($t1, $t2) = @_; - - return $t1 if (!defined($t2)); - return undef if (!defined($t1)); - return $t1 if ($t1 eq '-'); - return $t1 if ($t2 eq '-'); - return 0 if $t2 > $t1; - return $t1 - $t2; -} - - -# -# -# br_ivec_len(vector) -# -# Return the number of entries in the branch coverage vector. -# - -sub br_ivec_len($) -{ - my ($vec) = @_; - - return 0 if (!defined($vec)); - return (length($vec) * 8 / $BR_VEC_WIDTH) / $BR_VEC_ENTRIES; -} - - -# -# br_ivec_push(vector, block, branch, taken) -# -# Add an entry to the branch coverage vector. If an entry with the same -# branch ID already exists, add the corresponding taken values. -# - -sub br_ivec_push($$$$) -{ - my ($vec, $block, $branch, $taken) = @_; - my $offset; - my $num = br_ivec_len($vec); - my $i; - - $vec = "" if (!defined($vec)); - - # Check if branch already exists in vector - for ($i = 0; $i < $num; $i++) { - my ($v_block, $v_branch, $v_taken) = br_ivec_get($vec, $i); - - next if ($v_block != $block || $v_branch != $branch); - - # Add taken counts - $taken = br_taken_add($taken, $v_taken); - last; - } - - $offset = $i * $BR_VEC_ENTRIES; - $taken = br_taken_to_num($taken); - - # Add to vector - vec($vec, $offset + $BR_BLOCK, $BR_VEC_WIDTH) = $block; - vec($vec, $offset + $BR_BRANCH, $BR_VEC_WIDTH) = $branch; - vec($vec, $offset + $BR_TAKEN, $BR_VEC_WIDTH) = $taken; - - return $vec; -} - - -# -# br_ivec_get(vector, number) -# -# Return an entry from the branch coverage vector. -# - -sub br_ivec_get($$) -{ - my ($vec, $num) = @_; - my $block; - my $branch; - my $taken; - my $offset = $num * $BR_VEC_ENTRIES; - - # Retrieve data from vector - $block = vec($vec, $offset + $BR_BLOCK, $BR_VEC_WIDTH); - $branch = vec($vec, $offset + $BR_BRANCH, $BR_VEC_WIDTH); - $taken = vec($vec, $offset + $BR_TAKEN, $BR_VEC_WIDTH); - - # Decode taken value from an integer - $taken = br_num_to_taken($taken); - - return ($block, $branch, $taken); -} - - -# -# get_br_found_and_hit(brcount) -# -# Return (br_found, br_hit) for brcount -# - -sub get_br_found_and_hit($) -{ - my ($brcount) = @_; - my $line; - my $br_found = 0; - my $br_hit = 0; - - foreach $line (keys(%{$brcount})) { - my $brdata = $brcount->{$line}; - my $i; - my $num = br_ivec_len($brdata); - - for ($i = 0; $i < $num; $i++) { - my $taken; - - (undef, undef, $taken) = br_ivec_get($brdata, $i); - - $br_found++; - $br_hit++ if ($taken ne "-" && $taken > 0); - } - } - - return ($br_found, $br_hit); -} - - -# -# read_info_file(info_filename) -# -# Read in the contents of the .info file specified by INFO_FILENAME. Data will -# be returned as a reference to a hash containing the following mappings: -# -# %result: for each filename found in file -> \%data -# -# %data: "test" -> \%testdata -# "sum" -> \%sumcount -# "func" -> \%funcdata -# "found" -> $lines_found (number of instrumented lines found in file) -# "hit" -> $lines_hit (number of executed lines in file) -# "check" -> \%checkdata -# "testfnc" -> \%testfncdata -# "sumfnc" -> \%sumfnccount -# "testbr" -> \%testbrdata -# "sumbr" -> \%sumbrcount -# -# %testdata : name of test affecting this file -> \%testcount -# %testfncdata: name of test affecting this file -> \%testfnccount -# %testbrdata: name of test affecting this file -> \%testbrcount -# -# %testcount : line number -> execution count for a single test -# %testfnccount: function name -> execution count for a single test -# %testbrcount : line number -> branch coverage data for a single test -# %sumcount : line number -> execution count for all tests -# %sumfnccount : function name -> execution count for all tests -# %sumbrcount : line number -> branch coverage data for all tests -# %funcdata : function name -> line number -# %checkdata : line number -> checksum of source code line -# $brdata : vector of items: block, branch, taken -# -# Note that .info file sections referring to the same file and test name -# will automatically be combined by adding all execution counts. -# -# Note that if INFO_FILENAME ends with ".gz", it is assumed that the file -# is compressed using GZIP. If available, GUNZIP will be used to decompress -# this file. -# -# Die on error. -# - -sub read_info_file($) -{ - my $tracefile = $_[0]; # Name of tracefile - my %result; # Resulting hash: file -> data - my $data; # Data handle for current entry - my $testdata; # " " - my $testcount; # " " - my $sumcount; # " " - my $funcdata; # " " - my $checkdata; # " " - my $testfncdata; - my $testfnccount; - my $sumfnccount; - my $testbrdata; - my $testbrcount; - my $sumbrcount; - my $line; # Current line read from .info file - my $testname; # Current test name - my $filename; # Current filename - my $hitcount; # Count for lines hit - my $count; # Execution count of current line - my $negative; # If set, warn about negative counts - my $changed_testname; # If set, warn about changed testname - my $line_checksum; # Checksum of current line - local *INFO_HANDLE; # Filehandle for .info file - - info("Reading tracefile $tracefile\n"); - - # Check if file exists and is readable - stat($_[0]); - if (!(-r _)) - { - die("ERROR: cannot read file $_[0]!\n"); - } - - # Check if this is really a plain file - if (!(-f _)) - { - die("ERROR: not a plain file: $_[0]!\n"); - } - - # Check for .gz extension - if ($_[0] =~ /\.gz$/) - { - # Check for availability of GZIP tool - system_no_output(1, "gunzip" ,"-h") - and die("ERROR: gunzip command not available!\n"); - - # Check integrity of compressed file - system_no_output(1, "gunzip", "-t", $_[0]) - and die("ERROR: integrity check failed for ". - "compressed file $_[0]!\n"); - - # Open compressed file - open(INFO_HANDLE, "-|", "gunzip -c '$_[0]'") - or die("ERROR: cannot start gunzip to decompress ". - "file $_[0]!\n"); - } - else - { - # Open decompressed file - open(INFO_HANDLE, "<", $_[0]) - or die("ERROR: cannot read file $_[0]!\n"); - } - - $testname = ""; - while () - { - chomp($_); - $line = $_; - - # Switch statement - foreach ($line) - { - /^TN:([^,]*)(,diff)?/ && do - { - # Test name information found - $testname = defined($1) ? $1 : ""; - if ($testname =~ s/\W/_/g) - { - $changed_testname = 1; - } - $testname .= $2 if (defined($2)); - last; - }; - - /^[SK]F:(.*)/ && do - { - # Filename information found - # Retrieve data for new entry - $filename = $1; - - $data = $result{$filename}; - ($testdata, $sumcount, $funcdata, $checkdata, - $testfncdata, $sumfnccount, $testbrdata, - $sumbrcount) = - get_info_entry($data); - - if (defined($testname)) - { - $testcount = $testdata->{$testname}; - $testfnccount = $testfncdata->{$testname}; - $testbrcount = $testbrdata->{$testname}; - } - else - { - $testcount = {}; - $testfnccount = {}; - $testbrcount = {}; - } - last; - }; - - /^DA:(\d+),(-?\d+)(,[^,\s]+)?/ && do - { - # Fix negative counts - $count = $2 < 0 ? 0 : $2; - if ($2 < 0) - { - $negative = 1; - } - # Execution count found, add to structure - # Add summary counts - $sumcount->{$1} += $count; - - # Add test-specific counts - if (defined($testname)) - { - $testcount->{$1} += $count; - } - - # Store line checksum if available - if (defined($3)) - { - $line_checksum = substr($3, 1); - - # Does it match a previous definition - if (defined($checkdata->{$1}) && - ($checkdata->{$1} ne - $line_checksum)) - { - die("ERROR: checksum mismatch ". - "at $filename:$1\n"); - } - - $checkdata->{$1} = $line_checksum; - } - last; - }; - - /^FN:(\d+),([^,]+)/ && do - { - last if (!$func_coverage); - - # Function data found, add to structure - $funcdata->{$2} = $1; - - # Also initialize function call data - if (!defined($sumfnccount->{$2})) { - $sumfnccount->{$2} = 0; - } - if (defined($testname)) - { - if (!defined($testfnccount->{$2})) { - $testfnccount->{$2} = 0; - } - } - last; - }; - - /^FNDA:(\d+),([^,]+)/ && do - { - last if (!$func_coverage); - - # Function call count found, add to structure - # Add summary counts - $sumfnccount->{$2} += $1; - - # Add test-specific counts - if (defined($testname)) - { - $testfnccount->{$2} += $1; - } - last; - }; - - /^BRDA:(\d+),(\d+),(\d+),(\d+|-)/ && do { - # Branch coverage data found - my ($line, $block, $branch, $taken) = - ($1, $2, $3, $4); - - last if (!$br_coverage); - $sumbrcount->{$line} = - br_ivec_push($sumbrcount->{$line}, - $block, $branch, $taken); - - # Add test-specific counts - if (defined($testname)) { - $testbrcount->{$line} = - br_ivec_push( - $testbrcount->{$line}, - $block, $branch, - $taken); - } - last; - }; - - /^end_of_record/ && do - { - # Found end of section marker - if ($filename) - { - # Store current section data - if (defined($testname)) - { - $testdata->{$testname} = - $testcount; - $testfncdata->{$testname} = - $testfnccount; - $testbrdata->{$testname} = - $testbrcount; - } - - set_info_entry($data, $testdata, - $sumcount, $funcdata, - $checkdata, $testfncdata, - $sumfnccount, - $testbrdata, - $sumbrcount); - $result{$filename} = $data; - last; - } - }; - - # default - last; - } - } - close(INFO_HANDLE); - - # Calculate hit and found values for lines and functions of each file - foreach $filename (keys(%result)) - { - $data = $result{$filename}; - - ($testdata, $sumcount, undef, undef, $testfncdata, - $sumfnccount, $testbrdata, $sumbrcount) = - get_info_entry($data); - - # Filter out empty files - if (scalar(keys(%{$sumcount})) == 0) - { - delete($result{$filename}); - next; - } - # Filter out empty test cases - foreach $testname (keys(%{$testdata})) - { - if (!defined($testdata->{$testname}) || - scalar(keys(%{$testdata->{$testname}})) == 0) - { - delete($testdata->{$testname}); - delete($testfncdata->{$testname}); - } - } - - $data->{"found"} = scalar(keys(%{$sumcount})); - $hitcount = 0; - - foreach (keys(%{$sumcount})) - { - if ($sumcount->{$_} > 0) { $hitcount++; } - } - - $data->{"hit"} = $hitcount; - - # Get found/hit values for function call data - $data->{"f_found"} = scalar(keys(%{$sumfnccount})); - $hitcount = 0; - - foreach (keys(%{$sumfnccount})) { - if ($sumfnccount->{$_} > 0) { - $hitcount++; - } - } - $data->{"f_hit"} = $hitcount; - - # Get found/hit values for branch data - { - my ($br_found, $br_hit) = get_br_found_and_hit($sumbrcount); - - $data->{"b_found"} = $br_found; - $data->{"b_hit"} = $br_hit; - } - } - - if (scalar(keys(%result)) == 0) - { - die("ERROR: no valid records found in tracefile $tracefile\n"); - } - if ($negative) - { - warn("WARNING: negative counts found in tracefile ". - "$tracefile\n"); - } - if ($changed_testname) - { - warn("WARNING: invalid characters removed from testname in ". - "tracefile $tracefile\n"); - } - - return(\%result); -} - - -# -# get_info_entry(hash_ref) -# -# Retrieve data from an entry of the structure generated by read_info_file(). -# Return a list of references to hashes: -# (test data hash ref, sum count hash ref, funcdata hash ref, checkdata hash -# ref, testfncdata hash ref, sumfnccount hash ref, testbrdata hash ref, -# sumbrcount hash ref, lines found, lines hit, functions found, -# functions hit, branches found, branches hit) -# - -sub get_info_entry($) -{ - my $testdata_ref = $_[0]->{"test"}; - my $sumcount_ref = $_[0]->{"sum"}; - my $funcdata_ref = $_[0]->{"func"}; - my $checkdata_ref = $_[0]->{"check"}; - my $testfncdata = $_[0]->{"testfnc"}; - my $sumfnccount = $_[0]->{"sumfnc"}; - my $testbrdata = $_[0]->{"testbr"}; - my $sumbrcount = $_[0]->{"sumbr"}; - my $lines_found = $_[0]->{"found"}; - my $lines_hit = $_[0]->{"hit"}; - my $f_found = $_[0]->{"f_found"}; - my $f_hit = $_[0]->{"f_hit"}; - my $br_found = $_[0]->{"b_found"}; - my $br_hit = $_[0]->{"b_hit"}; - - return ($testdata_ref, $sumcount_ref, $funcdata_ref, $checkdata_ref, - $testfncdata, $sumfnccount, $testbrdata, $sumbrcount, - $lines_found, $lines_hit, $f_found, $f_hit, - $br_found, $br_hit); -} - - -# -# set_info_entry(hash_ref, testdata_ref, sumcount_ref, funcdata_ref, -# checkdata_ref, testfncdata_ref, sumfcncount_ref, -# testbrdata_ref, sumbrcount_ref[,lines_found, -# lines_hit, f_found, f_hit, $b_found, $b_hit]) -# -# Update the hash referenced by HASH_REF with the provided data references. -# - -sub set_info_entry($$$$$$$$$;$$$$$$) -{ - my $data_ref = $_[0]; - - $data_ref->{"test"} = $_[1]; - $data_ref->{"sum"} = $_[2]; - $data_ref->{"func"} = $_[3]; - $data_ref->{"check"} = $_[4]; - $data_ref->{"testfnc"} = $_[5]; - $data_ref->{"sumfnc"} = $_[6]; - $data_ref->{"testbr"} = $_[7]; - $data_ref->{"sumbr"} = $_[8]; - - if (defined($_[9])) { $data_ref->{"found"} = $_[9]; } - if (defined($_[10])) { $data_ref->{"hit"} = $_[10]; } - if (defined($_[11])) { $data_ref->{"f_found"} = $_[11]; } - if (defined($_[12])) { $data_ref->{"f_hit"} = $_[12]; } - if (defined($_[13])) { $data_ref->{"b_found"} = $_[13]; } - if (defined($_[14])) { $data_ref->{"b_hit"} = $_[14]; } -} - - -# -# add_counts(data1_ref, data2_ref) -# -# DATA1_REF and DATA2_REF are references to hashes containing a mapping -# -# line number -> execution count -# -# Return a list (RESULT_REF, LINES_FOUND, LINES_HIT) where RESULT_REF -# is a reference to a hash containing the combined mapping in which -# execution counts are added. -# - -sub add_counts($$) -{ - my %data1 = %{$_[0]}; # Hash 1 - my %data2 = %{$_[1]}; # Hash 2 - my %result; # Resulting hash - my $line; # Current line iteration scalar - my $data1_count; # Count of line in hash1 - my $data2_count; # Count of line in hash2 - my $found = 0; # Total number of lines found - my $hit = 0; # Number of lines with a count > 0 - - foreach $line (keys(%data1)) - { - $data1_count = $data1{$line}; - $data2_count = $data2{$line}; - - # Add counts if present in both hashes - if (defined($data2_count)) { $data1_count += $data2_count; } - - # Store sum in %result - $result{$line} = $data1_count; - - $found++; - if ($data1_count > 0) { $hit++; } - } - - # Add lines unique to data2 - foreach $line (keys(%data2)) - { - # Skip lines already in data1 - if (defined($data1{$line})) { next; } - - # Copy count from data2 - $result{$line} = $data2{$line}; - - $found++; - if ($result{$line} > 0) { $hit++; } - } - - return (\%result, $found, $hit); -} - - -# -# merge_checksums(ref1, ref2, filename) -# -# REF1 and REF2 are references to hashes containing a mapping -# -# line number -> checksum -# -# Merge checksum lists defined in REF1 and REF2 and return reference to -# resulting hash. Die if a checksum for a line is defined in both hashes -# but does not match. -# - -sub merge_checksums($$$) -{ - my $ref1 = $_[0]; - my $ref2 = $_[1]; - my $filename = $_[2]; - my %result; - my $line; - - foreach $line (keys(%{$ref1})) - { - if (defined($ref2->{$line}) && - ($ref1->{$line} ne $ref2->{$line})) - { - die("ERROR: checksum mismatch at $filename:$line\n"); - } - $result{$line} = $ref1->{$line}; - } - - foreach $line (keys(%{$ref2})) - { - $result{$line} = $ref2->{$line}; - } - - return \%result; -} - - -# -# merge_func_data(funcdata1, funcdata2, filename) -# - -sub merge_func_data($$$) -{ - my ($funcdata1, $funcdata2, $filename) = @_; - my %result; - my $func; - - if (defined($funcdata1)) { - %result = %{$funcdata1}; - } - - foreach $func (keys(%{$funcdata2})) { - my $line1 = $result{$func}; - my $line2 = $funcdata2->{$func}; - - if (defined($line1) && ($line1 != $line2)) { - warn("WARNING: function data mismatch at ". - "$filename:$line2\n"); - next; - } - $result{$func} = $line2; - } - - return \%result; -} - - -# -# add_fnccount(fnccount1, fnccount2) -# -# Add function call count data. Return list (fnccount_added, f_found, f_hit) -# - -sub add_fnccount($$) -{ - my ($fnccount1, $fnccount2) = @_; - my %result; - my $f_found; - my $f_hit; - my $function; - - if (defined($fnccount1)) { - %result = %{$fnccount1}; - } - foreach $function (keys(%{$fnccount2})) { - $result{$function} += $fnccount2->{$function}; - } - $f_found = scalar(keys(%result)); - $f_hit = 0; - foreach $function (keys(%result)) { - if ($result{$function} > 0) { - $f_hit++; - } - } - - return (\%result, $f_found, $f_hit); -} - -# -# add_testfncdata(testfncdata1, testfncdata2) -# -# Add function call count data for several tests. Return reference to -# added_testfncdata. -# - -sub add_testfncdata($$) -{ - my ($testfncdata1, $testfncdata2) = @_; - my %result; - my $testname; - - foreach $testname (keys(%{$testfncdata1})) { - if (defined($testfncdata2->{$testname})) { - my $fnccount; - - # Function call count data for this testname exists - # in both data sets: merge - ($fnccount) = add_fnccount( - $testfncdata1->{$testname}, - $testfncdata2->{$testname}); - $result{$testname} = $fnccount; - next; - } - # Function call count data for this testname is unique to - # data set 1: copy - $result{$testname} = $testfncdata1->{$testname}; - } - - # Add count data for testnames unique to data set 2 - foreach $testname (keys(%{$testfncdata2})) { - if (!defined($result{$testname})) { - $result{$testname} = $testfncdata2->{$testname}; - } - } - return \%result; -} - - -# -# brcount_to_db(brcount) -# -# Convert brcount data to the following format: -# -# db: line number -> block hash -# block hash: block number -> branch hash -# branch hash: branch number -> taken value -# - -sub brcount_to_db($) -{ - my ($brcount) = @_; - my $line; - my $db; - - # Add branches from first count to database - foreach $line (keys(%{$brcount})) { - my $brdata = $brcount->{$line}; - my $i; - my $num = br_ivec_len($brdata); - - for ($i = 0; $i < $num; $i++) { - my ($block, $branch, $taken) = br_ivec_get($brdata, $i); - - $db->{$line}->{$block}->{$branch} = $taken; - } - } - - return $db; -} - - -# -# db_to_brcount(db) -# -# Convert branch coverage data back to brcount format. -# - -sub db_to_brcount($) -{ - my ($db) = @_; - my $line; - my $brcount = {}; - my $br_found = 0; - my $br_hit = 0; - - # Convert database back to brcount format - foreach $line (sort({$a <=> $b} keys(%{$db}))) { - my $ldata = $db->{$line}; - my $brdata; - my $block; - - foreach $block (sort({$a <=> $b} keys(%{$ldata}))) { - my $bdata = $ldata->{$block}; - my $branch; - - foreach $branch (sort({$a <=> $b} keys(%{$bdata}))) { - my $taken = $bdata->{$branch}; - - $br_found++; - $br_hit++ if ($taken ne "-" && $taken > 0); - $brdata = br_ivec_push($brdata, $block, - $branch, $taken); - } - } - $brcount->{$line} = $brdata; - } - - return ($brcount, $br_found, $br_hit); -} - - -# combine_brcount(brcount1, brcount2, type) -# -# If add is BR_ADD, add branch coverage data and return list (brcount_added, -# br_found, br_hit). If add is BR_SUB, subtract the taken values of brcount2 -# from brcount1 and return (brcount_sub, br_found, br_hit). -# - -sub combine_brcount($$$) -{ - my ($brcount1, $brcount2, $type) = @_; - my $line; - my $block; - my $branch; - my $taken; - my $db; - my $br_found = 0; - my $br_hit = 0; - my $result; - - # Convert branches from first count to database - $db = brcount_to_db($brcount1); - # Combine values from database and second count - foreach $line (keys(%{$brcount2})) { - my $brdata = $brcount2->{$line}; - my $num = br_ivec_len($brdata); - my $i; - - for ($i = 0; $i < $num; $i++) { - ($block, $branch, $taken) = br_ivec_get($brdata, $i); - my $new_taken = $db->{$line}->{$block}->{$branch}; - - if ($type == $BR_ADD) { - $new_taken = br_taken_add($new_taken, $taken); - } elsif ($type == $BR_SUB) { - $new_taken = br_taken_sub($new_taken, $taken); - } - $db->{$line}->{$block}->{$branch} = $new_taken - if (defined($new_taken)); - } - } - # Convert database back to brcount format - ($result, $br_found, $br_hit) = db_to_brcount($db); - - return ($result, $br_found, $br_hit); -} - - -# -# add_testbrdata(testbrdata1, testbrdata2) -# -# Add branch coverage data for several tests. Return reference to -# added_testbrdata. -# - -sub add_testbrdata($$) -{ - my ($testbrdata1, $testbrdata2) = @_; - my %result; - my $testname; - - foreach $testname (keys(%{$testbrdata1})) { - if (defined($testbrdata2->{$testname})) { - my $brcount; - - # Branch coverage data for this testname exists - # in both data sets: add - ($brcount) = combine_brcount( - $testbrdata1->{$testname}, - $testbrdata2->{$testname}, $BR_ADD); - $result{$testname} = $brcount; - next; - } - # Branch coverage data for this testname is unique to - # data set 1: copy - $result{$testname} = $testbrdata1->{$testname}; - } - - # Add count data for testnames unique to data set 2 - foreach $testname (keys(%{$testbrdata2})) { - if (!defined($result{$testname})) { - $result{$testname} = $testbrdata2->{$testname}; - } - } - return \%result; -} - - -# -# combine_info_entries(entry_ref1, entry_ref2, filename) -# -# Combine .info data entry hashes referenced by ENTRY_REF1 and ENTRY_REF2. -# Return reference to resulting hash. -# - -sub combine_info_entries($$$) -{ - my $entry1 = $_[0]; # Reference to hash containing first entry - my $testdata1; - my $sumcount1; - my $funcdata1; - my $checkdata1; - my $testfncdata1; - my $sumfnccount1; - my $testbrdata1; - my $sumbrcount1; - - my $entry2 = $_[1]; # Reference to hash containing second entry - my $testdata2; - my $sumcount2; - my $funcdata2; - my $checkdata2; - my $testfncdata2; - my $sumfnccount2; - my $testbrdata2; - my $sumbrcount2; - - my %result; # Hash containing combined entry - my %result_testdata; - my $result_sumcount = {}; - my $result_funcdata; - my $result_testfncdata; - my $result_sumfnccount; - my $result_testbrdata; - my $result_sumbrcount; - my $lines_found; - my $lines_hit; - my $f_found; - my $f_hit; - my $br_found; - my $br_hit; - - my $testname; - my $filename = $_[2]; - - # Retrieve data - ($testdata1, $sumcount1, $funcdata1, $checkdata1, $testfncdata1, - $sumfnccount1, $testbrdata1, $sumbrcount1) = get_info_entry($entry1); - ($testdata2, $sumcount2, $funcdata2, $checkdata2, $testfncdata2, - $sumfnccount2, $testbrdata2, $sumbrcount2) = get_info_entry($entry2); - - # Merge checksums - $checkdata1 = merge_checksums($checkdata1, $checkdata2, $filename); - - # Combine funcdata - $result_funcdata = merge_func_data($funcdata1, $funcdata2, $filename); - - # Combine function call count data - $result_testfncdata = add_testfncdata($testfncdata1, $testfncdata2); - ($result_sumfnccount, $f_found, $f_hit) = - add_fnccount($sumfnccount1, $sumfnccount2); - - # Combine branch coverage data - $result_testbrdata = add_testbrdata($testbrdata1, $testbrdata2); - ($result_sumbrcount, $br_found, $br_hit) = - combine_brcount($sumbrcount1, $sumbrcount2, $BR_ADD); - - # Combine testdata - foreach $testname (keys(%{$testdata1})) - { - if (defined($testdata2->{$testname})) - { - # testname is present in both entries, requires - # combination - ($result_testdata{$testname}) = - add_counts($testdata1->{$testname}, - $testdata2->{$testname}); - } - else - { - # testname only present in entry1, add to result - $result_testdata{$testname} = $testdata1->{$testname}; - } - - # update sum count hash - ($result_sumcount, $lines_found, $lines_hit) = - add_counts($result_sumcount, - $result_testdata{$testname}); - } - - foreach $testname (keys(%{$testdata2})) - { - # Skip testnames already covered by previous iteration - if (defined($testdata1->{$testname})) { next; } - - # testname only present in entry2, add to result hash - $result_testdata{$testname} = $testdata2->{$testname}; - - # update sum count hash - ($result_sumcount, $lines_found, $lines_hit) = - add_counts($result_sumcount, - $result_testdata{$testname}); - } - - # Calculate resulting sumcount - - # Store result - set_info_entry(\%result, \%result_testdata, $result_sumcount, - $result_funcdata, $checkdata1, $result_testfncdata, - $result_sumfnccount, $result_testbrdata, - $result_sumbrcount, $lines_found, $lines_hit, - $f_found, $f_hit, $br_found, $br_hit); - - return(\%result); -} - - -# -# combine_info_files(info_ref1, info_ref2) -# -# Combine .info data in hashes referenced by INFO_REF1 and INFO_REF2. Return -# reference to resulting hash. -# - -sub combine_info_files($$) -{ - my %hash1 = %{$_[0]}; - my %hash2 = %{$_[1]}; - my $filename; - - foreach $filename (keys(%hash2)) - { - if ($hash1{$filename}) - { - # Entry already exists in hash1, combine them - $hash1{$filename} = - combine_info_entries($hash1{$filename}, - $hash2{$filename}, - $filename); - } - else - { - # Entry is unique in both hashes, simply add to - # resulting hash - $hash1{$filename} = $hash2{$filename}; - } - } - - return(\%hash1); -} - - -# -# add_traces() -# - -sub add_traces() -{ - my $total_trace; - my $current_trace; - my $tracefile; - my @result; - local *INFO_HANDLE; - - info("Combining tracefiles.\n"); - - foreach $tracefile (@add_tracefile) - { - $current_trace = read_info_file($tracefile); - if ($total_trace) - { - $total_trace = combine_info_files($total_trace, - $current_trace); - } - else - { - $total_trace = $current_trace; - } - } - - # Write combined data - if ($to_file) - { - info("Writing data to $output_filename\n"); - open(INFO_HANDLE, ">", $output_filename) - or die("ERROR: cannot write to $output_filename!\n"); - @result = write_info_file(*INFO_HANDLE, $total_trace); - close(*INFO_HANDLE); - } - else - { - @result = write_info_file(*STDOUT, $total_trace); - } - - return @result; -} - - -# -# write_info_file(filehandle, data) -# - -sub write_info_file(*$) -{ - local *INFO_HANDLE = $_[0]; - my %data = %{$_[1]}; - my $source_file; - my $entry; - my $testdata; - my $sumcount; - my $funcdata; - my $checkdata; - my $testfncdata; - my $sumfnccount; - my $testbrdata; - my $sumbrcount; - my $testname; - my $line; - my $func; - my $testcount; - my $testfnccount; - my $testbrcount; - my $found; - my $hit; - my $f_found; - my $f_hit; - my $br_found; - my $br_hit; - my $ln_total_found = 0; - my $ln_total_hit = 0; - my $fn_total_found = 0; - my $fn_total_hit = 0; - my $br_total_found = 0; - my $br_total_hit = 0; - - foreach $source_file (sort(keys(%data))) - { - $entry = $data{$source_file}; - ($testdata, $sumcount, $funcdata, $checkdata, $testfncdata, - $sumfnccount, $testbrdata, $sumbrcount, $found, $hit, - $f_found, $f_hit, $br_found, $br_hit) = - get_info_entry($entry); - - # Add to totals - $ln_total_found += $found; - $ln_total_hit += $hit; - $fn_total_found += $f_found; - $fn_total_hit += $f_hit; - $br_total_found += $br_found; - $br_total_hit += $br_hit; - - foreach $testname (sort(keys(%{$testdata}))) - { - $testcount = $testdata->{$testname}; - $testfnccount = $testfncdata->{$testname}; - $testbrcount = $testbrdata->{$testname}; - $found = 0; - $hit = 0; - - print(INFO_HANDLE "TN:$testname\n"); - print(INFO_HANDLE "SF:$source_file\n"); - - # Write function related data - foreach $func ( - sort({$funcdata->{$a} <=> $funcdata->{$b}} - keys(%{$funcdata}))) - { - print(INFO_HANDLE "FN:".$funcdata->{$func}. - ",$func\n"); - } - foreach $func (keys(%{$testfnccount})) { - print(INFO_HANDLE "FNDA:". - $testfnccount->{$func}. - ",$func\n"); - } - ($f_found, $f_hit) = - get_func_found_and_hit($testfnccount); - print(INFO_HANDLE "FNF:$f_found\n"); - print(INFO_HANDLE "FNH:$f_hit\n"); - - # Write branch related data - $br_found = 0; - $br_hit = 0; - foreach $line (sort({$a <=> $b} - keys(%{$testbrcount}))) { - my $brdata = $testbrcount->{$line}; - my $num = br_ivec_len($brdata); - my $i; - - for ($i = 0; $i < $num; $i++) { - my ($block, $branch, $taken) = - br_ivec_get($brdata, $i); - - print(INFO_HANDLE "BRDA:$line,$block,". - "$branch,$taken\n"); - $br_found++; - $br_hit++ if ($taken ne '-' && - $taken > 0); - } - } - if ($br_found > 0) { - print(INFO_HANDLE "BRF:$br_found\n"); - print(INFO_HANDLE "BRH:$br_hit\n"); - } - - # Write line related data - foreach $line (sort({$a <=> $b} keys(%{$testcount}))) - { - print(INFO_HANDLE "DA:$line,". - $testcount->{$line}. - (defined($checkdata->{$line}) && - $checksum ? - ",".$checkdata->{$line} : "")."\n"); - $found++; - if ($testcount->{$line} > 0) - { - $hit++; - } - - } - print(INFO_HANDLE "LF:$found\n"); - print(INFO_HANDLE "LH:$hit\n"); - print(INFO_HANDLE "end_of_record\n"); - } - } - - return ($ln_total_found, $ln_total_hit, $fn_total_found, $fn_total_hit, - $br_total_found, $br_total_hit); -} - - -# -# transform_pattern(pattern) -# -# Transform shell wildcard expression to equivalent Perl regular expression. -# Return transformed pattern. -# - -sub transform_pattern($) -{ - my $pattern = $_[0]; - - # Escape special chars - - $pattern =~ s/\\/\\\\/g; - $pattern =~ s/\//\\\//g; - $pattern =~ s/\^/\\\^/g; - $pattern =~ s/\$/\\\$/g; - $pattern =~ s/\(/\\\(/g; - $pattern =~ s/\)/\\\)/g; - $pattern =~ s/\[/\\\[/g; - $pattern =~ s/\]/\\\]/g; - $pattern =~ s/\{/\\\{/g; - $pattern =~ s/\}/\\\}/g; - $pattern =~ s/\./\\\./g; - $pattern =~ s/\,/\\\,/g; - $pattern =~ s/\|/\\\|/g; - $pattern =~ s/\+/\\\+/g; - $pattern =~ s/\!/\\\!/g; - - # Transform ? => (.) and * => (.*) - - $pattern =~ s/\*/\(\.\*\)/g; - $pattern =~ s/\?/\(\.\)/g; - - return $pattern; -} - - -# -# extract() -# - -sub extract() -{ - my $data = read_info_file($extract); - my $filename; - my $keep; - my $pattern; - my @pattern_list; - my $extracted = 0; - my @result; - local *INFO_HANDLE; - - # Need perlreg expressions instead of shell pattern - @pattern_list = map({ transform_pattern($_); } @ARGV); - - # Filter out files which do not match any pattern - foreach $filename (sort(keys(%{$data}))) - { - $keep = 0; - - foreach $pattern (@pattern_list) - { - $keep ||= ($filename =~ (/^$pattern$/)); - } - - - if (!$keep) - { - delete($data->{$filename}); - } - else - { - info("Extracting $filename\n"), - $extracted++; - } - } - - # Write extracted data - if ($to_file) - { - info("Extracted $extracted files\n"); - info("Writing data to $output_filename\n"); - open(INFO_HANDLE, ">", $output_filename) - or die("ERROR: cannot write to $output_filename!\n"); - @result = write_info_file(*INFO_HANDLE, $data); - close(*INFO_HANDLE); - } - else - { - @result = write_info_file(*STDOUT, $data); - } - - return @result; -} - - -# -# remove() -# - -sub remove() -{ - my $data = read_info_file($remove); - my $filename; - my $match_found; - my $pattern; - my @pattern_list; - my $removed = 0; - my @result; - local *INFO_HANDLE; - - # Need perlreg expressions instead of shell pattern - @pattern_list = map({ transform_pattern($_); } @ARGV); - - # Filter out files that match the pattern - foreach $filename (sort(keys(%{$data}))) - { - $match_found = 0; - - foreach $pattern (@pattern_list) - { - $match_found ||= ($filename =~ (/$pattern$/)); - } - - - if ($match_found) - { - delete($data->{$filename}); - info("Removing $filename\n"), - $removed++; - } - } - - # Write data - if ($to_file) - { - info("Deleted $removed files\n"); - info("Writing data to $output_filename\n"); - open(INFO_HANDLE, ">", $output_filename) - or die("ERROR: cannot write to $output_filename!\n"); - @result = write_info_file(*INFO_HANDLE, $data); - close(*INFO_HANDLE); - } - else - { - @result = write_info_file(*STDOUT, $data); - } - - return @result; -} - - -# get_prefix(max_width, max_percentage_too_long, path_list) -# -# Return a path prefix that satisfies the following requirements: -# - is shared by more paths in path_list than any other prefix -# - the percentage of paths which would exceed the given max_width length -# after applying the prefix does not exceed max_percentage_too_long -# -# If multiple prefixes satisfy all requirements, the longest prefix is -# returned. Return an empty string if no prefix could be found. - -sub get_prefix($$@) -{ - my ($max_width, $max_long, @path_list) = @_; - my $path; - my $ENTRY_NUM = 0; - my $ENTRY_LONG = 1; - my %prefix; - - # Build prefix hash - foreach $path (@path_list) { - my ($v, $d, $f) = splitpath($path); - my @dirs = splitdir($d); - my $p_len = length($path); - my $i; - - # Remove trailing '/' - pop(@dirs) if ($dirs[scalar(@dirs) - 1] eq ''); - for ($i = 0; $i < scalar(@dirs); $i++) { - my $subpath = catpath($v, catdir(@dirs[0..$i]), ''); - my $entry = $prefix{$subpath}; - - $entry = [ 0, 0 ] if (!defined($entry)); - $entry->[$ENTRY_NUM]++; - if (($p_len - length($subpath) - 1) > $max_width) { - $entry->[$ENTRY_LONG]++; - } - $prefix{$subpath} = $entry; - } - } - # Find suitable prefix (sort descending by two keys: 1. number of - # entries covered by a prefix, 2. length of prefix) - foreach $path (sort {($prefix{$a}->[$ENTRY_NUM] == - $prefix{$b}->[$ENTRY_NUM]) ? - length($b) <=> length($a) : - $prefix{$b}->[$ENTRY_NUM] <=> - $prefix{$a}->[$ENTRY_NUM]} - keys(%prefix)) { - my ($num, $long) = @{$prefix{$path}}; - - # Check for additional requirement: number of filenames - # that would be too long may not exceed a certain percentage - if ($long <= $num * $max_long / 100) { - return $path; - } - } - - return ""; -} - - -# -# shorten_filename(filename, width) -# -# Truncate filename if it is longer than width characters. -# - -sub shorten_filename($$) -{ - my ($filename, $width) = @_; - my $l = length($filename); - my $s; - my $e; - - return $filename if ($l <= $width); - $e = int(($width - 3) / 2); - $s = $width - 3 - $e; - - return substr($filename, 0, $s).'...'.substr($filename, $l - $e); -} - - -sub shorten_number($$) -{ - my ($number, $width) = @_; - my $result = sprintf("%*d", $width, $number); - - return $result if (length($result) <= $width); - $number = $number / 1000; - return $result if (length($result) <= $width); - $result = sprintf("%*dk", $width - 1, $number); - return $result if (length($result) <= $width); - $number = $number / 1000; - $result = sprintf("%*dM", $width - 1, $number); - return $result if (length($result) <= $width); - return '#'; -} - -sub shorten_rate($$$) -{ - my ($hit, $found, $width) = @_; - my $result = rate($hit, $found, "%", 1, $width); - - return $result if (length($result) <= $width); - $result = rate($hit, $found, "%", 0, $width); - return $result if (length($result) <= $width); - return "#"; -} - -# -# list() -# - -sub list() -{ - my $data = read_info_file($list); - my $filename; - my $found; - my $hit; - my $entry; - my $fn_found; - my $fn_hit; - my $br_found; - my $br_hit; - my $total_found = 0; - my $total_hit = 0; - my $fn_total_found = 0; - my $fn_total_hit = 0; - my $br_total_found = 0; - my $br_total_hit = 0; - my $prefix; - my $strlen = length("Filename"); - my $format; - my $heading1; - my $heading2; - my @footer; - my $barlen; - my $rate; - my $fnrate; - my $brrate; - my $lastpath; - my $F_LN_NUM = 0; - my $F_LN_RATE = 1; - my $F_FN_NUM = 2; - my $F_FN_RATE = 3; - my $F_BR_NUM = 4; - my $F_BR_RATE = 5; - my @fwidth_narrow = (5, 5, 3, 5, 4, 5); - my @fwidth_wide = (6, 5, 5, 5, 6, 5); - my @fwidth = @fwidth_wide; - my $w; - my $max_width = $opt_list_width; - my $max_long = $opt_list_truncate_max; - my $fwidth_narrow_length; - my $fwidth_wide_length; - my $got_prefix = 0; - my $root_prefix = 0; - - # Calculate total width of narrow fields - $fwidth_narrow_length = 0; - foreach $w (@fwidth_narrow) { - $fwidth_narrow_length += $w + 1; - } - # Calculate total width of wide fields - $fwidth_wide_length = 0; - foreach $w (@fwidth_wide) { - $fwidth_wide_length += $w + 1; - } - # Get common file path prefix - $prefix = get_prefix($max_width - $fwidth_narrow_length, $max_long, - keys(%{$data})); - $root_prefix = 1 if ($prefix eq rootdir()); - $got_prefix = 1 if (length($prefix) > 0); - $prefix =~ s/\/$//; - # Get longest filename length - foreach $filename (keys(%{$data})) { - if (!$opt_list_full_path) { - if (!$got_prefix || !$root_prefix && - !($filename =~ s/^\Q$prefix\/\E//)) { - my ($v, $d, $f) = splitpath($filename); - - $filename = $f; - } - } - # Determine maximum length of entries - if (length($filename) > $strlen) { - $strlen = length($filename) - } - } - if (!$opt_list_full_path) { - my $blanks; - - $w = $fwidth_wide_length; - # Check if all columns fit into max_width characters - if ($strlen + $fwidth_wide_length > $max_width) { - # Use narrow fields - @fwidth = @fwidth_narrow; - $w = $fwidth_narrow_length; - if (($strlen + $fwidth_narrow_length) > $max_width) { - # Truncate filenames at max width - $strlen = $max_width - $fwidth_narrow_length; - } - } - # Add some blanks between filename and fields if possible - $blanks = int($strlen * 0.5); - $blanks = 4 if ($blanks < 4); - $blanks = 8 if ($blanks > 8); - if (($strlen + $w + $blanks) < $max_width) { - $strlen += $blanks; - } else { - $strlen = $max_width - $w; - } - } - # Filename - $w = $strlen; - $format = "%-${w}s|"; - $heading1 = sprintf("%*s|", $w, ""); - $heading2 = sprintf("%-*s|", $w, "Filename"); - $barlen = $w + 1; - # Line coverage rate - $w = $fwidth[$F_LN_RATE]; - $format .= "%${w}s "; - $heading1 .= sprintf("%-*s |", $w + $fwidth[$F_LN_NUM], - "Lines"); - $heading2 .= sprintf("%-*s ", $w, "Rate"); - $barlen += $w + 1; - # Number of lines - $w = $fwidth[$F_LN_NUM]; - $format .= "%${w}s|"; - $heading2 .= sprintf("%*s|", $w, "Num"); - $barlen += $w + 1; - # Function coverage rate - $w = $fwidth[$F_FN_RATE]; - $format .= "%${w}s "; - $heading1 .= sprintf("%-*s|", $w + $fwidth[$F_FN_NUM] + 1, - "Functions"); - $heading2 .= sprintf("%-*s ", $w, "Rate"); - $barlen += $w + 1; - # Number of functions - $w = $fwidth[$F_FN_NUM]; - $format .= "%${w}s|"; - $heading2 .= sprintf("%*s|", $w, "Num"); - $barlen += $w + 1; - # Branch coverage rate - $w = $fwidth[$F_BR_RATE]; - $format .= "%${w}s "; - $heading1 .= sprintf("%-*s", $w + $fwidth[$F_BR_NUM] + 1, - "Branches"); - $heading2 .= sprintf("%-*s ", $w, "Rate"); - $barlen += $w + 1; - # Number of branches - $w = $fwidth[$F_BR_NUM]; - $format .= "%${w}s"; - $heading2 .= sprintf("%*s", $w, "Num"); - $barlen += $w; - # Line end - $format .= "\n"; - $heading1 .= "\n"; - $heading2 .= "\n"; - - # Print heading - print($heading1); - print($heading2); - print(("="x$barlen)."\n"); - - # Print per file information - foreach $filename (sort(keys(%{$data}))) - { - my @file_data; - my $print_filename = $filename; - - $entry = $data->{$filename}; - if (!$opt_list_full_path) { - my $p; - - $print_filename = $filename; - if (!$got_prefix || !$root_prefix && - !($print_filename =~ s/^\Q$prefix\/\E//)) { - my ($v, $d, $f) = splitpath($filename); - - $p = catpath($v, $d, ""); - $p =~ s/\/$//; - $print_filename = $f; - } else { - $p = $prefix; - } - - if (!defined($lastpath) || $lastpath ne $p) { - print("\n") if (defined($lastpath)); - $lastpath = $p; - print("[$lastpath/]\n") if (!$root_prefix); - } - $print_filename = shorten_filename($print_filename, - $strlen); - } - - (undef, undef, undef, undef, undef, undef, undef, undef, - $found, $hit, $fn_found, $fn_hit, $br_found, $br_hit) = - get_info_entry($entry); - - # Assume zero count if there is no function data for this file - if (!defined($fn_found) || !defined($fn_hit)) { - $fn_found = 0; - $fn_hit = 0; - } - # Assume zero count if there is no branch data for this file - if (!defined($br_found) || !defined($br_hit)) { - $br_found = 0; - $br_hit = 0; - } - - # Add line coverage totals - $total_found += $found; - $total_hit += $hit; - # Add function coverage totals - $fn_total_found += $fn_found; - $fn_total_hit += $fn_hit; - # Add branch coverage totals - $br_total_found += $br_found; - $br_total_hit += $br_hit; - - # Determine line coverage rate for this file - $rate = shorten_rate($hit, $found, $fwidth[$F_LN_RATE]); - # Determine function coverage rate for this file - $fnrate = shorten_rate($fn_hit, $fn_found, $fwidth[$F_FN_RATE]); - # Determine branch coverage rate for this file - $brrate = shorten_rate($br_hit, $br_found, $fwidth[$F_BR_RATE]); - - # Assemble line parameters - push(@file_data, $print_filename); - push(@file_data, $rate); - push(@file_data, shorten_number($found, $fwidth[$F_LN_NUM])); - push(@file_data, $fnrate); - push(@file_data, shorten_number($fn_found, $fwidth[$F_FN_NUM])); - push(@file_data, $brrate); - push(@file_data, shorten_number($br_found, $fwidth[$F_BR_NUM])); - - # Print assembled line - printf($format, @file_data); - } - - # Determine total line coverage rate - $rate = shorten_rate($total_hit, $total_found, $fwidth[$F_LN_RATE]); - # Determine total function coverage rate - $fnrate = shorten_rate($fn_total_hit, $fn_total_found, - $fwidth[$F_FN_RATE]); - # Determine total branch coverage rate - $brrate = shorten_rate($br_total_hit, $br_total_found, - $fwidth[$F_BR_RATE]); - - # Print separator - print(("="x$barlen)."\n"); - - # Assemble line parameters - push(@footer, sprintf("%*s", $strlen, "Total:")); - push(@footer, $rate); - push(@footer, shorten_number($total_found, $fwidth[$F_LN_NUM])); - push(@footer, $fnrate); - push(@footer, shorten_number($fn_total_found, $fwidth[$F_FN_NUM])); - push(@footer, $brrate); - push(@footer, shorten_number($br_total_found, $fwidth[$F_BR_NUM])); - - # Print assembled line - printf($format, @footer); -} - - -# -# get_common_filename(filename1, filename2) -# -# Check for filename components which are common to FILENAME1 and FILENAME2. -# Upon success, return -# -# (common, path1, path2) -# -# or 'undef' in case there are no such parts. -# - -sub get_common_filename($$) -{ - my @list1 = split("/", $_[0]); - my @list2 = split("/", $_[1]); - my @result; - - # Work in reverse order, i.e. beginning with the filename itself - while (@list1 && @list2 && ($list1[$#list1] eq $list2[$#list2])) - { - unshift(@result, pop(@list1)); - pop(@list2); - } - - # Did we find any similarities? - if (scalar(@result) > 0) - { - return (join("/", @result), join("/", @list1), - join("/", @list2)); - } - else - { - return undef; - } -} - - -# -# strip_directories($path, $depth) -# -# Remove DEPTH leading directory levels from PATH. -# - -sub strip_directories($$) -{ - my $filename = $_[0]; - my $depth = $_[1]; - my $i; - - if (!defined($depth) || ($depth < 1)) - { - return $filename; - } - for ($i = 0; $i < $depth; $i++) - { - $filename =~ s/^[^\/]*\/+(.*)$/$1/; - } - return $filename; -} - - -# -# read_diff(filename) -# -# Read diff output from FILENAME to memory. The diff file has to follow the -# format generated by 'diff -u'. Returns a list of hash references: -# -# (mapping, path mapping) -# -# mapping: filename -> reference to line hash -# line hash: line number in new file -> corresponding line number in old file -# -# path mapping: filename -> old filename -# -# Die in case of error. -# - -sub read_diff($) -{ - my $diff_file = $_[0]; # Name of diff file - my %diff; # Resulting mapping filename -> line hash - my %paths; # Resulting mapping old path -> new path - my $mapping; # Reference to current line hash - my $line; # Contents of current line - my $num_old; # Current line number in old file - my $num_new; # Current line number in new file - my $file_old; # Name of old file in diff section - my $file_new; # Name of new file in diff section - my $filename; # Name of common filename of diff section - my $in_block = 0; # Non-zero while we are inside a diff block - local *HANDLE; # File handle for reading the diff file - - info("Reading diff $diff_file\n"); - - # Check if file exists and is readable - stat($diff_file); - if (!(-r _)) - { - die("ERROR: cannot read file $diff_file!\n"); - } - - # Check if this is really a plain file - if (!(-f _)) - { - die("ERROR: not a plain file: $diff_file!\n"); - } - - # Check for .gz extension - if ($diff_file =~ /\.gz$/) - { - # Check for availability of GZIP tool - system_no_output(1, "gunzip", "-h") - and die("ERROR: gunzip command not available!\n"); - - # Check integrity of compressed file - system_no_output(1, "gunzip", "-t", $diff_file) - and die("ERROR: integrity check failed for ". - "compressed file $diff_file!\n"); - - # Open compressed file - open(HANDLE, "-|", "gunzip -c '$diff_file'") - or die("ERROR: cannot start gunzip to decompress ". - "file $_[0]!\n"); - } - else - { - # Open decompressed file - open(HANDLE, "<", $diff_file) - or die("ERROR: cannot read file $_[0]!\n"); - } - - # Parse diff file line by line - while () - { - chomp($_); - $line = $_; - - foreach ($line) - { - # Filename of old file: - # --- - /^--- (\S+)/ && do - { - $file_old = strip_directories($1, $strip); - last; - }; - # Filename of new file: - # +++ - /^\+\+\+ (\S+)/ && do - { - # Add last file to resulting hash - if ($filename) - { - my %new_hash; - $diff{$filename} = $mapping; - $mapping = \%new_hash; - } - $file_new = strip_directories($1, $strip); - $filename = $file_old; - $paths{$filename} = $file_new; - $num_old = 1; - $num_new = 1; - last; - }; - # Start of diff block: - # @@ -old_start,old_num, +new_start,new_num @@ - /^\@\@\s+-(\d+),(\d+)\s+\+(\d+),(\d+)\s+\@\@$/ && do - { - $in_block = 1; - while ($num_old < $1) - { - $mapping->{$num_new} = $num_old; - $num_old++; - $num_new++; - } - last; - }; - # Unchanged line - # - /^ / && do - { - if ($in_block == 0) - { - last; - } - $mapping->{$num_new} = $num_old; - $num_old++; - $num_new++; - last; - }; - # Line as seen in old file - # - /^-/ && do - { - if ($in_block == 0) - { - last; - } - $num_old++; - last; - }; - # Line as seen in new file - # - /^\+/ && do - { - if ($in_block == 0) - { - last; - } - $num_new++; - last; - }; - # Empty line - /^$/ && do - { - if ($in_block == 0) - { - last; - } - $mapping->{$num_new} = $num_old; - $num_old++; - $num_new++; - last; - }; - } - } - - close(HANDLE); - - # Add final diff file section to resulting hash - if ($filename) - { - $diff{$filename} = $mapping; - } - - if (!%diff) - { - die("ERROR: no valid diff data found in $diff_file!\n". - "Make sure to use 'diff -u' when generating the diff ". - "file.\n"); - } - return (\%diff, \%paths); -} - - -# -# apply_diff($count_data, $line_hash) -# -# Transform count data using a mapping of lines: -# -# $count_data: reference to hash: line number -> data -# $line_hash: reference to hash: line number new -> line number old -# -# Return a reference to transformed count data. -# - -sub apply_diff($$) -{ - my $count_data = $_[0]; # Reference to data hash: line -> hash - my $line_hash = $_[1]; # Reference to line hash: new line -> old line - my %result; # Resulting hash - my $last_new = 0; # Last new line number found in line hash - my $last_old = 0; # Last old line number found in line hash - - # Iterate all new line numbers found in the diff - foreach (sort({$a <=> $b} keys(%{$line_hash}))) - { - $last_new = $_; - $last_old = $line_hash->{$last_new}; - - # Is there data associated with the corresponding old line? - if (defined($count_data->{$line_hash->{$_}})) - { - # Copy data to new hash with a new line number - $result{$_} = $count_data->{$line_hash->{$_}}; - } - } - # Transform all other lines which come after the last diff entry - foreach (sort({$a <=> $b} keys(%{$count_data}))) - { - if ($_ <= $last_old) - { - # Skip lines which were covered by line hash - next; - } - # Copy data to new hash with an offset - $result{$_ + ($last_new - $last_old)} = $count_data->{$_}; - } - - return \%result; -} - - -# -# apply_diff_to_brcount(brcount, linedata) -# -# Adjust line numbers of branch coverage data according to linedata. -# - -sub apply_diff_to_brcount($$) -{ - my ($brcount, $linedata) = @_; - my $db; - - # Convert brcount to db format - $db = brcount_to_db($brcount); - # Apply diff to db format - $db = apply_diff($db, $linedata); - # Convert db format back to brcount format - ($brcount) = db_to_brcount($db); - - return $brcount; -} - - -# -# get_hash_max(hash_ref) -# -# Return the highest integer key from hash. -# - -sub get_hash_max($) -{ - my ($hash) = @_; - my $max; - - foreach (keys(%{$hash})) { - if (!defined($max)) { - $max = $_; - } elsif ($hash->{$_} > $max) { - $max = $_; - } - } - return $max; -} - -sub get_hash_reverse($) -{ - my ($hash) = @_; - my %result; - - foreach (keys(%{$hash})) { - $result{$hash->{$_}} = $_; - } - - return \%result; -} - -# -# apply_diff_to_funcdata(funcdata, line_hash) -# - -sub apply_diff_to_funcdata($$) -{ - my ($funcdata, $linedata) = @_; - my $last_new = get_hash_max($linedata); - my $last_old = $linedata->{$last_new}; - my $func; - my %result; - my $line_diff = get_hash_reverse($linedata); - - foreach $func (keys(%{$funcdata})) { - my $line = $funcdata->{$func}; - - if (defined($line_diff->{$line})) { - $result{$func} = $line_diff->{$line}; - } elsif ($line > $last_old) { - $result{$func} = $line + $last_new - $last_old; - } - } - - return \%result; -} - - -# -# get_line_hash($filename, $diff_data, $path_data) -# -# Find line hash in DIFF_DATA which matches FILENAME. On success, return list -# line hash. or undef in case of no match. Die if more than one line hashes in -# DIFF_DATA match. -# - -sub get_line_hash($$$) -{ - my $filename = $_[0]; - my $diff_data = $_[1]; - my $path_data = $_[2]; - my $conversion; - my $old_path; - my $new_path; - my $diff_name; - my $common; - my $old_depth; - my $new_depth; - - # Remove trailing slash from diff path - $diff_path =~ s/\/$//; - foreach (keys(%{$diff_data})) - { - my $sep = ""; - - $sep = '/' if (!/^\//); - - # Try to match diff filename with filename - if ($filename =~ /^\Q$diff_path$sep$_\E$/) - { - if ($diff_name) - { - # Two files match, choose the more specific one - # (the one with more path components) - $old_depth = ($diff_name =~ tr/\///); - $new_depth = (tr/\///); - if ($old_depth == $new_depth) - { - die("ERROR: diff file contains ". - "ambiguous entries for ". - "$filename\n"); - } - elsif ($new_depth > $old_depth) - { - $diff_name = $_; - } - } - else - { - $diff_name = $_; - } - }; - } - if ($diff_name) - { - # Get converted path - if ($filename =~ /^(.*)$diff_name$/) - { - ($common, $old_path, $new_path) = - get_common_filename($filename, - $1.$path_data->{$diff_name}); - } - return ($diff_data->{$diff_name}, $old_path, $new_path); - } - else - { - return undef; - } -} - - -# -# convert_paths(trace_data, path_conversion_data) -# -# Rename all paths in TRACE_DATA which show up in PATH_CONVERSION_DATA. -# - -sub convert_paths($$) -{ - my $trace_data = $_[0]; - my $path_conversion_data = $_[1]; - my $filename; - my $new_path; - - if (scalar(keys(%{$path_conversion_data})) == 0) - { - info("No path conversion data available.\n"); - return; - } - - # Expand path conversion list - foreach $filename (keys(%{$path_conversion_data})) - { - $new_path = $path_conversion_data->{$filename}; - while (($filename =~ s/^(.*)\/[^\/]+$/$1/) && - ($new_path =~ s/^(.*)\/[^\/]+$/$1/) && - ($filename ne $new_path)) - { - $path_conversion_data->{$filename} = $new_path; - } - } - - # Adjust paths - FILENAME: foreach $filename (keys(%{$trace_data})) - { - # Find a path in our conversion table that matches, starting - # with the longest path - foreach (sort({length($b) <=> length($a)} - keys(%{$path_conversion_data}))) - { - # Is this path a prefix of our filename? - if (!($filename =~ /^$_(.*)$/)) - { - next; - } - $new_path = $path_conversion_data->{$_}.$1; - - # Make sure not to overwrite an existing entry under - # that path name - if ($trace_data->{$new_path}) - { - # Need to combine entries - $trace_data->{$new_path} = - combine_info_entries( - $trace_data->{$filename}, - $trace_data->{$new_path}, - $filename); - } - else - { - # Simply rename entry - $trace_data->{$new_path} = - $trace_data->{$filename}; - } - delete($trace_data->{$filename}); - next FILENAME; - } - info("No conversion available for filename $filename\n"); - } -} - -# -# sub adjust_fncdata(funcdata, testfncdata, sumfnccount) -# -# Remove function call count data from testfncdata and sumfnccount which -# is no longer present in funcdata. -# - -sub adjust_fncdata($$$) -{ - my ($funcdata, $testfncdata, $sumfnccount) = @_; - my $testname; - my $func; - my $f_found; - my $f_hit; - - # Remove count data in testfncdata for functions which are no longer - # in funcdata - foreach $testname (%{$testfncdata}) { - my $fnccount = $testfncdata->{$testname}; - - foreach $func (%{$fnccount}) { - if (!defined($funcdata->{$func})) { - delete($fnccount->{$func}); - } - } - } - # Remove count data in sumfnccount for functions which are no longer - # in funcdata - foreach $func (%{$sumfnccount}) { - if (!defined($funcdata->{$func})) { - delete($sumfnccount->{$func}); - } - } -} - -# -# get_func_found_and_hit(sumfnccount) -# -# Return (f_found, f_hit) for sumfnccount -# - -sub get_func_found_and_hit($) -{ - my ($sumfnccount) = @_; - my $function; - my $f_found; - my $f_hit; - - $f_found = scalar(keys(%{$sumfnccount})); - $f_hit = 0; - foreach $function (keys(%{$sumfnccount})) { - if ($sumfnccount->{$function} > 0) { - $f_hit++; - } - } - return ($f_found, $f_hit); -} - -# -# diff() -# - -sub diff() -{ - my $trace_data = read_info_file($diff); - my $diff_data; - my $path_data; - my $old_path; - my $new_path; - my %path_conversion_data; - my $filename; - my $line_hash; - my $new_name; - my $entry; - my $testdata; - my $testname; - my $sumcount; - my $funcdata; - my $checkdata; - my $testfncdata; - my $sumfnccount; - my $testbrdata; - my $sumbrcount; - my $found; - my $hit; - my $f_found; - my $f_hit; - my $br_found; - my $br_hit; - my $converted = 0; - my $unchanged = 0; - my @result; - local *INFO_HANDLE; - - ($diff_data, $path_data) = read_diff($ARGV[0]); - - foreach $filename (sort(keys(%{$trace_data}))) - { - # Find a diff section corresponding to this file - ($line_hash, $old_path, $new_path) = - get_line_hash($filename, $diff_data, $path_data); - if (!$line_hash) - { - # There's no diff section for this file - $unchanged++; - next; - } - $converted++; - if ($old_path && $new_path && ($old_path ne $new_path)) - { - $path_conversion_data{$old_path} = $new_path; - } - # Check for deleted files - if (scalar(keys(%{$line_hash})) == 0) - { - info("Removing $filename\n"); - delete($trace_data->{$filename}); - next; - } - info("Converting $filename\n"); - $entry = $trace_data->{$filename}; - ($testdata, $sumcount, $funcdata, $checkdata, $testfncdata, - $sumfnccount, $testbrdata, $sumbrcount) = - get_info_entry($entry); - # Convert test data - foreach $testname (keys(%{$testdata})) - { - # Adjust line numbers of line coverage data - $testdata->{$testname} = - apply_diff($testdata->{$testname}, $line_hash); - # Adjust line numbers of branch coverage data - $testbrdata->{$testname} = - apply_diff_to_brcount($testbrdata->{$testname}, - $line_hash); - # Remove empty sets of test data - if (scalar(keys(%{$testdata->{$testname}})) == 0) - { - delete($testdata->{$testname}); - delete($testfncdata->{$testname}); - delete($testbrdata->{$testname}); - } - } - # Rename test data to indicate conversion - foreach $testname (keys(%{$testdata})) - { - # Skip testnames which already contain an extension - if ($testname =~ /,[^,]+$/) - { - next; - } - # Check for name conflict - if (defined($testdata->{$testname.",diff"})) - { - # Add counts - ($testdata->{$testname}) = add_counts( - $testdata->{$testname}, - $testdata->{$testname.",diff"}); - delete($testdata->{$testname.",diff"}); - # Add function call counts - ($testfncdata->{$testname}) = add_fnccount( - $testfncdata->{$testname}, - $testfncdata->{$testname.",diff"}); - delete($testfncdata->{$testname.",diff"}); - # Add branch counts - ($testbrdata->{$testname}) = combine_brcount( - $testbrdata->{$testname}, - $testbrdata->{$testname.",diff"}, - $BR_ADD); - delete($testbrdata->{$testname.",diff"}); - } - # Move test data to new testname - $testdata->{$testname.",diff"} = $testdata->{$testname}; - delete($testdata->{$testname}); - # Move function call count data to new testname - $testfncdata->{$testname.",diff"} = - $testfncdata->{$testname}; - delete($testfncdata->{$testname}); - # Move branch count data to new testname - $testbrdata->{$testname.",diff"} = - $testbrdata->{$testname}; - delete($testbrdata->{$testname}); - } - # Convert summary of test data - $sumcount = apply_diff($sumcount, $line_hash); - # Convert function data - $funcdata = apply_diff_to_funcdata($funcdata, $line_hash); - # Convert branch coverage data - $sumbrcount = apply_diff_to_brcount($sumbrcount, $line_hash); - # Update found/hit numbers - # Convert checksum data - $checkdata = apply_diff($checkdata, $line_hash); - # Convert function call count data - adjust_fncdata($funcdata, $testfncdata, $sumfnccount); - ($f_found, $f_hit) = get_func_found_and_hit($sumfnccount); - ($br_found, $br_hit) = get_br_found_and_hit($sumbrcount); - # Update found/hit numbers - $found = 0; - $hit = 0; - foreach (keys(%{$sumcount})) - { - $found++; - if ($sumcount->{$_} > 0) - { - $hit++; - } - } - if ($found > 0) - { - # Store converted entry - set_info_entry($entry, $testdata, $sumcount, $funcdata, - $checkdata, $testfncdata, $sumfnccount, - $testbrdata, $sumbrcount, $found, $hit, - $f_found, $f_hit, $br_found, $br_hit); - } - else - { - # Remove empty data set - delete($trace_data->{$filename}); - } - } - - # Convert filenames as well if requested - if ($convert_filenames) - { - convert_paths($trace_data, \%path_conversion_data); - } - - info("$converted entr".($converted != 1 ? "ies" : "y")." converted, ". - "$unchanged entr".($unchanged != 1 ? "ies" : "y")." left ". - "unchanged.\n"); - - # Write data - if ($to_file) - { - info("Writing data to $output_filename\n"); - open(INFO_HANDLE, ">", $output_filename) - or die("ERROR: cannot write to $output_filename!\n"); - @result = write_info_file(*INFO_HANDLE, $trace_data); - close(*INFO_HANDLE); - } - else - { - @result = write_info_file(*STDOUT, $trace_data); - } - - return @result; -} - -# -# summary() -# - -sub summary() -{ - my $filename; - my $current; - my $total; - my $ln_total_found; - my $ln_total_hit; - my $fn_total_found; - my $fn_total_hit; - my $br_total_found; - my $br_total_hit; - - # Read and combine trace files - foreach $filename (@opt_summary) { - $current = read_info_file($filename); - if (!defined($total)) { - $total = $current; - } else { - $total = combine_info_files($total, $current); - } - } - # Calculate coverage data - foreach $filename (keys(%{$total})) - { - my $entry = $total->{$filename}; - my $ln_found; - my $ln_hit; - my $fn_found; - my $fn_hit; - my $br_found; - my $br_hit; - - (undef, undef, undef, undef, undef, undef, undef, undef, - $ln_found, $ln_hit, $fn_found, $fn_hit, $br_found, - $br_hit) = get_info_entry($entry); - - # Add to totals - $ln_total_found += $ln_found; - $ln_total_hit += $ln_hit; - $fn_total_found += $fn_found; - $fn_total_hit += $fn_hit; - $br_total_found += $br_found; - $br_total_hit += $br_hit; - } - - - return ($ln_total_found, $ln_total_hit, $fn_total_found, $fn_total_hit, - $br_total_found, $br_total_hit); -} - -# -# system_no_output(mode, parameters) -# -# Call an external program using PARAMETERS while suppressing depending on -# the value of MODE: -# -# MODE & 1: suppress STDOUT -# MODE & 2: suppress STDERR -# -# Return 0 on success, non-zero otherwise. -# - -sub system_no_output($@) -{ - my $mode = shift; - my $result; - local *OLD_STDERR; - local *OLD_STDOUT; - - # Save old stdout and stderr handles - ($mode & 1) && open(OLD_STDOUT, ">>&", "STDOUT"); - ($mode & 2) && open(OLD_STDERR, ">>&", "STDERR"); - - # Redirect to /dev/null - ($mode & 1) && open(STDOUT, ">", "/dev/null"); - ($mode & 2) && open(STDERR, ">", "/dev/null"); - - system(@_); - $result = $?; - - # Close redirected handles - ($mode & 1) && close(STDOUT); - ($mode & 2) && close(STDERR); - - # Restore old handles - ($mode & 1) && open(STDOUT, ">>&", "OLD_STDOUT"); - ($mode & 2) && open(STDERR, ">>&", "OLD_STDERR"); - - return $result; -} - - -# -# read_config(filename) -# -# Read configuration file FILENAME and return a reference to a hash containing -# all valid key=value pairs found. -# - -sub read_config($) -{ - my $filename = $_[0]; - my %result; - my $key; - my $value; - local *HANDLE; - - if (!open(HANDLE, "<", $filename)) - { - warn("WARNING: cannot read configuration file $filename\n"); - return undef; - } - while () - { - chomp; - # Skip comments - s/#.*//; - # Remove leading blanks - s/^\s+//; - # Remove trailing blanks - s/\s+$//; - next unless length; - ($key, $value) = split(/\s*=\s*/, $_, 2); - if (defined($key) && defined($value)) - { - $result{$key} = $value; - } - else - { - warn("WARNING: malformed statement in line $. ". - "of configuration file $filename\n"); - } - } - close(HANDLE); - return \%result; -} - - -# -# apply_config(REF) -# -# REF is a reference to a hash containing the following mapping: -# -# key_string => var_ref -# -# where KEY_STRING is a keyword and VAR_REF is a reference to an associated -# variable. If the global configuration hashes CONFIG or OPT_RC contain a value -# for keyword KEY_STRING, VAR_REF will be assigned the value for that keyword. -# - -sub apply_config($) -{ - my $ref = $_[0]; - - foreach (keys(%{$ref})) - { - if (defined($opt_rc{$_})) { - ${$ref->{$_}} = $opt_rc{$_}; - } elsif (defined($config->{$_})) { - ${$ref->{$_}} = $config->{$_}; - } - } -} - -sub warn_handler($) -{ - my ($msg) = @_; - - temp_cleanup(); - warn("$tool_name: $msg"); -} - -sub die_handler($) -{ - my ($msg) = @_; - - temp_cleanup(); - die("$tool_name: $msg"); -} - -sub abort_handler($) -{ - temp_cleanup(); - exit(1); -} - -sub temp_cleanup() -{ - if (@temp_dirs) { - info("Removing temporary directories.\n"); - foreach (@temp_dirs) { - rmtree($_); - } - @temp_dirs = (); - } -} - -sub setup_gkv_sys() -{ - system_no_output(3, "mount", "-t", "debugfs", "nodev", - "/sys/kernel/debug"); -} - -sub setup_gkv_proc() -{ - if (system_no_output(3, "modprobe", "gcov_proc")) { - system_no_output(3, "modprobe", "gcov_prof"); - } -} - -sub check_gkv_sys($) -{ - my ($dir) = @_; - - if (-e "$dir/reset") { - return 1; - } - return 0; -} - -sub check_gkv_proc($) -{ - my ($dir) = @_; - - if (-e "$dir/vmlinux") { - return 1; - } - return 0; -} - -sub setup_gkv() -{ - my $dir; - my $sys_dir = "/sys/kernel/debug/gcov"; - my $proc_dir = "/proc/gcov"; - my @todo; - - if (!defined($gcov_dir)) { - info("Auto-detecting gcov kernel support.\n"); - @todo = ( "cs", "cp", "ss", "cs", "sp", "cp" ); - } elsif ($gcov_dir =~ /proc/) { - info("Checking gcov kernel support at $gcov_dir ". - "(user-specified).\n"); - @todo = ( "cp", "sp", "cp", "cs", "ss", "cs"); - } else { - info("Checking gcov kernel support at $gcov_dir ". - "(user-specified).\n"); - @todo = ( "cs", "ss", "cs", "cp", "sp", "cp", ); - } - foreach (@todo) { - if ($_ eq "cs") { - # Check /sys - $dir = defined($gcov_dir) ? $gcov_dir : $sys_dir; - if (check_gkv_sys($dir)) { - info("Found ".$GKV_NAME[$GKV_SYS]." gcov ". - "kernel support at $dir\n"); - return ($GKV_SYS, $dir); - } - } elsif ($_ eq "cp") { - # Check /proc - $dir = defined($gcov_dir) ? $gcov_dir : $proc_dir; - if (check_gkv_proc($dir)) { - info("Found ".$GKV_NAME[$GKV_PROC]." gcov ". - "kernel support at $dir\n"); - return ($GKV_PROC, $dir); - } - } elsif ($_ eq "ss") { - # Setup /sys - setup_gkv_sys(); - } elsif ($_ eq "sp") { - # Setup /proc - setup_gkv_proc(); - } - } - if (defined($gcov_dir)) { - die("ERROR: could not find gcov kernel data at $gcov_dir\n"); - } else { - die("ERROR: no gcov kernel data found\n"); - } -} - - -# -# get_overall_line(found, hit, name_singular, name_plural) -# -# Return a string containing overall information for the specified -# found/hit data. -# - -sub get_overall_line($$$$) -{ - my ($found, $hit, $name_sn, $name_pl) = @_; - my $name; - - return "no data found" if (!defined($found) || $found == 0); - $name = ($found == 1) ? $name_sn : $name_pl; - - return rate($hit, $found, "% ($hit of $found $name)"); -} - - -# -# print_overall_rate(ln_do, ln_found, ln_hit, fn_do, fn_found, fn_hit, br_do -# br_found, br_hit) -# -# Print overall coverage rates for the specified coverage types. -# - -sub print_overall_rate($$$$$$$$$) -{ - my ($ln_do, $ln_found, $ln_hit, $fn_do, $fn_found, $fn_hit, - $br_do, $br_found, $br_hit) = @_; - - info("Summary coverage rate:\n"); - info(" lines......: %s\n", - get_overall_line($ln_found, $ln_hit, "line", "lines")) - if ($ln_do); - info(" functions..: %s\n", - get_overall_line($fn_found, $fn_hit, "function", "functions")) - if ($fn_do); - info(" branches...: %s\n", - get_overall_line($br_found, $br_hit, "branch", "branches")) - if ($br_do); -} - - -# -# rate(hit, found[, suffix, precision, width]) -# -# Return the coverage rate [0..100] for HIT and FOUND values. 0 is only -# returned when HIT is 0. 100 is only returned when HIT equals FOUND. -# PRECISION specifies the precision of the result. SUFFIX defines a -# string that is appended to the result if FOUND is non-zero. Spaces -# are added to the start of the resulting string until it is at least WIDTH -# characters wide. -# - -sub rate($$;$$$) -{ - my ($hit, $found, $suffix, $precision, $width) = @_; - my $rate; - - # Assign defaults if necessary - $precision = 1 if (!defined($precision)); - $suffix = "" if (!defined($suffix)); - $width = 0 if (!defined($width)); - - return sprintf("%*s", $width, "-") if (!defined($found) || $found == 0); - $rate = sprintf("%.*f", $precision, $hit * 100 / $found); - - # Adjust rates if necessary - if ($rate == 0 && $hit > 0) { - $rate = sprintf("%.*f", $precision, 1 / 10 ** $precision); - } elsif ($rate == 100 && $hit != $found) { - $rate = sprintf("%.*f", $precision, 100 - 1 / 10 ** $precision); - } - - return sprintf("%*s", $width, $rate.$suffix); -} diff --git a/XcodeCoverage/llvm-cov-wrapper.sh b/XcodeCoverage/llvm-cov-wrapper.sh deleted file mode 100755 index b0e642f..0000000 --- a/XcodeCoverage/llvm-cov-wrapper.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -# -# Copyright 2014 Jonathan M. Reid. See LICENSE.txt -# Created by: Jon Reid, http://qualitycoding.org/ -# Source: https://github.com/jonreid/XcodeCoverage -# - -if [ "$1" = "-v" ]; then - echo "llvm-cov-wrapper 4.2.1" - exit 0 -else - /usr/bin/gcov $* -fi diff --git a/XcodeCoverage/run_code_coverage_post.sh b/XcodeCoverage/run_code_coverage_post.sh deleted file mode 100755 index 8cfdc11..0000000 --- a/XcodeCoverage/run_code_coverage_post.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -button=`/usr/bin/osascript <

$func_code$count_code
$name$count