Exemplo n.º 1
0
            private static void MapGetResponse(int reqId, IntPtr provider, IntPtr valueList, int valueCount, bool providerResult, string error, IntPtr userData)
            {
                Log.Debug(LogTag, $"MapGetResponse {reqId.ToString()}");

                MapGetResult mgr;
                Consumer     consumer = null;

                if (!UnregisterReqId(reqId, ref consumer))
                {
                    return;
                }

                if (!providerResult)
                {
                    Log.Error(LogTag, $"reqId {reqId.ToString()}, error : {error}");
                }

                if (valueList != IntPtr.Zero)
                {
                    string[] stringArray;
                    IntPtrToStringArray(valueList, valueCount, out stringArray);
                    mgr = new MapGetResult(stringArray, providerResult);
                }
                else
                {
                    mgr = new MapGetResult(new string[0], providerResult);
                    Log.Error(LogTag, $"reqId {reqId.ToString()}, valueList is null");
                }

                consumer.OnMapGetResult(mgr);
            }
Exemplo n.º 2
0
            private static void MapGetResponse(int reqId, IntPtr provider, IntPtr valueList, int valueCount, bool providerResult, string error, IntPtr userData)
            {
                MapGetResult mgr;

                Log.Debug(LogTag, $"MapGetResponse {reqId.ToString()}");
                if (!_reqConsumerDictionary.ContainsKey(reqId))
                {
                    Log.Error(LogTag, $"Invalid reqId {reqId.ToString()}");
                    return;
                }

                if (!providerResult)
                {
                    Log.Error(LogTag, $"reqId {reqId.ToString()}, error : {error}");
                }

                if (valueList != null)
                {
                    string[] stringArray;
                    IntPtrToStringArray(valueList, valueCount, out stringArray);
                    mgr = new MapGetResult(stringArray, providerResult);
                }
                else
                {
                    mgr = new MapGetResult(new string[0], providerResult);
                    Log.Error(LogTag, $"reqId {reqId.ToString()}, valueList is null");
                }

                Consumer consumer = _reqConsumerDictionary[reqId];

                consumer.OnMapGetResult(mgr);
                _reqConsumerDictionary.Remove(reqId);
            }
Exemplo n.º 3
0
 /// <summary>
 /// Overrides this method if you want to handle the behavior when the map get response is received.
 /// </summary>
 /// <since_tizen> 3 </since_tizen>
 protected virtual void OnMapGetResult(MapGetResult result)
 {
     Log.Info(LogTag, "The OnMapGetResult is not implemented.");
 }