Add validate/1 function

This commit is contained in:
Feng Lee 2018-04-30 12:33:29 +08:00
parent 1740b06747
commit 1630f7c9b8
1 changed files with 19 additions and 17 deletions

View File

@ -1,22 +1,22 @@
%%-------------------------------------------------------------------- %%%===================================================================
%% Copyright (c) 2013-2018 EMQ Inc. All rights reserved. %%% Copyright (c) 2013-2018 EMQ Inc. All rights reserved.
%% %%%
%% Licensed under the Apache License, Version 2.0 (the "License"); %%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License. %%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at %%% You may obtain a copy of the License at
%% %%%
%% http://www.apache.org/licenses/LICENSE-2.0 %%% http://www.apache.org/licenses/LICENSE-2.0
%% %%%
%% Unless required by applicable law or agreed to in writing, software %%% Unless required by applicable law or agreed to in writing, software
%% distributed under the License is distributed on an "AS IS" BASIS, %%% distributed under the License is distributed on an "AS IS" BASIS,
%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. %%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
%% See the License for the specific language governing permissions and %%% See the License for the specific language governing permissions and
%% limitations under the License. %%% limitations under the License.
%%-------------------------------------------------------------------- %%%===================================================================
-module(emqx_mqtt_props). -module(emqx_mqtt_properties).
-export([name/1, id/1]). -export([name/1, id/1, validate/1]).
%%-------------------------------------------------------------------- %%--------------------------------------------------------------------
%% Property id to name %% Property id to name
@ -109,3 +109,5 @@ id('Wildcard-Subscription-Available') -> 16#28;
id('Subscription-Identifier-Available') -> 16#29; id('Subscription-Identifier-Available') -> 16#29;
id('Shared-Subscription-Available') -> 16#2A. id('Shared-Subscription-Available') -> 16#2A.
%%TODO:
validate(Props) when is_list(Props) -> ok.