Skip to content

Commit

Permalink
Deprecate Core, BridgedCore, legacy Camera characteristics. (#1058)
Browse files Browse the repository at this point in the history
* Remove the long-deprecated init().

* Remove the long-deprecated Core and BridgedCore capabilities.

* Remove long-deprecated Camera options.

* Linting.
  • Loading branch information
hjdhjd authored Jul 10, 2024
1 parent d6ce9b8 commit e20beba
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 161 deletions.
49 changes: 0 additions & 49 deletions src/BridgedCore.ts

This file was deleted.

57 changes: 0 additions & 57 deletions src/Core.ts

This file was deleted.

18 changes: 0 additions & 18 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import "source-map-support/register"; // registering node-source-map-support for typescript stack traces
import "./lib/definitions"; // must be loaded before Characteristic and Service class
import createDebug from "debug";
import { HAPStorage } from "./lib/model/HAPStorage";

/**
* @group Utils
Expand Down Expand Up @@ -57,23 +56,6 @@ function printInit() {
}
printInit();

/**
*
* @param {string} storagePath
* @deprecated the need to manually initialize the internal storage was removed. If you want to set a custom
* storage path location, please use {@link HAPStorage.setCustomStoragePath} directly.
*
* @group Utils
*/
export function init(storagePath?: string): void {
console.log("DEPRECATED: The need to manually initialize HAP (by calling the init method) was removed. " +
"If you want to set a custom storage path location, please ust HAPStorage.setCustomStoragePath directly. " +
"This method will be removed in the next major update!");
if (storagePath) {
HAPStorage.setCustomStoragePath(storagePath);
}
}

import * as Services from "./lib/definitions/ServiceDefinitions";
import * as Characteristics from "./lib/definitions/CharacteristicDefinitions";

Expand Down
37 changes: 0 additions & 37 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,40 +82,6 @@ export type PrimitiveTypes = string | number | boolean;
*/
export type CharacteristicValue = PrimitiveTypes | PrimitiveTypes[] | { [key: string]: PrimitiveTypes };

/**
* @group Camera
* @deprecated replaced by {@link AudioStreamingCodec}
*/
export type AudioCodec = {
samplerate: number;
type: string;
}
/**
* @group Camera
* @deprecated replaced by {@link H264CodecParameters}
*/
export type VideoCodec = {
levels: number[];
profiles: number[];
}
/**
* @group Camera
* @deprecated replaced by {@link AudioStreamingOptions}
*/
export type StreamAudioParams = {
comfort_noise: boolean;
// noinspection JSDeprecatedSymbols
codecs: AudioCodec[];
};
/**
* @group Camera
* @deprecated replaced by {@link VideoStreamingOptions}
*/
export type StreamVideoParams = {
// noinspection JSDeprecatedSymbols
codec?: VideoCodec;
resolutions: [number, number, number][]; // width, height, framerate
};

/**
* @group HAP Accessory Server
Expand Down Expand Up @@ -262,9 +228,6 @@ export interface CharacteristicWrite {
ev?: boolean, // enable/disable event notifications for the accessory

authData?: string, // base64 encoded string used for custom authorisation
/**
* @deprecated This indicated if access was done via the old iCloud relay
*/
remote?: boolean, // remote access used
r?: boolean, // write response
}
Expand Down

0 comments on commit e20beba

Please sign in to comment.