[PROTO] MSG_PROBE_RESOURCE: remove FDType field
authorAnastasia Lyupa <a.lyupa@samsung.com>
Wed, 21 Aug 2013 17:34:59 +0000 (21:34 +0400)
committerAnastasia Lyupa <a.lyupa@samsung.com>
Wed, 21 Aug 2013 17:34:59 +0000 (21:34 +0400)
include/binproto.h
include/probeinfo.h
probe_badaapi/bada_file.cpp
probe_file/da_io.h
probe_socket/da_socket.h

index 31c4dca..210acc1 100644 (file)
@@ -260,12 +260,11 @@ static inline char *pack_args(char *to, const char *fmt, ...)
                BUF_PTR = pack_int32(BUF_PTR, info2);                   \
        } while (0)
 
-#define PACK_RESOURCE(size, fd_value, fd_type, fd_api_type, file_size, \
+#define PACK_RESOURCE(size, fd_value, fd_api_type, file_size,  \
                      file_path)                                        \
        do {                                                            \
                BUF_PTR = pack_int64(BUF_PTR, size);                    \
                BUF_PTR = pack_int64(BUF_PTR, fd_value);                \
-               BUF_PTR = pack_int32(BUF_PTR, fd_type);                 \
                BUF_PTR = pack_int32(BUF_PTR, fd_api_type);             \
                BUF_PTR = pack_int64(BUF_PTR, file_size);               \
                BUF_PTR = pack_string(BUF_PTR, file_path);              \
index 0b02ff9..afaff05 100755 (executable)
@@ -70,9 +70,6 @@ extern "C"{
 /* #define             LC_CUSTOM               13 */
 /* #define             LC_SYNC                 14 */
 
-#define                FD_FILE         0
-#define                FD_SOCKET       1
-
 #define                FD_API_OPEN                             0
 #define                FD_API_CLOSE                    1
 #define                FD_API_READ_START               2
index 6473b19..b761b23 100755 (executable)
@@ -87,7 +87,7 @@ result File::Construct(const Tizen::Base::String& filePath,
                PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE, API_ID_result_File__Construct_const_Tizen__Base__String__filePath__const_Tizen__Base__String__openMode__bool_createParentDirectories_,
                                  "ssd", temp_path, temp_mode, createParentDirectories);
                PACK_COMMON_END(ret, ret, blockresult);
-               PACK_RESOURCE(0, (unsigned long)this, FD_FILE, FD_API_OPEN, size, temp_path);
+               PACK_RESOURCE(0, (unsigned long)this, FD_API_OPEN, size, temp_path);
                FLUSH_LOCAL_BUF();
                 
                 postBlockEnd();
@@ -291,7 +291,7 @@ result File::Construct(const Tizen::Base::String& filePath,
                                  API_ID_result_File__Construct_const_Tizen__Base__String__filePath__const_Tizen__Base__String__openMode_,
                                  "ss", temp_path, temp_mode);
                PACK_COMMON_END(ret, ret, blockresult);
-               PACK_RESOURCE(0, (unsigned long)this, FD_FILE, FD_API_OPEN, size, temp_path);
+               PACK_RESOURCE(0, (unsigned long)this, FD_API_OPEN, size, temp_path);
                FLUSH_LOCAL_BUF();
 
                 postBlockEnd();
@@ -419,7 +419,7 @@ result File::Construct(const Tizen::Base::String& filePath,
                                  API_ID_result_File__Construct_const_Tizen__Base__String__filePath__const_char__pOpenMode_,
                                  "sp", temp, pOpenMode);
                PACK_COMMON_END(ret, ret, blockresult);
-               PACK_RESOURCE(0, (unsigned long)this, FD_FILE, FD_API_OPEN, size, temp);
+               PACK_RESOURCE(0, (unsigned long)this, FD_API_OPEN, size, temp);
                FLUSH_LOCAL_BUF();
 
                 postBlockEnd();
@@ -475,7 +475,7 @@ result File::Construct(const Tizen::Base::String& filePath,
                                  API_ID_result_File__Construct_const_Tizen__Base__String__filePath__const_char__pOpenMode__const_Tizen__Base__ByteBuffer__secretKey_,
                                  "sp", temp, pOpenMode);
                PACK_COMMON_END(ret, ret, blockresult);
-               PACK_RESOURCE(0, (unsigned long)this, FD_FILE, FD_API_OPEN, size, temp);
+               PACK_RESOURCE(0, (unsigned long)this, FD_API_OPEN, size, temp);
                FLUSH_LOCAL_BUF();
 
                 postBlockEnd();
@@ -526,7 +526,7 @@ result File::Flush(void) {
                                  API_ID_result_File__Flush_void_,
                                  "", 0);
                PACK_COMMON_END(ret, ret, blockresult);
-               PACK_RESOURCE(0, (unsigned long)this, FD_FILE, FD_API_OTHER, size, temp);
+               PACK_RESOURCE(0, (unsigned long)this, FD_API_OTHER, size, temp);
                FLUSH_LOCAL_BUF();
 
                 postBlockEnd();
@@ -578,7 +578,7 @@ Tizen::Base::String File::GetName(void) const{
                                  API_ID_Tizen__Base__String_File__GetName_void__const,
                                  "", 0);
                PACK_COMMON_END(ret.GetPointer(), res, blockresult);
-               PACK_RESOURCE(0, (unsigned long)this, FD_FILE, FD_API_OTHER, size, temp);
+               PACK_RESOURCE(0, (unsigned long)this, FD_API_OTHER, size, temp);
                FLUSH_LOCAL_BUF();
 
                 postBlockEnd();
@@ -632,7 +632,7 @@ result File::Read(Tizen::Base::String& buffer) {
                                  API_ID_result_File__Read_Tizen__Base__String__buffer_,
                                  "x", (unsigned long)&buffer);
                PACK_COMMON_END(ret, ret, blockresult);
-               PACK_RESOURCE(nRead, (unsigned long)this, FD_FILE, FD_API_READ_END, size, temp);
+               PACK_RESOURCE(nRead, (unsigned long)this, FD_API_READ_END, size, temp);
                FLUSH_LOCAL_BUF();
 
                 postBlockEnd();
@@ -686,7 +686,7 @@ result File::Read(Tizen::Base::ByteBuffer& buffer) {
                                  API_ID_result_File__Read_Tizen__Base__ByteBuffer__buffer_,
                                  "x", (unsigned long)&buffer);
                PACK_COMMON_END(ret, ret, blockresult);
-               PACK_RESOURCE(nRead, (unsigned long)this, FD_FILE, FD_API_READ_END, size, temp);
+               PACK_RESOURCE(nRead, (unsigned long)this, FD_API_READ_END, size, temp);
                FLUSH_LOCAL_BUF();
                
                 postBlockEnd();
@@ -741,7 +741,7 @@ int File::Read(void *buffer, int length) {
                                  API_ID_int_File__Read_void__buffer__int_length_,
                                  "xd", (unsigned long)buffer, length);
                PACK_COMMON_END(ret, res, blockresult);
-               PACK_RESOURCE(nRead, (unsigned long)this, FD_FILE, FD_API_READ_END, size, temp);
+               PACK_RESOURCE(nRead, (unsigned long)this, FD_API_READ_END, size, temp);
                FLUSH_LOCAL_BUF();
 
                 postBlockEnd();
@@ -806,7 +806,7 @@ result File::Seek(FileSeekPosition position, long offset) {
                                  API_ID_result_File__Seek_FileSeekPosition_position__long_offset_,
                                  "sx", temp_pos, offset);
                PACK_COMMON_END(ret, ret, blockresult);
-               PACK_RESOURCE(0, (unsigned long)this, FD_FILE, FD_API_OTHER, size, temp);
+               PACK_RESOURCE(0, (unsigned long)this, FD_API_OTHER, size, temp);
                FLUSH_LOCAL_BUF();
 
                 postBlockEnd();
@@ -859,7 +859,7 @@ int File::Tell(void) const {
                                  API_ID_int_File__Tell_void__const,
                                  "", 0);
                PACK_COMMON_END(ret, res, blockresult);
-               PACK_RESOURCE(0, (unsigned long)this, FD_FILE, FD_API_OTHER, size, temp);
+               PACK_RESOURCE(0, (unsigned long)this, FD_API_OTHER, size, temp);
                FLUSH_LOCAL_BUF();
 
                 postBlockEnd();
@@ -910,7 +910,7 @@ result File::Truncate(int length) {
                                  API_ID_result_File__Truncate_int_length_,
                                  "d", length);
                PACK_COMMON_END(ret, ret, blockresult);
-               PACK_RESOURCE(0, (unsigned long)this, FD_FILE, FD_API_OTHER, size, temp);
+               PACK_RESOURCE(0, (unsigned long)this, FD_API_OTHER, size, temp);
                FLUSH_LOCAL_BUF();
 
                 postBlockEnd();
@@ -964,7 +964,7 @@ result File::Write(const void *buffer, int length) {
                                  API_ID_result_File__Write_const_void__buffer__int_length_,
                                  "xd", (unsigned long)buffer, length);
                PACK_COMMON_END(ret, ret, blockresult);
-               PACK_RESOURCE(nWritten, (unsigned long)this, FD_FILE, FD_API_WRITE_END, size, temp);
+               PACK_RESOURCE(nWritten, (unsigned long)this, FD_API_WRITE_END, size, temp);
                FLUSH_LOCAL_BUF();
 
                 postBlockEnd();
@@ -1018,7 +1018,7 @@ result File::Write(const Tizen::Base::ByteBuffer& buffer) {
                                  API_ID_result_File__Write_const_Tizen__Base__ByteBuffer__buffer_,
                                  "x", (unsigned long)&buffer);
                PACK_COMMON_END(ret, ret, blockresult);
-               PACK_RESOURCE(nWritten, (unsigned long)this, FD_FILE, FD_API_WRITE_END, size, temp);
+               PACK_RESOURCE(nWritten, (unsigned long)this, FD_API_WRITE_END, size, temp);
                FLUSH_LOCAL_BUF();
 
                 postBlockEnd();
@@ -1075,7 +1075,7 @@ result File::Write(const Tizen::Base::String& buffer) {
                                  API_ID_result_File__Write_const_Tizen__Base__String__buffer_,
                                  "s", temp_buf);
                PACK_COMMON_END(ret, ret, blockresult);
-               PACK_RESOURCE(nWritten, (unsigned long)this, FD_FILE, FD_API_WRITE_END, size, temp_path);
+               PACK_RESOURCE(nWritten, (unsigned long)this, FD_API_WRITE_END, size, temp_path);
                FLUSH_LOCAL_BUF();
 
                 postBlockEnd();
@@ -1123,7 +1123,7 @@ File::~File(void) {
                                  API_ID_File___File_void_,
                                  "", 0);
                PACK_COMMON_END(0, 0, blockresult);
-               PACK_RESOURCE(0, (unsigned long)this, FD_FILE, FD_API_CLOSE, size, "");
+               PACK_RESOURCE(0, (unsigned long)this, FD_API_CLOSE, size, "");
                FLUSH_LOCAL_BUF();
 
                postBlockEnd();
index aab9e80..a6ed3f4 100755 (executable)
 // =================================================================
 
 #define POST_PACK_PROBEBLOCK_MIDDLE_FD(SIZE, FD, APITYPE)                      \
-       PACK_RESOURCE(SIZE, FD, FD_FILE, APITYPE,                                               \
+       PACK_RESOURCE(SIZE, FD, APITYPE,                                                        \
                      (_fstatret == 0 ? _statbuf.st_size : 0), _filepath);      \
        FLUSH_LOCAL_BUF()
 
 #define POST_PACK_PROBEBLOCK_MIDDLE_NOFD(SIZE, APITYPE)                        \
-       PACK_RESOURCE(SIZE, 0, FD_FILE, APITYPE, 0, _filepath);         \
+       PACK_RESOURCE(SIZE, 0, APITYPE, 0, _filepath);                  \
        FLUSH_LOCAL_BUF()
 
 // ==================================================================
        PREPARE_LOCAL_BUF();                                                                                    \
        PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE, API_ID, "", 0);                   \
        PACK_COMMON_END(0, 0, 0);                                                                               \
-       PACK_RESOURCE(0, 0, FD_FILE, APITYPE, 0, _filepath);                    \
+       PACK_RESOURCE(0, 0, APITYPE, 0, _filepath);                                 \
        FLUSH_LOCAL_BUF();                                                                                              \
        POST_PACK_PROBEBLOCK_END()
 
index 8c0fd44..ddad86e 100644 (file)
@@ -38,9 +38,9 @@
 #define AFTER_PACK_ORIGINAL_SOCK(API_ID, RVAL, SIZE, FD, APITYPE, INPUTFORMAT, ...) \
        POST_PACK_PROBEBLOCK_BEGIN();                                                                                                   \
        PREPARE_LOCAL_BUF();                                                                                                                    \
-       PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE, API_ID, INPUTFORMAT, __VA_ARGS__);        \
+       PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE, API_ID, INPUTFORMAT, __VA_ARGS__);            \
        PACK_COMMON_END(RVAL, newerrno, blockresult);                                                                   \
-       PACK_RESOURCE(SIZE, FD, FD_SOCKET, APITYPE,     0, "");                                                         \
+       PACK_RESOURCE(SIZE, FD, APITYPE,        0, "");                                                                 \
        FLUSH_LOCAL_BUF();                                                                                                                              \
        POST_PACK_PROBEBLOCK_END()