[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Review Request 115878: File: Add a thin wrapper around different xattr implementations.
From:       "Raphael Kubo da Costa" <rakuco () FreeBSD ! org>
Date:       2014-03-10 22:55:20
Message-ID: 20140310225520.19400.67228 () probe ! kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115878/
-----------------------------------------------------------

(Updated March 10, 2014, 10:55 p.m.)


Status
------

This change has been marked as submitted.


Review request for Baloo, David Edmundson and Vishesh Handa.


Repository: baloo


Description
-------

OS X, Linux and some BSDs all support extended file attributes in a way or
another, but the API differs among the operating systems.

Introduce baloo_getxattr() and baloo_setxattr(), named after the OS X and
Linux APIs for getting and setting extended attributes, to perform the right
calls depending on the operating system.

These functions accept as parameters the arguments that are common across
all xattr implementations -- this means one cannot pass custom |flags| on
Linux or |options| on OS X, but that should be fine for now as the code was
not doing that anyway.

Additionally, instead of taking raw char and void pointer, these wrappers
take QStrings are arguments, which allow us to simplify the calling code and
keep the QString->QByteArray->const char* conversions in a single place.


Diffs
-----

  src/file/lib/autotests/filefetchjobtest.cpp c144f045f708c0541ce2eb9453c17735eda6015f 
  src/file/lib/autotests/filemodifyjobtest.cpp 07842440934fbb20411c8d691e0088981b0e71a5 
  src/file/lib/baloo_xattr_p.h PRE-CREATION 
  src/file/lib/filecustommetadata.cpp 3a01520947a324dc1674f304e44eca1ae4a19ed7 
  src/file/lib/xattrdetector.cpp e05984e611e8582d0e18d08f93b325381222d280 

Diff: https://git.reviewboard.kde.org/r/115878/diff/


Testing
-------

All tests pass on FreeBSD.


Thanks,

Raphael Kubo da Costa


[Attachment #5 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/115878/">https://git.reviewboard.kde.org/r/115878/</a>
  </td>
    </tr>
   </table>
   <br />



<table bgcolor="#e0e0e0" width="100%" cellpadding="8" style="border: 1px gray \
solid;">  <tr>
  <td>
   <h1 style="margin-right: 0.2em; padding: 0; font-size: 10pt;">This change has been \
marked as submitted.</h1>  </td>
 </tr>
</table>
<br />


<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for Baloo, David Edmundson and Vishesh Handa.</div>
<div>By Raphael Kubo da Costa.</div>


<p style="color: grey;"><i>Updated March 10, 2014, 10:55 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
baloo
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">OS X, Linux and some BSDs all support extended file attributes in a way \
or another, but the API differs among the operating systems.

Introduce baloo_getxattr() and baloo_setxattr(), named after the OS X and
Linux APIs for getting and setting extended attributes, to perform the right
calls depending on the operating system.

These functions accept as parameters the arguments that are common across
all xattr implementations -- this means one cannot pass custom |flags| on
Linux or |options| on OS X, but that should be fine for now as the code was
not doing that anyway.

Additionally, instead of taking raw char and void pointer, these wrappers
take QStrings are arguments, which allow us to simplify the calling code and
keep the QString-&gt;QByteArray-&gt;const char* conversions in a single place.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">All tests pass on FreeBSD.</pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>src/file/lib/autotests/filefetchjobtest.cpp <span style="color: \
grey">(c144f045f708c0541ce2eb9453c17735eda6015f)</span></li>

 <li>src/file/lib/autotests/filemodifyjobtest.cpp <span style="color: \
grey">(07842440934fbb20411c8d691e0088981b0e71a5)</span></li>

 <li>src/file/lib/baloo_xattr_p.h <span style="color: \
grey">(PRE-CREATION)</span></li>

 <li>src/file/lib/filecustommetadata.cpp <span style="color: \
grey">(3a01520947a324dc1674f304e44eca1ae4a19ed7)</span></li>

 <li>src/file/lib/xattrdetector.cpp <span style="color: \
grey">(e05984e611e8582d0e18d08f93b325381222d280)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/115878/diff/" style="margin-left: \
3em;">View Diff</a></p>







  </td>
 </tr>
</table>




  </div>
 </body>
</html>



>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic