This file is indexed.

/usr/include/p2kmoto.h is in libp2kmoto-dev 0.1~rc1-0ubuntu3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
/***************************************************************************
 *   Copyright (C) 2005 by Dmitry Nezhevenko                               *
 *   dionua@gmail.com                                                      *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/

#ifndef P2K_MOTO_H
#define P2K_MOTO_H

// Error codes
#define P2K_E_NOPHONE -1
#define P2K_E_CANT_OPEN -2
#define P2K_E_CANT_SETCONFIG -3
#define P2K_E_CANT_CLAIMIFACE -4
#define P2K_E_CANT_CLOSE -5
#define P2K_E_NOT_CONNECTED -6
#define P2K_E_ANSWER_E001 -7
#define P2K_E_ANSWER_E002 -8
#define P2K_E_CPH_00 -9
#define P2K_E_CPH_01 -10
#define P2K_E_CPH_02a -11
#define P2K_E_CPH_02b -12
#define P2K_E_CPH_03 -13
#define P2K_E_OUTDATA -14
#define P2K_E_INPSIZE -15
#define P2K_E_INPDATA -16
#define P2K_E_CPH -17
#define P2K_E_INCORRECT_SEEMSIZE -18
#define P2K_E_BUFFER_TOOLONG -19

#define P2K_E_BUG -100
#define P2K_E_OLD -200

// Phone state
#define P2K_PHONE_NONE 0
#define P2K_PHONE_AT 1
#define P2K_PHONE_P2K 2

#define P2K_SEEK_BEGIN 0
#define P2K_SEEK_CURRENT 1
#define P2K_SEEK_END 2

typedef struct
{
	int vendor;
	int product;
	char manufacturerStr[256];
	char productStr[256];
}
p2k_devInfo;

// File information
typedef struct
{
	long id; //File number
	char name[256]; //File name. For phones with directories is like /a/mobile/aaa
	long size; //File size
	unsigned char owner; //File owner
	unsigned char attr;  //File attributes
} p2k_fileInfo;

typedef void (*p2k_onFile) (p2k_fileInfo file);

// Init library. Run first
void p2k_init();

// Set AT Vendor/Product ID. (Default 0x22b8/0x4902 - for C380/C650)
void p2k_setATconfig (unsigned int vendor, unsigned int product);

// Set P2K Vendor/Product ID. (Default 0x22b8/0x4901 - for C380/C650)
void p2k_setP2Kconfig (unsigned int vendor, unsigned int product);

// Get usb device list (like lsusb). Return count of devices.
p2k_devInfo* p2k_getDevList();

// Find phone. Returns current phone state (P2K_PHONE_NONE...)
int p2k_findPhone();

// Open phone
int p2k_openPhone();

// Close phone
int p2k_closePhone();

// Reboot phone
int p2k_reboot();

// Suspend phone
int p2k_suspend();

// Get hone drive name
// Unknown result for E398 and other phones with flash card
int p2k_getDriveName(unsigned char * buf);

// Get phone model
int p2k_getPhoneModel(unsigned char * buf);

// Get free space on device
int p2k_freeSpace(unsigned char * dev);

// Get File count
int p2k_fileCount();

// Get file list. onGetFile will be called for each file.
int p2k_fileList(p2k_onFile onGetFile);

// Read SEEM, record XXXX_YYYY from phone to seemBuf
int p2k_read_seem(int x, int y, unsigned char * seemBuf, int seemBufSize);

// Write SEEM record to phone.
int p2k_write_seem(int x, int y, unsigned char * seemBuf, int seemSize);

// Delete file from phone. File must be closed.
int p2k_FSAC_Delete(char * fname);

// Open file. file attributes will be changed to attr.
// Only one file can be opened. Close opened file before open new one.
int p2k_FSAC_Open(char * fname, unsigned char attr);

// Close file
int p2k_FSAC_Close();

// Seek in file. dir:
// P2K_SEEK_BEGIN - seek from begin
// P2K_SEEK_CURRENT - seek from current position
// P2K_SEEK_END - seek from end of file
int p2k_FSAC_Seek(unsigned long offset, char dir);

// Read data from file. size must be <= 0x400
// File pos will be increased.
int p2k_FSAC_Read(unsigned char * buf, unsigned short size);

// Write data to file. size must be <= 0x400
// File pos will be increased.
int p2k_FSAC_Write(unsigned char * tbuf, int size);


#endif