├── Classes ├── extensions │ ├── datainputs │ │ ├── ZBarSDK │ │ │ ├── libiconv.2.4.0.dylib │ │ │ ├── libzbar.a │ │ │ ├── Resources │ │ │ │ ├── zbar-back.png │ │ │ │ ├── zbar-helpicons.png │ │ │ │ └── zbar-samples.png │ │ │ └── Headers │ │ │ │ └── ZBarSDK │ │ │ │ ├── ZBarSDK.h │ │ │ │ ├── ZBarCameraSimulator.h │ │ │ │ ├── ZBarImageScanner.h │ │ │ │ ├── ZBarHelpController.h │ │ │ │ ├── ZBarImage.h │ │ │ │ └── ZBarSymbol.h │ │ ├── BarcodeInput.h │ │ ├── StandardInput.h │ │ └── BarcodeInput.m │ ├── dataprocessors │ │ ├── TwitterProcessor.h │ │ ├── MixareProcessor.h │ │ ├── WikipediaProcessor.h │ │ ├── GoogleAddressesProcessor.h │ │ ├── GoogleAddressesProcessor.m │ │ ├── MixareProcessor.m │ │ └── WikipediaProcessor.m │ ├── bootstrap │ │ ├── BootView.h │ │ └── BootView.m │ ├── DataSourceList.h │ ├── PluginList.h │ ├── PluginList.m │ └── DataSourceList.m ├── gui │ ├── .DS_Store │ ├── tabbarControllers │ │ ├── .DS_Store │ │ ├── augmentedView │ │ │ ├── AugmentedGeoViewController.h │ │ │ ├── radarView │ │ │ │ ├── RadarViewPortView.h │ │ │ │ ├── Radar.h │ │ │ │ └── RadarViewPortView.m │ │ │ ├── CameraController.h │ │ │ ├── MarkerView.h │ │ │ ├── MarkerView.m │ │ │ └── AugmentedGeoViewController.m │ │ ├── sourceView │ │ │ ├── SourceTableCell.h │ │ │ ├── SourceTableCell.m │ │ │ └── SourceViewController.h │ │ ├── MapViewController.h │ │ ├── ListViewController.h │ │ └── MoreViewController.h │ └── guiControllers │ │ ├── WebViewController.h │ │ ├── PopUpWebView.h │ │ ├── ProgressHUD.h │ │ ├── WebViewController.m │ │ └── PullRefreshTableViewController.h ├── data │ ├── .DS_Store │ ├── DataSource.h │ ├── Position.h │ └── Position.m ├── Resources.h ├── plugin │ ├── PluginEntryPoint.h │ ├── SetDataSourceDelegate.h │ ├── PluginLoader.h │ ├── DataProcessor.h │ ├── Mixare.h │ ├── DataInput.h │ ├── StartMainDelegate.h │ └── PluginLoader.m ├── MixareMain.h ├── dataconverter │ ├── DataConverter.h │ ├── JsonData.h │ ├── json │ │ ├── NSString+SBJSON.m │ │ ├── NSObject+SBJSON.m │ │ ├── NSString+SBJSON.h │ │ ├── NSObject+SBJSON.h │ │ ├── JSON.h │ │ ├── SBJsonBase.m │ │ └── SBJsonBase.h │ └── DataConverter.m ├── manager │ ├── DownloadManager.h │ ├── DataSourceManager.h │ └── DownloadManager.m ├── Resources.m ├── reality │ ├── MapViewAnnotation.m │ ├── MapViewAnnotation.h │ ├── PoiItem.h │ └── PoiItem.m └── MixareAppDelegate.h ├── Default.png ├── Default@2x.png ├── Resources ├── en.lproj │ ├── InfoPlist.strings │ └── Localizable.strings ├── images │ ├── logo.png │ ├── circle.png │ ├── buzz_logo.png │ ├── icon_map.png │ ├── twitter_logo.png │ ├── HUDBackground.png │ ├── buzz_logo_small.png │ ├── mixare_button.png │ ├── tabbarIcons │ │ ├── map.png │ │ ├── list.png │ │ ├── camera.png │ │ ├── source.png │ │ └── icon_datasource.png │ ├── wikipedia_logo.png │ ├── logo_mixare_round.png │ ├── mixare_512x512px.png │ ├── twitter_logo_small.png │ └── wikipedia_logo_small.png ├── Resources-Prefix.pch ├── Resources-Info.plist ├── nl.lproj │ └── Localizable.strings ├── de.lproj │ └── Localizable.strings └── it.lproj │ └── Localizable.strings ├── UnitTests ├── en.lproj │ └── InfoPlist.strings ├── UnitTests-Prefix.pch ├── UnitTests-Info.plist ├── PoiItemTest.h ├── PositionTest.h ├── PluginLoaderTest.h ├── ArenaProcessorTest.h ├── CameraControllerTest.h ├── MapViewAnnotationTest.h ├── MixareProcessorTest.h ├── DataSourceManagerTest.h ├── GoogleAddressesProcessorTest.h ├── TwitterProcessorTest.h ├── WikipediaProcessorTest.h ├── DataConverterTest.h ├── DataSourceTest.h ├── DownloadManagerTest.h ├── CameraControllerTest.m ├── DataConverterTest.m ├── PluginLoaderTest.m ├── PositionTest.m ├── MapViewAnnotationTest.m ├── PoiItemTest.m ├── ArenaProcessorTest.m ├── MixareProcessorTest.m ├── WikipediaProcessorTest.m ├── DataSourceTest.m ├── DownloadManagerTest.m └── GoogleAddressesProcessorTest.m ├── Default-568h@2x.png ├── mixare-logo_57x57_72_dpi.png ├── ClassDiagram └── UML_Mixare_iOS.jpg ├── mixare-logo_114x114_72_dpi.png ├── README ├── Mixare.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ ├── eXaLy.xcuserdatad │ │ ├── UserInterfaceState.xcuserstate │ │ └── WorkspaceSettings.xcsettings │ │ └── jakob.xcuserdatad │ │ ├── UserInterfaceState.xcuserstate │ │ └── WorkspaceSettings.xcsettings └── xcuserdata │ ├── jakob.xcuserdatad │ └── xcschemes │ │ ├── xcschememanagement.plist │ │ └── Mixare.xcscheme │ └── eXaLy.xcuserdatad │ ├── xcdebugger │ └── Breakpoints.xcbkptlist │ └── xcschemes │ ├── xcschememanagement.plist │ ├── Library.xcscheme │ ├── Plugins.xcscheme │ ├── MixareLibrary.xcscheme │ └── Resources.xcscheme ├── Mixare_Prefix.pch ├── main.m └── Mixare-Info.plist /Classes/extensions/datainputs/ZBarSDK/libiconv.2.4.0.dylib: -------------------------------------------------------------------------------- 1 | libiconv.2.4.0.dylib -------------------------------------------------------------------------------- /Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/todo/mixare-iphone/master/Default.png -------------------------------------------------------------------------------- /Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/todo/mixare-iphone/master/Default@2x.png -------------------------------------------------------------------------------- /Resources/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /UnitTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Classes/gui/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/todo/mixare-iphone/master/Classes/gui/.DS_Store -------------------------------------------------------------------------------- /Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/todo/mixare-iphone/master/Default-568h@2x.png -------------------------------------------------------------------------------- /Classes/data/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/todo/mixare-iphone/master/Classes/data/.DS_Store -------------------------------------------------------------------------------- /Resources/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/todo/mixare-iphone/master/Resources/images/logo.png -------------------------------------------------------------------------------- /Resources/images/circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/todo/mixare-iphone/master/Resources/images/circle.png -------------------------------------------------------------------------------- /mixare-logo_57x57_72_dpi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/todo/mixare-iphone/master/mixare-logo_57x57_72_dpi.png -------------------------------------------------------------------------------- /ClassDiagram/UML_Mixare_iOS.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/todo/mixare-iphone/master/ClassDiagram/UML_Mixare_iOS.jpg -------------------------------------------------------------------------------- /Resources/images/buzz_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/todo/mixare-iphone/master/Resources/images/buzz_logo.png -------------------------------------------------------------------------------- /Resources/images/icon_map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/todo/mixare-iphone/master/Resources/images/icon_map.png -------------------------------------------------------------------------------- /mixare-logo_114x114_72_dpi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/todo/mixare-iphone/master/mixare-logo_114x114_72_dpi.png -------------------------------------------------------------------------------- /Resources/images/twitter_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/todo/mixare-iphone/master/Resources/images/twitter_logo.png -------------------------------------------------------------------------------- /Resources/images/HUDBackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/todo/mixare-iphone/master/Resources/images/HUDBackground.png -------------------------------------------------------------------------------- /Resources/images/buzz_logo_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/todo/mixare-iphone/master/Resources/images/buzz_logo_small.png -------------------------------------------------------------------------------- /Resources/images/mixare_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/todo/mixare-iphone/master/Resources/images/mixare_button.png -------------------------------------------------------------------------------- /Resources/images/tabbarIcons/map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/todo/mixare-iphone/master/Resources/images/tabbarIcons/map.png -------------------------------------------------------------------------------- /Resources/images/wikipedia_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/todo/mixare-iphone/master/Resources/images/wikipedia_logo.png -------------------------------------------------------------------------------- /Resources/images/logo_mixare_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/todo/mixare-iphone/master/Resources/images/logo_mixare_round.png -------------------------------------------------------------------------------- /Resources/images/mixare_512x512px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/todo/mixare-iphone/master/Resources/images/mixare_512x512px.png -------------------------------------------------------------------------------- /Resources/images/tabbarIcons/list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/todo/mixare-iphone/master/Resources/images/tabbarIcons/list.png -------------------------------------------------------------------------------- /Classes/gui/tabbarControllers/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/todo/mixare-iphone/master/Classes/gui/tabbarControllers/.DS_Store -------------------------------------------------------------------------------- /Resources/images/tabbarIcons/camera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/todo/mixare-iphone/master/Resources/images/tabbarIcons/camera.png -------------------------------------------------------------------------------- /Resources/images/tabbarIcons/source.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/todo/mixare-iphone/master/Resources/images/tabbarIcons/source.png -------------------------------------------------------------------------------- /Resources/images/twitter_logo_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/todo/mixare-iphone/master/Resources/images/twitter_logo_small.png -------------------------------------------------------------------------------- /Resources/images/wikipedia_logo_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/todo/mixare-iphone/master/Resources/images/wikipedia_logo_small.png -------------------------------------------------------------------------------- /Classes/extensions/datainputs/ZBarSDK/libzbar.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/todo/mixare-iphone/master/Classes/extensions/datainputs/ZBarSDK/libzbar.a -------------------------------------------------------------------------------- /Resources/images/tabbarIcons/icon_datasource.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/todo/mixare-iphone/master/Resources/images/tabbarIcons/icon_datasource.png -------------------------------------------------------------------------------- /Classes/extensions/datainputs/ZBarSDK/Resources/zbar-back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/todo/mixare-iphone/master/Classes/extensions/datainputs/ZBarSDK/Resources/zbar-back.png -------------------------------------------------------------------------------- /Classes/extensions/datainputs/ZBarSDK/Resources/zbar-helpicons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/todo/mixare-iphone/master/Classes/extensions/datainputs/ZBarSDK/Resources/zbar-helpicons.png -------------------------------------------------------------------------------- /Classes/extensions/datainputs/ZBarSDK/Resources/zbar-samples.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/todo/mixare-iphone/master/Classes/extensions/datainputs/ZBarSDK/Resources/zbar-samples.png -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | mixare (mix Augmented Reality Engine) is a free open source augmented reality browser, which is published under the GPLv3. 2 | 3 | this is the repository for the iphone version 4 | -------------------------------------------------------------------------------- /Resources/Resources-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Resources' target in the 'Resources' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Mixare.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Mixare_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Mixare' target in the 'Mixare' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | #endif 9 | -------------------------------------------------------------------------------- /Mixare.xcodeproj/project.xcworkspace/xcuserdata/eXaLy.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/todo/mixare-iphone/master/Mixare.xcodeproj/project.xcworkspace/xcuserdata/eXaLy.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Mixare.xcodeproj/project.xcworkspace/xcuserdata/jakob.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/todo/mixare-iphone/master/Mixare.xcodeproj/project.xcworkspace/xcuserdata/jakob.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /UnitTests/UnitTests-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'UnitTests' target in the 'UnitTests' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | #endif 9 | -------------------------------------------------------------------------------- /Mixare.xcodeproj/project.xcworkspace/xcuserdata/eXaLy.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges 6 | 7 | SnapshotAutomaticallyBeforeSignificantChanges 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Mixare.xcodeproj/xcuserdata/jakob.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Mixare.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | Mixare.app 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /UnitTests/UnitTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | edu.self.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Mixare.xcodeproj/project.xcworkspace/xcuserdata/jakob.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEWorkspaceUserSettings_BuildLocationStyle 6 | 0 7 | IDEWorkspaceUserSettings_BuildSubfolderNameStyle 8 | 0 9 | IDEWorkspaceUserSettings_DerivedDataLocationStyle 10 | 0 11 | IDEWorkspaceUserSettings_HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges 12 | 13 | IDEWorkspaceUserSettings_SnapshotAutomaticallyBeforeSignificantChanges 14 | 15 | IDEWorkspaceUserSettings_SnapshotLocationStyle 16 | 0 17 | 18 | 19 | -------------------------------------------------------------------------------- /UnitTests/PoiItemTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // PoiItemTest.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 19-12-12. 24 | // 25 | 26 | #import 27 | #import "PoiItem.h" 28 | 29 | @interface PoiItemTest : SenTestCase 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /UnitTests/PositionTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // PositionTest.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 17-10-12. 24 | // 25 | 26 | #import 27 | #import "Position.h" 28 | 29 | @interface PositionTest : SenTestCase 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Classes/Resources.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // Resources.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 22-01-13. 24 | // 25 | 26 | #import 27 | 28 | @interface Resources : NSObject 29 | 30 | + (id)getInstance; 31 | - (NSBundle*)bundle; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Classes/plugin/PluginEntryPoint.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // PluginEntryPoint.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 12-11-12. 24 | // 25 | 26 | #import 27 | 28 | @protocol PluginEntryPoint 29 | 30 | - (void)run:(id)delegate; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /Classes/MixareMain.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // MixareMain.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 16-01-13. 24 | // 25 | 26 | #import 27 | #import "MixareAppDelegate.h" 28 | 29 | @interface MixareMain : NSObject 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /UnitTests/PluginLoaderTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // PluginLoaderTest.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 12-11-12. 24 | // 25 | 26 | #import 27 | #import "PluginLoader.h" 28 | 29 | @interface PluginLoaderTest : SenTestCase 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /UnitTests/ArenaProcessorTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // ArenaProcessorTest.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 18-12-12. 24 | // 25 | 26 | #import 27 | #import "ArenaProcessor.h" 28 | 29 | @interface ArenaProcessorTest : SenTestCase 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /UnitTests/CameraControllerTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // CameraControllerTest.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 18-12-12. 24 | // 25 | 26 | #import 27 | #import "CameraController.h" 28 | 29 | @interface CameraControllerTest : SenTestCase 30 | 31 | @end -------------------------------------------------------------------------------- /UnitTests/MapViewAnnotationTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // MapViewAnnotationTest.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 19-12-12. 24 | // 25 | 26 | #import 27 | #import "MapViewAnnotation.h" 28 | 29 | @interface MapViewAnnotationTest : SenTestCase 30 | 31 | @end -------------------------------------------------------------------------------- /UnitTests/MixareProcessorTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // MixareProcessorTest.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 18-12-12. 24 | // 25 | 26 | #import 27 | #import "MixareProcessor.h" 28 | 29 | @interface MixareProcessorTest : SenTestCase 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /UnitTests/DataSourceManagerTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // DataSourceManagerTest.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 17-10-12. 24 | // 25 | 26 | #import 27 | #import "DataSourceManager.h" 28 | 29 | @interface DataSourceManagerTest : SenTestCase 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Classes/extensions/dataprocessors/TwitterProcessor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // TwitterProcessor.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 15-10-12. 24 | // 25 | 26 | #import 27 | #import 28 | 29 | @interface TwitterProcessor : JsonData 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Classes/extensions/dataprocessors/MixareProcessor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // MixareProcessor.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 15-10-12. 24 | // 25 | 26 | #import 27 | #import 28 | 29 | @interface MixareProcessor : JsonData 30 | 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /Classes/extensions/dataprocessors/WikipediaProcessor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // WikipediaProcessor.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 15-10-12. 24 | // 25 | 26 | #import 27 | #import 28 | 29 | @interface WikipediaProcessor : JsonData 30 | 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /UnitTests/GoogleAddressesProcessorTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // GoogleAddressesProcessorTest.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 18-12-12. 24 | // 25 | 26 | #import 27 | #import "GoogleAddressesProcessor.h" 28 | 29 | @interface GoogleAddressesProcessorTest : SenTestCase 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /UnitTests/TwitterProcessorTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // TwitterProcessorTest.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 18-10-12. 24 | // 25 | 26 | #import 27 | #import "DataProcessor.h" 28 | #import "TwitterProcessor.h" 29 | 30 | @interface TwitterProcessorTest : SenTestCase 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /Classes/extensions/bootstrap/BootView.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // BootView.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 19-11-12. 24 | // 25 | 26 | #import 27 | #import 28 | 29 | @interface BootView : NSObject { 30 | id mainClass; 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /UnitTests/WikipediaProcessorTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // WikipediaProcessorTest.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 18-10-12. 24 | // 25 | 26 | #import 27 | #import "DataProcessor.h" 28 | #import "WikipediaProcessor.h" 29 | 30 | @interface WikipediaProcessorTest : SenTestCase 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /Classes/extensions/dataprocessors/GoogleAddressesProcessor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // GoogleAddressesProcessor.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 31-10-12. 24 | // 25 | 26 | #import 27 | #import 28 | 29 | @interface GoogleAddressesProcessor : JsonData 30 | 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /Classes/gui/tabbarControllers/augmentedView/AugmentedGeoViewController.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | 20 | #import 21 | #import "AugmentedViewController.h" 22 | 23 | @interface AugmentedGeoViewController : AugmentedViewController { 24 | CLLocation *centerLocation; 25 | } 26 | 27 | @property (nonatomic, strong) CLLocation *centerLocation; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /Classes/plugin/SetDataSourceDelegate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // SetDataSource.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 13-11-12. 24 | // 25 | 26 | #import 27 | 28 | @protocol SetDataSourceDelegate 29 | 30 | - (void)setNewData:(NSDictionary *)data; 31 | - (void)presentViewController:id animated:id completion:id; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Classes/gui/tabbarControllers/augmentedView/radarView/RadarViewPortView.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | 20 | #import 21 | #import "Radar.h" 22 | 23 | @interface RadarViewPortView : UIView { 24 | @private 25 | float newAngle; 26 | float referenceAngle; 27 | } 28 | @property (nonatomic) float newAngle; 29 | @property (nonatomic) float referenceAngle; 30 | @end 31 | -------------------------------------------------------------------------------- /main.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // main.m 21 | // Mixare 22 | // 23 | // Created by jakob on 05.10.10. 24 | // 25 | 26 | #import 27 | #import "MixareMain.h" 28 | 29 | int main(int argc, char *argv[]) { 30 | @autoreleasepool { 31 | int retVal = UIApplicationMain(argc, argv, nil, NSStringFromClass([MixareMain class])); 32 | return retVal; 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /Classes/extensions/datainputs/BarcodeInput.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // BarcodeInput.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 13-11-12. 24 | // 25 | 26 | #import 27 | #import 28 | #import "ZBarSDK.h" 29 | 30 | @interface BarcodeInput : UIViewController { 31 | id aClass; 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /UnitTests/DataConverterTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // DataConverterTest.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 16-10-12. 24 | // 25 | 26 | #import 27 | #import 28 | #import "DataConverter.h" 29 | #import "DataSource.h" 30 | 31 | @interface DataConverterTest : SenTestCase { 32 | DataSource *wikipedia; 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /UnitTests/DataSourceTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // DataSourceTest.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 24-09-12. 24 | // 25 | 26 | #import 27 | #import 28 | #import "DataSource.h" 29 | 30 | @interface DataSourceTest : SenTestCase { 31 | CLLocation *location; 32 | DataSource *wikipedia; 33 | DataSource *twitter; 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Classes/gui/tabbarControllers/augmentedView/radarView/Radar.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | 20 | #import 21 | #import "PoiItem.h" 22 | 23 | #define RADIUS 30.0 24 | 25 | @interface Radar : UIView { 26 | NSArray * _pois; 27 | float _range; 28 | float _radius; 29 | } 30 | @property (nonatomic, strong) NSArray * pois; 31 | @property (nonatomic, readonly) float range; 32 | @property (nonatomic) float radius; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Classes/extensions/datainputs/StandardInput.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // StandardInput.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 13-11-12. 24 | // 25 | 26 | #import 27 | #import 28 | 29 | @interface StandardInput : UIViewController { 30 | UITextField *textField; 31 | UITextField *urlField; 32 | id aClass; 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /Classes/gui/tabbarControllers/sourceView/SourceTableCell.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | 20 | #import 21 | 22 | //Custom TableViewCell which contains a bigger image for the source logo and a label 23 | @interface SourceTableCell : UITableViewCell { 24 | UILabel *_sourceLabel; 25 | UIImageView *_sourceLogoView; 26 | } 27 | 28 | @property (nonatomic, strong) UILabel *sourceLabel; 29 | @property (nonatomic, strong) UIImageView *sourceLogoView; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Classes/dataconverter/DataConverter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // DataConverter.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 15-10-12. 24 | // 25 | 26 | #import 27 | #import "DataSource.h" 28 | 29 | @interface DataConverter : NSObject { 30 | NSMutableArray *processors; 31 | } 32 | 33 | + (id)getInstance; 34 | - (void)convertData:(DataSource*)data currentLocation:(CLLocation*)loc currentRadius:(float)rad; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Classes/plugin/PluginLoader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // PluginLoader.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 12-11-12. 24 | // 25 | 26 | #import 27 | 28 | @interface PluginLoader : NSObject { 29 | NSMutableArray *plugins; 30 | } 31 | 32 | + (id)getInstance; 33 | - (void)addPlugin:(id)plugin; 34 | - (void)addArrayOfPlugins:(NSMutableArray*)pluginz; 35 | - (NSMutableArray*)getPluginsFromClassName:(NSString*)className; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /UnitTests/DownloadManagerTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // DownloadManagerTest.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 23-10-12. 24 | // 25 | 26 | #import 27 | #import "DataSourceManager.h" 28 | #import "DownloadManager.h" 29 | #import 30 | 31 | @interface DownloadManagerTest : SenTestCase { 32 | DataSourceManager *dataSourceManager; 33 | CLLocationManager *locationManager; 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Classes/plugin/DataProcessor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // DataProcessor.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 15-10-12. 24 | // 25 | 26 | #import 27 | #import 28 | 29 | @protocol DataProcessor 30 | 31 | - (BOOL)matchesDataType:(NSString*)title; 32 | - (NSString*)createDataString:(NSString*)jsonUrl location:(CLLocation*)loc radius:(float)rad; 33 | - (NSMutableArray*)convert:(NSString*)dataString; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /Classes/dataconverter/JsonData.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // JsonData.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 16-10-12. 24 | // 25 | 26 | #import 27 | #import "JSON.h" 28 | #import 29 | 30 | @interface JsonData : NSObject { 31 | NSDictionary *keys; 32 | NSMutableDictionary *urlValueData; 33 | } 34 | 35 | - (NSString*)createDataString:(NSString*)jsonUrl location:(CLLocation*)loc radius:(float)rad; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Classes/plugin/Mixare.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // Mixare.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 04-01-13. 24 | // 25 | 26 | #import 27 | #import 28 | #import 29 | #import 30 | #import 31 | #import 32 | #import 33 | #import 34 | #import 35 | #import -------------------------------------------------------------------------------- /Classes/extensions/DataSourceList.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // DataSourceList.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 15-11-12. 24 | // 25 | 26 | #import 27 | #import "DataSource.h" 28 | 29 | @interface DataSourceList : NSObject { 30 | NSMutableArray *dataSources; 31 | } 32 | 33 | @property (nonatomic, readonly) NSMutableArray *dataSources; 34 | 35 | + (id)getInstance; 36 | - (void)addDataSource:(NSString*)title dataUrl:(NSString*)url lockDeletable:(BOOL)lock; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /Classes/plugin/DataInput.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // DataInput.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 12-11-12. 24 | // 25 | 26 | #import 27 | #import "SetDataSourceDelegate.h" 28 | 29 | @protocol DataInput 30 | 31 | /*** 32 | * 33 | * Object of parameter 'classToSetYourData' should has interface/protocol 'SetDataSource' 34 | * And uses the method setNewData to manage the received data 35 | * 36 | ***/ 37 | - (void)runInput:(id)classToSetYourData; 38 | - (NSString*)getTitle; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Classes/gui/tabbarControllers/MapViewController.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | 20 | #import 21 | #import 22 | #import "DataSource.h" 23 | #import "PopUpWebView.h" 24 | 25 | @interface MapViewController : UIViewController { 26 | IBOutlet MKMapView* _map; 27 | NSMutableArray *_currentAnnotations; 28 | NSString *tempUrl; 29 | UIButton *closeButton; 30 | PopUpWebView *popUpView; 31 | } 32 | 33 | @property (nonatomic, strong) IBOutlet MKMapView *map; 34 | - (void)refresh:(NSMutableArray*)dataSources; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Mixare.xcodeproj/xcuserdata/eXaLy.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 18 | 19 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /Classes/manager/DownloadManager.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // DownloadManager.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 15-10-12. 24 | // 25 | 26 | #import 27 | #import "DataSource.h" 28 | #import 29 | 30 | @interface DownloadManager : NSObject { 31 | CLLocation *lastDownloadedLocation; 32 | float lastDownloadedRadius; 33 | NSMutableArray *lastDownloadedSources; 34 | } 35 | 36 | - (void)download:(NSMutableArray*)datas currentLocation:(CLLocation*)loc currentRadius:(float)rad; 37 | - (void)redownload; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Classes/gui/tabbarControllers/augmentedView/CameraController.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // CameraController.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 12-12-12. 24 | // 25 | 26 | #import 27 | #import 28 | 29 | @interface CameraController : NSObject 30 | 31 | @property (retain) AVCaptureVideoPreviewLayer *previewLayer; 32 | @property (retain) AVCaptureSession *captureSession; 33 | 34 | - (void)addVideoPreviewLayer; 35 | - (void)addVideoInput; 36 | - (void)setPortrait; 37 | - (void)setLandscapeLeft; 38 | - (void)setLandscapeRight; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Classes/Resources.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // Resources.m 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 22-01-13. 24 | // 25 | 26 | #import "Resources.h" 27 | 28 | @implementation Resources 29 | 30 | static Resources *resources; 31 | 32 | + (void)initialize { 33 | if (self == [Resources class]){ 34 | resources = [[Resources alloc] init]; 35 | } 36 | } 37 | 38 | + (id)getInstance { 39 | return resources; 40 | } 41 | 42 | - (NSBundle*)bundle { 43 | return [NSBundle bundleWithURL:[[NSBundle mainBundle] URLForResource:@"Resources" withExtension:@"bundle"]]; 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Classes/extensions/PluginList.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // PluginList.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 12-11-12. 24 | // 25 | 26 | #import 27 | #import "DataProcessor.h" 28 | #import "DataInput.h" 29 | #import "PluginEntryPoint.h" 30 | 31 | @interface PluginList : NSObject { 32 | NSMutableArray *plugins; 33 | } 34 | 35 | @property (nonatomic, readonly) NSMutableArray *plugins; 36 | 37 | + (id)getInstance; 38 | - (void)addPlugin:(id)plugin; 39 | - (id)defaultProcessor; 40 | - (id)defaultBootstrap; 41 | - (id)defaultInput; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /Classes/gui/guiControllers/WebViewController.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | 20 | #import 21 | 22 | //View controller for the webview when tapping on a poi in the listview 23 | //confrom to the UIWebViewDelegate protocol so the webview can stop showing the loading information when all data is downloaded 24 | @interface WebViewController : UIViewController { 25 | //url which will be opened 26 | NSString *_url; 27 | //the webview 28 | IBOutlet UIWebView *_webView; 29 | //Loading view with activity indicator 30 | IBOutlet UIView *loadView; 31 | } 32 | 33 | @property (nonatomic, strong) NSString *url; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /Classes/gui/tabbarControllers/ListViewController.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | 20 | #import 21 | #import 22 | #import "PullRefreshTableViewController.h" 23 | #import "DataSource.h" 24 | #import "DownloadManager.h" 25 | 26 | //Viewcontroller for the listview on the tabbar 27 | @interface ListViewController : PullRefreshTableViewController { 28 | NSMutableArray *dataSources; 29 | NSMutableArray *dataSourceArray; 30 | DownloadManager *downloadManager; 31 | } 32 | 33 | - (void)refresh:(NSMutableArray*)dataSources; 34 | 35 | @property (nonatomic, strong) DownloadManager *downloadManager; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Classes/manager/DataSourceManager.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // DataSourceManager.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 05-10-12. 24 | // 25 | 26 | #import 27 | #import "DataSource.h" 28 | 29 | @interface DataSourceManager : NSObject{ 30 | NSMutableArray *dataSources; 31 | } 32 | 33 | @property (nonatomic, strong) NSMutableArray *dataSources; 34 | 35 | - (id)init; 36 | - (DataSource*)getDataSourceByTitle:(NSString*)title; 37 | - (NSMutableArray*)getActivatedSources; 38 | - (DataSource*)createDataSource:(NSString*)title dataUrl:(NSString*)url; 39 | - (void)deleteDataSource:(DataSource*)source; 40 | - (void)deactivateAllSources; 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /UnitTests/CameraControllerTest.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // CameraControllerTest.m 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 18-12-12. 24 | // 25 | 26 | #import "CameraControllerTest.h" 27 | 28 | @implementation CameraControllerTest 29 | 30 | - (void)setUp { 31 | [super setUp]; 32 | } 33 | 34 | - (void)tearDown { 35 | [super tearDown]; 36 | } 37 | 38 | - (void)testInitializeCamera { 39 | CameraController *camera = [[CameraController alloc] init]; 40 | [camera addVideoInput]; 41 | [camera addVideoPreviewLayer]; 42 | [camera setPortrait]; 43 | [camera setLandscapeLeft]; 44 | [camera setLandscapeRight]; 45 | STAssertNotNil(camera, @"Camera not created"); 46 | } 47 | 48 | @end -------------------------------------------------------------------------------- /Classes/gui/tabbarControllers/sourceView/SourceTableCell.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | 20 | #import "SourceTableCell.h" 21 | 22 | @implementation SourceTableCell 23 | @synthesize sourceLabel = _sourceLabel; 24 | @synthesize sourceLogoView = _sourceLogoView; 25 | 26 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString*)reuseIdentifier { 27 | if ((self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])) { 28 | // Initialization code 29 | } 30 | return self; 31 | } 32 | 33 | 34 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 35 | [super setSelected:selected animated:animated]; 36 | // Configure the view for the selected state 37 | } 38 | 39 | 40 | 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Classes/gui/tabbarControllers/augmentedView/MarkerView.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | 20 | #import 21 | #import "PopUpWebView.h" 22 | 23 | //Info view of a poi. Shoved when tapping on a por in the cam view. opens a webview of the poi 24 | @interface MarkerView : UIView { 25 | UIView *viewTouched; 26 | NSString *_url; 27 | UIView *loadView; 28 | UIButton *btn; 29 | PopUpWebView *popUpView; 30 | UILabel *titleLabel; 31 | } 32 | 33 | @property (nonatomic, strong) UIView *viewTouched; 34 | @property (nonatomic, strong) NSString *url; 35 | @property PopUpWebView *popUpView; 36 | @property (nonatomic, retain) UILabel *titleLabel; 37 | 38 | - (id)initWithWebView:(PopUpWebView*)webView; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Classes/plugin/StartMainDelegate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // StartMain.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 19-11-12. 24 | // 25 | 26 | #import 27 | #import "PluginEntryPoint.h" 28 | #import "DataSourceManager.h" 29 | 30 | @protocol StartMainDelegate 31 | 32 | @property (nonatomic, retain) DataSourceManager *_dataSourceManager; 33 | @property (nonatomic, retain) id pluginDelegate; 34 | @property (nonatomic) BOOL toggleMenuButton; 35 | @property (nonatomic) BOOL toggleReturnButton; 36 | @property (nonatomic, retain) UIWindow *window; 37 | 38 | - (void)openARView; 39 | - (void)openMenu; 40 | - (void)refresh; 41 | - (void)showHud; 42 | - (void)closeHud; 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /Classes/gui/guiControllers/PopUpWebView.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // PopUpWebView.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 11-12-12. 24 | // 25 | 26 | #import 27 | 28 | @interface PopUpWebView : NSObject { 29 | UIButton *closeButton; 30 | UIWebView *popUpView; 31 | UIView *mainView; 32 | 33 | CGRect windowPortrait; 34 | CGRect windowLandscape; 35 | CGRect buttonPortrait; 36 | CGRect buttonLandscape; 37 | 38 | float alpha; 39 | 40 | BOOL beforeWasLandscape; 41 | BOOL rotateable; 42 | } 43 | 44 | - (id)initWithMainView:(UIView*)view padding:(int)pad isTabbar:(BOOL)tab rightRotateable:(BOOL)rotate alpha:(float)alp; 45 | - (void)openUrlView:(NSString*)url; 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /Classes/extensions/datainputs/ZBarSDK/Headers/ZBarSDK/ZBarSDK.h: -------------------------------------------------------------------------------- 1 | /*------------------------------------------------------------------------ 2 | * Copyright 2010 (c) Jeff Brown 3 | * 4 | * This file is part of the ZBar Bar Code Reader. 5 | * 6 | * The ZBar Bar Code Reader is free software; you can redistribute it 7 | * and/or modify it under the terms of the GNU Lesser Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * The ZBar Bar Code Reader is distributed in the hope that it will be 12 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty 13 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Lesser Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser Public License 17 | * along with the ZBar Bar Code Reader; if not, write to the Free 18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, 19 | * Boston, MA 02110-1301 USA 20 | * 21 | * http://sourceforge.net/projects/zbar 22 | *------------------------------------------------------------------------*/ 23 | 24 | #import "zbar.h" 25 | 26 | #import "ZBarSymbol.h" 27 | #import "ZBarImage.h" 28 | #import "ZBarImageScanner.h" 29 | #import "ZBarReaderView.h" 30 | #import "ZBarReaderViewController.h" 31 | #import "ZBarReaderController.h" 32 | #import "ZBarCaptureReader.h" 33 | #import "ZBarHelpController.h" 34 | #import "ZBarCameraSimulator.h" 35 | -------------------------------------------------------------------------------- /Classes/reality/MapViewAnnotation.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // MapAnnotation.m 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 05-10-12. 24 | // 25 | 26 | #import "MapViewAnnotation.h" 27 | 28 | @implementation MapViewAnnotation 29 | 30 | @synthesize coordinate, position; 31 | @synthesize subTitle, title; 32 | 33 | - (id)initWithLatitude:(CGFloat)lat longitude:(CGFloat)lon position:(Position *)pos { 34 | self = [super init]; 35 | if (self) { 36 | if (lat != 0.0 && lon != 0.0) { 37 | coordinate.latitude = lat; 38 | coordinate.longitude = lon; 39 | } else { 40 | coordinate.latitude = 0.0; 41 | coordinate.longitude = 0.0; 42 | } 43 | position = pos; 44 | } 45 | return self; 46 | } 47 | 48 | @end -------------------------------------------------------------------------------- /Resources/Resources-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | org.mixare.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | BNDL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | CFPlugInDynamicRegisterFunction 26 | 27 | CFPlugInDynamicRegistration 28 | NO 29 | CFPlugInFactories 30 | 31 | 00000000-0000-0000-0000-000000000000 32 | MyFactoryFunction 33 | 34 | CFPlugInTypes 35 | 36 | 00000000-0000-0000-0000-000000000000 37 | 38 | 00000000-0000-0000-0000-000000000000 39 | 40 | 41 | CFPlugInUnloadFunction 42 | 43 | NSHumanReadableCopyright 44 | Copyright © 2013 Peer GmbH. All rights reserved. 45 | 46 | 47 | -------------------------------------------------------------------------------- /Classes/gui/guiControllers/ProgressHUD.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // ProgressHUD.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 22-11-12. 24 | // 25 | 26 | #import 27 | #import "MixareAppDelegate.h" 28 | 29 | @interface ProgressHUD : UIAlertView { 30 | UIActivityIndicatorView *activityIndicator; 31 | UILabel *progressMessage; 32 | UIImageView *backgroundImageView; 33 | 34 | MixareAppDelegate *__weak appDelegate; 35 | } 36 | 37 | @property (nonatomic) UIActivityIndicatorView *activityIndicator; 38 | @property (nonatomic, strong) UILabel *progressMessage; 39 | @property (nonatomic) UIImageView *backgroundImageView; 40 | @property (nonatomic, weak) MixareAppDelegate *appDelegate; 41 | 42 | - (id)initWithLabel:(NSString *)text; 43 | - (void)show; 44 | - (void)dismiss; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Classes/reality/MapViewAnnotation.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // MapAnnotation.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 05-10-12. 24 | // 25 | 26 | #import 27 | #import 28 | #import 29 | 30 | @class Position; 31 | 32 | @interface MapViewAnnotation : NSObject { 33 | CLLocationCoordinate2D coordinate; 34 | NSString *title; 35 | NSString *subTitle; 36 | Position *position; 37 | } 38 | 39 | @property (nonatomic, readonly) CLLocationCoordinate2D coordinate; 40 | @property (nonatomic, strong) NSString *title; 41 | @property (nonatomic, strong) NSString *subTitle; 42 | @property (nonatomic, readonly) Position *position; 43 | 44 | - (id)initWithLatitude:(CGFloat)lat longitude:(CGFloat)lon position:(Position*)pos; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Classes/extensions/bootstrap/BootView.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // BootView.m 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 19-11-12. 24 | // 25 | 26 | #import "BootView.h" 27 | 28 | @implementation BootView 29 | 30 | - (void)run:(id)delegate { 31 | mainClass = delegate; 32 | [mainClass setToggleMenuButton:YES]; 33 | [mainClass setToggleReturnButton:NO]; 34 | [mainClass setPluginDelegate:self]; 35 | [mainClass window].rootViewController = nil; 36 | [self reuse]; 37 | } 38 | 39 | - (void)reuse { 40 | [mainClass showHud]; 41 | [self performSelectorInBackground:@selector(threadLoad) withObject:nil]; 42 | } 43 | 44 | - (void)threadLoad { 45 | [mainClass refresh]; // Download Data 46 | [mainClass openARView]; // Open AR-View 47 | [mainClass closeHud]; // Close indicator 48 | } 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /Classes/data/DataSource.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // DataSource.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 24-09-12. 24 | // 25 | 26 | #import 27 | #import "Position.h" 28 | 29 | @interface DataSource : NSObject { 30 | NSString *title; 31 | NSString *jsonUrl; 32 | BOOL activated; 33 | BOOL locked; 34 | NSMutableArray *positions; 35 | UIImage *logo; 36 | } 37 | 38 | @property (nonatomic, strong) NSString *title; 39 | @property (nonatomic, strong) NSString *jsonUrl; 40 | @property (nonatomic, assign) BOOL activated; 41 | @property (nonatomic, assign) BOOL locked; 42 | @property (nonatomic, strong) NSMutableArray *positions; 43 | @property (nonatomic, readonly) UIImage *logo; 44 | 45 | - (id)initTitle:(NSString*)tit jsonUrl:(NSString*)url locked:(BOOL)lock; 46 | - (void)refreshPositions:(NSMutableArray*)results; 47 | - (void)setListLogo:(NSString*)marker; 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /Classes/gui/tabbarControllers/augmentedView/MarkerView.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | 20 | #import "MarkerView.h" 21 | 22 | @implementation MarkerView 23 | 24 | @synthesize viewTouched, url = _url, popUpView, titleLabel; 25 | 26 | - (id)initWithWebView:(PopUpWebView*)webView { 27 | self = [super init]; 28 | popUpView = webView; 29 | return self; 30 | } 31 | 32 | //Then, when an event is fired, we log this one and then send it back to the viewTouched we kept, and voilà!!! :) 33 | - (void)touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event { 34 | [popUpView openUrlView:self.url]; 35 | } 36 | 37 | - (void)touchesMoved:(NSSet*)touches withEvent:(UIEvent*)event { 38 | 39 | } 40 | 41 | //Touch ended -> showing info view with animation. 42 | - (void)touchesEnded:(NSSet*)touches withEvent:(UIEvent*)event { 43 | 44 | } 45 | 46 | - (void)touchesCancelled:(NSSet*)touches withEvent:(UIEvent*)event { 47 | 48 | } 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /Classes/gui/tabbarControllers/augmentedView/AugmentedGeoViewController.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | 20 | #import "AugmentedGeoViewController.h" 21 | #import "PoiItem.h" 22 | 23 | @implementation AugmentedGeoViewController 24 | 25 | @synthesize centerLocation; 26 | 27 | - (id)init { 28 | self = [super init]; 29 | [self viewWillAppear:YES]; 30 | self.scaleViewsBasedOnDistance = YES; 31 | self.minimumScaleFactor = 0.6; 32 | self.rotateViewsBasedOnPerspective = YES; 33 | return self; 34 | } 35 | 36 | - (void)setCenterLocation:(CLLocation*)newLocation { 37 | centerLocation = newLocation; 38 | for (PoiItem *geoLocation in self.coordinates) { 39 | [geoLocation calibrateUsingOrigin:centerLocation]; 40 | if (geoLocation.radialDistance > self.maximumScaleDistance) { 41 | self.maximumScaleDistance = geoLocation.radialDistance; 42 | } 43 | } 44 | } 45 | 46 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 47 | return YES; 48 | } 49 | @end 50 | -------------------------------------------------------------------------------- /UnitTests/DataConverterTest.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // DataConverterTest.m 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 16-10-12. 24 | // 25 | 26 | #import "DataConverterTest.h" 27 | 28 | 29 | @implementation DataConverterTest 30 | 31 | - (void)setUp { 32 | [super setUp]; 33 | wikipedia = [[DataSource alloc] initTitle:@"Wikipedia" jsonUrl:@"http://ws.geonames.org/findNearbyWikipediaJSON?lat=PARAM_LAT&lng=PARAM_LON&radius=PARAM_RAD&maxRows=50&lang=PARAM_LANG" locked:NO]; 34 | [wikipedia setActivated:YES]; 35 | } 36 | 37 | - (void)tearDown { 38 | [super tearDown]; 39 | } 40 | 41 | - (void)testConvertData { 42 | CLLocation *location = [[[CLLocationManager alloc] init] location]; 43 | [[DataConverter getInstance] convertData:wikipedia currentLocation:location currentRadius:3.5]; 44 | BOOL check = YES; 45 | if (wikipedia.positions.count == 0) { 46 | check = NO; 47 | } 48 | STAssertTrue(check, @"No positions found"); 49 | } 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /Classes/gui/tabbarControllers/sourceView/SourceViewController.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | 20 | #import 21 | #import 22 | #import "PullRefreshTableViewController.h" 23 | #import "DataSourceManager.h" 24 | #import "DownloadManager.h" 25 | #import "SetDataSourceDelegate.h" 26 | 27 | //ViewController for the source tabbarsection 28 | @interface SourceViewController : PullRefreshTableViewController { 29 | NSMutableArray *dataSourceArray; 30 | UIBarButtonItem *addButton; 31 | DownloadManager *downloadManager; 32 | DataSourceManager *dataSourceManager; 33 | UITextField *textField; 34 | UITextField *urlField; 35 | } 36 | 37 | - (void)addSource; 38 | - (void)setNewData:(NSDictionary*)data; 39 | - (void)refresh:(DataSourceManager*)dataSourceManager; 40 | 41 | @property (nonatomic, strong) NSMutableArray *dataSourceArray; 42 | @property (nonatomic, strong) DownloadManager *downloadManager; 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /UnitTests/PluginLoaderTest.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // PluginLoaderTest.m 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 12-11-12. 24 | // 25 | 26 | #import "PluginLoaderTest.h" 27 | #import "PluginList.h" 28 | #import "DataProcessor.h" 29 | 30 | @implementation PluginLoaderTest 31 | 32 | - (void)setUp { 33 | [super setUp]; 34 | } 35 | 36 | - (void)tearDown { 37 | [super tearDown]; 38 | } 39 | 40 | - (void)testCreatePluginLoader { 41 | STAssertNotNil([PluginLoader getInstance], @"Singleton not created"); 42 | } 43 | 44 | - (void)testLoadPluginList { 45 | PluginLoader *loader = [PluginLoader getInstance]; 46 | [loader addArrayOfPlugins:[[PluginList getInstance] plugins]]; 47 | STAssertNotNil([loader getPluginsFromClassName:@"DataProcessor"], @"Plugins not loaded"); 48 | BOOL check = NO; 49 | if ([[loader getPluginsFromClassName:@"DataProcessor"][0] conformsToProtocol:@protocol(DataProcessor)]) { 50 | check = YES; 51 | } 52 | STAssertTrue(check, @"Wrong protocol"); 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /UnitTests/PositionTest.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // PositionTest.m 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 17-10-12. 24 | // 25 | 26 | #import "PositionTest.h" 27 | 28 | @implementation PositionTest 29 | 30 | - (void)setUp { 31 | [super setUp]; 32 | } 33 | 34 | - (void)tearDown { 35 | [super tearDown]; 36 | } 37 | 38 | - (void)testCreatePosition { 39 | Position *pos = [[Position alloc] initWithTitle:@"Groothandels" withSummary:@"Mooi" withUrl:@"http://www.finalist.nl" withLatitude:40 withLongitude:20 withAltitude:3.4 withSource:nil]; 40 | STAssertNotNil(pos, @"Not created"); 41 | STAssertEqualObjects(pos.title, @"Groothandels", @"Not the same title"); 42 | } 43 | 44 | - (void)testCreatedMarkers { 45 | Position *pos = [[Position alloc] initWithTitle:@"Groothandels" withSummary:@"Mooi" withUrl:@"http://www.finalist.nl" withLatitude:40 withLongitude:20 withAltitude:3.4 withSource:nil]; 46 | STAssertNotNil(pos.poiItem, @"Poi Item not created"); 47 | STAssertNotNil(pos.mapViewAnnotation, @"MapViewAnnotation not created"); 48 | } 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /Classes/extensions/datainputs/ZBarSDK/Headers/ZBarSDK/ZBarCameraSimulator.h: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------ 2 | // Copyright 2010-2011 (c) Jeff Brown 3 | // 4 | // This file is part of the ZBar Bar Code Reader. 5 | // 6 | // The ZBar Bar Code Reader is free software; you can redistribute it 7 | // and/or modify it under the terms of the GNU Lesser Public License as 8 | // published by the Free Software Foundation; either version 2.1 of 9 | // the License, or (at your option) any later version. 10 | // 11 | // The ZBar Bar Code Reader is distributed in the hope that it will be 12 | // useful, but WITHOUT ANY WARRANTY; without even the implied warranty 13 | // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU Lesser Public License for more details. 15 | // 16 | // You should have received a copy of the GNU Lesser Public License 17 | // along with the ZBar Bar Code Reader; if not, write to the Free 18 | // Software Foundation, Inc., 51 Franklin St, Fifth Floor, 19 | // Boston, MA 02110-1301 USA 20 | // 21 | // http://sourceforge.net/projects/zbar 22 | //------------------------------------------------------------------------ 23 | 24 | @class ZBarReaderView; 25 | 26 | // hack around missing simulator support for AVCapture interfaces 27 | 28 | @interface ZBarCameraSimulator 29 | : NSObject 30 | < UINavigationControllerDelegate, 31 | UIImagePickerControllerDelegate, 32 | UIPopoverControllerDelegate > 33 | { 34 | UIViewController *viewController; 35 | ZBarReaderView *readerView; 36 | UIImagePickerController *picker; 37 | UIPopoverController *pickerPopover; 38 | } 39 | 40 | - (id) initWithViewController: (UIViewController*) viewController; 41 | - (void) takePicture; 42 | 43 | @property (nonatomic, assign) ZBarReaderView *readerView; 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Classes/gui/tabbarControllers/augmentedView/radarView/RadarViewPortView.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | 20 | #import "RadarViewPortView.h" 21 | #define radians(x) (M_PI * (x) / 180.0) 22 | 23 | @implementation RadarViewPortView 24 | @synthesize newAngle, referenceAngle; 25 | 26 | - (id)initWithFrame:(CGRect)frame { 27 | if ((self = [super initWithFrame:frame])) { 28 | // Initialization code 29 | newAngle = 45.0; 30 | referenceAngle = 247.5; 31 | } 32 | self.backgroundColor = [UIColor clearColor]; 33 | return self; 34 | } 35 | 36 | // Only override drawRect: if you perform custom drawing. 37 | // An empty implementation adversely affects performance during animation. 38 | - (void)drawRect:(CGRect)rect { 39 | CGContextRef contextRef = UIGraphicsGetCurrentContext(); 40 | CGContextSetRGBFillColor(contextRef, 0, 255, 115, 0.3); 41 | CGContextMoveToPoint(contextRef, RADIUS, RADIUS); 42 | CGContextAddArc(contextRef, RADIUS, RADIUS, RADIUS, radians(referenceAngle), radians(referenceAngle+newAngle),0); 43 | CGContextClosePath(contextRef); 44 | CGContextFillPath(contextRef); 45 | } 46 | 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /Classes/extensions/datainputs/ZBarSDK/Headers/ZBarSDK/ZBarImageScanner.h: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------ 2 | // Copyright 2009 (c) Jeff Brown 3 | // 4 | // This file is part of the ZBar Bar Code Reader. 5 | // 6 | // The ZBar Bar Code Reader is free software; you can redistribute it 7 | // and/or modify it under the terms of the GNU Lesser Public License as 8 | // published by the Free Software Foundation; either version 2.1 of 9 | // the License, or (at your option) any later version. 10 | // 11 | // The ZBar Bar Code Reader is distributed in the hope that it will be 12 | // useful, but WITHOUT ANY WARRANTY; without even the implied warranty 13 | // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU Lesser Public License for more details. 15 | // 16 | // You should have received a copy of the GNU Lesser Public License 17 | // along with the ZBar Bar Code Reader; if not, write to the Free 18 | // Software Foundation, Inc., 51 Franklin St, Fifth Floor, 19 | // Boston, MA 02110-1301 USA 20 | // 21 | // http://sourceforge.net/projects/zbar 22 | //------------------------------------------------------------------------ 23 | 24 | #import 25 | #import "zbar.h" 26 | #import "ZBarImage.h" 27 | 28 | #ifdef __cplusplus 29 | using namespace zbar; 30 | #endif 31 | 32 | // Obj-C wrapper for ZBar image scanner 33 | 34 | @interface ZBarImageScanner : NSObject 35 | { 36 | zbar_image_scanner_t *scanner; 37 | } 38 | 39 | @property (nonatomic) BOOL enableCache; 40 | @property (readonly, nonatomic) ZBarSymbolSet *results; 41 | 42 | // decoder configuration 43 | - (void) parseConfig: (NSString*) configStr; 44 | - (void) setSymbology: (zbar_symbol_type_t) symbology 45 | config: (zbar_config_t) config 46 | to: (int) value; 47 | 48 | // image scanning interface 49 | - (NSInteger) scanImage: (ZBarImage*) image; 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /Classes/reality/PoiItem.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | 20 | #import 21 | #import 22 | 23 | #define degreesToRadians(x) (M_PI * x / 180.0) 24 | #define radiansToDegrees(x) (x * (180.0/M_PI)) 25 | 26 | //This class represents a POI with all the needed information 27 | @class Position; 28 | 29 | @interface PoiItem : NSObject { 30 | //distance from device to poi 31 | double radialDistance; 32 | double inclination; 33 | //value of how many degrees the poi is away from north in radiants 34 | double azimuth; 35 | Position *position; 36 | CLLocation *geoLocation; 37 | } 38 | 39 | @property (nonatomic) double radialDistance; 40 | @property (nonatomic) double inclination; 41 | @property (nonatomic) double azimuth; 42 | @property (nonatomic) CGPoint radarPos; 43 | @property (nonatomic, retain) Position *position; 44 | @property (nonatomic, readonly) CLLocation *geoLocation; 45 | 46 | - (id)initCoordinateWithRadialDistance:(double)newRadialDistance inclination:(double)newInclination azimuth:(double)newAzimuth; 47 | - (id)initWithLatitude:(float)lat longitude:(float)lon altitude:(CGFloat)alt position:(Position*)pos; 48 | - (void)calibrateUsingOrigin:(CLLocation*)origin; 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /Classes/gui/tabbarControllers/MoreViewController.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | 20 | #import 21 | #import 22 | 23 | //Is the Viewcontroller for the more tab in the tabbar 24 | @interface MoreViewController : UIViewController { 25 | //custom button with the mixare logo .. oens the mixare webpage 26 | IBOutlet UIButton *logoButton; 27 | //Label which contains the latitude value 28 | IBOutlet UILabel *lat; 29 | //Label which contains the longitude value 30 | IBOutlet UILabel *lon; 31 | //Label which contains the altitude value 32 | IBOutlet UILabel *alt; 33 | //Label which contains the accuracy value 34 | IBOutlet UILabel *accuracy; 35 | //Label which contains the speed value 36 | IBOutlet UILabel *speed; 37 | //Label which contains the date value of the last valid gps signal 38 | IBOutlet UILabel *date; 39 | IBOutlet UIButton *licenseButton; 40 | } 41 | 42 | //action method which is added to the logobutton .. open the mixare webpage 43 | - (void)buttonClick:(id)sender; 44 | - (void)licenseClick:(id)sender; 45 | //method which write gps information in the according labels 46 | - (void)showGPSInfo:(CLLocation*)loc; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /Mixare.xcodeproj/xcuserdata/eXaLy.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Library.xcscheme 8 | 9 | orderHint 10 | 4 11 | 12 | Mixare.xcscheme_^#shared#^_ 13 | 14 | orderHint 15 | 1 16 | 17 | MixareLibrary.xcscheme 18 | 19 | orderHint 20 | 3 21 | 22 | Plugins.xcscheme 23 | 24 | orderHint 25 | 5 26 | 27 | Resources.xcscheme 28 | 29 | orderHint 30 | 6 31 | 32 | UnitTests.xcscheme 33 | 34 | orderHint 35 | 2 36 | 37 | 38 | SuppressBuildableAutocreation 39 | 40 | 1D6058900D05DD3D006BFB54 41 | 42 | primary 43 | 44 | 45 | E29C3A3816AD7A540092F97C 46 | 47 | primary 48 | 49 | 50 | E29C76611696D9DB0006C4D2 51 | 52 | primary 53 | 54 | 55 | E29C771F1696F96B0006C4D2 56 | 57 | primary 58 | 59 | 60 | E29C779D16972BF00006C4D2 61 | 62 | primary 63 | 64 | 65 | E2A0B6F416AD8387007920B7 66 | 67 | primary 68 | 69 | 70 | E2A0B70E16AD8BC1007920B7 71 | 72 | primary 73 | 74 | 75 | E2DFCF80160B25470045A6C4 76 | 77 | primary 78 | 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /Classes/dataconverter/json/NSString+SBJSON.m: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2007-2009 Stig Brautaset. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of the author nor the names of its contributors may be used 15 | to endorse or promote products derived from this software without specific 16 | prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #import "NSString+SBJSON.h" 31 | #import "SBJsonParser.h" 32 | 33 | @implementation NSString (NSString_SBJSON) 34 | 35 | - (id)JSONValue { 36 | SBJsonParser *jsonParser = [SBJsonParser new]; 37 | id repr = [jsonParser objectWithString:self]; 38 | if (!repr) 39 | NSLog(@"-JSONValue failed. Error trace is: %@", [jsonParser errorTrace]); 40 | return repr; 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /Classes/dataconverter/json/NSObject+SBJSON.m: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009 Stig Brautaset. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of the author nor the names of its contributors may be used 15 | to endorse or promote products derived from this software without specific 16 | prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #import "NSObject+SBJSON.h" 31 | #import "SBJsonWriter.h" 32 | 33 | @implementation NSObject (NSObject_SBJSON) 34 | 35 | - (NSString *)JSONRepresentation { 36 | SBJsonWriter *jsonWriter = [SBJsonWriter new]; 37 | NSString *json = [jsonWriter stringWithObject:self]; 38 | if (!json) 39 | NSLog(@"-JSONRepresentation failed. Error trace is: %@", [jsonWriter errorTrace]); 40 | return json; 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /Resources/en.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* No comment provided by engineer. */ 2 | "Insert your Source address \n\n\n\n\n" = "Insert your Source address \n\n\n\n\n"; 3 | 4 | /* No comment provided by engineer. */ 5 | "Add Source" = "Add Source"; 6 | 7 | /* First tabbar icon */ 8 | "Camera" = "Camera"; 9 | 10 | /* No comment provided by engineer. */ 11 | "Cancel" = "Cancel"; 12 | 13 | /* No comment provided by engineer. */ 14 | "Format:www.example.com" = "http://www.example.com"; 15 | 16 | /* No comment provided by engineer. */ 17 | "General Info" = "General Info"; 18 | 19 | /* No comment provided by engineer. */ 20 | "License" = "License"; 21 | 22 | /* 3 tabbar icon */ 23 | "List View" = "List View"; 24 | 25 | /* 4 tabbar icon */ 26 | "Map" = "Map"; 27 | 28 | /* No comment provided by engineer. */ 29 | "Menu" = "Menu"; 30 | 31 | /* No comment provided by engineer. */ 32 | "Not Allowed" = "Not Allowed"; 33 | 34 | /* No comment provided by engineer. */ 35 | "OK" = "OK"; 36 | 37 | /* No comment provided by engineer. */ 38 | "Poi List" = "Poi List"; 39 | 40 | /* No comment provided by engineer. */ 41 | "Radius" = "Radius"; 42 | 43 | /* 2 tabbar icon */ 44 | "Sources" = "Sources"; 45 | 46 | "Insert link" = "Insert link"; 47 | 48 | "Scan QR code" = "Scan QR code"; 49 | 50 | "Choose an option to insert source" = "Choose an option to insert source"; 51 | 52 | "Add source" = "Add source"; 53 | 54 | "Title" = "Title"; 55 | 56 | "You can only delete your own sources!" = "You can only delete your own sources!"; 57 | 58 | "Data input" = "Data input"; 59 | 60 | "Choose your data input method." = "Choose your data input method."; 61 | 62 | "No input possibility found" = "No input possibility found"; 63 | 64 | "Added title already exists" = "Added title already exists"; 65 | 66 | "You have to fill all inputs" = "You have to fill all inputs"; 67 | 68 | "Pull down to refresh..." = "Pull down to refresh..."; 69 | 70 | "Release to refresh..." = "Release to refresh..."; 71 | 72 | "Loading..." = "Loading..."; 73 | 74 | "Main menu" = "Main menu"; 75 | 76 | "Close" = "Close"; 77 | 78 | "I am here" = "I am here"; -------------------------------------------------------------------------------- /Resources/nl.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* No comment provided by engineer. */ 2 | "Insert your Source address \n\n\n\n\n" = "Voer uw bronadres in \n\n\n\n\n"; 3 | 4 | /* No comment provided by engineer. */ 5 | "Add Source" = "Bron toevoegen"; 6 | 7 | /* First tabbar icon */ 8 | "Camera" = "Camera"; 9 | 10 | /* No comment provided by engineer. */ 11 | "Cancel" = "Annuleren"; 12 | 13 | /* No comment provided by engineer. */ 14 | "Format:www.example.com" = "http://www.voorbeeld.com"; 15 | 16 | /* No comment provided by engineer. */ 17 | "General Info" = "Algemene Info"; 18 | 19 | /* No comment provided by engineer. */ 20 | "License" = "Licentie"; 21 | 22 | /* 3 tabbar icon */ 23 | "List View" = "Lijst"; 24 | 25 | /* 4 tabbar icon */ 26 | "Map" = "Map"; 27 | 28 | /* No comment provided by engineer. */ 29 | "Menu" = "Menu"; 30 | 31 | /* No comment provided by engineer. */ 32 | "Not Allowed" = "Niet Toegestaan"; 33 | 34 | /* No comment provided by engineer. */ 35 | "OK" = "OK"; 36 | 37 | /* No comment provided by engineer. */ 38 | "Poi List" = "Poi Lijst"; 39 | 40 | /* No comment provided by engineer. */ 41 | "Radius" = "Radius"; 42 | 43 | /* 2 tabbar icon */ 44 | "Sources" = "Bronnen"; 45 | 46 | "Insert link" = "Link toevoegen"; 47 | 48 | "Scan QR code" = "Scan QR code"; 49 | 50 | "Choose an option to insert source" = "Kies een optie om een bron toe te voegen"; 51 | 52 | "Add source" = "Bron toevoegen"; 53 | 54 | "Title" = "Titel"; 55 | 56 | "You can only delete your own sources!" = "U kunt alleen uw eigen bronnen verwijderen!"; 57 | 58 | "Data input" = "Gegevensinvoer"; 59 | 60 | "Choose your data input method." = "Kies uw data-invoer methode."; 61 | 62 | "No input possibility found" = "Geen invoer mogelijkheid gevonden."; 63 | 64 | "Added title already exists" = "Uw toegevoegde titel bestaat al"; 65 | 66 | "You have to fill all inputs" = "U moet alle velden invullen"; 67 | 68 | "Pull down to refresh..." = "Sleep naar beneden om te vernieuwen..."; 69 | 70 | "Release to refresh..." = "Laat los om te vernieuwen..."; 71 | 72 | "Loading..." = "Aan het laden..."; 73 | 74 | "Main menu" = "Hoofdmenu"; 75 | 76 | "Close" = "Sluiten"; 77 | 78 | "I am here" = "Ik ben hier"; -------------------------------------------------------------------------------- /Classes/data/Position.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // Position.h 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 24-09-12. 24 | // 25 | 26 | #import 27 | #import "MapViewAnnotation.h" 28 | #import "PoiItem.h" 29 | 30 | @class DataSource; 31 | 32 | @interface Position : NSObject { 33 | NSString *title; 34 | NSString *summary; 35 | NSString *url; 36 | float latitude; 37 | float longitude; 38 | CGFloat altitude; 39 | DataSource *source; 40 | MapViewAnnotation *mapViewAnnotation; 41 | PoiItem *poiItem; 42 | UIImage *image; 43 | } 44 | 45 | @property (nonatomic, readonly) NSString *title; 46 | @property (nonatomic, readonly) NSString *summary; 47 | @property (nonatomic, readonly) NSString *url; 48 | @property (nonatomic, readonly) MapViewAnnotation *mapViewAnnotation; 49 | @property (nonatomic, readonly) PoiItem *poiItem; 50 | @property (nonatomic, retain) DataSource *source; 51 | @property (nonatomic, readonly) float latitude; 52 | @property (nonatomic, readonly) float longitude; 53 | @property (nonatomic, readonly) CGFloat altitude; 54 | @property (nonatomic, readonly) UIImage *image; 55 | 56 | - (id)initWithTitle:(NSString*)tit withSummary:(NSString*)sum withUrl:(NSString*)u withLatitude:(float)lat withLongitude:(float)lon withAltitude:(CGFloat)alt withSource:(DataSource*)sour; 57 | - (void)setMarker:(NSString*)marker; 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /Resources/de.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* No comment provided by engineer. */ 2 | "Insert your Source address \n\n\n\n\n" = "Quellenadresse eingeben \n\n\n\n\n"; 3 | 4 | /* No comment provided by engineer. */ 5 | "Add Source" = "Quelle hinzufügen"; 6 | 7 | /* First tabbar icon */ 8 | "Camera" = "Kamera"; 9 | 10 | /* No comment provided by engineer. */ 11 | "Cancel" = "Abbrechen"; 12 | 13 | /* No comment provided by engineer. */ 14 | "Format:www.example.com" = "http://www.beispiel.com"; 15 | 16 | /* No comment provided by engineer. */ 17 | "General Info" = "Algemeine Infos"; 18 | 19 | /* No comment provided by engineer. */ 20 | "License" = "Lizenz"; 21 | 22 | /* 3 tabbar icon */ 23 | "List View" = "Liste"; 24 | 25 | /* 4 tabbar icon */ 26 | "Map" = "Karte"; 27 | 28 | /* No comment provided by engineer. */ 29 | "Menu" = "Menü"; 30 | 31 | /* No comment provided by engineer. */ 32 | "Not Allowed" = "Nicht erlaubt"; 33 | 34 | /* No comment provided by engineer. */ 35 | "OK" = "OK"; 36 | 37 | /* No comment provided by engineer. */ 38 | "Poi List" = "Liste der Poi's"; 39 | 40 | /* No comment provided by engineer. */ 41 | "Radius" = "Radius"; 42 | 43 | /* 2 tabbar icon */ 44 | "Sources" = "Quellen"; 45 | 46 | "Insert link" = "Link hinzufügen"; 47 | 48 | "Scan QR code" = "Scan QR code"; 49 | 50 | "Choose an option to insert source" = "Wählen Sie eine Option zur Quelle einfügen"; 51 | 52 | "Add source" = "Quelle hinzufügen"; 53 | 54 | "Title" = "Titel"; 55 | 56 | "You can only delete your own sources!" = "Sie können nur Ihre eigenen Quellen!"; 57 | 58 | "Data input" = "Data Entry"; 59 | 60 | "Choose your data input method." = "Wählen Sie Ihre Daten-Input Methode."; 61 | 62 | "No input possibility found" = "Keine Eingabe Möglichkeit gefunden"; 63 | 64 | "Added title already exists" = "Ihre aufgenommen Titel existiert bereits"; 65 | 66 | "You have to fill all inputs" = "Sie müssen alle Felder ausfüllen"; 67 | 68 | "Pull down to refresh..." = "Ziehen Sie nach unten, um zu aktualisieren..."; 69 | 70 | "Release to refresh..." = "Lassen Sie zu aktualisieren..."; 71 | 72 | "Loading..." = "Um loading..."; 73 | 74 | "Main menu" = "Hauptmenü"; 75 | 76 | "Close" = "Schließen"; 77 | 78 | "I am here" = "Ich bin hier"; -------------------------------------------------------------------------------- /Resources/it.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* No comment provided by engineer. */ 2 | "Insert your Source address \n\n\n\n\n" = "Inserisci il tuo indirizzo \n\n\n\n\n"; 3 | 4 | /* No comment provided by engineer. */ 5 | "Add Source" = "Aggiungi fonte"; 6 | 7 | /* First tabbar icon */ 8 | "Camera" = "Camera"; 9 | 10 | /* No comment provided by engineer. */ 11 | "Cancel" = "Cancella"; 12 | 13 | /* No comment provided by engineer. */ 14 | "Format:www.example.com" = "http://www.esempio.com"; 15 | 16 | /* No comment provided by engineer. */ 17 | "General Info" = "Informazioni generali"; 18 | 19 | /* No comment provided by engineer. */ 20 | "License" = "Licenza"; 21 | 22 | /* 3 tabbar icon */ 23 | "List View" = "Lista"; 24 | 25 | /* 4 tabbar icon */ 26 | "Map" = "Mappa"; 27 | 28 | /* No comment provided by engineer. */ 29 | "Menu" = "Menu"; 30 | 31 | /* No comment provided by engineer. */ 32 | "Not Allowed" = "Non permesso"; 33 | 34 | /* No comment provided by engineer. */ 35 | "OK" = "OK"; 36 | 37 | /* No comment provided by engineer. */ 38 | "Poi List" = "Lista delle Poi"; 39 | 40 | /* No comment provided by engineer. */ 41 | "Radius" = "Raggio"; 42 | 43 | /* 2 tabbar icon */ 44 | "Sources" = "Fonti"; 45 | 46 | "Insert link" = "Inserisci link"; 47 | 48 | "Scan QR code" = "Scansione QR code"; 49 | 50 | "Choose an option to insert source" = "Scegli una opzione per inserire fonte"; 51 | 52 | "Add source" = "Aggiungere la sorgente"; 53 | 54 | "Title" = "Titolo"; 55 | 56 | "You can only delete your own sources!" = "È possibile eliminare solo le proprie fonti!"; 57 | 58 | "Data input" = "Data Entry"; 59 | 60 | "Choose your data input method." = "Scegli il tuo metodo di immissione dei dati."; 61 | 62 | "No input possibility found" = "Nessuna possibilità di ingresso trovato"; 63 | 64 | "Added title already exists" = "Il titolo aggiunto esiste già"; 65 | 66 | "You have to fill all inputs" = "È necessario completare tutti i campi"; 67 | 68 | "Pull down to refresh..." = "Trascinare verso il basso per aggiornare..."; 69 | 70 | "Release to refresh..." = "Rilasciare per aggiornare..."; 71 | 72 | "Loading..." = "Per carico..."; 73 | 74 | "Main menu" = "Menu principale"; 75 | 76 | "Close" = "Chiudi"; 77 | 78 | "I am here" = "Sono qui"; -------------------------------------------------------------------------------- /Classes/dataconverter/json/NSString+SBJSON.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009 Stig Brautaset. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of the author nor the names of its contributors may be used 15 | to endorse or promote products derived from this software without specific 16 | prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #import 31 | 32 | /** 33 | @brief Adds JSON parsing methods to NSString 34 | 35 | This is a category on NSString that adds methods for parsing the target string. 36 | */ 37 | @interface NSString (NSString_SBJSON) 38 | 39 | /** 40 | @brief Returns the NSDictionary or NSArray represented by the current string's JSON representation. 41 | 42 | Returns the dictionary or array represented in the receiver, or nil on error. 43 | 44 | Returns the NSDictionary or NSArray represented by the current string's JSON representation. 45 | */ 46 | - (id)JSONValue; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /UnitTests/MapViewAnnotationTest.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // MapViewAnnotationTest.m 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 19-12-12. 24 | // 25 | 26 | #import "MapViewAnnotationTest.h" 27 | #import "Position.h" 28 | #import "DataSource.h" 29 | 30 | @implementation MapViewAnnotationTest 31 | 32 | - (void)setUp { 33 | [super setUp]; 34 | } 35 | 36 | - (void)tearDown { 37 | [super tearDown]; 38 | } 39 | 40 | - (void)testCreateMapViewAnnotation { 41 | MapViewAnnotation *anno = [[MapViewAnnotation alloc] initWithLatitude:3.0 longitude:3.0 position:[[Position alloc] initWithTitle:@"cool" withSummary:@"sum" withUrl:@"http://url.com/sub1" withLatitude:3.0 withLongitude:2.0 withAltitude:1.0 withSource:[[DataSource alloc] initTitle:@"wiki" jsonUrl:@"http://url.com" locked:NO]]]; 42 | STAssertNotNil(anno, @"Annotation not created"); 43 | } 44 | 45 | - (void)testAddingMapViewAnnotationData { 46 | MapViewAnnotation *anno = [[MapViewAnnotation alloc] initWithLatitude:3.0 longitude:3.0 position:[[Position alloc] initWithTitle:@"cool" withSummary:@"sum" withUrl:@"http://url.com/sub2" withLatitude:3.0 withLongitude:2.0 withAltitude:1.0 withSource:[[DataSource alloc] initTitle:@"wiki" jsonUrl:@"http://url.com" locked:NO]]]; 47 | [anno setTitle:@"COOL"]; 48 | [anno setSubTitle:@"cool2"]; 49 | STAssertEquals(anno.title, @"COOL", @"Title not correct"); 50 | STAssertEquals(anno.subTitle, @"cool2", @"subTitle not correct"); 51 | } 52 | 53 | @end -------------------------------------------------------------------------------- /Classes/extensions/PluginList.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // PluginList.m 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 12-11-12. 24 | // 25 | 26 | /*** *** 27 | * * 28 | * --- INITIALIZE YOUR PLUGINS HERE BELOW --- * 29 | * * 30 | *** ***/ 31 | 32 | #import "PluginList.h" 33 | #import "MixareProcessor.h" 34 | #import "BootView.h" 35 | 36 | @implementation PluginList 37 | 38 | @synthesize plugins; 39 | 40 | static PluginList *pluginList; 41 | 42 | + (void)initialize { 43 | if (self == [PluginList class]) { 44 | pluginList = [[PluginList alloc] init]; 45 | } 46 | } 47 | 48 | + (id)getInstance { 49 | return pluginList; 50 | } 51 | 52 | - (id)init { 53 | self = [super init]; 54 | if (self) { 55 | plugins = [[NSMutableArray alloc] init]; 56 | [self initPlugins]; 57 | } 58 | return self; 59 | } 60 | 61 | - (void)initPlugins { 62 | 63 | } 64 | 65 | - (void)addPlugin:(id)plugin { 66 | [plugins addObject:plugin]; 67 | } 68 | 69 | - (id)defaultProcessor { 70 | return [[MixareProcessor alloc] init]; 71 | } 72 | 73 | - (id)defaultBootstrap { 74 | return [[BootView alloc] init]; 75 | } 76 | 77 | - (id)defaultInput { 78 | //return [[StandardInput alloc] init]; 79 | return nil; 80 | } 81 | 82 | @end 83 | -------------------------------------------------------------------------------- /Classes/extensions/datainputs/ZBarSDK/Headers/ZBarSDK/ZBarHelpController.h: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------ 2 | // Copyright 2009-2010 (c) Jeff Brown 3 | // 4 | // This file is part of the ZBar Bar Code Reader. 5 | // 6 | // The ZBar Bar Code Reader is free software; you can redistribute it 7 | // and/or modify it under the terms of the GNU Lesser Public License as 8 | // published by the Free Software Foundation; either version 2.1 of 9 | // the License, or (at your option) any later version. 10 | // 11 | // The ZBar Bar Code Reader is distributed in the hope that it will be 12 | // useful, but WITHOUT ANY WARRANTY; without even the implied warranty 13 | // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU Lesser Public License for more details. 15 | // 16 | // You should have received a copy of the GNU Lesser Public License 17 | // along with the ZBar Bar Code Reader; if not, write to the Free 18 | // Software Foundation, Inc., 51 Franklin St, Fifth Floor, 19 | // Boston, MA 02110-1301 USA 20 | // 21 | // http://sourceforge.net/projects/zbar 22 | //------------------------------------------------------------------------ 23 | 24 | #import 25 | 26 | @class ZBarHelpController; 27 | 28 | @protocol ZBarHelpDelegate 29 | @optional 30 | 31 | - (void) helpControllerDidFinish: (ZBarHelpController*) help; 32 | 33 | @end 34 | 35 | 36 | // failure dialog w/a few useful tips 37 | 38 | @interface ZBarHelpController : UIViewController 39 | < UIWebViewDelegate, 40 | UIAlertViewDelegate > 41 | { 42 | NSString *reason; 43 | id delegate; 44 | UIWebView *webView; 45 | UIToolbar *toolbar; 46 | UIBarButtonItem *doneBtn, *backBtn, *space; 47 | NSURL *linkURL; 48 | NSUInteger orientations; 49 | } 50 | 51 | @property (nonatomic, assign) id delegate; 52 | 53 | // designated initializer 54 | - (id) initWithReason: (NSString*) reason; 55 | 56 | - (BOOL) isInterfaceOrientationSupported: (UIInterfaceOrientation) orientation; 57 | - (void) setInterfaceOrientation: (UIInterfaceOrientation) orientation 58 | supported: (BOOL) supported; 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /Classes/extensions/dataprocessors/GoogleAddressesProcessor.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // GoogleAddressesProcessor.m 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 31-10-12. 24 | // 25 | 26 | #import "GoogleAddressesProcessor.h" 27 | 28 | @implementation GoogleAddressesProcessor 29 | 30 | - (id)init { 31 | self = [super init]; 32 | return self; 33 | } 34 | 35 | - (BOOL)matchesDataType:(NSString*)title { 36 | if ([title isEqualToString:@"Google Addresses"]) { 37 | return YES; 38 | } 39 | return NO; 40 | } 41 | 42 | - (NSMutableArray*)convert:(NSString*)dataString { 43 | if (dataString != nil) { 44 | NSDictionary *data = [dataString JSONValue]; 45 | NSMutableArray *ret = [[NSMutableArray alloc] init]; 46 | NSArray *results = data[@"results"]; 47 | for (NSDictionary *component in results) { 48 | [ret addObject:@{ 49 | keys[@"title"]: component[@"formatted_address"], 50 | keys[@"url"]: [NSString stringWithFormat:@"http://maps.google.com/maps?ll=%@,%@", component[@"geometry"][@"location"][@"lat"], component[@"geometry"][@"location"][@"lng"]], 51 | keys[@"longitude"]: component[@"geometry"][@"location"][@"lng"], 52 | keys[@"latitude"]: component[@"geometry"][@"location"][@"lat"], 53 | keys[@"marker"]: @"buzz_logo_small.png", 54 | keys[@"logo"]: @"buzz_logo.png"}]; 55 | } 56 | return ret; 57 | } 58 | return nil; 59 | } 60 | 61 | @end -------------------------------------------------------------------------------- /Classes/gui/guiControllers/WebViewController.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | #import "WebViewController.h" 20 | 21 | @implementation WebViewController 22 | 23 | @synthesize url = _url; 24 | 25 | #pragma mark WebViewDelegate 26 | - (void)webViewDidStartLoad:(UIWebView*)webView { 27 | loadView.center = _webView.center; 28 | [_webView addSubview:loadView]; 29 | } 30 | 31 | //When the webpage has been loaded successfully the loading view will be removed 32 | - (void)webViewDidFinishLoad:(UIWebView*)webView { 33 | [loadView removeFromSuperview]; 34 | } 35 | 36 | // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. 37 | - (void)viewDidLoad { 38 | [super viewDidLoad]; 39 | //Create a URL object. 40 | NSURL *url = [NSURL URLWithString:_url]; 41 | //URL Requst Object 42 | NSURLRequest *requestObj = [NSURLRequest requestWithURL:url]; 43 | //Load the request in the UIWebView. 44 | [_webView loadRequest:requestObj]; 45 | } 46 | 47 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 48 | return YES; 49 | } 50 | 51 | - (void)didReceiveMemoryWarning { 52 | // Releases the view if it doesn't have a superview. 53 | [super didReceiveMemoryWarning]; 54 | 55 | // Release any cached data, images, etc that aren't in use. 56 | } 57 | 58 | - (void)viewDidUnload { 59 | [super viewDidUnload]; 60 | // Release any retained subviews of the main view. 61 | // e.g. self.myOutlet = nil; 62 | } 63 | 64 | @end 65 | -------------------------------------------------------------------------------- /Classes/extensions/datainputs/BarcodeInput.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // BarcodeInput.m 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 13-11-12. 24 | // 25 | 26 | #import "BarcodeInput.h" 27 | 28 | @implementation BarcodeInput 29 | 30 | - (id)init { 31 | self = [super init]; 32 | return self; 33 | } 34 | 35 | - (NSString*)getTitle { 36 | return @"Barcode Scanner"; 37 | } 38 | 39 | - (void)runInput:(id)classToSetYourData { 40 | aClass = classToSetYourData; 41 | ZBarReaderViewController *reader = [ZBarReaderViewController new]; 42 | reader.readerDelegate = self; 43 | reader.supportedOrientationsMask = ZBarOrientationMaskAll; 44 | ZBarImageScanner *scanner = reader.scanner; 45 | [scanner setSymbology:ZBAR_I25 config:ZBAR_CFG_ENABLE to:0]; 46 | [aClass presentViewController:reader animated:nil completion:nil]; 47 | } 48 | 49 | - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { 50 | id results = [info objectForKey:ZBarReaderControllerResults]; 51 | ZBarSymbol *symbol = nil; 52 | for (symbol in results) { 53 | break; 54 | } 55 | [picker dismissViewControllerAnimated:YES completion:nil]; 56 | [aClass setNewData:@{@"title":@"Barcode Source", @"url":symbol.data}]; 57 | } 58 | 59 | - (void)viewDidLoad { 60 | [super viewDidLoad]; 61 | } 62 | 63 | - (void)viewDidUnload { 64 | [super viewDidUnload]; 65 | } 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /Mixare.xcodeproj/xcuserdata/eXaLy.xcuserdatad/xcschemes/Library.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 44 | 45 | 51 | 52 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /Mixare.xcodeproj/xcuserdata/eXaLy.xcuserdatad/xcschemes/Plugins.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 44 | 45 | 51 | 52 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /Mixare.xcodeproj/xcuserdata/eXaLy.xcuserdatad/xcschemes/MixareLibrary.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 44 | 45 | 51 | 52 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /Mixare.xcodeproj/xcuserdata/eXaLy.xcuserdatad/xcschemes/Resources.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 44 | 45 | 51 | 52 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /UnitTests/PoiItemTest.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // PoiItemTest.m 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 19-12-12. 24 | // 25 | 26 | #import "PoiItemTest.h" 27 | #import "Position.h" 28 | #import "DataSource.h" 29 | #import 30 | 31 | @implementation PoiItemTest 32 | 33 | - (void)setUp { 34 | [super setUp]; 35 | } 36 | 37 | - (void)tearDown { 38 | [super tearDown]; 39 | } 40 | 41 | - (void)testCreatePoiItem { 42 | PoiItem *poi = [[PoiItem alloc] initCoordinateWithRadialDistance:2.0 inclination:3.0 azimuth:1.0]; 43 | STAssertNotNil(poi, @"POI 1 not created"); 44 | PoiItem *poi2 = [[PoiItem alloc] initWithLatitude:3.0 longitude:1.0 altitude:2.0 position:[[Position alloc] initWithTitle:@"hi" withSummary:@"hi" withUrl:@"http://url" withLatitude:2.0 withLongitude:1.0 withAltitude:4.0 withSource:[[DataSource alloc] initTitle:@"wikipedia" jsonUrl:@"http://url.com" locked:NO]]]; 45 | STAssertNotNil(poi2, @"POI 2 not created"); 46 | } 47 | 48 | - (void)testCalibrateUsingOrigin { 49 | PoiItem *poi = [[PoiItem alloc] initWithLatitude:3.0 longitude:1.0 altitude:2.0 position:[[Position alloc] initWithTitle:@"hi" withSummary:@"hi" withUrl:@"http://url" withLatitude:2.0 withLongitude:1.0 withAltitude:4.0 withSource:[[DataSource alloc] initTitle:@"wikipedia" jsonUrl:@"http://url.com" locked:NO]]]; 50 | [poi calibrateUsingOrigin:[[CLLocation alloc] initWithCoordinate:CLLocationCoordinate2DMake(2.0, 2.4) altitude:1.0 horizontalAccuracy:1.0 verticalAccuracy:1.0 timestamp:nil]]; 51 | } 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /Classes/MixareAppDelegate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | 20 | #import 21 | #import 22 | #import 23 | #import 24 | #import "DataSourceManager.h" 25 | #import "DownloadManager.h" 26 | #import "ListViewController.h" 27 | #import "AugmentedGeoViewController.h" 28 | #import "MapViewController.h" 29 | #import "MarkerView.h" 30 | #import "Radar.h" 31 | #import "MoreViewController.h" 32 | #import "SourceViewController.h" 33 | #import "StartMainDelegate.h" 34 | #import "PluginEntryPoint.h" 35 | 36 | @interface MixareAppDelegate : UIViewController { 37 | UIWindow *window; 38 | 39 | CLLocationManager *_locationManager; 40 | DataSourceManager *_dataSourceManager; 41 | DownloadManager *_downloadManager; 42 | 43 | AugmentedGeoViewController *augViewController; 44 | 45 | UITabBarController *tabBarController; 46 | ListViewController *listViewController; 47 | MapViewController *mapViewController; 48 | MoreViewController *moreViewController; 49 | SourceViewController *sourceViewController; 50 | 51 | NSArray *startPlugin; 52 | BOOL toggleMenuButton; 53 | BOOL toggleReturnButton; 54 | id pluginDelegate; 55 | 56 | BOOL alertRunning; 57 | 58 | @private 59 | BOOL beforeWasLandscape; 60 | IBOutlet UIView *notificationView; 61 | } 62 | 63 | @property (nonatomic) BOOL alertRunning; 64 | 65 | - (void)runApplication; 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /Classes/dataconverter/json/NSObject+SBJSON.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009 Stig Brautaset. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of the author nor the names of its contributors may be used 15 | to endorse or promote products derived from this software without specific 16 | prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #import 31 | 32 | /** 33 | @brief Adds JSON generation to Foundation classes 34 | 35 | This is a category on NSObject that adds methods for returning JSON representations 36 | of standard objects to the objects themselves. This means you can call the 37 | -JSONRepresentation method on an NSArray object and it'll do what you want. 38 | */ 39 | @interface NSObject (NSObject_SBJSON) 40 | 41 | /** 42 | @brief Returns a string containing the receiver encoded in JSON. 43 | 44 | This method is added as a category on NSObject but is only actually 45 | supported for the following objects: 46 | @li NSDictionary 47 | @li NSArray 48 | */ 49 | - (NSString *)JSONRepresentation; 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /UnitTests/ArenaProcessorTest.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // ArenaProcessorTest.m 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 18-12-12. 24 | // 25 | 26 | #import "ArenaProcessorTest.h" 27 | 28 | @implementation ArenaProcessorTest 29 | 30 | - (void)setUp { 31 | [super setUp]; 32 | } 33 | 34 | - (void)tearDown { 35 | [super tearDown]; 36 | } 37 | 38 | - (void)testCreateArenaProcessor { 39 | id processor = [[ArenaProcessor alloc] init]; 40 | STAssertNotNil(processor, @"Not created"); 41 | } 42 | 43 | - (void)testConvertArenaData { 44 | id processor = [[ArenaProcessor alloc] init]; 45 | NSMutableArray* converted = [processor convert:@"{\"stats\":\"OK\",\"num_results\":2,\"results\":[{\"id\":14,\"lat\":51.930195,\"lng\":4.478632,\"elevation\":0,\"title\":\"LOL\",\"radius\":0.0,\"has_detail_page\":1,\"webpage\":\"http://ad-arena.finalist.com/arena-server/item/show/12/14/zwart.item\",\"object_type\":\"question\",\"object_url\":\"http://ad-arena.finalist.com/arena-server/images/green-question.png\"},{\"id\":16,\"lat\":51.94893,\"lng\":4.464387,\"elevation\":0,\"title\":\"VerhaaZZZ\",\"radius\":0.0,\"has_detail_page\":1,\"webpage\":\"http://ad-arena.finalist.com/arena-server/item/show/16.item\",\"object_type\":\"information\",\"object_url\":\"http://ad-arena.finalist.com/arena-server/images/information.png\"}]}"]; 46 | NSString *title = [[NSString alloc] initWithString:[converted[0] valueForKey:@"title"]]; 47 | NSLog(@"CONVERTED TITLE: %@", title); 48 | STAssertEqualObjects(title, @"LOL", @"Convert failed"); 49 | } 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /Classes/dataconverter/DataConverter.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // DataConverter.m 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 15-10-12. 24 | // 25 | 26 | #import "DataConverter.h" 27 | #import "PluginLoader.h" 28 | #import "DataProcessor.h" 29 | 30 | static DataConverter *dataConverter; 31 | 32 | @implementation DataConverter 33 | 34 | + (void)initialize { 35 | if (self == [DataConverter class]) { 36 | dataConverter = [[DataConverter alloc] init]; 37 | } 38 | } 39 | 40 | + (id)getInstance { 41 | return dataConverter; 42 | } 43 | 44 | - (id)init { 45 | self = [super init]; 46 | if (self) { 47 | processors = [[PluginLoader getInstance] getPluginsFromClassName:@"DataProcessor"]; 48 | } 49 | return self; 50 | } 51 | 52 | /*** 53 | * 54 | * PUBLIC: Get actual json-source url with current location 55 | * AND convert json-source to useable Position objects IN the given DataSource object. 56 | * @param DataSource 57 | * @param CLLocation 58 | * @param radius 59 | * 60 | ***/ 61 | - (void)convertData:(DataSource*)data currentLocation:(CLLocation*)loc currentRadius:(float)rad { 62 | id processor = [self matchProcessor:data.title]; 63 | [data refreshPositions:[processor convert:[processor createDataString:data.jsonUrl location:loc radius:rad]]]; 64 | } 65 | 66 | /*** 67 | * 68 | * Get the right DataProcessor for the specific source 69 | * 70 | ***/ 71 | - (id)matchProcessor:(NSString*)title { 72 | for (id processor in processors) { 73 | if ([processor matchesDataType:title]) { 74 | return processor; 75 | } 76 | } 77 | return nil; 78 | } 79 | 80 | @end 81 | -------------------------------------------------------------------------------- /Classes/manager/DownloadManager.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // DownloadManager.m 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 15-10-12. 24 | // 25 | 26 | #import "DownloadManager.h" 27 | #import "DataConverter.h" 28 | 29 | @implementation DownloadManager 30 | 31 | - (id)init { 32 | self = [super init]; 33 | return self; 34 | } 35 | 36 | - (BOOL)radiusChanged:(float)rad { 37 | if (rad != lastDownloadedRadius) { 38 | return YES; 39 | } 40 | return NO; 41 | } 42 | 43 | - (BOOL)dataInputChanged:(NSMutableArray*)datas { 44 | if (![datas isEqual:lastDownloadedSources]) { 45 | return YES; 46 | } 47 | return NO; 48 | } 49 | 50 | - (void)download:(NSMutableArray*)datas currentLocation:(CLLocation*)loc currentRadius:(float)rad { 51 | if ([self dataInputChanged:datas] || [self radiusChanged:rad]) { 52 | NSMutableArray *downloadArray = [[NSMutableArray alloc] initWithArray:datas]; 53 | if ([self dataInputChanged:datas]) { 54 | [downloadArray removeObjectsInArray:lastDownloadedSources]; 55 | } 56 | for (DataSource *data in downloadArray) { 57 | [[DataConverter getInstance] convertData:data currentLocation:loc currentRadius:rad]; 58 | } 59 | lastDownloadedLocation = loc; 60 | lastDownloadedRadius = rad; 61 | [lastDownloadedSources removeAllObjects]; 62 | lastDownloadedSources = datas; 63 | } 64 | } 65 | 66 | - (void)redownload { 67 | for (DataSource *data in lastDownloadedSources) { 68 | [[DataConverter getInstance] convertData:data currentLocation:lastDownloadedLocation currentRadius:lastDownloadedRadius]; 69 | } 70 | } 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /UnitTests/MixareProcessorTest.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // MixareProcessorTest.m 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 18-12-12. 24 | // 25 | 26 | #import "MixareProcessorTest.h" 27 | 28 | @implementation MixareProcessorTest 29 | 30 | - (void)setUp { 31 | [super setUp]; 32 | } 33 | 34 | - (void)tearDown { 35 | [super tearDown]; 36 | } 37 | 38 | - (void)testCreateMixareProcessor { 39 | id processor = [[MixareProcessor alloc] init]; 40 | STAssertNotNil(processor, @"Not created"); 41 | } 42 | 43 | - (void)testConvertMixareData { 44 | id processor = [[MixareProcessor alloc] init]; 45 | NSMutableArray* converted = [processor convert:@"{\"status\":\"OK\",\"num_results\":3,\"results\":[{\"id\":\"2827\",\"lat\":\"46.43893\",\"lng\":\"11.21706\",\"elevation\":\"1737\",\"title\":\"Penegal\",\"distance\":\"9.756\",\"webpage\":\"http%3A%2F%2Fwww.suedtirolerland.it%2Fapi%2Fmap%2FgetMarkerTplM%2F%3Fmarker_id%3D2827%26project_id%3D15%26lang_id%3D9\",\"marker\":\"http://url.com/marker.png\",\"logo\":\"http://url.com/image.png\"},{\"id\":\"2821\",\"lat\":\"46.49396\",\"lng\":\"11.2088\",\"elevation\":\"1865\",\"title\":\"Gantkofel\",\"distance\":\"9.771\",\"webpage\":\"\",\"marker\":\"http://url.com/marker.png\"},{\"id\":\"2829\",\"lat\":\"46.3591\",\"lng\":\"11.1921\",\"elevation\":\"2116\",\"title\":\"Roen\",\"distance\":\"17.545\",\"webpage\":\"http%3A%2F%2Fwww.suedtirolerland.it%2Fapi%2Fmap%2FgetMarkerTplM%2F%3Fmarker_id%3D2829%26project_id%3D15%26lang_id%3D9\",\"marker\":\"http://url.com/marker.png\"}]}"]; 46 | NSString *title = [[NSString alloc] initWithString:[converted[0] valueForKey:@"title"]]; 47 | NSLog(@"CONVERTED TITLE: %@", title); 48 | STAssertEqualObjects(title, @"Penegal", @"Convert failed"); 49 | } 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /Mixare.xcodeproj/xcuserdata/jakob.xcuserdatad/xcschemes/Mixare.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 10 | 11 | 12 | 13 | 22 | 23 | 29 | 30 | 31 | 32 | 36 | 37 | 38 | 39 | 40 | 41 | 48 | 49 | 55 | 56 | 57 | 58 | 62 | 63 | 64 | 65 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /Classes/extensions/datainputs/ZBarSDK/Headers/ZBarSDK/ZBarImage.h: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------ 2 | // Copyright 2009 (c) Jeff Brown 3 | // 4 | // This file is part of the ZBar Bar Code Reader. 5 | // 6 | // The ZBar Bar Code Reader is free software; you can redistribute it 7 | // and/or modify it under the terms of the GNU Lesser Public License as 8 | // published by the Free Software Foundation; either version 2.1 of 9 | // the License, or (at your option) any later version. 10 | // 11 | // The ZBar Bar Code Reader is distributed in the hope that it will be 12 | // useful, but WITHOUT ANY WARRANTY; without even the implied warranty 13 | // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU Lesser Public License for more details. 15 | // 16 | // You should have received a copy of the GNU Lesser Public License 17 | // along with the ZBar Bar Code Reader; if not, write to the Free 18 | // Software Foundation, Inc., 51 Franklin St, Fifth Floor, 19 | // Boston, MA 02110-1301 USA 20 | // 21 | // http://sourceforge.net/projects/zbar 22 | //------------------------------------------------------------------------ 23 | 24 | #import 25 | #import "zbar.h" 26 | #import "ZBarSymbol.h" 27 | 28 | #ifdef __cplusplus 29 | using namespace zbar; 30 | #endif 31 | 32 | // Obj-C wrapper for ZBar image 33 | 34 | @interface ZBarImage : NSObject 35 | { 36 | zbar_image_t *zimg; 37 | double t_convert; 38 | } 39 | 40 | @property (nonatomic) unsigned long format; 41 | @property (nonatomic) unsigned sequence; 42 | @property (nonatomic) CGSize size; 43 | @property (nonatomic) CGRect crop; 44 | @property (readonly, nonatomic) const void *data; 45 | @property (readonly, nonatomic) unsigned long dataLength; 46 | @property (copy, nonatomic) ZBarSymbolSet *symbols; 47 | @property (readonly, nonatomic) zbar_image_t *zbarImage; 48 | @property (readonly, nonatomic) UIImage *UIImage; 49 | 50 | - (id) initWithImage: (zbar_image_t*) image; 51 | - (id) initWithCGImage: (CGImageRef) image; 52 | - (id) initWithCGImage: (CGImageRef) image 53 | size: (CGSize) size; 54 | - (id) initWithCGImage: (CGImageRef) image 55 | crop: (CGRect) crop 56 | size: (CGSize) size; 57 | 58 | - (void) setData: (const void*) data 59 | withLength: (unsigned long) length; 60 | - (UIImage*) UIImageWithOrientation: (UIImageOrientation) imageOrientation; 61 | - (void) cleanup; 62 | 63 | + (unsigned long) fourcc: (NSString*) format; 64 | 65 | #if 0 66 | - convertToFormat: (unsigned long) format; 67 | #endif 68 | 69 | @end 70 | -------------------------------------------------------------------------------- /UnitTests/WikipediaProcessorTest.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // WikipediaProcessorTest.m 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 18-10-12. 24 | // 25 | 26 | #import "WikipediaProcessorTest.h" 27 | 28 | @implementation WikipediaProcessorTest 29 | 30 | - (void)setUp { 31 | [super setUp]; 32 | } 33 | 34 | - (void)tearDown { 35 | [super tearDown]; 36 | } 37 | 38 | - (void)testCreateWikipediaProcessor { 39 | id processor = [[WikipediaProcessor alloc] init]; 40 | STAssertNotNil(processor, @"Not created"); 41 | } 42 | 43 | - (void)testConvertWikipediaData { 44 | id processor = [[WikipediaProcessor alloc] init]; 45 | NSMutableArray* converted = [processor convert:@"{\"geonames\":[{\"summary\":\"De Woensdrechtse Heide is een natuurgebied van 69 ha, dat eigendom is van Defensie. Het betreft een militair oefenterrein dat ingeklemd ligt tussen Vliegbasis Woensdrecht, landgoed Mattemburgh, en Zurenhoek. Het gebied bestaat uit heide, stuifzand en naaldbos. De heide werd geregenereerd (...)\",\"distance\":\"0\",\"rank\":7,\"title\":\"Woensdrechtse Heide\",\"wikipediaUrl\":\"nl.wikipedia.org/wiki/Woensdrechtse_Heide\",\"lng\":0,\"lang\":\"nl\",\"lat\":0},{\"summary\":\"De evenaar, evennachtslijn of equator is een denkbeeldige lijn op het aardoppervlak in de vorm van een grootcirkel midden tussen de polen. De evenaar verdeelt de aarde in een noordelijk halfrond en een zuidelijk halfrond (...)\",\"distance\":\"0\",\"rank\":98,\"title\":\"Evenaar\",\"wikipediaUrl\":\"nl.wikipedia.org/wiki/Evenaar\",\"lng\":0,\"thumbnailImg\":\"http://www.geonames.org/img/wikipedia/141000/thumb-140512-100.jpg\",\"lang\":\"nl\",\"lat\":0}]}"]; 46 | NSString *title = [[NSString alloc] initWithString:[converted[0] valueForKey:@"title"]]; 47 | NSLog(@"CONVERTED TITLE: %@", title); 48 | STAssertEqualObjects(title, @"Woensdrechtse Heide", @"Convert failed"); 49 | } 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /Classes/extensions/datainputs/ZBarSDK/Headers/ZBarSDK/ZBarSymbol.h: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------ 2 | // Copyright 2009-2010 (c) Jeff Brown 3 | // 4 | // This file is part of the ZBar Bar Code Reader. 5 | // 6 | // The ZBar Bar Code Reader is free software; you can redistribute it 7 | // and/or modify it under the terms of the GNU Lesser Public License as 8 | // published by the Free Software Foundation; either version 2.1 of 9 | // the License, or (at your option) any later version. 10 | // 11 | // The ZBar Bar Code Reader is distributed in the hope that it will be 12 | // useful, but WITHOUT ANY WARRANTY; without even the implied warranty 13 | // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU Lesser Public License for more details. 15 | // 16 | // You should have received a copy of the GNU Lesser Public License 17 | // along with the ZBar Bar Code Reader; if not, write to the Free 18 | // Software Foundation, Inc., 51 Franklin St, Fifth Floor, 19 | // Boston, MA 02110-1301 USA 20 | // 21 | // http://sourceforge.net/projects/zbar 22 | //------------------------------------------------------------------------ 23 | 24 | #import 25 | #import 26 | #import "zbar.h" 27 | 28 | #ifdef __cplusplus 29 | using namespace zbar; 30 | #endif 31 | 32 | // Obj-C wrapper for ZBar result types 33 | 34 | @interface ZBarSymbolSet 35 | : NSObject 36 | { 37 | const zbar_symbol_set_t *set; 38 | BOOL filterSymbols; 39 | } 40 | 41 | @property (readonly, nonatomic) int count; 42 | @property (readonly, nonatomic) const zbar_symbol_set_t *zbarSymbolSet; 43 | @property (nonatomic) BOOL filterSymbols; 44 | 45 | - (id) initWithSymbolSet: (const zbar_symbol_set_t*) set; 46 | 47 | @end 48 | 49 | 50 | @interface ZBarSymbol : NSObject 51 | { 52 | const zbar_symbol_t *symbol; 53 | } 54 | 55 | @property (readonly, nonatomic) zbar_symbol_type_t type; 56 | @property (readonly, nonatomic) NSString *typeName; 57 | @property (readonly, nonatomic) NSUInteger configMask; 58 | @property (readonly, nonatomic) NSUInteger modifierMask; 59 | @property (readonly, nonatomic) NSString *data; 60 | @property (readonly, nonatomic) int quality; 61 | @property (readonly, nonatomic) int count; 62 | @property (readonly, nonatomic) zbar_orientation_t orientation; 63 | @property (readonly, nonatomic) ZBarSymbolSet *components; 64 | @property (readonly, nonatomic) const zbar_symbol_t *zbarSymbol; 65 | @property (readonly, nonatomic) CGRect bounds; 66 | 67 | - (id) initWithSymbol: (const zbar_symbol_t*) symbol; 68 | 69 | + (NSString*) nameForType: (zbar_symbol_type_t) type; 70 | 71 | @end 72 | -------------------------------------------------------------------------------- /Classes/reality/PoiItem.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | 20 | #import "PoiItem.h" 21 | 22 | @implementation PoiItem 23 | 24 | @synthesize radialDistance, inclination, azimuth; 25 | @synthesize radarPos = _radarPos, position, geoLocation; 26 | 27 | - (id)initCoordinateWithRadialDistance:(double)newRadialDistance inclination:(double)newInclination azimuth:(double)newAzimuth { 28 | self = [super init]; 29 | radialDistance = newRadialDistance; 30 | inclination = newInclination; 31 | azimuth = newAzimuth; 32 | return self; 33 | } 34 | 35 | - (id)initWithLatitude:(float)lat longitude:(float)lon altitude:(CGFloat)alt position:(Position*)pos { 36 | self = [super init]; 37 | geoLocation = [[CLLocation alloc] initWithCoordinate:CLLocationCoordinate2DMake(lat, lon) altitude:alt horizontalAccuracy:1.0 verticalAccuracy:1.0 timestamp:nil]; 38 | position = pos; 39 | return self; 40 | } 41 | 42 | - (float)angleFromCoordinate:(CLLocationCoordinate2D)first toCoordinate:(CLLocationCoordinate2D)second { 43 | float longitudinalDifference = second.longitude - first.longitude; 44 | float latitudinalDifference = second.latitude - first.latitude; 45 | float possibleAzimuth = (M_PI * .5f) - atan(latitudinalDifference / longitudinalDifference); 46 | if (longitudinalDifference > 0) return possibleAzimuth; 47 | else if (longitudinalDifference < 0) return possibleAzimuth + M_PI; 48 | else if (latitudinalDifference < 0) return M_PI; 49 | return 0.0f; 50 | } 51 | 52 | - (void)calibrateUsingOrigin:(CLLocation*)origin { 53 | if (!geoLocation) return; 54 | double baseDistance = [origin distanceFromLocation: geoLocation]; 55 | self.radialDistance = sqrt(pow(origin.altitude - geoLocation.altitude, 2) + pow(baseDistance, 2)); 56 | float angle = sin(ABS(origin.altitude - geoLocation.altitude) / self.radialDistance); 57 | if (origin.altitude > geoLocation.altitude) angle = -angle; 58 | self.inclination = angle; 59 | self.azimuth = [self angleFromCoordinate:origin.coordinate toCoordinate:geoLocation.coordinate]; 60 | } 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /Classes/dataconverter/json/JSON.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009-2010 Stig Brautaset. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of the author nor the names of its contributors may be used 15 | to endorse or promote products derived from this software without specific 16 | prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | /** 31 | @mainpage A strict JSON parser and generator for Objective-C 32 | 33 | JSON (JavaScript Object Notation) is a lightweight data-interchange 34 | format. This framework provides two apis for parsing and generating 35 | JSON. One standard object-based and a higher level api consisting of 36 | categories added to existing Objective-C classes. 37 | 38 | This framework does its best to be as strict as possible, both in what it accepts and what it generates. For example, it does not support trailing commas in arrays or objects. Nor does it support embedded comments, or anything else not in the JSON specification. This is considered a feature. 39 | 40 | @section Links 41 | 42 | @li Project home page. 43 | @li Online version of the API documentation. 44 | 45 | */ 46 | 47 | // This setting of 1 is best if you copy the source into your project. 48 | // The build transforms the 1 to a 0 when building the framework and static lib. 49 | 50 | #import "SBJsonParser.h" 51 | #import "SBJsonWriter.h" 52 | #import "NSObject+SBJSON.h" 53 | #import "NSString+SBJSON.h" 54 | -------------------------------------------------------------------------------- /Classes/dataconverter/json/SBJsonBase.m: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009 Stig Brautaset. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of the author nor the names of its contributors may be used 15 | to endorse or promote products derived from this software without specific 16 | prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #import "SBJsonBase.h" 31 | 32 | NSString * SBJSONErrorDomain = @"org.brautaset.JSON.ErrorDomain"; 33 | 34 | @implementation SBJsonBase 35 | 36 | @synthesize errorTrace; 37 | @synthesize maxDepth; 38 | 39 | - (id)init { 40 | self = [super init]; 41 | if (self) 42 | self.maxDepth = 512; 43 | return self; 44 | } 45 | 46 | - (void)addErrorWithCode:(NSUInteger)code description:(NSString*)str { 47 | NSDictionary *userInfo; 48 | if (!errorTrace) { 49 | errorTrace = [NSMutableArray new]; 50 | userInfo = @{NSLocalizedDescriptionKey: str}; 51 | 52 | } else { 53 | userInfo = @{NSLocalizedDescriptionKey: str, 54 | NSUnderlyingErrorKey: [errorTrace lastObject]}; 55 | } 56 | 57 | NSError *error = [NSError errorWithDomain:SBJSONErrorDomain code:code userInfo:userInfo]; 58 | 59 | [self willChangeValueForKey:@"errorTrace"]; 60 | [errorTrace addObject:error]; 61 | [self didChangeValueForKey:@"errorTrace"]; 62 | } 63 | 64 | - (void)clearErrorTrace { 65 | [self willChangeValueForKey:@"errorTrace"]; 66 | errorTrace = nil; 67 | [self didChangeValueForKey:@"errorTrace"]; 68 | } 69 | 70 | @end 71 | -------------------------------------------------------------------------------- /Mixare-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | de_DE 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleDocumentTypes 10 | 11 | CFBundleExecutable 12 | ${EXECUTABLE_NAME} 13 | CFBundleIconFiles 14 | 15 | mixare-logo_114x114_72_dpi.png 16 | mixare-logo_57x57_72_dpi.png 17 | mixare-logo_114x114_72_dpi.png 18 | mixare-logo_57x57_72_dpi.png 19 | 20 | CFBundleIcons 21 | 22 | CFBundlePrimaryIcon 23 | 24 | CFBundleIconFiles 25 | 26 | mixare-logo_114x114_72_dpi.png 27 | mixare-logo_57x57_72_dpi.png 28 | mixare-logo_114x114_72_dpi.png 29 | mixare-logo_57x57_72_dpi.png 30 | 31 | UIPrerenderedIcon 32 | 33 | 34 | 35 | CFBundleIdentifier 36 | org.mixare.mixare 37 | CFBundleInfoDictionaryVersion 38 | 6.0 39 | CFBundleName 40 | ${PRODUCT_NAME} 41 | CFBundlePackageType 42 | APPL 43 | CFBundleShortVersionString 44 | 1.0 45 | CFBundleSignature 46 | ???? 47 | CFBundleURLTypes 48 | 49 | 50 | CFBundleTypeRole 51 | Editor 52 | CFBundleURLIconFile 53 | mixare-logo_57x57_72_dpi 54 | CFBundleURLName 55 | org.mixare.mixare 56 | CFBundleURLSchemes 57 | 58 | mixare 59 | 60 | 61 | 62 | CFBundleVersion 63 | 1.0 64 | LSRequiresIPhoneOS 65 | 66 | UIPrerenderedIcon 67 | 68 | UIRequiredDeviceCapabilities 69 | 70 | wifi 71 | still-camera 72 | accelerometer 73 | location-services 74 | gps 75 | magnetometer 76 | 77 | UISupportedInterfaceOrientations 78 | 79 | UIInterfaceOrientationPortrait 80 | UIInterfaceOrientationLandscapeRight 81 | UIInterfaceOrientationLandscapeLeft 82 | 83 | UTExportedTypeDeclarations 84 | 85 | UTImportedTypeDeclarations 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /Classes/extensions/dataprocessors/MixareProcessor.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // MixareProcessor.m 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 15-10-12. 24 | // 25 | 26 | #import "MixareProcessor.h" 27 | #import "Resources.h" 28 | 29 | @implementation MixareProcessor 30 | 31 | - (BOOL)matchesDataType:(NSString*)title { 32 | return YES; 33 | } 34 | 35 | - (NSMutableArray*)convert:(NSString*)dataString { 36 | if (![dataString isEqualToString:@""]) { 37 | NSDictionary* data = [dataString JSONValue]; 38 | NSMutableArray* ret = [[NSMutableArray alloc] init]; 39 | NSArray* geonames = data[@"results"]; 40 | for(NSDictionary *geoname in geonames){ 41 | NSMutableDictionary *dic = [[NSMutableDictionary alloc] init]; 42 | [self setData:@"title" dataDictionary:geoname newKey:@"title" newDictionary:dic]; 43 | [self setData:@"webpage" dataDictionary:geoname newKey:@"url" newDictionary:dic]; 44 | [self setData:@"lng" dataDictionary:geoname newKey:@"longitude" newDictionary:dic]; 45 | [self setData:@"lat" dataDictionary:geoname newKey:@"latitude" newDictionary:dic]; 46 | [self setData:@"elevation" dataDictionary:geoname newKey:@"altitude" newDictionary:dic]; 47 | [self setData:@"imagemarker" dataDictionary:geoname newKey:@"marker" newDictionary:dic]; 48 | if (geoname[@"logo"] != [NSNull null] && geoname[@"logo"] != nil) { 49 | dic[keys[@"logo"]] = geoname[@"logo"]; 50 | } else { 51 | dic[keys[@"logo"]] = [[[Resources getInstance] bundle] pathForResource:@"logo_mixare_round" ofType:@"png"]; 52 | } 53 | [ret addObject:dic]; 54 | } 55 | return ret; 56 | } else return nil; 57 | } 58 | 59 | - (void)setData:(NSString*)dataKey dataDictionary:(NSDictionary*)dataDic newKey:(NSString*)key newDictionary:(NSMutableDictionary*)dic { 60 | if (dataDic[dataKey] != [NSNull null] && dataDic[dataKey] != nil) { 61 | dic[keys[key]] = dataDic[dataKey]; 62 | } 63 | } 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /UnitTests/DataSourceTest.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // DataSourceTest.m 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 24-09-12. 24 | // 25 | 26 | #import "DataSourceTest.h" 27 | #import "DataConverter.h" 28 | 29 | @implementation DataSourceTest 30 | 31 | - (void)setUp { 32 | [super setUp]; 33 | location = [[[CLLocationManager alloc] init] location]; 34 | } 35 | 36 | - (void)tearDown { 37 | [super tearDown]; 38 | } 39 | 40 | - (void)testCreateWikipediaDatasource { 41 | wikipedia = [[DataSource alloc] initTitle:@"Wikipedia" jsonUrl:@"http://ws.geonames.org/findNearbyWikipediaJSON?lat=PARAM_LAT&lng=PARAM_LON&radius=PARAM_RAD&maxRows=50&lang=PARAM_LANG" locked:NO]; 42 | NSLog(@"Wikipedia JSONURL: %@", [wikipedia jsonUrl]); 43 | [wikipedia setActivated:YES]; 44 | if ([wikipedia activated]) { 45 | NSLog(@"Wikipedia activated: YES"); 46 | } else { 47 | NSLog(@"Wikipedia activated: NO"); 48 | } 49 | STAssertNotNil(wikipedia, @"Could not create datasource object."); 50 | } 51 | 52 | - (void)testCreateTwitterDatasource { 53 | twitter = [[DataSource alloc] initTitle:@"Twitter" jsonUrl:@"http://search.twitter.com/search.json?geocode=PARAM_LAT,PARAM_LON,PARAM_RADkm" locked:NO]; 54 | [twitter setActivated:YES]; 55 | STAssertNotNil(twitter, @"Could not create datasource object."); 56 | } 57 | 58 | - (void)testCreatePositionsFromDatasource { 59 | [self testCreateWikipediaDatasource]; 60 | [self testCreateTwitterDatasource]; 61 | [[DataConverter getInstance] convertData:wikipedia currentLocation:location currentRadius:3.5]; 62 | [[DataConverter getInstance] convertData:twitter currentLocation:location currentRadius:3.5]; 63 | BOOL test = true; 64 | if ([wikipedia.positions count] == 0) { 65 | test = false; 66 | } 67 | if ([twitter.positions count] == 0) { 68 | test = false; 69 | } 70 | NSLog(@"Wikipedia positions: %d", [wikipedia.positions count]); 71 | NSLog(@"Twitter positions: %d", [twitter.positions count]); 72 | STAssertTrue(test, @"Not all positions exists"); 73 | } 74 | 75 | @end -------------------------------------------------------------------------------- /Classes/extensions/dataprocessors/WikipediaProcessor.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // WikipediaProcessor.m 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 15-10-12. 24 | // 25 | 26 | #import "WikipediaProcessor.h" 27 | 28 | @implementation WikipediaProcessor 29 | 30 | - (id)init { 31 | self = [super init]; 32 | return self; 33 | } 34 | 35 | - (BOOL)matchesDataType:(NSString*)title { 36 | if ([title isEqualToString:@"Wikipedia"]) { 37 | return YES; 38 | } 39 | return NO; 40 | } 41 | 42 | - (NSMutableArray*)convert:(NSString*)dataString { 43 | if (dataString != nil) { 44 | NSDictionary *data = [dataString JSONValue]; 45 | NSMutableArray *ret = [[NSMutableArray alloc] init]; 46 | NSArray *geonames = data[@"geonames"]; 47 | for (NSDictionary *geoname in geonames) { 48 | [ret addObject:@{ 49 | keys[@"title"]: geoname[@"title"], 50 | keys[@"summary"]: geoname[@"summary"], 51 | keys[@"url"]: [NSString stringWithFormat:@"http://%@", geoname[@"wikipediaUrl"]], 52 | keys[@"longitude"]: geoname[@"lng"], 53 | keys[@"latitude"]: geoname[@"lat"], 54 | keys[@"marker"]: @"wikipedia_logo_small.png", 55 | keys[@"logo"]: @"wikipedia_logo.png"}]; 56 | } 57 | return ret; 58 | } 59 | return nil; 60 | } 61 | 62 | /*** 63 | * 64 | * @OVERRIDE 65 | * Initialize location data for URL 66 | * Wikipedia API radius = max 20km 67 | * 68 | ***/ 69 | - (void)initUrlValues:(CLLocation*)loc radius:(float)rad { 70 | NSString *language = [NSLocale preferredLanguages][0]; 71 | urlValueData[@"PARAM_LAT"] = [[NSString alloc] initWithFormat:@"%f", loc.coordinate.latitude]; 72 | urlValueData[@"PARAM_LON"] = [[NSString alloc] initWithFormat:@"%f", loc.coordinate.longitude]; 73 | urlValueData[@"PARAM_ALT"] = [[NSString alloc] initWithFormat:@"%f", loc.altitude]; 74 | urlValueData[@"PARAM_LANG"] = language; 75 | if (rad > 20) { 76 | rad = 20; 77 | } 78 | urlValueData[@"PARAM_RAD"] = [[NSString alloc] initWithFormat:@"%f", rad]; 79 | } 80 | 81 | @end 82 | -------------------------------------------------------------------------------- /UnitTests/DownloadManagerTest.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // DownloadManagerTest.m 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 23-10-12. 24 | // 25 | 26 | #import "DownloadManagerTest.h" 27 | 28 | @implementation DownloadManagerTest 29 | 30 | - (void)setUp { 31 | [super setUp]; 32 | dataSourceManager = [[DataSourceManager alloc] init]; 33 | locationManager = [[CLLocationManager alloc] init]; 34 | } 35 | 36 | - (void)tearDown { 37 | [super tearDown]; 38 | } 39 | 40 | - (void)testDownloadData { 41 | DownloadManager *downloadManager = [[DownloadManager alloc] init]; 42 | [downloadManager download:[dataSourceManager getActivatedSources] currentLocation:locationManager.location currentRadius:3.5]; 43 | DataSource *data = [dataSourceManager getDataSourceByTitle:@"Wikipedia"]; 44 | NSLog(@"Data positions after download: %d", data.positions.count); 45 | BOOL check; 46 | if (data.positions.count > 0) { 47 | check = YES; 48 | } else { 49 | check = NO; 50 | } 51 | STAssertTrue(check, @"Positions should be filled"); 52 | } 53 | 54 | - (void)testAfterDownloadReadData { 55 | DownloadManager *downloadManager = [[DownloadManager alloc] init]; 56 | [downloadManager download:[dataSourceManager getActivatedSources] currentLocation:locationManager.location currentRadius:3.5]; 57 | for (DataSource *data in [dataSourceManager getActivatedSources]) { 58 | if ([data.title isEqualToString:@"Twitter"]) { 59 | data.activated = NO; 60 | } 61 | } 62 | [downloadManager download:[dataSourceManager getActivatedSources] currentLocation:locationManager.location currentRadius:3.5]; 63 | [downloadManager download:[dataSourceManager getActivatedSources] currentLocation:locationManager.location currentRadius:3.5]; 64 | for (DataSource *data in [dataSourceManager getActivatedSources]) { 65 | if ([data.title isEqualToString:@"Twitter"]) { 66 | data.activated = YES; 67 | } 68 | } 69 | [downloadManager download:[dataSourceManager getActivatedSources] currentLocation:locationManager.location currentRadius:3.5]; 70 | [downloadManager download:[dataSourceManager getActivatedSources] currentLocation:locationManager.location currentRadius:3.5]; 71 | } 72 | 73 | @end 74 | -------------------------------------------------------------------------------- /UnitTests/GoogleAddressesProcessorTest.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // GoogleAddressesProcessorTest.m 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 18-12-12. 24 | // 25 | 26 | #import "GoogleAddressesProcessorTest.h" 27 | 28 | @implementation GoogleAddressesProcessorTest 29 | 30 | - (void)setUp { 31 | [super setUp]; 32 | } 33 | 34 | - (void)tearDown { 35 | [super tearDown]; 36 | } 37 | 38 | - (void)testCreateGoogleAddressesProcessor { 39 | id processor = [[GoogleAddressesProcessor alloc] init]; 40 | STAssertNotNil(processor, @"Not created"); 41 | } 42 | 43 | - (void)testConvertGoogleAddressesData { 44 | id processor = [[GoogleAddressesProcessor alloc] init]; 45 | NSMutableArray* converted = [processor convert:@"{\"results\":[{\"address_components\":[{\"long_name\":\"46\",\"short_name\":\"46\",\"types\":[\"street_number\"]},{\"long_name\":\"Stationsplein\",\"short_name\":\"Stationsplein\",\"types\":[\"route\"]},{\"long_name\":\"C.S. Kwartier\",\"short_name\":\"C.S. Kwartier\",\"types\":[\"sublocality\",\"political\"]},{\"long_name\":\"Centrum\",\"short_name\":\"Centrum\",\"types\":[\"sublocality\",\"political\"]},{\"long_name\":\"Rotterdam\",\"short_name\":\"Rotterdam\",\"types\":[\"locality\",\"political\"]},{\"long_name\":\"Rotterdam\",\"short_name\":\"Rotterdam\",\"types\":[\"administrative_area_level_2\",\"political\"]},{\"long_name\":\"Zuid-Holland\",\"short_name\":\"ZH\",\"types\":[\"administrative_area_level_1\",\"political\"]},{\"long_name\":\"Nederland\",\"short_name\":\"NL\",\"types\":[\"country\",\"political\"]},{\"long_name\":\"3013 AK\",\"short_name\":\"3013 AK\",\"types\":[\"postal_code\"]}],\"formatted_address\":\"Stationsplein 46, 3013 AK Rotterdam, Nederland\",\"geometry\":{\"location\":{\"lat\":51.92339830,\"lng\":4.46913610},\"location_type\":\"ROOFTOP\",\"viewport\":{\"northeast\":{\"lat\":51.92474728029150,\"lng\":4.470485080291502},\"southwest\":{\"lat\":51.92204931970850,\"lng\":4.467787119708498}}},\"types\":[\"street_address\"]}],\"status\":\"OK\"}"]; 46 | NSString *title = [[NSString alloc] initWithString:[converted[0] valueForKey:@"title"]]; 47 | NSLog(@"CONVERTED TITLE: %@", title); 48 | STAssertEqualObjects(title, @"Stationsplein 46, 3013 AK Rotterdam, Nederland", @"Convert failed"); 49 | } 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /Classes/plugin/PluginLoader.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // PluginLoader.m 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 12-11-12. 24 | // 25 | 26 | #import "PluginLoader.h" 27 | #import "PluginList.h" 28 | 29 | #import "DataProcessor.h" 30 | #import "DataInput.h" 31 | #import "PluginEntryPoint.h" 32 | 33 | @implementation PluginLoader 34 | 35 | static PluginLoader *pluginLoader; 36 | 37 | + (void)initialize { 38 | if (self == [PluginLoader class]){ 39 | pluginLoader = [[PluginLoader alloc] init]; 40 | } 41 | } 42 | 43 | + (id)getInstance { 44 | return pluginLoader; 45 | } 46 | 47 | - (id)init { 48 | self = [super init]; 49 | if (self) { 50 | plugins = [[NSMutableArray alloc] init]; 51 | [self addArrayOfPlugins:[[PluginList getInstance] plugins]]; 52 | [self addPlugin:[[PluginList getInstance] defaultProcessor]]; 53 | } 54 | return self; 55 | } 56 | 57 | - (void)addPlugin:(id)plugin { 58 | if ([plugin conformsToProtocol:@protocol(DataProcessor)] || [plugin conformsToProtocol:@protocol(DataInput)] || [plugin conformsToProtocol:@protocol(PluginEntryPoint)]) { 59 | [plugins addObject:plugin]; 60 | } else { 61 | NSLog(@"Plugin type not valid from class: %@", NSStringFromClass([plugin class])); 62 | } 63 | } 64 | 65 | - (void)addArrayOfPlugins:(NSMutableArray*)pluginz { 66 | for (id plugin in pluginz) { 67 | [self addPlugin:plugin]; 68 | } 69 | } 70 | 71 | - (NSMutableArray*)getPluginsFromClassName:(NSString*)className { 72 | NSMutableArray *retrievedPlugins = [[NSMutableArray alloc] init]; 73 | for (id plugin in plugins) { 74 | if ([className isEqualToString:@"DataProcessor"]) { 75 | if ([plugin conformsToProtocol:@protocol(DataProcessor)]) { 76 | [retrievedPlugins addObject:plugin]; 77 | } 78 | } else if ([className isEqualToString:@"DataInput"]) { 79 | if ([plugin conformsToProtocol:@protocol(DataInput)]) { 80 | [retrievedPlugins addObject:plugin]; 81 | } 82 | } else { 83 | if ([plugin conformsToProtocol:@protocol(PluginEntryPoint)]) { 84 | [retrievedPlugins addObject:plugin]; 85 | } 86 | } 87 | } 88 | return retrievedPlugins; 89 | } 90 | 91 | @end 92 | -------------------------------------------------------------------------------- /Classes/extensions/DataSourceList.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // DataSourceList.m 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 15-11-12. 24 | // 25 | 26 | /*** *** 27 | * * 28 | * --- INITIALIZE YOUR DATASOURCES [before starting app] --- * 29 | * * 30 | *** ***/ 31 | 32 | #import "DataSourceList.h" 33 | #import "DataSource.h" 34 | 35 | @implementation DataSourceList 36 | 37 | @synthesize dataSources; 38 | 39 | static DataSourceList *dataSourceList; 40 | 41 | + (void)initialize { 42 | if (self == [DataSourceList class]) { 43 | dataSourceList = [[DataSourceList alloc] init]; 44 | } 45 | } 46 | 47 | + (id)getInstance { 48 | return dataSourceList; 49 | } 50 | 51 | - (id)init { 52 | self = [super init]; 53 | if (self) { 54 | dataSources = [[NSMutableArray alloc] init]; 55 | [self initDataSources]; 56 | } 57 | return self; 58 | } 59 | 60 | /*** 61 | * 62 | * ADD YOUR DATASOURCES WITH addDataSource method. 63 | * App will pre-load your data 64 | * Users can't delete your source if you call 'locked' true/yes. 65 | * 66 | * GOOD TO KNOW: DataSource title will be used to match with the right DataProcessor 67 | * (not needed when your JSON result structure/encoding is the same as the Mixare standard). 68 | * 69 | * TIP: If your datasource url has GET-parameters (for dynamic results), 70 | * you can replace these parameters with dummy-parameters 71 | * so the Super-class JsonData.h (of the used DataProcessor) will recognizes and replaces with realtime data. 72 | * 73 | * PARAMS: Latitude: PARAM_LAT 74 | * Longitude: PARAM_LON 75 | * Altitude: PARAM_ALT 76 | * Radius: PARAM_RAD 77 | * 78 | * EXAMPLE: example.com/json/theurl.php?lat=PARAM_LAT&lon=PARAM_LON&alt=PARAM_ALT&radius=PARAM_RAD 79 | * 80 | ***/ 81 | - (void)initDataSources { 82 | 83 | } 84 | 85 | - (void)addDataSource:(NSString*)title dataUrl:(NSString*)url lockDeletable:(BOOL)lock { 86 | [dataSources addObject:[[DataSource alloc] initTitle:title jsonUrl:url locked:lock]]; 87 | } 88 | 89 | @end 90 | -------------------------------------------------------------------------------- /Classes/gui/guiControllers/PullRefreshTableViewController.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // PullRefreshTableViewController.h 21 | // Plancast 22 | // 23 | // Created by Leah Culver on 7/2/10. 24 | // Copyright (c) 2010 Leah Culver 25 | // 26 | // Permission is hereby granted, free of charge, to any person 27 | // obtaining a copy of this software and associated documentation 28 | // files (the "Software"), to deal in the Software without 29 | // restriction, including without limitation the rights to use, 30 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 31 | // copies of the Software, and to permit persons to whom the 32 | // Software is furnished to do so, subject to the following 33 | // conditions: 34 | // 35 | // The above copyright notice and this permission notice shall be 36 | // included in all copies or substantial portions of the Software. 37 | // 38 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 39 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 40 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 41 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 42 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 43 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 44 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 45 | // OTHER DEALINGS IN THE SOFTWARE. 46 | // 47 | 48 | #import 49 | 50 | @interface PullRefreshTableViewController : UITableViewController { 51 | UIView *refreshHeaderView; 52 | UILabel *refreshLabel; 53 | UIImageView *refreshArrow; 54 | UIActivityIndicatorView *refreshSpinner; 55 | BOOL isDragging; 56 | BOOL isLoading; 57 | NSString *textPull; 58 | NSString *textRelease; 59 | NSString *textLoading; 60 | } 61 | 62 | @property (nonatomic, strong) UIView *refreshHeaderView; 63 | @property (nonatomic, strong) UILabel *refreshLabel; 64 | @property (nonatomic, strong) UIImageView *refreshArrow; 65 | @property (nonatomic, strong) UIActivityIndicatorView *refreshSpinner; 66 | @property (nonatomic, copy) NSString *textPull; 67 | @property (nonatomic, copy) NSString *textRelease; 68 | @property (nonatomic, copy) NSString *textLoading; 69 | 70 | - (void)setupStrings; 71 | - (void)addPullToRefreshHeader; 72 | - (void)startLoading; 73 | - (void)stopLoading; 74 | - (void)refresh; 75 | 76 | @end 77 | -------------------------------------------------------------------------------- /Classes/dataconverter/json/SBJsonBase.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009 Stig Brautaset. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of the author nor the names of its contributors may be used 15 | to endorse or promote products derived from this software without specific 16 | prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #import 31 | 32 | extern NSString * SBJSONErrorDomain; 33 | 34 | enum { 35 | EUNSUPPORTED = 1, 36 | EPARSENUM, 37 | EPARSE, 38 | EFRAGMENT, 39 | ECTRL, 40 | EUNICODE, 41 | EDEPTH, 42 | EESCAPE, 43 | ETRAILCOMMA, 44 | ETRAILGARBAGE, 45 | EEOF, 46 | EINPUT 47 | }; 48 | 49 | /** 50 | @brief Common base class for parsing & writing. 51 | 52 | This class contains the common error-handling code and option between the parser/writer. 53 | */ 54 | @interface SBJsonBase : NSObject { 55 | NSMutableArray *errorTrace; 56 | 57 | @protected 58 | NSUInteger depth, maxDepth; 59 | } 60 | 61 | /** 62 | @brief The maximum recursing depth. 63 | 64 | Defaults to 512. If the input is nested deeper than this the input will be deemed to be 65 | malicious and the parser returns nil, signalling an error. ("Nested too deep".) You can 66 | turn off this security feature by setting the maxDepth value to 0. 67 | */ 68 | @property NSUInteger maxDepth; 69 | 70 | /** 71 | @brief Return an error trace, or nil if there was no errors. 72 | 73 | Note that this method returns the trace of the last method that failed. 74 | You need to check the return value of the call you're making to figure out 75 | if the call actually failed, before you know call this method. 76 | */ 77 | @property(copy,readonly) NSArray* errorTrace; 78 | 79 | /// @internal for use in subclasses to add errors to the stack trace 80 | - (void)addErrorWithCode:(NSUInteger)code description:(NSString*)str; 81 | 82 | /// @internal for use in subclasess to clear the error before a new parsing attempt 83 | - (void)clearErrorTrace; 84 | 85 | @end 86 | -------------------------------------------------------------------------------- /Classes/data/Position.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010- Peer internet solutions 3 | * 4 | * This file is part of mixare. 5 | * 6 | * This program is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see 18 | */ 19 | // 20 | // Position.m 21 | // Mixare 22 | // 23 | // Created by Aswin Ly on 24-09-12. 24 | // 25 | 26 | #import "Position.h" 27 | #import "DataSource.h" 28 | 29 | @implementation Position 30 | 31 | @synthesize mapViewAnnotation, poiItem, title, summary, url, source, longitude, altitude, latitude, image; 32 | 33 | - (id)initWithTitle:(NSString*)tit withSummary:(NSString*)sum withUrl:(NSString*)u withLatitude:(float)lat withLongitude:(float)lon withAltitude:(CGFloat)alt withSource:(DataSource*)sour { 34 | self = [super init]; 35 | title = tit; 36 | summary = sum; 37 | url = u; 38 | latitude = lat; 39 | longitude = lon; 40 | altitude = alt; 41 | source = sour; 42 | [self initMarkerAndMapAnnotation]; 43 | return self; 44 | } 45 | 46 | - (void)initMarkerAndMapAnnotation { 47 | mapViewAnnotation = [[MapViewAnnotation alloc] initWithLatitude:latitude longitude:longitude position:self]; 48 | [mapViewAnnotation setTitle:title]; 49 | [mapViewAnnotation setSubTitle:summary]; 50 | poiItem = [[PoiItem alloc] initWithLatitude:latitude longitude:longitude altitude:altitude position:self]; 51 | } 52 | 53 | - (void)setMarker:(NSString*)marker { 54 | if ([self isImageUrl:marker]) { 55 | NSURL *urls = [NSURL URLWithString:marker]; 56 | NSData *data = [NSData dataWithContentsOfURL:urls]; 57 | image = [self imageWithImage:[UIImage imageWithData:data] scaledToSize:CGSizeMake(30, 30)]; 58 | } else if (marker != nil) { 59 | image = [UIImage imageNamed:marker]; 60 | } 61 | } 62 | 63 | - (BOOL)isImageUrl:(NSString*)urls { 64 | NSArray *elements = @[@"http", @"."]; 65 | for (NSString *element in elements) { 66 | if ([urls rangeOfString:element].location == NSNotFound) { 67 | return NO; 68 | } 69 | } 70 | NSArray *possibleFiles = @[@"jpeg", @"png", @"jpg", @"_mini"]; 71 | for (NSString *file in possibleFiles) { 72 | if ([urls rangeOfString:file].location != NSNotFound) { 73 | return YES; 74 | } 75 | } 76 | return NO; 77 | } 78 | 79 | - (UIImage *)imageWithImage:(UIImage *)img scaledToSize:(CGSize)newSize { 80 | //UIGraphicsBeginImageContext(newSize); 81 | UIGraphicsBeginImageContextWithOptions(newSize, NO, 0.0); 82 | [img drawInRect:CGRectMake(0, 0, newSize.width, newSize.height)]; 83 | UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext(); 84 | UIGraphicsEndImageContext(); 85 | return newImage; 86 | } 87 | 88 | @end 89 | --------------------------------------------------------------------------------