Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d3257a7 authored by Mike Lockwood's avatar Mike Lockwood
Browse files

Move MTP code to the android namespace



Change-Id: I5da48038fd5e4cdeefaeba42cdc74eb588b3448d
Signed-off-by: default avatarMike Lockwood <lockwood@android.com>
parent 77b8e614
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -28,6 +28,8 @@
#include "MtpDebug.h"
#include "MtpStringBuffer.h"

namespace android {

MtpClient::MtpClient(struct usb_endpoint *ep_in, struct usb_endpoint *ep_out,
            struct usb_endpoint *ep_intr)
    :   mEndpointIn(ep_in),
@@ -134,3 +136,4 @@ MtpResponseCode MtpClient::readResponse() {
    }
}

}  // namespace android
+4 −0
Original line number Diff line number Diff line
@@ -24,6 +24,8 @@

#include "MtpUtils.h"

namespace android {

class MtpClient {
private:
    struct usb_endpoint *mEndpointIn;
@@ -56,4 +58,6 @@ private:

};

}; // namespace android

#endif // _MTP_CLIENT_H
+4 −0
Original line number Diff line number Diff line
@@ -21,6 +21,8 @@
#include "MtpDataPacket.h"
#include "MtpStringBuffer.h"

namespace android {

MtpDataPacket::MtpDataPacket()
    :   MtpPacket(512),
        mOffset(MTP_CONTAINER_HEADER_SIZE)
@@ -294,3 +296,5 @@ int MtpDataPacket::write(struct usb_endpoint *ep) {
}

#endif // MTP_HOST

}  // namespace android
+4 −0
Original line number Diff line number Diff line
@@ -20,6 +20,8 @@
#include "MtpPacket.h"
#include "mtp.h"

namespace android {

class MtpDataPacket : public MtpPacket {
private:
    // current offset for get/put methods
@@ -86,4 +88,6 @@ public:
    inline bool         hasData() const { return mPacketSize > MTP_CONTAINER_HEADER_SIZE; }
};

}; // namespace android

#endif // _MTP_DATA_PACKET_H
+4 −1
Original line number Diff line number Diff line
@@ -22,6 +22,8 @@
#include <stdio.h>
#include <sqlite3.h>

namespace android {

#define ID_COLUMN       1
#define PATH_COLUMN     2
#define FORMAT_COLUMN   3
@@ -51,7 +53,6 @@
#define FILE_INSERT     "INSERT INTO files VALUES(?,?,?,?,?,?,?,?);"
#define FILE_DELETE     "DELETE FROM files WHERE path = ?;"


struct PropertyTableEntry {
    MtpObjectProperty   property;
    int                 type;
@@ -384,3 +385,5 @@ printf("deleteFile %d\n", handle);
    packet.putUInt8(formFlag);
    // form, variable
*/

}  // namespace android
Loading