IOT-1994 Simplify OCStack public header file requirements
Applications that need to include ocstack.h for access to OC* APIs currently need to bring in multiple unrelated (and platform-specific) headers. This is because octypes.h, a public type definition header used by ocstack.h, is including more headers than it needs to. It is more desirable for applications to bring in only requird headers. This change reduces the number of required headers from the public surface, specifically ocstack.h, by taking advantange of IoTivity's requirement that all supported compilers are at least C++11-compliant. See https://wiki.iotivity.org/compiler_support?s[]=compiler for details. Before this change, users of ocstack.h must also bring in (this example is from Windows): Ocstack.h Octypes.h Iotivity_config.h Ocpresence.h Ocstackconfig.h Platform_features.h Windows\include\memmem.h Windows\include\pthread_create.h Windows\include\vs12_snprintf.h Windows\include\win_sleep.h After this change, the list becomes: Ocstack.h Octypes.h Ocpresence.h Ocstackconfig.h Arguably ocpresence.h and ocstackconfig.h could be combined into octypes.h since they are just simple type definitions, just like octypes.h. That work is lower priority as both ocpresence.h and ocstackconfig.h are already platform independent. Change-Id: I9943589603453730446b2d616b497fbb235774a5 Signed-off-by:Way Vadhanasin <wayvad@microsoft.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/18487Tested-by:
jenkins-iotivity <jenkins@iotivity.org> Reviewed-by:
Dan Mihai <Daniel.Mihai@microsoft.com>
Showing
Please register or sign in to comment