diff options
author | Evan Chu <evanchu@broadcom.com> | 2012-09-05 11:18:29 -0400 |
---|---|---|
committer | Martijn Coenen <maco@google.com> | 2012-09-06 10:33:48 +0200 |
commit | 01bd745d05c678e5ab768b7972dcbe7519be2149 (patch) | |
tree | f31d51faceaf4151b99d5dbc06d12b2798821ebb | |
parent | f340f1a071a54c6ea4644fcef45c784a9be3c19a (diff) | |
download | packages_apps_nfc-01bd745d05c678e5ab768b7972dcbe7519be2149.zip packages_apps_nfc-01bd745d05c678e5ab768b7972dcbe7519be2149.tar.gz packages_apps_nfc-01bd745d05c678e5ab768b7972dcbe7519be2149.tar.bz2 |
Remove "brcm" in names
BLTH01642677. Remove "brcm" in names.
Change-Id: Ic3a08abfeb2808d2a0b01402a76d9864b099ef49
-rw-r--r-- | nci/jni/NativeLlcpServiceSocket.cpp | 8 | ||||
-rw-r--r-- | nci/jni/NativeLlcpSocket.cpp | 14 | ||||
-rwxr-xr-x | nci/jni/NativeNfcManager.cpp | 8 | ||||
-rw-r--r-- | nci/jni/PeerToPeer.cpp | 40 | ||||
-rw-r--r-- | nci/jni/PeerToPeer.h | 50 | ||||
-rwxr-xr-x | nci/jni/PowerSwitch.h | 1 | ||||
-rwxr-xr-x | nci/jni/SecureElement.cpp | 3 | ||||
-rwxr-xr-x | nci/jni/SecureElement.h | 1 |
8 files changed, 62 insertions, 63 deletions
diff --git a/nci/jni/NativeLlcpServiceSocket.cpp b/nci/jni/NativeLlcpServiceSocket.cpp index ac00f61..c4a655e 100644 --- a/nci/jni/NativeLlcpServiceSocket.cpp +++ b/nci/jni/NativeLlcpServiceSocket.cpp @@ -50,13 +50,13 @@ static jobject nativeLlcpServiceSocket_doAccept(JNIEnv *e, jobject o, jint miu, jobject clientSocket = NULL; jclass clsNativeLlcpSocket = NULL; jfieldID f = 0; - tBRCM_JNI_HANDLE serverHandle; //handle of the local server + PeerToPeer::tJNI_HANDLE serverHandle; //handle of the local server bool stat = false; - tBRCM_JNI_HANDLE connHandle = PeerToPeer::getInstance().getNewJniHandle (); + PeerToPeer::tJNI_HANDLE connHandle = PeerToPeer::getInstance().getNewJniHandle (); ALOGD ("%s: enter", __FUNCTION__); - serverHandle = (tBRCM_JNI_HANDLE) nfc_jni_get_nfc_socket_handle (e, o); + serverHandle = (PeerToPeer::tJNI_HANDLE) nfc_jni_get_nfc_socket_handle (e, o); stat = PeerToPeer::getInstance().accept (serverHandle, connHandle, miu, rw); @@ -114,7 +114,7 @@ TheEnd: static jboolean nativeLlcpServiceSocket_doClose(JNIEnv *e, jobject o) { ALOGD ("%s: enter", __FUNCTION__); - tBRCM_JNI_HANDLE jniServerHandle = 0; + PeerToPeer::tJNI_HANDLE jniServerHandle = 0; bool stat = false; jniServerHandle = nfc_jni_get_nfc_socket_handle (e, o); diff --git a/nci/jni/NativeLlcpSocket.cpp b/nci/jni/NativeLlcpSocket.cpp index 55a4a76..f5daff0 100644 --- a/nci/jni/NativeLlcpSocket.cpp +++ b/nci/jni/NativeLlcpSocket.cpp @@ -42,7 +42,7 @@ static jboolean nativeLlcpSocket_doConnect (JNIEnv* e, jobject o, jint nSap) ALOGD ("%s: enter; sap=%d", __FUNCTION__, nSap); - tBRCM_JNI_HANDLE jniHandle = (tBRCM_JNI_HANDLE) nfc_jni_get_nfc_socket_handle (e,o); + PeerToPeer::tJNI_HANDLE jniHandle = (PeerToPeer::tJNI_HANDLE) nfc_jni_get_nfc_socket_handle (e,o); stat = PeerToPeer::getInstance().connectConnOriented (jniHandle, nSap); @@ -72,7 +72,7 @@ static jboolean nativeLlcpSocket_doConnectBy (JNIEnv* e, jobject o, jstring sn) bool stat = false; jboolean retVal = JNI_FALSE; - tBRCM_JNI_HANDLE jniHandle = (tBRCM_JNI_HANDLE) nfc_jni_get_nfc_socket_handle (e,o); + PeerToPeer::tJNI_HANDLE jniHandle = (PeerToPeer::tJNI_HANDLE) nfc_jni_get_nfc_socket_handle (e,o); const char* serviceName = e->GetStringUTFChars (sn, JNI_FALSE); //convert jstring, which is unicode, into char* @@ -105,7 +105,7 @@ static jboolean nativeLlcpSocket_doClose(JNIEnv *e, jobject o) bool stat = false; jboolean retVal = JNI_FALSE; - tBRCM_JNI_HANDLE jniHandle = (tBRCM_JNI_HANDLE) nfc_jni_get_nfc_socket_handle (e,o); + PeerToPeer::tJNI_HANDLE jniHandle = (PeerToPeer::tJNI_HANDLE) nfc_jni_get_nfc_socket_handle (e,o); stat = PeerToPeer::getInstance().disconnectConnOriented (jniHandle); @@ -134,7 +134,7 @@ static jboolean nativeLlcpSocket_doSend (JNIEnv* e, jobject o, jbyteArray data) uint32_t dataBufferLen = (uint32_t) e->GetArrayLength (data); bool stat = false; - tBRCM_JNI_HANDLE jniHandle = (tBRCM_JNI_HANDLE) nfc_jni_get_nfc_socket_handle (e,o); + PeerToPeer::tJNI_HANDLE jniHandle = (PeerToPeer::tJNI_HANDLE) nfc_jni_get_nfc_socket_handle (e,o); stat = PeerToPeer::getInstance().send (jniHandle, dataBuffer, dataBufferLen); @@ -166,7 +166,7 @@ static jint nativeLlcpSocket_doReceive(JNIEnv *e, jobject o, jbyteArray origBuff bool stat = false; jint retval = 0; - tBRCM_JNI_HANDLE jniHandle = (tBRCM_JNI_HANDLE) nfc_jni_get_nfc_socket_handle (e,o); + PeerToPeer::tJNI_HANDLE jniHandle = (PeerToPeer::tJNI_HANDLE) nfc_jni_get_nfc_socket_handle (e,o); stat = PeerToPeer::getInstance().receive (jniHandle, dataBuffer, dataBufferLen, actualLen); @@ -199,7 +199,7 @@ static jint nativeLlcpSocket_doGetRemoteSocketMIU (JNIEnv* e, jobject o) ALOGD ("%s: enter", __FUNCTION__); bool stat = false; - tBRCM_JNI_HANDLE jniHandle = (tBRCM_JNI_HANDLE) nfc_jni_get_nfc_socket_handle (e,o); + PeerToPeer::tJNI_HANDLE jniHandle = (PeerToPeer::tJNI_HANDLE) nfc_jni_get_nfc_socket_handle (e,o); jint miu = 0; miu = PeerToPeer::getInstance().getRemoteMaxInfoUnit (jniHandle); @@ -226,7 +226,7 @@ static jint nativeLlcpSocket_doGetRemoteSocketRW (JNIEnv* e, jobject o) bool stat = false; jint rw = 0; - tBRCM_JNI_HANDLE jniHandle = (tBRCM_JNI_HANDLE) nfc_jni_get_nfc_socket_handle (e,o); + PeerToPeer::tJNI_HANDLE jniHandle = (PeerToPeer::tJNI_HANDLE) nfc_jni_get_nfc_socket_handle (e,o); rw = PeerToPeer::getInstance().getRemoteRecvWindow (jniHandle); diff --git a/nci/jni/NativeNfcManager.cpp b/nci/jni/NativeNfcManager.cpp index ff61cfe..da9b242 100755 --- a/nci/jni/NativeNfcManager.cpp +++ b/nci/jni/NativeNfcManager.cpp @@ -42,7 +42,7 @@ extern "C" extern UINT8 *p_nfa_dm_lptd_cfg; extern UINT8 *p_nfa_dm_start_up_cfg; extern const UINT8 nfca_version_string []; -extern "C" void nfa_app_post_nci_reset (UINT32 brcm_hw_id); +extern "C" void downloadFirmwarePatchFile (UINT32 brcm_hw_id); namespace android { extern bool gIsTagDeactivating; @@ -940,7 +940,7 @@ static jobject nfcManager_doCreateLlcpServiceSocket (JNIEnv* e, jobject o, jint jobject serviceSocket = NULL; jclass clsNativeLlcpServiceSocket = NULL; jfieldID f = 0; - tBRCM_JNI_HANDLE jniHandle = PeerToPeer::getInstance().getNewJniHandle (); + PeerToPeer::tJNI_HANDLE jniHandle = PeerToPeer::getInstance().getNewJniHandle (); const char* serviceName = e->GetStringUTFChars (sn, JNI_FALSE); //convert jstring, which is unicode, into char* std::string serviceName2 (serviceName); @@ -1091,7 +1091,7 @@ static jobject nfcManager_doCreateLlcpSocket (JNIEnv* e, jobject o, jint nSap, j jobject clientSocket = NULL; jclass clsNativeLlcpSocket; jfieldID f; - tBRCM_JNI_HANDLE jniHandle = PeerToPeer::getInstance().getNewJniHandle (); + PeerToPeer::tJNI_HANDLE jniHandle = PeerToPeer::getInstance().getNewJniHandle (); bool stat = false; stat = PeerToPeer::getInstance().createClient (jniHandle, miu, rw); @@ -1713,7 +1713,7 @@ bool nfcManager_isNfcActive() void nfaBrcmInitCallback (UINT32 brcm_hw_id, UINT8 nvm_type) { ALOGD ("%s: enter; brcm_hw_id=0x%lX; nvm_type=0x%X", __FUNCTION__, brcm_hw_id, nvm_type); - nfa_app_post_nci_reset (brcm_hw_id); + downloadFirmwarePatchFile (brcm_hw_id); } diff --git a/nci/jni/PeerToPeer.cpp b/nci/jni/PeerToPeer.cpp index 56174d5..02aded1 100644 --- a/nci/jni/PeerToPeer.cpp +++ b/nci/jni/PeerToPeer.cpp @@ -142,7 +142,7 @@ P2pServer *PeerToPeer::findServer (tNFA_HANDLE nfaP2pServerHandle) ** Returns: PeerToPeer object. ** *******************************************************************************/ -P2pServer *PeerToPeer::findServer (tBRCM_JNI_HANDLE jniHandle) +P2pServer *PeerToPeer::findServer (tJNI_HANDLE jniHandle) { for (int i = 0; i < sMax; i++) { @@ -192,7 +192,7 @@ P2pServer *PeerToPeer::findServer (const char *serviceName) ** Returns: True if ok. ** *******************************************************************************/ -bool PeerToPeer::registerServer (tBRCM_JNI_HANDLE jniHandle, const char *serviceName) +bool PeerToPeer::registerServer (tJNI_HANDLE jniHandle, const char *serviceName) { static const char fn [] = "PeerToPeer::registerServer"; ALOGD ("%s: enter; service name: %s JNI handle: %u", fn, serviceName, jniHandle); @@ -294,7 +294,7 @@ bool PeerToPeer::registerServer (tBRCM_JNI_HANDLE jniHandle, const char *service ** Returns: None ** *******************************************************************************/ -void PeerToPeer::removeServer (tBRCM_JNI_HANDLE jniHandle) +void PeerToPeer::removeServer (tJNI_HANDLE jniHandle) { static const char fn [] = "PeerToPeer::removeServer"; @@ -465,7 +465,7 @@ void PeerToPeer::llcpDeactivatedHandler (nfc_jni_native_data* nat, tNFA_LLCP_DEA ** Returns: True if ok. ** *******************************************************************************/ -bool PeerToPeer::accept (tBRCM_JNI_HANDLE serverJniHandle, tBRCM_JNI_HANDLE connJniHandle, int maxInfoUnit, int recvWindow) +bool PeerToPeer::accept (tJNI_HANDLE serverJniHandle, tJNI_HANDLE connJniHandle, int maxInfoUnit, int recvWindow) { static const char fn [] = "PeerToPeer::accept"; tNFA_STATUS nfaStat = NFA_STATUS_FAILED; @@ -555,7 +555,7 @@ bool PeerToPeer::accept (tBRCM_JNI_HANDLE serverJniHandle, tBRCM_JNI_HANDLE conn ** Returns: True if ok. ** *******************************************************************************/ -bool PeerToPeer::deregisterServer (tBRCM_JNI_HANDLE jniHandle) +bool PeerToPeer::deregisterServer (tJNI_HANDLE jniHandle) { static const char fn [] = "PeerToPeer::deregisterServer"; ALOGD ("%s: enter; JNI handle: %u", fn, jniHandle); @@ -599,7 +599,7 @@ bool PeerToPeer::deregisterServer (tBRCM_JNI_HANDLE jniHandle) ** Returns: True if ok. ** *******************************************************************************/ -bool PeerToPeer::createClient (tBRCM_JNI_HANDLE jniHandle, UINT16 miu, UINT8 rw) +bool PeerToPeer::createClient (tJNI_HANDLE jniHandle, UINT16 miu, UINT8 rw) { static const char fn [] = "PeerToPeer::createClient"; int i = 0; @@ -654,7 +654,7 @@ bool PeerToPeer::createClient (tBRCM_JNI_HANDLE jniHandle, UINT16 miu, UINT8 rw) ** Returns: None ** *******************************************************************************/ -void PeerToPeer::removeConn(tBRCM_JNI_HANDLE jniHandle) +void PeerToPeer::removeConn(tJNI_HANDLE jniHandle) { static const char fn[] = "PeerToPeer::removeConn"; int ii = 0, jj = 0; @@ -720,7 +720,7 @@ void PeerToPeer::removeConn(tBRCM_JNI_HANDLE jniHandle) ** Returns: True if ok. ** *******************************************************************************/ -bool PeerToPeer::connectConnOriented (tBRCM_JNI_HANDLE jniHandle, const char* serviceName) +bool PeerToPeer::connectConnOriented (tJNI_HANDLE jniHandle, const char* serviceName) { static const char fn [] = "PeerToPeer::connectConnOriented"; ALOGD ("%s: enter; h: %u service name=%s", fn, jniHandle, serviceName); @@ -781,7 +781,7 @@ bool PeerToPeer::connectConnOriented (tBRCM_JNI_HANDLE jniHandle, const char* se ** Returns: True if ok. ** *******************************************************************************/ -bool PeerToPeer::connectConnOriented (tBRCM_JNI_HANDLE jniHandle, UINT8 destinationSap) +bool PeerToPeer::connectConnOriented (tJNI_HANDLE jniHandle, UINT8 destinationSap) { static const char fn [] = "PeerToPeer::connectConnOriented"; ALOGD ("%s: enter; h: %u dest sap: 0x%X", fn, jniHandle, destinationSap); @@ -803,7 +803,7 @@ bool PeerToPeer::connectConnOriented (tBRCM_JNI_HANDLE jniHandle, UINT8 destinat ** Returns: True if ok. ** *******************************************************************************/ -bool PeerToPeer::createDataLinkConn (tBRCM_JNI_HANDLE jniHandle, const char* serviceName, UINT8 destinationSap) +bool PeerToPeer::createDataLinkConn (tJNI_HANDLE jniHandle, const char* serviceName, UINT8 destinationSap) { static const char fn [] = "PeerToPeer::createDataLinkConn"; ALOGD ("%s: enter", fn); @@ -886,7 +886,7 @@ P2pClient *PeerToPeer::findClient (tNFA_HANDLE nfaConnHandle) ** Returns: PeerToPeer object. ** *******************************************************************************/ -P2pClient *PeerToPeer::findClient (tBRCM_JNI_HANDLE jniHandle) +P2pClient *PeerToPeer::findClient (tJNI_HANDLE jniHandle) { for (int i = 0; i < sMax; i++) { @@ -969,7 +969,7 @@ NfaConn *PeerToPeer::findConnection (tNFA_HANDLE nfaConnHandle) ** Returns: PeerToPeer object. ** *******************************************************************************/ -NfaConn *PeerToPeer::findConnection (tBRCM_JNI_HANDLE jniHandle) +NfaConn *PeerToPeer::findConnection (tJNI_HANDLE jniHandle) { int ii = 0, jj = 0; @@ -1012,7 +1012,7 @@ NfaConn *PeerToPeer::findConnection (tBRCM_JNI_HANDLE jniHandle) ** Returns: True if ok. ** *******************************************************************************/ -bool PeerToPeer::send (tBRCM_JNI_HANDLE jniHandle, UINT8 *buffer, UINT16 bufferLen) +bool PeerToPeer::send (tJNI_HANDLE jniHandle, UINT8 *buffer, UINT16 bufferLen) { static const char fn [] = "PeerToPeer::send"; tNFA_STATUS nfaStat = NFA_STATUS_FAILED; @@ -1068,7 +1068,7 @@ bool PeerToPeer::send (tBRCM_JNI_HANDLE jniHandle, UINT8 *buffer, UINT16 bufferL ** Returns: True if ok. ** *******************************************************************************/ -bool PeerToPeer::sendViaSnep (tBRCM_JNI_HANDLE jniHandle, UINT8 *buffer, UINT16 dataLen) +bool PeerToPeer::sendViaSnep (tJNI_HANDLE jniHandle, UINT8 *buffer, UINT16 dataLen) { static const char fn [] = "PeerToPeer::sendViaSnep"; tNFA_STATUS nfaStat = NFA_STATUS_FAILED; @@ -1152,7 +1152,7 @@ bool PeerToPeer::sendViaSnep (tBRCM_JNI_HANDLE jniHandle, UINT8 *buffer, UINT16 ** Returns: True if ok. ** *******************************************************************************/ -bool PeerToPeer::receive (tBRCM_JNI_HANDLE jniHandle, UINT8* buffer, UINT16 bufferLen, UINT16& actualLen) +bool PeerToPeer::receive (tJNI_HANDLE jniHandle, UINT8* buffer, UINT16 bufferLen, UINT16& actualLen) { static const char fn [] = "PeerToPeer::receive"; ALOGD_IF ((appl_trace_level>=BT_TRACE_LEVEL_DEBUG), "%s: enter; jniHandle: %u bufferLen: %u", fn, jniHandle, bufferLen); @@ -1243,7 +1243,7 @@ bool PeerToPeer::feedNppFromSnep (UINT8* buffer, UINT16 bufferLen, UINT16& actua ** Returns: True if ok. ** *******************************************************************************/ -bool PeerToPeer::disconnectConnOriented (tBRCM_JNI_HANDLE jniHandle) +bool PeerToPeer::disconnectConnOriented (tJNI_HANDLE jniHandle) { static const char fn [] = "PeerToPeer::disconnectConnOriented"; tNFA_STATUS nfaStat = NFA_STATUS_FAILED; @@ -1306,7 +1306,7 @@ bool PeerToPeer::disconnectConnOriented (tBRCM_JNI_HANDLE jniHandle) ** Returns: Peer's max information unit. ** *******************************************************************************/ -UINT16 PeerToPeer::getRemoteMaxInfoUnit (tBRCM_JNI_HANDLE jniHandle) +UINT16 PeerToPeer::getRemoteMaxInfoUnit (tJNI_HANDLE jniHandle) { static const char fn [] = "PeerToPeer::getRemoteMaxInfoUnit"; NfaConn *pConn = NULL; @@ -1331,7 +1331,7 @@ UINT16 PeerToPeer::getRemoteMaxInfoUnit (tBRCM_JNI_HANDLE jniHandle) ** Returns: Peer's receive window size. ** *******************************************************************************/ -UINT8 PeerToPeer::getRemoteRecvWindow (tBRCM_JNI_HANDLE jniHandle) +UINT8 PeerToPeer::getRemoteRecvWindow (tJNI_HANDLE jniHandle) { static const char fn [] = "PeerToPeer::getRemoteRecvWindow"; ALOGD ("%s: client jni handle: %u", fn, jniHandle); @@ -2010,9 +2010,9 @@ void PeerToPeer::connectionEventHandler (UINT8 event, tNFA_CONN_EVT_DATA* eventD ** Returns: A new JNI handle. ** *******************************************************************************/ -tBRCM_JNI_HANDLE PeerToPeer::getNewJniHandle () +PeerToPeer::tJNI_HANDLE PeerToPeer::getNewJniHandle () { - tBRCM_JNI_HANDLE newHandle = 0; + tJNI_HANDLE newHandle = 0; mNewJniHandleMutex.lock (); newHandle = mNextJniHandle++; diff --git a/nci/jni/PeerToPeer.h b/nci/jni/PeerToPeer.h index d689298..2921492 100644 --- a/nci/jni/PeerToPeer.h +++ b/nci/jni/PeerToPeer.h @@ -22,7 +22,6 @@ class P2pServer; class P2pClient; class NfaConn; #define MAX_NFA_CONNS_PER_SERVER 5 -typedef unsigned int tBRCM_JNI_HANDLE; /***************************************************************************** @@ -35,6 +34,7 @@ typedef unsigned int tBRCM_JNI_HANDLE; class PeerToPeer { public: + typedef unsigned int tJNI_HANDLE; /******************************************************************************* @@ -138,7 +138,7 @@ public: ** Returns: True if ok. ** *******************************************************************************/ - bool registerServer (tBRCM_JNI_HANDLE jniHandle, const char* serviceName); + bool registerServer (tJNI_HANDLE jniHandle, const char* serviceName); /******************************************************************************* @@ -150,7 +150,7 @@ public: ** Returns: True if ok. ** *******************************************************************************/ - bool deregisterServer (tBRCM_JNI_HANDLE jniHandle); + bool deregisterServer (tJNI_HANDLE jniHandle); /******************************************************************************* @@ -166,7 +166,7 @@ public: ** Returns: True if ok. ** *******************************************************************************/ - bool accept (tBRCM_JNI_HANDLE serverJniHandle, tBRCM_JNI_HANDLE connJniHandle, int maxInfoUnit, int recvWindow); + bool accept (tJNI_HANDLE serverJniHandle, tJNI_HANDLE connJniHandle, int maxInfoUnit, int recvWindow); /******************************************************************************* @@ -181,7 +181,7 @@ public: ** Returns: True if ok. ** *******************************************************************************/ - bool createClient (tBRCM_JNI_HANDLE jniHandle, UINT16 miu, UINT8 rw); + bool createClient (tJNI_HANDLE jniHandle, UINT16 miu, UINT8 rw); /******************************************************************************* @@ -195,7 +195,7 @@ public: ** Returns: True if ok. ** *******************************************************************************/ - bool connectConnOriented (tBRCM_JNI_HANDLE jniHandle, const char* serviceName); + bool connectConnOriented (tJNI_HANDLE jniHandle, const char* serviceName); /******************************************************************************* @@ -209,7 +209,7 @@ public: ** Returns: True if ok. ** *******************************************************************************/ - bool connectConnOriented (tBRCM_JNI_HANDLE jniHandle, UINT8 destinationSap); + bool connectConnOriented (tJNI_HANDLE jniHandle, UINT8 destinationSap); /******************************************************************************* @@ -224,7 +224,7 @@ public: ** Returns: True if ok. ** *******************************************************************************/ - bool send (tBRCM_JNI_HANDLE jniHandle, UINT8* buffer, UINT16 bufferLen); + bool send (tJNI_HANDLE jniHandle, UINT8* buffer, UINT16 bufferLen); /******************************************************************************* @@ -240,7 +240,7 @@ public: ** Returns: True if ok. ** *******************************************************************************/ - bool receive (tBRCM_JNI_HANDLE jniHandle, UINT8* buffer, UINT16 bufferLen, UINT16& actualLen); + bool receive (tJNI_HANDLE jniHandle, UINT8* buffer, UINT16 bufferLen, UINT16& actualLen); /******************************************************************************* @@ -253,7 +253,7 @@ public: ** Returns: True if ok. ** *******************************************************************************/ - bool disconnectConnOriented (tBRCM_JNI_HANDLE jniHandle); + bool disconnectConnOriented (tJNI_HANDLE jniHandle); /******************************************************************************* @@ -266,7 +266,7 @@ public: ** Returns: Peer's max information unit. ** *******************************************************************************/ - UINT16 getRemoteMaxInfoUnit (tBRCM_JNI_HANDLE jniHandle); + UINT16 getRemoteMaxInfoUnit (tJNI_HANDLE jniHandle); /******************************************************************************* @@ -279,7 +279,7 @@ public: ** Returns: Peer's receive window size. ** *******************************************************************************/ - UINT8 getRemoteRecvWindow (tBRCM_JNI_HANDLE jniHandle); + UINT8 getRemoteRecvWindow (tJNI_HANDLE jniHandle); /******************************************************************************* @@ -329,7 +329,7 @@ public: ** Returns: A new JNI handle. ** *******************************************************************************/ - tBRCM_JNI_HANDLE getNewJniHandle (); + tJNI_HANDLE getNewJniHandle (); private: @@ -340,14 +340,14 @@ private: UINT16 mRemoteWKS; // Peer's well known services bool mIsP2pListening; // If P2P listening is enabled or not tNFA_TECHNOLOGY_MASK mP2pListenTechMask; // P2P Listen mask - tBRCM_JNI_HANDLE mJniHandleSendingNppViaSnep; + tJNI_HANDLE mJniHandleSendingNppViaSnep; tNFA_HANDLE mSnepRegHandle; - tBRCM_JNI_HANDLE mRcvFakeNppJniHandle; + tJNI_HANDLE mRcvFakeNppJniHandle; UINT8 *mNppFakeOutBuffer; UINT32 mNppTotalLen; UINT32 mNppReadSoFar; tNFA_HANDLE mNdefTypeHandlerHandle; - tBRCM_JNI_HANDLE mNextJniHandle; + tJNI_HANDLE mNextJniHandle; P2pServer *mServers [sMax]; P2pClient *mClients [sMax]; @@ -437,7 +437,7 @@ private: ** Returns: PeerToPeer object. ** *******************************************************************************/ - P2pServer *findServer (tBRCM_JNI_HANDLE jniHandle); + P2pServer *findServer (tJNI_HANDLE jniHandle); /******************************************************************************* @@ -463,7 +463,7 @@ private: ** Returns: None ** *******************************************************************************/ - void removeServer (tBRCM_JNI_HANDLE jniHandle); + void removeServer (tJNI_HANDLE jniHandle); /******************************************************************************* @@ -476,7 +476,7 @@ private: ** Returns: None ** *******************************************************************************/ - void removeConn (tBRCM_JNI_HANDLE jniHandle); + void removeConn (tJNI_HANDLE jniHandle); /******************************************************************************* @@ -491,7 +491,7 @@ private: ** Returns: True if ok. ** *******************************************************************************/ - bool createDataLinkConn (tBRCM_JNI_HANDLE jniHandle, const char* serviceName, UINT8 destinationSap); + bool createDataLinkConn (tJNI_HANDLE jniHandle, const char* serviceName, UINT8 destinationSap); /******************************************************************************* @@ -517,7 +517,7 @@ private: ** Returns: PeerToPeer object. ** *******************************************************************************/ - P2pClient *findClient (tBRCM_JNI_HANDLE jniHandle); + P2pClient *findClient (tJNI_HANDLE jniHandle); /******************************************************************************* @@ -556,7 +556,7 @@ private: ** Returns: PeerToPeer object. ** *******************************************************************************/ - NfaConn *findConnection (tBRCM_JNI_HANDLE jniHandle); + NfaConn *findConnection (tJNI_HANDLE jniHandle); /******************************************************************************* @@ -571,7 +571,7 @@ private: ** Returns: True if ok. ** *******************************************************************************/ - bool sendViaSnep (tBRCM_JNI_HANDLE jniHandle, UINT8 *buffer, UINT16 bufferLen); + bool sendViaSnep (tJNI_HANDLE jniHandle, UINT8 *buffer, UINT16 bufferLen); /******************************************************************************* @@ -601,7 +601,7 @@ class NfaConn { public: tNFA_HANDLE mNfaConnHandle; // NFA handle of the P2P connection - tBRCM_JNI_HANDLE mJniHandle; // JNI handle of the P2P connection + PeerToPeer::tJNI_HANDLE mJniHandle; // JNI handle of the P2P connection UINT16 mMaxInfoUnit; UINT8 mRecvWindow; UINT16 mRemoteMaxInfoUnit; @@ -635,7 +635,7 @@ class P2pServer { public: tNFA_HANDLE mNfaP2pServerHandle; // NFA p2p handle of local server - tBRCM_JNI_HANDLE mJniHandle; // JNI Handle + PeerToPeer::tJNI_HANDLE mJniHandle; // JNI Handle SyncEvent mRegServerEvent; // for NFA_P2pRegisterServer() SyncEvent mConnRequestEvent; // for accept() std::string mServiceName; diff --git a/nci/jni/PowerSwitch.h b/nci/jni/PowerSwitch.h index 896133e..2e6b604 100755 --- a/nci/jni/PowerSwitch.h +++ b/nci/jni/PowerSwitch.h @@ -10,7 +10,6 @@ *****************************************************************************/ #pragma once #include "nfa_api.h" -#include "nfa_brcm_api.h" #include "SyncEvent.h" diff --git a/nci/jni/SecureElement.cpp b/nci/jni/SecureElement.cpp index 1d52955..e4d9400 100755 --- a/nci/jni/SecureElement.cpp +++ b/nci/jni/SecureElement.cpp @@ -17,6 +17,7 @@ #include "PowerSwitch.h" #include "HostAidRouter.h" #include "nfa_vs_brcm_api.h" +#include "nfa_brcm_api.h" #include "JavaClassConstants.h" @@ -183,7 +184,7 @@ bool SecureElement::initialize (nfc_jni_native_data* native) SyncEventGuard guard (mHciRegisterEvent); - nfaStat = NFA_HciRegister (const_cast<char*>("brcm_jni"), nfaHciCallback, TRUE); + nfaStat = NFA_HciRegister (const_cast<char*>("nfc_jni"), nfaHciCallback, TRUE); if (nfaStat != NFA_STATUS_OK) { ALOGE ("%s: fail hci register; error=0x%X", fn, nfaStat); diff --git a/nci/jni/SecureElement.h b/nci/jni/SecureElement.h index ea1f568..65e779e 100755 --- a/nci/jni/SecureElement.h +++ b/nci/jni/SecureElement.h @@ -16,7 +16,6 @@ #include "RouteDataSet.h" extern "C" { - #include "nfa_brcm_api.h" #include "nfa_ee_api.h" #include "nfa_hci_api.h" #include "nfa_hci_defs.h" |