Unify API for file descriptor sharing
ClosedPublic

Authored by chinmoyr on May 7 2018, 4:16 PM.

Details

Summary

Pass socket path as std::string to SocketAddress, FdSender and FdReceiver.
This way FdSender and SocketAddress remain qt-free and FdReceiver doesn't
stand out.

Depends on D12744

Diff Detail

Repository
R241 KIO
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
chinmoyr created this revision.May 7 2018, 4:16 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptMay 7 2018, 4:16 PM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
chinmoyr requested review of this revision.May 7 2018, 4:16 PM
chinmoyr updated this revision to Diff 33819.May 8 2018, 12:27 PM

Print the invalid socket path in case of error.

chinmoyr updated this revision to Diff 33821.May 8 2018, 12:39 PM

Rebased on updated D12744.

Restricted Application edited subscribers, added: kde-frameworks-devel; removed: Frameworks. · View Herald TranscriptMay 22 2018, 4:57 PM
ossi added a comment.May 27 2018, 10:12 AM

why aren't you standardizing on std::string? that's cleaner than raw char pointers.
i know we discussed this before to some degree, but i don't remember the particulars.

In D12745#268946, @ossi wrote:

why aren't you standardizing on std::string? that's cleaner than raw char pointers.
i know we discussed this before to some degree, but i don't remember the particulars.

It was pointed out that using std::string made the API stand out a bit (which btw is true). That's why I used char pointers here.

ossi added a comment.EditedMay 27 2018, 10:32 AM

but so does using raw pointers. as the stl is available here anyway, it seems like the preferable abstraction layer.

edit: the point of the old discussion was that having a non-qt api stands out, which is consistent with what i wrote above. basing the api on stl would be perfectly reasonable given the requirement of having to make it qt-free.

chinmoyr updated this revision to Diff 34965.May 27 2018, 11:20 AM
chinmoyr edited the summary of this revision. (Show Details)

Used std::string

ossi accepted this revision.May 27 2018, 11:28 AM
This revision is now accepted and ready to land.May 27 2018, 11:28 AM

@dfaure can you have a look at this?

dfaure accepted this revision.May 28 2018, 7:49 AM
chinmoyr updated this revision to Diff 35325.Jun 1 2018, 12:02 PM

Rebased on master

This revision was automatically updated to reflect the committed changes.