Adding ViroKit. Needs AWSCore :(

This commit is contained in:
John Lyon-Smith
2018-03-27 17:46:15 -07:00
parent 2ab15e7dc1
commit 02e06dface
844 changed files with 86921 additions and 21 deletions

View File

@@ -0,0 +1,46 @@
//
// VROARNodeDelegateiOS.h
// ViroKit
//
// Created by Andy Chu on 7/3/17.
// Copyright © 2017 Viro Media. All rights reserved.
//
#ifndef VROARNodeDelegateiOS_h
#define VROARNodeDelegateiOS_h
#import "VROARDeclarativeNodeDelegate.h"
#import <Foundation/Foundation.h>
@protocol VROARNodeDelegateProtocol<NSObject>
@required
- (void)onARAnchorAttached:(std::shared_ptr<VROARAnchor>) anchor;
- (void)onARAnchorUpdated:(std::shared_ptr<VROARAnchor>) anchor;
- (void)onARAnchorRemoved;
@end
class VROARNodeDelegateiOS : public VROARDeclarativeNodeDelegate {
public:
VROARNodeDelegateiOS(id<VROARNodeDelegateProtocol> delegate) :
_delegate(delegate) {}
virtual ~VROARNodeDelegateiOS() {}
virtual void onARAnchorAttached(std::shared_ptr<VROARAnchor> anchor) {
[_delegate onARAnchorAttached:anchor];
}
virtual void onARAnchorUpdated(std::shared_ptr<VROARAnchor> anchor) {
[_delegate onARAnchorUpdated:anchor];
}
virtual void onARAnchorRemoved() {
[_delegate onARAnchorRemoved];
}
private:
__weak id<VROARNodeDelegateProtocol> _delegate;
};
#endif /* VROARNodeDelegateiOS_h */