From 244664656c240ab05d5b748c2b83fb8e71070a37 Mon Sep 17 00:00:00 2001 From: ludruda Date: Fri, 4 Jun 2021 11:47:28 +0200 Subject: [PATCH] adding license and copyright header --- LICENSE | 21 +++++++++++++++++++++ src/App.tsx | 3 +++ src/CardView.tsx | 3 +++ src/Chart.tsx | 3 +++ src/FileUpload.tsx | 3 +++ src/Home.tsx | 3 +++ src/Logs.tsx | 3 +++ src/Registration.tsx | 3 +++ src/Settings.tsx | 3 +++ src/Welcome.tsx | 3 +++ src/components/bottomPopup.tsx | 3 +++ src/components/button.tsx | 3 +++ src/components/buttonGroup.tsx | 3 +++ src/components/card.tsx | 3 +++ src/components/circularProgress.tsx | 3 +++ src/components/form.tsx | 3 +++ src/components/headerCloseButton.tsx | 3 +++ src/components/index.ts | 3 +++ src/components/loader.tsx | 3 +++ src/components/map.tsx | 3 +++ src/components/options.tsx | 3 +++ src/components/qrcodeScanner.tsx | 3 +++ src/components/screenview.tsx | 3 +++ src/components/typography.tsx | 3 +++ src/contexts/defaults.ts | 3 +++ src/contexts/index.ts | 3 +++ src/contexts/iotc.tsx | 3 +++ src/contexts/logs.tsx | 3 +++ src/contexts/storage.tsx | 3 +++ src/contexts/theme.tsx | 3 +++ src/globals.d.ts | 3 +++ src/hooks/common.ts | 3 +++ src/hooks/index.ts | 3 +++ src/hooks/iotc.ts | 3 +++ src/hooks/layout.ts | 3 +++ src/mocks/iotcMock.ts | 3 +++ src/progress.d.ts | 3 +++ src/properties/deviceInfo.ts | 3 +++ src/properties/index.ts | 3 +++ src/properties/internal.ts | 3 +++ src/sensors/accelerometer.ts | 3 +++ src/sensors/barometer.ts | 3 +++ src/sensors/battery.ts | 3 +++ src/sensors/geolocation.ts | 3 +++ src/sensors/gyroscope.ts | 3 +++ src/sensors/health/googlefit/steps.ts | 3 +++ src/sensors/health/healthkit/climb.ts | 6 +++++- src/sensors/health/healthkit/steps.ts | 8 +++++--- src/sensors/health/internal.ts | 3 +++ src/sensors/index.ts | 3 +++ src/sensors/internal.ts | 3 +++ src/sensors/magnetometer.ts | 3 +++ src/strings.ts | 3 +++ src/tools/CustomLogger.ts | 3 +++ src/tools/EventLogger.ts | 8 +++++--- src/tools/Torch.ts | 3 +++ src/tools/WebhookLogger.ts | 8 +++++--- src/tools/index.ts | 3 +++ src/types.ts | 3 +++ 59 files changed, 203 insertions(+), 10 deletions(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..63447fd --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +Copyright (c) Microsoft Corporation. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/src/App.tsx b/src/App.tsx index 0fbf096..4103251 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import React, {useState, useEffect, useContext} from 'react'; import {View, Platform} from 'react-native'; import Settings from './Settings'; diff --git a/src/CardView.tsx b/src/CardView.tsx index 1fb9424..45098bb 100644 --- a/src/CardView.tsx +++ b/src/CardView.tsx @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import React from 'react'; import {View, FlatList, ViewStyle, TextStyle} from 'react-native'; import {ListItem} from 'react-native-elements'; diff --git a/src/Chart.tsx b/src/Chart.tsx index c0f66a8..7519c1e 100644 --- a/src/Chart.tsx +++ b/src/Chart.tsx @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import {RouteProp} from '@react-navigation/native'; import React from 'react'; import {WebView} from 'react-native-webview'; diff --git a/src/FileUpload.tsx b/src/FileUpload.tsx index 37a7751..8575694 100644 --- a/src/FileUpload.tsx +++ b/src/FileUpload.tsx @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import React, { useCallback, useContext, diff --git a/src/Home.tsx b/src/Home.tsx index ccde25a..79ebda0 100644 --- a/src/Home.tsx +++ b/src/Home.tsx @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import {RouteProp} from '@react-navigation/native'; import {createBottomTabNavigator} from '@react-navigation/bottom-tabs'; import CardView from 'CardView'; diff --git a/src/Logs.tsx b/src/Logs.tsx index 69676b1..11f4ee8 100644 --- a/src/Logs.tsx +++ b/src/Logs.tsx @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import React, {useMemo} from 'react'; import {View} from 'react-native'; import {useLogger, useTheme} from 'hooks'; diff --git a/src/Registration.tsx b/src/Registration.tsx index d43cea4..8bb3298 100644 --- a/src/Registration.tsx +++ b/src/Registration.tsx @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import React, { useCallback, useContext, diff --git a/src/Settings.tsx b/src/Settings.tsx index 55ce86a..b0f23ac 100644 --- a/src/Settings.tsx +++ b/src/Settings.tsx @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import {useContext, useMemo} from 'react'; import {ThemeContext} from './contexts/theme'; import React from 'react'; diff --git a/src/Welcome.tsx b/src/Welcome.tsx index 83cf9ec..0c0032c 100644 --- a/src/Welcome.tsx +++ b/src/Welcome.tsx @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import React, {useEffect, useCallback, useContext, useMemo} from 'react'; import {View} from 'react-native'; import LogoLight from './assets/IoT-Plug-And-Play_Dark.svg'; diff --git a/src/components/bottomPopup.tsx b/src/components/bottomPopup.tsx index 1e12004..c54ca16 100644 --- a/src/components/bottomPopup.tsx +++ b/src/components/bottomPopup.tsx @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import {useBoolean} from 'hooks/common'; import {useScreenDimensions} from 'hooks/layout'; import React, {useCallback, useMemo} from 'react'; diff --git a/src/components/button.tsx b/src/components/button.tsx index 81ffbdb..3deb23c 100644 --- a/src/components/button.tsx +++ b/src/components/button.tsx @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import React from 'react'; import {Platform} from 'react-native'; import {Button as ElButton, ButtonProps} from 'react-native-elements'; diff --git a/src/components/buttonGroup.tsx b/src/components/buttonGroup.tsx index 9ebb1e1..63f6ea4 100644 --- a/src/components/buttonGroup.tsx +++ b/src/components/buttonGroup.tsx @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import React from 'react'; import {View, ViewStyle} from 'react-native'; import {CheckBox} from 'react-native-elements'; diff --git a/src/components/card.tsx b/src/components/card.tsx index 3e7a62c..b18499d 100644 --- a/src/components/card.tsx +++ b/src/components/card.tsx @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import React, {useRef, useState, useEffect} from 'react'; import {CardProps, IconProps, Icon, Input} from 'react-native-elements'; import { diff --git a/src/components/circularProgress.tsx b/src/components/circularProgress.tsx index 6c6a056..5ec83f4 100644 --- a/src/components/circularProgress.tsx +++ b/src/components/circularProgress.tsx @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import React, {useEffect, useRef, useState} from 'react'; import { AnimatedCircularProgress, diff --git a/src/components/form.tsx b/src/components/form.tsx index 80ee0a9..a7fcc8a 100644 --- a/src/components/form.tsx +++ b/src/components/form.tsx @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import {useTheme} from 'hooks'; import React from 'react'; import {Platform, View} from 'react-native'; diff --git a/src/components/headerCloseButton.tsx b/src/components/headerCloseButton.tsx index aae8926..1e4d05a 100644 --- a/src/components/headerCloseButton.tsx +++ b/src/components/headerCloseButton.tsx @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import {useTheme} from 'hooks'; import {HeaderTitle} from '@react-navigation/stack'; import React from 'react'; diff --git a/src/components/index.ts b/src/components/index.ts index ab26e04..0465c5c 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + export * from './button'; export {default as Button} from './button'; export * from './buttonGroup'; diff --git a/src/components/loader.tsx b/src/components/loader.tsx index f53364a..2a185d8 100644 --- a/src/components/loader.tsx +++ b/src/components/loader.tsx @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import React, {useMemo} from 'react'; import { View, diff --git a/src/components/map.tsx b/src/components/map.tsx index 8aac19e..b5632bb 100644 --- a/src/components/map.tsx +++ b/src/components/map.tsx @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import React, {useState} from 'react'; import {StyleProp, ViewStyle} from 'react-native'; import { diff --git a/src/components/options.tsx b/src/components/options.tsx index 2e8bf2f..74017c6 100644 --- a/src/components/options.tsx +++ b/src/components/options.tsx @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import {useTheme} from 'hooks'; import React, {useEffect} from 'react'; import {View} from 'react-native'; diff --git a/src/components/qrcodeScanner.tsx b/src/components/qrcodeScanner.tsx index e2a6f0b..c8e137d 100644 --- a/src/components/qrcodeScanner.tsx +++ b/src/components/qrcodeScanner.tsx @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import React from 'react'; import {Platform, StyleSheet, View} from 'react-native'; import {Icon} from 'react-native-elements'; diff --git a/src/components/screenview.tsx b/src/components/screenview.tsx index d07ef02..2a68d23 100644 --- a/src/components/screenview.tsx +++ b/src/components/screenview.tsx @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import React from 'react'; import {useSafeAreaInsets} from 'react-native-safe-area-context'; import {View} from 'react-native'; diff --git a/src/components/typography.tsx b/src/components/typography.tsx index 5867868..af4e4fc 100644 --- a/src/components/typography.tsx +++ b/src/components/typography.tsx @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import React from 'react'; import {Text as ELText, TextProps} from 'react-native-elements'; import {Dimensions, Platform, PixelRatio} from 'react-native'; diff --git a/src/contexts/defaults.ts b/src/contexts/defaults.ts index bce9f53..f4c4a07 100644 --- a/src/contexts/defaults.ts +++ b/src/contexts/defaults.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + export type DefaultProps = { emulator: boolean; initialized: boolean; diff --git a/src/contexts/index.ts b/src/contexts/index.ts index 3db2c2b..c65150a 100644 --- a/src/contexts/index.ts +++ b/src/contexts/index.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + export {default as IoTCProvider, IoTCContext} from './iotc'; export {default as LogsProvider, LogsContext} from './logs'; export {default as StorageProvider, StorageContext} from './storage'; diff --git a/src/contexts/iotc.tsx b/src/contexts/iotc.tsx index 1f8cbed..d1ed699 100644 --- a/src/contexts/iotc.tsx +++ b/src/contexts/iotc.tsx @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import React, {useCallback, useReducer} from 'react'; import {IIoTCClient} from 'react-native-azure-iotcentral-client'; diff --git a/src/contexts/logs.tsx b/src/contexts/logs.tsx index f001854..7821d15 100644 --- a/src/contexts/logs.tsx +++ b/src/contexts/logs.tsx @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import React, {useCallback, useState} from 'react'; import {LogItem, TimedLog} from '../types'; diff --git a/src/contexts/storage.tsx b/src/contexts/storage.tsx index dfc5199..75864fb 100644 --- a/src/contexts/storage.tsx +++ b/src/contexts/storage.tsx @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import React, {useCallback, useState} from 'react'; import {IoTCCredentials} from 'react-native-azure-iotcentral-client'; import * as Keychain from 'react-native-keychain'; diff --git a/src/contexts/theme.tsx b/src/contexts/theme.tsx index 9c8f423..efbecbd 100644 --- a/src/contexts/theme.tsx +++ b/src/contexts/theme.tsx @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import React, {useCallback, useState} from 'react'; import {Appearance} from 'react-native'; import {ThemeMode} from 'types'; diff --git a/src/globals.d.ts b/src/globals.d.ts index 1f9dbf0..2242643 100644 --- a/src/globals.d.ts +++ b/src/globals.d.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + declare module '*.svg' { import {SvgProps} from 'react-native-svg'; const content: React.FC; diff --git a/src/hooks/common.ts b/src/hooks/common.ts index 6b406ce..f2bf972 100644 --- a/src/hooks/common.ts +++ b/src/hooks/common.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import {useNavigation} from '@react-navigation/native'; import {defaults} from 'contexts/defaults'; import { diff --git a/src/hooks/index.ts b/src/hooks/index.ts index c6e3029..e1a215e 100644 --- a/src/hooks/index.ts +++ b/src/hooks/index.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + export * from './common'; export * from './iotc'; export * from './layout'; diff --git a/src/hooks/iotc.ts b/src/hooks/iotc.ts index 8a602bc..8e5f959 100644 --- a/src/hooks/iotc.ts +++ b/src/hooks/iotc.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import {useContext, useState, useRef, useEffect, useCallback} from 'react'; import { DecryptCredentials, diff --git a/src/hooks/layout.ts b/src/hooks/layout.ts index 2e1038d..4fd64af 100644 --- a/src/hooks/layout.ts +++ b/src/hooks/layout.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import {StorageContext, ThemeContext} from 'contexts'; import {useState, useEffect, useCallback, useContext, useMemo} from 'react'; import {Appearance, Dimensions, ScaledSize} from 'react-native'; diff --git a/src/mocks/iotcMock.ts b/src/mocks/iotcMock.ts index 9a8cd1b..c2d74c4 100644 --- a/src/mocks/iotcMock.ts +++ b/src/mocks/iotcMock.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import { CancellationToken, CommandCallback, diff --git a/src/progress.d.ts b/src/progress.d.ts index ee9a59a..9bc0beb 100644 --- a/src/progress.d.ts +++ b/src/progress.d.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + declare module 'react-native-progress/CircleSnail' { export default class CircleSnail extends React.Component {} } diff --git a/src/properties/deviceInfo.ts b/src/properties/deviceInfo.ts index 6eb13e8..a12ccdb 100644 --- a/src/properties/deviceInfo.ts +++ b/src/properties/deviceInfo.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import DeviceInfo from 'react-native-device-info'; import {DataType} from 'types'; diff --git a/src/properties/index.ts b/src/properties/index.ts index 7b9a86b..bdd24a6 100644 --- a/src/properties/index.ts +++ b/src/properties/index.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import {ItemProps} from 'types'; import {AVAILABLE_PROPERTIES} from './internal'; diff --git a/src/properties/internal.ts b/src/properties/internal.ts index 393ae2d..13f9943 100644 --- a/src/properties/internal.ts +++ b/src/properties/internal.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + export type PropertiesProps = { id: string; name: string; diff --git a/src/sensors/accelerometer.ts b/src/sensors/accelerometer.ts index 53c2b80..61c1224 100644 --- a/src/sensors/accelerometer.ts +++ b/src/sensors/accelerometer.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import {EventEmitter} from 'events'; import { ISensor, diff --git a/src/sensors/barometer.ts b/src/sensors/barometer.ts index 7297554..3cbf728 100644 --- a/src/sensors/barometer.ts +++ b/src/sensors/barometer.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import {EventEmitter} from 'events'; import { ISensor, diff --git a/src/sensors/battery.ts b/src/sensors/battery.ts index 7bbdaf5..cb51c56 100644 --- a/src/sensors/battery.ts +++ b/src/sensors/battery.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import DeviceInfo from 'react-native-device-info'; import {EventEmitter} from 'events'; import {ISensor, DATA_AVAILABLE_EVENT} from './internal'; diff --git a/src/sensors/geolocation.ts b/src/sensors/geolocation.ts index ebb97ed..ea23269 100644 --- a/src/sensors/geolocation.ts +++ b/src/sensors/geolocation.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import {EventEmitter} from 'events'; import {ISensor, DATA_AVAILABLE_EVENT, getRandom} from './internal'; import Geolocation from '@react-native-community/geolocation'; diff --git a/src/sensors/gyroscope.ts b/src/sensors/gyroscope.ts index a189d7e..6c76b35 100644 --- a/src/sensors/gyroscope.ts +++ b/src/sensors/gyroscope.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import {EventEmitter} from 'events'; import { ISensor, diff --git a/src/sensors/health/googlefit/steps.ts b/src/sensors/health/googlefit/steps.ts index 71e43d5..aeabfa5 100644 --- a/src/sensors/health/googlefit/steps.ts +++ b/src/sensors/health/googlefit/steps.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import {EventEmitter} from 'events'; import GoogleFit from 'react-native-google-fit'; import {ISensor, DATA_AVAILABLE_EVENT, LOG_DATA} from 'sensors/internal'; diff --git a/src/sensors/health/healthkit/climb.ts b/src/sensors/health/healthkit/climb.ts index 0932df0..cabd5b0 100644 --- a/src/sensors/health/healthkit/climb.ts +++ b/src/sensors/health/healthkit/climb.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import HealthKit, {SampleResult} from 'rn-apple-healthkit'; import {EventEmitter} from 'events'; import {requestPermissions} from '../internal'; @@ -82,7 +85,8 @@ export default class HealthKitClimb extends EventEmitter implements ISensor { if (err) { this.emit( LOG_DATA, - `Error from Apple HealthKit - Climbs:\n${(err as any).message}`, + `Error from Apple HealthKit - Climbs: +${(err as any).message}`, ); return; } diff --git a/src/sensors/health/healthkit/steps.ts b/src/sensors/health/healthkit/steps.ts index 800a57f..872805f 100644 --- a/src/sensors/health/healthkit/steps.ts +++ b/src/sensors/health/healthkit/steps.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import HealthKit from 'rn-apple-healthkit'; import {EventEmitter} from 'events'; import {NativeAppEventEmitter} from 'react-native'; @@ -87,9 +90,8 @@ export default class HealthKitSteps extends EventEmitter implements ISensor { if (err) { this.emit( LOG_DATA, - `Error from Apple HealthKit - Steps:\n${ - (err as any).message - }`, + `Error from Apple HealthKit - Steps: +${(err as any).message}`, ); return; } diff --git a/src/sensors/health/internal.ts b/src/sensors/health/internal.ts index e4fa638..0287b2f 100644 --- a/src/sensors/health/internal.ts +++ b/src/sensors/health/internal.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import HealthKit, {HealthKitPermissions} from 'rn-apple-healthkit'; const PERMS = HealthKit.Constants.Permissions; diff --git a/src/sensors/index.ts b/src/sensors/index.ts index b6c2929..5115452 100644 --- a/src/sensors/index.ts +++ b/src/sensors/index.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import Accelerometer from './accelerometer'; import Barometer from './barometer'; import Battery from './battery'; diff --git a/src/sensors/internal.ts b/src/sensors/internal.ts index 62d4551..ee3e0b5 100644 --- a/src/sensors/internal.ts +++ b/src/sensors/internal.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import {EventEmitter} from 'events'; export interface ISensor extends EventEmitter { diff --git a/src/sensors/magnetometer.ts b/src/sensors/magnetometer.ts index 6dbbc20..fb468bd 100644 --- a/src/sensors/magnetometer.ts +++ b/src/sensors/magnetometer.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import {EventEmitter} from 'events'; import { ISensor, diff --git a/src/strings.ts b/src/strings.ts index 9f854bf..276a0c2 100644 --- a/src/strings.ts +++ b/src/strings.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + const Strings = { Title: 'IoT Plug and Play', Core: { diff --git a/src/tools/CustomLogger.ts b/src/tools/CustomLogger.ts index ebff5e0..80cbd3b 100644 --- a/src/tools/CustomLogger.ts +++ b/src/tools/CustomLogger.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + export function Log(msg: string | number) { console.log(msg); } diff --git a/src/tools/EventLogger.ts b/src/tools/EventLogger.ts index c34a830..f25eee9 100644 --- a/src/tools/EventLogger.ts +++ b/src/tools/EventLogger.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import {EventEmitter} from 'events'; import {IIoTCLogger, IOTC_LOGGING} from 'react-native-azure-iotcentral-client'; @@ -15,9 +18,8 @@ export default class EventLogger extends EventEmitter implements IIoTCLogger { IOTC_LOGGING[logLevel.toUpperCase() as keyof typeof IOTC_LOGGING]; if (!this.logLevel) { console.error( - `LoggingLevel ${logLevel} is unsupported.\nSupported levels: ${Object.keys( - IOTC_LOGGING, - ).join(',')}`, + `LoggingLevel ${logLevel} is unsupported. +Supported levels: ${Object.keys(IOTC_LOGGING).join(',')}`, ); throw new Error(); } diff --git a/src/tools/Torch.ts b/src/tools/Torch.ts index c360045..1483018 100644 --- a/src/tools/Torch.ts +++ b/src/tools/Torch.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import {Platform} from 'react-native'; import Torch from 'react-native-torch'; import {TimeOut} from '.'; diff --git a/src/tools/WebhookLogger.ts b/src/tools/WebhookLogger.ts index 931c50c..f8acae0 100644 --- a/src/tools/WebhookLogger.ts +++ b/src/tools/WebhookLogger.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import {IIoTCLogger, IOTC_LOGGING} from 'react-native-azure-iotcentral-client'; export default class WebhookLogger implements IIoTCLogger { @@ -12,9 +15,8 @@ export default class WebhookLogger implements IIoTCLogger { IOTC_LOGGING[logLevel.toUpperCase() as keyof typeof IOTC_LOGGING]; if (!this.logLevel) { console.error( - `LoggingLevel ${logLevel} is unsupported.\nSupported levels: ${Object.keys( - IOTC_LOGGING, - ).join(',')}`, + `LoggingLevel ${logLevel} is unsupported. +Supported levels: ${Object.keys(IOTC_LOGGING).join(',')}`, ); throw new Error(); } diff --git a/src/tools/index.ts b/src/tools/index.ts index 73bed20..fb5b060 100644 --- a/src/tools/index.ts +++ b/src/tools/index.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + export * from './CustomLogger'; export {default as EventLogger} from './EventLogger'; export async function TimeOut(seconds: number) { diff --git a/src/types.ts b/src/types.ts index 2e067a7..4ae3e2c 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import {StackNavigationProp} from '@react-navigation/stack'; import { GestureResponderEvent,