Skip to content

Conversation

hardening
Copy link
Contributor

No description provided.

@freerdp-bot
Copy link

Refer to this link for build results (access rights to CI server needed):
https://ci.freerdp.com//job/PullRequestTester/14877/

Copy link
Member

@akallabeth akallabeth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When moving to public API we should prefix the functions with winpr or similar to make them unique.

Copy link

clang-tidy review says "All clean, LGTM! 👍"

extern WINPR_API const NdrMessageDescr ndr_##LOWER##_descr_s; \
WINPR_API NdrMessageType ndr_##LOWER##_descr(void)

#define NDR_ARRAY_OF_TYPE_DECL(TYPE, UPPERTYPE) \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe also remove the macros from public headers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The macros are used in this header. And usually when you want to declare a new type you'll want to use them.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but in public headers it is better not to expose stuff that should not be used outside.

The declarations can just be inserted directly (not that many anyway)

@freerdp-bot
Copy link

Refer to this link for build results (access rights to CI server needed):
https://ci.freerdp.com//job/PullRequestTester/14878/

@freerdp-bot
Copy link

Refer to this link for build results (access rights to CI server needed):
https://ci.freerdp.com//job/PullRequestTester/14879/

Copy link
Member

@akallabeth akallabeth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're moving the types to the public API some doxygen would be nice, with @since version 3.16.0 at least.

{
#endif

typedef struct NdrContext_s NdrContext;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefixing should also be done for types/macros/... (same issue as with functions, we want to avoid clashing with other implementations)

@freerdp-bot
Copy link

Refer to this link for build results (access rights to CI server needed):
https://ci.freerdp.com//job/PullRequestTester/14883/

@hardening hardening marked this pull request as draft May 15, 2025 21:26
@hardening
Copy link
Contributor Author

hardening commented May 15, 2025

I've done the renamings but I've seen things I'd like to fix for a public API.

@freerdp-bot
Copy link

Refer to this link for build results (access rights to CI server needed):
https://ci.freerdp.com//job/PullRequestTester/14884/

This patch makes public NDR routines and split the NdrContext to a NDR encoder and
a NDR decoder. All the related functions are modified accordingly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants